thursday-agent 0.2.0 → 0.4.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/app-path-routes-manifest.json +5 -2
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +5 -5
- package/.next/routes-manifest.json +24 -6
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +14 -14
- package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +3 -3
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bot/memory/files/route.js +10 -0
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -0
- package/.next/server/app/api/bot/memory/files/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/bot/memory/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bot/memory/route.js +14 -0
- package/.next/server/app/api/bot/{notes → memory}/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/bot/route.js +6 -6
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/[id]/route.js +8 -8
- package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/route.js +8 -8
- package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +5 -5
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js +4 -5
- package/.next/server/app/api/events/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/catalog/route.js +9 -8
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/credits/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/credits/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/credits/route.js +16 -0
- package/.next/server/app/api/llm-model/credits/route.js.map +5 -0
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/credits/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/llm-model/route.js +10 -8
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/subscription/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/subscription/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/subscription/route.js +15 -0
- package/.next/server/app/api/llm-model/subscription/route.js.map +5 -0
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/subscription/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/mcp/[name]/route.js +4 -4
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +4 -4
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js +4 -4
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/memory/edit/route/build-manifest.json +12 -0
- package/.next/server/app/api/memory/edit/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/memory/edit/route.js +24 -0
- package/.next/server/app/api/memory/edit/route.js.map +5 -0
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -0
- package/.next/server/app/api/memory/{tidy → edit}/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/memory/route.js +6 -7
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +3 -3
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +3 -3
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +9 -7
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js +9 -7
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +17 -15
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +4 -5
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js +5 -6
- 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 +3 -4
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/page/server-reference-manifest.json +57 -90
- package/.next/server/app/page.js +10 -10
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +5 -2
- package/.next/server/chunks/[externals]__0dzuk6_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__01dkp4a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__02xjoto._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04q--0f._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0bl-e63._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ce8nf8._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0ffbg85._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0j7z0r3._.js +12 -0
- package/.next/server/chunks/[root-of-the-server]__0jq4ohy._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0ls6_8y._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pa2n68._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0q0vvt2._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__11n256_._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__12cabg9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1339jnv._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__15bjnu5._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__18_teo8._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__1fizn31._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1llj3-b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +12 -0
- package/.next/server/chunks/[root-of-the-server]__1p8m3f4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wa1k7r._.js +8 -0
- package/.next/server/chunks/_0-73of8._.js +5 -5
- package/.next/server/chunks/_0-fjql4._.js +26 -0
- package/.next/server/chunks/_00xh_q0._.js +25 -0
- package/.next/server/chunks/_051qh8u._.js +3 -0
- package/.next/server/chunks/{node_modules_next_04q-o58._.js → _05dla15._.js} +2 -2
- package/.next/server/chunks/_05h2cii._.js +1 -1
- package/.next/server/chunks/_0c9j6rb._.js +49 -0
- package/.next/server/chunks/_0fzqt2y._.js +134 -0
- package/.next/server/chunks/{_0vnutv9._.js → _0ioz3nd._.js} +1 -1
- package/.next/server/chunks/_0iwfby5._.js +3 -0
- package/.next/server/chunks/_0mecv0f._.js +26 -0
- package/.next/server/chunks/_0mh8j4m._.js +3 -0
- package/.next/server/chunks/_0n74zsf._.js +4 -4
- package/.next/server/chunks/_0obojvv._.js +3 -0
- package/.next/server/chunks/_0recufk._.js +49 -0
- package/.next/server/chunks/_0rnf-6n._.js +4 -4
- package/.next/server/chunks/_0sb7tlz._.js +3 -0
- package/.next/server/chunks/_0u10wmw._.js +5 -5
- package/.next/server/chunks/_0u4aiy2._.js +3 -0
- package/.next/server/chunks/_0wp4le3._.js +1 -1
- package/.next/server/chunks/_0y5fg-x._.js +1 -1
- package/.next/server/chunks/_1230wbx._.js +10 -0
- package/.next/server/chunks/_12nheja._.js +3 -0
- package/.next/server/chunks/_13510xh._.js +3 -0
- package/.next/server/chunks/_15hq89o._.js +1 -1
- package/.next/server/chunks/_17l5ygt._.js +49 -0
- package/.next/server/chunks/_18-1wcc._.js +5 -5
- package/.next/server/chunks/_1_5mnq4._.js +4 -4
- package/.next/server/chunks/_1_9mjx-._.js +3 -0
- package/.next/server/chunks/{_0pppbb5._.js → _1c78vw5._.js} +166 -37
- package/.next/server/chunks/_1d0j961._.js +6 -0
- package/.next/server/chunks/_1d5zmy8._.js +1 -1
- package/.next/server/chunks/_1drgfx4._.js +4 -4
- package/.next/server/chunks/_1f46eie._.js +3 -0
- package/.next/server/chunks/_1h5_8sk._.js +3 -0
- package/.next/server/chunks/_1hdnxb7._.js +3 -0
- package/.next/server/chunks/_1j8k_j5._.js +3 -0
- package/.next/server/chunks/_1krd9rf._.js +3 -0
- package/.next/server/chunks/_1nc0eui._.js +11 -0
- package/.next/server/chunks/_1nula3v._.js +3 -0
- package/.next/server/chunks/_1pf4qe-._.js +3 -0
- package/.next/server/chunks/_1php4eq._.js +1 -1
- package/.next/server/chunks/_1qxheoa._.js +3 -0
- package/.next/server/chunks/_1x6kd1r._.js +3 -0
- package/.next/server/chunks/_1yuv4vp._.js +1 -1
- package/.next/server/chunks/_1zjrdag._.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_bot_memory_files_route_actions_1_xd_8f.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_bot_memory_route_actions_1a8xfr7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_route_actions_0v424pb.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_subscription_route_actions_0-udcm5.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_memory_edit_route_actions_02sfnmr.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_0rpfxbk._.js +3 -0
- package/.next/server/chunks/features_1qf3cei._.js +3 -0
- package/.next/server/chunks/features_bot_0zt92oh._.js +3 -0
- package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +3 -0
- package/.next/server/chunks/features_memory_1uqvksn._.js +6 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js → node_modules_consola_dist_chunks_prompt_mjs_0i7cvml._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js → node_modules_consola_dist_chunks_prompt_mjs_0icqaqw._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js → node_modules_consola_dist_chunks_prompt_mjs_0r28-sm._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js → node_modules_consola_dist_chunks_prompt_mjs_0v_7drq._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1xoq2rl._.js +3 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js → node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__092knlj._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__09q9med._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hg5gib._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i8ie7f._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0jsmmb-._.js → [root-of-the-server]__0mz33a7._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0s9dq5u._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0m1b5ky._.js → [root-of-the-server]__0s9l2sv._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0tbkdlx._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0vnmv-s._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0f6s48x._.js → [root-of-the-server]__0xpcv9w._.js} +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0xsog8n._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xtssj3._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +61 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__15_uhip._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16jc196._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1gtlw6v._.js +43 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1ox7hbk._.js +4 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1qfqvmg._.js → [root-of-the-server]__202p40z._.js} +2 -2
- package/.next/server/chunks/ssr/{_1mznrxk._.js → _001_ms1._.js} +3 -3
- package/.next/server/chunks/ssr/_01n3o0m._.js +3 -0
- package/.next/server/chunks/ssr/_0ap2fzn._.js +3 -0
- package/.next/server/chunks/ssr/_0fz4mf_._.js +3 -0
- package/.next/server/chunks/ssr/_0gb4gmf._.js +3 -0
- package/.next/server/chunks/ssr/_0h42fze._.js +3 -0
- package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
- package/.next/server/chunks/ssr/_0i_6q1w._.js +41 -0
- package/.next/server/chunks/ssr/_0ilna52._.js +42 -0
- package/.next/server/chunks/ssr/_0n3toaw._.js +3 -0
- package/.next/server/chunks/ssr/{_13punpm._.js → _0q0zan6._.js} +2 -2
- package/.next/server/chunks/ssr/{_077-g6s._.js → _0s99bgb._.js} +3 -3
- package/.next/server/chunks/ssr/_0zcjrbg._.js +3 -0
- package/.next/server/chunks/ssr/_0zhoc3r._.js +3 -0
- package/.next/server/chunks/ssr/{_1lip4th._.js → _1-_etts._.js} +2 -2
- package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
- package/.next/server/chunks/ssr/_13fke0x._.js +3 -0
- package/.next/server/chunks/ssr/_15j2_8f._.js +3 -0
- package/.next/server/chunks/ssr/_1b2mjwr._.js +3 -0
- package/.next/server/chunks/ssr/{_09ja_w1._.js → _1f-dg-6._.js} +2 -2
- package/.next/server/chunks/ssr/_1fojd41._.js +4 -0
- package/.next/server/chunks/ssr/_1gd8q8l._.js +3 -0
- package/.next/server/chunks/ssr/{_1m3bsfr._.js → _1h0rw11._.js} +2 -2
- package/.next/server/chunks/ssr/_1jhd09t._.js +3 -0
- package/.next/server/chunks/ssr/{_040sk32._.js → _1lz_cq2._.js} +84 -88
- package/.next/server/chunks/ssr/_1nnsk7z._.js +3 -0
- package/.next/server/chunks/ssr/_1sji22n._.js +3 -0
- package/.next/server/chunks/ssr/{_0x_nu5e._.js → _1vi_uo7._.js} +2 -2
- package/.next/server/chunks/ssr/_1vyd1ji._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +3 -0
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kxz4gt._.js → node_modules_00etblx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18_dk7_._.js → node_modules_04jf_m8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_n241r._.js → node_modules_08dhkiq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n1kj4p._.js → node_modules_0940ns5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_17lrt3y._.js → node_modules_09q35v_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1toafc-._.js → node_modules_0_-_a--._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0lrjk5t._.js → node_modules_0arus10._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04n7mjs._.js → node_modules_0b__sgl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0iz1rzd._.js → node_modules_0cxaxk9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ndvxub._.js → node_modules_0g7fzk3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kl7-tn._.js → node_modules_0had7xd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_19dp7ko._.js → node_modules_0pvd7q-._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_0x3-ply._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_1dwguw_._.js → node_modules_0yugy6m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_004qlr4._.js → node_modules_14om4ar._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1q0p85z._.js → node_modules_14q6g4n._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_17bwo43._.js +55 -0
- package/.next/server/chunks/ssr/{node_modules_1hd-5tv._.js → node_modules_198nmll._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m93zeg._.js → node_modules_1_pc9kq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1n5ygqe._.js → node_modules_1aaxuef._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01qnv-a._.js → node_modules_1cx_ql6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zu988w._.js → node_modules_1cz2hle._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1xyd7ov._.js → node_modules_1efrqxi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13r44jq._.js → node_modules_1eg7m6c._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08d8bke._.js → node_modules_1gdh31p._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hn8z1f._.js → node_modules_1hpopmo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20yebtj._.js → node_modules_1qpjvy5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09xhur7._.js → node_modules_1vh5ntv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b748ic._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1z4hm5e._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_@vercel_oidc_dist_06mk8id._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_next_dist_0w6mzq5._.js → node_modules_next_dist_0drixxt._.js} +4 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +2 -2
- package/.next/server/instrumentation.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 +58 -91
- package/.next/static/chunks/00rd4-v8r7axp.js +1 -0
- package/.next/static/chunks/08qe4as2q428z.js +3 -0
- package/.next/static/chunks/{31ttnjt6g35a0.js → 0ev4hyghq0mbb.js} +1 -1
- package/.next/static/chunks/0fl3gwe4-l6tz.js +1 -0
- package/.next/static/chunks/0gnqdjn2lvdad.js +2 -0
- package/.next/static/chunks/0hwap1-p0m5sa.js +1 -0
- package/.next/static/chunks/0r5qcctujhxli.js +1 -0
- package/.next/static/chunks/0w52rrrmuj9r9.js +1 -0
- package/.next/static/chunks/{07kl352c-lvcz.js → 0wcprt5ot5she.js} +1 -1
- package/.next/static/chunks/10teww7wt-f6h.js +1 -0
- package/.next/static/chunks/15m575979un5f.js +38 -0
- package/.next/static/chunks/17p6tk6k88dq6.js +1 -0
- package/.next/static/chunks/{3_h9txt3tq8t8.js → 1dkjg87pxk0n9.js} +1 -1
- package/.next/static/chunks/1jd09sxcjddu1.js +1 -0
- package/.next/static/chunks/1kq8h8wi_e0bc.js +53 -0
- package/.next/static/chunks/{18vhba44l1fc9.js → 1w73ece_6bheu.js} +1 -1
- package/.next/static/chunks/{3ard_noqapnw1.js → 214ya3n5gxeih.js} +1 -1
- package/.next/static/chunks/22_zkas21rpna.js +1 -0
- package/.next/static/chunks/2h0sd2vumhb15.js +1 -0
- package/.next/static/chunks/2t4vhi3m8ahya.js +1 -0
- package/.next/static/chunks/2tigdtz3dpcy8.js +1 -0
- package/.next/static/chunks/2u7xt6mxg44lf.js +1 -0
- package/.next/static/chunks/39j0fvpybzabl.js +40 -0
- package/.next/static/chunks/3akmqm77muj4-.js +1 -0
- package/.next/static/chunks/3cq5g494yuke8.css +1 -0
- package/.next/static/chunks/3woj-xd7ki5_i.js +1 -0
- package/.next/static/chunks/3xk7yqgomx7yq.js +1 -0
- package/.next/static/chunks/3zmcsnuo25zvq.js +1 -0
- package/.next/static/media/favicon.37o1pjldwi2uc.ico +0 -0
- package/README.md +47 -22
- package/app/api/bot/memory/files/route.ts +14 -0
- package/app/api/bot/memory/route.ts +5 -0
- package/app/api/events/app-event.ts +3 -7
- package/app/api/llm-model/credits/route.ts +11 -0
- package/app/api/llm-model/route.ts +6 -1
- package/app/api/llm-model/subscription/route.ts +11 -0
- package/app/api/memory/edit/route.ts +7 -0
- package/app/api/memory/route.ts +21 -0
- package/app/api/query-key.ts +19 -4
- package/bin/port.mjs +65 -0
- package/bin/thursday.mjs +5 -33
- package/components/ui/shiny-text.tsx +48 -134
- package/database/migrations/{20260909060813_optimal_sabretooth → 20260910173049_numerous_spirit}/migration.sql +24 -34
- package/database/migrations/{20260909060813_optimal_sabretooth → 20260910173049_numerous_spirit}/snapshot.json +71 -145
- package/database/migrations/20260911030320_opposite_jack_power/migration.sql +1 -0
- package/database/migrations/{20260909063821_bitter_tenebrous → 20260911030320_opposite_jack_power}/snapshot.json +57 -184
- package/docs/how-it-works.md +11 -7
- package/docs/images/face-dark.png +0 -0
- package/docs/images/face-light.png +0 -0
- package/docs/images/keeps-going.png +0 -0
- package/features/ai/chatgpt.ts +639 -0
- package/features/ai/components/chatgpt-sign-in.tsx +66 -0
- package/features/ai/components/model-picker.tsx +17 -1
- package/features/ai/components/provider-icon.tsx +1 -0
- package/features/ai/load-tools.ts +78 -56
- package/features/ai/model.schema.ts +232 -34
- package/features/ai/model.ts +169 -24
- package/features/ai/prompts/bot.prompt.ts +207 -114
- package/features/ai/prompts/memory-edit.prompt.ts +33 -0
- package/features/ai/prompts/prompt-helper.ts +45 -26
- package/features/ai/prompts/thursday.prompt.ts +57 -27
- package/features/ai/tools/bot.tool.ts +35 -52
- package/features/ai/tools/connected.ts +17 -4
- package/features/ai/tools/memory.tool.ts +181 -117
- package/features/ai/tools/search.tool.ts +136 -47
- package/features/ai/tools/tool-name.ts +2 -6
- package/features/ai/tools/workspace.tool.ts +5 -1
- package/features/bot/bot.action.ts +14 -19
- package/features/bot/bot.memory.ts +89 -0
- package/features/bot/bot.query.ts +37 -57
- package/features/bot/bot.run.ts +512 -242
- package/features/bot/bot.runner.ts +434 -120
- package/features/bot/bot.schema.ts +104 -19
- package/features/bot/bot.seed.ts +89 -16
- package/features/bot/components/bot-mark.tsx +122 -20
- package/features/bot/components/bot-room.tsx +214 -132
- package/features/bot/components/bot-setting.tsx +790 -402
- package/features/bot/components/bot-tool.tsx +2 -7
- package/features/bot/components/mark-palette.tsx +54 -0
- package/features/bot/components/path-chips.tsx +1 -1
- package/features/bot/components/task-badge.tsx +26 -6
- package/features/bot/components/task-reply.tsx +22 -33
- package/features/bot/components/task-setting.tsx +20 -17
- package/features/bot/task.query.ts +240 -34
- package/features/bot/task.store.ts +76 -13
- package/features/config/components/config-setting.tsx +265 -34
- package/features/config/components/models-badge.tsx +42 -0
- package/features/config/config.action.ts +12 -0
- package/features/config/config.const.ts +38 -2
- package/features/connectors/mcp.manager.ts +10 -2
- package/features/intro/components/intro.tsx +47 -46
- package/features/memory/components/memory-edit.tsx +340 -0
- package/features/memory/components/memory-setting.tsx +75 -77
- package/features/memory/memory.action.ts +3 -43
- package/features/memory/memory.edit.ts +87 -0
- package/features/memory/memory.query.ts +24 -42
- package/features/memory/memory.schema.ts +29 -106
- package/features/settings/components/settings.tsx +2 -0
- package/features/settings/settings.alert.ts +3 -1
- package/features/thursday/components/ascii-orb.tsx +106 -90
- package/features/thursday/components/boot.tsx +7 -0
- package/features/thursday/components/call-log.tsx +219 -92
- package/features/thursday/components/face.tsx +6 -4
- package/features/thursday/components/tab-state.tsx +97 -0
- package/features/thursday/components/thursday-mark.tsx +4 -1
- package/features/thursday/components/thursday-setting.tsx +17 -47
- package/features/thursday/components/thursday.tsx +208 -98
- package/features/thursday/thursday.action.ts +12 -17
- package/features/thursday/thursday.query.ts +61 -70
- package/features/thursday/thursday.schema.ts +20 -7
- package/features/thursday/tool-line.ts +85 -12
- package/features/thursday/use-thursday.ts +87 -60
- package/features/workspace/components/file-view.tsx +4 -2
- package/features/workspace/workspace.ts +110 -26
- package/lib/limits.ts +1 -1
- package/lib/oauth-page.ts +27 -0
- package/lib/realtime/openai.ts +2 -2
- package/lib/realtime/realtime.protocol.ts +1 -1
- package/lib/realtime/realtime.tap.ts +122 -0
- package/lib/sandbox.ts +59 -36
- package/package.json +1 -1
- package/skills/browser/SKILL.md +55 -34
- package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/bot/notes/route.js +0 -14
- package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +0 -3
- package/.next/server/app/api/memory/tidy/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/memory/tidy/route.js +0 -22
- package/.next/server/app/api/memory/tidy/route.js.nft.json +0 -1
- package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0-npkh_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__005var5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__02_2sm-._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__04_8spk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__05luceg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +0 -11
- package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0dupqt7._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__0nfuugi._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0p32jfz._.js +0 -12
- package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10qshki._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1692zrv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16thabu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1_aoyr9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1e-ci13._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fboj2j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lr7j9t._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1oli73c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1zgpz1w._.js +0 -3
- package/.next/server/chunks/_00_584r._.js +0 -293
- package/.next/server/chunks/_012yhfm._.js +0 -39
- package/.next/server/chunks/_06mxlgn._.js +0 -3
- package/.next/server/chunks/_07rtlxv._.js +0 -3
- package/.next/server/chunks/_0a351g7._.js +0 -6
- package/.next/server/chunks/_0kjjmag._.js +0 -3
- package/.next/server/chunks/_0nn99o2._.js +0 -3
- package/.next/server/chunks/_0zuzmt_._.js +0 -39
- package/.next/server/chunks/_106co2o._.js +0 -3
- package/.next/server/chunks/_12bbv5i._.js +0 -100
- package/.next/server/chunks/_15q1pig._.js +0 -3
- package/.next/server/chunks/_19wg5yn._.js +0 -138
- package/.next/server/chunks/_1bt95p9._.js +0 -55
- package/.next/server/chunks/_1cbk7ms._.js +0 -26
- package/.next/server/chunks/_1drv2et._.js +0 -40
- package/.next/server/chunks/_1ic3bew._.js +0 -5
- package/.next/server/chunks/_1mxn_lb._.js +0 -3
- package/.next/server/chunks/_1rysr-r._.js +0 -10
- package/.next/server/chunks/_1u3rwbr._.js +0 -3
- package/.next/server/chunks/_1x7p319._.js +0 -6
- package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_memory_tidy_route_actions_0_cfuom.js +0 -3
- package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0vorg6w._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vmaq9f._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +0 -3
- package/.next/server/chunks/ssr/[externals]_node_crypto_1kn79-7._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0iuoa-r._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0un-erv._.js +0 -4
- package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +0 -92
- package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +0 -3
- package/.next/server/chunks/ssr/_0-mc7ro._.js +0 -3
- package/.next/server/chunks/ssr/_01p5r6-._.js +0 -3
- package/.next/server/chunks/ssr/_03webdr._.js +0 -3
- package/.next/server/chunks/ssr/_09-0k3z._.js +0 -3
- package/.next/server/chunks/ssr/_0f_b_9s._.js +0 -3
- package/.next/server/chunks/ssr/_0fafgvl._.js +0 -3
- package/.next/server/chunks/ssr/_0sf1isi._.js +0 -3
- package/.next/server/chunks/ssr/_0su6_08._.js +0 -3
- package/.next/server/chunks/ssr/_0ti51xc._.js +0 -3
- package/.next/server/chunks/ssr/_0w5bgak._.js +0 -3
- package/.next/server/chunks/ssr/_0y84qo6._.js +0 -3
- package/.next/server/chunks/ssr/_1ciyoo3._.js +0 -3
- package/.next/server/chunks/ssr/_1e-dgz0._.js +0 -4
- package/.next/server/chunks/ssr/_1fq7zgb._.js +0 -3
- package/.next/server/chunks/ssr/_1g6l4uj._.js +0 -3
- package/.next/server/chunks/ssr/_1ruzehw._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +0 -4
- package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +0 -3
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +0 -4
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_15fmmz3.js +0 -55
- package/.next/static/chunks/05b6nx_o3_f_n.js +0 -1
- package/.next/static/chunks/0dmns-gi0raa4.js +0 -1
- package/.next/static/chunks/0f9sq-7q_yxyl.js +0 -1
- package/.next/static/chunks/0oc4_xoia77dg.css +0 -1
- package/.next/static/chunks/0pheo8m3a-rzi.js +0 -1
- package/.next/static/chunks/19i8h2t-5evjx.js +0 -1
- package/.next/static/chunks/1c5fcj473025q.js +0 -1
- package/.next/static/chunks/1pi_hbmjw-f-z.js +0 -1
- package/.next/static/chunks/1twt6k09vg4np.js +0 -1
- package/.next/static/chunks/1ytnip8wdng93.js +0 -1
- package/.next/static/chunks/28gotuisldmom.js +0 -1
- package/.next/static/chunks/2998p0y7k1c8z.js +0 -3
- package/.next/static/chunks/29gyb3nubj51j.js +0 -53
- package/.next/static/chunks/2l233xfycjpd8.js +0 -1
- package/.next/static/chunks/2p5n7pa3c40t-.js +0 -2
- package/.next/static/chunks/2ru1q132af7h7.js +0 -1
- package/.next/static/chunks/2t8wqycwg3y04.js +0 -2
- package/.next/static/chunks/2uxum7qbyeyxd.js +0 -1
- package/.next/static/chunks/32z_ypgtchw48.js +0 -1
- package/.next/static/chunks/33pyjb3xd1iez.js +0 -1
- package/.next/static/chunks/3omud5xunrk1f.js +0 -1
- package/.next/static/chunks/42dnrkbph9e-1.js +0 -1
- package/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +0 -1
- package/features/ai/prompts/memory-tidy.prompt.ts +0 -129
- package/features/ai/tools/tidy.tool.ts +0 -22
- package/features/bot/bot.notes.ts +0 -120
- package/features/memory/components/memory-tidy.tsx +0 -395
- package/features/memory/components/memory-view.tsx +0 -84
- package/features/memory/memory.tidy.ts +0 -332
- package/features/memory/tidy.query.ts +0 -135
- package/features/thursday/use-call-title.ts +0 -31
- /package/.next/server/app/api/bot/{notes → memory/files}/route/build-manifest.json +0 -0
- /package/.next/server/app/api/bot/{notes → memory/files}/route/server-reference-manifest.json +0 -0
- /package/.next/server/app/api/bot/{notes → memory/files}/route.js.map +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route/build-manifest.json +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route/server-reference-manifest.json +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route.js.map +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_buildManifest.js +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
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_remember:"memory_remember",memory_forget:"memory_forget",memory_conversation:"memory_conversation",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",answer:"answer",end_call:"end_call"}])},411509,702080,a=>{"use strict";var b=a.i(57441);a.s(["default",0,b],702080);var b=b,c=a.i(287702),d=a.i(61876),e=a.i(199169),f=a.i(616682),g=a.i(324835);let h=b.object({color:b.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:b.enum(g.MARK_SHAPES).optional(),outline:b.boolean().optional()}),i=b.string().max(f.COMMON_VALIDATE.prompt.max),j=b.object({id:b.number(),name:b.string(),serverName:b.string()}),k=b.string().trim().transform(a=>a.replace(/\s+/g," ")).pipe(b.string().min(1,"A name is required").max(f.COMMON_VALIDATE.name.max)),l=b.object({input:b.number(),output:b.number()});b.object({name:b.string(),description:b.string(),systemPrompt:b.string().nullish(),icon:h.nullish(),provider:d.textModelProviderSchema.nullish(),model:b.string().nullish(),compactAt:b.number().nullish(),disabled:b.boolean(),createdAt:e.DateLikeSchema,tools:j.array().default([]),tokens:l,lastJobAt:e.DateLikeSchema.nullish()}),b.object({name:k,description:b.string().trim().min(1,"Say what this bot is for").max(f.COMMON_VALIDATE.description.max),systemPrompt:i.optional(),icon:h.optional(),provider:d.textModelProviderSchema.nullish(),model:b.string().trim().max(80).nullish(),compactAt:b.coerce.number().int().min(8e3,"At least 8k").nullish(),disabled:b.boolean().optional(),toolIds:b.number().int().array().max(10).default([])}),b.object({file:b.string(),path:b.string(),line:b.string(),at:e.DateLikeSchema,bytes:b.number()});let m=c.PAGE_SIZE,n="Continue",o=b.discriminatedUnion("type",[b.object({type:b.literal("text"),text:b.string()}),b.object({type:b.literal("image"),src:b.string()})]),p=b.object({id:b.string(),seq:b.number(),bot:b.string().nullable(),parent:b.string().nullable(),at:e.DateLikeSchema}),q=b.discriminatedUnion("kind",[p.extend({kind:b.literal("user"),text:b.string()}),p.extend({kind:b.literal("text"),text:b.string()}),p.extend({kind:b.literal("note"),text:b.string()}),p.extend({kind:b.literal("stop"),text:b.string()}),p.extend({kind:b.literal("tool"),callId:b.string(),name:b.string(),input:b.string(),note:b.string().nullish(),path:b.string().nullish()}),p.extend({kind:b.literal("tool-result"),callId:b.string(),name:b.string(),results:o.array(),more:b.boolean()}),p.extend({kind:b.literal("ask"),callId:b.string(),to:b.string(),text:b.string()}),p.extend({kind:b.literal("ask-result"),callId:b.string(),text:b.string()}),p.extend({kind:b.literal("waiting"),callId:b.string(),question:b.string(),options:b.string().array()})]),r=b.object({question:b.string(),options:b.string().array(),auto:b.boolean()});b.object({id:b.string(),bot:b.string(),label:b.string(),request:b.string(),status:b.enum(["running","waiting","done","failed"]),outcome:b.string().nullable(),ask:r.nullable(),seen:b.boolean(),tokens:l,contextTokens:b.number(),contextBudget:b.number(),createdAt:e.DateLikeSchema,updatedAt:e.DateLikeSchema,lines:q.array()}),a.s(["DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",systemPrompt:null,icon:{color:"#14B8A6",shape:"squircle"},provider:null,model:null,disabled:!1,compactAt:null},"MAX_PINNED_TOOLS",0,10,"TASK_CONTINUE",0,n,"TASK_HISTORY_PAGE",0,m,"botIconSchema",0,h,"isAppStop",0,a=>{let b=a?.options??[];return 1===b.length&&b[0]===n},"randomBotIcon",0,function(){return{color:(0,g.randomMarkColors)(1)[0],shape:g.MARK_SHAPES[Math.floor(Math.random()*g.MARK_SHAPES.length)]}}],411509)},398026,a=>{"use strict";var b=a.i(287702),c=a.i(421042),d=a.i(324835);let e=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, answers with one result",hint:"Plans a job and hands out the parts",icon:{shape:"squircle"},recommended:!0,systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",hint:"Opens the page itself and reads what is on it",icon:{shape:"poly"},recommended:!0,systemPrompt:`You are Navigator. Every browser job is yours: load the \`${b.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",hint:"Writes what gets read, in the form that fits",icon:{shape:"blob"},recommended:!0,systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."},{name:"Insta",description:"Instagram end to end — settles what the post is, draws it, writes it, and puts it up once approved",hint:"Draws the pictures, writes the caption, posts it",icon:{shape:"poly"},requires:["image"],systemPrompt:`You are Insta. One job takes a post from nothing to live on instagram.com — settle what it is, sign in, draw it, write it, put it up. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
|
|
2
|
+
|
|
3
|
+
Settle it in one question. Ask only for what the request leaves open, in a single \`${c.TOOL_NAMES.ask_thursday}\`: the topic, how many pictures, whether to build a cover, and whether they name the music or you pick. A request that already says its topic is not asked for it again. Told to decide yourself: \`${c.TOOL_NAMES.web_search}\` for what is current on that topic, three pictures, a cover, and a recent track from Instagram's own list. Never ask twice for one round.
|
|
4
|
+
|
|
5
|
+
Then check the tools are there. \`${c.TOOL_NAMES.tool_search}\` with \`server: "${b.STUDIO_SERVER}"\` and \`tools: ["${c.STUDIO_TOOLS.generate_image}", "${c.STUDIO_TOOLS.generate_video}"]\` — one call returns both schemas, and a name that does not come back means nobody picked that model, so the tool does not exist. Missing what the job needs: \`${c.TOOL_NAMES.ask_thursday}\` saying to pick an image (or video) model in Settings › Models, and stop. Never work around a tool that is not there.
|
|
6
|
+
|
|
7
|
+
Sign in once, and into an account made for this rather than their own — the session is kept and every later job posts as whoever it is. Your file is \`bots/Insta/.auth/instagram.json\`, the login page is \`https://www.instagram.com/accounts/login/\`, and the skill carries the rest.
|
|
8
|
+
|
|
9
|
+
Anything covering the screen is closed before you read what is under it. It is in the way, not a sign-in problem.
|
|
10
|
+
|
|
11
|
+
Pictures come from two places. Draw them when the post is an idea or a mood; take the real one off the web when it is about something that happened, since a drawn picture passed off as the event is a lie. To take one: open the page and \`curl -o\` its image url into your folder. What is on someone's page is theirs — name the source, or draw one instead.
|
|
12
|
+
Draw. \`${c.TOOL_NAMES.tool_call}\` with \`server: "${b.STUDIO_SERVER}"\`, the tool, its \`args\`, and a \`description\` line saying what the call is for. \`aspectRatio\` is \`"1:1"\` for feed, \`"3:4"\` portrait, \`"9:16"\` story or reel. Put the whole picture in \`prompt\` — subject, framing, light, palette — the image model sees nothing of this job. Issue every picture in one step and repeat the same look in each prompt, or the slides come back in different hands. Keep what you use under \`artifacts/\`.
|
|
13
|
+
|
|
14
|
+
The cover is built, not drawn: image models mangle text. Write one HTML file over the first picture — a transparent-to-black gradient darkening one end, and a single bold headline over it, placed where the picture is empty rather than over its subject: bottom-left, bottom, or bottom-right. Then \`resize 1080 1350\`, serve it and open it the way the skill does, \`screenshot\`. That is slide one.
|
|
15
|
+
|
|
16
|
+
Write the caption to be read: what this is, in the user's voice, no invented facts, no wall of tags.
|
|
17
|
+
|
|
18
|
+
The composer is the one part not to memorise. Its refs change on every snapshot, so take a fresh one at each step and read what is actually there: Create, the files, crop and edit, music, caption — and stop on the last screen, before Share. Music: search the name they gave, or take a current one that fits the topic. No music step on this format means there is none.
|
|
19
|
+
|
|
20
|
+
Ask before it goes up. \`${c.TOOL_NAMES.ask_thursday}\` with the caption as written, the picture paths and the track you picked; options \`Post it\` / \`Change something\`. Share only on the first. Nothing is published on your own judgement, whatever the request said.
|
|
21
|
+
|
|
22
|
+
Answer with the post's url once it is up, and the file paths either way.`},{name:"Voyage",description:"Plans a trip — the days in walking order, a map for each one, and a page with the pictures",hint:"Plans the days, maps them, builds the page",icon:{shape:"blob"},systemPrompt:`You are Voyage. A trip leaves you as a plan someone can walk: what to see, in what order, on which day, with the map and the pictures. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
|
|
23
|
+
|
|
24
|
+
Settle it in one question. Ask only what the request leaves open, in a single \`${c.TOOL_NAMES.ask_thursday}\`: where, which dates, how many nights, who is going, roughly what budget, and what they care about — food, museums, walking, quiet. Never ask twice for one round.
|
|
25
|
+
|
|
26
|
+
Research in one step, not six. Send every \`${c.TOOL_NAMES.web_search}\` at once: the weather those dates usually bring, entry rules, currency and what things cost, plugs, how transit works there, and what is on or shut while they are there. A festival or a Monday closure changes the plan, so it is research, not colour.
|
|
27
|
+
|
|
28
|
+
Then open the pages for the places you shortlist — hours, closing days and prices are what search results get wrong. While you are on a page, take its pictures with \`--raw eval "JSON.stringify([...document.images].filter(i => i.naturalWidth > 200).map(i => i.currentSrc))"\` and keep whose page they came from.
|
|
29
|
+
|
|
30
|
+
A day is a walkable cluster, not a wishlist. Group by where things are, then order them by when they open; a day scattered across the city is a list, not a plan. Leave one thing per day loose — arriving, weather and a long lunch all happen.
|
|
31
|
+
|
|
32
|
+
The map is written, not clicked. One directions url per day, built by hand: \`https://www.google.com/maps/dir/?api=1&origin=A&destination=D&waypoints=B|C&travelmode=walking&hl=en\` (\`transit\` where that is how the city moves). Then one \`bash\` line, chained with &&: \`resize 1280 800\`, \`goto\`, \`sleep 4\`, \`click "getByRole('button', { name: 'Collapse side panel' })"\`, \`sleep 2\`, \`screenshot\`. The window is small, so without the resize the map is unreadable; the tiles come back black if you shoot the moment it loads; and the route panel covers a third of the map until it is collapsed.
|
|
33
|
+
|
|
34
|
+
Nobody has to sign in to anything: the day urls open in their own Maps app on a tap, and the trip is finished without them. Putting the pins on their own map is an extra you offer once the plan is done, never a gate in front of it — \`https://www.google.com/maps/d/\` wants a Google sign-in, so hand over the finished trip first and ask afterwards. If they say yes, it is their own account and never a bot one, because the point is that it is on their phone: write one csv of name, address and day with \`bash\` and \`upload\` it into a new map, so every pin lands in one import instead of one click each. Read the import screens rather than remembering them.
|
|
35
|
+
|
|
36
|
+
Photos in one step too: every \`curl -o\` in a single \`bash\` call, into the trip folder.
|
|
37
|
+
|
|
38
|
+
The page is the deliverable: the days in order, the map under each, the photos with whose page they came from, and the facts that decide what to pack. If someone on your roster writes pages, it is theirs and they get steps of their own — send the days as written, the paths of every shot and photo, and each fact with its source, because they cannot see your thread. If nobody does, write it yourself with the \`interactive-page\` skill.
|
|
39
|
+
|
|
40
|
+
Answer with the folder under \`artifacts/\` and what is in it: the page, a map per day, the pictures.`}],f=e.filter(a=>a.recommended);a.s(["BOT_SEEDS",0,e,"RECOMMENDED_SEEDS",0,f,"rollSeedColors",0,()=>(0,d.randomMarkColors)(e.length)])},754257,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fbba25fbc238da78607616372d2248ff6f07a1267",b.callServer,void 0,b.findSourceMapURL,"createSeedBotsAction");a.s(["createSeedBotsAction",0,c])},478978,a=>{"use strict";var b=a.i(61876);let c=[...new Set(Object.values(b.SPEACH_MODEL_PROVIDERS).map(a=>a.apiKeyName))],d={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},e={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"}},f="EXA_API_KEY",g={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:b.TEXT_MODEL_PROVIDER_LIST.flatMap(a=>a.suggestModels.map(b=>({value:`${a.id}/${b.id}`,label:`${a.label} \xb7 ${b.label}`,needs:a.apiKeyName})))},h=a=>c.includes(a.apiKeyName),i=a=>({key:a.apiKeyName,label:a.label,provider:a.id,signIn:a.signIn}),j=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:b.TEXT_MODEL_PROVIDER_LIST.filter(h).map(i)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:b.TEXT_MODEL_PROVIDER_LIST.filter(a=>!h(a)).map(i)},{id:"search",title:"search",hint:"how bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:f,label:"Exa",hint:"web search in one call — dashboard.exa.ai"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[g]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(d).map(a=>({key:d[a],...e[a],kind:a,choices:b.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})))}))}];Object.fromEntries(j.flatMap(a=>a.entries).map(a=>[a.key,a])),j.flatMap(a=>a.entries.map(a=>a.key)),Object.fromEntries(j.flatMap(a=>a.entries).filter(a=>a.choices?.length).map(a=>[a.key,a.choices])),a.s(["CONFIG_GROUPS",0,j,"EXA_API_KEY",0,f,"MEDIA_MODEL_KEYS",0,d,"groupSatisfied",0,function(a,b){return"none"===a.require||(a.requireKeys??a.entries.map(a=>a.key)).some(b)},"isConfigSet",0,function(a,b){return a?.some(a=>a.key===b&&a.set)??!1},"mediaModelWords",0,a=>`${"image"===a?"an":"a"} ${a} model`])},28996,a=>{"use strict";let b=(0,a.i(920226).create)()(a=>({open:!1,section:"thursday",show:b=>a(a=>({open:!0,section:b??a.section})),hide:()=>a({open:!1}),pick:b=>a({section:b})}));a.s(["openSettings",0,a=>b.getState().show(a),"useSettingsStore",0,b])},616682,a=>{"use strict";a.s(["COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}}])},425256,a=>{"use strict";var b=a.i(164831);let c={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};c.node;let d=(0,b.default)(c);a.s(["History",0,d],425256)},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)},920226,a=>{"use strict";var b=a.i(572131);let c=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},d=a=>{let d=a?c(a):c,e=a=>(function(a,c=a=>a){let d=b.default.useSyncExternalStore(a.subscribe,b.default.useCallback(()=>c(a.getState()),[a,c]),b.default.useCallback(()=>c(a.getInitialState()),[a,c]));return b.default.useDebugValue(d),d})(d,a);return Object.assign(e,d),e};a.s(["create",0,a=>a?d(a):d],920226)}];
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=_0ilna52._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[588237,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",a),...d})}])},369768,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(767561),g=a.i(340695),h=a.i(965733),i=a.i(846991),j=a.i(950463),k=a.i(588237),l=a.i(287702),m=a.i(559553),n=a.i(337967),o=a.i(313237),p=a.i(497895),q=b([i]);[i]=q.then?(await q)():q;let A=new Set(["frame","image","audio","video"]);function r(a){let b=(0,m.workspaceRelative)(a);if(!b)return{how:"os"};let c=(0,m.viewKindOf)(b);return A.has(c)?{how:"tab",path:b,href:f.queryKey.fileView(b)}:"none"===c?{how:"os"}:{how:"dialog",path:b}}let B=(0,e.createContext)(null),C={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function s({kind:a,content:b,truncated:c,where:e="dialog"}){return(0,d.jsxs)(d.Fragment,{children:[null!=c&&(0,d.jsx)(t,{of:c}),(0,d.jsx)(u,{kind:a,content:b,where:e})]})}function t({of:a}){return(0,d.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,p.formatBytes)(l.WORKSPACE_VIEW.textMax)} of ${(0,p.formatBytes)(a)}. `,"Open the file itself for the rest."]})}function u({kind:a,content:b,where:c}){let e=C[c];switch(a){case"markdown":return(0,d.jsx)("div",{className:(0,p.cn)("min-w-0 text-sm leading-relaxed",e.prose),children:(0,d.jsx)(i.Markdown,{children:b})});case"csv":return(0,d.jsx)(z,{content:b,className:e.block});case"json":return(0,d.jsx)(y,{text:function(a){try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}(b),className:e.block});default:return(0,d.jsx)(y,{text:b,className:e.block})}}function v(a){let[b,c]=(0,e.useState)(null),[d,g]=(0,e.useState)(null),[h,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(!a)return;c(null),g(null),i(null);let b=!1;return fetch(f.queryKey.file(a),{headers:{range:`bytes=0-${l.WORKSPACE_VIEW.textMax-1}`}}).then(async a=>{if(!a.ok)throw Error(await a.text());return{text:await a.text(),of:function(a){let b=a.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!b)return null;let[,c,d]=b.map(Number);return c+1<d?d:null}(a)}}).then(({text:a,of:d})=>{if(b)return;let e=null===d?a:a.slice(0,a.lastIndexOf("\n")+1||void 0);c(e),i(d)}).catch(a=>!b&&g((0,p.errorToString)(a))),()=>{b=!0}},[a]),{content:b,failure:d,truncated:h}}function w({path:a,bytes:b}){let[c,e]=(0,o.useServerAction)(n.openFileAction);return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,p.formatBytes)(b)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,d.jsx)(g.Button,{variant:"outline",loading:e,onClick:()=>c(a),children:"Reveal in the file manager"})]})}function x({path:a,kind:b,onClose:c}){let{content:e,failure:f,truncated:g}=v(a),i=a?.split("/").pop()??"";return(0,d.jsx)(h.Dialog,{open:null!==a,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(h.DialogContent,{className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,d.jsx)(h.DialogTitle,{className:"sr-only",children:i}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5 pr-12",children:(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:a})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:f}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:b,content:e,truncated:g})})]})})}function y({text:a,className:b}){return(0,d.jsx)("pre",{className:(0,p.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",b),children:a})}function z({content:a,className:b}){let[c,...f]=(0,e.useMemo)(()=>(function(a){let b=[],c=[],d="",e=!1;for(let f=0;f<a.length;f++){let g=a[f];e?'"'===g&&'"'===a[f+1]?(d+='"',f++):'"'===g?e=!1:d+=g:'"'===g?e=!0:","===g?(c.push(d),d=""):"\n"===g||"\r"===g?("\r"===g&&"\n"===a[f+1]&&f++,c.push(d),b.push(c),c=[],d=""):d+=g}return(d.length||c.length)&&(c.push(d),b.push(c)),b.filter(a=>a.some(a=>a.trim()))})(a),[a]);return c?(0,d.jsx)("div",{className:(0,p.cn)("overflow-x-auto",b),children:(0,d.jsxs)(k.Table,{children:[(0,d.jsx)(k.TableHeader,{children:(0,d.jsx)(k.TableRow,{children:c.map((a,b)=>(0,d.jsx)(k.TableHead,{className:"whitespace-nowrap",children:a},`${b}-${a}`))})}),(0,d.jsx)(k.TableBody,{children:f.map((a,b)=>(0,d.jsx)(k.TableRow,{children:c.map((c,e)=>(0,d.jsx)(k.TableCell,{className:"whitespace-nowrap",children:a[e]??""},`${b}-${e}`))},`${b}-${a[0]??""}`))})]})}):(0,d.jsx)(y,{text:a,className:b})}a.s(["FileBody",0,s,"FileDialog",0,x,"FileLink",0,function({path:a,className:b,title:c,label:g,children:h}){let i=r(a),j=(0,e.useContext)(B),[k,l]=(0,o.useServerAction)(n.openFileAction);return"tab"===i.how?(0,d.jsx)("a",{href:i.href,target:"_blank",rel:"noreferrer",title:c??a,"aria-label":g,className:b,children:h}):(0,d.jsx)("button",{type:"button",disabled:l,title:c??a,"aria-label":g,className:b,onClick:()=>{"dialog"===i.how?j?j(i.path):window.open(f.queryKey.fileView(i.path),"_blank"):k(a)},children:h})},"FilePreview",0,function({path:a,bytes:b}){let c=(0,m.viewKindOf)(a),{content:e,failure:g,truncated:h}=v(A.has(c)?null:a);return("frame"===c||"image"===c)&&b>l.WORKSPACE_VIEW.elementMax?(0,d.jsx)(w,{path:a,bytes:b}):"frame"===c?(0,d.jsx)("iframe",{title:a,src:f.queryKey.file(a),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===c?(0,d.jsx)("img",{src:f.queryKey.file(a),alt:a,className:"mx-auto max-w-full p-6"}):"audio"===c||"video"===c?"audio"===c?(0,d.jsx)("audio",{controls:!0,src:f.queryKey.file(a),className:"w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):(0,d.jsx)("video",{controls:!0,src:f.queryKey.file(a),className:"max-w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):g?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:g}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:c,content:e,truncated:h})},"FileViewer",0,function({children:a}){let[b,c]=(0,e.useState)(null);return(0,d.jsxs)(B,{value:c,children:[a,(0,d.jsx)(x,{path:b,kind:b?(0,m.viewKindOf)(b):"text",onClose:()=>c(null)})]})},"fileTarget",0,r,"useFileText",0,v,"useOpenFile",0,function(){let a=(0,e.useContext)(B);return(0,e.useCallback)(b=>{let c=r(b);if("os"===c.how)return!1;if("dialog"===c.how&&a)return a(c.path),!0;let d="tab"===c.how?c.href:f.queryKey.fileView(c.path);return null!==window.open(d,"_blank")},[a])}]),c()}catch(a){c(a)}},!1),337967,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f4957e151a50cd41ee138dc20323d2118d625a8e9",b.callServer,void 0,b.findSourceMapURL,"openFileAction");a.s(["openFileAction",0,c])},559553,a=>{"use strict";var b=a.i(287702);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;function h(a){let b=a.trim(),c=b.indexOf(g);return c>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null}a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b=h(a);if(!b)return null;let[c,...d]=b.split("/");return d.length&&c.includes(".")?null:b}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none","workspaceRelative",0,h])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0n3toaw._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[184838,a=>a.a(async(b,c)=>{try{let l,m;var d,e=a.i(902157),f=a.i(750227),g=a.i(418520),h=a.i(624495),i=a.i(569572),j=a.i(182248),k=b([g,h]);[g,h]=k.then?(await k)():k;let n=i.DB_FILE_NAME.replace(/^file:/,"");(0,e.mkdirSync)((0,f.dirname)(n),{recursive:!0});let o=globalThis.__dbClient??=(d=((l=(0,g.createClient)({url:i.DB_FILE_NAME,timeout:5e3})).execute("PRAGMA journal_mode = WAL"),l),m=(0,j.PromiseChain)(),{...d,execute:(...a)=>m(()=>d.execute(...a)),batch:(...a)=>m(()=>d.batch(...a)),executeMultiple:(...a)=>m(()=>d.executeMultiple(...a)),migrate:(...a)=>m(()=>d.migrate(...a)),async transaction(...a){let b,c=await new Promise(a=>{let b,c=new Promise(a=>{b=a});m(async()=>{a(b),await c})});try{b=await d.transaction(...a)}catch(a){throw c(),a}let e=!1,f=()=>{e||(e=!0,c())};return{execute:(...a)=>b.execute(...a),batch:(...a)=>b.batch(...a),executeMultiple:(...a)=>b.executeMultiple(...a),get closed(){return b.closed},commit:()=>b.commit().finally(f),rollback:()=>b.rollback().finally(f),close:()=>{try{b.close()}finally{f()}}}}}),p=(0,h.drizzle)({client:o});a.s(["database",0,p]),c()}catch(a){c(a)}},!1),714428,a=>{"use strict";var b=a.i(49701),c=a.i(738538),d=a.i(169565),e=a.i(933625),f=a.i(903413),g=a.i(885880);let h=(0,g.sqliteTable)("bot",{name:(0,f.text)("name").primaryKey(),description:(0,f.text)("description").notNull(),systemPrompt:(0,f.text)("system_prompt"),icon:(0,f.text)("icon",{mode:"json"}).$type(),provider:(0,f.text)("provider").$type(),model:(0,f.text)("model"),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),i=(0,g.sqliteTable)("bot_note",{bot:(0,f.text)("bot").primaryKey(),text:(0,f.text)("text").notNull(),updatedAt:(0,e.int)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),j=(0,g.sqliteTable)("mcp_server",{name:(0,f.text)("name").primaryKey(),config:(0,f.text)("config",{mode:"json"}).notNull().$type(),toolsSyncedAt:(0,e.int)("tools_synced_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),lastError:(0,f.text)("last_error"),oauth:(0,f.text)("oauth",{mode:"json"}).$type(),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),k=(0,g.sqliteTable)("mcp_tool",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),serverName:(0,f.text)("server_name").notNull().references(()=>j.name,{onDelete:"cascade"}),name:(0,f.text)("name").notNull(),description:(0,f.text)("description"),inputSchema:(0,f.text)("input_schema",{mode:"json"}).$type(),outputSchema:(0,f.text)("output_schema",{mode:"json"}).$type()},a=>[(0,d.unique)("uq_mcp_tool_server_name").on(a.serverName,a.name)]),l=(0,g.sqliteTable)("bot_mcp_tool",{botName:(0,f.text)().notNull().references(()=>h.name,{onDelete:"cascade"}),toolId:(0,e.int)("tool_id").notNull().references(()=>k.id,{onDelete:"cascade"})},a=>[(0,c.primaryKey)({columns:[a.botName,a.toolId]})]),m=(0,g.sqliteTable)("task",{id:(0,f.text)("id").primaryKey(),bot:(0,f.text)("bot").notNull(),label:(0,f.text)("label").notNull(),request:(0,f.text)("request").notNull(),status:(0,f.text)("status").notNull().$type(),outcome:(0,f.text)("outcome"),pending:(0,f.text)("pending",{mode:"json"}).$type(),reported:(0,e.int)("reported",{mode:"boolean"}).notNull().default(!1),callId:(0,f.text)("call_id"),inputTokens:(0,e.int)("input_tokens").notNull().default(0),outputTokens:(0,e.int)("output_tokens").notNull().default(0),contextTokens:(0,e.int)("context_tokens").notNull().default(0),contextBudget:(0,e.int)("context_budget").notNull().default(0),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,e.int)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),endedAt:(0,e.int)("ended_at",{mode:"timestamp"})}),n=(0,g.sqliteTable)("task_message",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),taskId:(0,f.text)("task_id").notNull().references(()=>m.id,{onDelete:"cascade"}),seq:(0,e.int)("seq").notNull(),bot:(0,f.text)("bot"),parent:(0,f.text)("parent"),role:(0,f.text)("role").notNull().$type(),content:(0,f.text)("content",{mode:"json"}).notNull().$type(),compact:(0,e.int)("compact",{mode:"boolean"}).notNull().default(!1),note:(0,e.int)("note",{mode:"boolean"}).notNull().default(!1),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,d.unique)("uq_task_message_seq").on(a.taskId,a.seq)]),o=(0,g.sqliteTable)("call",{id:(0,f.text)("id").primaryKey(),provider:(0,f.text)("provider").notNull(),model:(0,f.text)("model").notNull(),startedAt:(0,e.int)("started_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),endedAt:(0,e.int)("ended_at",{mode:"timestamp"}),tidiedAt:(0,e.int)("tidied_at",{mode:"timestamp"})}),p=(0,g.sqliteTable)("call_message",{callId:(0,f.text)("call_id").notNull().references(()=>o.id,{onDelete:"cascade"}),id:(0,f.text)("id").notNull(),seq:(0,e.int)("seq").notNull(),role:(0,f.text)("role").notNull().$type(),tool:(0,f.text)("tool"),text:(0,f.text)("text").notNull(),at:(0,e.int)("at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,c.primaryKey)({columns:[a.callId,a.id]}),(0,b.index)("idx_call_message_call").on(a.callId,a.seq)]),q=(0,g.sqliteTable)("memory_note",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),path:(0,f.text)("path").notNull().unique(),description:(0,f.text)("description").notNull(),aliases:(0,f.text)("aliases",{mode:"json"}).$type().default([]),ownedByUser:(0,e.int)("owned_by_user",{mode:"boolean"}).notNull().default(!1),hits:(0,e.int)("hits").notNull().default(0),lastReadAt:(0,e.int)("last_read_at",{mode:"timestamp"}),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,e.int)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),r=(0,g.sqliteTable)("memory_fact",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),noteId:(0,e.int)("note_id").notNull().references(()=>q.id,{onDelete:"cascade"}),text:(0,f.text)("text").notNull(),isLatest:(0,e.int)("is_latest",{mode:"boolean"}).notNull().default(!0),alwaysLoad:(0,e.int)("always_load",{mode:"boolean"}).notNull().default(!1),source:(0,f.text)("source").$type(),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,b.index)("idx_memory_fact_note").on(a.noteId,a.isLatest),(0,b.index)("idx_memory_fact_always").on(a.alwaysLoad,a.isLatest)]),s=(0,g.sqliteTable)("memory_tidy_run",{id:(0,f.text)("id").primaryKey(),status:(0,f.text)("status").notNull().$type(),provider:(0,f.text)("provider").notNull(),model:(0,f.text)("model").notNull(),callIds:(0,f.text)("call_ids",{mode:"json"}).notNull().$type(),messages:(0,e.int)("messages").notNull().default(0),changes:(0,f.text)("changes",{mode:"json"}).notNull().$type().default([]),error:(0,f.text)("error"),inputTokens:(0,e.int)("input_tokens").notNull().default(0),outputTokens:(0,e.int)("output_tokens").notNull().default(0),startedAt:(0,e.int)("started_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),endedAt:(0,e.int)("ended_at",{mode:"timestamp"})}),t=(0,g.sqliteTable)("config",{key:(0,f.text)("key").primaryKey(),value:(0,f.text)("value").notNull()});a.s(["botMcpToolTable",0,l,"botNoteTable",0,i,"botTable",0,h,"callMessageTable",0,p,"callTable",0,o,"configTable",0,t,"mcpServerTable",0,j,"mcpToolTable",0,k,"memoryFactTable",0,r,"memoryNoteTable",0,q,"memoryTidyRunTable",0,s,"taskMessageTable",0,n,"taskTable",0,m])},689656,a=>{"use strict";var b=a.i(53112),c=a.i(223622);let d=b.z.enum(["openai","anthropic","google","xai","vercel-ai-gateway"]),e=b.z.object({provider:d,model:b.z.string().trim().min(1,"Model name is required").max(80)}),f=b.z.enum(c.REALTIME_PROVIDERS),g=b.z.object({provider:f,voice:b.z.string().trim().min(1).max(64).nullish(),model:b.z.string().trim().min(1).max(80).nullish()}),h=b.z.enum(["openai","google","xai","vercel-ai-gateway"]),i=b.z.object({provider:h,model:b.z.string().trim().min(1,"Model name is required").max(120)}),j={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",models:{image:[{id:"gpt-image-1-mini",label:"GPT Image 1 mini",tier:"small"},{id:"gpt-image-1.5",label:"GPT Image 1.5",tier:"mid"},{id:"gpt-image-2",label:"GPT Image 2",tier:"large"}],video:[],speech:[{id:"tts-1",label:"TTS 1",tier:"small"},{id:"gpt-4o-mini-tts",label:"4o mini TTS",tier:"mid"},{id:"tts-1-hd",label:"TTS 1 HD",tier:"large"}],transcription:[{id:"whisper-1",label:"Whisper",tier:"small"},{id:"gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"}]}},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",models:{image:[{id:"gemini-2.5-flash-image",label:"2.5 Flash Image",tier:"small"},{id:"gemini-3.1-flash-image-preview",label:"3.1 Flash Image",tier:"mid"},{id:"gemini-3-pro-image-preview",label:"3 Pro Image",tier:"large"}],video:[{id:"veo-3.1-lite-generate-preview",label:"Veo 3.1 Lite",tier:"small"},{id:"veo-3.1-fast-generate-preview",label:"Veo 3.1 Fast",tier:"mid"},{id:"veo-3.1-generate",label:"Veo 3.1",tier:"large"}],speech:[{id:"gemini-2.5-flash-preview-tts",label:"2.5 Flash TTS",tier:"small"},{id:"gemini-3.1-flash-tts-preview",label:"3.1 Flash TTS",tier:"mid"},{id:"gemini-2.5-pro-preview-tts",label:"2.5 Pro TTS",tier:"large"}],transcription:[{id:"gemini-3.5-transcribe",label:"3.5 Transcribe",tier:"mid"}]}},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",models:{image:[{id:"grok-imagine-image",label:"Grok Imagine",tier:"small"},{id:"grok-imagine-image-pro",label:"Grok Imagine Pro",tier:"mid"}],video:[{id:"grok-imagine-video",label:"Grok Imagine Video",tier:"small"},{id:"grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"}],speech:[{id:"grok-tts",label:"Grok TTS",tier:"mid"}],transcription:[{id:"grok-stt",label:"Grok STT",tier:"mid"}]}},"vercel-ai-gateway":{label:"Vercel AI GateWay",apiKeyName:"AI_GATEWAY_API_KEY",models:{image:[{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",tier:"small"},{id:"bfl/flux-2-klein-9b",label:"FLUX 2 Klein 9B",tier:"small"},{id:"spacexai/grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"small"},{id:"google/gemini-3.1-flash-image",label:"Gemini 3.1 Flash Image",tier:"mid"},{id:"bfl/flux-2-pro",label:"FLUX 2 Pro",tier:"mid"},{id:"bytedance/seedream-5.0-pro",label:"Seedream 5.0 Pro",tier:"mid"},{id:"recraft/recraft-v4.1",label:"Recraft V4.1",tier:"mid"},{id:"google/gemini-3-pro-image",label:"Gemini 3 Pro Image",tier:"large"},{id:"openai/gpt-image-2",label:"GPT Image 2",tier:"large"}],video:[{id:"bytedance/seedance-2.0-mini",label:"Seedance 2.0 Mini",tier:"small"},{id:"google/veo-3.1-lite-generate-001",label:"Veo 3.1 Lite",tier:"small"},{id:"alibaba/wan-v2.6-t2v",label:"Wan 2.6",tier:"small"},{id:"google/veo-3.1-fast-generate-001",label:"Veo 3.1 Fast",tier:"mid"},{id:"bytedance/seedance-2.5",label:"Seedance 2.5",tier:"mid"},{id:"spacexai/grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"},{id:"klingai/kling-v3.0-t2v",label:"Kling 3.0",tier:"large"},{id:"google/veo-3.1-generate-001",label:"Veo 3.1",tier:"large"}],speech:[{id:"fish-audio/s1",label:"Fish Audio S1",tier:"small"},{id:"openai/tts-1",label:"OpenAI TTS 1",tier:"small"},{id:"spacexai/grok-tts",label:"Grok TTS",tier:"mid"},{id:"fish-audio/s2.1-pro",label:"Fish Audio S2.1 Pro",tier:"mid"},{id:"openai/tts-1-hd",label:"OpenAI TTS 1 HD",tier:"large"}],transcription:[{id:"spacexai/grok-stt",label:"Grok STT",tier:"small"},{id:"fish-audio/transcribe-1",label:"Fish Transcribe 1",tier:"small"},{id:"openai/gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"openai/gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"},{id:"google/gemini-3.5-transcribe",label:"Gemini 3.5 Transcribe",tier:"mid"}]}}},k=Object.keys(j).map(a=>({id:a,...j[a]})),l={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",suggestModels:[{id:"gpt-5.6-luna",label:"5.6 Luna",tier:"small"},{id:"gpt-5.6-terra",label:"5.6 Terra",tier:"mid"},{id:"gpt-5.6-sol",label:"5.6 Sol",tier:"large"},{id:"gpt-6-astra",label:"6 Astra",tier:"large"}]},anthropic:{label:"Claude",apiKeyName:"ANTHROPIC_API_KEY",suggestModels:[{id:"claude-haiku-4-5-20251001",label:"Haiku 4.5",tier:"small"},{id:"claude-sonnet-5",label:"Sonnet 5",tier:"mid"},{id:"claude-opus-5",label:"Opus 5",tier:"large"},{id:"claude-fable-5-1",label:"Fable 5.1",tier:"large"}]},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",suggestModels:[{id:"gemini-3.8-flash",label:"3.8 Flash",tier:"mid"}]},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",suggestModels:[{id:"grok-4.6",label:"Grok 4.6",tier:"large"}]},"vercel-ai-gateway":{label:"Vercel AI GateWay",apiKeyName:"AI_GATEWAY_API_KEY",suggestModels:[{id:"zai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small"},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small"},{id:"openai/gpt-5.6-luna",label:"GPT 5.6 Luna",tier:"small"},{id:"zai/glm-5.3",label:"GLM 5.3",tier:"mid"},{id:"spacexai/grok-4.6",label:"Grok 4.6",tier:"mid"},{id:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5",tier:"mid"},{id:"openai/gpt-5.6-terra",label:"GPT 5.6 Terra",tier:"mid"},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid"},{id:"openai/gpt-5.6-sol",label:"GPT 5.6 Sol",tier:"large"},{id:"anthropic/claude-opus-5",label:"Claude Opus 5",tier:"large"}]}},m=(a,b)=>(a.suggestModels.find(a=>a.tier===b)??a.suggestModels[0])?.id,n={openai:{apiKeyName:l.openai.apiKeyName,label:l.openai.label,keyPrefix:["sk-"],models:[{id:"gpt-realtime-2.1",label:"Realtime 2.1"},{id:"gpt-realtime-2.1-mini",label:"Realtime 2.1 mini"},{id:"gpt-realtime-2",label:"Realtime 2"}],voices:["marin","cedar","alloy","ash","ballad","coral","echo","sage","shimmer","verse"],defaultVoice:"marin"},xai:{apiKeyName:l.xai.apiKeyName,label:l.xai.label,keyPrefix:["xai-"],models:[{id:"grok-voice-think-fast-2.0",label:"Voice Think Fast 2.0"},{id:"grok-voice-latest",label:"Voice latest"}],voices:["eve","ara","leo","rex","sal"],defaultVoice:"eve"}},o=Object.keys(n).map(a=>({id:a,...n[a]})),p=Object.keys(l).map(a=>({id:a,...l[a]}));a.s(["GATEWAY_TEXT",0,"language","MEDIA_MODEL_PROVIDERS",0,j,"MEDIA_MODEL_PROVIDER_LIST",0,k,"SPEACH_MODEL_PROVIDERS",0,n,"SPEACH_MODEL_PROVIDER_LIST",0,o,"TEXT_MODEL_PROVIDERS",0,l,"TEXT_MODEL_PROVIDER_LIST",0,p,"canMakeKind",0,(a,b)=>(j[a]?.models[b]?.length??0)>0,"cheapestModelOf",0,a=>m(a,"small"),"defaultModelOf",0,a=>m(a,"mid"),"parseMediaModel",0,function(a){let[b,...c]=(a??"").trim().split("/"),d=i.safeParse({provider:b,model:c.join("/")});return d.success?d.data:null},"parseTextModel",0,function(a){let[b,...c]=(a??"").trim().split("/"),d=e.safeParse({provider:b,model:c.join("/")});return d.success?d.data:null},"speachModelRefSchema",0,g,"textModelProviderSchema",0,d])},62721,a=>{"use strict";Array(8).fill(0);let b="currentColor",c=[{id:"system",label:"System",value:b},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"},{id:"navy",label:"Navy",value:"#1E3A8A",dark:!0},{id:"ocean",label:"Ocean",value:"#155E75",dark:!0},{id:"pine",label:"Pine",value:"#166534",dark:!0},{id:"moss",label:"Moss",value:"#3F6212",dark:!0},{id:"olive",label:"Olive",value:"#854D0E",dark:!0},{id:"rust",label:"Rust",value:"#9A3412",dark:!0},{id:"wine",label:"Wine",value:"#9F1239",dark:!0},{id:"plum",label:"Plum",value:"#6B21A8",dark:!0},{id:"grape",label:"Grape",value:"#5B21B6",dark:!0},{id:"iron",label:"Iron",value:"#334155",dark:!0}],d=Object.fromEntries(c.map(a=>[a.id,a.value])),e=c.filter(a=>a.value!==b).map(a=>a.value),f=[d.amber,d.red];c.filter(a=>a.value!==b&&!("dark"in a)).map(a=>a.value),c.filter(a=>"dark"in a).map(a=>a.value),a.s(["MARK_SHAPES",0,["blob","poly","squircle"],"randomMarkColors",0,function(a){let b=e.filter(a=>!f.includes(a));for(let a=b.length-1;a>0;a--){let c=Math.floor(Math.random()*(a+1));[b[a],b[c]]=[b[c],b[a]]}return b.slice(0,a)}],62721)},223622,a=>{"use strict";var b=a.i(53112);let c=b.z.object({value:b.z.string().min(1),expires_at:b.z.number()});a.s(["REALTIME_PROVIDERS",0,["openai","xai"],"RealtimeCredentialSchema",0,c])},280340,a=>{"use strict";var b=a.i(163227),c=a.i(351674),d=class{static [b.entityKind]="ConsoleLogWriter";write(a){console.log(a)}},e=class{static [b.entityKind]="DefaultLogger";writer;constructor(a){this.writer=a?.writer??new d}logQuery(a,b){let c=b.map(a=>{try{return JSON.stringify(a)}catch{return String(a)}}),d=c.length?` -- params: [${c.join(", ")}]`:"";this.writer.write(`Query: ${a}${d}`)}},f=class{static [b.entityKind]="NoopLogger";logQuery(){}},g=a.i(844551),h=class{static [b.entityKind]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(a){return this.then(void 0,a)}finally(a){return this.then(b=>(a?.(),b),b=>{throw a?.(),b})}then(a,b){return this.execute().then(a,b)}},i=c,j=class a extends i.SQL{static [b.entityKind]="SQLiteCountBuilder";dialect;session;static buildCount(a,b,c){let d=i.sql`select count(*) from ${a}${i.sql` where ${b}`.if(b)}`;return c?i.sql`(${d})`:d}constructor(b){super(a.buildCount(b.source,b.filters,!0).queryChunks),this.countConfig=b,this.dialect=b.dialect,this.session=b.session,this.mapWith(a=>"number"==typeof a?a:Number(a??0))}executableSql;build(){if(!this.executableSql){let{source:b,filters:c}=this.countConfig;this.executableSql=a.buildCount(b,c)}return this.dialect.sqlToQuery(this.executableSql)}},k=class extends j{static [b.entityKind]="SQLiteAsyncCountBuilder";constructor(a){super(a)}executeRaw(a){return this.session.prepareQuery(this.build(),"arrays",!1,"all",a=>{let b=a[0]?.[0];return"number"==typeof b?b:b?Number(b):0}).execute(a)}async execute(a){return await this.executeRaw(a)}};(0,g.applyMixins)(k,[h]);var l=class extends k{static [b.entityKind]="SQLiteSyncCountBuilder";sync(a){return this.executeRaw(a).sync()}},m=class{static [b.entityKind]="SQLiteRelationalQueryBuilderV2";constructor(a,b,c,d,e,f,g,h=n){this.mode=a,this.schema=b,this.table=c,this.tableConfig=d,this.dialect=e,this.session=f,this.forbidJsonb=g,this.builder=h}findMany(a){return new this.builder(this.mode,this.schema,this.table,this.tableConfig,this.dialect,this.session,a??!0,"many",this.forbidJsonb)}findFirst(a){return new this.builder(this.mode,this.schema,this.table,this.tableConfig,this.dialect,this.session,a??!0,"first",this.forbidJsonb)}},n=class{static [b.entityKind]="SQLiteRelationalQueryV2";mode;table;resultKind;constructor(a,b,c,d,e,f,g,h,i){this.schema=b,this.tableConfig=d,this.dialect=e,this.session=f,this.config=g,this.forbidJsonb=i,this.resultKind=a,this.mode=h,this.table=c}getSQL(){return this._getQuery().sql}_getQuery(){let a=this.forbidJsonb?c.sql`json`:c.sql`jsonb`;return this.dialect.buildRelationalQuery({schema:this.schema,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,mode:this.mode,jsonb:a})}_toSQL(){let a=this._getQuery();return{query:a,builtQuery:this.dialect.sqlToQuery(a.sql)}}toSQL(){return this._toSQL().builtQuery}},o=class extends n{static [b.entityKind]="SQLiteAsyncRelationalQueryV2";_prepare(a=!1){let{query:b,builtQuery:c}=this._toSQL(),d=this.dialect.mapperGenerators.relationalRows({isFirst:"first"===this.mode,parseJson:!0,parseJsonIfString:!1,rootJsonMappers:!1,selection:b.selection,arrayModeRoot:!0});return this.session.prepareQuery(c,"arrays",a,"all",d)}prepare(){return this._prepare(!0)}async execute(a){return this._prepare().execute(a)}},p=class extends o{static [b.entityKind]="SQLiteSyncRelationalQueryV2";sync(a){return this._prepare().execute(a).sync()}};(0,g.applyMixins)(o,[h]);var q=a.i(704501),r=a.i(494415),s=a.i(355280),t=a.i(888707),u=a.i(420713),v=class{static [b.entityKind]="ColumnTableAliasProxyHandler";constructor(a,b){this.table=a,this.ignoreColumnAlias=b}get(a,b){return"table"===b?this.table:("isAlias"!==b||!this.ignoreColumnAlias)&&a[b]}},w=class{static [b.entityKind]="ViewSelectionAliasProxyHandler";constructor(a,b,c){this.view=a,this.selection=b,this.ignoreColumnAlias=c}get(a,d){let e=a[d];return(0,b.is)(e,r.Column)?new Proxy(e,new v(this.view,this.ignoreColumnAlias)):(0,b.is)(e,q.Subquery)||(0,b.is)(e,c.SQL)||(0,b.is)(e,c.SQL.Aliased)||(0,c.isSQLWrapper)(e)||"object"!=typeof e||null===e?e:new Proxy(e,this)}},x=class{static [b.entityKind]="TableAliasProxyHandler";constructor(a,b,c){this.alias=a,this.replaceOriginalName=b,this.ignoreColumnAlias=c}get(a,d){if(d===u.Table.Symbol.IsAlias)return!0;if(d===u.Table.Symbol.Name||this.replaceOriginalName&&d===u.Table.Symbol.OriginalName)return this.alias;if(d===s.ViewBaseConfig)return{...a[s.ViewBaseConfig],name:this.alias,isAlias:!0,selectedFields:new Proxy(a[s.ViewBaseConfig].selectedFields,new w(new Proxy(a,this),a[s.ViewBaseConfig].selectedFields,this.ignoreColumnAlias))};if(d===u.Table.Symbol.Columns){let d=a[u.Table.Symbol.Columns];if(!d)return d;if((0,b.is)(a,c.View))return new Proxy(a[u.Table.Symbol.Columns],new w(new Proxy(a,this),a[u.Table.Symbol.Columns],this.ignoreColumnAlias));let e={};return Object.keys(d).map(b=>{e[b]=new Proxy(d[b],new v(new Proxy(a,this),this.ignoreColumnAlias))}),e}let e=a[d];return(0,b.is)(e,r.Column)?new Proxy(e,new v(new Proxy(a,this),this.ignoreColumnAlias)):e}},y=class{static [b.entityKind]="ColumnAliasProxyHandler";constructor(a){this.alias=a}get(a,b){return"isAlias"===b||("name"===b?this.alias:"keyAsName"!==b&&(b===t.OriginalColumn?()=>a:a[b]))}};function z(a,b){return new Proxy(a,new x(b,!1,!1))}function A(a){return a[t.OriginalColumn]()}b.entityKind,r.Column.prototype.as=function(a){return new Proxy(this,new y(a))};var B=class a{static [b.entityKind]="SelectionProxyHandler";config;constructor(a){this.config={...a}}get(d,e){if("_"===e)return{...d._,selectedFields:new Proxy(d._.selectedFields,this)};if(e===s.ViewBaseConfig)return{...d[s.ViewBaseConfig],selectedFields:new Proxy(d[s.ViewBaseConfig].selectedFields,this)};if("symbol"==typeof e)return d[e];let f=((0,b.is)(d,q.Subquery)?d._.selectedFields:(0,b.is)(d,c.View)?d[s.ViewBaseConfig].selectedFields:d)[e];if((0,b.is)(f,c.SQL.Aliased)){if("sql"===this.config.sqlAliasedBehavior&&!f.isSelectionField)return f.sql;let a=f.clone();return a.isSelectionField=!0,a.origin=this.config.alias,a}if((0,b.is)(f,c.SQL)){if("sql"===this.config.sqlBehavior)return f;throw Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return(0,b.is)(f,r.Column)?this.config.alias?new Proxy(f,new v(new Proxy(f.table,new x(this.config.alias,this.config.replaceOriginalName??!1,!0)),!0)):f:"object"!=typeof f||null===f?f:new Proxy(f,new a(this.config))}},C=a.i(885880);function D(a){return(0,b.is)(a,C.SQLiteTable)?[`${a[u.Table.Symbol.BaseName]}`]:(0,b.is)(a,q.Subquery)?a._.usedTables??[]:(0,b.is)(a,c.SQL)?a.usedTables??[]:[]}b.entityKind,b.entityKind,a.i(459547),a.i(49701),a.i(738538),a.i(169565);var E=class{static [b.entityKind]="SQLiteDelete";config;constructor(a,b,c,d){this.table=a,this.session=b,this.dialect=c,this.config={table:a,withList:d}}where(a){return this.config.where=a,this}orderBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.table[u.Table.Symbol.Columns],new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),c=Array.isArray(b)?b:[b];this.config.orderBy=c}else this.config.orderBy=a;return this}limit(a){return this.config.limit=a,this}returning(a=this.table[C.SQLiteTable.Symbol.Columns]){return this.config.returning=(0,g.orderSelectedFields)(a),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){return this.dialect.sqlToQuery(this.getSQL())}$dynamic(){return this}},F=class extends E{static [b.entityKind]="SQLiteAsyncDelete";_prepare(a=!1){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),"arrays",a,this.config.returning?"all":"run",this.config.returning?this.dialect.mapperGenerators.rows(this.config.returning,void 0):void 0,{type:"delete",tables:D(this.config.table)})}prepare(){return this._prepare(!0)}run=a=>this._prepare().run(a);all=a=>this._prepare().all(a);get=a=>this._prepare().get(a);values=a=>this._prepare().values(a);async execute(a){return this._prepare().execute(a)}};(0,g.applyMixins)(F,[h]);var G=c,H=class extends G.View{static [b.entityKind]="SQLiteViewBase"},I=class{static [b.entityKind]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}withoutSelectionCastCodecs(){return this}},J=class{static [b.entityKind]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor(a,b=K){this.builder=b,this.fields=a.fields,this.session=a.session,this.dialect=a.dialect,this.withList=a.withList,this.distinct=a.distinct}from(a){let d,e=!!this.fields;return d=this.fields?this.fields:(0,b.is)(a,q.Subquery)?Object.fromEntries(Object.keys(a._.selectedFields).map(b=>[b,a[b]])):(0,b.is)(a,H)?a[s.ViewBaseConfig].selectedFields:(0,b.is)(a,c.SQL)?{}:(0,g.getTableColumns)(a),new this.builder({table:a,fields:d,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList??[],distinct:this.distinct})}},K=class extends I{static [b.entityKind]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:a,fields:b,isPartialSelect:c,session:d,dialect:e,withList:f,distinct:h}){for(const i of(super(),this.config={withList:f,table:a,fields:{...b},distinct:h,setOperators:[]},this.isPartialSelect=c,this.session=d,this.dialect=e,this._={selectedFields:b,config:this.config},this.tableName=(0,g.getTableLikeName)(a),this.joinsNotNullableMap="string"==typeof this.tableName?{[this.tableName]:!0}:{},D(a)))this.usedTables.add(i)}getUsedTables(){return[...this.usedTables]}createJoin(a){return(d,e)=>{let f=this.tableName,h=(0,g.getTableLikeName)(d);for(let a of D(d))this.usedTables.add(a);if("string"==typeof h&&this.config.joins?.some(a=>a.alias===h))throw Error(`Alias "${h}" is already used in this query`);if(!this.isPartialSelect&&(1===Object.keys(this.joinsNotNullableMap).length&&"string"==typeof f&&(this.config.fields={[f]:this.config.fields}),"string"==typeof h&&!(0,b.is)(d,c.SQL))){let a=(0,b.is)(d,q.Subquery)?d._.selectedFields:(0,b.is)(d,c.View)?d[s.ViewBaseConfig].selectedFields:d[u.Table.Symbol.Columns];this.config.fields[h]=a}if("function"==typeof e&&(e=e(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:e,table:d,joinType:a,alias:h}),"string"==typeof h)switch(a){case"left":this.joinsNotNullableMap[h]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[h]=!0;break;case"cross":case"inner":this.joinsNotNullableMap[h]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[h]=!1}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");crossJoin=this.createJoin("cross");createSetOperator(a,b){return c=>{let d="function"==typeof c?c(M()):c;if(!(0,g.haveSameKeys)(this.getSelectedFields(),d.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:a,isAll:b,rightSelect:d}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators(a){return this.config.setOperators.push(...a),this}where(a){return"function"==typeof a&&(a=a(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=a,this}having(a){return"function"==typeof a&&(a=a(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=a,this}groupBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.fields,new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(b)?b:[b]}else this.config.groupBy=a;return this}orderBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.fields,new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),c=Array.isArray(b)?b:[b];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=c:this.config.orderBy=c}else this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=a:this.config.orderBy=a;return this}limit(a){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=a:this.config.limit=a,this}offset(a){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=a:this.config.offset=a,this}$withCache(a){return this.cacheConfig=void 0===a?{config:{},enabled:!0,autoInvalidate:!0}:!1===a?{enabled:!1}:{enabled:!0,autoInvalidate:!0,...a},this}getSQL(){return this.config.fieldsFlat=(0,g.orderSelectedFields)(this.config.fields),this.dialect.buildSelectQuery(this.config)}toSQL(){return this.dialect.sqlToQuery(this.getSQL())}as(a){let b=[];if(b.push(...D(this.config.table)),this.config.joins)for(let a of this.config.joins)b.push(...D(a.table));return new Proxy(new q.Subquery(this.getSQL(),this.config.fields,a,!1,[...new Set(b)]),new B({alias:a,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new B({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}withoutSelectionCastCodecs(){return this}$dynamic(){return this}};function L(a,b){return(c,d,...e)=>{let f=[d,...e].map(c=>({type:a,isAll:b,rightSelect:c}));for(let a of f)if(!(0,g.haveSameKeys)(c.getSelectedFields(),a.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return c.addSetOperators(f)}}let M=()=>({union:N,unionAll:O,intersect:P,except:Q}),N=L("union",!1),O=L("union",!0),P=L("intersect",!1),Q=L("except",!1);var R=class extends Error{static [b.entityKind]="DrizzleError";constructor({message:a,cause:b}){super(a),this.name="DrizzleError",this.cause=b}},S=class a extends Error{static [b.entityKind]="DrizzleQueryError";constructor(b,c,d){super(`Failed query: ${b}
|
|
1
|
+
module.exports=[184838,a=>a.a(async(b,c)=>{try{let l,m;var d,e=a.i(902157),f=a.i(750227),g=a.i(418520),h=a.i(624495),i=a.i(569572),j=a.i(182248),k=b([g,h]);[g,h]=k.then?(await k)():k;let n=i.DB_FILE_NAME.replace(/^file:/,"");(0,e.mkdirSync)((0,f.dirname)(n),{recursive:!0});let o=globalThis.__dbClient??=(d=((l=(0,g.createClient)({url:i.DB_FILE_NAME,timeout:5e3})).execute("PRAGMA journal_mode = WAL"),l),m=(0,j.PromiseChain)(),{...d,execute:(...a)=>m(()=>d.execute(...a)),batch:(...a)=>m(()=>d.batch(...a)),executeMultiple:(...a)=>m(()=>d.executeMultiple(...a)),migrate:(...a)=>m(()=>d.migrate(...a)),async transaction(...a){let b,c=await new Promise(a=>{let b,c=new Promise(a=>{b=a});m(async()=>{a(b),await c})});try{b=await d.transaction(...a)}catch(a){throw c(),a}let e=!1,f=()=>{e||(e=!0,c())};return{execute:(...a)=>b.execute(...a),batch:(...a)=>b.batch(...a),executeMultiple:(...a)=>b.executeMultiple(...a),get closed(){return b.closed},commit:()=>b.commit().finally(f),rollback:()=>b.rollback().finally(f),close:()=>{try{b.close()}finally{f()}}}}}),p=(0,h.drizzle)({client:o});a.s(["database",0,p]),c()}catch(a){c(a)}},!1),714428,a=>{"use strict";var b=a.i(49701),c=a.i(738538),d=a.i(169565),e=a.i(933625),f=a.i(903413),g=a.i(885880);let h=(0,g.sqliteTable)("bot",{name:(0,f.text)("name").primaryKey(),description:(0,f.text)("description").notNull(),systemPrompt:(0,f.text)("system_prompt"),icon:(0,f.text)("icon",{mode:"json"}).$type(),provider:(0,f.text)("provider").$type(),model:(0,f.text)("model"),compactAt:(0,e.int)("compact_at"),disabled:(0,e.int)("disabled",{mode:"boolean"}).notNull().default(!1),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),i=(0,g.sqliteTable)("mcp_server",{name:(0,f.text)("name").primaryKey(),config:(0,f.text)("config",{mode:"json"}).notNull().$type(),toolsSyncedAt:(0,e.int)("tools_synced_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),lastError:(0,f.text)("last_error"),oauth:(0,f.text)("oauth",{mode:"json"}).$type(),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),j=(0,g.sqliteTable)("mcp_tool",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),serverName:(0,f.text)("server_name").notNull().references(()=>i.name,{onDelete:"cascade"}),name:(0,f.text)("name").notNull(),description:(0,f.text)("description"),inputSchema:(0,f.text)("input_schema",{mode:"json"}).$type(),outputSchema:(0,f.text)("output_schema",{mode:"json"}).$type()},a=>[(0,d.unique)("uq_mcp_tool_server_name").on(a.serverName,a.name)]),k=(0,g.sqliteTable)("bot_mcp_tool",{botName:(0,f.text)().notNull().references(()=>h.name,{onDelete:"cascade"}),toolId:(0,e.int)("tool_id").notNull().references(()=>j.id,{onDelete:"cascade"})},a=>[(0,c.primaryKey)({columns:[a.botName,a.toolId]})]),l=(0,g.sqliteTable)("task",{id:(0,f.text)("id").primaryKey(),bot:(0,f.text)("bot").notNull(),label:(0,f.text)("label").notNull(),request:(0,f.text)("request").notNull(),status:(0,f.text)("status").notNull().$type(),outcome:(0,f.text)("outcome"),pending:(0,f.text)("pending",{mode:"json"}).$type(),seen:(0,e.int)("seen",{mode:"boolean"}).notNull().default(!1),callId:(0,f.text)("call_id"),inputTokens:(0,e.int)("input_tokens").notNull().default(0),outputTokens:(0,e.int)("output_tokens").notNull().default(0),contextTokens:(0,e.int)("context_tokens").notNull().default(0),contextBudget:(0,e.int)("context_budget").notNull().default(0),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,e.int)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),endedAt:(0,e.int)("ended_at",{mode:"timestamp"})}),m=(0,g.sqliteTable)("task_message",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),taskId:(0,f.text)("task_id").notNull().references(()=>l.id,{onDelete:"cascade"}),seq:(0,e.int)("seq").notNull(),bot:(0,f.text)("bot"),parent:(0,f.text)("parent"),role:(0,f.text)("role").notNull().$type(),content:(0,f.text)("content",{mode:"json"}).notNull().$type(),compact:(0,e.int)("compact",{mode:"boolean"}).notNull().default(!1),note:(0,e.int)("note",{mode:"boolean"}).notNull().default(!1),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,d.unique)("uq_task_message_seq").on(a.taskId,a.seq)]),n=(0,g.sqliteTable)("call",{id:(0,f.text)("id").primaryKey(),provider:(0,f.text)("provider").notNull(),model:(0,f.text)("model").notNull(),startedAt:(0,e.int)("started_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),endedAt:(0,e.int)("ended_at",{mode:"timestamp"})}),o=(0,g.sqliteTable)("call_message",{callId:(0,f.text)("call_id").notNull().references(()=>n.id,{onDelete:"cascade"}),id:(0,f.text)("id").notNull(),seq:(0,e.int)("seq").notNull(),role:(0,f.text)("role").notNull().$type(),tool:(0,f.text)("tool"),text:(0,f.text)("text").notNull(),at:(0,e.int)("at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,c.primaryKey)({columns:[a.callId,a.id]}),(0,b.index)("idx_call_message_call").on(a.callId,a.seq)]),p=(0,g.sqliteTable)("memory_note",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),path:(0,f.text)("path").notNull().unique(),description:(0,f.text)("description").notNull(),aliases:(0,f.text)("aliases",{mode:"json"}).$type().default([]),ownedByUser:(0,e.int)("owned_by_user",{mode:"boolean"}).notNull().default(!1),hits:(0,e.int)("hits").notNull().default(0),lastReadAt:(0,e.int)("last_read_at",{mode:"timestamp"}),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,e.int)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),q=(0,g.sqliteTable)("memory_fact",{id:(0,e.int)("id").primaryKey({autoIncrement:!0}),noteId:(0,e.int)("note_id").notNull().references(()=>p.id,{onDelete:"cascade"}),text:(0,f.text)("text").notNull(),isLatest:(0,e.int)("is_latest",{mode:"boolean"}).notNull().default(!0),alwaysLoad:(0,e.int)("always_load",{mode:"boolean"}).notNull().default(!1),source:(0,f.text)("source").$type(),callId:(0,f.text)("call_id").references(()=>n.id,{onDelete:"set null"}),createdAt:(0,e.int)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},a=>[(0,b.index)("idx_memory_fact_note").on(a.noteId,a.isLatest),(0,b.index)("idx_memory_fact_always").on(a.alwaysLoad,a.isLatest),(0,b.index)("idx_memory_fact_call").on(a.callId)]),r=(0,g.sqliteTable)("config",{key:(0,f.text)("key").primaryKey(),value:(0,f.text)("value").notNull()});a.s(["botMcpToolTable",0,k,"botTable",0,h,"callMessageTable",0,o,"callTable",0,n,"configTable",0,r,"mcpServerTable",0,i,"mcpToolTable",0,j,"memoryFactTable",0,q,"memoryNoteTable",0,p,"taskMessageTable",0,m,"taskTable",0,l])},689656,a=>{"use strict";var b=a.i(53112),c=a.i(569572),d=a.i(223622);let e=b.z.enum(["openai","chatgpt","anthropic","google","xai","vercel-ai-gateway"]),f=b.z.object({provider:e,model:b.z.string().trim().min(1,"Model name is required").max(80)}),g=b.z.enum(d.REALTIME_PROVIDERS),h=b.z.object({provider:g,voice:b.z.string().trim().min(1).max(64).nullish(),model:b.z.string().trim().min(1).max(80).nullish()}),i=b.z.enum(["openai","google","xai","vercel-ai-gateway"]),j=b.z.object({provider:i,model:b.z.string().trim().min(1,"Model name is required").max(120)}),k={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",models:{image:[{id:"gpt-image-1-mini",label:"GPT Image 1 mini",tier:"small"},{id:"gpt-image-2.5-flare",label:"GPT Image 2.5 Flare",tier:"mid"},{id:"gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[],speech:[{id:"tts-1",label:"TTS 1",tier:"small"},{id:"gpt-4o-mini-tts",label:"4o mini TTS",tier:"mid"},{id:"tts-1-hd",label:"TTS 1 HD",tier:"large"}],transcription:[{id:"gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"gpt-transcribe",label:"GPT Transcribe",tier:"mid"}]}},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",models:{image:[{id:"gemini-3.1-flash-lite-image",label:"3.1 Flash Lite Image",tier:"small"},{id:"gemini-3.1-flash-image",label:"3.1 Flash Image",tier:"mid"},{id:"gemini-3-pro-image",label:"3 Pro Image",tier:"large"}],video:[{id:"veo-3.1-lite-generate-preview",label:"Veo 3.1 Lite",tier:"small"},{id:"veo-3.1-fast-generate-preview",label:"Veo 3.1 Fast",tier:"mid"},{id:"veo-3.1-generate-preview",label:"Veo 3.1",tier:"large"}],speech:[{id:"gemini-2.5-flash-preview-tts",label:"2.5 Flash TTS",tier:"small"},{id:"gemini-3.1-flash-tts-preview",label:"3.1 Flash TTS",tier:"mid"},{id:"gemini-2.5-pro-preview-tts",label:"2.5 Pro TTS",tier:"large"}],transcription:[{id:"gemini-3.5-transcribe",label:"3.5 Transcribe",tier:"mid"}]}},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",models:{image:[{id:"grok-imagine-image",label:"Grok Imagine",tier:"small"},{id:"grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"mid"}],video:[{id:"grok-imagine-video",label:"Grok Imagine Video",tier:"small"},{id:"grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"}],speech:[{id:"grok-tts",label:"Grok TTS",tier:"mid"}],transcription:[{id:"grok-stt",label:"Grok STT",tier:"mid"}]}},"vercel-ai-gateway":{label:"Vercel AI GateWay",apiKeyName:"AI_GATEWAY_API_KEY",models:{image:[{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",tier:"small"},{id:"bfl/flux-2-klein-9b",label:"FLUX 2 Klein 9B",tier:"small"},{id:"spacexai/grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"small"},{id:"google/gemini-3.1-flash-image",label:"Gemini 3.1 Flash Image",tier:"mid"},{id:"bfl/flux-2-pro",label:"FLUX 2 Pro",tier:"mid"},{id:"bytedance/seedream-5.0-pro",label:"Seedream 5.0 Pro",tier:"mid"},{id:"recraft/recraft-v4.1",label:"Recraft V4.1",tier:"mid"},{id:"google/gemini-3-pro-image",label:"Gemini 3 Pro Image",tier:"large"},{id:"openai/gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[{id:"bytedance/seedance-2.0-mini",label:"Seedance 2.0 Mini",tier:"small"},{id:"google/veo-3.1-lite-generate-001",label:"Veo 3.1 Lite",tier:"small"},{id:"alibaba/wan-v2.6-t2v",label:"Wan 2.6",tier:"small"},{id:"google/veo-3.1-fast-generate-001",label:"Veo 3.1 Fast",tier:"mid"},{id:"bytedance/seedance-2.5",label:"Seedance 2.5",tier:"mid"},{id:"spacexai/grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"},{id:"klingai/kling-v3.0-t2v",label:"Kling 3.0",tier:"large"},{id:"google/veo-3.1-generate-001",label:"Veo 3.1",tier:"large"}],speech:[{id:"fish-audio/s1",label:"Fish Audio S1",tier:"small"},{id:"openai/tts-1",label:"OpenAI TTS 1",tier:"small"},{id:"spacexai/grok-tts",label:"Grok TTS",tier:"mid"},{id:"fish-audio/s2.1-pro",label:"Fish Audio S2.1 Pro",tier:"mid"},{id:"openai/tts-1-hd",label:"OpenAI TTS 1 HD",tier:"large"}],transcription:[{id:"spacexai/grok-stt",label:"Grok STT",tier:"small"},{id:"fish-audio/transcribe-1",label:"Fish Transcribe 1",tier:"small"},{id:"openai/gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"openai/gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"},{id:"google/gemini-3.5-transcribe",label:"Gemini 3.5 Transcribe",tier:"mid"}]}}},l=Object.keys(k).map(a=>({id:a,...k[a]})),m={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",suggestModels:[{id:"gpt-5.6-luna",label:"5.6 Luna",tier:"small",context:105e4},{id:"gpt-5.6-terra",label:"5.6 Terra",tier:"mid",context:105e4},{id:"gpt-5.6-sol",label:"5.6 Sol",tier:"large",context:105e4},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:105e4}]},chatgpt:{label:"GPT Subscription",apiKeyName:"CHATGPT_SIGN_IN",signIn:!0,suggestModels:[{id:"gpt-5.6-luna",label:"5.6 Luna",tier:"small",context:272e3},{id:"gpt-5.6-terra",label:"5.6 Terra",tier:"mid",context:272e3},{id:"gpt-5.6-sol",label:"5.6 Sol",tier:"large",context:272e3},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:272e3}]},anthropic:{label:"Claude",apiKeyName:"ANTHROPIC_API_KEY",suggestModels:[{id:"claude-haiku-4-5",label:"Haiku 4.5",tier:"small"},{id:"claude-sonnet-5",label:"Sonnet 5",tier:"mid",context:1e6},{id:"claude-opus-5",label:"Opus 5",tier:"large",context:1e6},{id:"claude-fable-5-1",label:"Fable 5.1",tier:"large"}]},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",suggestModels:[{id:"gemini-3.5-flash-lite",label:"3.5 Flash Lite",tier:"small",context:1e6},{id:"gemini-3.8-flash",label:"3.8 Flash",tier:"mid",context:1e6}]},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",suggestModels:[{id:"grok-4.6",label:"Grok 4.6",tier:"large",context:5e5}]},"vercel-ai-gateway":{label:"Vercel AI GateWay",apiKeyName:"AI_GATEWAY_API_KEY",suggestModels:[{id:"zai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small"},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small"},{id:"openai/gpt-5.6-luna",label:"GPT 5.6 Luna",tier:"small",context:105e4},{id:"zai/glm-5.3",label:"GLM 5.3",tier:"mid"},{id:"spacexai/grok-4.6",label:"Grok 4.6",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5",tier:"mid"},{id:"openai/gpt-5.6-terra",label:"GPT 5.6 Terra",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid"},{id:"openai/gpt-5.6-sol",label:"GPT 5.6 Sol",tier:"large",context:105e4},{id:"anthropic/claude-opus-5",label:"Claude Opus 5",tier:"large",context:1e6},{id:"openai/gpt-6-astra",label:"GPT 6 Astra",tier:"large",context:105e4}]}},n={openai:{apiKeyName:m.openai.apiKeyName,label:m.openai.label,keyPrefix:["sk-"],models:[{id:"gpt-realtime-2.1",label:"Realtime 2.1"},{id:"gpt-realtime-2.1-mini",label:"Realtime 2.1 mini"},{id:"gpt-realtime-2",label:"Realtime 2"}],voices:["marin","cedar","alloy","ash","ballad","coral","echo","sage","shimmer","verse"],defaultVoice:"marin"},xai:{apiKeyName:m.xai.apiKeyName,label:m.xai.label,keyPrefix:["xai-"],models:[{id:"grok-voice-think-fast-2.0",label:"Voice Think Fast 2.0"},{id:"grok-voice-latest",label:"Voice latest"}],voices:["eve","ara","leo","rex","sal"],defaultVoice:"eve"}},o=Object.keys(n).map(a=>({id:a,...n[a]})),p=Object.keys(m).map(a=>({id:a,...m[a]}));a.s(["GATEWAY_TEXT",0,"language","MEDIA_MODEL_PROVIDERS",0,k,"MEDIA_MODEL_PROVIDER_LIST",0,l,"SPEACH_MODEL_PROVIDERS",0,n,"SPEACH_MODEL_PROVIDER_LIST",0,o,"TEXT_MODEL_PROVIDERS",0,m,"TEXT_MODEL_PROVIDER_LIST",0,p,"canMakeKind",0,(a,b)=>(k[a]?.models[b]?.length??0)>0,"compactAtFor",0,a=>a&&a>0?Math.round(a*c.BOT_RUN.compactHeadroom):c.BOT_RUN.compactAt,"contextWindowOf",0,function(a,b,c=[]){if("vercel-ai-gateway"===a)return c.find(a=>a.id===b)?.contextWindow??null;let d=m[a].suggestModels;return d.find(a=>a.id===b)?.context??null},"defaultModelOf",0,a=>(a.suggestModels.find(a=>"mid"===a.tier)??a.suggestModels[0])?.id,"parseMediaModel",0,function(a){let[b,...c]=(a??"").trim().split("/"),d=j.safeParse({provider:b,model:c.join("/")});return d.success?d.data:null},"parseTextModel",0,function(a){let[b,...c]=(a??"").trim().split("/"),d=f.safeParse({provider:b,model:c.join("/")});return d.success?d.data:null},"speachModelRefSchema",0,h,"textModelProviderSchema",0,e])},62721,a=>{"use strict";Array(8).fill(0);let b="currentColor",c=[{id:"system",label:"System",value:b},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"},{id:"navy",label:"Navy",value:"#1E3A8A",dark:!0},{id:"ocean",label:"Ocean",value:"#155E75",dark:!0},{id:"pine",label:"Pine",value:"#166534",dark:!0},{id:"moss",label:"Moss",value:"#3F6212",dark:!0},{id:"olive",label:"Olive",value:"#854D0E",dark:!0},{id:"rust",label:"Rust",value:"#9A3412",dark:!0},{id:"wine",label:"Wine",value:"#9F1239",dark:!0},{id:"plum",label:"Plum",value:"#6B21A8",dark:!0},{id:"grape",label:"Grape",value:"#5B21B6",dark:!0},{id:"iron",label:"Iron",value:"#334155",dark:!0}],d=Object.fromEntries(c.map(a=>[a.id,a.value])),e=c.filter(a=>a.value!==b).map(a=>a.value),f=[d.amber,d.red];c.filter(a=>a.value!==b&&!("dark"in a)).map(a=>a.value),c.filter(a=>"dark"in a).map(a=>a.value),a.s(["MARK_SHAPES",0,["blob","poly","squircle"],"randomMarkColors",0,function(a){let b=e.filter(a=>!f.includes(a));for(let a=b.length-1;a>0;a--){let c=Math.floor(Math.random()*(a+1));[b[a],b[c]]=[b[c],b[a]]}return b.slice(0,a)}],62721)},223622,a=>{"use strict";var b=a.i(53112);let c=b.z.object({value:b.z.string().min(1),expires_at:b.z.number()});a.s(["REALTIME_PROVIDERS",0,["openai","xai"],"RealtimeCredentialSchema",0,c])},280340,a=>{"use strict";var b=a.i(163227),c=a.i(351674),d=class{static [b.entityKind]="ConsoleLogWriter";write(a){console.log(a)}},e=class{static [b.entityKind]="DefaultLogger";writer;constructor(a){this.writer=a?.writer??new d}logQuery(a,b){let c=b.map(a=>{try{return JSON.stringify(a)}catch{return String(a)}}),d=c.length?` -- params: [${c.join(", ")}]`:"";this.writer.write(`Query: ${a}${d}`)}},f=class{static [b.entityKind]="NoopLogger";logQuery(){}},g=a.i(844551),h=class{static [b.entityKind]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(a){return this.then(void 0,a)}finally(a){return this.then(b=>(a?.(),b),b=>{throw a?.(),b})}then(a,b){return this.execute().then(a,b)}},i=c,j=class a extends i.SQL{static [b.entityKind]="SQLiteCountBuilder";dialect;session;static buildCount(a,b,c){let d=i.sql`select count(*) from ${a}${i.sql` where ${b}`.if(b)}`;return c?i.sql`(${d})`:d}constructor(b){super(a.buildCount(b.source,b.filters,!0).queryChunks),this.countConfig=b,this.dialect=b.dialect,this.session=b.session,this.mapWith(a=>"number"==typeof a?a:Number(a??0))}executableSql;build(){if(!this.executableSql){let{source:b,filters:c}=this.countConfig;this.executableSql=a.buildCount(b,c)}return this.dialect.sqlToQuery(this.executableSql)}},k=class extends j{static [b.entityKind]="SQLiteAsyncCountBuilder";constructor(a){super(a)}executeRaw(a){return this.session.prepareQuery(this.build(),"arrays",!1,"all",a=>{let b=a[0]?.[0];return"number"==typeof b?b:b?Number(b):0}).execute(a)}async execute(a){return await this.executeRaw(a)}};(0,g.applyMixins)(k,[h]);var l=class extends k{static [b.entityKind]="SQLiteSyncCountBuilder";sync(a){return this.executeRaw(a).sync()}},m=class{static [b.entityKind]="SQLiteRelationalQueryBuilderV2";constructor(a,b,c,d,e,f,g,h=n){this.mode=a,this.schema=b,this.table=c,this.tableConfig=d,this.dialect=e,this.session=f,this.forbidJsonb=g,this.builder=h}findMany(a){return new this.builder(this.mode,this.schema,this.table,this.tableConfig,this.dialect,this.session,a??!0,"many",this.forbidJsonb)}findFirst(a){return new this.builder(this.mode,this.schema,this.table,this.tableConfig,this.dialect,this.session,a??!0,"first",this.forbidJsonb)}},n=class{static [b.entityKind]="SQLiteRelationalQueryV2";mode;table;resultKind;constructor(a,b,c,d,e,f,g,h,i){this.schema=b,this.tableConfig=d,this.dialect=e,this.session=f,this.config=g,this.forbidJsonb=i,this.resultKind=a,this.mode=h,this.table=c}getSQL(){return this._getQuery().sql}_getQuery(){let a=this.forbidJsonb?c.sql`json`:c.sql`jsonb`;return this.dialect.buildRelationalQuery({schema:this.schema,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,mode:this.mode,jsonb:a})}_toSQL(){let a=this._getQuery();return{query:a,builtQuery:this.dialect.sqlToQuery(a.sql)}}toSQL(){return this._toSQL().builtQuery}},o=class extends n{static [b.entityKind]="SQLiteAsyncRelationalQueryV2";_prepare(a=!1){let{query:b,builtQuery:c}=this._toSQL(),d=this.dialect.mapperGenerators.relationalRows({isFirst:"first"===this.mode,parseJson:!0,parseJsonIfString:!1,rootJsonMappers:!1,selection:b.selection,arrayModeRoot:!0});return this.session.prepareQuery(c,"arrays",a,"all",d)}prepare(){return this._prepare(!0)}async execute(a){return this._prepare().execute(a)}},p=class extends o{static [b.entityKind]="SQLiteSyncRelationalQueryV2";sync(a){return this._prepare().execute(a).sync()}};(0,g.applyMixins)(o,[h]);var q=a.i(704501),r=a.i(494415),s=a.i(355280),t=a.i(888707),u=a.i(420713),v=class{static [b.entityKind]="ColumnTableAliasProxyHandler";constructor(a,b){this.table=a,this.ignoreColumnAlias=b}get(a,b){return"table"===b?this.table:("isAlias"!==b||!this.ignoreColumnAlias)&&a[b]}},w=class{static [b.entityKind]="ViewSelectionAliasProxyHandler";constructor(a,b,c){this.view=a,this.selection=b,this.ignoreColumnAlias=c}get(a,d){let e=a[d];return(0,b.is)(e,r.Column)?new Proxy(e,new v(this.view,this.ignoreColumnAlias)):(0,b.is)(e,q.Subquery)||(0,b.is)(e,c.SQL)||(0,b.is)(e,c.SQL.Aliased)||(0,c.isSQLWrapper)(e)||"object"!=typeof e||null===e?e:new Proxy(e,this)}},x=class{static [b.entityKind]="TableAliasProxyHandler";constructor(a,b,c){this.alias=a,this.replaceOriginalName=b,this.ignoreColumnAlias=c}get(a,d){if(d===u.Table.Symbol.IsAlias)return!0;if(d===u.Table.Symbol.Name||this.replaceOriginalName&&d===u.Table.Symbol.OriginalName)return this.alias;if(d===s.ViewBaseConfig)return{...a[s.ViewBaseConfig],name:this.alias,isAlias:!0,selectedFields:new Proxy(a[s.ViewBaseConfig].selectedFields,new w(new Proxy(a,this),a[s.ViewBaseConfig].selectedFields,this.ignoreColumnAlias))};if(d===u.Table.Symbol.Columns){let d=a[u.Table.Symbol.Columns];if(!d)return d;if((0,b.is)(a,c.View))return new Proxy(a[u.Table.Symbol.Columns],new w(new Proxy(a,this),a[u.Table.Symbol.Columns],this.ignoreColumnAlias));let e={};return Object.keys(d).map(b=>{e[b]=new Proxy(d[b],new v(new Proxy(a,this),this.ignoreColumnAlias))}),e}let e=a[d];return(0,b.is)(e,r.Column)?new Proxy(e,new v(new Proxy(a,this),this.ignoreColumnAlias)):e}},y=class{static [b.entityKind]="ColumnAliasProxyHandler";constructor(a){this.alias=a}get(a,b){return"isAlias"===b||("name"===b?this.alias:"keyAsName"!==b&&(b===t.OriginalColumn?()=>a:a[b]))}};function z(a,b){return new Proxy(a,new x(b,!1,!1))}function A(a){return a[t.OriginalColumn]()}b.entityKind,r.Column.prototype.as=function(a){return new Proxy(this,new y(a))};var B=class a{static [b.entityKind]="SelectionProxyHandler";config;constructor(a){this.config={...a}}get(d,e){if("_"===e)return{...d._,selectedFields:new Proxy(d._.selectedFields,this)};if(e===s.ViewBaseConfig)return{...d[s.ViewBaseConfig],selectedFields:new Proxy(d[s.ViewBaseConfig].selectedFields,this)};if("symbol"==typeof e)return d[e];let f=((0,b.is)(d,q.Subquery)?d._.selectedFields:(0,b.is)(d,c.View)?d[s.ViewBaseConfig].selectedFields:d)[e];if((0,b.is)(f,c.SQL.Aliased)){if("sql"===this.config.sqlAliasedBehavior&&!f.isSelectionField)return f.sql;let a=f.clone();return a.isSelectionField=!0,a.origin=this.config.alias,a}if((0,b.is)(f,c.SQL)){if("sql"===this.config.sqlBehavior)return f;throw Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return(0,b.is)(f,r.Column)?this.config.alias?new Proxy(f,new v(new Proxy(f.table,new x(this.config.alias,this.config.replaceOriginalName??!1,!0)),!0)):f:"object"!=typeof f||null===f?f:new Proxy(f,new a(this.config))}},C=a.i(885880);function D(a){return(0,b.is)(a,C.SQLiteTable)?[`${a[u.Table.Symbol.BaseName]}`]:(0,b.is)(a,q.Subquery)?a._.usedTables??[]:(0,b.is)(a,c.SQL)?a.usedTables??[]:[]}b.entityKind,b.entityKind,a.i(459547),a.i(49701),a.i(738538),a.i(169565);var E=class{static [b.entityKind]="SQLiteDelete";config;constructor(a,b,c,d){this.table=a,this.session=b,this.dialect=c,this.config={table:a,withList:d}}where(a){return this.config.where=a,this}orderBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.table[u.Table.Symbol.Columns],new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),c=Array.isArray(b)?b:[b];this.config.orderBy=c}else this.config.orderBy=a;return this}limit(a){return this.config.limit=a,this}returning(a=this.table[C.SQLiteTable.Symbol.Columns]){return this.config.returning=(0,g.orderSelectedFields)(a),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){return this.dialect.sqlToQuery(this.getSQL())}$dynamic(){return this}},F=class extends E{static [b.entityKind]="SQLiteAsyncDelete";_prepare(a=!1){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),"arrays",a,this.config.returning?"all":"run",this.config.returning?this.dialect.mapperGenerators.rows(this.config.returning,void 0):void 0,{type:"delete",tables:D(this.config.table)})}prepare(){return this._prepare(!0)}run=a=>this._prepare().run(a);all=a=>this._prepare().all(a);get=a=>this._prepare().get(a);values=a=>this._prepare().values(a);async execute(a){return this._prepare().execute(a)}};(0,g.applyMixins)(F,[h]);var G=c,H=class extends G.View{static [b.entityKind]="SQLiteViewBase"},I=class{static [b.entityKind]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}withoutSelectionCastCodecs(){return this}},J=class{static [b.entityKind]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor(a,b=K){this.builder=b,this.fields=a.fields,this.session=a.session,this.dialect=a.dialect,this.withList=a.withList,this.distinct=a.distinct}from(a){let d,e=!!this.fields;return d=this.fields?this.fields:(0,b.is)(a,q.Subquery)?Object.fromEntries(Object.keys(a._.selectedFields).map(b=>[b,a[b]])):(0,b.is)(a,H)?a[s.ViewBaseConfig].selectedFields:(0,b.is)(a,c.SQL)?{}:(0,g.getTableColumns)(a),new this.builder({table:a,fields:d,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList??[],distinct:this.distinct})}},K=class extends I{static [b.entityKind]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:a,fields:b,isPartialSelect:c,session:d,dialect:e,withList:f,distinct:h}){for(const i of(super(),this.config={withList:f,table:a,fields:{...b},distinct:h,setOperators:[]},this.isPartialSelect=c,this.session=d,this.dialect=e,this._={selectedFields:b,config:this.config},this.tableName=(0,g.getTableLikeName)(a),this.joinsNotNullableMap="string"==typeof this.tableName?{[this.tableName]:!0}:{},D(a)))this.usedTables.add(i)}getUsedTables(){return[...this.usedTables]}createJoin(a){return(d,e)=>{let f=this.tableName,h=(0,g.getTableLikeName)(d);for(let a of D(d))this.usedTables.add(a);if("string"==typeof h&&this.config.joins?.some(a=>a.alias===h))throw Error(`Alias "${h}" is already used in this query`);if(!this.isPartialSelect&&(1===Object.keys(this.joinsNotNullableMap).length&&"string"==typeof f&&(this.config.fields={[f]:this.config.fields}),"string"==typeof h&&!(0,b.is)(d,c.SQL))){let a=(0,b.is)(d,q.Subquery)?d._.selectedFields:(0,b.is)(d,c.View)?d[s.ViewBaseConfig].selectedFields:d[u.Table.Symbol.Columns];this.config.fields[h]=a}if("function"==typeof e&&(e=e(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:e,table:d,joinType:a,alias:h}),"string"==typeof h)switch(a){case"left":this.joinsNotNullableMap[h]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[h]=!0;break;case"cross":case"inner":this.joinsNotNullableMap[h]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[h]=!1}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");crossJoin=this.createJoin("cross");createSetOperator(a,b){return c=>{let d="function"==typeof c?c(M()):c;if(!(0,g.haveSameKeys)(this.getSelectedFields(),d.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:a,isAll:b,rightSelect:d}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators(a){return this.config.setOperators.push(...a),this}where(a){return"function"==typeof a&&(a=a(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=a,this}having(a){return"function"==typeof a&&(a=a(new Proxy(this.config.fields,new B({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=a,this}groupBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.fields,new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(b)?b:[b]}else this.config.groupBy=a;return this}orderBy(...a){if("function"==typeof a[0]){let b=a[0](new Proxy(this.config.fields,new B({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),c=Array.isArray(b)?b:[b];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=c:this.config.orderBy=c}else this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=a:this.config.orderBy=a;return this}limit(a){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=a:this.config.limit=a,this}offset(a){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=a:this.config.offset=a,this}$withCache(a){return this.cacheConfig=void 0===a?{config:{},enabled:!0,autoInvalidate:!0}:!1===a?{enabled:!1}:{enabled:!0,autoInvalidate:!0,...a},this}getSQL(){return this.config.fieldsFlat=(0,g.orderSelectedFields)(this.config.fields),this.dialect.buildSelectQuery(this.config)}toSQL(){return this.dialect.sqlToQuery(this.getSQL())}as(a){let b=[];if(b.push(...D(this.config.table)),this.config.joins)for(let a of this.config.joins)b.push(...D(a.table));return new Proxy(new q.Subquery(this.getSQL(),this.config.fields,a,!1,[...new Set(b)]),new B({alias:a,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new B({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}withoutSelectionCastCodecs(){return this}$dynamic(){return this}};function L(a,b){return(c,d,...e)=>{let f=[d,...e].map(c=>({type:a,isAll:b,rightSelect:c}));for(let a of f)if(!(0,g.haveSameKeys)(c.getSelectedFields(),a.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return c.addSetOperators(f)}}let M=()=>({union:N,unionAll:O,intersect:P,except:Q}),N=L("union",!1),O=L("union",!0),P=L("intersect",!1),Q=L("except",!1);var R=class extends Error{static [b.entityKind]="DrizzleError";constructor({message:a,cause:b}){super(a),this.name="DrizzleError",this.cause=b}},S=class a extends Error{static [b.entityKind]="DrizzleQueryError";constructor(b,c,d){super(`Failed query: ${b}
|
|
2
2
|
params: ${c}`),this.query=b,this.params=c,this.cause=d,this.name="DrizzleQueryError",Error.captureStackTrace(this,a),d&&(this.cause=d)}},T=class extends R{static [b.entityKind]="TransactionRollbackError";constructor(){super({message:"Rollback"}),this.name="TransactionRollbackError"}},U=a.i(93321),V=a.i(530385),W=class{static [b.entityKind]="RelationV2";fieldName;sourceColumns;targetColumns;alias;where;sourceTable;targetTable;through;throughTable;isReversed;sourceColumnTableNames=[];targetColumnTableNames=[];constructor(a,b){this.targetTableName=b,this.targetTable=a}},X=class extends W{static [b.entityKind]="OneV2";relationType="one";optional;constructor(a,b,c,d){super(b,c),this.alias=d?.alias,this.where=d?.where,d?.from&&(this.sourceColumns=(Array.isArray(d.from)?d.from:[d.from]).map(b=>(this.throughTable??=b._.through?a[b._.through._.tableName]:void 0,this.sourceColumnTableNames.push(b._.tableName),b._.column))),d?.to&&(this.targetColumns=(Array.isArray(d.to)?d.to:[d.to]).map(b=>(this.throughTable??=b._.through?a[b._.through._.tableName]:void 0,this.targetColumnTableNames.push(b._.tableName),b._.column))),this.throughTable&&(this.through={source:(Array.isArray(d?.from)?d.from:d?.from?[d.from]:[]).map(a=>a._.through),target:(Array.isArray(d?.to)?d.to:d?.to?[d.to]:[]).map(a=>a._.through)}),this.optional=d?.optional??!0}},Y=(b.entityKind,class{static [b.entityKind]="AggregatedField";table;onTable(a){return this.table=a,this}});b.entityKind;let Z={and:U.and,between:U.between,eq:U.eq,exists:U.exists,gt:U.gt,gte:U.gte,ilike:U.ilike,inArray:U.inArray,arrayContains:U.arrayContains,arrayContained:U.arrayContained,arrayOverlaps:U.arrayOverlaps,isNull:U.isNull,isNotNull:U.isNotNull,like:U.like,lt:U.lt,lte:U.lte,ne:U.ne,not:U.not,notBetween:U.notBetween,notExists:U.notExists,notLike:U.notLike,notIlike:U.notIlike,notInArray:U.notInArray,or:U.or,sql:c.sql},$={sql:c.sql,asc:V.asc,desc:V.desc};function _(a,d,e,f=!1,g=!1,h=!0){let i=d?1:a.length,j=e.map(({field:a,codec:d,arrayDimensions:e})=>{let f;return(f=(0,b.is)(a,r.Column)?a:(0,b.is)(a,c.SQL)?a.decoder:(0,b.is)(a,c.SQL.Aliased)?a.sql.decoder:(0,b.is)(a,u.Table)||(0,b.is)(a,c.View)?c.noopDecoder:a.getSQL().decoder,h&&a.mapFromJsonValue)?b=>a.mapFromJsonValue(b):f.mapFromDriverValue.isNoop?d?a=>d(a,e):void 0:d?a=>f.mapFromDriverValue(d(a,e)):a=>f.mapFromDriverValue(a)});for(let b=0;b<i;++b){let c=d?a:a[b];for(let a=0;a<e.length;++a){let b=e[a];if(b.selection){if(null===c[b.key])continue;if(f){if(c[b.key]=JSON.parse(c[b.key]),null===c[b.key])continue}else g&&"string"==typeof c[b.key]&&(c[b.key]=JSON.parse(c[b.key]));if(b.isArray){_(c[b.key],!1,b.selection,!1,g);continue}_(c[b.key],!0,b.selection,!1,g);continue}if(null===c[b.key])continue;let d=j[a];d&&(c[b.key]=d(c[b.key]))}}return a}function aa({selection:a,isFirst:d,parseJson:e,parseJsonIfString:f,rootJsonMappers:g,arrayModeRoot:h}){return i=>d&&!i[0]?i[0]:h?function(a,d,e,f=!1,g=!1){let h=d?1:a.length,i=e.map(({field:a,codec:d,arrayDimensions:e})=>{let f;return(f=(0,b.is)(a,r.Column)?a:(0,b.is)(a,c.SQL)?a.decoder:(0,b.is)(a,c.SQL.Aliased)?a.sql.decoder:(0,b.is)(a,u.Table)||(0,b.is)(a,c.View)?c.noopDecoder:a.getSQL().decoder).mapFromDriverValue.isNoop?d?a=>d(a,e):void 0:d?a=>f.mapFromDriverValue(d(a,e)):a=>f.mapFromDriverValue(a)}),j=Array.from({length:h});for(let b=0;b<h;++b){let c=d?a:a[b],h={};for(let a=0;a<e.length;++a){let b=e[a],d=c[a];if(b.selection){if(null===d){h[b.key]=null;continue}if(f){if(null===(d=JSON.parse(d))){h[b.key]=null;continue}}else g&&"string"==typeof d&&(d=JSON.parse(d));b.isArray?_(d,!1,b.selection,!1,g):_(d,!0,b.selection,!1,g),h[b.key]=d;continue}if(null===d){h[b.key]=null;continue}let j=i[a];h[b.key]=j?j(d):d}j[b]=h}return d?j[0]:j}(d?i[0]:i,d,a,e,f):_(d?i[0]:i,d,a,e,f,g)}function ab({selection:a,isFirst:d,parseJson:e,parseJsonIfString:f,rootJsonMappers:h,arrayModeRoot:i}){let j=[],k=function a(d,e,f,g,h,i,j,k,l){let m=[],n=[],o=!1,p=d.map(()=>`c${k.n++}`),q=d.map((a,b)=>l?p[b]:`${JSON.stringify(a.key)}: ${p[b]}`);for(let[s,{field:t,key:v,codec:w,isArray:x,selection:y,arrayDimensions:z}]of(m.push(l?`let [ ${q.join(", ")} ] = ${e};`:`let { ${q.join(", ")} } = ${e};`),d.entries())){let d=`${f}[${s}]`,e=JSON.stringify(v),l=p[s];if(y){g?(m.push(`if (${l} !== null) ${l} = JSON.parse(${l});`),o=!0):h&&(m.push(`if (typeof ${l} === 'string') ${l} = JSON.parse(${l});`),o=!0);let b=`s${k.n++}`,c=j.length;if(j.push(`const { selection: ${b} } = ${d};`),x){let d=`j${k.n++}`,e=a(y,`${l}[${d}]`,b,!1,h,!0,j,k,!1);if(e.hasWork){for(let a of(o=!0,m.push(`if (${l} !== null) {`),m.push(` for (let ${d} = 0; ${d} < ${l}.length; ++${d}) {`),e.bodyStmts))m.push(` ${a}`);m.push(` ${l}[${d}] = ${e.literal};`),m.push(" }"),m.push("}")}else j.splice(c,1)}else{let d=a(y,l,b,!1,h,!0,j,k,!1);if(d.hasWork){for(let a of(o=!0,m.push(`if (${l} !== null) {`),d.bodyStmts))m.push(` ${a}`);m.push(` ${l} = ${d.literal};`),m.push("}")}else j.splice(c,1)}n.push(`${e}: ${l}`);continue}let q="",A="",B=!1;if((0,b.is)(t,r.Column)){if(i&&t.mapFromJsonValue){B=!0;let a=k.n++;A=`field: dec${a}`,q=`dec${a}.mapFromJsonValue`}else if(!t.mapFromDriverValue.isNoop){let a=k.n++;A=`field: dec${a}`,q=`dec${a}.mapFromDriverValue`}}else if((0,b.is)(t,c.SQL)){if(i&&t.decoder.mapFromJsonValue){B=!0;let a=k.n++;A=`field: { decoder: dec${a} }`,q=`dec${a}.mapFromJsonValue`}else if(!t.decoder.mapFromDriverValue.isNoop){let a=k.n++;A=`field: { decoder: dec${a} }`,q=`dec${a}.mapFromDriverValue`}}else if((0,b.is)(t,c.SQL.Aliased)){if(i&&t.sql.decoder.mapFromJsonValue){B=!0;let a=k.n++;A=`field: { sql: { decoder: dec${a} } }`,q=`dec${a}.mapFromJsonValue`}else if(!t.sql.decoder.mapFromDriverValue.isNoop){let a=k.n++;A=`field: { sql: { decoder: dec${a} } }`,q=`dec${a}.mapFromDriverValue`}}else if((0,b.is)(t,u.Table)||(0,b.is)(t,c.View));else{let a=t.getSQL();if(i&&a.decoder.mapFromJsonValue){B=!0;let a=k.n++;j.push(`const dec${a} = ${d}.field.getSQL().decoder;`),q=`dec${a}.mapFromJsonValue`}else if(!a.decoder.mapFromDriverValue.isNoop){let a=k.n++;j.push(`const dec${a} = ${d}.field.getSQL().decoder;`),q=`dec${a}.mapFromDriverValue`}}let C="";if(!B&&w&&(C=`codec${k.n++}`),A||C){let a=[];A&&a.push(A),C&&a.push(`codec: ${C}`),j.push(`const { ${a.join(", ")} } = ${d};`)}if(q||C){o=!0;let a=l;C&&(a=`${C}(${a}, ${z})`),q&&(a=`${q}(${a})`),n.push(`${e}: ${l} === null ? null : ${a}`)}else n.push(`${e}: ${l}`)}return{bodyStmts:m,literal:`{ ${n.join(", ")} }`,hasWork:o}}(a,"row","selection",e,f,!i&&h,j,{n:0},!!i),l=[];for(let a of(l.push(` "use strict";
|
|
3
3
|
const { selection } = this;`),j))l.push(` ${a}`);if(i)if(d){for(let a of(l.push(" const row = rows[0];"),l.push(" if (!row) return undefined;"),k.bodyStmts))l.push(` ${a}`);l.push(` return ${k.literal};`)}else{for(let a of(l.push(" const { length } = rows;"),l.push(" const mapped = Array.from({ length });"),l.push(" for (let i = 0; i < length; ++i) {"),l.push(" const row = rows[i];"),k.bodyStmts))l.push(` ${a}`);l.push(` mapped[i] = ${k.literal};`),l.push(" }"),l.push(" return mapped;")}else if(k.hasWork)if(d){for(let a of(l.push(" const row = rows[0];"),l.push(" if (!row) return undefined;"),k.bodyStmts))l.push(` ${a}`);l.push(` rows[0] = ${k.literal};`),l.push(" return rows[0];")}else{for(let a of(l.push(" for (let i = 0; i < rows.length; ++i) {"),l.push(" const row = rows[i];"),k.bodyStmts))l.push(` ${a}`);l.push(` rows[i] = ${k.literal};`),l.push(" }"),l.push(" return rows;")}else l.push(d?" return rows[0];":" return rows;");l.push(" //# sourceURL=drizzle:jit-relational-query-mapper");let m=l.join("\n");return Object.assign(new g.FnConstructor("rows",m).bind({selection:a}),{body:`function jitRqbMapper (rows) {
|
|
4
4
|
${m}
|
|
@@ -67,4 +67,4 @@ ${b.join("\n")}
|
|
|
67
67
|
|
|
68
68
|
`)}return f.write("payload.value = newResult;"),f.write("return payload;"),f.compile()})(c.shape)),b=e(b,l),n)?aP([],o,b,l,f,a):b:g(b,l):(b.issues.push({expected:"object",code:"invalid_type",input:o,inst:a}),b)}});function aT(a,c,e,f){for(let b of a)if(0===b.issues.length)return c.value=b.value,c;let g=a.filter(a=>!d.aborted(a));return 1===g.length?(c.value=g[0].value,g[0]):(c.issues.push({code:"invalid_union",input:c.value,inst:e,errors:a.map(a=>a.issues.map(a=>d.finalizeIssue(a,f,b.config())))}),c)}let aU=b.$constructor("$ZodUnion",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"optin",a=>a.def.options.some(a=>"defaulted"===a._zod.optin)?"defaulted":a.def.options.some(a=>void 0!==a._zod.optin)?"optional":void 0),d.defineLazyInternal(a,"optout",a=>a.def.options.some(a=>"optional"===a._zod.optout)?"optional":void 0),d.defineLazyInternal(a,"values",a=>{if(a.def.options.every(a=>a._zod.values))return new Set(a.def.options.flatMap(a=>Array.from(a._zod.values)))}),d.defineLazyInternal(a,"pattern",a=>{if(a.def.options.every(a=>a._zod.pattern)){let b=a.def.options.map(a=>a._zod.pattern);return RegExp(`^(${b.map(a=>d.cleanRegex(a.source)).join("|")})$`)}});let c=1===b.options.length?b.options[0]._zod.run:null;a._zod.parse=(d,e)=>{if(c)return c(d,e);let f=!1,g=[];for(let a of b.options){let b=a._zod.run({value:d.value,issues:[]},e);if(b instanceof Promise)g.push(b),f=!0;else{if(0===b.issues.length)return b;g.push(b)}}return f?Promise.all(g).then(b=>aT(b,d,a,e)):aT(g,d,a,e)}});function aV(a,c,e,f){let g=[];for(let b=0;b<a.length;b++)0===a[b].issues.length&&g.push(b);return 1===g.length?c.value=a[g[0]].value:0===g.length?c.issues.push({code:"invalid_union",input:c.value,inst:e,errors:a.map(a=>a.issues.map(a=>d.finalizeIssue(a,f,b.config())))}):c.issues.push({code:"invalid_union",input:c.value,inst:e,errors:[],inclusive:!1,matches:g}),c}let aW=b.$constructor("$ZodXor",(a,b)=>{aU.init(a,b),b.inclusive=!1;let c=1===b.options.length?b.options[0]._zod.run:null;a._zod.parse=(d,e)=>{if(c)return c(d,e);let f=!1,g=[];for(let a of b.options){let b=a._zod.run({value:d.value,issues:[]},e);b instanceof Promise?(g.push(b),f=!0):g.push(b)}return f?Promise.all(g).then(b=>aV(b,d,a,e)):aV(g,d,a,e)}}),aX=b.$constructor("$ZodDiscriminatedUnion",(a,b)=>{b.inclusive=!1,aU.init(a,b);let c=a._zod.parse;d.defineLazyInternal(a,"propValues",a=>{let b={};for(let c of a.def.options){let e=c._zod.propValues;if(!e||0===Object.keys(e).length)throw Error(`Invalid discriminated union option at index "${a.def.options.indexOf(c)}"`);for(let[a,c]of Object.entries(e))for(let e of(Object.prototype.hasOwnProperty.call(b,a)||d.assignProp(b,a,new Set),c))b[a].add(e)}return b}),b.options.forEach((a,c)=>{let d=aQ.get(a._zod.def);if(d&&!Object.prototype.hasOwnProperty.call(d,b.discriminator))throw Error(`Invalid discriminated union option at index "${c}"`)});let e=d.cached(()=>{let a=b.options,c=new Map;for(let d of a){let a=d._zod.propValues?.[b.discriminator];if(!a||0===a.size)throw Error(`Invalid discriminated union option at index "${b.options.indexOf(d)}"`);for(let b of a){if(c.has(b))throw Error(`Duplicate discriminator value "${String(b)}"`);c.set(b,d)}}return c});a._zod.parse=(f,g)=>{let h=f.value;if(!d.isObject(h))return f.issues.push({code:"invalid_type",expected:"object",input:h,inst:a}),f;let i=e.value.get(h?.[b.discriminator]);return i?i._zod.run(f,g):b.unionFallback||"backward"===g.direction?c(f,g):(f.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:b.discriminator,options:Array.from(e.value.keys()),input:h,path:[b.discriminator],inst:a}),f)}}),aY=b.$constructor("$ZodIntersection",(a,b)=>{H.init(a,b),a._zod.parse=(a,c)=>{let d=a.value,e=b.left._zod.run({value:d,issues:[]},c),f=b.right._zod.run({value:d,issues:[]},c);return e instanceof Promise||f instanceof Promise?Promise.all([e,f]).then(([b,c])=>a$(a,b,c)):a$(a,e,f)}});function aZ(a,b){if(a===b||a instanceof Date&&b instanceof Date&&+a==+b)return{valid:!0,data:a};if(d.isPlainObject(a)&&d.isPlainObject(b)){let c=Object.keys(b),d=Object.keys(a).filter(a=>-1!==c.indexOf(a)),e={...a,...b};for(let c of(Object.prototype.hasOwnProperty.call(e,"__proto__")&&delete e.__proto__,d)){if("__proto__"===c)continue;let d=aZ(a[c],b[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};e[c]=d.data}return{valid:!0,data:e}}if(Array.isArray(a)&&Array.isArray(b)){if(a.length!==b.length)return{valid:!1,mergeErrorPath:[]};let c=[];for(let d=0;d<a.length;d++){let e=aZ(a[d],b[d]);if(!e.valid)return{valid:!1,mergeErrorPath:[d,...e.mergeErrorPath]};c.push(e.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function a$(a,b,c){let e,f=new Map,g=new Map,h=(a,b)=>{let c;if("unrecognized_keys"!==a.code||a.path?.length)if("invalid_key"!==a.code||"record"!==a.origin||a.path?.length!==1)return!1;else{let b=String(a.path[0]);g.has(b)||g.set(b,a),c=[b]}else e??(e=a),c=a.keys;for(let a of c)f.has(a)||f.set(a,{}),f.get(a)[b]=!0;return!0};for(let c of b.issues)h(c,"l")||a.issues.push(c);for(let b of c.issues)h(b,"r")||a.issues.push(b);let i=[...f].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length){let b=e?i.filter(a=>e.keys.includes(a)):[];for(let c of(b.length&&a.issues.push({...e,keys:b}),i))!b.includes(c)&&g.has(c)&&a.issues.push(g.get(c))}let j=aZ(b.value,c.value);if(!j.valid){if(d.aborted(a))return a;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(j.mergeErrorPath)}`)}return a.value=j.data,a}let a_=b.$constructor("$ZodTuple",(a,c)=>{H.init(a,c);let d=c.items,e=b.globalConfig.memoizer;e?.attach(a),a._zod.parse=(b,f)=>{let g=b.value;if(!Array.isArray(g))return b.issues.push({input:g,inst:a,expected:"tuple",code:"invalid_type"}),b;b.value=e?e.alloc(a,b,[],f):[];let h=[],i=a0(d,"optin"),j=a0(d,"optout");if(!c.rest){if(g.length<i)return b.issues.push({code:"too_small",minimum:i,inclusive:!0,input:g,inst:a,origin:"array"}),b;g.length>d.length&&b.issues.push({code:"too_big",maximum:d.length,inclusive:!0,input:g,inst:a,origin:"array"})}let k=Array(d.length);for(let a=0;a<d.length;a++){let b=d[a]._zod.run({value:g[a],issues:[]},f);b instanceof Promise?h.push(b.then(b=>{k[a]=b})):k[a]=b}if(c.rest){let a=d.length-1;for(let e of g.slice(d.length)){a++;let d=c.rest._zod.run({value:e,issues:[]},f);d instanceof Promise?h.push(d.then(c=>a1(c,b,a))):a1(d,b,a)}}return h.length?Promise.all(h).then(()=>a2(k,b,d,g,j)):a2(k,b,d,g,j)}});function a0(a,b){for(let c=a.length-1;c>=0;c--)if(!("optin"===b?void 0!==a[c]._zod.optin:"optional"===a[c]._zod.optout))return c+1;return 0}function a1(a,b,c){a.issues.length&&b.issues.push(...d.prefixIssues(c,a.issues)),b.value[c]=a.value}function a2(a,b,c,e,f){for(let g=0;g<c.length;g++){let h=a[g],i=g<e.length;if(!i&&g>=f&&"optional"===c[g]._zod.optin){b.value.length=g;break}if(h.issues.length){if(!i&&g>=f){b.value.length=g;break}b.issues.push(...d.prefixIssues(g,h.issues))}b.value[g]=h.value}for(let a=b.value.length-1;a>=e.length;a--)if("optional"===c[a]._zod.optout&&void 0===b.value[a])b.value.length=a;else break;return b}let a3=b.$constructor("$ZodRecord",(a,e)=>{H.init(a,e);let f=b.globalConfig.memoizer;f?.attach(a),a._zod.parse=(g,h)=>{let i=g.value;if(!d.isPlainObject(i))return g.issues.push({expected:"record",code:"invalid_type",input:i,inst:a}),g;let j=[],k=e.keyType._zod.values;if(k&&!e.partial){let c;g.value=f?f.alloc(a,g,{},h):{};let l=new Set;for(let c of k)if("string"==typeof c||"number"==typeof c||"symbol"==typeof c){if(l.add("number"==typeof c?c.toString():c),"__proto__"===c)continue;let f=e.keyType._zod.run({value:c,issues:[]},h);if(f instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(f.issues.length){g.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(a=>d.finalizeIssue(a,h,b.config())),input:c,path:[c],inst:a});continue}let k=f.value;if("__proto__"===k)continue;let m=e.valueType._zod.run({value:i[c],issues:[]},h);m instanceof Promise?j.push(m.then(a=>{a.issues.length&&g.issues.push(...d.prefixIssues(c,a.issues)),g.value[k]=a.value})):(m.issues.length&&g.issues.push(...d.prefixIssues(c,m.issues)),g.value[k]=m.value)}for(let a in i)if(!l.has(a))if("loose"===e.mode){if("__proto__"===a)continue;g.value[a]=i[a]}else(c=c??[]).push(a);c&&c.length>0&&g.issues.push({code:"unrecognized_keys",input:i,inst:a,keys:c,continue:!0})}else{let l;for(let m of(g.value=f?f.alloc(a,g,{},h):{},Reflect.ownKeys(i))){if("__proto__"===m||!Object.prototype.propertyIsEnumerable.call(i,m))continue;let f=e.keyType._zod.run({value:m,issues:[]},h);if(f instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof m&&c.number.test(m)&&f.issues.length){let a=e.keyType._zod.run({value:Number(m),issues:[]},h);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===a.issues.length&&(f=a)}if(f.issues.length){"loose"===e.mode?g.value[m]=i[m]:k?(l=l??[]).push(m):g.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(a=>d.finalizeIssue(a,h,b.config())),input:m,path:[m],inst:a});continue}let n=f.value;if("__proto__"===n)continue;let o=e.valueType._zod.run({value:i[m],issues:[]},h);o instanceof Promise?j.push(o.then(a=>{a.issues.length&&g.issues.push(...d.prefixIssues(m,a.issues)),g.value[n]=a.value})):(o.issues.length&&g.issues.push(...d.prefixIssues(m,o.issues)),g.value[n]=o.value)}l&&l.length>0&&g.issues.push({code:"unrecognized_keys",input:i,inst:a,keys:l,continue:!0})}return j.length?Promise.all(j).then(()=>g):g}}),a4=b.$constructor("$ZodMap",(a,c)=>{H.init(a,c);let d=b.globalConfig.memoizer;d?.attach(a),a._zod.parse=(b,e)=>{let f=b.value;if(!(f instanceof Map))return b.issues.push({expected:"map",code:"invalid_type",input:f,inst:a}),b;let g=[];for(let[h,i]of(b.value=d?d.alloc(a,b,new Map,e):new Map,f)){let d=c.keyType._zod.run({value:h,issues:[]},e),j=c.valueType._zod.run({value:i,issues:[]},e);d instanceof Promise||j instanceof Promise?g.push(Promise.all([d,j]).then(([c,d])=>{a5(c,d,b,h,f,a,e)})):a5(d,j,b,h,f,a,e)}return g.length?Promise.all(g).then(()=>b):b}});function a5(a,c,e,f,g,h,i){a.issues.length&&(d.propertyKeyTypes.has(typeof f)?e.issues.push(...d.prefixIssues(f,a.issues)):e.issues.push({code:"invalid_key",origin:"map",input:g,inst:h,issues:a.issues.map(a=>d.finalizeIssue(a,i,b.config()))})),c.issues.length&&(d.propertyKeyTypes.has(typeof f)?e.issues.push(...d.prefixIssues(f,c.issues)):e.issues.push({origin:"map",code:"invalid_element",input:g,inst:h,key:f,issues:c.issues.map(a=>d.finalizeIssue(a,i,b.config()))})),e.value.set(a.value,c.value)}let a6=b.$constructor("$ZodSet",(a,c)=>{H.init(a,c);let d=b.globalConfig.memoizer;d?.attach(a),a._zod.parse=(b,e)=>{let f=b.value;if(!(f instanceof Set))return b.issues.push({input:f,inst:a,expected:"set",code:"invalid_type"}),b;let g=[];for(let h of(b.value=d?d.alloc(a,b,new Set,e):new Set,f)){let a=c.valueType._zod.run({value:h,issues:[]},e);a instanceof Promise?g.push(a.then(a=>a7(a,b))):a7(a,b)}return g.length?Promise.all(g).then(()=>b):b}});function a7(a,b){a.issues.length&&b.issues.push(...a.issues),b.value.add(a.value)}let a8=b.$constructor("$ZodEnum",(a,b)=>{H.init(a,b);let c=d.getEnumValues(b.entries),e=new Set(c);a._zod.values=e;let f=c.filter(a=>d.propertyKeyTypes.has(typeof a));a._zod.pattern=new RegExp(f.length?`^(${f.map(a=>d.escapeRegex(a.toString())).join("|")})$`:"^[^\\s\\S]$"),a._zod.parse=(b,d)=>{let f=b.value;return e.has(f)||b.issues.push({code:"invalid_value",values:c,input:f,inst:a}),b}}),a9=b.$constructor("$ZodLiteral",(a,b)=>{H.init(a,b);let c=new Set(b.values);a._zod.values=c,a._zod.pattern=new RegExp(b.values.length?`^(${b.values.map(a=>"string"==typeof a?d.escapeRegex(a):a?d.escapeRegex(a.toString()):String(a)).join("|")})$`:"^[^\\s\\S]$"),a._zod.parse=(d,e)=>{let f=d.value;return c.has(f)||d.issues.push({code:"invalid_value",values:b.values,input:f,inst:a}),d}}),ba=b.$constructor("$ZodFile",(a,b)=>{H.init(a,b),a._zod.parse=(b,c)=>{let d=b.value;return d instanceof File||b.issues.push({expected:"file",code:"invalid_type",input:d,inst:a}),b}}),bb=b.$constructor("$ZodTransform",(a,c)=>{H.init(a,c),a._zod.optin="optional",b.globalConfig.memoizer?.guard(a),a._zod.parse=(d,e)=>{if("backward"===e.direction)throw new b.$ZodEncodeError(a.constructor.name);let f=c.transform(d.value,d);if(e.async)return(f instanceof Promise?f:Promise.resolve(f)).then(a=>(d.value=a,d));if(f instanceof Promise)throw new b.$ZodAsyncError;return d.value=f,d}});function bc(a,b){return a.value=b.issues.length?void 0:b.value,a}let bd=b.$constructor("$ZodOptional",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"optin",a=>"defaulted"===a.def.innerType._zod.optin?"defaulted":"optional"),a._zod.optout="optional",d.defineLazyInternal(a,"values",a=>{let b=a.def.innerType._zod.values;return b?new Set([...b,void 0]):void 0}),d.defineLazyInternal(a,"pattern",a=>{let b=a.def.innerType._zod.pattern;return b?RegExp(`^(${d.cleanRegex(b.source)})?$`):void 0}),a._zod.parse=(a,c)=>{if(void 0===a.value){if("defaulted"!==b.innerType._zod.optin)return a;let d=b.innerType._zod.run({value:a.value,issues:[]},c);return d instanceof Promise?d.then(b=>bc(a,b)):bc(a,d)}return b.innerType._zod.run(a,c)}}),be=b.$constructor("$ZodExactOptional",(a,b)=>{bd.init(a,b),d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values),d.defineLazyInternal(a,"pattern",a=>a.def.innerType._zod.pattern),a._zod.parse=(a,c)=>b.innerType._zod.run(a,c)}),bf=b.$constructor("$ZodNullable",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"optin",a=>a.def.innerType._zod.optin),d.defineLazyInternal(a,"optout",a=>a.def.innerType._zod.optout),d.defineLazyInternal(a,"pattern",a=>{let b=a.def.innerType._zod.pattern;return b?RegExp(`^(${d.cleanRegex(b.source)}|null)$`):void 0}),d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values?new Set([...a.def.innerType._zod.values,null]):void 0),a._zod.parse=(a,c)=>null===a.value?a:b.innerType._zod.run(a,c)}),bg=b.$constructor("$ZodDefault",(a,b)=>{H.init(a,b),a._zod.optin="defaulted",d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);if(void 0===a.value)return a.value=b.defaultValue,a;let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(a=>bh(a,b)):bh(d,b)}});function bh(a,b){return void 0===a.value&&(a.value=b.defaultValue),a}let bi=b.$constructor("$ZodPrefault",(a,b)=>{H.init(a,b),a._zod.optin="defaulted",d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values),a._zod.parse=(a,c)=>("backward"===c.direction||void 0===a.value&&(a.value=b.defaultValue),b.innerType._zod.run(a,c))}),bj=b.$constructor("$ZodNonOptional",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"values",a=>{let b=a.def.innerType._zod.values;return b?new Set([...b].filter(a=>void 0!==a)):void 0}),a._zod.parse=(c,d)=>{let e=b.innerType._zod.run(c,d);return e instanceof Promise?e.then(b=>bk(b,a)):bk(e,a)}});function bk(a,b){return a.issues.length||void 0!==a.value||a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:b}),a}let bl=b.$constructor("$ZodSuccess",(a,c)=>{H.init(a,c),a._zod.parse=(a,d)=>{if("backward"===d.direction)throw new b.$ZodEncodeError("ZodSuccess");let e=c.innerType._zod.run(a,d);return e instanceof Promise?e.then(b=>(a.value=0===b.issues.length,a)):(a.value=0===e.issues.length,a)}});function bm(a,c,e,f){return c.issues.length?a.value=e.catchValue({...c,value:a.value,error:{issues:c.issues.map(a=>d.finalizeIssue(a,f,b.config()))},input:a.value}):(a.value=c.value,c.memo&&(a.memo=!0)),a}let bn=b.$constructor("$ZodCatch",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"optin",a=>"defaulted"===a.def.innerType._zod.optin?"defaulted":"optional"),d.defineLazyInternal(a,"optout",a=>a.def.innerType._zod.optout),d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run({value:a.value,issues:[]},c);return d instanceof Promise?d.then(d=>bm(a,d,b,c)):bm(a,d,b,c)}}),bo=b.$constructor("$ZodNaN",(a,b)=>{H.init(a,b),a._zod.parse=(b,c)=>("number"==typeof b.value&&Number.isNaN(b.value)||b.issues.push({input:b.value,inst:a,expected:"nan",code:"invalid_type"}),b)}),bp=b.$constructor("$ZodPipe",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"values",a=>a.def.in._zod.values),d.defineLazyInternal(a,"optin",a=>a.def.in._zod.optin),d.defineLazyInternal(a,"optout",a=>a.def.out._zod.optout),d.defineLazyInternal(a,"propValues",a=>a.def.in._zod.propValues),a._zod.parse=(a,c)=>{if("backward"===c.direction){let d=b.out._zod.run(a,c);return d instanceof Promise?d.then(a=>bq(a,b.in,c)):bq(d,b.in,c)}let d=b.in._zod.run(a,c);return d instanceof Promise?d.then(a=>bq(a,b.out,c)):bq(d,b.out,c)}});function bq(a,b,c){return a.issues.some(a=>"unrecognized_keys"!==a.code)?(a.aborted=!0,a):b._zod.run({value:a.value,issues:a.issues},c)}let br=b.$constructor("$ZodCodec",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"values",a=>a.def.in._zod.values),d.defineLazyInternal(a,"optin",a=>a.def.in._zod.optin),d.defineLazyInternal(a,"optout",a=>a.def.out._zod.optout),d.defineLazyInternal(a,"propValues",a=>a.def.in._zod.propValues),a._zod.parse=(a,c)=>{if("forward"===(c.direction||"forward")){let d=b.in._zod.run(a,c);return d instanceof Promise?d.then(a=>bs(a,b,c)):bs(d,b,c)}{let d=b.out._zod.run(a,c);return d instanceof Promise?d.then(a=>bs(a,b,c)):bs(d,b,c)}}});function bs(a,b,c){if(a.issues.length)return a.aborted=!0,a;if("forward"===(c.direction||"forward")){let d=b.transform(a.value,a);return d instanceof Promise?d.then(d=>bt(a,d,b.out,c)):bt(a,d,b.out,c)}{let d=b.reverseTransform(a.value,a);return d instanceof Promise?d.then(d=>bt(a,d,b.in,c)):bt(a,d,b.in,c)}}function bt(a,b,c,d){return a.issues.length?(a.aborted=!0,a):c._zod.run({value:b,issues:a.issues},d)}let bu=b.$constructor("$ZodPreprocess",(a,b)=>{bp.init(a,b)}),bv=b.$constructor("$ZodReadonly",(a,b)=>{H.init(a,b),d.defineLazyInternal(a,"propValues",a=>a.def.innerType._zod.propValues),d.defineLazyInternal(a,"values",a=>a.def.innerType._zod.values),d.defineLazyInternal(a,"optin",a=>a.def.innerType?._zod?.optin),d.defineLazyInternal(a,"optout",a=>a.def.innerType?._zod?.optout),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(bw):bw(d)}});function bw(a){return a.memo||(a.value=Object.freeze(a.value)),a}let bx=b.$constructor("$ZodTemplateLiteral",(a,b)=>{H.init(a,b);let c=[];for(let a of b.parts)if("object"==typeof a&&null!==a){if(!a._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);let b=a._zod.pattern instanceof RegExp?a._zod.pattern.source:a._zod.pattern;if(!b)throw Error(`Invalid template literal part: ${a._zod.traits}`);let d=+!!b.startsWith("^"),e=b.endsWith("$")?b.length-1:b.length;c.push(b.slice(d,e))}else if(null===a||d.primitiveTypes.has(typeof a))c.push(d.escapeRegex(`${a}`));else throw Error(`Invalid template literal part: ${a}`);a._zod.pattern=RegExp(`^${c.join("")}$`),a._zod.parse=(c,d)=>("string"!=typeof c.value?c.issues.push({input:c.value,inst:a,expected:"string",code:"invalid_type"}):(a._zod.pattern.lastIndex=0,a._zod.pattern.test(c.value)||c.issues.push({input:c.value,inst:a,code:"invalid_format",format:b.format??"template_literal",pattern:a._zod.pattern.source})),c)}),by=b.$constructor("$ZodFunction",(a,b)=>(H.init(a,b),Object.defineProperty(a,"_def",{value:b}),a._zod.def=b,a.implement=b=>{if("function"!=typeof b)throw Error("implement() must be called with a function");return Object.defineProperty(function(...c){let d=Reflect.apply(b,this,a._def.input?(0,F.parse)(a._def.input,c):c);return a._def.output?(0,F.parse)(a._def.output,d):d},"_zod",{value:a._zod,enumerable:!1})},a.implementAsync=b=>{if("function"!=typeof b)throw Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...c){let d=a._def.input?await (0,F.parseAsync)(a._def.input,c):c,e=await Reflect.apply(b,this,d);return a._def.output?await (0,F.parseAsync)(a._def.output,e):e},"_zod",{value:a._zod,enumerable:!1})},a._zod.parse=(b,c)=>("function"!=typeof b.value?b.issues.push({code:"invalid_type",expected:"function",input:b.value,inst:a}):a._def.output&&"promise"===a._def.output._zod.def.type?b.value=a.implementAsync(b.value):b.value=a.implement(b.value),b),a.input=(...b)=>{let c=a.constructor;return new c(Array.isArray(b[0])?{type:"function",input:new a_({type:"tuple",items:b[0],rest:b[1]}),output:a._def.output}:{type:"function",input:b[0],output:a._def.output})},a.output=b=>new a.constructor({type:"function",input:a._def.input,output:b}),a)),bz=b.$constructor("$ZodPromise",(a,b)=>{H.init(a,b),a._zod.parse=(a,c)=>Promise.resolve(a.value).then(a=>b.innerType._zod.run({value:a,issues:[]},c))}),bA=b.$constructor("$ZodLazy",(a,b)=>{H.init(a,b),d.defineLazy(a._zod,"innerType",()=>(b._cachedInner||(b._cachedInner=b.getter()),b._cachedInner)),d.defineLazyInternal(a,"pattern",a=>a.innerType?._zod?.pattern),d.defineLazyInternal(a,"propValues",a=>a.innerType?._zod?.propValues),d.defineLazyInternal(a,"optin",a=>a.innerType?._zod?.optin??void 0),d.defineLazyInternal(a,"optout",a=>a.innerType?._zod?.optout??void 0),a._zod.parse=(b,c)=>a._zod.innerType._zod.run(b,c)}),bB=b.$constructor("$ZodCustom",(a,b)=>{e.init(a,b),H.init(a,b),a._zod.parse=(a,b)=>a,a._zod.check=c=>{let d=c.value,e=b.fn(d);if(e instanceof Promise)return e.then(b=>bC(b,c,d,a));bC(e,c,d,a)}});function bC(a,b,c,e){if(!a){let a={code:"custom",input:c,inst:e,path:[...e._zod.def.path??[]],continue:!e._zod.def.abort};e._zod.def.params&&(a.params=e._zod.def.params),b.issues.push(d.issue(a))}}a.s(["$ZodAny",0,aF,"$ZodArray",0,aL,"$ZodBase64",0,an,"$ZodBase64URL",0,ap,"$ZodBigInt",0,aA,"$ZodBigIntFormat",0,aB,"$ZodBoolean",0,az,"$ZodCIDRv4",0,aj,"$ZodCIDRv6",0,al,"$ZodCUID",0,X,"$ZodCUID2",0,Y,"$ZodCatch",0,bn,"$ZodCodec",0,br,"$ZodCreditCard",0,at,"$ZodCustom",0,bB,"$ZodCustomStringFormat",0,aw,"$ZodDate",0,aJ,"$ZodDefault",0,bg,"$ZodDiscriminatedUnion",0,aX,"$ZodE164",0,aq,"$ZodEmail",0,O,"$ZodEmoji",0,V,"$ZodEnum",0,a8,"$ZodExactOptional",0,be,"$ZodFile",0,ba,"$ZodFunction",0,by,"$ZodGUID",0,M,"$ZodIPv4",0,ae,"$ZodIPv6",0,ah,"$ZodISODate",0,ab,"$ZodISODateTime",0,aa,"$ZodISODuration",0,ad,"$ZodISOTime",0,ac,"$ZodIntersection",0,aY,"$ZodJWT",0,av,"$ZodKSUID",0,_,"$ZodLazy",0,bA,"$ZodLiteral",0,a9,"$ZodMAC",0,ai,"$ZodMap",0,a4,"$ZodNaN",0,bo,"$ZodNanoID",0,W,"$ZodNever",0,aH,"$ZodNonOptional",0,bj,"$ZodNull",0,aE,"$ZodNullable",0,bf,"$ZodNumber",0,ax,"$ZodNumberFormat",0,ay,"$ZodObject",0,aR,"$ZodObjectJIT",0,aS,"$ZodOptional",0,bd,"$ZodPipe",0,bp,"$ZodPrefault",0,bi,"$ZodPreprocess",0,bu,"$ZodPromise",0,bz,"$ZodReadonly",0,bv,"$ZodRecord",0,a3,"$ZodSet",0,a6,"$ZodString",0,K,"$ZodStringFormat",0,L,"$ZodSuccess",0,bl,"$ZodSymbol",0,aC,"$ZodTemplateLiteral",0,bx,"$ZodTransform",0,bb,"$ZodTuple",0,a_,"$ZodType",0,H,"$ZodULID",0,Z,"$ZodURL",0,U,"$ZodUUID",0,N,"$ZodUndefined",0,aD,"$ZodUnion",0,aU,"$ZodUnknown",0,aG,"$ZodVoid",0,aI,"$ZodXID",0,$,"$ZodXor",0,aW,"URL_BAD_FORMAT",0,1,"URL_UNPARSEABLE",0,2,"getDiscriminatedOption",0,function(a,b){let c=a._zod,d=c.bag.optionsMap;if(!d){d=new Map;let{options:a,discriminator:b}=c.def;for(let c of a)for(let a of c._zod.propValues?.[b]??[])d.has(a)||d.set(a,c);c.bag.optionsMap=d}return d.get(b)},"isValidBase64",0,am,"isValidBase64URL",0,ao,"isValidCIDRv6",0,ak,"isValidCreditCard",0,as,"isValidIPv6",0,ag,"isValidJWT",0,au,"mergeValues",0,aZ,"parseURLObject",0,P,"standardProps",0,J,"stripTabAndNewline",0,R,"urlHostnameOk",0,S,"urlProtocolOk",0,T],584516)},588339,a=>{"use strict";var b=a.i(849660);a.s(["default",0,function(){return{localeError:(()=>{let a={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},c={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},d={nan:"NaN"};function e(a,b){return"number"!==a||"number"!=typeof b||Number.isFinite(b)?d[a]??a:String(b)}return d=>{switch(d.code){case"invalid_type":{let a=e(d.expected),c=e(b.parsedType(d.input),d.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":if(1===d.values.length)return`Invalid input: expected ${b.stringifyPrimitive(d.values[0])}`;return`Invalid option: expected one of ${b.joinValues(d.values,"|")}`;case"too_big":{let b=d.exact?"exactly ":d.inclusive?"<=":"<",c=a[d.origin]??null;if(c)return`Too big: expected ${d.origin??"value"} to have ${b}${d.maximum.toString()} ${c.unit??"elements"}`;return`Too big: expected ${d.origin??"value"} to be ${b}${d.maximum.toString()}`}case"too_small":{let b=d.exact?"exactly ":d.inclusive?">=":">",c=a[d.origin]??null;if(c)return`Too small: expected ${d.origin} to have ${b}${d.minimum.toString()} ${c.unit}`;return`Too small: expected ${d.origin} to be ${b}${d.minimum.toString()}`}case"invalid_format":if("starts_with"===d.format)return`Invalid string: must start with "${d.prefix}"`;if("ends_with"===d.format)return`Invalid string: must end with "${d.suffix}"`;if("includes"===d.format)return`Invalid string: must include "${d.includes}"`;if("regex"===d.format)return`Invalid string: must match pattern ${d.pattern}`;return`Invalid ${c[d.format]??d.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${d.divisor}`;case"unrecognized_keys":return`Unrecognized key${d.keys.length>1?"s":""}: ${b.joinValues(d.keys,", ")}`;case"invalid_key":return`Invalid key in ${d.origin}`;case"invalid_union":if(d.options&&Array.isArray(d.options)&&d.options.length>0){let a=d.options.map(a=>`'${a}'`).join(" | ");return`Invalid discriminator value. Expected ${a}`}if(!1===d.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${d.origin}`;default:return"Invalid input"}}})()}}])}];
|
|
69
69
|
|
|
70
|
-
//# sourceMappingURL=
|
|
70
|
+
//# sourceMappingURL=_0q0zan6._.js.map
|