thursday-agent 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +4 -4
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +12 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +6 -6
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js +5 -4
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +9 -9
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +9 -9
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +2 -2
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/file/route.js +12 -12
- package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +2 -2
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +2 -2
- 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.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +3 -3
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/[provider]/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 +2 -2
- 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 +13 -13
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +11 -11
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +9 -9
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/running/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +7 -6
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +8 -8
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +8 -8
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route.js +6 -6
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/plan/route.js +16 -16
- package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +6 -6
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/settings/route.js +6 -6
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +16 -16
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +10 -10
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
- package/.next/server/app/artifact/[...path]/page.js +5 -5
- 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/react-loadable-manifest.json +2 -2
- package/.next/server/app/page/server-reference-manifest.json +162 -162
- package/.next/server/app/page.js +7 -7
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__019e1fy._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__01jpmcj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__03bjojd._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__06kxzw-._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0atwstu._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__005onk_._.js → [root-of-the-server]__0cfv4rq._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d-dfqm._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1-i6lgn._.js → [root-of-the-server]__0d00o4_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0itmdqy._.js → [root-of-the-server]__0e8y4ok._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1tyftcr._.js → [root-of-the-server]__0eem_66._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0xn7a8p._.js → [root-of-the-server]__0jn2qbf._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__08922kg._.js → [root-of-the-server]__0l563r8._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0mh1tgg._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0mq0qmk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1a7rgvy._.js → [root-of-the-server]__0pp2355._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1g08s7l._.js → [root-of-the-server]__0r77huw._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__10_v9ml._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1478lu3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__16xao_p._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__17kdjf6._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__17m7ag9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__17yv6lg._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__19aqyg-._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__19imprr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1fhule0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hing45._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0mttntm._.js → [root-of-the-server]__1ivfglf._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1jcu_e9._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__0m0qglo._.js → [root-of-the-server]__1kb-dkn._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0eluax8._.js → [root-of-the-server]__1mowvzz._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1o7z93z._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1onvx8x._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1q_d6dj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1u_6dhy._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1_wtn0q._.js → [root-of-the-server]__1yiqjfx._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1yr_vvq._.js +3 -0
- package/.next/server/chunks/_0-mqt2w._.js +3 -0
- package/.next/server/chunks/_0-qt5if._.js +1 -1
- package/.next/server/chunks/{_0fau3ya._.js → _00aztuo._.js} +2 -2
- package/.next/server/chunks/_021kabv._.js +53 -0
- package/.next/server/chunks/_032k4m6._.js +3 -0
- package/.next/server/chunks/_03p6r2-._.js +1 -1
- package/.next/server/chunks/_06b5b4-._.js +2 -2
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_07mczew._.js +3 -0
- package/.next/server/chunks/_07pkeds._.js +1 -1
- package/.next/server/chunks/_08354bn._.js +22 -22
- package/.next/server/chunks/_083t_nr._.js +5 -0
- package/.next/server/chunks/_0c-s0ei._.js +3 -0
- package/.next/server/chunks/_0cq69mm._.js +1 -1
- package/.next/server/chunks/_0gifi_2._.js +7 -0
- package/.next/server/chunks/_0gxz_1b._.js +1 -1
- package/.next/server/chunks/{_1tjwvoz._.js → _0la8s6t._.js} +2 -2
- package/.next/server/chunks/_0p27in2._.js +1 -1
- package/.next/server/chunks/{_09rtyfn._.js → _0rn3c_0._.js} +24 -26
- package/.next/server/chunks/_0ue8nq-._.js +5 -1
- package/.next/server/chunks/{_1uu4wjr._.js → _0wkhub3._.js} +2 -2
- package/.next/server/chunks/_0wyh244._.js +22 -22
- package/.next/server/chunks/_0ynjnhl._.js +5 -0
- package/.next/server/chunks/_1-wp0r0._.js +1 -1
- package/.next/server/chunks/{_201k0ah._.js → _12-7atf._.js} +2 -2
- package/.next/server/chunks/{_02mn8d7._.js → _124q1p2._.js} +2 -2
- package/.next/server/chunks/{_14xuq46._.js → _13qoxq9._.js} +24 -26
- package/.next/server/chunks/{_11y8h29._.js → _15-_mie._.js} +2 -2
- package/.next/server/chunks/_1823_7a._.js +1 -1
- package/.next/server/chunks/{_0uir6hb._.js → _186uku9._.js} +2 -2
- package/.next/server/chunks/{_0ggqpiz._.js → _18sj4xf._.js} +2 -2
- package/.next/server/chunks/_19kea1l._.js +12 -12
- package/.next/server/chunks/_1ac33qw._.js +2 -2
- package/.next/server/chunks/{_18z965x._.js → _1chy-lk._.js} +2 -2
- package/.next/server/chunks/_1cw6-rv._.js +1 -1
- package/.next/server/chunks/_1evvnbp._.js +1 -1
- package/.next/server/chunks/_1f_x75d._.js +3 -0
- package/.next/server/chunks/_1gn2r2q._.js +7 -9
- package/.next/server/chunks/_1icgbi8._.js +1 -1
- package/.next/server/chunks/{_1ozcb6o._.js → _1k6bmez._.js} +2 -2
- package/.next/server/chunks/_1ko5shz._.js +1 -1
- package/.next/server/chunks/_1ksyu6r._.js +1 -1
- package/.next/server/chunks/_1kwmzab._.js +3 -0
- package/.next/server/chunks/_1lg0lsu._.js +1 -1
- package/.next/server/chunks/_1pv6xbq._.js +5 -0
- package/.next/server/chunks/_1q42187._.js +2 -2
- package/.next/server/chunks/_1q6e56i._.js +7 -9
- package/.next/server/chunks/_1t43w6q._.js +1 -1
- package/.next/server/chunks/_1t8fv7b._.js +1 -1
- package/.next/server/chunks/_1ufbxe1._.js +1 -1
- package/.next/server/chunks/_1wgae1c._.js +1 -1
- package/.next/server/chunks/_1xps4ob._.js +1 -1
- package/.next/server/chunks/_1znrlca._.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_14kex_m._.js +11 -11
- package/.next/server/chunks/features_bot_08z387_._.js +2 -2
- package/.next/server/chunks/features_bot_1d6ghh5._.js +41 -0
- package/.next/server/chunks/features_bot_1dfrdsb._.js +10 -6
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0yd5xa0._.js → node_modules_consola_dist_chunks_prompt_mjs_0k--vqs._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ufuc3s._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05qiosr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0y03pu0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0zt_au4._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0eloa6y._.js → [root-of-the-server]__17yeveo._.js} +5 -5
- package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1t38-p_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1u42eh0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__203utm3._.js +1 -1
- package/.next/server/chunks/ssr/{_0xurp8n._.js → _0-s7ria._.js} +2 -2
- package/.next/server/chunks/ssr/_03vw3u5._.js +3 -0
- package/.next/server/chunks/ssr/_088qe9a._.js +162 -0
- package/.next/server/chunks/ssr/_09a6bpd._.js +1 -1
- package/.next/server/chunks/ssr/{_0u43zjx._.js → _0a_pedm._.js} +2 -2
- package/.next/server/chunks/ssr/_0ali_i8._.js +3 -0
- package/.next/server/chunks/ssr/_0cd6g3l._.js +3 -3
- package/.next/server/chunks/ssr/{_1nwey7a._.js → _0eprrig._.js} +2 -2
- package/.next/server/chunks/ssr/_0flnog5._.js +3 -0
- package/.next/server/chunks/ssr/_0iuvjnw._.js +1 -1
- package/.next/server/chunks/ssr/{_0t_e9rd._.js → _0k-gl8l._.js} +2 -2
- package/.next/server/chunks/ssr/_0kmldic._.js +41 -0
- package/.next/server/chunks/ssr/_0ks03l-._.js +3 -0
- package/.next/server/chunks/ssr/_0mng-y8._.js +6 -0
- package/.next/server/chunks/ssr/_0tg3o37._.js +1 -1
- package/.next/server/chunks/ssr/_0ugzm_0._.js +3 -0
- package/.next/server/chunks/ssr/{_0ntol64._.js → _0wnv6c0._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-y08rv._.js → _0z9zkd-._.js} +2 -2
- package/.next/server/chunks/ssr/_11l9kc0._.js +1 -1
- package/.next/server/chunks/ssr/_12_ail7._.js +3 -0
- package/.next/server/chunks/ssr/_16_7zeo._.js +1 -1
- package/.next/server/chunks/ssr/_16wjbs2._.js +3 -0
- package/.next/server/chunks/ssr/{_16o81mn._.js → _18rmqqu._.js} +2 -2
- package/.next/server/chunks/ssr/_1bfrntd._.js +2 -2
- package/.next/server/chunks/ssr/{_0gn_i4s._.js → _1ckje8g._.js} +2 -2
- package/.next/server/chunks/ssr/_1crszf7._.js +1 -1
- package/.next/server/chunks/ssr/_1h3qetc._.js +3 -0
- package/.next/server/chunks/ssr/{_1gz4ov7._.js → _1kpvfmn._.js} +3 -3
- package/.next/server/chunks/ssr/{_12hdw8x._.js → _1l-3enz._.js} +26 -28
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
- package/.next/server/chunks/ssr/{_0ux4i2m._.js → _1v1pcoh._.js} +2 -2
- package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
- package/.next/server/chunks/ssr/{features_bot_06n7hmd._.js → features_bot_0-7flc-._.js} +2 -2
- package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_1stfytf._.js +41 -0
- package/.next/server/chunks/ssr/features_config_10xs4l1._.js +20 -0
- 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_thursday_0cf9y0b._.js +1 -1
- package/.next/server/chunks/ssr/features_thursday_components_here-globe_tsx_055duhw._.js +1 -1
- package/.next/server/chunks/ssr/lib_utils_ts_0_f1xvm._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1i-g3bz._.js → node_modules_00mh9o-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bvw77g._.js → node_modules_04f_uw2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_16tn8xu._.js → node_modules_07udd3z._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ksqeyy._.js → node_modules_08-pj-2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0e398ts._.js → node_modules_098h6h5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_19r9vjv._.js → node_modules_0_7yfem._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01v7ybp._.js → node_modules_0ayoorn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_zk6yd._.js → node_modules_0bp3vfu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m-dnm-._.js → node_modules_0ch5hqr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0536cp2._.js → node_modules_0e-hyim._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yn2z6s._.js → node_modules_0ffm9w3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1jf8aik._.js → node_modules_0jzyuwk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m2oth3._.js → node_modules_0ln4iwf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1dlue-g._.js → node_modules_0my2hph._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cpegwf._.js → node_modules_0y_k4h5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13dwal5._.js → node_modules_10bzndo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ctm_ju._.js → node_modules_1b5rxw5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01fukqn._.js → node_modules_1b_h09q._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12hh0bx._.js → node_modules_1e83j9e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08m1gvh._.js → node_modules_1e9ugfy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06n6ruk._.js → node_modules_1hd66k0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zdz2zf._.js → node_modules_1inwr2m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zalmtr._.js → node_modules_1j9xx1k._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1kfbdfo._.js → node_modules_1k8kypa._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_056xgci._.js → node_modules_1oeu85h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ie8g6a._.js → node_modules_1r2ghv5._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1fqgrh0._.js → node_modules_1ttpnib._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0nj1l8f._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ir6p7s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_17ok98u._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1ejf5ye._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- 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 +163 -163
- package/.next/static/chunks/02lze_e5sagjn.js +1 -0
- package/.next/static/chunks/{3866u-edsoyj3.js → 081kl7k8r6f8z.js} +1 -1
- package/.next/static/chunks/0_s4z70lx1tgs.js +1 -0
- package/.next/static/chunks/0fklfoj8o_msg.js +18 -0
- package/.next/static/chunks/0ve2gb0hw3wkq.js +1 -0
- package/.next/static/chunks/11c3uijgqik4m.js +39 -0
- package/.next/static/chunks/{0go5_9zqag7l0.js → 125lh2zzxk3r2.js} +1 -1
- package/.next/static/chunks/{3zv4wiqjl5kex.js → 166v36614ycsf.js} +1 -1
- package/.next/static/chunks/16np6727e61io.js +1 -0
- package/.next/static/chunks/18amidjlaqexf.js +1 -0
- package/.next/static/chunks/{35ehi-okrfot5.js → 1ettmta9iet7b.js} +1 -1
- package/.next/static/chunks/{1dy5xaxjdsy11.js → 1j4rndg17wgfk.js} +1 -1
- package/.next/static/chunks/{01r1uco3ikisc.js → 1mpz4epyg-7pz.js} +1 -1
- package/.next/static/chunks/{05blzta_1i7c2.js → 1oh4hbusfz97l.js} +1 -1
- package/.next/static/chunks/{3qfhjwd9yuijo.js → 1x1-44qmhu437.js} +1 -1
- package/.next/static/chunks/{0hpx0--bh7vld.js → 22jb4s3-8ckup.js} +1 -1
- package/.next/static/chunks/236le5kv_yj6a.css +1 -0
- package/.next/static/chunks/24op50z6sqi_5.js +1 -0
- package/.next/static/chunks/2eczs-lporqt6.js +1 -0
- package/.next/static/chunks/{2nbj2t9yp8ke9.js → 2sxclirl-c-um.js} +1 -1
- package/.next/static/chunks/2yfmmo4qr_f-m.js +1 -0
- package/.next/static/chunks/2z4sodeldj_86.js +1 -0
- package/.next/static/chunks/{3tyacy8fh5_18.js → 2zhiqxw61qowv.js} +2 -2
- package/.next/static/chunks/338dt83llhu5m.js +1 -0
- package/.next/static/chunks/3ezjz93yvzmop.js +4 -0
- package/.next/static/chunks/3h6rqjx92wva9.js +1 -0
- package/.next/static/chunks/3ph9u-51x6jhe.js +15 -0
- package/.next/static/chunks/{052u13mcoxt87.js → 3uf32hp_g9stz.js} +1 -1
- package/.next/static/chunks/3w7zt3xzyjn86.js +3 -0
- package/.next/static/chunks/3xkx7vqefm7on.js +2 -0
- package/.next/static/chunks/3ygk41pgsw7nv.js +1 -0
- package/.next/static/chunks/{3146sccz1j76i.js → 411uyd0is9u5s.js} +1 -1
- package/.next/static/chunks/4384atd5zerir.js +1 -0
- package/README.md +1 -1
- package/database/migrations/20260929121448_thread_started_by/migration.sql +1 -0
- package/database/migrations/20260929121448_thread_started_by/snapshot.json +1969 -0
- package/guide/bots.md +89 -44
- package/guide/calls.md +41 -25
- package/guide/index.md +5 -2
- package/guide/phone.md +7 -4
- package/guide/setup.md +12 -6
- package/guide/trouble.md +3 -2
- package/package.json +1 -1
- package/public/voices/intro/mic-b17ca82d.ogg +0 -0
- package/seed-skills/concierge/travel/SKILL.md +2 -1
- package/seed-skills/concierge/travel/page/itinerary.css +1009 -257
- package/seed-skills/concierge/travel/references/itinerary.md +95 -35
- package/seed-skills/concierge/travel/references/plan.md +11 -4
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +754 -138
- package/skills/README.md +7 -4
- package/skills/artifact/SKILL.md +17 -13
- package/skills/artifact/references/canvas.md +4 -5
- package/skills/artifact/references/deck.md +93 -2
- package/skills/artifact/runtime/app/kit/src/index.css +35 -0
- package/skills/artifact/runtime/app/kit/tailwind.config.js +6 -0
- package/skills/artifact/runtime/deck/data.mjs +21 -0
- package/skills/artifact/runtime/deck/deck.css +254 -4
- package/skills/artifact/runtime/deck/deck.html +3 -0
- package/skills/artifact/runtime/deck/deck.js +88 -5
- package/skills/artifact/runtime/deck/deck.mjs +1 -17
- package/skills/artifact/runtime/document/quick.css +264 -89
- package/skills/artifact/runtime/document/quick.html +16 -7
- package/skills/artifact/runtime/document/quick.js +377 -98
- package/skills/artifact/runtime/render.mjs +52 -6
- package/skills/artifact/runtime/sheet/sheet.css +29 -21
- package/skills/artifact/runtime/shell/drafts.js +25 -0
- package/skills/artifact/runtime/shell/fonts/Geist-latin-ext.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/Geist-latin.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/GeistMono-latin-ext.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/GeistMono-latin.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/OFL.txt +93 -0
- package/skills/artifact/runtime/shell/head.html +27 -2
- package/skills/artifact/runtime/shell/shell.css +88 -8
- package/skills/artifact/runtime/shell/shell.js +318 -22
- package/skills/artifact/runtime/shell/wear.mjs +114 -12
- package/skills/artifact/scripts/app.mjs +5 -0
- package/skills/artifact/scripts/chart.mjs +20 -19
- package/skills/artifact/scripts/deck.mjs +276 -0
- package/skills/artifact/scripts/document.mjs +55 -2
- package/skills/artifact/scripts/media.mjs +1 -1
- package/skills/artifact/templates/boards/direction.html +55 -2
- package/skills/browser/SKILL.md +1 -1
- package/skills/browser/references/scripts.md +1 -1
- package/skills/daily-brief/SKILL.md +2 -0
- package/skills/daily-brief/page/brief.css +460 -302
- package/skills/daily-brief/references/brief.md +33 -7
- package/skills/daily-brief/scripts/page.mjs +241 -48
- package/skills/media-digest/SKILL.md +1 -0
- package/skills/media-digest/scripts/digest.mjs +57 -43
- package/.next/server/chunks/[root-of-the-server]__00f051a._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__0340k46._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__0ndw2yj._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__16y0k92._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__18e65_-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1a0xgyh._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1dth047._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1huywqp._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1ij4h2a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1q1s4ls._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qa67zs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t-mfa4._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__20ofm9t._.js +0 -3
- package/.next/server/chunks/_0483t_f._.js +0 -5
- package/.next/server/chunks/_0lcthk8._.js +0 -3
- package/.next/server/chunks/_0uv1gs1._.js +0 -3
- package/.next/server/chunks/_17fjc-7._.js +0 -5
- package/.next/server/chunks/_1dcbwn-._.js +0 -3
- package/.next/server/chunks/_1mgzs18._.js +0 -3
- package/.next/server/chunks/_20qn224._.js +0 -3
- package/.next/server/chunks/features_bot_0zy_q8y._.js +0 -37
- package/.next/server/chunks/ssr/[root-of-the-server]__04upd5v._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0dy20eb._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0yyxgt2._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__14j8gxy._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__20t_4l2._.js +0 -3
- package/.next/server/chunks/ssr/_00buy3i._.js +0 -162
- package/.next/server/chunks/ssr/_014_wjp._.js +0 -3
- package/.next/server/chunks/ssr/_07m4ii5._.js +0 -3
- package/.next/server/chunks/ssr/_0cv9tmv._.js +0 -3
- package/.next/server/chunks/ssr/_0j6rtjm._.js +0 -6
- package/.next/server/chunks/ssr/_0ogkeu-._.js +0 -3
- package/.next/server/chunks/ssr/_10sc7ab._.js +0 -3
- package/.next/server/chunks/ssr/_14nwim3._.js +0 -37
- package/.next/server/chunks/ssr/_1e01b-_._.js +0 -3
- package/.next/server/chunks/ssr/_1nfv27b._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1c56lew._.js +0 -37
- package/.next/server/chunks/ssr/features_bot_1knyan7._.js +0 -3
- package/.next/server/chunks/ssr/features_config_09wq1s9._.js +0 -20
- package/.next/static/chunks/01gkq9y6_xk4a.js +0 -1
- package/.next/static/chunks/09kwsjbmr_z1w.js +0 -1
- package/.next/static/chunks/0ynv7zu_bguve.js +0 -1
- package/.next/static/chunks/0zi59tghmg1lu.js +0 -18
- package/.next/static/chunks/1_ftsgxa-sia_.js +0 -1
- package/.next/static/chunks/1cg3torc90q5t.js +0 -1
- package/.next/static/chunks/1qnx1h5c8f93b.js +0 -1
- package/.next/static/chunks/1rwn3d9ji5w35.js +0 -1
- package/.next/static/chunks/1so3f5fi7e5g9.js +0 -35
- package/.next/static/chunks/1ya41wxfmp4s8.js +0 -1
- package/.next/static/chunks/27rwkfu7_xvs1.js +0 -4
- package/.next/static/chunks/2hueh8masqd91.js +0 -15
- package/.next/static/chunks/2jrt_752fqz2f.js +0 -1
- package/.next/static/chunks/2ogme4qydxnaq.js +0 -3
- package/.next/static/chunks/2r2tocw2rpvm2.js +0 -1
- package/.next/static/chunks/2t4kimg1lt-p7.js +0 -2
- package/.next/static/chunks/2w6y71o27my_z.js +0 -1
- package/.next/static/chunks/31_am8rtmk_tv.css +0 -1
- package/.next/static/chunks/337g9g_ux2gj-.js +0 -1
- package/public/voices/intro/heard-1f12cd45.ogg +0 -0
- package/public/voices/intro/mic-e561372a.ogg +0 -0
- package/skills/artifact/references/book.md +0 -163
- package/skills/artifact/runtime/book/book.css +0 -256
- package/skills/artifact/runtime/book/book.html +0 -38
- package/skills/artifact/runtime/book/book.js +0 -81
- package/skills/artifact/scripts/book-pdf.mjs +0 -73
- package/skills/artifact/scripts/book-video.mjs +0 -168
- package/skills/artifact/scripts/book.mjs +0 -291
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_buildManifest.js +0 -0
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_ssgManifest.js +0 -0
- /package/seed-skills/{marketer → writer}/marketing/LICENSE +0 -0
- /package/seed-skills/{marketer → writer}/marketing/SKILL.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting-copy-frameworks.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting-natural-transitions.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-copy-guidelines.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-email-types.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-sequence-templates.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/launch.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/product-marketing.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit-ai-writing-detection.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit-international-seo.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-carousel-frameworks.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-platform-limits.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-platforms.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-post-templates.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-reverse-engineering.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-short-form-video.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social.md +0 -0
|
@@ -121,17 +121,17 @@ ${ay(b,c)}
|
|
|
121
121
|
|
|
122
122
|
${a}`;return}f&&e.push(f),f=a};for(let a of d){let d="code"===a.kind?aw(a.lang,a.body,b):a.drawn;if(d.length<=c)g(d);else if("code"===a.kind)for(let d of function(a,b,c,d){let e=d-aw(a,"",c).length,f=b.split("\n").flatMap(a=>a.length>e?ar(a,e):[a]),g=[],h=[];for(let b of f)h.length&&aw(a,[...h,b].join("\n"),c).length>d&&(g.push(aw(a,h.join("\n"),c)),h=[]),h.push(b);return h.length&&g.push(aw(a,h.join("\n"),c)),g}(a.lang,a.body,b,c))g(d);else for(let d of function a(b,c,d){return ar(b,d).flatMap(b=>{let e=ay(b,c);return e.length<=d||b.length<2?[e]:a(b,c,Math.floor(d*b.length/e.length))})}(a.words,b,c))g(d)}return f&&e.push(f),e.length?e:[ay("…",b)]},"literal",0,a=>a.replace(/[\\`*_{}[\]()#+\-.!|~<>]/g,"\\$&")],465584)},242104,a=>{"use strict";a.s(["runSocket",0,function(a,b,c){return new Promise((d,e)=>{let f=new WebSocket(a),g=a=>{f.readyState===WebSocket.OPEN&&f.send(JSON.stringify(a))},h=!1,i=a=>{h||(h=!0,c.removeEventListener("abort",k),d(a))},j=(a,b)=>{i({code:a,reason:b}),f.close(a,b)},k=()=>j(1e3,"");c.addEventListener("abort",k,{once:!0}),f.addEventListener("message",a=>{try{b.message(JSON.parse(String(a.data)),g,j)}catch{}}),f.addEventListener("error",()=>{f.readyState===WebSocket.OPEN||h||(h=!0,c.removeEventListener("abort",k),e(Error(`Could not connect to ${new URL(a).host}`)))}),f.addEventListener("close",a=>i({code:a.code,reason:a.reason}))})}])},479286,a=>{"use strict";var b=a.i(936292),c=a.i(465584),d=a.i(242104);let e="https://discord.com/api/v10",f={4004:"Discord did not take the bot token: it was reset or mistyped. Reset it on the application's Bot page and paste the new one here.",4013:"Discord refused the intents this bot asked for.",4014:"Discord refused an intent this bot is not allowed — check the bot's page."};a.s(["createDiscord",0,function(a){async function g(c,d,f){let g=f instanceof FormData;for(let h=0;;h++){let i=await fetch(`${e}${d}`,{method:c,headers:{authorization:`Bot ${a}`,...g||!f?{}:{"content-type":"application/json"}},body:g?f:f?JSON.stringify(f):void 0}).catch(a=>{throw Error(`Could not reach ${new URL(e).host}`,{cause:a})});if(i.ok)return 204===i.status?null:await i.json();let j=await i.json().catch(()=>null);if(429===i.status&&await (0,b.waitOut)(j?.retry_after,h))continue;let k=j?.message??`Discord answered ${i.status}`;throw 401===i.status?new b.ChannelRefusal(k):Error(k)}}let h=a=>{let b=a.length<=5?1:5,c=[];for(let d=0;d<a.length&&c.length<5;d+=b)c.push({type:1,components:a.slice(d,d+b).map(a=>({type:2,style:2,label:a.text.slice(0,80),custom_id:a.data}))});return c};return{limits:{take:1/0,file:0x1400000,picture:0x1400000},async listen(c,e){let h,i=null,j=!0;try{let k=await (0,d.runSocket)("wss://gateway.discord.gg/?v=10&encoding=json",{message(b,d,e){let{op:f,d:k,s:l,t:m}=b;if(null!==l&&(i=l),10===f){let b=k.heartbeat_interval;h=setInterval(()=>{if(!j)return e(4e3,"Discord stopped answering");j=!1,d({op:1,d:i})},b),d({op:2,d:{token:a,intents:4096,properties:{os:process.platform,browser:"thursday",device:"thursday"}}})}else if(1===f)d({op:1,d:i});else if(11===f)j=!0;else if(7===f||9===f)e(4e3,"Discord asked for a new connection");else if(0===f&&"READY"===m){let a;c.ready(k.user.username,(a=k.application?.id)?`https://discord.com/oauth2/authorize?client_id=${a}&scope=bot&permissions=0`:null,k.user.id)}else if(0===f&&m){var n,o;let a=(n=m,o=k,"MESSAGE_CREATE"===n?o.guild_id||o.author.bot?null:{kind:"message",chat:o.channel_id,name:o.author.global_name||o.author.username,handle:`@${o.author.username}`,words:o.content.trim(),files:(o.attachments??[]).map(a=>({name:a.filename,size:a.size,fetch:async()=>{let b=await fetch(a.url);if(!b.ok)throw Error(`Discord answered ${b.status} for the file`);return new File([await b.arrayBuffer()],a.filename,{type:a.content_type??""})}})),unreadable:!1}:"INTERACTION_CREATE"===n?3!==o.type||o.guild_id?null:(g("POST",`/interactions/${o.id}/${o.token}/callback`,{type:6}).catch(()=>{}),{kind:"press",chat:o.channel_id,data:o.data?.custom_id??"",under:o.message?{id:o.message.id,text:o.message.content}:null}):null);a&&c.incoming(a)}}},e),l=f[k.code];if(l)throw new b.ChannelRefusal(l);if(!e.aborted)throw Error(k.reason||`Discord closed the connection (${k.code})`)}finally{clearInterval(h)}},async say(a,b,d){let e=(0,c.chatPieces)(b,"discord",1900);for(let[b,c]of e.entries())await g("POST",`/channels/${a}/messages`,{content:c,flags:4,allowed_mentions:{parse:[]},...d?.length&&b===e.length-1?{components:h(d)}:{}})},async typing(a){await g("POST",`/channels/${a}/typing`).catch(()=>{})},async settle(a,b,d){let e=`
|
|
123
123
|
|
|
124
|
-
→ ${(0,c.chatPieces)({plain:d},"discord",1900)[0]}`;await g("PATCH",`/channels/${a}/messages/${b.id}`,{content:`${b.text.slice(0,1900-e.length)}${e}`,components:[]}).catch(()=>{})},async sendFiles(a,b){for(let c=0;c<b.length;c+=10){let d=b.slice(c,c+10),e=new FormData;for(let[a,b]of(e.set("payload_json",JSON.stringify({attachments:d.map((a,b)=>({id:b,filename:a.name}))})),d.entries()))e.set(`files[${a}]`,new Blob([b.bytes]),b.name);await g("POST",`/channels/${a}/messages`,e)}}}}])},225310,a=>{"use strict";var b=a.i(912714),c=a.i(660526),d=a.i(750227),e=a.i(569572),f=a.i(684321),g=a.i(821415),h=a.i(176668),i=a.i(182248);let j=(0,d.join)(e.APP_DIR,e.PATHS.skills.default,"artifact","runtime","render.mjs"),k={viewport:{width:412,height:839},deviceScaleFactor:2},l=(0,i.PromiseChain)();async function
|
|
124
|
+
→ ${(0,c.chatPieces)({plain:d},"discord",1900)[0]}`;await g("PATCH",`/channels/${a}/messages/${b.id}`,{content:`${b.text.slice(0,1900-e.length)}${e}`,components:[]}).catch(()=>{})},async sendFiles(a,b){for(let c=0;c<b.length;c+=10){let d=b.slice(c,c+10),e=new FormData;for(let[a,b]of(e.set("payload_json",JSON.stringify({attachments:d.map((a,b)=>({id:b,filename:a.name}))})),d.entries()))e.set(`files[${a}]`,new Blob([b.bytes]),b.name);await g("POST",`/channels/${a}/messages`,e)}}}}])},225310,a=>{"use strict";var b=a.i(912714),c=a.i(660526),d=a.i(750227),e=a.i(569572),f=a.i(684321),g=a.i(821415),h=a.i(176668),i=a.i(182248);let j=(0,d.join)(e.APP_DIR,e.PATHS.skills.default,"artifact","runtime","render.mjs"),k={viewport:{width:412,height:839},deviceScaleFactor:2},l=(0,i.PromiseChain)(),m=a=>["html","htm"].includes((0,f.extensionOf)(a));async function n(a){let c=await (0,b.open)(a);try{let a=Buffer.alloc(4096),{bytesRead:b}=await c.read(a,0,a.length,0),d=/<meta name="print" content="pdf(?: (\d+x\d+))?">/.exec(a.subarray(0,b).toString("utf8"));return d?{size:d[1]??""}:null}finally{await c.close()}}async function o(a,f,{failed:h,take:i}){let l=await (0,b.mkdtemp)((0,d.join)((0,c.tmpdir)(),"thursday-pictures-")),m=(0,d.join)(l,"browser.json");await (0,b.writeFile)(m,JSON.stringify({browser:{contextOptions:k}}));let n={PLAYWRIGHT_CLI_SESSION:"reach-pictures",PLAYWRIGHT_MCP_BROWSER:"chromium",PLAYWRIGHT_MCP_ISOLATED:"true",PLAYWRIGHT_MCP_CONFIG:m,RENDER:j,PAGE:a,OUT:l,NAME:(0,d.basename)(a,(0,d.extname)(a))},p=await (0,g.openWorkspace)();try{let a=await p.exec(`node "$RENDER" "$PAGE" --shot ${f}`,{env:n,timeoutMs:e.REACH.drawMs});if(0!==a.exitCode)throw Error(a.stderr.trim().split("\n").at(-1)||h);return await i(l)}finally{await p.exec("playwright-cli close",{env:n,timeoutMs:15e3}).catch(()=>{}),await (0,b.rm)(l,{recursive:!0,force:!0})}}a.s(["pdfOf",0,function(a){return m(a)?l(async()=>{let c=await n(a);if(!c)return null;let e=c.size?` --size ${c.size}`:"";return o(a,`--pdf "$OUT/$NAME.pdf"${e}`,{failed:"not printed",take:async c=>({bytes:await (0,b.readFile)((0,d.join)(c,`${(0,d.basename)(a,(0,d.extname)(a))}.pdf`)),name:`${(0,d.basename)(a,(0,d.extname)(a))}.pdf`,picture:!1})})}).catch(b=>(h.logger.warn(`reach: no PDF of ${(0,d.basename)(a)}`,b),null)):Promise.resolve(null)},"picturesOf",0,function(a){return m(a)?l(()=>o(a,`--out "$OUT" --name "$NAME" --most ${e.REACH.pictures}`,{failed:"no pictures",take:async a=>Promise.all((await (0,b.readdir)(a)).filter(a=>a.endsWith(".png")).sort().map(async c=>({bytes:await (0,b.readFile)((0,d.join)(a,c)),name:c,picture:!0})))})).catch(b=>(h.logger.warn(`reach: no pictures of ${(0,d.basename)(a)}`,b),[])):Promise.resolve([])}])},129167,a=>{"use strict";var b=a.i(936292),c=a.i(465584),d=a.i(242104);let e="https://slack.com/api",f=new Set(["invalid_auth","not_authed","account_inactive","token_revoked","not_allowed_token_type","missing_scope"]);a.s(["createSlack",0,function(a,g){async function h(c,d,i=g){for(let g=0;;g++){let h=await fetch(`${e}/${c}`,{method:"POST",headers:{authorization:`Bearer ${i}`,"content-type":"application/json; charset=utf-8"},body:JSON.stringify(d)}).catch(a=>{throw Error(`Could not reach ${new URL(e).host}`,{cause:a})}),j=h.headers.get("retry-after");if(429===h.status&&await (0,b.waitOut)(null===j?null:Number(j),g))continue;let k=await h.json().catch(()=>null);if(k?.ok)return k;let l=k?.error??`http_${h.status}`;if(!f.has(l))throw Error(`Slack answered ${l} to ${c}`);let m=i===a,n=k?.needed??"a scope";throw new b.ChannelRefusal("missing_scope"===l?m?`Slack says this app-level token lacks ${n} — generate one with it under Basic Information › App-Level Tokens and paste it here.`:`Slack says the app lacks a permission (${n}) — make it from the manifest in the guide.`:m?`Slack turned the app-level token away (${l}). Generate a new one under Basic Information › App-Level Tokens and paste it here.`:`Slack turned the bot token away (${l}). Copy the Bot User OAuth Token again from Install App and paste it here.`,+!m)}}let i=new Map;async function j(a){let b=i.get(a);if(b)return b;let c=await h("users.info",{user:a}).then(b=>({name:b.user?.real_name||b.user?.name||a,handle:b.user?.name?`@${b.user.name}`:null})).catch(()=>({name:a,handle:null}));return i.set(a,c),c}async function k(a,b){if("events_api"===a){let a=b.event??{},c=!a.subtype||"file_share"===a.subtype;if("message"!==a.type||"im"!==a.channel_type||!c||a.bot_id||!a.user||!a.channel)return null;let d=await j(a.user);return{kind:"message",chat:a.channel,name:d.name,handle:d.handle,words:(a.text??"").trim(),files:(a.files??[]).flatMap(a=>{let b=a.url_private_download;if(!b)return[];let c=a.name??"file";return[{name:c,size:a.size,fetch:async()=>{let d=await fetch(b,{headers:{authorization:`Bearer ${g}`}});if(!d.ok)throw Error(`Slack answered ${d.status} for the file`);return new File([await d.arrayBuffer()],c,{type:a.mimetype??""})}}]}),unreadable:!1}}return"interactive"===a&&"block_actions"===b.type?b.channel?.id?{kind:"press",chat:b.channel.id,data:b.actions?.[0]?.value??"",under:b.message?.ts&&b.message.text?{id:b.message.ts,text:b.message.text}:null}:null:null}return{limits:{take:1/0,file:0x40000000,picture:0x40000000},async listen(b,c){let e=await h("auth.test",{}),{url:f}=await h("apps.connections.open",{},a);b.ready(e.user?`@${e.user}`:"the app",null,e.bot_id??e.user_id??"");let g=await (0,d.runSocket)(f,{message(a,c){let{type:d,envelope_id:e,payload:f}=a;e&&c({envelope_id:e}),d&&f&&k(d,f).then(a=>{a&&b.incoming(a)})}},c);if(!c.aborted)throw Error(`Slack closed the connection (${g.code})`)},async say(a,b,d){let e=(0,c.chatPieces)(b,"slack",2900);for(let[b,c]of e.entries()){let f=d?.length&&b===e.length-1;await h("chat.postMessage",{channel:a,text:c,unfurl_links:!1,unfurl_media:!1,...f?{blocks:[{type:"section",text:{type:"mrkdwn",text:c}},{type:"actions",elements:d.slice(0,25).map((a,b)=>({type:"button",action_id:`choice_${b}`,text:{type:"plain_text",text:a.text.slice(0,75)},value:a.data}))}]}:{}})}},async typing(){},async settle(a,b,d){let e=`
|
|
125
125
|
|
|
126
126
|
→ ${(0,c.chatPieces)({plain:d},"slack",2900)[0]}`;await h("chat.update",{channel:a,ts:b.id,text:`${b.text.slice(0,2900-e.length)}${e}`,blocks:[]}).catch(()=>{})},async sendFiles(a,b){let c=[];for(let{bytes:a,name:d}of b){let b=new URLSearchParams({filename:d,length:String(a.byteLength)}),f=await fetch(`${e}/files.getUploadURLExternal`,{method:"POST",headers:{authorization:`Bearer ${g}`},body:b}),h=await f.json();if(!h.ok||!h.upload_url||!h.file_id)throw Error(`Slack answered ${h.error??f.status} to the upload`);let i=await fetch(h.upload_url,{method:"POST",body:new Blob([a])});if(!i.ok)throw Error(`Slack answered ${i.status} to the upload`);c.push({id:h.file_id,title:d})}c.length&&await h("files.completeUploadExternal",{files:c,channel_id:a})}}}])},319261,a=>{"use strict";var b=a.i(569572),c=a.i(936292),d=a.i(465584);let e="https://api.telegram.org",f={take:0x1400000,file:0x3200000,picture:0xa00000};class g extends Error{status;constructor(a,b){super(a),this.status=b}}a.s(["createTelegram",0,function(a){async function h(b,d,f){let h=d instanceof FormData;for(let i=0;;i++){let j=await fetch(`${e}/bot${a}/${b}`,{method:"POST",signal:f,...h?{body:d}:{headers:{"content-type":"application/json"},body:JSON.stringify(d??{})}}).catch(a=>{throw Error(`Could not reach ${new URL(e).host}`,{cause:a})}),k=await j.json().catch(()=>null);if(k?.ok)return k.result;if(429===j.status&&await (0,c.waitOut)(k?.parameters?.retry_after,i))continue;let l=k?.description??`Telegram answered ${j.status}`;if(401===j.status)throw new c.ChannelRefusal(`Telegram said “${l}”: this token was revoked or mistyped. Get it again from @BotFather and paste it here.`);throw new g(l,j.status)}}async function i(b,c,d){let{file_path:f}=await h("getFile",{file_id:b});if(!f)throw Error("Telegram did not say where the file is");let g=await fetch(`${e}/file/bot${a}/${f}`);if(!g.ok)throw Error(`Telegram answered ${g.status} for the file`);let i=f.includes(".")?f.slice(f.lastIndexOf(".")):"";return new File([await g.arrayBuffer()],c.includes(".")?c:`${c}${i}`,d?{type:d}:void 0)}let j=0;async function k(a,b){let c=new FormData;if(c.set("chat_id",a),1===b.length){c.set("photo",new Blob([b[0].bytes]),b[0].name),await h("sendPhoto",c);return}for(let[a,d]of(c.set("media",JSON.stringify(b.map((a,b)=>({type:"photo",media:`attach://p${b}`})))),b.entries()))c.set(`p${a}`,new Blob([d.bytes]),d.name);await h("sendMediaGroup",c)}return{limits:f,async listen(a,c){let d=await h("getMe",void 0,c);for(a.ready(d.username?`@${d.username}`:d.first_name??"the bot",d.username?`https://t.me/${d.username}`:null,String(d.id));!c.aborted;)for(let d of(await h("getUpdates",{offset:j,timeout:b.REACH.pollSeconds,allowed_updates:["message","callback_query"]},AbortSignal.any([c,AbortSignal.timeout((b.REACH.pollSeconds+15)*1e3)])))){j=d.update_id+1;let b=function(a){let b,c=a.callback_query;if(c)return h("answerCallbackQuery",{callback_query_id:c.id}).catch(()=>{}),{kind:"press",chat:String(c.from.id),data:c.data??"",under:c.message?.text?{id:String(c.message.message_id),text:c.message.text,keep:c.message.entities}:null};let d=a.message;if(!d?.from||"private"!==d.chat.type)return null;let e=d.photo?.at(-1),f=d.document?{id:d.document.file_id,name:d.document.file_name??"file",type:d.document.mime_type,size:d.document.file_size}:e?{id:e.file_id,name:`photo-${d.message_id}`,type:"",size:e.file_size}:null;return{kind:"message",chat:String(d.chat.id),name:(b=d.from,[b?.first_name,b?.last_name].filter(Boolean).join(" ")||(b?.username?`@${b.username}`:"Someone")),handle:d.from.username?`@${d.from.username}`:null,words:(d.text??d.caption??"").trim(),files:f?[{name:f.name,size:f.size,fetch:()=>i(f.id,f.name,f.type)}]:[],unreadable:!!(d.voice||d.audio||d.video)}}(d);b&&a.incoming(b)}},async say(a,b,c){let e=(0,d.chatPieces)(b,"telegram",4e3);for(let[b,d]of e.entries())await h("sendMessage",{chat_id:a,text:d,parse_mode:"HTML",link_preview_options:{is_disabled:!0},...c?.length&&b===e.length-1?{reply_markup:{inline_keyboard:c.map(a=>[{text:a.text,callback_data:a.data}])}}:{}})},async typing(a){await h("sendChatAction",{chat_id:a,action:"typing"}).catch(()=>{})},async settle(a,b,c){await h("editMessageText",{chat_id:a,message_id:Number(b.id),text:`${b.text}
|
|
127
127
|
|
|
128
|
-
→ ${c}`,entities:b.keep,link_preview_options:{is_disabled:!0}}).catch(()=>{})},async sendFiles(a,b){let c=b.filter(a=>a.picture),d=b.filter(a=>!a.picture);for(let b=0;b<c.length;b+=10){let e=c.slice(b,b+10);await k(a,e).catch(a=>{if(!(a instanceof g&&400===a.status))throw a;d.unshift(...e)})}for(let b of d){let c=new FormData;c.set("chat_id",a),c.set("document",new Blob([b.bytes]),b.name),await h("sendDocument",c)}}}}])},233398,a=>a.a(async(b,c)=>{try{var d=a.i(666680),e=a.i(912714),f=a.i(203469),g=a.i(569572),h=a.i(875931),i=a.i(938934),j=a.i(346580),k=a.i(674986),l=a.i(839430),m=a.i(344853),n=a.i(725466),o=a.i(92706),p=a.i(569549),q=a.i(143699),r=a.i(626550),s=a.i(684321),t=a.i(821415),u=a.i(941981),v=a.i(706210),w=a.i(176668),x=a.i(293480),y=a.i(936292),z=a.i(465584),A=a.i(479286),B=a.i(225310),C=a.i(558067),D=a.i(129167),E=a.i(319261),F=b([h,k,l,m,n,p,q,u]);[h,k,l,m,n,p,q,u]=F.then?(await F)():F;let ad={telegram:a=>(0,E.createTelegram)(a),discord:a=>(0,A.createDiscord)(a),slack:(a,b)=>(0,D.createSlack)(a,b)},ae=globalThis,af=ae.__reach??={live:new Map,last:null,told:new Map,choices:new Map,listening:null,gone:null,looking:null,idle:null},ag=()=>f.appEvents.emit({type:"reach"});async function G(a){return await af.live.get(a)?.settled,H(a)}async function H(a){let b=await (0,n.readConfig)((0,C.reachPersonKey)(a));if(!b)return null;try{let a=JSON.parse(b);return"string"==typeof a.chat&&"string"==typeof a.name?{chat:a.chat,name:a.name,bot:"string"==typeof a.bot?a.bot:null}:null}catch{return null}}let ah=(a,b)=>(0,n.writeConfig)((0,C.reachPersonKey)(a),JSON.stringify(b));async function I(a){for(let b of a?[a]:C.REACH_CHANNELS){let c=af.live.get(b);if(c?.stop.abort(),af.live.delete(b),a&&c?.line&&await (0,p.endCall)(c.line.callId).catch(()=>{}),(await Promise.all(C.REACH_KEYS[b].map(n.configState))).includes("unreadable"))continue;let d=await Promise.all(C.REACH_KEYS[b].map(n.readConfig));if(!d.every(a=>!!a)){a&&await (0,n.removeConfig)((0,C.reachPersonKey)(b));continue}let e=a&&c?.id?await H(b):null;e&&null===e.bot&&c?.id&&await ah(b,{...e,bot:c.id});let f={name:b,channel:ad[b](...d),stop:new AbortController,bot:null,link:null,problem:null,refused:null,id:null,adopt:!a,settled:Promise.resolve(),asking:null,held:[],line:null,calls:new Set,busy:!1,notes:[]};af.live.set(b,f),J(f)}af.live.size&&(af.listening??=f.appEvents.subscribe(a=>{"threads"===a.type&&Z()}),af.gone??=f.presence.onGone(_),Z(),af.idle??=setInterval(()=>{S().catch(a=>w.logger.error("reach: idle lines",a))},g.REACH.idleMs).unref()),ag()}async function J(a){let{signal:b}=a.stop,c=b=>{a.problem!==b&&(a.problem=b,ag())};for(;!b.aborted;){try{await a.channel.listen({ready:(b,c,d)=>{a.bot=b,a.link=c,a.problem=null,a.id=d,a.settled=K(a,d).catch(b=>w.logger.error(`reach ${a.name}: who is let in`,b)),ag()},incoming:b=>void L(a,b).catch(b=>w.logger.error(`reach ${a.name}: what arrived`,b))},b)}catch(e){if(b.aborted)return;let d=e instanceof Error?e.message:String(e);if(e instanceof y.ChannelRefusal){w.logger.warn(`reach ${a.name}: ${d}`);let b=C.REACH_KEYS[a.name];return a.refused=b[e.token]??b[0],a.problem=d,ag()}c(d)}await new Promise(a=>setTimeout(a,g.REACH.retryMs))}}async function K(a,b){let c=await H(a.name);if(c&&c.bot!==b){if(null===c.bot&&a.adopt)return ah(a.name,{...c,bot:b});await (0,n.removeConfig)((0,C.reachPersonKey)(a.name)),ag()}}async function L(a,b){let c=await G(a.name);if("press"===b.kind){if(c?.chat!==b.chat)return;return ac(a,c,b.data,b.under)}return c?.chat===b.chat?N(a,c,b):c?a.channel.say(b.chat,{plain:"This Thursday already answers someone else."}):M(a,b)}async function M(a,b){if(a.asking&&a.asking.chat!==b.chat)return a.channel.say(b.chat,{plain:"Someone else is already waiting to be let in here. If that is not you, press Not them on the computer, then write again."});a.held.length<g.REACH.held&&a.held.push(b),a.asking||(a.asking={chat:b.chat,name:b.name,handle:b.handle,said:b.words,code:(0,d.randomInt)(10**g.REACH.codeDigits).toString().padStart(g.REACH.codeDigits,"0")},ag(),await a.channel.say(b.chat,{plain:`Almost there. Thursday is asking on your computer whether to let you in. Press Allow there only if it shows ${a.asking.code}, and she answers what you wrote.`}))}async function N(a,b,c){let d=await O(a,c);d&&V(a,b,d)}async function O(a,b){let{channel:c}=a;af.last=a.name;let{kept:d,lost:e}=await P(a,b.files);e.length&&await c.say(b.chat,{plain:e.map(({name:a,why:b})=>`${a} did not come through: ${b}.`).join("\n")}).catch(b=>w.logger.warn(`reach ${a.name}: could not say so`,b));let f=[b.words,...d].filter(Boolean).join("\n");return f?(e.length&&a.notes.push({text:`[Sent from their phone with what follows, and lost on the way: ${e.map(({name:a,why:b})=>`${a} (${b})`).join("; ")}. They have been told.]`,said:!1}),f):(b.unreadable&&!e.length&&await c.say(b.chat,{plain:"I can read words, pictures and files here — not voice or video yet. Write it instead."}),null)}async function P(a,b){let c=Math.min(a.channel.limits.take,g.REACH.fileBytes),d=[],e=b.filter(b=>!b.size||b.size<=c||(d.push({name:b.name,why:`it is ${aj(b.size)}, and the most taken from ${C.REACH_LABEL[a.name]} is ${aj(c)}`}),!1)),f=await Promise.allSettled(e.map(a=>a.fetch())),h=[];for(let[a,b]of f.entries())"fulfilled"===b.status?h.push(b.value):d.push({name:e[a].name,why:ai(b.reason)});if(!h.length)return{kept:[],lost:d};try{return{kept:await (0,u.keepGivenFiles)(h),lost:d}}catch(b){let a=ai(b);return{kept:[],lost:[...d,...h.map(b=>({name:b.name,why:a}))]}}}let ai=a=>a instanceof Error?a.message:String(a),aj=a=>`${Math.ceil(a/1048576)} MB`;async function Q(a,b,c){let d=af.live.get(a),e=ak(d,b,c);if(!d||!e)return;let f={chat:e.chat,name:e.name,bot:d.id};await ah(a,f),d.asking=null,ag();let g=d.held.splice(0);await d.channel.say(b,{plain:g.length?"You are in. Thursday answers what you wrote.":"You are in. Write here and Thursday answers."}).catch(b=>w.logger.warn(`reach ${a}: could not say so`,b));let h=[];for(let b of g){let c=await O(d,b).catch(b=>(w.logger.warn(`reach ${a}: what they wrote while waiting`,b),null));c&&h.push(c)}h.length&&V(d,f,h.join("\n"))}let ak=(a,b,c)=>a?.asking?.chat===b&&a.asking.code===c?a.asking:null;async function R(a){await (0,n.removeConfig)((0,C.reachPersonKey)(a));let b=af.live.get(a);b&&(b.notes=[],b.calls.clear(),await U(b)),ag()}async function S(){for(let a of af.live.values())a.line&&!a.busy&&await T(a.line)&&await U(a)}async function T(a){return!(Date.now()-a.lastAt<=g.REACH.idleMs)&&!(await (0,m.listCallJobs)([a.callId])).some(a=>"running"===a.status)}async function U(a){let b=a.line;a.line=null,b&&await (0,p.endCall)(b.callId).catch(()=>{})}function V(a,b,c){a.busy?a.notes.push({text:c,said:!0}):(a.busy=!0,(async()=>{try{for(let d=c;null!==d;){await W(a,b,d);let c=a.notes.filter(a=>a.said);a.notes=a.notes.filter(a=>!a.said),d=c.length?c.map(a=>a.text).join("\n"):null}}finally{a.busy=!1}})())}async function W(a,b,c){let{channel:d}=a;d.typing(b.chat).catch(()=>{});let e=setInterval(()=>void d.typing(b.chat).catch(()=>{}),4e3),f=a.notes.filter(a=>!a.said);a.notes=a.notes.filter(a=>a.said);try{let e=a.line;(!e||!await (0,p.isCallOpen)(e.callId)||await T(e))&&(await U(a),a.line={...await (0,q.openTextCall)(),messages:[],lastAt:0},a.calls.add(a.line.callId));let h=a.line,i=await (0,q.answerInWriting)({callId:h.callId,standing:h.standing,messages:[...h.messages,...f.map(a=>({role:"user",content:a.text})),{role:"user",content:c}],said:c,notes:()=>a.notes.splice(0)});h.messages=function(a){let b=Math.max(a.findLastIndex(a=>"user"===a.role),0),c=[...(0,j.asWords)(a.slice(0,b),(a,b)=>(0,r.toolLine)(a,JSON.stringify(b??{}))??a,a=>a.length>g.REACH.oldChars?`${a.slice(0,g.REACH.oldChars)}…`:a),...a.slice(b)];if(c.length<=g.REACH.messages)return c;let d=c.findIndex((a,b)=>b>=c.length-g.REACH.trimTo&&"user"===a.role);return d>0?c.slice(d):c}(i.messages),h.lastAt=Date.now(),i.moved&&!h.moved&&(h.moved=!0,await d.say(b.chat,{plain:i.moved}));let k=[...new Set(i.did)].join(" · ");await d.say(b.chat,{markdown:i.text?.trim()||(k?`— ${(0,z.literal)(k)}`:"…")}),await X(a,b,i.text)}catch(e){a.notes.unshift(...f),a.line&&!a.line.lastAt&&await U(a);let c=(0,x.isPublicError)(e)?e.message:(0,h.modelErrorToString)(e);w.logger.warn(`reach ${a.name}: ${c}`),await d.say(b.chat,{plain:c}).catch(()=>{})}finally{clearInterval(e)}}async function X(a,b,c){let d=await (0,t.filesOnDisk)((0,s.pathsIn)(c),null),f=d.slice(0,Math.max(d.length-g.REACH.files,0)).map(a=>({name:a,why:`only ${g.REACH.files} files go with one answer`})),{limits:h}=a.channel,i=Math.min(h.file,g.REACH.fileBytes);for(let c of d.slice(-g.REACH.files)){let d=await (0,t.insideWorkspace)(c),g=d?await (0,e.stat)(d).catch(()=>null):null;if(d&&g){if(g.size>i){f.push({name:c,why:`it is ${aj(g.size)}, and the most that goes to ${C.REACH_LABEL[a.name]} is ${aj(i)}`});continue}try{let i=await (0,B.picturesOf)(d);await a.channel.sendFiles(b.chat,i.length?i:[{bytes:await (0,e.readFile)(d),name:c.split("/").pop()??"file",picture:"image"===(0,s.viewKindOf)(c)&&g.size<=h.picture}]),i.length&&f.push({name:c,why:"sent as pictures above; the page itself opens on the computer"})}catch(b){w.logger.warn(`reach ${a.name}: could not send ${c}`,b),f.push({name:c,why:ai(b)})}}}f.length&&(await a.channel.say(b.chat,{plain:["Not sent — still on this computer:",...f.map(({name:a,why:b})=>`• ${a}: ${b}`)].join("\n")}).catch(b=>w.logger.warn(`reach ${a.name}: could not say so`,b)),a.notes.push({text:`[Named in what went to their phone, and not sent: ${f.map(({name:a,why:b})=>`${a} (${b})`).join("; ")}. They have been told.]`,said:!1}))}async function Y(){for(let a of[...af.last?[af.last]:[],...C.REACH_CHANNELS.filter(a=>a!==af.last)]){let b=af.live.get(a),c=b?await G(a):null;if(b&&c)return{live:b,person:c}}return null}let al=Date.now()-1e3*process.uptime();function Z(a=g.REACH.lookMs){af.looking??=setTimeout(()=>{af.looking=null,$().catch(a=>w.logger.error("reach: open work",a))},a)}async function $(){let a=al+g.BROWSER_GONE_MS-Date.now();if(a>0)return Z(a);let b=await Y();if(!b)return;let c=await (0,m.listInboxThreads)(),d=(0,o.openWork)(c).filter(a=>"progress"!==a.kind),e=new Set(d.map(a=>a.key));for(let a of af.told.keys())e.has(a)||af.told.delete(a);for(let[a,b]of af.choices)e.has((0,o.questionKey)(b.question))||af.choices.delete(a);let h=d.filter(a=>!af.told.has(a.key));if(!h.length)return;let i=await aa();for(let a of h){let d=c.find(b=>b.id===a.threadId);if(!d)continue;let e=i.get(a.threadId),g=e?await G(e.name):null,h=e&&g?{live:e,person:g}:!f.presence.watching&&(0,v.toDate)(d.updatedAt).getTime()>=al?b:null;af.told.set(a.key,{kind:a.kind,phone:!!h}),h&&await ab(h,a,d)}}function _(){for(let[a,b]of af.told)"question"!==b.kind||b.phone||af.told.delete(a);Z(0)}async function aa(){let a=[...af.live.values()],b=await (0,m.listCallJobs)(a.flatMap(a=>[...a.calls]));return new Map(b.flatMap(b=>{let c=a.find(a=>a.calls.has(b.callId??""));return c?[[b.id,c]]:[]}))}async function ab(a,b,c){let{live:d,person:e}=a,f=c.room.questions.find(a=>(0,o.questionKey)(a.id)===b.key),g=(f?.options??[]).map((a,b)=>{let d=`${f?.id.slice(0,40)}:${b}`;return af.choices.set(d,{threadId:c.id,bot:f?.bot??"",question:f?.id??"",answer:a}),{text:a,data:d}});try{await d.channel.say(e.chat,{markdown:`${(0,z.literal)(`${b.show.line} \xb7 ${b.show.name}`)}
|
|
128
|
+
→ ${c}`,entities:b.keep,link_preview_options:{is_disabled:!0}}).catch(()=>{})},async sendFiles(a,b){let c=b.filter(a=>a.picture),d=b.filter(a=>!a.picture);for(let b=0;b<c.length;b+=10){let e=c.slice(b,b+10);await k(a,e).catch(a=>{if(!(a instanceof g&&400===a.status))throw a;d.unshift(...e)})}for(let b of d){let c=new FormData;c.set("chat_id",a),c.set("document",new Blob([b.bytes]),b.name),await h("sendDocument",c)}}}}])},233398,a=>a.a(async(b,c)=>{try{var d=a.i(666680),e=a.i(912714),f=a.i(203469),g=a.i(569572),h=a.i(875931),i=a.i(938934),j=a.i(346580),k=a.i(674986),l=a.i(839430),m=a.i(344853),n=a.i(725466),o=a.i(92706),p=a.i(569549),q=a.i(143699),r=a.i(626550),s=a.i(684321),t=a.i(821415),u=a.i(941981),v=a.i(706210),w=a.i(176668),x=a.i(293480),y=a.i(936292),z=a.i(465584),A=a.i(479286),B=a.i(225310),C=a.i(558067),D=a.i(129167),E=a.i(319261),F=b([h,k,l,m,n,p,q,u]);[h,k,l,m,n,p,q,u]=F.then?(await F)():F;let ad={telegram:a=>(0,E.createTelegram)(a),discord:a=>(0,A.createDiscord)(a),slack:(a,b)=>(0,D.createSlack)(a,b)},ae=globalThis,af=ae.__reach??={live:new Map,last:null,told:new Map,choices:new Map,listening:null,gone:null,looking:null,idle:null},ag=()=>f.appEvents.emit({type:"reach"});async function G(a){return await af.live.get(a)?.settled,H(a)}async function H(a){let b=await (0,n.readConfig)((0,C.reachPersonKey)(a));if(!b)return null;try{let a=JSON.parse(b);return"string"==typeof a.chat&&"string"==typeof a.name?{chat:a.chat,name:a.name,bot:"string"==typeof a.bot?a.bot:null}:null}catch{return null}}let ah=(a,b)=>(0,n.writeConfig)((0,C.reachPersonKey)(a),JSON.stringify(b));async function I(a){for(let b of a?[a]:C.REACH_CHANNELS){let c=af.live.get(b);if(c?.stop.abort(),af.live.delete(b),a&&c?.line&&await (0,p.endCall)(c.line.callId).catch(()=>{}),(await Promise.all(C.REACH_KEYS[b].map(n.configState))).includes("unreadable"))continue;let d=await Promise.all(C.REACH_KEYS[b].map(n.readConfig));if(!d.every(a=>!!a)){a&&await (0,n.removeConfig)((0,C.reachPersonKey)(b));continue}let e=a&&c?.id?await H(b):null;e&&null===e.bot&&c?.id&&await ah(b,{...e,bot:c.id});let f={name:b,channel:ad[b](...d),stop:new AbortController,bot:null,link:null,problem:null,refused:null,id:null,adopt:!a,settled:Promise.resolve(),asking:null,held:[],line:null,calls:new Set,busy:!1,notes:[]};af.live.set(b,f),J(f)}af.live.size&&(af.listening??=f.appEvents.subscribe(a=>{"threads"===a.type&&Z()}),af.gone??=f.presence.onGone(_),Z(),af.idle??=setInterval(()=>{S().catch(a=>w.logger.error("reach: idle lines",a))},g.REACH.idleMs).unref()),ag()}async function J(a){let{signal:b}=a.stop,c=b=>{a.problem!==b&&(a.problem=b,ag())};for(;!b.aborted;){try{await a.channel.listen({ready:(b,c,d)=>{a.bot=b,a.link=c,a.problem=null,a.id=d,a.settled=K(a,d).catch(b=>w.logger.error(`reach ${a.name}: who is let in`,b)),ag()},incoming:b=>void L(a,b).catch(b=>w.logger.error(`reach ${a.name}: what arrived`,b))},b)}catch(e){if(b.aborted)return;let d=e instanceof Error?e.message:String(e);if(e instanceof y.ChannelRefusal){w.logger.warn(`reach ${a.name}: ${d}`);let b=C.REACH_KEYS[a.name];return a.refused=b[e.token]??b[0],a.problem=d,ag()}c(d)}await new Promise(a=>setTimeout(a,g.REACH.retryMs))}}async function K(a,b){let c=await H(a.name);if(c&&c.bot!==b){if(null===c.bot&&a.adopt)return ah(a.name,{...c,bot:b});await (0,n.removeConfig)((0,C.reachPersonKey)(a.name)),ag()}}async function L(a,b){let c=await G(a.name);if("press"===b.kind){if(c?.chat!==b.chat)return;return ac(a,c,b.data,b.under)}return c?.chat===b.chat?N(a,c,b):c?a.channel.say(b.chat,{plain:"This Thursday already answers someone else."}):M(a,b)}async function M(a,b){if(a.asking&&a.asking.chat!==b.chat)return a.channel.say(b.chat,{plain:"Someone else is already waiting to be let in here. If that is not you, press Not them on the computer, then write again."});a.held.length<g.REACH.held&&a.held.push(b),a.asking||(a.asking={chat:b.chat,name:b.name,handle:b.handle,said:b.words,code:(0,d.randomInt)(10**g.REACH.codeDigits).toString().padStart(g.REACH.codeDigits,"0")},ag(),await a.channel.say(b.chat,{plain:`Almost there. Thursday is asking on your computer whether to let you in. Press Allow there only if it shows ${a.asking.code}, and she answers what you wrote.`}))}async function N(a,b,c){let d=await O(a,c);d&&V(a,b,d)}async function O(a,b){let{channel:c}=a;af.last=a.name;let{kept:d,lost:e}=await P(a,b.files);e.length&&await c.say(b.chat,{plain:e.map(({name:a,why:b})=>`${a} did not come through: ${b}.`).join("\n")}).catch(b=>w.logger.warn(`reach ${a.name}: could not say so`,b));let f=[b.words,...d].filter(Boolean).join("\n");return f?(e.length&&a.notes.push({text:`[Sent from their phone with what follows, and lost on the way: ${e.map(({name:a,why:b})=>`${a} (${b})`).join("; ")}. They have been told.]`,said:!1}),{words:f,pictures:d.filter(s.isPicture)}):(b.unreadable&&!e.length&&await c.say(b.chat,{plain:"I can read words, pictures and files here — not voice or video yet. Write it instead."}),null)}async function P(a,b){let c=Math.min(a.channel.limits.take,g.REACH.fileBytes),d=[],e=b.filter(b=>!b.size||b.size<=c||(d.push({name:b.name,why:`it is ${aj(b.size)}, and the most taken from ${C.REACH_LABEL[a.name]} is ${aj(c)}`}),!1)),f=await Promise.allSettled(e.map(a=>a.fetch())),h=[];for(let[a,b]of f.entries())"fulfilled"===b.status?h.push(b.value):d.push({name:e[a].name,why:ai(b.reason)});if(!h.length)return{kept:[],lost:d};try{return{kept:await (0,u.keepGivenFiles)(h),lost:d}}catch(b){let a=ai(b);return{kept:[],lost:[...d,...h.map(b=>({name:b.name,why:a}))]}}}let ai=a=>a instanceof Error?a.message:String(a),aj=a=>`${Math.ceil(a/1048576)} MB`;async function Q(a,b,c){let d=af.live.get(a),e=ak(d,b,c);if(!d||!e)return;let f={chat:e.chat,name:e.name,bot:d.id};await ah(a,f),d.asking=null,ag();let g=d.held.splice(0);await d.channel.say(b,{plain:g.length?"You are in. Thursday answers what you wrote.":"You are in. Write here and Thursday answers."}).catch(b=>w.logger.warn(`reach ${a}: could not say so`,b));let h=[];for(let b of g){let c=await O(d,b).catch(b=>(w.logger.warn(`reach ${a}: what they wrote while waiting`,b),null));c&&h.push(c)}h.length&&V(d,f,{words:h.map(a=>a.words).join("\n"),pictures:h.flatMap(a=>a.pictures)})}let ak=(a,b,c)=>a?.asking?.chat===b&&a.asking.code===c?a.asking:null;async function R(a){await (0,n.removeConfig)((0,C.reachPersonKey)(a));let b=af.live.get(a);b&&(b.notes=[],b.calls.clear(),await U(b)),ag()}async function S(){for(let a of af.live.values())a.line&&!a.busy&&await T(a.line)&&await U(a)}async function T(a){return!(Date.now()-a.lastAt<=g.REACH.idleMs)&&!(await (0,m.listCallJobs)([a.callId])).some(a=>"running"===a.status)}async function U(a){let b=a.line;a.line=null,b&&await (0,p.endCall)(b.callId).catch(()=>{})}function V(a,b,c){a.busy?a.notes.push({text:c.words,said:!0,pictures:c.pictures}):(a.busy=!0,(async()=>{try{for(let d=c;null!==d;){await W(a,b,d);let c=a.notes.filter(a=>a.said);a.notes=a.notes.filter(a=>!a.said),d=c.length?{words:c.map(a=>a.text).join("\n"),pictures:c.flatMap(a=>a.pictures??[])}:null}}finally{a.busy=!1}})())}async function W(a,b,{words:c,pictures:d}){let{channel:e}=a;e.typing(b.chat).catch(()=>{});let f=setInterval(()=>void e.typing(b.chat).catch(()=>{}),4e3),i=a.notes.filter(a=>!a.said);a.notes=a.notes.filter(a=>a.said);try{let f=a.line;(!f||!await (0,p.isCallOpen)(f.callId)||await T(f))&&(await U(a),a.line={...await (0,q.openTextCall)(),messages:[],lastAt:0},a.calls.add(a.line.callId));let h=a.line,k=await (0,q.answerInWriting)({callId:h.callId,standing:h.standing,messages:[...h.messages,...i.map(a=>({role:"user",content:a.text})),{role:"user",content:c}],said:c,pictures:d,notes:()=>a.notes.splice(0)});h.messages=function(a){let b=Math.max(a.findLastIndex(a=>"user"===a.role),0),c=[...(0,j.asWords)(a.slice(0,b),(a,b)=>(0,r.toolLine)(a,JSON.stringify(b??{}))??a,a=>a.length>g.REACH.oldChars?`${a.slice(0,g.REACH.oldChars)}…`:a),...a.slice(b)];if(c.length<=g.REACH.messages)return c;let d=c.findIndex((a,b)=>b>=c.length-g.REACH.trimTo&&"user"===a.role);return d>0?c.slice(d):c}(k.messages),h.lastAt=Date.now(),k.moved&&!h.moved&&(h.moved=!0,await e.say(b.chat,{plain:k.moved}));let l=[...new Set(k.did)].join(" · ");await e.say(b.chat,{markdown:k.text?.trim()||(l?`— ${(0,z.literal)(l)}`:"…")}),await X(a,b,k.text)}catch(d){a.notes.unshift(...i),a.line&&!a.line.lastAt&&await U(a);let c=(0,x.isPublicError)(d)?d.message:(0,h.modelErrorToString)(d);w.logger.warn(`reach ${a.name}: ${c}`),await e.say(b.chat,{plain:c}).catch(()=>{})}finally{clearInterval(f)}}async function X(a,b,c){let d=await (0,t.filesOnDisk)((0,s.pathsIn)(c),null),f=d.slice(0,Math.max(d.length-g.REACH.files,0)).map(a=>({name:a,why:`only ${g.REACH.files} files go with one answer`})),{limits:h}=a.channel,i=Math.min(h.file,g.REACH.fileBytes);for(let c of d.slice(-g.REACH.files)){let d=await (0,t.insideWorkspace)(c),g=d?await (0,e.stat)(d).catch(()=>null):null;if(d&&g)try{let j=await (0,B.picturesOf)(d);if(j.length){let e=await (0,B.pdfOf)(d),g=e&&e.bytes.length<=i;await a.channel.sendFiles(b.chat,g?[...j,e]:j),g||f.push({name:c,why:e?`sent as pictures above; as a PDF it is ${aj(e.bytes.length)}, and the most that goes to ${C.REACH_LABEL[a.name]} is ${aj(i)}`:"sent as pictures above; the page itself opens on the computer"});continue}if(g.size>i){f.push({name:c,why:`it is ${aj(g.size)}, and the most that goes to ${C.REACH_LABEL[a.name]} is ${aj(i)}`});continue}await a.channel.sendFiles(b.chat,[{bytes:await (0,e.readFile)(d),name:c.split("/").pop()??"file",picture:"image"===(0,s.viewKindOf)(c)&&g.size<=h.picture}])}catch(b){w.logger.warn(`reach ${a.name}: could not send ${c}`,b),f.push({name:c,why:ai(b)})}}f.length&&(await a.channel.say(b.chat,{plain:["Not sent — still on this computer:",...f.map(({name:a,why:b})=>`• ${a}: ${b}`)].join("\n")}).catch(b=>w.logger.warn(`reach ${a.name}: could not say so`,b)),a.notes.push({text:`[Named in what went to their phone, and not sent: ${f.map(({name:a,why:b})=>`${a} (${b})`).join("; ")}. They have been told.]`,said:!1}))}async function Y(){for(let a of[...af.last?[af.last]:[],...C.REACH_CHANNELS.filter(a=>a!==af.last)]){let b=af.live.get(a),c=b?await G(a):null;if(b&&c)return{live:b,person:c}}return null}let al=Date.now()-1e3*process.uptime();function Z(a=g.REACH.lookMs){af.looking??=setTimeout(()=>{af.looking=null,$().catch(a=>w.logger.error("reach: open work",a))},a)}async function $(){let a=al+g.BROWSER_GONE_MS-Date.now();if(a>0)return Z(a);let b=await Y();if(!b)return;let c=await (0,m.listInboxThreads)(),d=(0,o.openWork)(c).filter(a=>"progress"!==a.kind),e=new Set(d.map(a=>a.key));for(let a of af.told.keys())e.has(a)||af.told.delete(a);for(let[a,b]of af.choices)e.has((0,o.questionKey)(b.question))||af.choices.delete(a);let h=d.filter(a=>!af.told.has(a.key));if(!h.length)return;let i=await aa();for(let a of h){let d=c.find(b=>b.id===a.threadId);if(!d)continue;let e=i.get(a.threadId),g=e?await G(e.name):null,h=e&&g?{live:e,person:g}:!f.presence.watching&&(0,v.toDate)(d.updatedAt).getTime()>=al?b:null;af.told.set(a.key,{kind:a.kind,phone:!!h}),h&&await ab(h,a,d)}}function _(){for(let[a,b]of af.told)"question"!==b.kind||b.phone||af.told.delete(a);Z(0)}async function aa(){let a=[...af.live.values()],b=await (0,m.listCallJobs)(a.flatMap(a=>[...a.calls]));return new Map(b.flatMap(b=>{let c=a.find(a=>a.calls.has(b.callId??""));return c?[[b.id,c]]:[]}))}async function ab(a,b,c){let{live:d,person:e}=a,f=c.room.questions.find(a=>(0,o.questionKey)(a.id)===b.key),g=(f?.options??[]).map((a,b)=>{let d=`${f?.id.slice(0,40)}:${b}`;return af.choices.set(d,{threadId:c.id,bot:f?.bot??"",question:f?.id??"",answer:a}),{text:a,data:d}});try{await d.channel.say(e.chat,{markdown:`${(0,z.literal)(`${b.show.line} \xb7 ${b.show.name}`)}
|
|
129
129
|
|
|
130
130
|
${b.text||"…"}`},g)}catch(a){w.logger.warn(`reach ${d.name}: could not tell ${b.key}`,a),af.told.delete(b.key);return}await X(d,e,b.text),d.notes.push({text:`${b.line}
|
|
131
131
|
[The user has had this on their phone, as ${b.show.bot} wrote it, since ${(0,i.clockNow)()}.]`,said:!1}),"ending"===b.kind?await (0,m.markSeen)([b.threadId]):await (0,l.acceptRoomRelays)(b.relayIds)}async function ac(a,b,c,d){let e=af.choices.get(c);if(!e)return void await a.channel.say(b.chat,{plain:"That question is no longer open here. Write your answer instead."});for(let[a,b]of af.choices)b.question===e.question&&af.choices.delete(a);try{await (0,k.answerThread)(e.threadId,e.answer,"user",e.bot,e.question||void 0),d&&await a.channel.settle(b.chat,d,e.answer),a.notes.push({text:`[The user answered ${e.bot}'s question from their phone at ${(0,i.clockNow)()}: ${e.answer}. It has reached ${e.bot}.]`,said:!1})}catch(c){await a.channel.say(b.chat,{plain:(0,x.isPublicError)(c)?c.message:"That answer did not get through."})}}a.s(["allowReach",0,Q,"declineReach",0,function(a,b,c){let d=af.live.get(a);d&&ak(d,b,c)&&(d.asking=null,d.held=[],ag())},"forgetReach",0,R,"reachChannelOf",0,a=>C.REACH_CHANNELS.find(b=>C.REACH_KEYS[b].includes(a))??null,"startReach",0,I]),c()}catch(a){c(a)}},!1),92706,a=>{"use strict";var b=a.i(569572),c=a.i(446957),d=a.i(706210),e=a.i(182248);let f={message:"says",question:"asks",report:"reports",interrupted:"was cut off"},g={question:0,stopped:1,done:2,progress:3};function h(a){let c=(0,e.captionText)(a.replace(/!\[[^\]]*\]\([^)]*\)/g," ")).replace(e.MARKDOWN_LINK,"$1").replace(/^• /gm,"").trim();if(c.length<=b.CALL_RELAY.chars)return c;let d=c.slice(0,b.CALL_RELAY.chars),f=Math.max(d.lastIndexOf("\n\n"),d.lastIndexOf(". "),d.lastIndexOf(".\n"),d.lastIndexOf("。")),g=(f>b.CALL_RELAY.chars/3?d.slice(0,f+1):d).trim();return`${g}
|
|
132
132
|
[The message goes on; the rest is in its thread on screen.]`}let i=a=>`question:${a}`;a.s(["openWork",0,function(a){let b=[];for(let e of a){let{relays:a,questions:j}=e.room,k=(0,d.toDate)(e.updatedAt).getTime(),l=(a,b)=>`[${a} → Thursday, thread "${e.label}" (${e.id}), ${b}.]`,m=(a,b)=>({kind:"relay",name:e.label,line:b,done:!0,bot:a});for(let c of j){let d=c.options?.length?` Options: ${c.options.join(" / ")}.`:"";b.push({rank:g.question,key:i(c.id),kind:"question",line:`${l(c.bot,"question")}
|
|
133
133
|
${h(c.text)}${d}`,relayIds:a.filter(a=>a.messageId===c.id).map(a=>a.id),threadId:e.id,text:c.text,show:m(c.bot,`${c.bot} asks`)})}let n=a.filter(a=>!j.some(b=>b.id===a.messageId)),o="done"===e.status,p="waiting"===e.status&&(0,c.isAppStop)(e.ask);if(o||p){if(e.seen)continue;let a=p?"stopped":"done",c=(p?e.ask?.question:null)??e.outcome??"",d="stopped"===a?`It stopped before finishing. Where it got to: ${h(c)}`:`Done. Its answer: ${h(c)}`;b.push({rank:g[a],key:`${a}:${e.id}@${k}`,kind:"ending",line:`${l(e.bot,a)}
|
|
134
134
|
${d}`,relayIds:n.map(a=>a.id),threadId:e.id,text:c,show:m(e.bot,"stopped"===a?`${e.bot} stopped`:`${e.bot} finished`)});continue}for(let a of n)b.push({rank:g.progress,key:`progress:${a.id}`,kind:"progress",line:`${l(a.bot,a.kind)}
|
|
135
|
-
${h(a.text)}`,relayIds:[a.id],threadId:e.id,text:a.text,show:m(a.bot,`${a.bot} ${f[a.kind]}`)})}return b.sort((a,b)=>a.rank-b.rank)},"questionKey",0,i])},143699,a=>a.a(async(b,c)=>{try{var d=a.i(47919),e=a.i(53112),f=a.i(569572),g=a.i(552556),h=a.i(738131),i=a.i(875931),j=a.i(689656),k=a.i(61514),l=a.i(614747),m=a.i(762008),n=a.i(688034),o=a.i(725466),p=a.i(69721),q=a.i(176668);a.i(422842);var r=a.i(293480),s=a.i(569549),t=a.i(3894),u=a.i(626550),v=b([h,i,k,l,o,s]);async function w(){let a=await Promise.all(t.TEXT_CALL_PROVIDERS.map(async a=>await (0,o.readConfig)(a.apiKeyName)?a.apiKeyName:null));return(0,t.textCallRunsOn)(b=>a.includes(b))}async function x(a,b){if(b)return b;let c=await w();return c||(0,r.publicError)(F),{provider:c,model:a.backendModel}}async function y(a,b){if("chatgpt"!==a.provider||!(0,i.isPlanSpent)(b)||!await (0,o.readConfig)(g.LIVE_PROVIDER.apiKeyName))return null;let c=(await (0,s.readLiveSettings)()).backendModel,d=j.TEXT_MODEL_PROVIDERS.openai.suggestModels.find(a=>a.id===c)?.label??c,e=b instanceof Error?b.message:String(b);return{ref:{provider:"openai",model:c},why:e,line:`${e} Answering on your OpenAI key (${d}) until it resets.`}}async function z(a){if(!(0,i.isPlanSpent)(a))return a;let b=a instanceof Error?a.message:String(a);return new r.PublicError(await (0,o.readConfig)(g.LIVE_PROVIDER.apiKeyName)?`${b} Write again and she answers on your OpenAI key.`:`${b} With an OpenAI key in Settings › API keys, she answers on it until then.`)}async function A(a){let b=await x(await (0,s.readLiveSettings)(),a),[c,d]=await Promise.all([(0,s.insertCall)({provider:b.provider,model:f.TEXT_CALL.model,backendModel:b.model}),(0,k.loadCallStanding)()]);return{callId:c,standing:d}}[h,i,k,l,o,s]=v.then?(await v)():v,e.z.object({callId:e.z.string().min(1),standing:e.z.string().nullish(),runsOn:j.textModelRefSchema.nullish(),turn:e.z.string().min(1),messages:e.z.array(e.z.unknown()).min(1),where:e.z.unknown().optional()});let D=globalThis.__textCallTurns??=new Map;async function B(a){var b;let c,e,{callId:g,standing:h,messages:i,said:j,signal:k}=a,[l,n]=await Promise.all([C(g,null,!0),(0,s.nextTurnSeq)(g)]);null!==j&&await (0,s.saveTurns)(g,[{id:crypto.randomUUID(),role:"user",text:j,seq:n}]);let o=(b=g,c=null===j?n:n+1,{step:async a=>{for(let d of a.content)if("tool-call"===d.type){let e=a.content.find(a=>"tool-result"===a.type&&a.toolCallId===d.toolCallId);await (0,s.saveTurns)(b,[{id:d.toolCallId,role:"tool",tool:d.toolName,text:d.toolName===m.TOOL_NAMES.web_search?function(a,b){let c=b??{},d=[(a??{}).query,c.action?.query].find(a=>"string"==typeof a&&!!a.trim()),e=Array.isArray(c.sources)?c.sources.flatMap(a=>a&&"object"==typeof a&&"url"in a&&"string"==typeof a.url?[{url:a.url,..."title"in a&&"string"==typeof a.title?{title:a.title}:{}}]:[]):[];return JSON.stringify({query:d??null,sources:e})}(d.input,e?.type==="tool-result"?e.output:null):JSON.stringify(d.input??{}),seq:c++}])}else"text"===d.type&&d.text.trim()?await (0,s.saveTurns)(b,[{id:crypto.randomUUID(),role:"assistant",text:d.text.trim(),seq:c++}]):"reasoning"===d.type&&d.text.trim()&&await (0,s.saveThought)(b,{id:crypto.randomUUID(),text:d.text.trim(),seq:c})},said:(a,d=crypto.randomUUID())=>(0,s.saveTurns)(b,[{id:d,role:"user",text:a,seq:c++}])}),p=E(h),r=[...p,...i],t=0,v=b=>(0,d.generateText)({model:b.model,instructions:b.system,messages:r,allowSystemInMessages:!0,tools:b.tools,providerOptions:b.providerOptions,stopWhen:(0,d.stepCountIs)(f.TEXT_CALL.maxSteps),abortSignal:k,prepareStep:async({stepNumber:b,messages:c})=>{let d=b>0?a.notes?.()??[]:[];for(let a of(r=[...c,...d.map(a=>({role:"user",content:a.text}))],d))a.said&&await o.said(a.text);return d.length?{messages:r}:void 0},onStepEnd:async a=>{t+=1,await o.step(a)}}),w=null;try{e=await v(l)}catch(b){let a=t?null:await y(l.ref,b);if(!a)throw await z(b);q.logger.info(`text call ${g}: ${a.line}`),w=a.line;try{e=await v(await C(g,a.ref,!0))}catch(a){throw await z(a)}}return{text:e.text.trim(),did:e.steps.flatMap(a=>a.toolCalls.map(a=>(0,u.toolLine)(a.toolName,JSON.stringify(a.input??{}))??a.toolName)),messages:[...r.slice(p.length),...e.steps.at(-1)?.response.messages??[]],moved:w}}let E=a=>a?[{role:"system",content:a}]:[];async function C(a,b,c=!1,d){let e=await (0,s.readLiveSettings)(),f=await x(e,b),j="openai"===f.provider||"chatgpt"===f.provider,[k,q,r,t,u]=await Promise.all([(0,i.getTextModel)(f),(0,l.loadThursdayPrompt)({backendPrompt:e.backendPrompt,written:!0,callId:a,phone:c,persona:e.persona,stylePrompt:e.stylePrompt,readSkills:e.readSkills,where:d}),(0,h.loadTools)({target:"thursday",callId:a,webSearch:e.webSearch,readSkills:e.readSkills,written:!0,model:f,phone:c}),(0,o.readConfig)(n.EXA_API_KEY),(0,o.readConfig)(g.LIVE_PROVIDER.apiKeyName)]),v=k.searchTools&&Object.values(k.searchTools)[0],w={...r,...e.webSearch&&!t&&v?{[m.TOOL_NAMES.web_search]:v}:{}},y=j?u?await (0,p.acceptedReasoning)({apiKey:u,model:f.model,effort:e.reasoningEffort}):(0,p.wantedReasoning)(e.reasoningEffort):null;return{ref:f,model:k.model,system:q,tools:w,providerOptions:{openai:{...y?.effort?{reasoningEffort:y.effort}:{},...y&&"summary"in y&&y.summary?{reasoningSummary:y.summary}:{}}}}}let F="Writing to Thursday needs a GPT subscription sign-in or an OpenAI key — Settings › API keys.";a.s(["answerInWriting",0,B,"openTextCall",0,A,"readWhere",0,function(a){if(null==a)return null;let b=t.WhereSchema.safeParse(a);return b.success?b.data:(q.logger.warn(`The call goes on without where the user is: ${b.error.issues[0]?.message}`),null)},"tellTextCall",0,function(a,b,c){let d=D.get(b);return!!d&&d.callId===a&&(d.notes.push(c),!0)}]),c()}catch(a){c(a)}},!1),69721,a=>{"use strict";var b=a.i(53112),c=a.i(569572),d=a.i(176668),e=a.i(293480),f=a.i(746609);let g=b.z.object({session:b.z.object({id:b.z.string().min(1)}),transport:b.z.object({type:b.z.literal("webrtc"),sdp:b.z.string().min(1)})}),h=new Map;function i(a){return"none"===a?{effort:a}:{...a?{effort:a}:{},summary:"auto"}}async function j(a){let{apiKey:b,model:e,effort:f}=a,g=`${e} ${f??"auto"}`,j=h.get(g);if(void 0!==j)return j;let k=i(f);for(;;){let a=await fetch("https://api.openai.com/v1/responses/input_tokens",{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"},signal:AbortSignal.timeout(c.LIVE_CALL.reasoningCheckMs),body:JSON.stringify({model:e,input:".",reasoning:k})}).catch(()=>null);if(!a)return k;let f=Object.keys(k).length?k:null;if(a.ok)return h.set(g,f),f;let i=await a.json().catch(()=>null),j=i?.error?.param?.replace(/^reasoning\./,"");if("effort"!==j&&"summary"!==j||!(j in k))return k;if(d.logger.warn(`${e} takes no reasoning ${j}; calls omit it`),delete k[j],!Object.keys(k).length)return h.set(g,null),null}}async function k(a){let b=await fetch("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a}`},signal:AbortSignal.timeout(c.LIVE_CALL.keyCheckMs)}).catch(()=>null);if(!b||401!==b.status&&403!==b.status)return null;let d=await b.json().catch(()=>null);return d?.error?.message?.trim()||`It answered ${b.status}.`}async function l(a){let b,h=await fetch("https://api.openai.com/v1/live/sessions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},signal:AbortSignal.timeout(c.LIVE_CALL.startupMs),body:JSON.stringify({session:{model:f.LIVE_MODEL,instructions:a.instructions,audio:{output:{voice:a.voice}},store:!1,delegation:{type:"responses",responses:{model:a.backend.model,instructions:a.backend.instructions,tools:[...a.backend.tools.map(a=>({type:"function",...a})),...a.backend.hosted.map(a=>f.LIVE_HOSTED_TOOLS[a].declare)],tool_choice:"auto",parallel_tool_calls:!0,max_output_tokens:c.LIVE_CALL.backendOutputTokens,...a.backend.reasoning?{reasoning:a.backend.reasoning}:{}}}},transport:{type:"webrtc",sdp:a.sdp}})}).catch(a=>{d.logger.warn("OpenAI Live unreachable",a),(0,e.publicError)("Could not reach OpenAI Live.")}),i=await h.text();try{b=JSON.parse(i)}catch{b=null}if(!h.ok){let a=b;(0,e.publicError)(a?.error?.message||i||`OpenAI Live refused the call (${h.status}).`)}let j=g.safeParse(b);return j.success||(0,e.publicError)("OpenAI Live returned an invalid session connection."),j.data}a.s(["acceptedReasoning",0,j,"createLiveCall",0,l,"keyRefusal",0,k,"wantedReasoning",0,i])}];
|
|
135
|
+
${h(a.text)}`,relayIds:[a.id],threadId:e.id,text:a.text,show:m(a.bot,`${a.bot} ${f[a.kind]}`)})}return b.sort((a,b)=>a.rank-b.rank)},"questionKey",0,i])},143699,a=>a.a(async(b,c)=>{try{var d=a.i(912714),e=a.i(47919),f=a.i(53112),g=a.i(148016),h=a.i(569572),i=a.i(552556),j=a.i(738131),k=a.i(875931),l=a.i(689656),m=a.i(61514),n=a.i(614747),o=a.i(467650),p=a.i(762008),q=a.i(688034),r=a.i(725466),s=a.i(684321),t=a.i(69721),u=a.i(176668);a.i(422842);var v=a.i(293480),w=a.i(182248),x=a.i(569549),y=a.i(3894),z=a.i(626550),A=b([j,k,m,n,r,x]);async function B(){let a=await Promise.all(y.TEXT_CALL_PROVIDERS.map(async a=>await (0,r.readConfig)(a.apiKeyName)?a.apiKeyName:null));return(0,y.textCallRunsOn)(b=>a.includes(b))}async function C(a,b){if(b)return b;let c=await B();return c||(0,v.publicError)(S),{provider:c,model:a.backendModel}}async function D(a,b){if("chatgpt"!==a.provider||!(0,k.isPlanSpent)(b)||!await (0,r.readConfig)(i.LIVE_PROVIDER.apiKeyName))return null;let c=(await (0,x.readLiveSettings)()).backendModel,d=l.TEXT_MODEL_PROVIDERS.openai.suggestModels.find(a=>a.id===c)?.label??c,e=b instanceof Error?b.message:String(b);return{ref:{provider:"openai",model:c},why:e,line:`${e} Answering on your OpenAI key (${d}) until it resets.`}}async function E(a){if(!(0,k.isPlanSpent)(a))return a;let b=a instanceof Error?a.message:String(a);return new v.PublicError(await (0,r.readConfig)(i.LIVE_PROVIDER.apiKeyName)?`${b} Write again and she answers on your OpenAI key.`:`${b} With an OpenAI key in Settings › API keys, she answers on it until then.`)}async function F(a){let b=await C(await (0,x.readLiveSettings)(),a),[c,d]=await Promise.all([(0,x.insertCall)({provider:b.provider,model:h.TEXT_CALL.model,backendModel:b.model}),(0,m.loadCallStanding)()]);return{callId:c,standing:d}}[j,k,m,n,r,x]=A.then?(await A)():A,f.z.object({callId:f.z.string().min(1),standing:f.z.string().nullish(),runsOn:l.textModelRefSchema.nullish(),turn:f.z.string().min(1),messages:f.z.array(f.z.unknown()).min(1),where:f.z.unknown().optional()});let K=globalThis.__textCallTurns??=new Map,L="workspace:",M=a=>({type:"file",mediaType:(0,s.mimeOf)(a),filename:a,data:{type:"url",url:new URL(`${L}${encodeURIComponent(a)}`)}}),N=a=>{let b=a.data,c=b instanceof URL?b:b?.type==="url"?b.url:null;return c instanceof URL&&c.protocol===L?decodeURIComponent(c.pathname):null},O=(a,b)=>b?.length?[{type:"text",text:a},...b.map(M)]:a;g.queryKey.file("");let P=new WeakMap,Q=a=>a.map(a=>P.get(a)??a);async function G(a,b,c){if(b)return{missed:`${a} is a picture, and ${b} cannot see pictures, so it was not sent to you.`};let e=await (0,o.checkPicture)(a);if("missing"in e)return{missed:`There is no file at ${a} in the workspace, so no picture was sent to you.`};if("notPicture"in e)return{missed:`${a} is not a png, jpg, webp or gif, so it was not sent to you as a picture.`};if("tooBig"in e)return{missed:`${(0,o.tooBigToSee)(a,e.tooBig)} It was not sent to you.`};if(e.bytes>c)return{missed:`${a} is a picture not sent with this message: the pictures after it fill the ${(0,w.formatBytes)(h.LOOK.perRequest)} one message to you carries. Look at it with look_at to see it.`};let f=await (0,d.readFile)(e.full).catch(()=>null);return f?{data:f.toString("base64"),mediaType:e.mediaType,bytes:f.length}:{missed:`${a} could not be read, so no picture was sent to you.`}}async function H(a,b){let c=(0,k.seesToolImages)(b)?null:b.model,d=h.LOOK.perRequest-a.reduce((a,b)=>a+function(a){if("user"!==a.role||"string"==typeof a.content)return 0;let b=0;for(let c of a.content){if("file"!==c.type)continue;let a=c.data,d=a?.type==="data"?a.data:a;"string"==typeof d?b+=Math.floor(3*d.length/4):(d instanceof Uint8Array||d instanceof ArrayBuffer)&&(b+=d.byteLength)}return b}(b),0),e=[...a];for(let a=e.length-1;a>=0;a-=1){let b=e[a];if("user"!==b.role||"string"==typeof b.content||!b.content.some(a=>"file"===a.type&&null!==N(a)))continue;let f=[];for(let a of[...b.content].reverse()){let b="file"===a.type?N(a):null;if(!b){f.unshift(a);continue}let e=await G(b,c,d);if("missed"in e){f.unshift({type:"text",text:e.missed});continue}d-=e.bytes,f.unshift({type:"text",text:`${b}, as an image:`},{type:"file",mediaType:e.mediaType,data:{type:"data",data:e.data}})}let g={role:"user",content:f};P.set(g,b),e[a]=g}return e}async function I(a){var b;let c,d,{callId:f,standing:g,messages:i,said:j,signal:k}=a,[l,m]=await Promise.all([J(f,null,!0),(0,x.nextTurnSeq)(f)]);null!==j&&await (0,x.saveTurns)(f,[{id:crypto.randomUUID(),role:"user",text:j,seq:m}]);let n=(b=f,c=null===j?m:m+1,{step:async a=>{for(let d of a.content)if("tool-call"===d.type){let e=a.content.find(a=>"tool-result"===a.type&&a.toolCallId===d.toolCallId);await (0,x.saveTurns)(b,[{id:d.toolCallId,role:"tool",tool:d.toolName,text:d.toolName===p.TOOL_NAMES.web_search?function(a,b){let c=b??{},d=[(a??{}).query,c.action?.query].find(a=>"string"==typeof a&&!!a.trim()),e=Array.isArray(c.sources)?c.sources.flatMap(a=>a&&"object"==typeof a&&"url"in a&&"string"==typeof a.url?[{url:a.url,..."title"in a&&"string"==typeof a.title?{title:a.title}:{}}]:[]):[];return JSON.stringify({query:d??null,sources:e})}(d.input,e?.type==="tool-result"?e.output:null):JSON.stringify(d.input??{}),seq:c++}])}else"text"===d.type&&d.text.trim()?await (0,x.saveTurns)(b,[{id:crypto.randomUUID(),role:"assistant",text:d.text.trim(),seq:c++}]):"reasoning"===d.type&&d.text.trim()&&await (0,x.saveThought)(b,{id:crypto.randomUUID(),text:d.text.trim(),seq:c})},said:(a,d=crypto.randomUUID())=>(0,x.saveTurns)(b,[{id:d,role:"user",text:a,seq:c++}])}),o=R(g),q=i.at(-1),r=a.pictures?.length&&q?.role==="user"&&"string"==typeof q.content?[...i.slice(0,-1),{role:"user",content:O(q.content,a.pictures)}]:i,s=[...o,...r],t=0,v=async b=>(0,e.generateText)({model:b.model,instructions:b.system,messages:await H(Q(s),b.ref),allowSystemInMessages:!0,tools:b.tools,providerOptions:b.providerOptions,stopWhen:(0,e.stepCountIs)(h.TEXT_CALL.maxSteps),abortSignal:k,prepareStep:async({stepNumber:c,messages:d})=>{let e=c>0?a.notes?.()??[]:[];for(let a of(s=[...d,...e.map(a=>({role:"user",content:O(a.text,a.pictures)}))],e))a.said&&await n.said(a.text);return e.length?{messages:await H(s,b.ref)}:void 0},onStepEnd:async a=>{t+=1,await n.step(a)}}),w=null;try{d=await v(l)}catch(b){let a=t?null:await D(l.ref,b);if(!a)throw await E(b);u.logger.info(`text call ${f}: ${a.line}`),w=a.line;try{d=await v(await J(f,a.ref,!0))}catch(a){throw await E(a)}}return{text:d.text.trim(),did:d.steps.flatMap(a=>a.toolCalls.map(a=>(0,z.toolLine)(a.toolName,JSON.stringify(a.input??{}))??a.toolName)),messages:Q([...s.slice(o.length),...d.steps.at(-1)?.response.messages??[]]),moved:w}}let R=a=>a?[{role:"system",content:a}]:[];async function J(a,b,c=!1,d){let e=await (0,x.readLiveSettings)(),f=await C(e,b),g="openai"===f.provider||"chatgpt"===f.provider,[h,l,m,o,s]=await Promise.all([(0,k.getTextModel)(f),(0,n.loadThursdayPrompt)({backendPrompt:e.backendPrompt,written:!0,callId:a,phone:c,persona:e.persona,stylePrompt:e.stylePrompt,readSkills:e.readSkills,where:d}),(0,j.loadTools)({target:"thursday",callId:a,webSearch:e.webSearch,readSkills:e.readSkills,written:!0,model:f,phone:c}),(0,r.readConfig)(q.EXA_API_KEY),(0,r.readConfig)(i.LIVE_PROVIDER.apiKeyName)]),u=h.searchTools&&Object.values(h.searchTools)[0],v={...m,...e.webSearch&&!o&&u?{[p.TOOL_NAMES.web_search]:u}:{}},w=g?s?await (0,t.acceptedReasoning)({apiKey:s,model:f.model,effort:e.reasoningEffort}):(0,t.wantedReasoning)(e.reasoningEffort):null;return{ref:f,model:h.model,system:l,tools:v,providerOptions:{openai:{...w?.effort?{reasoningEffort:w.effort}:{},...w&&"summary"in w&&w.summary?{reasoningSummary:w.summary}:{}}}}}let S="Writing to Thursday needs a GPT subscription sign-in or an OpenAI key — Settings › API keys.";a.s(["answerInWriting",0,I,"openTextCall",0,F,"readWhere",0,function(a){if(null==a)return null;let b=y.WhereSchema.safeParse(a);return b.success?b.data:(u.logger.warn(`The call goes on without where the user is: ${b.error.issues[0]?.message}`),null)},"tellTextCall",0,function(a,b,c){let d=K.get(b);return!!d&&d.callId===a&&(d.notes.push(c),!0)}]),c()}catch(a){c(a)}},!1),69721,a=>{"use strict";var b=a.i(53112),c=a.i(569572),d=a.i(176668),e=a.i(293480),f=a.i(746609);let g=b.z.object({session:b.z.object({id:b.z.string().min(1)}),transport:b.z.object({type:b.z.literal("webrtc"),sdp:b.z.string().min(1)})}),h=new Map;function i(a){return"none"===a?{effort:a}:{...a?{effort:a}:{},summary:"auto"}}async function j(a){let{apiKey:b,model:e,effort:f}=a,g=`${e} ${f??"auto"}`,j=h.get(g);if(void 0!==j)return j;let k=i(f);for(;;){let a=await fetch("https://api.openai.com/v1/responses/input_tokens",{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"},signal:AbortSignal.timeout(c.LIVE_CALL.reasoningCheckMs),body:JSON.stringify({model:e,input:".",reasoning:k})}).catch(()=>null);if(!a)return k;let f=Object.keys(k).length?k:null;if(a.ok)return h.set(g,f),f;let i=await a.json().catch(()=>null),j=i?.error?.param?.replace(/^reasoning\./,"");if("effort"!==j&&"summary"!==j||!(j in k))return k;if(d.logger.warn(`${e} takes no reasoning ${j}; calls omit it`),delete k[j],!Object.keys(k).length)return h.set(g,null),null}}async function k(a){let b=await fetch("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a}`},signal:AbortSignal.timeout(c.LIVE_CALL.keyCheckMs)}).catch(()=>null);if(!b||401!==b.status&&403!==b.status)return null;let d=await b.json().catch(()=>null);return d?.error?.message?.trim()||`It answered ${b.status}.`}async function l(a){let b,h=await fetch("https://api.openai.com/v1/live/sessions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},signal:AbortSignal.timeout(c.LIVE_CALL.startupMs),body:JSON.stringify({session:{model:f.LIVE_MODEL,instructions:a.instructions,audio:{output:{voice:a.voice}},store:!1,delegation:{type:"responses",responses:{model:a.backend.model,instructions:a.backend.instructions,tools:[...a.backend.tools.map(a=>({type:"function",...a})),...a.backend.hosted.map(a=>f.LIVE_HOSTED_TOOLS[a].declare)],tool_choice:"auto",parallel_tool_calls:!0,max_output_tokens:c.LIVE_CALL.backendOutputTokens,...a.backend.reasoning?{reasoning:a.backend.reasoning}:{}}}},transport:{type:"webrtc",sdp:a.sdp}})}).catch(a=>{d.logger.warn("OpenAI Live unreachable",a),(0,e.publicError)("Could not reach OpenAI Live.")}),i=await h.text();try{b=JSON.parse(i)}catch{b=null}if(!h.ok){let a=b;(0,e.publicError)(a?.error?.message||i||`OpenAI Live refused the call (${h.status}).`)}let j=g.safeParse(b);return j.success||(0,e.publicError)("OpenAI Live returned an invalid session connection."),j.data}a.s(["acceptedReasoning",0,j,"createLiveCall",0,l,"keyRefusal",0,k,"wantedReasoning",0,i])}];
|
|
136
136
|
|
|
137
137
|
//# sourceMappingURL=_0cd6g3l._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[630342,a=>{"use strict";var b=a.i(187924);a.s([],627264),a.i(627264);var c=a.i(572131),d=a.i(722050),e=a.i(138939),f=a.i(925123),g=a.i(854662);let h=c.createContext(void 0);function i(a){let b=c.useContext(h);if(void 0===b&&!a)throw Error((0,g.default)(47));return b}var j=a.i(935112),k=a.i(417498),l=a.i(736069),m=a.i(524715),n=a.i(307436),o=a.i(14239),p=a.i(284204),q=a.i(717017),r=a.i(151943),s=a.i(82204);let t={...q.popupStoreSelectors,disabled:a=>a.disabled,instantType:a=>a.instantType,openMethod:a=>a.openMethod,openChangeReason:a=>a.openChangeReason,modal:a=>a.modal,focusManagerModal:a=>a.focusManagerModal,stickIfOpen:a=>a.stickIfOpen,titleElementId:a=>a.titleElementId,descriptionElementId:a=>a.descriptionElementId,openOnHover:a=>a.openOnHover,closeDelay:a=>a.closeDelay,adaptiveOrigin:a=>a.adaptiveOrigin};class u extends k.ReactStore{constructor(a,b,c){const d=new r.PopupTriggerMap;super(v(a,d,b,c),w(d),t)}setOpen=(a,b)=>{let c,d=b.reason===n.REASONS.triggerHover,e=b.reason===n.REASONS.triggerPress&&0===b.event.detail,f=!a&&(b.reason===n.REASONS.escapeKey||null==b.reason),g=(0,p.attachPreventUnmountOnClose)(b),h=this.select("activeTriggerId");if(a||b.reason!==n.REASONS.closePress||null!=b.trigger||null==h||(b.trigger=this.context.triggerElements.getById(h)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(a,b),b.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(a,b);let i=()=>{let c=(0,p.createPopupOpenState)(this.state,a,b.trigger,g());c.openChangeReason=b.reason,this.update(c)};d?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(s.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),j.flushSync(i)):i(),e?c="click":f?c="dismiss":b.reason===n.REASONS.focusOut&&(c="focus"),this.set("instantType",c)}}function v(a,b,c,d=!1){let e={...(0,q.createInitialPopupStoreState)(b,c,d),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...a};return e.open&&a?.mounted===void 0&&(e.mounted=!0),e}function w(a){return{popupRef:c.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:c.createRef(),beforeContentFocusGuardRef:c.createRef(),stickIfOpenTimeout:new l.Timeout,triggerElements:a}}var x=a.i(394552);let y=(0,d.fastComponent)(function({props:a}){var d;let e,{children:f,open:g,defaultOpen:i=!1,onOpenChange:j,onOpenChangeComplete:k,modal:l=!1,handle:m,triggerId:o,defaultTriggerId:q=null}=a,r=(d={modal:l,open:i,openProp:g,activeTriggerId:q,triggerIdProp:o},e=(0,p.usePopupRootStore)((a,b)=>new u(d,a,b)),c.useEffect(()=>e.context.stickIfOpenTimeout.disposeEffect(),[e]),e);r.useControlledProp("openProp",g),r.useControlledProp("triggerIdProp",o);let s=r.useState("open"),t=r.useState("mounted"),v=r.useState("payload");r.useContextCallback("onOpenChange",j),r.useContextCallback("onOpenChangeComplete",k),(0,p.usePopupRootSync)(r,s),(0,p.useImplicitActiveTrigger)(r);let{forceUnmount:w}=(0,p.useOpenStateTransitions)(s,r,()=>{r.update({stickIfOpen:!0,openChangeReason:null})});r.useSyncedValues({modal:l}),c.useEffect(()=>{s||r.context.stickIfOpenTimeout.clear()},[r,s]),c.useImperativeHandle(a.actionsRef,()=>({unmount:w,close:()=>r.setOpen(!1,(0,x.createChangeEventDetails)(n.REASONS.imperativeAction))}),[w,r]);let y=s||t;return(0,b.jsxs)(h.Provider,{value:r,children:[m&&(0,b.jsx)(p.PopupHandleAttachment,{handle:m,store:r}),y&&(0,b.jsx)(z,{store:r,modal:l}),"function"==typeof f?f({payload:v}):f]})});function z({store:a,modal:b}){let c=a.useState("floatingRootContext"),d=(0,e.useDismiss)(c,{outsidePressEvent:{mouse:"trap-focus"===b?"sloppy":"intentional",touch:"sloppy"}}),f=d.reference,g=d.floating;return(0,p.usePopupInteractionProps)(a,{activeTriggerProps:f,inactiveTriggerProps:f,popupProps:g}),null}var A=a.i(221436),B=a.i(304478),C=a.i(926184),D=a.i(25003),E=a.i(331973),F=a.i(705735),G=a.i(300557),H=a.i(261394),I=a.i(497151),J=a.i(793332),K=a.i(629752);let L=(0,d.fastComponentRef)(function(a,d){let{render:e,className:f,style:h,disabled:j=!1,nativeButton:k=!0,handle:l,payload:m,openOnHover:o=!1,delay:q=300,closeDelay:r=0,id:t,...u}=a,v=i(!0),w=(0,I.usePopupHandleStore)(l)??v;if(!w)throw Error((0,g.default)(74));let x=(0,G.useBaseUiId)(t),y=w.useState("isTriggerActive",x),z=w.useState("floatingRootContext"),L=w.useState("isOpenedByTrigger",x),M=w.useState("triggerPopupId",x),N=c.useRef(null),{registerTrigger:O,isMountedByThisTrigger:P}=(0,p.useTriggerDataForwarding)(x,N,w,{payload:m,disabled:j,openOnHover:o,closeDelay:r}),Q=w.useState("openChangeReason"),R=w.useState("stickIfOpen"),S=w.useState("openMethod"),T=w.useState("focusManagerModal"),U=(0,F.useHoverReferenceInteraction)(z,{enabled:!j&&o&&("touch"!==S||Q!==n.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,D.safePolygon)(),restMs:q,delay:{close:r},triggerElementRef:N,isActiveTrigger:y,isClosing:()=>"ending"===w.select("transitionStatus")}),V=(0,E.useClick)(z,{stickIfOpen:R}),W=(0,K.useOpenMethodTriggerProps)(()=>w.select("open"),a=>{w.set("openMethod",a)}),X=w.useState("triggerProps",P),{getButtonProps:Y,buttonRef:Z}=(0,A.useButton)({disabled:j,native:k}),{preFocusGuardRef:$,handlePreFocusGuardFocus:_,handleFocusTargetFocus:aa}=(0,J.useTriggerFocusGuards)(w,N),ab=(0,C.useRenderElement)("button",a,{state:{disabled:j,open:L},ref:[Z,d,O,N],props:[V.reference,U,X,W,{[s.CLICK_TRIGGER_IDENTIFIER]:"",id:x,"aria-haspopup":"dialog","aria-expanded":L,"aria-controls":M},u,Y],stateAttributesMapping:{open:a=>a&&Q===n.REASONS.triggerPress?B.pressableTriggerOpenStateMapping.open(a):B.triggerOpenStateMapping.open(a)}}),ac=(0,b.jsx)(c.Fragment,{children:ab},x);return P&&!T?(0,b.jsxs)(c.Fragment,{children:[(0,b.jsx)(H.FocusGuard,{ref:$,onFocus:_}),ac,(0,b.jsx)(H.FocusGuard,{ref:w.context.triggerFocusTargetRef,onFocus:aa})]}):ac});var M=a.i(354098);let N=c.createContext(void 0),O=c.forwardRef(function(a,c){let{keepMounted:d=!1,...e}=a;return i().useState("mounted")||d?(0,b.jsx)(N.Provider,{value:d,children:(0,b.jsx)(M.FloatingPortal,{ref:c,...e})}):null});var P=a.i(454125),Q=a.i(357738);let R=c.createContext(void 0);function S(){let a=c.useContext(R);if(!a)throw Error((0,g.default)(46));return a}var T=a.i(844871),U=a.i(330076),V=a.i(443125),W=a.i(456011),X=a.i(402968);let Y=c.forwardRef(function(a,d){let{render:e,className:h,style:j,anchor:k,positionMethod:l,side:m,align:o,sideOffset:p,alignOffset:q,collisionBoundary:r="clipping-ancestors",collisionPadding:t,arrowPadding:u,sticky:v,disableAnchorTracking:w=!1,collisionAvoidance:x=s.POPUP_COLLISION_AVOIDANCE,...y}=a,z=i(),A=function(){let a=c.useContext(N);if(void 0===a)throw Error((0,g.default)(45));return a}(),B=(0,f.useFloatingNodeId)(),C=z.useState("floatingRootContext"),D=z.useState("mounted"),E=z.useState("open"),F=z.useState("openChangeReason"),G=z.useState("activeTriggerElement"),H=z.useState("modal"),I=z.useState("openMethod"),J=z.useState("positionerElement"),K=z.useState("instantType"),L=z.useState("transitionStatus"),M=z.useState("adaptiveOrigin"),O=c.useRef(null),S=(0,V.useAnimationsFinished)(J),Y=(0,T.useAnchorPositioning)({anchor:k,floatingRootContext:C,positionMethod:l,mounted:D,side:m,sideOffset:p,align:o,alignOffset:q,arrowPadding:u,collisionBoundary:r,collisionPadding:t,sticky:v,disableAnchorTracking:w,keepMounted:A,nodeId:B,collisionAvoidance:x,adaptiveOrigin:M}),Z=C.useState("domReferenceElement");(0,Q.useIsoLayoutEffect)(()=>{let a=O.current;if(Z&&(O.current=Z),a&&Z&&Z!==a){z.set("instantType",void 0);let a=new AbortController;return S(()=>{z.set("instantType","trigger-change")},a.signal),()=>{a.abort()}}},[Z,S,z]);let $=!0===H&&F!==n.REASONS.triggerHover;(0,X.useAnchoredPopupScrollLock)(E&&$,"touch"===I,J,G);let _=z.useStateSetter("positionerElement"),aa={open:E,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,instant:K},ab=(0,W.usePositioner)(a,aa,{styles:Y.positionerStyles,transitionStatus:L,props:y,refs:[d,_],hidden:!D,inert:!E});return(0,b.jsxs)(R.Provider,{value:Y,children:[D&&$&&(0,b.jsx)(U.InternalBackdrop,{inert:(0,P.inertValue)(!E),cutout:G}),(0,b.jsx)(f.FloatingNode,{id:B,children:ab})]})});var Z=a.i(426476),$=a.i(150687),_=a.i(181673),aa=a.i(305687),ab=a.i(669649),ac=a.i(19416),ad=a.i(3861),ae=a.i(854401);let af=c.createContext(void 0),ag=c.forwardRef(function(a,d){let{render:e,className:f,style:g,initialFocus:h,finalFocus:j,...k}=a,l=i(),m=S(),o=null!=(0,ac.useToolbarRootContext)(!0),{context:q,hasClosePart:r}=function(){let[a,b]=c.useState(0),d=(0,ae.useStableCallback)(()=>(b(a=>a+1),()=>{b(a=>Math.max(0,a-1))}));return{context:c.useMemo(()=>({register:d}),[d]),hasClosePart:a>0}}(),s=l.useState("open"),t=l.useState("openMethod"),u=l.useState("instantType"),v=l.useState("transitionStatus"),w=l.useState("popupProps"),x=l.useState("titleElementId"),y=l.useState("descriptionElementId"),z=l.useState("modal"),A=l.useState("mounted"),D=l.useState("openChangeReason"),E=l.useState("activeTriggerElement"),F=l.useState("floatingRootContext"),G=F.useState("floatingId"),H=l.useState("disabled"),I=l.useState("openOnHover"),J=l.useState("closeDelay");(0,aa.useOpenChangeComplete)({open:s,ref:l.context.popupRef,onComplete(){s&&l.context.onOpenChangeComplete?.(!0)}}),(0,_.useHoverFloatingInteraction)(F,{enabled:I&&!H,closeDelay:J});let K=void 0===h?(0,p.createDefaultInitialFocus)(l.context.popupRef):h,L=!1!==z&&r;l.useSyncedValue("focusManagerModal",L);let M=l.useStateSetter("popupElement"),N={open:s,side:m.side,align:m.align,instant:u,transitionStatus:v},O=(0,C.useRenderElement)("div",a,{state:N,ref:[d,l.context.popupRef,M],props:[w,{id:G,role:"dialog",...p.FOCUSABLE_POPUP_PROPS,"aria-labelledby":x,"aria-describedby":y,onKeyDown(a){o&&ab.COMPOSITE_KEYS.has(a.key)&&a.stopPropagation()}},(0,ad.getDisabledMountTransitionStyles)(v),k],stateAttributesMapping:B.popupTransitionStateMapping});return(0,b.jsx)($.FloatingFocusManager,{context:F,openInteractionType:t,modal:L,disabled:!A||D===n.REASONS.triggerHover,initialFocus:K,returnFocus:j,restoreFocus:"popup",previousFocusableElement:(0,Z.isHTMLElement)(E)?E:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,b.jsx)(af.Provider,{value:q,children:O})})}),ah=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i().useState("open"),{arrowRef:h,side:j,align:k,arrowUncentered:l,arrowStyles:m}=S();return(0,C.useRenderElement)("div",a,{state:{open:g,side:j,align:k,uncentered:l},ref:[b,h],props:[{style:m,"aria-hidden":!0},f],stateAttributesMapping:B.popupStateMapping})}),ai=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=g.useState("open"),j=g.useState("mounted"),k=g.useState("transitionStatus"),l=g.useState("openChangeReason");return(0,C.useRenderElement)("div",a,{state:{open:h,transitionStatus:k},ref:b,props:[{role:"presentation",hidden:!j,style:{pointerEvents:l===n.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},f],stateAttributesMapping:B.popupTransitionStateMapping})}),aj=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=(0,G.useBaseUiId)(f.id);return g.useSyncedValueWithCleanup("titleElementId",h),(0,C.useRenderElement)("h2",a,{ref:b,props:[{id:h},f]})}),ak=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=(0,G.useBaseUiId)(f.id);return g.useSyncedValueWithCleanup("descriptionElementId",h),(0,C.useRenderElement)("p",a,{ref:b,props:[{id:h},f]})}),al=c.forwardRef(function(a,b){let d,{render:e,className:f,style:g,disabled:h=!1,nativeButton:j=!0,...k}=a,{buttonRef:l,getButtonProps:m}=(0,A.useButton)({disabled:h,focusableWhenDisabled:!1,native:j}),o=i();return d=c.useContext(af),(0,Q.useIsoLayoutEffect)(()=>d?.register(),[d]),(0,C.useRenderElement)("button",a,{ref:[b,l],props:[{onClick(a){o.setOpen(!1,(0,x.createChangeEventDetails)(n.REASONS.closePress,a.nativeEvent))}},k,m]})});var am=a.i(362092);let an=c.forwardRef(function(a,b){let{render:c,className:d,style:e,children:f,...g}=a,h=i(),{side:j}=S(),k=h.useState("instantType"),{children:l,state:m}=(0,am.usePopupViewport)({store:h,side:j,children:f}),n={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:k};return(0,C.useRenderElement)("div",a,{state:n,ref:b,props:[g,{children:l}],stateAttributesMapping:am.popupViewportStateMapping})});var ao=a.i(4675);class ap extends ao.BasePopupHandle{constructor(){super(function(){let a=new r.PopupTriggerMap;return Object.assign(new o.NullStore(Object.freeze(v(void 0,a)),Object.freeze(w(a)),t),{setOpen:m.NOOP})}(),"Popover")}open(a){this.openByTrigger(a)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}a.s(["Arrow",0,ah,"Backdrop",0,ai,"Close",0,al,"Description",0,ak,"Handle",0,ap,"Popup",0,ag,"Portal",0,O,"Positioner",0,Y,"Root",0,function(a){return i(!0)?(0,b.jsx)(y,{props:a}):(0,b.jsx)(f.FloatingTree,{children:(0,b.jsx)(y,{props:a})})},"Title",0,aj,"Trigger",0,L,"Viewport",0,an,"createHandle",0,function(){return new ap}],536179);var aq=a.i(536179),aq=aq,ar=a.i(497895);a.s(["Popover",0,function({...a}){return(0,b.jsx)(aq.Root,{"data-slot":"popover",...a})},"PopoverContent",0,function({className:a,align:c="center",alignOffset:d=0,side:e="bottom",sideOffset:f=4,...g}){return(0,b.jsx)(aq.Portal,{children:(0,b.jsx)(aq.Positioner,{align:c,alignOffset:d,side:e,sideOffset:f,className:"isolate z-50",children:(0,b.jsx)(aq.Popup,{"data-slot":"popover-content",className:(0,ar.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),...g})})})},"PopoverTrigger",0,function({...a}){return(0,b.jsx)(aq.Trigger,{"data-slot":"popover-trigger",...a})}],630342)},852307,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(340695),e=a.i(864037),f=a.i(287702),g=a.i(405050);let h=(0,g.createServerReference)("7f8b813c5e6b976a8dca59a60b04944d8fa2e7f0ac",g.callServer,void 0,g.findSourceMapURL,"startChatGptSignInAction");var i=a.i(313237);a.s(["ChatGptSignIn",0,function({variant:a,size:g,className:j,label:k="Sign in with ChatGPT"}){let[l,m]=(0,c.useState)(!1),n=(0,c.useRef)(null),o=()=>{n.current&&clearInterval(n.current),n.current=null};(0,c.useEffect)(()=>o,[]);let[p,q]=(0,i.useServerAction)(h,{onOk:a=>{let b,c=((b=window.open(a,"thursday-chatgpt","popup,width=520,height=720"))||e.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"}),b);if(!c)return;m(!0),o();let d=Date.now()+f.CHATGPT_SIGN_IN.waitMs;n.current=setInterval(()=>{!c.closed&&Date.now()<d||(o(),m(!1))},700)}});return(0,b.jsx)(d.Button,{variant:a,size:g,className:j,loading:q||l,onClick:()=>p(),children:k})}],852307)},379630,a=>{"use strict";var b=a.i(187924);function c({className:a}){return(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:a,width:"24",children:[(0,b.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,b.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,b.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,b.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,b.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function d({className:a}){return(0,b.jsxs)("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("title",{children:"OpenAI icon"}),(0,b.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})}function e({className:a}){return(0,b.jsxs)("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 35 33",children:[(0,b.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,b.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})}function f({className:a}){return(0,b.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:a,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,b.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,b.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,b.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,b.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,b.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,b.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,b.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,b.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,b.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,b.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,b.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,b.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})}function g({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:a,children:(0,b.jsx)("g",{children:(0,b.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}let h={mistral:[{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"},{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"},{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"},{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"},{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"}],groq:[{d:"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"}],cerebras:[{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z",fill:"#F15A29"},{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"}],togetherai:[{d:"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z",fill:"#EF2CC1"},{d:"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z",fill:"#CAAEF5"},{d:"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z",fill:"#FC4C02"}],fireworks:[{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z",fill:"#5019C5"}],deepinfra:[{d:"M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z",fill:"#2A3275"},{d:"M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z",fill:"#5699DB"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",fill:"#39594D"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",fill:"#D18EE2"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",fill:"#FF7759"}],openrouter:[{d:"M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"}]};a.s(["ProviderIcon",0,function({className:a,provider:i}){if(i in h)return(0,b.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:h[i].map(a=>(0,b.jsx)("path",{d:a.d,fill:a.fill},a.d))});let j=(a=>{switch(a){case"anthropic":return f;case"google":return c;case"openai":case"chatgpt":return d;case"vercel-ai-gateway":return g;case"xai":return e}})(i);return(0,b.jsx)(j,{className:a})}],379630)},96340,a=>{"use strict";var b=a.i(156757),c=a.i(287702),d=a.i(249890),e=a.i(61876),f=a.i(905441);let g={id:"openai",label:"OpenAI",apiKeyName:e.TEXT_MODEL_PROVIDERS.openai.apiKeyName},h=["chatgpt","openai"];function i(a,b,c){return!!b(e.TEXT_MODEL_PROVIDERS[a].apiKeyName)&&("chatgpt"!==a||(0,e.planCallsOf)({plan:c}))}let j=e.TEXT_MODEL_PROVIDERS.openai.suggestModels,k=b.z.string().max(c.COMMON_VALIDATE.prompt.max).default(""),l=b.z.object({voice:b.z.string().trim().min(1).max(128).default("marin"),planVoice:b.z.string().trim().min(1).max(128).default("cove"),runsOn:b.z.enum(h).nullable().default(null),persona:b.z.string().trim().min(1).max(64).default(f.DEFAULT_PERSONA),stylePrompt:k,backendModel:b.z.string().trim().min(1).max(128).default(d.LIVE_BACKEND_MODEL),backendPrompt:k,reasoningEffort:e.effortSchema.nullable().default("low"),webSearch:b.z.boolean().default(!0),readSkills:b.z.boolean().default(!1)}),m=l.parse({});a.s(["LIVE_BACKEND_MODELS",0,j,"LIVE_DEFAULTS",0,m,"LIVE_LINES",0,h,"LIVE_PLAN_VOICES",0,["cove","juniper","maple","spruce","ember","vale","breeze","arbor","sol"],"LIVE_PROVIDER",0,g,"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,l,"liveLineOf",0,function(a,b,c){let d=a=>i(a,b,c);return a&&d(a)?a:h.find(d)??null},"liveLineReady",0,i,"voiceSamplePath",0,a=>`/voices/${a}.ogg`])},905441,a=>{"use strict";a.s(["DEFAULT_PERSONA",0,"sunny","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."}]])},478978,a=>{"use strict";var b=a.i(96340),c=a.i(61876),d=a.i(907602);let e=[b.LIVE_PROVIDER.apiKeyName],f={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},g={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"}},h="EXA_API_KEY",i="DEFAULT_MODEL",j="DEFAULT_EFFORT",k={key:i,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:c.TEXT_MODEL_PROVIDER_LIST.flatMap(a=>a.suggestModels.map(b=>({value:`${a.id}/${b.id}`,label:`${a.label} \xb7 ${b.label}`,needs:a.apiKeyName})))},l={key:j,label:"Default effort",effortOf:i,choices:c.EFFORTS.map(a=>({value:a,label:a,needs:i}))},m=a=>e.includes(a.apiKeyName),n=a=>!!a.signIn||(0,c.isCatalogProvider)(a.id),o=a=>({key:a.apiKeyName,label:a.label,provider:a.id,signIn:a.signIn,keysAt:a.keysAt,keyLooks:a.keyLooks}),p=[{id:"voice",title:"voice",hint:"calls run on this key, or on a paid GPT Subscription sign-in",section:"keys",require:"any",requireKeys:b.LIVE_LINES.map(a=>c.TEXT_MODEL_PROVIDERS[a].apiKeyName),note:"required for calls",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(m).map(o)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(n).map(o)},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(a=>!m(a)&&!n(a)).map(o)},{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:h,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:d.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:d.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:d.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:d.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:[k,l]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one; a paid GPT Subscription draws by itself",section:"models",require:"none",entries:Object.keys(f).map(a=>({key:f[a],...g[a],kind:a,choices:c.MEDIA_MODEL_PROVIDER_LIST.flatMap(b=>b.models[a].map(a=>({value:`${b.id}/${a.id}`,label:`${b.label} \xb7 ${a.label}`,needs:b.apiKeyName})))}))}],q=Object.fromEntries(p.flatMap(a=>a.entries).map(a=>[a.key,a]));p.flatMap(a=>a.entries.map(a=>a.key)),Object.fromEntries(p.flatMap(a=>a.entries).filter(a=>a.choices?.length).map(a=>[a.key,a.choices])),a.s(["CONFIG_ENTRIES",0,q,"CONFIG_GROUPS",0,p,"DEFAULT_EFFORT_KEY",0,j,"DEFAULT_MODEL_KEY",0,i,"EXA_API_KEY",0,h,"MEDIA_MODEL_KEYS",0,f,"VOICE_GROUP_ID",0,"voice","envWords",0,function(a){return`${a} is set in the environment the app started with — a .env or your shell — and that one is used over one saved here. Change or remove it there, then start the app again.`},"groupSatisfied",0,function(a,b){return"none"===a.require||(a.requireKeys??a.entries.map(a=>a.key)).some(b)},"isConfigFromEnv",0,function(a,b){return a?.some(a=>a.key===b&&a.env)??!1},"isConfigSet",0,function(a,b){return a?.some(a=>a.key===b&&a.set)??!1},"isConfigUnreadable",0,function(a,b){return a?.some(a=>a.key===b&&a.unreadable)??!1},"lostWords",0,function(a,b,c){return`${a} can't be unlocked any more: the .env in the data folder that unlocks it was lost or replaced${c?` (${c})`:""}. ${b}`},"mediaModelWords",0,a=>`${"image"===a?"an":"a"} ${a} model`])},404153,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fe924f7561a3ef74d2113f93e667775a557e2df89",b.callServer,void 0,b.findSourceMapURL,"setConfigAction");a.s(["setConfigAction",0,c])},907602,a=>{"use strict";let b="TELEGRAM_BOT_TOKEN",c="DISCORD_BOT_TOKEN",d="SLACK_APP_TOKEN",e="SLACK_BOT_TOKEN";a.s(["DISCORD_TOKEN_KEY",0,c,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[b],discord:[c],slack:[d,e]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,d,"SLACK_BOT_TOKEN_KEY",0,e,"TELEGRAM_TOKEN_KEY",0,b])},249890,a=>{"use strict";var b=a.i(156757);let c=b.z.object({start:b.z.number().nonnegative(),end:b.z.number().nonnegative(),text:b.z.string()});b.z.object({reason:b.z.string().max(128),seconds:b.z.number().nonnegative().nullable()}),a.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LIVE_HOSTED_TOOLS",0,{webSearch:{declare:{type:"web_search"},item:"web_search_call"}},"LIVE_MODEL",0,"gpt-live-1","LIVE_PLAN_MODEL",0,"gpt-live-1-codex","LiveFragmentSchema",0,c])},340345,a=>{"use strict";var b=a.i(164831);let c={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};c.node;let d=(0,b.default)(c);a.s(["ChevronsUpDown",0,d],340345)},158983,a=>{"use strict";var b=a.i(702918);a.s(["LoaderCircle",()=>b.default])}];
|
|
1
|
+
module.exports=[630342,a=>{"use strict";var b=a.i(187924);a.s([],627264),a.i(627264);var c=a.i(572131),d=a.i(722050),e=a.i(138939),f=a.i(925123),g=a.i(854662);let h=c.createContext(void 0);function i(a){let b=c.useContext(h);if(void 0===b&&!a)throw Error((0,g.default)(47));return b}var j=a.i(935112),k=a.i(417498),l=a.i(736069),m=a.i(524715),n=a.i(307436),o=a.i(14239),p=a.i(284204),q=a.i(717017),r=a.i(151943),s=a.i(82204);let t={...q.popupStoreSelectors,disabled:a=>a.disabled,instantType:a=>a.instantType,openMethod:a=>a.openMethod,openChangeReason:a=>a.openChangeReason,modal:a=>a.modal,focusManagerModal:a=>a.focusManagerModal,stickIfOpen:a=>a.stickIfOpen,titleElementId:a=>a.titleElementId,descriptionElementId:a=>a.descriptionElementId,openOnHover:a=>a.openOnHover,closeDelay:a=>a.closeDelay,adaptiveOrigin:a=>a.adaptiveOrigin};class u extends k.ReactStore{constructor(a,b,c){const d=new r.PopupTriggerMap;super(v(a,d,b,c),w(d),t)}setOpen=(a,b)=>{let c,d=b.reason===n.REASONS.triggerHover,e=b.reason===n.REASONS.triggerPress&&0===b.event.detail,f=!a&&(b.reason===n.REASONS.escapeKey||null==b.reason),g=(0,p.attachPreventUnmountOnClose)(b),h=this.select("activeTriggerId");if(a||b.reason!==n.REASONS.closePress||null!=b.trigger||null==h||(b.trigger=this.context.triggerElements.getById(h)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(a,b),b.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(a,b);let i=()=>{let c=(0,p.createPopupOpenState)(this.state,a,b.trigger,g());c.openChangeReason=b.reason,this.update(c)};d?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(s.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),j.flushSync(i)):i(),e?c="click":f?c="dismiss":b.reason===n.REASONS.focusOut&&(c="focus"),this.set("instantType",c)}}function v(a,b,c,d=!1){let e={...(0,q.createInitialPopupStoreState)(b,c,d),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...a};return e.open&&a?.mounted===void 0&&(e.mounted=!0),e}function w(a){return{popupRef:c.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:c.createRef(),beforeContentFocusGuardRef:c.createRef(),stickIfOpenTimeout:new l.Timeout,triggerElements:a}}var x=a.i(394552);let y=(0,d.fastComponent)(function({props:a}){var d;let e,{children:f,open:g,defaultOpen:i=!1,onOpenChange:j,onOpenChangeComplete:k,modal:l=!1,handle:m,triggerId:o,defaultTriggerId:q=null}=a,r=(d={modal:l,open:i,openProp:g,activeTriggerId:q,triggerIdProp:o},e=(0,p.usePopupRootStore)((a,b)=>new u(d,a,b)),c.useEffect(()=>e.context.stickIfOpenTimeout.disposeEffect(),[e]),e);r.useControlledProp("openProp",g),r.useControlledProp("triggerIdProp",o);let s=r.useState("open"),t=r.useState("mounted"),v=r.useState("payload");r.useContextCallback("onOpenChange",j),r.useContextCallback("onOpenChangeComplete",k),(0,p.usePopupRootSync)(r,s),(0,p.useImplicitActiveTrigger)(r);let{forceUnmount:w}=(0,p.useOpenStateTransitions)(s,r,()=>{r.update({stickIfOpen:!0,openChangeReason:null})});r.useSyncedValues({modal:l}),c.useEffect(()=>{s||r.context.stickIfOpenTimeout.clear()},[r,s]),c.useImperativeHandle(a.actionsRef,()=>({unmount:w,close:()=>r.setOpen(!1,(0,x.createChangeEventDetails)(n.REASONS.imperativeAction))}),[w,r]);let y=s||t;return(0,b.jsxs)(h.Provider,{value:r,children:[m&&(0,b.jsx)(p.PopupHandleAttachment,{handle:m,store:r}),y&&(0,b.jsx)(z,{store:r,modal:l}),"function"==typeof f?f({payload:v}):f]})});function z({store:a,modal:b}){let c=a.useState("floatingRootContext"),d=(0,e.useDismiss)(c,{outsidePressEvent:{mouse:"trap-focus"===b?"sloppy":"intentional",touch:"sloppy"}}),f=d.reference,g=d.floating;return(0,p.usePopupInteractionProps)(a,{activeTriggerProps:f,inactiveTriggerProps:f,popupProps:g}),null}var A=a.i(221436),B=a.i(304478),C=a.i(926184),D=a.i(25003),E=a.i(331973),F=a.i(705735),G=a.i(300557),H=a.i(261394),I=a.i(497151),J=a.i(793332),K=a.i(629752);let L=(0,d.fastComponentRef)(function(a,d){let{render:e,className:f,style:h,disabled:j=!1,nativeButton:k=!0,handle:l,payload:m,openOnHover:o=!1,delay:q=300,closeDelay:r=0,id:t,...u}=a,v=i(!0),w=(0,I.usePopupHandleStore)(l)??v;if(!w)throw Error((0,g.default)(74));let x=(0,G.useBaseUiId)(t),y=w.useState("isTriggerActive",x),z=w.useState("floatingRootContext"),L=w.useState("isOpenedByTrigger",x),M=w.useState("triggerPopupId",x),N=c.useRef(null),{registerTrigger:O,isMountedByThisTrigger:P}=(0,p.useTriggerDataForwarding)(x,N,w,{payload:m,disabled:j,openOnHover:o,closeDelay:r}),Q=w.useState("openChangeReason"),R=w.useState("stickIfOpen"),S=w.useState("openMethod"),T=w.useState("focusManagerModal"),U=(0,F.useHoverReferenceInteraction)(z,{enabled:!j&&o&&("touch"!==S||Q!==n.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,D.safePolygon)(),restMs:q,delay:{close:r},triggerElementRef:N,isActiveTrigger:y,isClosing:()=>"ending"===w.select("transitionStatus")}),V=(0,E.useClick)(z,{stickIfOpen:R}),W=(0,K.useOpenMethodTriggerProps)(()=>w.select("open"),a=>{w.set("openMethod",a)}),X=w.useState("triggerProps",P),{getButtonProps:Y,buttonRef:Z}=(0,A.useButton)({disabled:j,native:k}),{preFocusGuardRef:$,handlePreFocusGuardFocus:_,handleFocusTargetFocus:aa}=(0,J.useTriggerFocusGuards)(w,N),ab=(0,C.useRenderElement)("button",a,{state:{disabled:j,open:L},ref:[Z,d,O,N],props:[V.reference,U,X,W,{[s.CLICK_TRIGGER_IDENTIFIER]:"",id:x,"aria-haspopup":"dialog","aria-expanded":L,"aria-controls":M},u,Y],stateAttributesMapping:{open:a=>a&&Q===n.REASONS.triggerPress?B.pressableTriggerOpenStateMapping.open(a):B.triggerOpenStateMapping.open(a)}}),ac=(0,b.jsx)(c.Fragment,{children:ab},x);return P&&!T?(0,b.jsxs)(c.Fragment,{children:[(0,b.jsx)(H.FocusGuard,{ref:$,onFocus:_}),ac,(0,b.jsx)(H.FocusGuard,{ref:w.context.triggerFocusTargetRef,onFocus:aa})]}):ac});var M=a.i(354098);let N=c.createContext(void 0),O=c.forwardRef(function(a,c){let{keepMounted:d=!1,...e}=a;return i().useState("mounted")||d?(0,b.jsx)(N.Provider,{value:d,children:(0,b.jsx)(M.FloatingPortal,{ref:c,...e})}):null});var P=a.i(454125),Q=a.i(357738);let R=c.createContext(void 0);function S(){let a=c.useContext(R);if(!a)throw Error((0,g.default)(46));return a}var T=a.i(844871),U=a.i(330076),V=a.i(443125),W=a.i(456011),X=a.i(402968);let Y=c.forwardRef(function(a,d){let{render:e,className:h,style:j,anchor:k,positionMethod:l,side:m,align:o,sideOffset:p,alignOffset:q,collisionBoundary:r="clipping-ancestors",collisionPadding:t,arrowPadding:u,sticky:v,disableAnchorTracking:w=!1,collisionAvoidance:x=s.POPUP_COLLISION_AVOIDANCE,...y}=a,z=i(),A=function(){let a=c.useContext(N);if(void 0===a)throw Error((0,g.default)(45));return a}(),B=(0,f.useFloatingNodeId)(),C=z.useState("floatingRootContext"),D=z.useState("mounted"),E=z.useState("open"),F=z.useState("openChangeReason"),G=z.useState("activeTriggerElement"),H=z.useState("modal"),I=z.useState("openMethod"),J=z.useState("positionerElement"),K=z.useState("instantType"),L=z.useState("transitionStatus"),M=z.useState("adaptiveOrigin"),O=c.useRef(null),S=(0,V.useAnimationsFinished)(J),Y=(0,T.useAnchorPositioning)({anchor:k,floatingRootContext:C,positionMethod:l,mounted:D,side:m,sideOffset:p,align:o,alignOffset:q,arrowPadding:u,collisionBoundary:r,collisionPadding:t,sticky:v,disableAnchorTracking:w,keepMounted:A,nodeId:B,collisionAvoidance:x,adaptiveOrigin:M}),Z=C.useState("domReferenceElement");(0,Q.useIsoLayoutEffect)(()=>{let a=O.current;if(Z&&(O.current=Z),a&&Z&&Z!==a){z.set("instantType",void 0);let a=new AbortController;return S(()=>{z.set("instantType","trigger-change")},a.signal),()=>{a.abort()}}},[Z,S,z]);let $=!0===H&&F!==n.REASONS.triggerHover;(0,X.useAnchoredPopupScrollLock)(E&&$,"touch"===I,J,G);let _=z.useStateSetter("positionerElement"),aa={open:E,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,instant:K},ab=(0,W.usePositioner)(a,aa,{styles:Y.positionerStyles,transitionStatus:L,props:y,refs:[d,_],hidden:!D,inert:!E});return(0,b.jsxs)(R.Provider,{value:Y,children:[D&&$&&(0,b.jsx)(U.InternalBackdrop,{inert:(0,P.inertValue)(!E),cutout:G}),(0,b.jsx)(f.FloatingNode,{id:B,children:ab})]})});var Z=a.i(426476),$=a.i(150687),_=a.i(181673),aa=a.i(305687),ab=a.i(669649),ac=a.i(19416),ad=a.i(3861),ae=a.i(854401);let af=c.createContext(void 0),ag=c.forwardRef(function(a,d){let{render:e,className:f,style:g,initialFocus:h,finalFocus:j,...k}=a,l=i(),m=S(),o=null!=(0,ac.useToolbarRootContext)(!0),{context:q,hasClosePart:r}=function(){let[a,b]=c.useState(0),d=(0,ae.useStableCallback)(()=>(b(a=>a+1),()=>{b(a=>Math.max(0,a-1))}));return{context:c.useMemo(()=>({register:d}),[d]),hasClosePart:a>0}}(),s=l.useState("open"),t=l.useState("openMethod"),u=l.useState("instantType"),v=l.useState("transitionStatus"),w=l.useState("popupProps"),x=l.useState("titleElementId"),y=l.useState("descriptionElementId"),z=l.useState("modal"),A=l.useState("mounted"),D=l.useState("openChangeReason"),E=l.useState("activeTriggerElement"),F=l.useState("floatingRootContext"),G=F.useState("floatingId"),H=l.useState("disabled"),I=l.useState("openOnHover"),J=l.useState("closeDelay");(0,aa.useOpenChangeComplete)({open:s,ref:l.context.popupRef,onComplete(){s&&l.context.onOpenChangeComplete?.(!0)}}),(0,_.useHoverFloatingInteraction)(F,{enabled:I&&!H,closeDelay:J});let K=void 0===h?(0,p.createDefaultInitialFocus)(l.context.popupRef):h,L=!1!==z&&r;l.useSyncedValue("focusManagerModal",L);let M=l.useStateSetter("popupElement"),N={open:s,side:m.side,align:m.align,instant:u,transitionStatus:v},O=(0,C.useRenderElement)("div",a,{state:N,ref:[d,l.context.popupRef,M],props:[w,{id:G,role:"dialog",...p.FOCUSABLE_POPUP_PROPS,"aria-labelledby":x,"aria-describedby":y,onKeyDown(a){o&&ab.COMPOSITE_KEYS.has(a.key)&&a.stopPropagation()}},(0,ad.getDisabledMountTransitionStyles)(v),k],stateAttributesMapping:B.popupTransitionStateMapping});return(0,b.jsx)($.FloatingFocusManager,{context:F,openInteractionType:t,modal:L,disabled:!A||D===n.REASONS.triggerHover,initialFocus:K,returnFocus:j,restoreFocus:"popup",previousFocusableElement:(0,Z.isHTMLElement)(E)?E:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,b.jsx)(af.Provider,{value:q,children:O})})}),ah=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i().useState("open"),{arrowRef:h,side:j,align:k,arrowUncentered:l,arrowStyles:m}=S();return(0,C.useRenderElement)("div",a,{state:{open:g,side:j,align:k,uncentered:l},ref:[b,h],props:[{style:m,"aria-hidden":!0},f],stateAttributesMapping:B.popupStateMapping})}),ai=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=g.useState("open"),j=g.useState("mounted"),k=g.useState("transitionStatus"),l=g.useState("openChangeReason");return(0,C.useRenderElement)("div",a,{state:{open:h,transitionStatus:k},ref:b,props:[{role:"presentation",hidden:!j,style:{pointerEvents:l===n.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},f],stateAttributesMapping:B.popupTransitionStateMapping})}),aj=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=(0,G.useBaseUiId)(f.id);return g.useSyncedValueWithCleanup("titleElementId",h),(0,C.useRenderElement)("h2",a,{ref:b,props:[{id:h},f]})}),ak=c.forwardRef(function(a,b){let{render:c,className:d,style:e,...f}=a,g=i(),h=(0,G.useBaseUiId)(f.id);return g.useSyncedValueWithCleanup("descriptionElementId",h),(0,C.useRenderElement)("p",a,{ref:b,props:[{id:h},f]})}),al=c.forwardRef(function(a,b){let d,{render:e,className:f,style:g,disabled:h=!1,nativeButton:j=!0,...k}=a,{buttonRef:l,getButtonProps:m}=(0,A.useButton)({disabled:h,focusableWhenDisabled:!1,native:j}),o=i();return d=c.useContext(af),(0,Q.useIsoLayoutEffect)(()=>d?.register(),[d]),(0,C.useRenderElement)("button",a,{ref:[b,l],props:[{onClick(a){o.setOpen(!1,(0,x.createChangeEventDetails)(n.REASONS.closePress,a.nativeEvent))}},k,m]})});var am=a.i(362092);let an=c.forwardRef(function(a,b){let{render:c,className:d,style:e,children:f,...g}=a,h=i(),{side:j}=S(),k=h.useState("instantType"),{children:l,state:m}=(0,am.usePopupViewport)({store:h,side:j,children:f}),n={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:k};return(0,C.useRenderElement)("div",a,{state:n,ref:b,props:[g,{children:l}],stateAttributesMapping:am.popupViewportStateMapping})});var ao=a.i(4675);class ap extends ao.BasePopupHandle{constructor(){super(function(){let a=new r.PopupTriggerMap;return Object.assign(new o.NullStore(Object.freeze(v(void 0,a)),Object.freeze(w(a)),t),{setOpen:m.NOOP})}(),"Popover")}open(a){this.openByTrigger(a)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}a.s(["Arrow",0,ah,"Backdrop",0,ai,"Close",0,al,"Description",0,ak,"Handle",0,ap,"Popup",0,ag,"Portal",0,O,"Positioner",0,Y,"Root",0,function(a){return i(!0)?(0,b.jsx)(y,{props:a}):(0,b.jsx)(f.FloatingTree,{children:(0,b.jsx)(y,{props:a})})},"Title",0,aj,"Trigger",0,L,"Viewport",0,an,"createHandle",0,function(){return new ap}],536179);var aq=a.i(536179),aq=aq,ar=a.i(497895);a.s(["Popover",0,function({...a}){return(0,b.jsx)(aq.Root,{"data-slot":"popover",...a})},"PopoverContent",0,function({className:a,align:c="center",alignOffset:d=0,side:e="bottom",sideOffset:f=4,...g}){return(0,b.jsx)(aq.Portal,{children:(0,b.jsx)(aq.Positioner,{align:c,alignOffset:d,side:e,sideOffset:f,className:"isolate z-50",children:(0,b.jsx)(aq.Popup,{"data-slot":"popover-content",className:(0,ar.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),...g})})})},"PopoverTrigger",0,function({...a}){return(0,b.jsx)(aq.Trigger,{"data-slot":"popover-trigger",...a})}],630342)},852307,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(340695),e=a.i(864037),f=a.i(287702),g=a.i(405050);let h=(0,g.createServerReference)("7fd51354043b3edf7465039573d2a3542c56a6b7e6",g.callServer,void 0,g.findSourceMapURL,"startChatGptSignInAction");var i=a.i(313237);a.s(["ChatGptSignIn",0,function({variant:a,size:g,className:j,label:k="Sign in with ChatGPT"}){let[l,m]=(0,c.useState)(!1),n=(0,c.useRef)(null),o=()=>{n.current&&clearInterval(n.current),n.current=null};(0,c.useEffect)(()=>o,[]);let[p,q]=(0,i.useServerAction)(h,{onOk:a=>{let b,c=((b=window.open(a,"thursday-chatgpt","popup,width=520,height=720"))||e.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"}),b);if(!c)return;m(!0),o();let d=Date.now()+f.CHATGPT_SIGN_IN.waitMs;n.current=setInterval(()=>{!c.closed&&Date.now()<d||(o(),m(!1))},700)}});return(0,b.jsx)(d.Button,{variant:a,size:g,className:j,loading:q||l,onClick:()=>p(),children:k})}],852307)},379630,a=>{"use strict";var b=a.i(187924);function c({className:a}){return(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:a,width:"24",children:[(0,b.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,b.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,b.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,b.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,b.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function d({className:a}){return(0,b.jsxs)("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("title",{children:"OpenAI icon"}),(0,b.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})}function e({className:a}){return(0,b.jsxs)("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 35 33",children:[(0,b.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,b.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})}function f({className:a}){return(0,b.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:a,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,b.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,b.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,b.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,b.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,b.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,b.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,b.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,b.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,b.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,b.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,b.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,b.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})}function g({className:a}){return(0,b.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:a,children:(0,b.jsx)("g",{children:(0,b.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}let h={mistral:[{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"},{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"},{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"},{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"},{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"}],groq:[{d:"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"}],cerebras:[{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z",fill:"#F15A29"},{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"}],togetherai:[{d:"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z",fill:"#EF2CC1"},{d:"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z",fill:"#CAAEF5"},{d:"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z",fill:"#FC4C02"}],fireworks:[{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z",fill:"#5019C5"}],deepinfra:[{d:"M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z",fill:"#2A3275"},{d:"M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z",fill:"#5699DB"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",fill:"#39594D"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",fill:"#D18EE2"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",fill:"#FF7759"}],openrouter:[{d:"M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"}]};a.s(["ProviderIcon",0,function({className:a,provider:i}){if(i in h)return(0,b.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:h[i].map(a=>(0,b.jsx)("path",{d:a.d,fill:a.fill},a.d))});let j=(a=>{switch(a){case"anthropic":return f;case"google":return c;case"openai":case"chatgpt":return d;case"vercel-ai-gateway":return g;case"xai":return e}})(i);return(0,b.jsx)(j,{className:a})}],379630)},96340,a=>{"use strict";var b=a.i(156757),c=a.i(287702),d=a.i(249890),e=a.i(61876),f=a.i(905441);let g={id:"openai",label:"OpenAI",apiKeyName:e.TEXT_MODEL_PROVIDERS.openai.apiKeyName},h=["chatgpt","openai"];function i(a,b,c){return!!b(e.TEXT_MODEL_PROVIDERS[a].apiKeyName)&&("chatgpt"!==a||(0,e.planCallsOf)({plan:c}))}let j=e.TEXT_MODEL_PROVIDERS.openai.suggestModels,k=b.z.string().max(c.COMMON_VALIDATE.prompt.max).default(""),l=b.z.object({voice:b.z.string().trim().min(1).max(128).default("marin"),planVoice:b.z.string().trim().min(1).max(128).default("cove"),runsOn:b.z.enum(h).nullable().default(null),persona:b.z.string().trim().min(1).max(64).default(f.DEFAULT_PERSONA),stylePrompt:k,backendModel:b.z.string().trim().min(1).max(128).default(d.LIVE_BACKEND_MODEL),backendPrompt:k,reasoningEffort:e.effortSchema.nullable().default("low"),webSearch:b.z.boolean().default(!0),readSkills:b.z.boolean().default(!1)}),m=l.parse({});a.s(["LIVE_BACKEND_MODELS",0,j,"LIVE_DEFAULTS",0,m,"LIVE_LINES",0,h,"LIVE_PLAN_VOICES",0,["cove","juniper","maple","spruce","ember","vale","breeze","arbor","sol"],"LIVE_PROVIDER",0,g,"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,l,"liveLineOf",0,function(a,b,c){let d=a=>i(a,b,c);return a&&d(a)?a:h.find(d)??null},"liveLineReady",0,i,"voiceSamplePath",0,a=>`/voices/${a}.ogg`])},905441,a=>{"use strict";a.s(["DEFAULT_PERSONA",0,"sunny","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."}]])},478978,a=>{"use strict";var b=a.i(96340),c=a.i(61876),d=a.i(907602);let e=[b.LIVE_PROVIDER.apiKeyName],f={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},g={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"}},h="EXA_API_KEY",i="DEFAULT_MODEL",j="DEFAULT_EFFORT",k={key:i,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:c.TEXT_MODEL_PROVIDER_LIST.flatMap(a=>a.suggestModels.map(b=>({value:`${a.id}/${b.id}`,label:`${a.label} \xb7 ${b.label}`,needs:a.apiKeyName})))},l={key:j,label:"Default effort",effortOf:i,choices:c.EFFORTS.map(a=>({value:a,label:a,needs:i}))},m=a=>e.includes(a.apiKeyName),n=a=>!!a.signIn||(0,c.isCatalogProvider)(a.id),o=a=>({key:a.apiKeyName,label:a.label,provider:a.id,signIn:a.signIn,keysAt:a.keysAt,keyLooks:a.keyLooks}),p=[{id:"voice",title:"voice",hint:"calls run on this key, or on a paid GPT Subscription sign-in",section:"keys",require:"any",requireKeys:b.LIVE_LINES.map(a=>c.TEXT_MODEL_PROVIDERS[a].apiKeyName),note:"calls need this or the GPT Subscription",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(m).map(o)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(n).map(o)},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:c.TEXT_MODEL_PROVIDER_LIST.filter(a=>!m(a)&&!n(a)).map(o)},{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:h,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:d.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:d.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:d.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:d.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:[k,l]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one; a paid GPT Subscription draws by itself",section:"models",require:"none",entries:Object.keys(f).map(a=>({key:f[a],...g[a],kind:a,choices:c.MEDIA_MODEL_PROVIDER_LIST.flatMap(b=>b.models[a].map(a=>({value:`${b.id}/${a.id}`,label:`${b.label} \xb7 ${a.label}`,needs:b.apiKeyName})))}))}],q=Object.fromEntries(p.flatMap(a=>a.entries).map(a=>[a.key,a]));p.flatMap(a=>a.entries.map(a=>a.key)),Object.fromEntries(p.flatMap(a=>a.entries).filter(a=>a.choices?.length).map(a=>[a.key,a.choices])),a.s(["CONFIG_ENTRIES",0,q,"CONFIG_GROUPS",0,p,"DEFAULT_EFFORT_KEY",0,j,"DEFAULT_MODEL_KEY",0,i,"EXA_API_KEY",0,h,"MEDIA_MODEL_KEYS",0,f,"VOICE_GROUP_ID",0,"voice","envWords",0,function(a){return`${a} is set in the environment the app started with — a .env or your shell — and that one is used over one saved here. Change or remove it there, then start the app again.`},"groupSatisfied",0,function(a,b){return"none"===a.require||(a.requireKeys??a.entries.map(a=>a.key)).some(b)},"isConfigFromEnv",0,function(a,b){return a?.some(a=>a.key===b&&a.env)??!1},"isConfigSet",0,function(a,b){return a?.some(a=>a.key===b&&a.set)??!1},"isConfigUnreadable",0,function(a,b){return a?.some(a=>a.key===b&&a.unreadable)??!1},"lostWords",0,function(a,b,c){return`${a} can't be unlocked any more: the .env in the data folder that unlocks it was lost or replaced${c?` (${c})`:""}. ${b}`},"mediaModelWords",0,a=>`${"image"===a?"an":"a"} ${a} model`])},564117,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f18a846997eb8786e17eee3f41f88253f5ba2ca5b",b.callServer,void 0,b.findSourceMapURL,"setConfigAction");a.s(["setConfigAction",0,c])},907602,a=>{"use strict";let b="TELEGRAM_BOT_TOKEN",c="DISCORD_BOT_TOKEN",d="SLACK_APP_TOKEN",e="SLACK_BOT_TOKEN";a.s(["DISCORD_TOKEN_KEY",0,c,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[b],discord:[c],slack:[d,e]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,d,"SLACK_BOT_TOKEN_KEY",0,e,"TELEGRAM_TOKEN_KEY",0,b])},249890,a=>{"use strict";var b=a.i(156757);let c=b.z.object({start:b.z.number().nonnegative(),end:b.z.number().nonnegative(),text:b.z.string()});b.z.object({reason:b.z.string().max(128),seconds:b.z.number().nonnegative().nullable()}),a.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LIVE_HOSTED_TOOLS",0,{webSearch:{declare:{type:"web_search"},item:"web_search_call"}},"LIVE_MODEL",0,"gpt-live-1","LIVE_PLAN_MODEL",0,"gpt-live-1-codex","LiveFragmentSchema",0,c])},340345,a=>{"use strict";var b=a.i(164831);let c={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};c.node;let d=(0,b.default)(c);a.s(["ChevronsUpDown",0,d],340345)},158983,a=>{"use strict";var b=a.i(702918);a.s(["LoaderCircle",()=>b.default])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0eprrig._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[703228,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(263359),f=a.i(444080),g=a.i(707963),h=a.i(141146),i=a.i(998697),j=a.i(483138),k=a.i(69095),l=a.i(663741),m=a.i(696732),n=a.i(403512),o=a.i(233540),p=a.i(917256),q=a.i(951675),r=a.i(201661),s=a.i(572131),t=a.i(767561),u=a.i(340695),v=a.i(316474),w=a.i(205522),x=a.i(846991),y=a.i(446181),z=a.i(950463),A=a.i(280281),B=a.i(621958),C=a.i(546893),D=a.i(287702),E=a.i(619477),F=a.i(773538),G=a.i(777497),H=a.i(30207),I=a.i(770256),J=a.i(999891),K=a.i(102410),L=a.i(313237),M=a.i(759497),N=a.i(497895),O=b([x]);[x]=O.then?(await O)():O;let Y={artifact:l.Frame,browser:m.Globe,computer:e.AppWindow,"find-skills":o.Search,"skill-creator":p.SquarePen};function P({skill:a}){let[b,c]=(0,L.useServerAction)(G.deleteSkillAction,{onOk:()=>(0,M.revalidate)(t.queryKey.skills)}),[e]=(0,L.useServerAction)(H.setSkillDisabledAction,{onOk:()=>(0,M.revalidate)(t.queryKey.skills)}),g=async()=>{await y.notify.confirm({title:`Delete ${a.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&b(a.source,a.dir)},i="default"===a.source&&Y[a.dir]||f.BookMarked;return(0,d.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{var b;return b=a,y.notify.component({className:"sm:max-w-4xl",renderer:({guard:a})=>(0,d.jsx)(Q,{skill:b,guard:a})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)("span",{className:(0,N.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",a.disabled&&"opacity-45"),children:(0,d.jsx)(i,{className:"size-4"})}),(0,d.jsxs)("span",{className:(0,N.cn)("min-w-0 flex-1 space-y-0.5",a.disabled&&"opacity-45"),children:[(0,d.jsx)("span",{className:"block truncate text-sm font-medium",children:a.name}),(0,d.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:(0,K.firstSentence)(a.description)})]}),(0,d.jsx)(h.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,d.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,d.jsx)(A.Switch,{checked:!a.disabled,onCheckedChange:b=>e(a.source,a.dir,!b),"aria-label":`${a.name} on or off`,className:"shrink-0"}),(0,K.isEditableSource)(a.source)?(0,d.jsx)(u.Button,{size:"icon-sm",variant:"ghost",loading:c,onClick:g,"aria-label":`Delete ${a.name}`,className:"shrink-0 text-muted-foreground",children:(0,d.jsx)(q.Trash2,{})}):(0,d.jsx)("span",{className:"size-7 shrink-0"})]})]})}function Q({skill:a,guard:b}){let[c,e]=(0,s.useState)(""),[f,h]=(0,s.useState)("SKILL.md"),i=(0,s.useRef)(!1);(0,s.useEffect)(()=>b(()=>i.current),[b]);let j=async a=>{let b=c?`${c}/${a.name}`:a.name;"dir"===a.kind?e(b):b===f||(!i.current||await y.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${f?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(i.current=!1,h(b))};return(0,d.jsx)(E.SettingDialogContent,{title:a.name,description:(0,d.jsx)(R,{skill:a,path:f??c}),children:(0,d.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,d.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[c&&(0,d.jsxs)("button",{type:"button",onClick:()=>e(c.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(g.ChevronLeft,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:c.split("/").pop()})]}),(0,d.jsx)(T,{source:a.source,dir:a.dir,path:c,current:f,onPick:j})]}),(0,d.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:f?(0,d.jsx)(V,{source:a.source,dir:a.dir,path:f,editable:(0,K.isEditableSource)(a.source),onUnsaved:a=>{i.current=a}},f):(0,d.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function R({skill:a,path:b}){if(!a)return(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let c=[a.name,...b.split("/").filter(Boolean)];return(0,d.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:c.map((a,b)=>(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[b>0&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,d.jsx)("span",{className:(0,N.cn)("truncate",b===c.length-1&&"text-foreground"),children:a})]},`${b}-${a}`))})}function S({icon:a,label:b,active:c,hasChildren:e,onClick:f}){return(0,d.jsxs)("button",{type:"button",onClick:f,className:(0,N.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?E.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,d.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:a}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:b}),e&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function T({source:a,dir:b,path:c,current:e,onPick:f}){let{data:g,isLoading:h,error:l}=(0,M.useServerRoute)(t.queryKey.skillNode(a,b,c));return l?(0,d.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:l.message}):h||!g?(0,d.jsxs)("div",{className:"space-y-2 p-2",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==g.kind?null:(0,d.jsxs)(d.Fragment,{children:[g.entries.map(a=>(0,d.jsx)(S,{icon:"dir"===a.kind?(0,d.jsx)(k.Folder,{}):a.name.endsWith(".md")?(0,d.jsx)(j.FileText,{}):(0,d.jsx)(i.File,{}),label:a.name,hasChildren:"dir"===a.kind,active:(c?`${c}/${a.name}`:a.name)===e,onClick:()=>f(a)},a.name)),0===g.entries.length&&(0,d.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function U({content:a,description:b}){let c=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(a),e=b?.trim(),f=c?a.slice(c[0].length):a;return(0,d.jsxs)("div",{className:"min-w-0",children:[e&&(0,d.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:e}),(0,d.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,d.jsx)(x.Markdown,{children:f})})]})}function V({source:a,dir:b,path:c,editable:e,onUnsaved:f}){let[g,h]=(0,s.useState)(null),{data:i,isLoading:j,error:k}=(0,M.useServerRoute)(t.queryKey.skillNode(a,b,c)),l=null!==g&&(i?.kind!=="file"||g!==i.content);(0,s.useEffect)(()=>f?.(l),[l,f]);let[m,n]=(0,L.useServerAction)(J.writeSkillFileAction,{okMessage:"Saved",onOk:()=>{h(null),(0,M.revalidate)(t.queryKey.skills)}});if(k)return(0,d.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:k.message});if(j||!i)return(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==i.kind)return null;let o=c.split("/").pop()??"";return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,d.jsx)("span",{className:"truncate",children:o}),(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,d.jsx)("span",{children:(0,N.formatBytes)(i.size)}),e&&null!==i.content&&null===g&&(0,d.jsxs)(u.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>h(i.content??""),children:[(0,d.jsx)(p.SquarePen,{}),"Edit"]}),null!==g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>h(null),children:"Cancel"}),(0,d.jsx)(u.Button,{size:"xs",className:"font-mono",loading:n,disabled:g===i.content,onClick:()=>m(a,b,c,g),children:"Save"})]})]})]}),null!==g?(0,d.jsx)(C.Textarea,{value:g,onChange:a=>h(a.target.value),spellCheck:!1,"aria-label":`${o} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===i.content?(0,d.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:i.size>D.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):o.toLowerCase().endsWith(".md")?(0,d.jsx)(U,{content:i.content,description:i.description}):(0,d.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:i.content})]})}function W(){return y.notify.component({className:"sm:max-w-lg",renderer:({close:a,guard:b})=>(0,d.jsx)(X,{onDone:a,guard:b})})}function X({onDone:a,guard:b}){let[c,e]=(0,s.useState)("write"),[f,g]=(0,s.useState)(""),[h,i]=(0,s.useState)(""),[j,k]=(0,s.useState)(""),[l,m]=(0,s.useState)(null),[o,p]=(0,s.useState)(!1),q=(0,s.useRef)(null),x=(0,s.useRef)(!1);x.current=!!(f.trim()||h.trim()||j.trim()||l),(0,s.useEffect)(()=>b(()=>x.current),[b]);let y={errorMessage:!1,onOk:()=>{(0,M.revalidate)(t.queryKey.skills),a()}},[z,A,,G]=(0,L.useServerAction)(F.createSkillAction,y),[H,J,,K]=(0,L.useServerAction)(I.uploadSkillAction,y),O=A||J,P="write"===c?G:K,Q=null!==l&&l.size>D.SKILL_FILES.uploadBytes,R=Math.round(D.SKILL_FILES.uploadBytes/1024/1024),S=!O&&("write"===c?f.trim()&&h.trim()&&j.trim():null!==l&&!Q),T=async()=>{if(!S)return;if("write"===c)return void z({name:f.trim(),description:h.trim(),content:j});if(!l)return;let a=new FormData;a.append("file",l),H(a)},U=a=>{let b=a?.[0]??null;b&&m(b)};return(0,d.jsxs)(E.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.Button,{variant:"ghost",onClick:a,children:"Cancel"}),(0,d.jsxs)(u.Button,{disabled:!S,loading:O,onClick:T,children:[!O&&("write"===c?(0,d.jsx)(n.Plus,{}):(0,d.jsx)(r.Upload,{})),"write"===c?"Create":"Upload"]})]}),children:[(0,d.jsxs)(B.Tabs,{value:c,onValueChange:a=>e(a),children:[(0,d.jsxs)(B.TabsList,{className:"w-full",children:[(0,d.jsx)(B.TabsTrigger,{value:"write",children:"Write"}),(0,d.jsx)(B.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,d.jsxs)(B.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,d.jsxs)(v.FieldContent,{children:[(0,d.jsx)(w.Input,{id:"skill-name",value:f,onChange:a=>g(a.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,d.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[D.PATHS.skills.custom,"/",f.trim()||"…","/SKILL.md"]})]})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,d.jsx)(v.FieldContent,{children:(0,d.jsx)(w.Input,{id:"skill-description",value:h,onChange:a=>i(a.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,d.jsx)(C.Textarea,{id:"skill-content",value:j,onChange:a=>k(a.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,d.jsxs)(B.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>q.current?.click(),onDragOver:a=>{a.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:a=>{a.preventDefault(),p(!1),U(a.dataTransfer.files)},className:(0,N.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",o?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,d.jsx)(r.Upload,{className:"size-5 text-muted-foreground"}),l?(0,d.jsxs)("span",{className:"text-sm",children:[l.name,(0,d.jsxs)("span",{className:(0,N.cn)("ml-2 font-mono text-[11px]",Q?"text-destructive":"text-muted-foreground"),children:[(0,N.formatBytes)(l.size),Q&&` \xb7 over ${R} MB`]})]}):(0,d.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,d.jsx)("input",{ref:q,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:a=>U(a.target.files)}),(0,d.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,d.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,d.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,d.jsxs)("p",{children:["Up to ",R," MB."]})]})]})]}),P&&(0,d.jsx)("p",{className:"font-mono text-xs text-destructive",children:P})]})}a.s(["SkillsSetting",0,function(){let[a,b]=(0,s.useState)(""),{data:c,isLoading:e,error:f}=(0,M.useServerRoute)(t.queryKey.skills),g=c??[];if(e)return(0,d.jsx)(E.SettingSkeleton,{rows:4});if(f)return(0,d.jsx)(E.SettingError,{message:f.message});let h=a.trim().toLowerCase(),i=g.filter(a=>!h||`${a.name} ${a.description}`.toLowerCase().includes(h)),j=g.filter(a=>!a.disabled).length,k=g.filter(a=>!a.disabled&&("default"===a.source||"custom"===a.source)).length,l=new Map;for(let a of i)a.bot&&l.set(a.bot,[...l.get(a.bot)??[],a]);return(0,d.jsxs)(E.SettingScreen,{footer:(0,d.jsxs)(E.SettingRailNote,{children:[g.filter(a=>!(0,K.isEditableSource)(a.source)).length," ","shipped ·"," ",g.filter(a=>(0,K.isEditableSource)(a.source)).length," ","installed"]}),children:[(0,d.jsx)(E.SettingToolbar,{count:`${j} on \xb7 ${g.length-j} off`,children:(0,d.jsx)(E.SettingFilter,{value:a,onChange:b,placeholder:"Filter skills"})}),(0,d.jsx)(E.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,d.jsx)(E.SettingItems,{addRow:{label:"Add skill",onClick:W},children:i.filter(a=>"custom"===a.source).map(a=>(0,d.jsx)(P,{skill:a},`custom/${a.dir}`))})}),[...l].map(([a,b])=>(0,d.jsx)(E.SettingGroup,{label:`${a}'s own`,hint:`only ${a} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,d.jsx)(E.SettingItems,{children:b.map(a=>(0,d.jsx)(P,{skill:a},`${a.source}/${a.dir}`))})},a)),(0,d.jsx)(E.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,d.jsx)(E.SettingItems,{children:i.filter(a=>"default"===a.source).map(a=>(0,d.jsx)(P,{skill:a},`default/${a.dir}`))})}),k>D.PROMPT_CROWDED.skills&&(0,d.jsxs)(E.SettingNote,{children:[k," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}]),c()}catch(a){c(a)}},!1),773538,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fa1262db695c5ebbfd00215bef94a4cc6da2edf11",b.callServer,void 0,b.findSourceMapURL,"createSkillAction");a.s(["createSkillAction",0,c])},777497,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fec00f822f5f2035683bb2e8714245e10e86f98c7",b.callServer,void 0,b.findSourceMapURL,"deleteSkillAction");a.s(["deleteSkillAction",0,c])},30207,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f92e6309284e6827dbb0afd1b0993128e3994cf54",b.callServer,void 0,b.findSourceMapURL,"setSkillDisabledAction");a.s(["setSkillDisabledAction",0,c])},770256,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f8257a569f9b2adeaafeb7f08994d8470df52826c",b.callServer,void 0,b.findSourceMapURL,"uploadSkillAction");a.s(["uploadSkillAction",0,c])},999891,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f5fd8c8fd0bd9de5680bde0acf705143b434d483a",b.callServer,void 0,b.findSourceMapURL,"writeSkillFileAction");a.s(["writeSkillFileAction",0,c])},102410,a=>{"use strict";var b=a.i(156757);b.z.union([b.z.enum(["custom","default"]),b.z.templateLiteral(["kit:",b.z.string().regex(/^[\p{L}\p{N}_-]+$/u)]),b.z.templateLiteral(["own:",b.z.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let c=b.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),d=b.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");b.z.object({name:d,description:b.z.string().trim().min(1,"Description is required"),metadata:b.z.record(b.z.string(),b.z.unknown()).optional(),disabled:b.z.boolean().optional(),platforms:b.z.array(b.z.string()).optional()}).extend({name:c,content:b.z.string().trim().min(1,"Content is required")}),a.s(["firstSentence",0,a=>a.trim().split(/(?<=[.。])\s|\n/)[0].trim(),"isEditableSource",0,a=>"custom"===a||a.startsWith("own:")])},663741,a=>{"use strict";var b=a.i(164831);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let d=(0,b.default)(c);a.s(["Frame",0,d],663741)},917256,a=>{"use strict";var b=a.i(164831);let c={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};c.node;let d=(0,b.default)(c);a.s(["SquarePen",0,d],917256)},201661,a=>{"use strict";var b=a.i(164831);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let d=(0,b.default)(c);a.s(["Upload",0,d],201661)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0flnog5._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[421042,a=>{"use strict";a.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",look_at_shared:"look_at_shared"}])},156819,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["RoutineMark",0,d],156819)},647509,a=>{"use strict";let b=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],c=b.length;function d(a,b){return f(.05,.42,a/b)}let e={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 f(a,b,c){let d=Math.min(1,Math.max(0,(c-a)/(b-a)));return d*d*(3-2*d)}Object.keys(e).filter(a=>!/^[A-Z0-9 ]$/.test(a)),a.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"FACE_WORD_MAX",0,8,"LETTERS",0,e,"LEVELS",0,c,"ORB_INK",0,{dark:[247,247,247],light:[10,10,10]},"RAMP",0,b,"emojiAlpha",0,function(a,b){return .06+.94*d(a,b)},"emojiPx",0,function(a,b,c){return a*(.5+.5*d(b,c))},"emojiWeight",0,d,"hash",0,function(a,b){let c=43758.5453*Math.sin(127.1*a+311.7*b);return c-Math.floor(c)},"smoothstep",0,f,"undrawable",0,function(a){return Array.from(a.toUpperCase()).find(a=>!(a in e))??null}])},663390,a=>{"use strict";let b;var c=a.i(572131);function d(){if(b)return b;let a=navigator,c=a.userAgentData?.platform||a.platform||"";return b=/mac|iphone|ipad|ipod/i.test(c)?"emoji":"letters"}let e=()=>()=>{};a.s(["faceGlyphs",0,d,"useFaceGlyphs",0,function(){return(0,c.useSyncExternalStore)(e,d,()=>"emoji")}])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{...k.READ_DEFAULTS,revalidateFirstPage:!1,...a.swr}),n=e??[],o=(0,b.useMemo)(()=>(e??[]).flat(),[e]),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});(0,b.useEffect)(()=>{t.current={isValidating:h,setSize:l,pages:n.length}});let u=(0,b.useCallback)(()=>m(),[m]),v=(0,k.resolveKey)(d(0,null)),w="string"==typeof v?v:v?.url;(0,b.useEffect)(()=>{if(w)return(0,k.registerPagedReader)({url:w,refresh:u})},[w,u]);let x=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:x,refresh:u}}],862966)},579587,801548,a=>{"use strict";let b="data-composite-item-active";a.s(["ACTIVE_COMPOSITE_ITEM",0,b],579587);var c=a.i(572131),d=a.i(524715),e=a.i(579923),f=a.i(854401),g=a.i(801811),h=a.i(357738),i=a.i(669649),j=a.i(796e3),k=a.i(30116),l=a.i(559539),m=a.i(926184),n=a.i(162903),o=a.i(187924);a.s(["CompositeRoot",0,function(a){let{render:p,className:q,style:r,refs:s=d.EMPTY_ARRAY,props:t=d.EMPTY_ARRAY,state:u=d.EMPTY_OBJECT,stateAttributesMapping:v,highlightedIndex:w,onHighlightedIndexChange:x,orientation:y,grid:z,loopFocus:A,onLoop:B,enableHomeAndEndKeys:C,onMapChange:D,stopEventPropagation:E=!0,rootRef:F,disabledIndices:G,modifierKeys:H,highlightItemOnHover:I=!1,tag:J="div",...K}=a,{props:L,highlightedIndex:M,onHighlightedIndexChange:N,elementsRef:O,onMapChange:P,relayKeyboardEvent:Q}=function(a){let{loopFocus:e=!0,orientation:l="both",grid:m,onLoop:n,direction:o,highlightedIndex:p,onHighlightedIndexChange:q,rootRef:r,enableHomeAndEndKeys:s=!1,stopEventPropagation:t,disabledIndices:u,modifierKeys:v=d.EMPTY_ARRAY}=a,[w,x]=c.useState(0),y=null!=m,z=c.useRef(null),A=(0,g.useMergedRefs)(z,r),B=c.useRef([]),C=c.useRef(!1),D=c.useRef(null),E=p??w,F=(0,f.useStableCallback)((a,b=!1)=>{if(D.current=B.current[a]??null,(q??x)(a),b){let b=B.current[a];(0,i.scrollIntoViewIfNeeded)(z.current,b,o,l)}}),G=(0,f.useStableCallback)(a=>{if(0===a.size)return;if(C.current){let a=B.current,c=a.indexOf(D.current);if(-1===c){let c=a[E];!c||(0,j.isListIndexDisabled)(a,E,u)?F(function(a,c){let d=-1;for(let e=0;e<a.length;e+=1){let f=a[e];if(!(!f||(0,j.isListIndexDisabled)(a,e,c))){if(f.hasAttribute(b))return e;-1===d&&(d=e)}}return Math.max(d,0)}(a,u)):D.current=c}else c!==E&&F(c);return}C.current=!0;let c=Array.from(a.keys()),d=c.find(a=>a?.hasAttribute(b))??null,e=d?a.get(d)?.index??-1:-1;if(-1!==e)F(e);else if((0,j.isListIndexDisabled)(c,E,u)){let a=(0,j.findNonDisabledListIndex)(c,{disabledIndices:u});(0,j.isIndexOutOfListBounds)(c,a)||F(a)}(0,i.scrollIntoViewIfNeeded)(z.current,d,o,l)});(0,h.useIsoLayoutEffect)(()=>{if(null==u||null!=p||!C.current)return;let a=B.current;if((0,j.isListIndexDisabled)(a,E,u)){let b=(0,j.findNonDisabledListIndex)(a,{disabledIndices:u});(0,j.isIndexOutOfListBounds)(a,b)||F(b)}},[u,p,E,B,F]);let H=(0,f.useStableCallback)((a,b,c)=>n?n(a,b,c,B):c),I=(0,f.useStableCallback)(a=>{let b=a.key===i.HOME||a.key===i.END;if(!i.COMPOSITE_KEYS.has(a.key)||!s&&b||function(a,b){for(let c of i.MODIFIER_KEYS)if(!b.includes(c)&&a.getModifierState(c))return!0;return!1}(a,v)||!z.current)return;let c="rtl"===o,d=c?i.ARROW_LEFT:i.ARROW_RIGHT,f=c?i.ARROW_RIGHT:i.ARROW_LEFT,g="vertical"===l?i.ARROW_DOWN:d,h="vertical"===l?i.ARROW_UP:f,p=(0,k.getTarget)(a.nativeEvent);if(null!=p&&(0,i.isNativeInput)(p)&&!(null==p||p.hasAttribute("disabled")||"true"===p.getAttribute("aria-disabled"))){let b=p.selectionStart,c=p.selectionEnd,d=p.value;if(null==b||a.shiftKey||b!==c||a.key!==h&&b<d.length||a.key!==g&&b>0)return}let q=E,r=(0,j.getMinListIndex)(B,u),w=(0,j.getMaxListIndex)(B,u);null!=m&&(q=m({disabledIndices:u,elementsRef:B,event:a,highlightedIndex:E,loopFocus:e,maxIndex:w,minIndex:r,onLoop:H,orientation:l,rtl:c}));let x="vertical"!==l&&a.key===d||"horizontal"!==l&&a.key===i.ARROW_DOWN,A="vertical"!==l&&a.key===f||"horizontal"!==l&&a.key===i.ARROW_UP;s&&(a.key===i.HOME?q=r:a.key===i.END&&(q=w)),q===E&&(x||A)&&(e&&q===w&&x?(q=r,n&&(q=n(a,E,q,B))):e&&q===r&&A?(q=w,n&&(q=n(a,E,q,B))):q=(0,j.findNonDisabledListIndex)(B.current,{startingIndex:q,decrement:A,disabledIndices:u})),q===E||(0,j.isIndexOutOfListBounds)(B.current,q)||(t&&a.stopPropagation(),(y||b||x||A)&&a.preventDefault(),F(q,!0),queueMicrotask(()=>{B.current[q]?.focus()}))});return{props:{ref:A,onFocus(a){let b=z.current,c=(0,k.getTarget)(a.nativeEvent);b&&null!=c&&(0,i.isNativeInput)(c)&&c.setSelectionRange(0,c.value.length)},onKeyDown:I},highlightedIndex:E,onHighlightedIndexChange:F,elementsRef:B,onMapChange:G,relayKeyboardEvent:I}}({grid:z,loopFocus:A,onLoop:B,orientation:y,highlightedIndex:w,onHighlightedIndexChange:x,rootRef:F,stopEventPropagation:E,enableHomeAndEndKeys:C,direction:(0,n.useDirection)(),disabledIndices:G,modifierKeys:H}),R=(0,m.useRenderElement)(J,a,{state:u,ref:s,props:[L,...t,K],stateAttributesMapping:v}),S=c.useMemo(()=>({highlightedIndex:M,onHighlightedIndexChange:N,highlightItemOnHover:I,relayKeyboardEvent:Q}),[M,N,I,Q]);return(0,o.jsx)(l.CompositeRootContext.Provider,{value:S,children:(0,o.jsx)(e.CompositeList,{elementsRef:O,onMapChange:a=>{D?.(a),P(a)},children:R})})}],801548)},444080,a=>{"use strict";var b=a.i(164831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["BookMarked",0,d],444080)},696732,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Globe",0,d],696732)},71215,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Image",0,d],71215)},126766,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],126766)},586446,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Video",0,d],586446)},924613,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Wrench",0,d],924613)}];
|
|
1
|
+
module.exports=[421042,a=>{"use strict";a.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"}])},156819,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["RoutineMark",0,d],156819)},647509,a=>{"use strict";let b=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],c=b.length;function d(a,b){return f(.05,.42,a/b)}let e={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 f(a,b,c){let d=Math.min(1,Math.max(0,(c-a)/(b-a)));return d*d*(3-2*d)}Object.keys(e).filter(a=>!/^[A-Z0-9 ]$/.test(a)),a.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"FACE_WORD_MAX",0,8,"LETTERS",0,e,"LEVELS",0,c,"ORB_INK",0,{dark:[247,247,247],light:[10,10,10]},"RAMP",0,b,"emojiAlpha",0,function(a,b){return .06+.94*d(a,b)},"emojiPx",0,function(a,b,c){return a*(.5+.5*d(b,c))},"emojiWeight",0,d,"hash",0,function(a,b){let c=43758.5453*Math.sin(127.1*a+311.7*b);return c-Math.floor(c)},"smoothstep",0,f,"undrawable",0,function(a){return Array.from(a.toUpperCase()).find(a=>!(a in e))??null}])},663390,a=>{"use strict";let b;var c=a.i(572131);function d(){if(b)return b;let a=navigator,c=a.userAgentData?.platform||a.platform||"";return b=/mac|iphone|ipad|ipod/i.test(c)?"emoji":"letters"}let e=()=>()=>{};a.s(["faceGlyphs",0,d,"useFaceGlyphs",0,function(){return(0,c.useSyncExternalStore)(e,d,()=>"emoji")}])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{...k.READ_DEFAULTS,revalidateFirstPage:!1,...a.swr}),n=e??[],o=(0,b.useMemo)(()=>(e??[]).flat(),[e]),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});(0,b.useEffect)(()=>{t.current={isValidating:h,setSize:l,pages:n.length}});let u=(0,b.useCallback)(()=>m(),[m]),v=(0,k.resolveKey)(d(0,null)),w="string"==typeof v?v:v?.url;(0,b.useEffect)(()=>{if(w)return(0,k.registerPagedReader)({url:w,refresh:u})},[w,u]);let x=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:x,refresh:u}}],862966)},579587,801548,a=>{"use strict";let b="data-composite-item-active";a.s(["ACTIVE_COMPOSITE_ITEM",0,b],579587);var c=a.i(572131),d=a.i(524715),e=a.i(579923),f=a.i(854401),g=a.i(801811),h=a.i(357738),i=a.i(669649),j=a.i(796e3),k=a.i(30116),l=a.i(559539),m=a.i(926184),n=a.i(162903),o=a.i(187924);a.s(["CompositeRoot",0,function(a){let{render:p,className:q,style:r,refs:s=d.EMPTY_ARRAY,props:t=d.EMPTY_ARRAY,state:u=d.EMPTY_OBJECT,stateAttributesMapping:v,highlightedIndex:w,onHighlightedIndexChange:x,orientation:y,grid:z,loopFocus:A,onLoop:B,enableHomeAndEndKeys:C,onMapChange:D,stopEventPropagation:E=!0,rootRef:F,disabledIndices:G,modifierKeys:H,highlightItemOnHover:I=!1,tag:J="div",...K}=a,{props:L,highlightedIndex:M,onHighlightedIndexChange:N,elementsRef:O,onMapChange:P,relayKeyboardEvent:Q}=function(a){let{loopFocus:e=!0,orientation:l="both",grid:m,onLoop:n,direction:o,highlightedIndex:p,onHighlightedIndexChange:q,rootRef:r,enableHomeAndEndKeys:s=!1,stopEventPropagation:t,disabledIndices:u,modifierKeys:v=d.EMPTY_ARRAY}=a,[w,x]=c.useState(0),y=null!=m,z=c.useRef(null),A=(0,g.useMergedRefs)(z,r),B=c.useRef([]),C=c.useRef(!1),D=c.useRef(null),E=p??w,F=(0,f.useStableCallback)((a,b=!1)=>{if(D.current=B.current[a]??null,(q??x)(a),b){let b=B.current[a];(0,i.scrollIntoViewIfNeeded)(z.current,b,o,l)}}),G=(0,f.useStableCallback)(a=>{if(0===a.size)return;if(C.current){let a=B.current,c=a.indexOf(D.current);if(-1===c){let c=a[E];!c||(0,j.isListIndexDisabled)(a,E,u)?F(function(a,c){let d=-1;for(let e=0;e<a.length;e+=1){let f=a[e];if(!(!f||(0,j.isListIndexDisabled)(a,e,c))){if(f.hasAttribute(b))return e;-1===d&&(d=e)}}return Math.max(d,0)}(a,u)):D.current=c}else c!==E&&F(c);return}C.current=!0;let c=Array.from(a.keys()),d=c.find(a=>a?.hasAttribute(b))??null,e=d?a.get(d)?.index??-1:-1;if(-1!==e)F(e);else if((0,j.isListIndexDisabled)(c,E,u)){let a=(0,j.findNonDisabledListIndex)(c,{disabledIndices:u});(0,j.isIndexOutOfListBounds)(c,a)||F(a)}(0,i.scrollIntoViewIfNeeded)(z.current,d,o,l)});(0,h.useIsoLayoutEffect)(()=>{if(null==u||null!=p||!C.current)return;let a=B.current;if((0,j.isListIndexDisabled)(a,E,u)){let b=(0,j.findNonDisabledListIndex)(a,{disabledIndices:u});(0,j.isIndexOutOfListBounds)(a,b)||F(b)}},[u,p,E,B,F]);let H=(0,f.useStableCallback)((a,b,c)=>n?n(a,b,c,B):c),I=(0,f.useStableCallback)(a=>{let b=a.key===i.HOME||a.key===i.END;if(!i.COMPOSITE_KEYS.has(a.key)||!s&&b||function(a,b){for(let c of i.MODIFIER_KEYS)if(!b.includes(c)&&a.getModifierState(c))return!0;return!1}(a,v)||!z.current)return;let c="rtl"===o,d=c?i.ARROW_LEFT:i.ARROW_RIGHT,f=c?i.ARROW_RIGHT:i.ARROW_LEFT,g="vertical"===l?i.ARROW_DOWN:d,h="vertical"===l?i.ARROW_UP:f,p=(0,k.getTarget)(a.nativeEvent);if(null!=p&&(0,i.isNativeInput)(p)&&!(null==p||p.hasAttribute("disabled")||"true"===p.getAttribute("aria-disabled"))){let b=p.selectionStart,c=p.selectionEnd,d=p.value;if(null==b||a.shiftKey||b!==c||a.key!==h&&b<d.length||a.key!==g&&b>0)return}let q=E,r=(0,j.getMinListIndex)(B,u),w=(0,j.getMaxListIndex)(B,u);null!=m&&(q=m({disabledIndices:u,elementsRef:B,event:a,highlightedIndex:E,loopFocus:e,maxIndex:w,minIndex:r,onLoop:H,orientation:l,rtl:c}));let x="vertical"!==l&&a.key===d||"horizontal"!==l&&a.key===i.ARROW_DOWN,A="vertical"!==l&&a.key===f||"horizontal"!==l&&a.key===i.ARROW_UP;s&&(a.key===i.HOME?q=r:a.key===i.END&&(q=w)),q===E&&(x||A)&&(e&&q===w&&x?(q=r,n&&(q=n(a,E,q,B))):e&&q===r&&A?(q=w,n&&(q=n(a,E,q,B))):q=(0,j.findNonDisabledListIndex)(B.current,{startingIndex:q,decrement:A,disabledIndices:u})),q===E||(0,j.isIndexOutOfListBounds)(B.current,q)||(t&&a.stopPropagation(),(y||b||x||A)&&a.preventDefault(),F(q,!0),queueMicrotask(()=>{B.current[q]?.focus()}))});return{props:{ref:A,onFocus(a){let b=z.current,c=(0,k.getTarget)(a.nativeEvent);b&&null!=c&&(0,i.isNativeInput)(c)&&c.setSelectionRange(0,c.value.length)},onKeyDown:I},highlightedIndex:E,onHighlightedIndexChange:F,elementsRef:B,onMapChange:G,relayKeyboardEvent:I}}({grid:z,loopFocus:A,onLoop:B,orientation:y,highlightedIndex:w,onHighlightedIndexChange:x,rootRef:F,stopEventPropagation:E,enableHomeAndEndKeys:C,direction:(0,n.useDirection)(),disabledIndices:G,modifierKeys:H}),R=(0,m.useRenderElement)(J,a,{state:u,ref:s,props:[L,...t,K],stateAttributesMapping:v}),S=c.useMemo(()=>({highlightedIndex:M,onHighlightedIndexChange:N,highlightItemOnHover:I,relayKeyboardEvent:Q}),[M,N,I,Q]);return(0,o.jsx)(l.CompositeRootContext.Provider,{value:S,children:(0,o.jsx)(e.CompositeList,{elementsRef:O,onMapChange:a=>{D?.(a),P(a)},children:R})})}],801548)},444080,a=>{"use strict";var b=a.i(164831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["BookMarked",0,d],444080)},696732,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Globe",0,d],696732)},71215,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Image",0,d],71215)},126766,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],126766)},586446,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Video",0,d],586446)},924613,a=>{"use strict";var b=a.i(164831);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Wrench",0,d],924613)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0iuvjnw._.js.map
|