thursday-agent 0.17.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +12 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/artifact/route.js +9 -8
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +8 -7
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +8 -7
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +4 -4
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +3 -3
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js +4 -3
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/automatic/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/automatic/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/automatic/route.js +17 -0
- package/.next/server/app/api/llm-model/automatic/route.js.map +5 -0
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/automatic/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +14 -13
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +17 -16
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +10 -10
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +9 -8
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +9 -8
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/thursday/call/end/route/build-manifest.json +12 -0
- package/.next/server/app/api/thursday/call/end/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/thursday/call/end/route.js +17 -0
- package/.next/server/app/api/thursday/call/end/route.js.map +5 -0
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -0
- package/.next/server/app/api/thursday/call/end/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/thursday/call/route.js +6 -6
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/settings/route.js +5 -5
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +16 -15
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +13 -12
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +5 -5
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +5 -5
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
- package/.next/server/app/artifact/[...path]/page.js +2 -2
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +60 -60
- package/.next/server/app/page.js +8 -8
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +2 -0
- package/.next/server/chunks/{[externals]__178rv3v._.js → [externals]__12stas-._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1ignh6-._.js → [root-of-the-server]__01k3vi3._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__021dkui._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03xamry._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__208vmyf._.js → [root-of-the-server]__061o2_x._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0hkxwim._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0liwkmx._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0ljizgj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0b36yfw._.js → [root-of-the-server]__0ts7ai0._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_h4hf9._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__12m24xl._.js → [root-of-the-server]__1k2qs1m._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1kmnkbk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1p47fbb._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1t0jj1j._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1vlxv19._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
- package/.next/server/chunks/_05gl-xy._.js +5 -5
- package/.next/server/chunks/_06hnfi8._.js +8 -0
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_07nxi75._.js +25 -21
- package/.next/server/chunks/_08354bn._.js +25 -21
- package/.next/server/chunks/_08btiir._.js +3 -3
- package/.next/server/chunks/_0c49lmw._.js +5 -0
- package/.next/server/chunks/_0ey0s6v._.js +3 -0
- package/.next/server/chunks/_0hgvg55._.js +5 -0
- package/.next/server/chunks/_0j0-gq6._.js +2 -2
- package/.next/server/chunks/_0nn99o2._.js +1 -1
- package/.next/server/chunks/_0p6v1fr._.js +2 -2
- package/.next/server/chunks/_0s8ao8z._.js +3 -0
- package/.next/server/chunks/_0srlnvd._.js +1 -1
- package/.next/server/chunks/_0t_7gji._.js +1 -1
- package/.next/server/chunks/_0ucx1jv._.js +3 -0
- package/.next/server/chunks/_0uzj57i._.js +1 -1
- package/.next/server/chunks/_0xygcxs._.js +25 -21
- package/.next/server/chunks/_1-sk_q4._.js +1 -1
- package/.next/server/chunks/{_1xcnogc._.js → _108gsm8._.js} +4 -4
- package/.next/server/chunks/{_20oecmn._.js → _15negpy._.js} +4 -4
- package/.next/server/chunks/_19fh9t2._.js +3 -0
- package/.next/server/chunks/_19kea1l._.js +18 -18
- package/.next/server/chunks/_1dtm9bs._.js +1 -1
- package/.next/server/chunks/_1dxq827._.js +2 -2
- package/.next/server/chunks/_1e54wxa._.js +1 -1
- package/.next/server/chunks/_1frcwj1._.js +3 -0
- package/.next/server/chunks/_1gn2r2q._.js +5 -5
- package/.next/server/chunks/_1gxankq._.js +2 -2
- package/.next/server/chunks/_1i3uucm._.js +5 -0
- package/.next/server/chunks/_1m88lkh._.js +9 -9
- package/.next/server/chunks/_1mx9sfo._.js +1 -1
- package/.next/server/chunks/_1q6e56i._.js +5 -5
- package/.next/server/chunks/_1qxheoa._.js +1 -1
- package/.next/server/chunks/_1t5ijzv._.js +3 -0
- package/.next/server/chunks/_1wwl_7o._.js +1 -1
- package/.next/server/chunks/_1zfxb7j._.js +1 -1
- package/.next/server/chunks/_211dn2c._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_automatic_route_actions_1-eyan7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_thursday_call_end_route_actions_0u5xjft.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/{features_0wm-ujw._.js → features_bot_08z387_._.js} +4 -4
- package/.next/server/chunks/{ssr/[root-of-the-server]__07660xu._.js → features_bot_0zy_q8y._.js} +8 -9
- package/.next/server/chunks/features_bot_1dfrdsb._.js +37 -0
- package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +3 -3
- package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
- package/.next/server/chunks/node_modules_103lpef._.js +3 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0_nz09c._.js → node_modules_consola_dist_chunks_prompt_mjs_0-t5tbs._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js → node_modules_consola_dist_chunks_prompt_mjs_039fwo9._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1x3bsmx._.js → node_modules_consola_dist_chunks_prompt_mjs_0pce1b3._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvy5lq._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0wxw35t._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1dlthym._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1smfi4-._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1x1omfi._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_20is7e3._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__149x25m._.js → [root-of-the-server]__0-af_o7._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__09f39cp._.js +4 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ouu4qp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0q9g9ea._.js +5 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +11 -9
- package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
- package/.next/server/chunks/ssr/{_0aeknva._.js → _01al00i._.js} +2 -2
- package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
- package/.next/server/chunks/ssr/_0afrpci._.js +1 -1
- package/.next/server/chunks/ssr/_0bgse1c._.js +162 -0
- package/.next/server/chunks/ssr/_0cd6g3l._.js +15 -15
- package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
- package/.next/server/chunks/ssr/{_0_vnw9v._.js → _0e2fnvg._.js} +2 -2
- package/.next/server/chunks/ssr/_0fo4552._.js +25 -21
- package/.next/server/chunks/ssr/_0jstvlg._.js +39 -0
- package/.next/server/chunks/ssr/{_0r0g9ki._.js → _0l7rjg5._.js} +2 -2
- package/.next/server/chunks/ssr/_0qsmpcu._.js +1 -1
- package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
- package/.next/server/chunks/ssr/{_18-e7zi._.js → _0vo_oym._.js} +4 -4
- package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
- package/.next/server/chunks/ssr/{_0ztbn5q._.js → _0xfafez._.js} +2 -2
- package/.next/server/chunks/ssr/_0z38nha._.js +1 -1
- package/.next/server/chunks/ssr/_10-_awu._.js +1 -1
- package/.next/server/chunks/ssr/{_1z6pirx._.js → _10_ph1t._.js} +2 -2
- package/.next/server/chunks/ssr/_116lfdc._.js +3 -0
- package/.next/server/chunks/ssr/_14dfh7a._.js +1 -1
- package/.next/server/chunks/ssr/_14oirtb._.js +3 -0
- package/.next/server/chunks/ssr/{_1umbr78._.js → _163dr78._.js} +2 -2
- package/.next/server/chunks/ssr/{_1c5iqz1._.js → _17a4qyk._.js} +3 -3
- package/.next/server/chunks/ssr/{_1sttj8x._.js → _1_5xof_._.js} +2 -2
- package/.next/server/chunks/ssr/{_1hbjh6n._.js → _1aqjk-1._.js} +2 -2
- package/.next/server/chunks/ssr/{_0n2scfq._.js → _1dfv66y._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ou5sj0._.js +1 -1
- package/.next/server/chunks/ssr/{_15m5ctz._.js → _1tmw842._.js} +2 -2
- package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
- package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
- package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_0ouemw8._.js +3 -0
- package/.next/server/chunks/ssr/{features_133mpna._.js → features_bot_0tb4ui-._.js} +2 -2
- package/.next/server/chunks/ssr/{features_config_0n0zu89._.js → features_config_09n-q9q._.js} +3 -3
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
- package/.next/server/chunks/ssr/{node_modules_1hefp6h._.js → node_modules_021lid9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kwie-o._.js → node_modules_04x5wyv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_180l3i0._.js → node_modules_096up6a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_00h1t1j._.js → node_modules_0__0tvm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03uejh6._.js → node_modules_0cjnmzp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ubln7w._.js → node_modules_0d6j33x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_n9o9s._.js → node_modules_0gd9hbz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0zf3wuu._.js → node_modules_0k8-y89._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0u_8z64._.js → node_modules_0m73b88._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09ikzel._.js → node_modules_0msrhxf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0f5bmkb._.js → node_modules_0nmkv-v._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07mo9rn._.js → node_modules_0nw5jz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09e8kz_._.js → node_modules_0q-klni._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_02ficyi._.js → node_modules_10_fv2a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_142z3o5._.js → node_modules_113l3e5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wyhtw9._.js → node_modules_13bqv6i._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_d_7gq._.js → node_modules_13g-d25._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0r-9e4n._.js → node_modules_156kv_t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06grs09._.js → node_modules_1_8-jcj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1fw32pg._.js → node_modules_1gq3ght._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_p8w7p._.js → node_modules_1k5i-_9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03q71_j._.js → node_modules_1lmyts8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1irot3r._.js → node_modules_1p_6sq7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1om2itc._.js → node_modules_1qstb1x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_197vh1s._.js → node_modules_1ri_eip._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1-7fc7h._.js → node_modules_1xb-ndg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0amkw0b._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0zq3l45._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +61 -61
- package/.next/static/chunks/{38edd4rpcbvzp.js → 01l7kw74vfp32.js} +1 -1
- package/.next/static/chunks/0a5_-jqhaktjj.js +1 -0
- package/.next/static/chunks/{0_b_bi2pobasx.js → 0obogzscwwekj.js} +2 -2
- package/.next/static/chunks/{1-63yde5eaz7i.js → 0p2f6uv4xytfm.js} +1 -1
- package/.next/static/chunks/{2v6e_9p95o2e3.js → 0uxq_vs6uxi-b.js} +1 -1
- package/.next/static/chunks/{024plctckvq-1.js → 166smhw8v-s3j.js} +1 -1
- package/.next/static/chunks/{1wbqaidq7vc3_.js → 1bnhw-5fj7aiz.js} +1 -1
- package/.next/static/chunks/1cglo3a2mbeou.js +1 -0
- package/.next/static/chunks/{0sv142q1yrva2.js → 1in6nxpu33iab.js} +1 -1
- package/.next/static/chunks/1u7kg91f9qy3g.js +1 -0
- package/.next/static/chunks/{0sowxe4nnl5qu.js → 1xv4g10m-cl1s.js} +1 -1
- package/.next/static/chunks/{0dfvwgnyrp8qt.js → 2ajs12-fcdwzm.js} +1 -1
- package/.next/static/chunks/2i7qtmxc1kuqg.js +1 -0
- package/.next/static/chunks/{3-qp777vtfglj.js → 2kz1f6r59nky0.js} +1 -1
- package/.next/static/chunks/2qgkbdshzpq1c.js +1 -0
- package/.next/static/chunks/{1bgvxd3xny53w.js → 2zbl41hed17g3.js} +2 -2
- package/.next/static/chunks/35jj-5u4te56r.js +1 -0
- package/.next/static/chunks/37ixzapa06xlo.js +1 -0
- package/.next/static/chunks/3b96xy59nl_gd.js +1 -0
- package/.next/static/chunks/{0f47nnshdlucs.js → 3gsxnqqqphh-1.js} +1 -1
- package/.next/static/chunks/{44vre0f7xqsh-.js → 3jtcieuk1l6tw.js} +1 -1
- package/.next/static/chunks/{05scfrgo_a_5_.js → 3k1d8y03t5nax.js} +1 -1
- package/.next/static/chunks/3sla-dm1puqd1.js +35 -0
- package/.next/static/chunks/3t2c76awm9k_p.js +1 -0
- package/.next/static/chunks/3vrmcm31ih7gb.js +1 -0
- package/.next/static/chunks/3yiqr95d7ybeq.js +15 -0
- package/bin/autostart.mjs +4 -1
- package/bin/database.mjs +26 -4
- package/bin/lock.mjs +59 -0
- package/bin/node-check.mjs +21 -0
- package/bin/thursday.mjs +8 -1
- package/guide/bots.md +4 -2
- package/guide/calls.md +11 -9
- package/guide/memory.md +3 -2
- package/guide/phone.md +7 -4
- package/guide/setup.md +26 -9
- package/guide/trouble.md +11 -4
- package/package.json +1 -1
- package/public/voices/intro/asleepBare-15199d56.ogg +0 -0
- package/public/voices/intro/style-88adf274.ogg +0 -0
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +6 -4
- package/skills/artifact/references/book.md +2 -1
- package/skills/artifact/references/sheet.md +12 -7
- package/skills/artifact/runtime/sheet/format.mjs +16 -9
- package/skills/artifact/scripts/book.mjs +19 -6
- package/skills/artifact/scripts/spreadsheet.mjs +194 -97
- package/skills/browser/SKILL.md +9 -6
- package/.next/server/chunks/[root-of-the-server]__03b09q0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__05n-hql._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0j_nz36._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jzwdg-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0tsded0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__12tahb4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1de1o6m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yl5l25._.js +0 -3
- package/.next/server/chunks/_02lipqs._.js +0 -5
- package/.next/server/chunks/_05sa7xl._.js +0 -3
- package/.next/server/chunks/_074f2ts._.js +0 -3
- package/.next/server/chunks/_0caua_s._.js +0 -3
- package/.next/server/chunks/_0p-h6xe._.js +0 -5
- package/.next/server/chunks/_0up2a9o._.js +0 -3
- package/.next/server/chunks/_17i1lt2._.js +0 -3
- package/.next/server/chunks/_1hy9x9_._.js +0 -3
- package/.next/server/chunks/_1hyvcgk._.js +0 -5
- package/.next/server/chunks/_1wl2g8_._.js +0 -6
- package/.next/server/chunks/_1y3mnz4._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10eb-1x._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +0 -3
- package/.next/server/chunks/ssr/_0o_o9ji._.js +0 -3
- package/.next/server/chunks/ssr/_0qne8xs._.js +0 -3
- package/.next/server/chunks/ssr/_0rvbegp._.js +0 -7
- package/.next/server/chunks/ssr/_1vtgiou._.js +0 -162
- package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +0 -3
- package/.next/static/chunks/04toe_3nqfjqt.js +0 -1
- package/.next/static/chunks/0mtfu8adz57qz.js +0 -1
- package/.next/static/chunks/0tp868040z9nn.js +0 -35
- package/.next/static/chunks/14qitm0kwsb6g.js +0 -15
- package/.next/static/chunks/1cyrrz4q871aj.js +0 -1
- package/.next/static/chunks/1st3b0c9vhxg3.js +0 -1
- package/.next/static/chunks/28sxb_k460e9h.js +0 -1
- package/.next/static/chunks/33ekkscpcq-z1.js +0 -1
- package/.next/static/chunks/388l-zszwa_jf.js +0 -1
- package/.next/static/chunks/3bwrvpjk95_x4.js +0 -1
- package/.next/static/chunks/3itdg6t243u6f.js +0 -1
- package/.next/static/chunks/3kj0pri2oc1g1.js +0 -1
- package/public/voices/intro/style-cb6fa4f7.ogg +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_buildManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,798120,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,n)=>({url:"/api/skills",pathVariable:[e,t],query:{path:n}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},630374,e=>{"use strict";var t=e.i(843476);e.i(914651);var n=e.i(402820),r=e.i(156736),o=e.i(209793),i=e.i(784324),l=e.i(264951),s=e.i(750440),a=e.i(974217),u=e.i(77173),c=e.i(313488),d=e.i(301807),p=e.i(675606),f=e.i(56434),g=e.i(564170);class m extends g.BasePopupHandle{constructor(){super((0,d.createNullDialogStore)(),"Dialog",!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let t=this.attachedStore;null===t||(t.set("payload",e),t.setOpen(!0,(0,p.createChangeEventDetails)(f.REASONS.imperativeAction)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>o.DialogDescription,"Handle",0,m,"Popup",()=>i.DialogPopup,"Portal",()=>l.DialogPortal,"Root",()=>s.DialogRoot,"Title",()=>u.DialogTitle,"Trigger",()=>c.DialogTrigger,"Viewport",()=>a.DialogViewport,"createHandle",0,function(){return new m}],828376);var h=e.i(828376),h=h,v=e.i(560964),E=e.i(167881),S=e.i(647163);function b({...e}){return(0,t.jsx)(h.Portal,{"data-slot":"dialog-portal",...e})}function y({className:e,...n}){return(0,t.jsx)(h.Backdrop,{"data-slot":"dialog-overlay",className:(0,S.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(h.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function({...e}){return(0,t.jsx)(h.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,children:n,showCloseButton:r=!0,...o}){return(0,t.jsxs)(b,{children:[(0,t.jsx)(y,{}),(0,t.jsxs)(h.Popup,{"data-slot":"dialog-content",className:(0,S.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[n,r&&(0,t.jsxs)(h.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(E.Button,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(v.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...n}){return(0,t.jsx)(h.Description,{"data-slot":"dialog-description",className:(0,S.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:r,...o}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,S.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[r,n&&(0,t.jsx)(h.Close,{render:(0,t.jsx)(E.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,S.cn)("flex flex-col gap-2",e),...n})},"DialogPopup",0,function({className:e,...n}){return(0,t.jsx)(h.Popup,{"data-slot":"dialog-popup",className:(0,S.cn)("outline-none",e),...n})},"DialogPortal",0,b,"DialogTitle",0,function({className:e,...n}){return(0,t.jsx)(h.Title,{"data-slot":"dialog-title",className:(0,S.cn)("font-heading text-base leading-none font-medium",e),...n})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(h.Trigger,{"data-slot":"dialog-trigger",...e})}],630374)},671428,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-muted",e),...r})}])},393080,e=>{"use strict";let t=e=>!!e&&"object"==typeof e&&(!0===e.$ok||!1===e.$ok),n=e=>t(e)&&e.$ok;e.s(["isResult",0,t,"isResultOk",0,n,"result",0,{ok:e=>({$ok:!0,data:e}),error:e=>({$ok:!1,message:e})},"unwrapResult",0,e=>{if(!n(e))throw Error(e.message??"Something went wrong");return e.data}])},609856,e=>{"use strict";var t=e.i(271645),n=e.i(6799),r=e.i(647163),o=e.i(393080);let i="Something went wrong";e.s(["useServerAction",0,function(e,l={}){let[s,a]=(0,t.useState)(!1),[u,c]=(0,t.useState)(),[d,p]=(0,t.useState)(),f=(0,t.useRef)(l);(0,t.useEffect)(()=>{f.current=l});let g=(0,t.useRef)(0),m=(0,t.useCallback)(async(...t)=>{let l=++g.current;a(!0);try{let s=await e(...t).catch(e=>o.result.error((0,r.errorToString)(e))),{onOk:a,onError:u,okMessage:d,errorMessage:m}=f.current;if((0,o.isResultOk)(s)){l===g.current&&(c(s.data),p(void 0));let e="function"==typeof d?d(s.data):d;return e&&n.toast.add({type:"success",title:e}),a?.(s.data),s.data}if(l===g.current&&p(s.message??i),!1!==m){let e="function"==typeof m?m(s.message):m??s.message??i;n.toast.add({type:"error",title:e})}throw u?.(s.message),Error(s.message??i)}finally{l===g.current&&a(!1)}},[e]);return[(0,t.useCallback)((...e)=>{let t=m(...e);return t.catch(()=>{}),t},[m]),s,u,d,(0,t.useCallback)(()=>{c(void 0),p(void 0)},[])]}])},209793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(108821),r=e.i(552245),o=e.i(788015);let i=t.forwardRef(function(e,t){let{render:i,className:l,style:s,id:a,...u}=e,c=(0,n.useDialogRootContext)(),d=(0,o.useBaseUiId)(a);return c.useSyncedValueWithCleanup("descriptionElementId",d),(0,r.useRenderElement)("p",e,{ref:t,props:[{id:d},u]})});e.s(["DialogDescription",0,i])},914651,108821,402820,156736,e=>{"use strict";e.s([],914651);var t=e.i(271645),n=e.i(733332);let r=t.createContext(void 0);function o(e){let o=t.useContext(r);if(!e&&void 0===o)throw Error((0,n.default)(27));return o}e.s(["DialogRootContext",0,r,"useDialogRootContext",0,o],108821);var i=e.i(552245),l=e.i(879938);let s=t.forwardRef(function(e,t){let{render:n,className:r,style:s,forceRender:a=!1,...u}=e,c=o(),d=c.useState("open"),p=c.useState("nested"),f=c.useState("mounted"),g=c.useState("transitionStatus");return(0,i.useRenderElement)("div",e,{state:{open:d,transitionStatus:g},ref:[c.context.backdropRef,t],stateAttributesMapping:l.popupTransitionStateMapping,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:a||!p})});e.s(["DialogBackdrop",0,s],402820);var a=e.i(540886),u=e.i(675606),c=e.i(56434);let d=t.forwardRef(function(e,t){let{render:n,className:r,style:l,disabled:s=!1,nativeButton:d=!0,...p}=e,f=o(),g=f.useState("open"),{getButtonProps:m,buttonRef:h}=(0,a.useButton)({disabled:s,native:d});return(0,i.useRenderElement)("button",e,{state:{disabled:s},ref:[t,h],props:[{onClick:function(e){g&&f.setOpen(!1,(0,u.createChangeEventDetails)(c.REASONS.closePress,e.nativeEvent))}},p,m]})});e.s(["DialogClose",0,d],156736)},784324,10199,e=>{"use strict";var t=e.i(271645),n=e.i(61487),r=e.i(108821),o=e.i(552245),i=e.i(625834),l=e.i(137584),s=e.i(673327),a=e.i(264111),u=e.i(474354),c=e.i(879938),d=e.i(38380),d=d;d.open,d.closed,d.startingStyle,d.endingStyle;let p={...c.popupStateMapping,...u.transitionStatusMapping,nestedDialogOpen:e=>e?{"data-nested-dialog-open":""}:null};e.s(["dialogStateAttributesMapping",0,p],10199);var f=e.i(843476);let g=t.forwardRef(function(e,t){let{render:u,className:c,style:d,finalFocus:g,initialFocus:m,...h}=e,v=(0,r.useDialogRootContext)(),E=v.useState("descriptionElementId"),S=v.useState("disablePointerDismissal"),b=v.useState("floatingRootContext"),y=v.useState("popupProps"),C=v.useState("modal"),R=v.useState("mounted"),T=v.useState("nested"),w=v.useState("nestedOpenDialogCount"),x=v.useState("open"),P=v.useState("openMethod"),O=v.useState("titleElementId"),k=v.useState("transitionStatus"),D=v.useState("role"),I=b.useState("floatingId");(0,i.useDialogPortalContext)(),(0,l.useOpenChangeComplete)({open:x,ref:v.context.popupRef,onComplete(){x&&v.context.onOpenChangeComplete?.(!0)}});let M=void 0===m?(0,a.createDefaultInitialFocus)(v.context.popupRef):m,A=v.useStateSetter("popupElement"),L=(0,o.useRenderElement)("div",e,{state:{open:x,nested:T,transitionStatus:k,nestedDialogOpen:w>0},props:[y,{id:I,"aria-labelledby":O,"aria-describedby":E,role:D,...a.FOCUSABLE_POPUP_PROPS,hidden:!R,onKeyDown(e){s.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":w}},h],ref:[t,v.context.popupRef,A],stateAttributesMapping:p});return(0,f.jsx)(n.FloatingFocusManager,{context:b,openInteractionType:P,disabled:!R,closeOnFocusOut:!S,initialFocus:M,returnFocus:g,modal:!1!==C,restoreFocus:"popup",children:L})});e.s(["DialogPopup",0,g],784324)},264951,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(144394),r=e.i(726674),o=e.i(108821),i=e.i(625834),l=e.i(426),s=e.i(843476);let a=t.forwardRef(function(e,t){let{keepMounted:a=!1,...u}=e,c=(0,o.useDialogRootContext)(),d=c.useState("mounted"),p=c.useState("modal"),f=c.useState("open");return d||a?(0,s.jsx)(i.DialogPortalContext.Provider,{value:a,children:(0,s.jsxs)(r.FloatingPortal,{ref:t,...u,children:[d&&!0===p&&(0,s.jsx)(l.InternalBackdrop,{ref:c.context.internalBackdropRef,inert:(0,n.inertValue)(!f)}),e.children]})}):null});e.s(["DialogPortal",0,a])},625834,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645);let r=n.createContext(void 0);e.s(["DialogPortalContext",0,r,"useDialogPortalContext",0,function(){let e=n.useContext(r);if(void 0===e)throw Error((0,t.default)(26));return e}])},750440,301807,974217,77173,e=>{"use strict";var t=e.i(896499),n=e.i(271645),r=e.i(67530),o=e.i(108821),i=e.i(301252),l=e.i(18478),s=e.i(116786),a=e.i(990627),u=e.i(264111);let c={...s.popupStoreSelectors,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class d extends i.ReactStore{constructor(e,t,n){const r=new a.PopupTriggerMap;super(p(e,r,t,n),f(r),c)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update((0,u.createPopupOpenState)(this.state,e,t.trigger)))}}function p(e,t,n,r=!1){return{...(0,s.createInitialPopupStoreState)(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function f(e){return{popupRef:n.createRef(),backdropRef:n.createRef(),internalBackdropRef:n.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}e.s(["DialogStore",0,d,"createNullDialogStore",0,function(){let e=new a.PopupTriggerMap;return new l.NullStore(Object.freeze(p(void 0,e)),Object.freeze(f(e)),c)}],301807);var g=e.i(675606),m=e.i(56434),h=e.i(843476);let v=(0,t.fastComponent)(function(e){return function(e,t){let{children:i,open:l,defaultOpen:s=!1,onOpenChange:a,onOpenChangeComplete:c,disablePointerDismissal:p=!1,modal:f=!0,actionsRef:v,handle:E,triggerId:S,defaultTriggerId:b=null}=t,y="alert-dialog"===e,C=(0,o.useDialogRootContext)(!0),R={modal:!!y||f,disablePointerDismissal:y||p,nested:null!=C,role:y?"alertdialog":"dialog"},T=(0,u.usePopupRootStore)((e,t)=>new d({open:s,openProp:l,activeTriggerId:b,triggerIdProp:S,...R},e,t),!0);T.useControlledProp("openProp",l),T.useControlledProp("triggerIdProp",S),T.useSyncedValues(R),T.useContextCallback("onOpenChange",a),T.useContextCallback("onOpenChangeComplete",c);let w=T.useState("open"),x=T.useState("mounted"),P=T.useState("payload");(0,u.usePopupRootSync)(T,w),(0,u.useImplicitActiveTrigger)(T);let{forceUnmount:O}=(0,u.useOpenStateTransitions)(w,T);n.useImperativeHandle(v,()=>({unmount:O,close:()=>T.setOpen(!1,(0,g.createChangeEventDetails)(m.REASONS.imperativeAction))}),[O,T]);let k=w||x;return(0,h.jsxs)(o.DialogRootContext.Provider,{value:T,children:[E&&(0,h.jsx)(u.PopupHandleAttachment,{handle:E,store:T}),k&&(0,h.jsx)(r.DialogInteractions,{store:T,parentContext:C?.context,isDrawer:"drawer"===e}),"function"==typeof i?i({payload:P}):i]})}("dialog",e)});e.s(["DialogRoot",0,v],750440);var E=e.i(552245),S=e.i(625834),b=e.i(10199);let y=n.forwardRef(function(e,t){let{render:n,className:r,style:i,children:l,...s}=e,a=(0,S.useDialogPortalContext)(),u=(0,o.useDialogRootContext)(),c=u.useState("open"),d=u.useState("nested"),p=u.useState("transitionStatus"),f=u.useState("nestedOpenDialogCount"),g=u.useState("mounted"),m=u.useStateSetter("viewportElement");return(0,E.useRenderElement)("div",e,{enabled:a||g,state:{open:c,nested:d,transitionStatus:p,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:b.dialogStateAttributesMapping,props:[{role:"presentation",hidden:!g,style:{pointerEvents:c?void 0:"none"},children:l},s]})});e.s(["DialogViewport",0,y],974217);var C=e.i(788015);let R=n.forwardRef(function(e,t){let{render:n,className:r,style:i,id:l,...s}=e,a=(0,o.useDialogRootContext)(),u=(0,C.useBaseUiId)(l);return a.useSyncedValueWithCleanup("titleElementId",u),(0,E.useRenderElement)("h2",e,{ref:t,props:[{id:u},s]})});e.s(["DialogTitle",0,R],77173)},67530,e=>{"use strict";var t=e.i(271645),n=e.i(146376),r=e.i(145484),o=e.i(17989),i=e.i(584446),l=e.i(264111);e.s(["DialogInteractions",0,function({store:e,parentContext:s,isDrawer:a}){let u=e.useState("open"),c=e.useState("disablePointerDismissal"),d=e.useState("modal"),p=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,m]=t.useState(0),[h,v]=t.useState(0),E=0===g,S=(0,o.useDismiss)(f,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===d?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button)return!1;if("touches"in t){if("touchend"===t.type){if(1!==t.changedTouches.length||0!==t.touches.length)return!1}else if(1!==t.touches.length)return!1}let n=(0,i.getTarget)(t);if(E&&!c){if(d){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return!t&&!r||t===n||r===n||(0,i.contains)(n,p)&&!n?.hasAttribute("data-base-ui-portal")}return!0}return!1},escapeKey:E});return(0,r.useScrollLock)(u&&!0===d,p),e.useContextCallback("onNestedDialogOpen",(e,t)=>{m(e),v(t)}),(0,n.useIsoLayoutEffect)(()=>(s?.onNestedDialogOpen&&(u?s.onNestedDialogOpen(g+1,h+ +!!a):s.onNestedDialogOpen(0,0)),()=>{s?.onNestedDialogOpen&&u&&s.onNestedDialogOpen(0,0)}),[a,u,g,h,s]),(0,l.usePopupInteractionProps)(e,{activeTriggerProps:S.reference,inactiveTriggerProps:S.trigger,popupProps:S.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}])},313488,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645),r=e.i(896499),o=e.i(108821),i=e.i(540886),l=e.i(552245),s=e.i(879938),a=e.i(638396),u=e.i(459636),c=e.i(264111),d=e.i(788015),p=e.i(385689),f=e.i(32199);let g=(0,r.fastComponentRef)(function(e,r){let{render:g,className:m,style:h,disabled:v=!1,nativeButton:E=!0,id:S,payload:b,handle:y,...C}=e,R=(0,o.useDialogRootContext)(!0),T=(0,u.usePopupHandleStore)(y)??R;if(!T)throw Error((0,t.default)(79));let w=(0,d.useBaseUiId)(S),x=T.useState("floatingRootContext"),P=T.useState("isOpenedByTrigger",w),O=T.useState("triggerPopupId",w),k=n.useRef(null),{registerTrigger:D,isMountedByThisTrigger:I}=(0,c.useTriggerDataForwarding)(w,k,T,{payload:b}),{getButtonProps:M,buttonRef:A}=(0,i.useButton)({disabled:v,native:E}),L=(0,p.useClick)(x),N=(0,f.useOpenMethodTriggerProps)(()=>T.select("open"),e=>{T.set("openMethod",e)}),F=T.useState("triggerProps",I);return(0,l.useRenderElement)("button",e,{state:{disabled:v,open:P},ref:[A,r,D,k],props:[L.reference,F,N,{[a.CLICK_TRIGGER_IDENTIFIER]:"",id:w,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":O},C,M],stateAttributesMapping:s.triggerOpenStateMapping})});e.s(["DialogTrigger",0,g])},61487,e=>{"use strict";var t=e.i(271645),n=e.i(229315),r=e.i(574735),o=e.i(365420),i=e.i(828918),l=e.i(446265),s=e.i(667865),a=e.i(146376),u=e.i(439957),c=e.i(328744),d=e.i(708445),p=e.i(108868),f=e.i(333848),g=e.i(152535),m=e.i(584446),h=e.i(596296),v=e.i(157940),E=e.i(383976),S=e.i(958408),b=e.i(621082),y=e.i(675606),C=e.i(56434),R=e.i(451321),T=e.i(503596);let w={inert:new WeakMap,"aria-hidden":new WeakMap},x="data-base-ui-inert",P={inert:new WeakSet,"aria-hidden":new WeakSet},O=new WeakMap,k=0,D=(e,t)=>t.map(t=>{if(e.contains(t))return t;let r=function e(t){return t?(0,n.isShadowRoot)(t)?t.host:e(t.parentNode):null}(t);return e.contains(r)?r:null}).filter(e=>null!=e),I=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},M=(e,t,r)=>{let o=[],i=e=>{!e||r.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,n.getNodeName)(e)&&(t.has(e)?i(e):o.push(e))})};return i(e),o};function A(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,i=(0,p.ownerDocument)(e[0]).body;return function(e,t,n,r,{mark:o=!0}){let i=null;r?i="inert":n&&(i="aria-hidden");let l=null,s=null,a=D(t,e),u=o?M(t,I(a),new Set(a)):[],c=[],d=[];if(i){let e=w[i],n=P[i];s=n,l=e;let r=D(t,Array.from(t.querySelectorAll("[aria-live]"))),o=a.concat(r);M(t,I(o),new Set(o)).forEach(t=>{let r=t.getAttribute(i),o=null!==r&&"false"!==r,l=(e.get(t)||0)+1;e.set(t,l),c.push(t),1===l&&o&&n.add(t),o||t.setAttribute(i,"inert"===i?"":"true")})}return o&&u.forEach(e=>{let t=(O.get(e)||0)+1;O.set(e,t),d.push(e),1===t&&e.setAttribute(x,"")}),k+=1,()=>{l&&c.forEach(e=>{let t=(l.get(e)||0)-1;l.set(e,t),t||(!s?.has(e)&&i&&e.removeAttribute(i),s?.delete(e))}),o&&d.forEach(e=>{let t=(O.get(e)||0)-1;O.set(e,t),t||e.removeAttribute(x)}),(k-=1)||(w.inert=new WeakMap,w["aria-hidden"]=new WeakMap,P.inert=new WeakSet,P["aria-hidden"]=new WeakSet,O=new WeakMap)}}(e,i,n,r,{mark:o})}var L=e.i(726674),N=e.i(46420),F=e.i(638396),B=e.i(594603),W=e.i(843476);let j=[];function H(){j=j.filter(e=>e.deref()?.isConnected)}function U(e){H(),e&&"body"!==(0,n.getNodeName)(e)&&(j.push(new WeakRef(e)),j.length>20&&(j=j.slice(-20)))}function q(){return H(),j[j.length-1]?.deref()}function Y(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let t=(0,E.focusable)(e).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return(0,E.isTabbable)(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}e.s(["FloatingFocusManager",0,function(e){let{context:w,children:x,disabled:P=!1,initialFocus:O=!0,returnFocus:k=!0,restoreFocus:D=!1,modal:I=!0,closeOnFocusOut:M=!0,openInteractionType:j="",nextFocusableElement:V,previousFocusableElement:_,beforeContentFocusGuardRef:$,externalTree:X,getInsideElements:K}=e,G="rootStore"in w?w.rootStore:w,z=G.useState("open"),J=G.useState("domReferenceElement"),Q=G.useState("floatingElement"),{events:Z,dataRef:ee}=G.context,et=(0,s.useStableCallback)(()=>ee.current.floatingContext?.nodeId),en=(0,h.isTypeableCombobox)(J)&&!1===O,er=(0,l.useValueAsRef)(O),eo=(0,l.useValueAsRef)(k),ei=(0,l.useValueAsRef)(j),el=(0,l.useValueAsRef)(z),es=(0,N.useFloatingTree)(X),ea=(0,L.usePortalContext)(),eu=t.useRef(!1),ec=t.useRef(!1),ed=t.useRef(!1),ep=t.useRef(null),ef=t.useRef(""),eg=t.useRef(""),em=t.useRef(null),eh=t.useRef(null),ev=(0,i.useMergedRefs)(em,$,ea?.beforeInsideRef),eE=(0,i.useMergedRefs)(eh,ea?.afterInsideRef),eS=(0,u.useTimeout)(),eb=(0,u.useTimeout)(),ey=(0,d.useAnimationFrame)(),eC=null!=ea,eR=(0,h.getFloatingFocusElement)(Q),eT=(0,s.useStableCallback)((e=eR)=>e?(0,E.tabbable)(e):[]),ew=(0,s.useStableCallback)(()=>K?.().filter(e=>null!=e)??[]);t.useEffect(()=>{if(P||!I)return;let e=(0,p.ownerDocument)(eR);return(0,r.addEventListener)(e,"keydown",function(e){"Tab"===e.key&&(0,m.contains)(eR,(0,m.activeElement)((0,p.ownerDocument)(eR)))&&0===eT().length&&!en&&(0,v.stopEvent)(e)})},[P,eR,I,en,eT]),t.useEffect(()=>{if(P||!z)return;let e=(0,p.ownerDocument)(eR);function t(){ed.current=!1}return(0,o.mergeCleanups)((0,r.addEventListener)(e,"pointerdown",function(e){let t=(0,m.getTarget)(e),n=ew();ed.current=!((0,m.contains)(Q,t)||(0,m.contains)(J,t)||(0,m.contains)(ea?.portalNode,t)||n.some(e=>e===t||(0,m.contains)(e,t))),eg.current=e.pointerType||"keyboard",t?.closest(`[${F.CLICK_TRIGGER_IDENTIFIER}]`)&&(ec.current=!0,eb.start(0,()=>{ec.current=!1}))},!0),(0,r.addEventListener)(e,"pointerup",t,!0),(0,r.addEventListener)(e,"pointercancel",t,!0),(0,r.addEventListener)(e,"keydown",function(){eg.current="keyboard"},!0),t)},[P,Q,J,eR,z,ea,eb,ew]),t.useEffect(()=>{if(P||!M)return;let e=(0,p.ownerDocument)(eR);function t(t){let r=t.relatedTarget,o=t.currentTarget,i=(0,m.getTarget)(t);I&&null==r&&null!=i&&(0,m.contains)(Q,i)&&U(i),queueMicrotask(()=>{let l=et(),s=G.context.triggerElements,a=ew(),u=r?.hasAttribute((0,R.createAttribute)("focus-guard"))&&[em.current,eh.current,ea?.beforeInsideRef.current,ea?.afterInsideRef.current,ea?.beforeOutsideRef.current,ea?.afterOutsideRef.current,(0,B.resolveRef)(_),(0,B.resolveRef)(V)].includes(r),c=!((0,m.contains)(J,r)||(0,m.contains)(Q,r)||(0,m.contains)(r,Q)||(0,m.contains)(ea?.portalNode,r)||a.some(e=>e===r||(0,m.contains)(e,r))||s.hasMatchingElement(e=>(0,m.contains)(e,r))||u||es&&((0,S.getNodeChildren)(es.nodesRef.current,l).find(e=>(0,m.contains)(e.context?.elements.floating,r)||(0,m.contains)(e.context?.elements.domReference,r))||(0,S.getNodeAncestors)(es.nodesRef.current,l).find(e=>[e.context?.elements.floating,(0,h.getFloatingFocusElement)(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(o===J&&eR&&Y(eR),D&&o!==J&&!(0,b.isElementVisible)(i)&&(0,m.activeElement)(e)===e.body){if((0,n.isHTMLElement)(eR)&&(eR.focus(),"popup"===D))return void ey.request(()=>{eR.focus()});let e=eT(),t=ep.current,r=(t&&e.includes(t)?t:null)||e[e.length-1]||eR;(0,n.isHTMLElement)(r)&&r.focus()}if(ee.current.insideReactTree){ee.current.insideReactTree=!1;return}(en||!I)&&r&&c&&!ec.current&&(en||r!==q())&&(eu.current=!0,G.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,t)))})}let i=(0,n.isHTMLElement)(J)?J:null;if(Q||i)return(0,o.mergeCleanups)(i&&(0,r.addEventListener)(i,"focusout",t),i&&(0,r.addEventListener)(i,"pointerdown",function(){ec.current=!0,eb.start(0,()=>{ec.current=!1})}),Q&&(0,r.addEventListener)(Q,"focusin",function(e){let t=(0,m.getTarget)(e);(0,E.isTabbable)(t)&&(ep.current=t)}),Q&&(0,r.addEventListener)(Q,"focusout",t),Q&&ea&&(0,r.addEventListener)(Q,"focusout",function(){ed.current||(ee.current.insideReactTree=!0,eS.start(0,()=>{ee.current.insideReactTree=!1}))},!0))},[P,J,Q,eR,I,es,ea,G,M,D,eT,en,et,ee,eS,eb,ey,V,_,ew]),t.useEffect(()=>{if(P||!Q||!z)return;let e=Array.from(ea?.portalNode?.querySelectorAll(`[${(0,R.createAttribute)("portal")}]`)||[]),t=es?(0,S.getNodeAncestors)(es.nodesRef.current,et()):[],n=t.find(e=>(0,h.isTypeableCombobox)(e.context?.elements.domReference||null))?.context?.elements.domReference,r=A([Q,...e,em.current,eh.current,ea?.beforeOutsideRef.current,ea?.afterOutsideRef.current,...ew(),n,(0,B.resolveRef)(_),(0,B.resolveRef)(V),en?J:null].filter(e=>null!=e),{ariaHidden:I||en,mark:!1}),o=A([Q,...e].filter(e=>null!=e));return()=>{o(),r()}},[z,P,J,Q,I,ea,en,es,et,V,_,ew]),(0,a.useIsoLayoutEffect)(()=>{if(!z||P||!(0,n.isHTMLElement)(eR))return;ef.current="",eg.current="";let e=(0,p.ownerDocument)(eR),t=(0,m.activeElement)(e);queueMicrotask(()=>{let n,r=er.current,o="function"==typeof r?r(ei.current||""):r;if(void 0===o||!1===o||(0,m.contains)(eR,t))return;let i=null,l=()=>(null==i&&(i=eT(eR)),i[0]||eR);n=(n=!0===o||null===o?l():(0,B.resolveRef)(o))||l();let s=(0,m.contains)(eR,(0,m.activeElement)(e));(0,T.enqueueFocus)(n,{preventScroll:n===eR,shouldFocus(){if(!el.current)return!1;if(s)return!0;let t=(0,m.activeElement)(e);return!(t!==n&&(0,m.contains)(eR,t))}})})},[P,z,eR,eT,er,ei,el]),(0,a.useIsoLayoutEffect)(()=>{if(P||!eR)return;let e=(0,p.ownerDocument)(eR),t=(0,m.activeElement)(e),r=null==ei.current;function o(e){var t,n;let r;if(e.open||(t=e.nativeEvent,n=eg.current,r=(0,f.ownerWindow)((0,m.getTarget)(t)),ef.current=t instanceof r.KeyboardEvent?"keyboard":t instanceof r.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof r.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===C.REASONS.triggerHover&&"mouseleave"===e.nativeEvent.type&&(eu.current=!0),e.reason===C.REASONS.outsidePress)if(e.nested)eu.current=!1;else if((0,v.isVirtualClick)(e.nativeEvent)||(0,v.isVirtualPointerEvent)(e.nativeEvent))eu.current=!1;else{let e=!1;(0,p.ownerDocument)(eR).createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?eu.current=!1:eu.current=!0}}return U(t),Z.on("openchange",o),()=>{Z.off("openchange",o);let i=(0,m.activeElement)(e),l=ew(),s=(0,m.contains)(Q,i)||l.some(e=>e===i||(0,m.contains)(e,i))||es&&(0,S.getNodeChildren)(es.nodesRef.current,et(),!1).some(e=>(0,m.contains)(e.context?.elements.floating,i)),a=eo.current,u=ef.current,c=function(e){let o=eo.current,i="function"==typeof o?o(e):o;if(void 0===i||!1===i)return null;null===i&&(i=!0);let l=J?.isConnected?J:null,s=t?.isConnected&&"body"!==(0,n.getNodeName)(t)?t:null,a=r?s||l:l||s;return(a||(a=q()||null),"boolean"==typeof i)?a:(0,B.resolveRef)(i)||a||null}(u);queueMicrotask(()=>{let t=c?(0,E.isTabbable)(c)?c:(0,E.tabbable)(c)[0]||c:null;if(a&&!eu.current&&(0,n.isHTMLElement)(t)&&("boolean"!=typeof a||t===i||i===e.body||s)){let e={preventScroll:!0};"keyboard"===u&&(e.focusVisible=!0),t.focus(e)}eu.current=!1})}},[P,Q,eR,eo,ei,Z,es,J,et,ew]),(0,a.useIsoLayoutEffect)(()=>{if(!c.platform.engine.webkit||z||!Q)return;let e=(0,m.activeElement)((0,p.ownerDocument)(Q));(0,n.isHTMLElement)(e)&&(0,h.isTypeableElement)(e)&&(0,m.contains)(Q,e)&&e.blur()},[z,Q]),(0,a.useIsoLayoutEffect)(()=>{if(!P&&ea)return ea.setFocusManagerState({modal:I,closeOnFocusOut:M,open:z,onOpenChange:G.setOpen,domReference:J}),()=>{ea.setFocusManagerState(null)}},[P,ea,I,z,G,M,J]),(0,a.useIsoLayoutEffect)(()=>{if(!P&&eR)return Y(eR),()=>{queueMicrotask(H)}},[P,eR]);let ex=!P&&(!I||!en)&&(eC||I);return(0,W.jsxs)(t.Fragment,{children:[ex&&(0,W.jsx)(g.FocusGuard,{"data-type":"inside",ref:ev,onFocus:e=>{if(I){let e=eT();(0,T.enqueueFocus)(e[e.length-1])}else if(ea?.portalNode)if(eu.current=!1,(0,E.isOutsideEvent)(e,ea.portalNode)){let e=(0,E.getNextTabbable)(J);e?.focus()}else(0,B.resolveRef)(_??ea.beforeOutsideRef)?.focus()}}),x,ex&&(0,W.jsx)(g.FocusGuard,{"data-type":"inside",ref:eE,onFocus:e=>{if(I)(0,T.enqueueFocus)(eT()[0]);else if(ea?.portalNode)if(M&&(eu.current=!0),(0,E.isOutsideEvent)(e,ea.portalNode)){let e=(0,E.getPreviousTabbable)(J);e?.focus()}else(0,B.resolveRef)(V??ea.afterOutsideRef)?.focus()}})]})}],61487)},385689,e=>{"use strict";var t=e.i(271645),n=e.i(708445),r=e.i(439957),o=e.i(956789),i=e.i(584446),l=e.i(596296),s=e.i(157940),a=e.i(675606),u=e.i(56434);e.s(["useClick",0,function(e,c={}){let{enabled:d=!0,event:p="click",toggle:f=!0,ignoreMouse:g=!1,stickIfOpen:m=!0,touchOpenDelay:h=0,reason:v=u.REASONS.triggerPress}=c,E="rootStore"in e?e.rootStore:e,S=E.context.dataRef,b=t.useRef(void 0),y=(0,n.useAnimationFrame)(),C=(0,r.useTimeout)(),R=t.useMemo(()=>{function e(e,t,n,r){let o=(0,a.createChangeEventDetails)(v,t,n);e&&"touch"===r&&h>0?C.start(h,()=>{E.setOpen(!0,o)}):E.setOpen(e,o)}function t(e,t,n){let r=S.current.openEvent,o=E.select("domReferenceElement")!==t;return!!e&&!!o||!e||!f||!!r&&!!m&&!n(r.type)}return{onPointerDown(e){b.current=(0,s.isMouseLikePointerType)(e.pointerType,!0)&&(0,s.isVirtualPointerEvent)(e.nativeEvent)?"virtual":e.pointerType},onMouseDown(n){let r=b.current,o=n.nativeEvent,a=E.select("open");if(0!==n.button||"click"===p||(0,s.isMouseLikePointerType)(r,!0)&&g)return;let u=t(a,n.currentTarget,e=>"click"===e||"mousedown"===e),c=(0,i.getTarget)(o);if((0,l.isTypeableElement)(c))return void e(u,o,c,r);let d=n.currentTarget;y.request(()=>{e(u,o,d,r)})},onClick(n){if("mousedown-only"===p)return;let r=b.current;if("mousedown"===p&&r){b.current=void 0;return}(0,s.isMouseLikePointerType)(r,!0)&&g||e(t(E.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,r)},onKeyDown(){b.current=void 0}}},[S,p,g,v,E,m,f,y,C,h]);return t.useMemo(()=>d?{reference:R}:o.EMPTY_OBJECT,[d,R])}])},17989,e=>{"use strict";var t=e.i(271645),n=e.i(574735),r=e.i(365420),o=e.i(108868),i=e.i(667865),l=e.i(439957),s=e.i(229315),a=e.i(328744),u=e.i(46420),c=e.i(675606),d=e.i(56434),p=e.i(451321),f=e.i(584446),g=e.i(596296),m=e.i(157940),h=e.i(958408);function v(){return!1}e.s(["useDismiss",0,function(e,E={}){let{enabled:S=!0,escapeKey:b=!0,outsidePress:y=!0,outsidePressEvent:C="sloppy",referencePress:R=v,bubbles:T,externalTree:w}=E,x="rootStore"in e?e.rootStore:e,P=x.useState("open"),O=x.useState("floatingElement"),{dataRef:k,events:D}=x.context,I=(0,u.useFloatingTree)(w),M=(0,i.useStableCallback)("function"==typeof y?y:()=>!1),A="function"==typeof y?M:y,L=!1!==A,N=(0,i.useStableCallback)(()=>C),{escapeKey:F,outsidePress:B}={escapeKey:"boolean"==typeof T?T:T?.escapeKey??!1,outsidePress:"boolean"==typeof T?T:T?.outsidePress??!0},W=t.useRef(!1),j=t.useRef(!1),H=t.useRef(!1),U=t.useRef(!1),q=t.useRef(!1),Y=t.useRef(""),V=t.useRef(null),_=(0,l.useTimeout)(),$=(0,l.useTimeout)(),X=(0,i.useStableCallback)(()=>{$.clear(),k.current.insideReactTree=!1}),K=(0,i.useStableCallback)(e=>{let t=k.current.floatingContext?.nodeId;return(I?(0,h.getNodeChildren)(I.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),G=(0,i.useStableCallback)(e=>(0,g.isEventTargetWithin)(e,x.select("floatingElement"))||(0,g.isEventTargetWithin)(e,x.select("domReferenceElement"))),z=(0,i.useStableCallback)(e=>{R()&&x.setOpen(!1,(0,c.createChangeEventDetails)(d.REASONS.triggerPress,e.nativeEvent))}),J=(0,i.useStableCallback)(e=>{if(!P||!S||!b||"Escape"!==e.key||q.current||!F&&K("__escapeKeyBubbles"))return;let t=(0,m.isReactEvent)(e)?e.nativeEvent:e,n=(0,c.createChangeEventDetails)(d.REASONS.escapeKey,t);x.setOpen(!1,n),n.isCanceled||e.preventDefault(),F||n.isPropagationAllowed||e.stopPropagation()}),Q=(0,i.useStableCallback)(()=>{k.current.insideReactTree=!0,$.start(0,X)}),Z=(0,i.useStableCallback)(e=>{if(!P||!S||0!==e.button)return;let t=(0,f.getTarget)(e.nativeEvent);(0,f.contains)(x.select("floatingElement"),t)&&(W.current||(W.current=!0,j.current=!1))}),ee=(0,i.useStableCallback)(e=>{!P||!S||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&W.current&&(j.current=!0)});t.useEffect(()=>{function e(e){e.open||(U.current=!1)}return D.on("openchange",e),()=>{D.off("openchange",e)}},[D]),t.useEffect(()=>{if(!P||!S)return P||(U.current=!1),X;k.current.__escapeKeyBubbles=F,k.current.__outsidePressBubbles=B;let e=new l.Timeout,t=new l.Timeout,i=(0,o.ownerDocument)(O);function u(){H.current=!0,t.start(0,()=>{H.current=!1})}function v(){W.current=!1,j.current=!1}function E(){let e=Y.current,t=N(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}function y(e){let t=k.current.floatingContext?.nodeId,n=I&&(0,h.getNodeChildren)(I.nodesRef.current,t).some(t=>(0,g.isEventTargetWithin)(e,t.context?.elements.floating));return G(e)||n}function C(e){let n;if("intentional"===(n=E())&&"click"!==e.type||"sloppy"===n&&"click"===e.type){"click"===e.type||G(e)||(t.clear(),H.current=!1),X();return}if(k.current.insideReactTree)return void X();let r=(0,f.getTarget)(e),i=`[${(0,p.createAttribute)("inert")}]`,l=(0,s.isElement)(r)?r.getRootNode():null,a=Array.from(((0,s.isShadowRoot)(l)?l:(0,o.ownerDocument)(x.select("floatingElement"))).querySelectorAll(i)),u=x.context.triggerElements;if(r&&(u.hasElement(r)||u.hasMatchingElement(e=>(0,f.contains)(e,r))))return;let h=(0,s.isElement)(r)?r:null;for(;h&&!(0,s.isLastTraversableNode)(h);){let e=(0,s.getParentNode)(h);if((0,s.isLastTraversableNode)(e)||!(0,s.isElement)(e))break;h=e}if(!(a.length&&(0,s.isElement)(r)&&!(0,g.isRootElement)(r)&&!(0,f.contains)(r,x.select("floatingElement"))&&a.every(e=>!(0,f.contains)(h,e)))){if((0,s.isHTMLElement)(r)&&!("touches"in e)){let t=(0,s.isLastTraversableNode)(r),n=(0,s.getComputedStyle)(r),o=/auto|scroll/,i=t||o.test(n.overflowX),l=t||o.test(n.overflowY),a=i&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,u=l&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,c="rtl"===n.direction,d=u&&(c?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),p=a&&e.offsetY>r.clientHeight;if(d||p)return}if(!y(e)){if("intentional"===E()){if(0!==e.detail&&!(0,m.isVirtualClick)(e)&&!U.current)return;if(H.current){t.clear(),H.current=!1;return}}"function"==typeof A&&!A(e)||K("__outsidePressBubbles")||(x.setOpen(!1,(0,c.createChangeEventDetails)(d.REASONS.outsidePress,e)),X())}}}function R(e){if("sloppy"!==E()||!x.select("open")||!S||G(e))return;let t=e.touches[0];t&&(V.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{V.current&&(V.current.dismissOnTouchEnd=!1,V.current.dismissOnMouseDown=!1)}))}function T(e,t){let r=(0,f.getTarget)(e);if(!r)return;let o=(0,n.addEventListener)(r,e.type,()=>{t(e),o()})}function w(e){_.clear(),"pointerdown"===e.type&&(0===e.button&&(U.current=!0),Y.current=e.pointerType),("mousedown"!==e.type||!V.current||V.current.dismissOnMouseDown)&&T(e,e=>{if("pointerdown"===e.type)"sloppy"!==E()||"touch"===e.pointerType||!x.select("open")||!S||G(e)||C(e);else C(e)})}function D(e){if("pointercancel"===e.type&&(U.current=!1),!W.current)return;let n=j.current;if(v(),"intentional"===E()){if("pointercancel"===e.type){n&&u();return}y(e)||(n?u():("function"!=typeof A||A(e))&&(t.clear(),H.current=!0,X()))}}function M(e){if("sloppy"!==E()||!V.current||G(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-V.current.startX),r=Math.abs(t.clientY-V.current.startY),o=Math.sqrt(n*n+r*r);o>5&&(V.current.dismissOnTouchEnd=!0),o>10&&(C(e),_.clear(),V.current=null)}function $(e){"sloppy"!==E()||!V.current||G(e)||(V.current.dismissOnTouchEnd&&C(e),_.clear(),V.current=null)}let z=(0,r.mergeCleanups)(b&&(0,r.mergeCleanups)((0,n.addEventListener)(i,"keydown",J),(0,n.addEventListener)(i,"compositionstart",function(){e.clear(),q.current=!0}),(0,n.addEventListener)(i,"compositionend",function(){e.start(5*!!a.platform.engine.webkit,()=>{q.current=!1})})),L&&(0,r.mergeCleanups)((0,n.addEventListener)(i,"click",w,!0),(0,n.addEventListener)(i,"pointerdown",w,!0),(0,n.addEventListener)(i,"pointerup",D,!0),(0,n.addEventListener)(i,"pointercancel",D,!0),(0,n.addEventListener)(i,"mousedown",w,!0),(0,n.addEventListener)(i,"mouseup",D,!0),(0,n.addEventListener)(i,"touchstart",function(e){Y.current="touch",T(e,R)},{capture:!0,passive:!0}),(0,n.addEventListener)(i,"touchmove",function(e){T(e,M)},{capture:!0,passive:!0}),(0,n.addEventListener)(i,"touchend",function(e){T(e,$)},{capture:!0,passive:!0})));return()=>{z(),e.clear(),t.clear(),v(),H.current=!1,X()}},[k,O,b,L,A,P,S,F,B,J,X,N,K,G,I,x,_]);let et=t.useMemo(()=>({onKeyDown:J,onPointerDown:z,onClick:z}),[J,z]),en=t.useMemo(()=>({onKeyDown:J,onPointerDown:ee,onMouseDown:ee,onClickCapture:Q,onMouseDownCapture(e){Q(),Z(e)},onPointerDownCapture(e){Q(),Z(e)},onMouseUpCapture:Q,onTouchEndCapture:Q,onTouchMoveCapture:Q}),[J,Q,Z,ee]);return t.useMemo(()=>S?{reference:et,floating:en,trigger:et}:{},[S,et,en])}])},350527,e=>{"use strict";var t=e.i(271645),n=e.i(146376),r=e.i(229315),o=e.i(156341);e.s(["useSyncedFloatingRootContext",0,function(e){let{popupStore:i,treatPopupAsFloatingElement:l=!1,floatingRootContext:s,floatingId:a,nested:u,onOpenChange:c}=e,d=i.useState("open"),p=i.useState("activeTriggerElement"),f=i.useState(l?"popupElement":"positionerElement"),g=i.context.triggerElements,m=t.useRef(null);void 0===s&&null===m.current&&(m.current=new o.FloatingRootStore({open:d,transitionStatus:void 0,referenceElement:p,floatingElement:f,triggerElements:g,onOpenChange:c,floatingId:a,syncOnly:!0,nested:u}));let h=s??m.current;return i.useSyncedValue("floatingId",a),(0,n.useIsoLayoutEffect)(()=>{let e={open:d,floatingId:a,referenceElement:p,floatingElement:f};(0,r.isElement)(p)&&(e.domReferenceElement=p),h.state.positionReference===h.state.referenceElement&&(e.positionReference=p),h.update(e)},[d,a,p,f,h]),h.context.onOpenChange=c,h.context.nested=u,h}])},503596,e=>{"use strict";var t=e.i(956789);let n=0;e.s(["enqueueFocus",0,function(e,r={}){let{preventScroll:o=!1,sync:i=!1,shouldFocus:l}=r;function s(){(!l||l())&&e?.focus({preventScroll:o})}if(cancelAnimationFrame(n),i)return s(),t.NOOP;let a=requestAnimationFrame(s);return n=a,()=>{n===a&&(cancelAnimationFrame(a),n=0)}}])},958408,e=>{"use strict";e.s(["getNodeAncestors",0,function(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n},"getNodeChildren",0,function e(t,n,r=!0){return t.filter(e=>e.parentId===n).flatMap(n=>[...!r||n.context?.open?[n]:[],...e(t,n.id,r)])}])},673327,e=>{"use strict";var t=e.i(229315);let n="ArrowUp",r="ArrowDown",o="ArrowLeft",i="ArrowRight",l="Home",s=new Set([n,r,o,i,l,"End"]),a="Shift",u=[a,"Control","Alt","Meta"];function c(e,t,n){let r="left"===n?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function d(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}e.s(["ARROW_DOWN",0,r,"ARROW_LEFT",0,o,"ARROW_RIGHT",0,i,"ARROW_UP",0,n,"COMPOSITE_KEYS",0,s,"END",0,"End","HOME",0,l,"MODIFIER_KEYS",0,u,"SHIFT",0,a,"isNativeInput",0,function(e){return!!((0,t.isHTMLElement)(e)&&"INPUT"===e.tagName&&null!=e.selectionStart||(0,t.isHTMLElement)(e)&&"TEXTAREA"===e.tagName)},"scrollIntoViewIfNeeded",0,function(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,i=e.scrollTop,l=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(l&&"vertical"!==r){let r=c(e,t,"left"),i=d(e),l=d(t);"ltr"===n&&(r+t.offsetWidth+l.scrollMarginRight>e.scrollLeft+e.clientWidth-i.scrollPaddingRight?o=r+t.offsetWidth+l.scrollMarginRight-e.clientWidth+i.scrollPaddingRight:r-l.scrollMarginLeft<e.scrollLeft+i.scrollPaddingLeft&&(o=r-l.scrollMarginLeft-i.scrollPaddingLeft)),"rtl"===n&&(r-l.scrollMarginLeft<e.scrollLeft+i.scrollPaddingLeft?o=r-l.scrollMarginLeft-i.scrollPaddingLeft:r+t.offsetWidth+l.scrollMarginRight>e.scrollLeft+e.clientWidth-i.scrollPaddingRight&&(o=r+t.offsetWidth+l.scrollMarginRight-e.clientWidth+i.scrollPaddingRight))}if(s&&"horizontal"!==r){let n=c(e,t,"top"),r=d(e),o=d(t);n-o.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?i=n-o.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+o.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(i=n+t.offsetHeight+o.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:o,top:i,behavior:"auto"})}])},788015,e=>{"use strict";var t=e.i(883977);e.s(["useBaseUiId",0,function(e){return(0,t.useId)(e,"base-ui")}])},223910,e=>{"use strict";var t=e.i(271645),n=e.i(146376),r=e.i(708445);e.s(["useTransitionStatus",0,function(e,o=!1,i=!1,l=!1){let[s,a]=t.useState(e&&o?"idle":void 0),[u,c]=t.useState(e&&!l);return e&&!u&&(c(!0),a("starting")),e||!u||"ending"===s||i||a("ending"),e||u||"ending"!==s||a(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==s&&i){let e=r.AnimationFrame.request(()=>{a("ending")});return()=>{r.AnimationFrame.cancel(e)}}},[e,u,s,i]),(0,n.useIsoLayoutEffect)(()=>{if(!e||o)return;let t=r.AnimationFrame.request(()=>{a(void 0)});return()=>{r.AnimationFrame.cancel(t)}},[o,e]),(0,n.useIsoLayoutEffect)(()=>{if(!e||!o)return;e&&u&&"idle"!==s&&a("starting");let t=r.AnimationFrame.request(()=>{a("idle")});return()=>{r.AnimationFrame.cancel(t)}},[o,e,u,s]),{mounted:u,setMounted:c,transitionStatus:s}}])},606039,e=>{"use strict";var t=e.i(271645),n=e.i(146376),r=e.i(667865);e.s(["useValueChanged",0,function(e,o){let i=t.useRef(e),l=(0,r.useStableCallback)(o);(0,n.useIsoLayoutEffect)(()=>{i.current!==e&&l(i.current),i.current=e},[e,l])}])},426,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(843476);let r=t.forwardRef(function(e,t){let r,{cutout:o,...i}=e;if(o){let e=o.getBoundingClientRect();r=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,n.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:r}})});e.s(["InternalBackdrop",0,r])},18478,116786,e=>{"use strict";var t=e.i(301252);class n extends t.ReactStore{setState(e){}update(e){}set(e,t){}notifyAll(){}}e.s(["NullStore",0,n],18478);var r=e.i(956789),o=e.i(156341);let i=e=>e.triggerIdProp??e.activeTriggerId,l=e=>e.openProp??e.open,s=e=>(e.popupElement?.id??e.floatingId)||void 0;function a(e,t){return void 0!==t&&l(e)&&i(e)===t}e.s(["createInitialPopupStoreState",0,function(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new o.FloatingRootStore({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:r.EMPTY_OBJECT,inactiveTriggerProps:r.EMPTY_OBJECT,popupProps:r.EMPTY_OBJECT}},"popupStoreSelectors",0,{open:l,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:i,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:s,isTriggerActive:(e,t)=>void 0!==t&&i(e)===t,isOpenedByTrigger:(e,t)=>a(e,t),isMountedByTrigger:(e,t)=>void 0!==t&&i(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>a(e,t)||void 0!==t&&l(e)&&null==i(e)&&1===e.triggerCount?s(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement}],116786)},564170,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(675606),r=e.i(56434);class o{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(e,t,n=!0){this.fallbackStore=e,this.componentName=t,this.throwOnMissingTrigger=n}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(e){return this.storeListeners.add(e),()=>{this.storeListeners.delete(e)}}attachStore(e){return this.attachedStores.push(e),this.setActiveStore(e),()=>{let t=this.attachedStores.lastIndexOf(e);-1!==t&&this.attachedStores.splice(t,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(e){this.attachedStoreValue!==e&&(this.attachedStoreValue=e,this.storeListeners.forEach(e=>{e()}))}openByTrigger(e){let o,i=this.attachedStore;if(null!==i){if(e){for(let t=this.attachedStores.length-1;t>=0&&!o;t-=1)o=this.attachedStores[t].context.triggerElements.getById(e);o??=this.fallbackStore.context.triggerElements.getById(e)}if(e&&!o&&this.throwOnMissingTrigger)throw Error((0,t.default)(99,this.componentName,e,this.componentName));i.setOpen(!0,(0,n.createChangeEventDetails)(r.REASONS.imperativeAction,void 0,o))}}closePopup(){let e=this.attachedStore;null===e||e.setOpen(!1,(0,n.createChangeEventDetails)(r.REASONS.imperativeAction))}}e.s(["BasePopupHandle",0,o])},264111,e=>{"use strict";var t=e.i(271645),n=e.i(174080),r=e.i(956789),o=e.i(883977),i=e.i(667865),l=e.i(146376),s=e.i(388940),a=e.i(449055),u=e.i(46420),c=e.i(350527),d=e.i(223910),p=e.i(137584),f=e.i(675606),g=e.i(56434);let m={tabIndex:-1,[a.FOCUSABLE_ATTRIBUTE]:""};function h(e){let t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function v(e,n){let r=t.useRef(null);return(0,i.useStableCallback)(t=>{let o=r.current;if(null!==o){if(o.element===t&&o.store===n&&o.id===e)return;r.current=null;let i=o.store;i.context.triggerElements.getById(o.id)===o.element&&(i.context.triggerElements.delete(o.id),h(i))}null!==t&&void 0!==e&&(r.current={store:n,id:e,element:t},n.context.triggerElements.add(e,t),h(n))})}function E(e,t,n,r=!1){let o=e.preventUnmountingOnClose;t?o=!1:r&&(o=!0);let i=n?.id??null,l=e.activeTriggerId,s=e.activeTriggerElement;return(i||t)&&(l=i,s=n??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:l,activeTriggerElement:s}}function S(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}e.s(["FOCUSABLE_POPUP_PROPS",0,m,"PopupHandleAttachment",0,function({handle:e,store:t}){return(0,l.useIsoLayoutEffect)(()=>e.attachStore(t),[e,t]),null},"applyPopupOpenChange",0,function(e,t,r,o={}){let i=r.reason,l=i===g.REASONS.triggerHover,s=t&&i===g.REASONS.triggerFocus,a=!t&&(i===g.REASONS.triggerPress||i===g.REASONS.escapeKey),u=S(r);if(e.context.onOpenChange?.(t,r),r.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,r);let c=()=>{let n=E(e.state,t,r.trigger,u()),i={...o.extraState,...n};s?i.instantType="focus":a?i.instantType="dismiss":l&&(i.instantType=void 0),e.update(i)};l?n.flushSync(c):c()},"attachPreventUnmountOnClose",0,S,"createDefaultInitialFocus",0,function(e){return t=>"touch"!==t||e.current},"createPopupOpenState",0,E,"useImplicitActiveTrigger",0,function(e,n={}){let{closeOnActiveTriggerUnmount:r=!1}=n,o=t.useRef(null),i=e.useState("open"),s=e.useState("triggerCount"),a=e.useState("activeTriggerId"),u=e.useState("activeTriggerElement");(0,l.useIsoLayoutEffect)(()=>{if(!i){o.current=null,0!==e.state.triggerCount&&e.set("triggerCount",0);return}let t=e.context.triggerElements.size,n={};e.state.triggerCount!==t&&(n.triggerCount=t);let l=e.select("activeTriggerId"),s=null;if(l){let t=e.context.triggerElements.getById(l);if(t)o.current=l,t!==e.state.activeTriggerElement&&(n.activeTriggerElement=t);else{for(let[t,r]of e.context.triggerElements.entries())if(r===e.state.activeTriggerElement){n.activeTriggerId=t,n.activeTriggerElement=r,o.current=t;break}void 0===n.activeTriggerId&&(o.current===l?s=l:o.current=null)}}else o.current=null;if(!s&&!l&&1===t){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,r]=t.value;n.activeTriggerId=e,n.activeTriggerElement=r,o.current=e}}(void 0!==n.triggerCount||void 0!==n.activeTriggerId||void 0!==n.activeTriggerElement)&&e.update(n),s&&r&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===s&&!e.context.triggerElements.getById(s)){let t=(0,f.createChangeEventDetails)(g.REASONS.none);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,s,a,u,r])},"useOpenStateTransitions",0,function(e,t,n,r){let{mounted:o,setMounted:l,transitionStatus:s}=(0,d.useTransitionStatus)(e,!1,!1,r),a=t.useState("preventUnmountingOnClose"),u=!e&&a;t.useSyncedValues({mounted:o,transitionStatus:s,preventUnmountingOnClose:u});let c=(0,i.useStableCallback)(()=>{l(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return(0,p.useOpenChangeComplete)({enabled:o&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:s}},"usePopupInteractionProps",0,function(e,t){e.useSyncedValues(t),(0,l.useIsoLayoutEffect)(()=>()=>{e.update({activeTriggerProps:r.EMPTY_OBJECT,inactiveTriggerProps:r.EMPTY_OBJECT,popupProps:r.EMPTY_OBJECT})},[e])},"usePopupRootStore",0,function(e,t=!1){let n=(0,o.useId)(),r=null!=(0,u.useFloatingParentNodeId)(),i=(0,s.useRefWithInit)(()=>e(n,r)).current;return(0,c.useSyncedFloatingRootContext)({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i},"usePopupRootSync",0,function(e,t){(0,l.useIsoLayoutEffect)(()=>{t||null===e.state.openMethod||e.set("openMethod",null)},[t,e]),(0,l.useIsoLayoutEffect)(()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)},[e])},"useTriggerDataForwarding",0,function(e,t,n,r){let o=n.useState("isMountedByTrigger",e),s=v(e,n),a=(0,i.useStableCallback)(t=>{let o=n.select("open"),i=n.select("activeTriggerId");if(i===e){let e={activeTriggerElement:t,...o?r:null};n.update(e);return}if(null==i&&o){let o={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(o)}}),u=(0,i.useStableCallback)(e=>{s(e),e&&a(e)});return(0,l.useIsoLayoutEffect)(()=>(u(t.current),()=>u(null)),[u,t,n,e]),(0,l.useIsoLayoutEffect)(()=>{if(o){let e={activeTriggerElement:t.current,...r};n.update(e)}},[o,n,t,...Object.values(r)]),{registerTrigger:u,isMountedByThisTrigger:o}},"useTriggerRegistration",0,v])},459636,e=>{"use strict";var t=e.i(271645),n=e.i(802239),r=e.i(956789);e.s(["usePopupHandleStore",0,function(e){let o=t.useCallback(t=>void 0===e?r.NOOP:e.subscribeStore(t),[e]),i=t.useCallback(()=>void 0===e?void 0:e.store,[e]);return(0,n.useSyncExternalStore)(o,i,()=>e?.serverStore)}])},32199,e=>{"use strict";var t=e.i(271645),n=e.i(667865),r=e.i(427803),o=e.i(328744),i=e.i(606039);function l(e,i){let l=(0,n.useStableCallback)((t,n)=>{("function"==typeof e?e():e)||i(n||(o.platform.os.ios?"touch":""))}),{onClick:s,onPointerDown:a}=(0,r.useEnhancedClickHandler)(l);return t.useMemo(()=>({onClick:s,onPointerDown:a}),[s,a])}e.s(["useOpenInteractionType",0,function(e){let[n,r]=t.useState(null),o=l(e,r);return(0,i.useValueChanged)(e,t=>{t&&!e&&r(null)}),t.useMemo(()=>({openMethod:n,triggerProps:o}),[n,o])},"useOpenMethodTriggerProps",0,l])},427803,e=>{"use strict";var t=e.i(271645);e.s(["useEnhancedClickHandler",0,function(e){let n=t.useRef(""),r=t.useCallback(t=>{t.defaultPrevented||(n.current=t.pointerType,e(t,t.pointerType))},[e]);return{onClick:t.useCallback(t=>{0===t.detail?e(t,"keyboard"):("pointerType"in t?e(t,t.pointerType):e(t,n.current),n.current="")},[e]),onPointerDown:r}}])},145484,e=>{"use strict";var t=e.i(229315),n=e.i(574735),r=e.i(328744),o=e.i(108868),i=e.i(333848),l=e.i(146376),s=e.i(439957),a=e.i(708445);let u={},c={},d="";function p(e,n){return(0,t.isOverflowElement)(e)?e:n}function f(e,t,n){return/hidden|clip/.test(e.getComputedStyle(p(t,n)).overflowY)}class g{lockCount=0;restore=null;timeoutLock=s.Timeout.create();timeoutUnlock=s.Timeout.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,l,s;if(0===this.lockCount||null!==this.restore)return;let g=(0,o.ownerDocument)(e),m=g.documentElement,h=g.body,v=(0,i.ownerWindow)(m);if(f(v,m,h)){let t=new v.MutationObserver(()=>{f(v,m,h)||(t.disconnect(),this.restore=null,this.lock(e))}),n={attributes:!0};t.observe(m,n),t.observe(h,n),this.restore=()=>t.disconnect();return}let E=r.platform.os.ios||!function(e){if("u"<typeof document)return!1;let t=(0,o.ownerDocument)(e);return(0,i.ownerWindow)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=E?(s={overflowY:(l=p((t=(0,o.ownerDocument)(e)).documentElement,t.body)).style.overflowY,overflowX:l.style.overflowX},Object.assign(l.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(l.style,s)}):function(e){let t=(0,o.ownerDocument)(e),l=t.documentElement,s=t.body,f=(0,i.ownerWindow)(l),g=0,m=0,h=!1,v=a.AnimationFrame.create();if(r.platform.engine.webkit&&(f.visualViewport?.scale??1)!==1)return()=>{};function E(){let t=f.getComputedStyle(l),n=f.getComputedStyle(s),r=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";g=l.scrollTop,m=l.scrollLeft,u={scrollbarGutter:l.style.scrollbarGutter,overflowY:l.style.overflowY,overflowX:l.style.overflowX},d=l.style.scrollBehavior,c={position:s.style.position,height:s.style.height,width:s.style.width,boxSizing:s.style.boxSizing,overflowY:s.style.overflowY,overflowX:s.style.overflowX,scrollBehavior:s.style.scrollBehavior};let i=l.scrollHeight>l.clientHeight,a=l.scrollWidth>l.clientWidth,v="scroll"===t.overflowY||"scroll"===n.overflowY,E="scroll"===t.overflowX||"scroll"===n.overflowX,S=Math.max(0,f.innerWidth-s.clientWidth),b=Math.max(0,f.innerHeight-s.clientHeight),y=parseFloat(n.marginTop)+parseFloat(n.marginBottom),C=parseFloat(n.marginLeft)+parseFloat(n.marginRight),R=p(l,s);if(h=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=(0,o.ownerDocument)(e),n=t.documentElement,r=p(n,t.body),i=r.style.overflowY,l=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",r.style.overflowY="scroll";let s=r.offsetWidth;r.style.overflowY="hidden";let a=r.offsetWidth;return r.style.overflowY=i,n.style.scrollbarGutter=l,s===a}(e)){l.style.scrollbarGutter=r,R.style.overflowY="hidden",R.style.overflowX="hidden";return}Object.assign(l.style,{scrollbarGutter:r,overflowY:"hidden",overflowX:"hidden"}),(i||v)&&(l.style.overflowY="scroll"),(a||E)&&(l.style.overflowX="scroll"),Object.assign(s.style,{position:"relative",height:y||b?`calc(100dvh - ${y+b}px)`:"100dvh",width:C||S?`calc(100vw - ${C+S}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),s.scrollTop=g,s.scrollLeft=m,l.setAttribute("data-base-ui-scroll-locked",""),l.style.scrollBehavior="unset"}function S(){Object.assign(l.style,u),Object.assign(s.style,c),h||(l.scrollTop=g,l.scrollLeft=m,l.removeAttribute("data-base-ui-scroll-locked"),l.style.scrollBehavior=d)}E();let b=(0,n.addEventListener)(f,"resize",function(){S(),v.request(E)});return()=>{v.cancel(),S(),"function"==typeof f.removeEventListener&&b()}}(e)}}let m=new g;e.s(["useScrollLock",0,function(e=!0,t=null){(0,l.useIsoLayoutEffect)(()=>{if(e)return m.acquire(t)},[e,t])}])},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(132120),l=e.r(92245),s=e.r(235326)}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,n.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",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,n.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},621285,357553,837012,e=>{"use strict";var t=e.i(843476),n=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(657688),a=e.i(271645),s=e.i(798120),o=e.i(167881),u=e.i(630374),d=e.i(683408),c=e.i(671428),f=e.i(947627),m=e.i(41533),p=e.i(616172),h=e.i(95187);let g=(0,h.createServerReference)("7fe61c424a192eff8b33705563234528ffd3439904",h.callServer,void 0,h.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,g],357553);let x=(0,h.createServerReference)("7fb306c03a36ba57f08b97ce0197e84dfde019688e",h.callServer,void 0,h.findSourceMapURL,"revealFileAction");e.s(["revealFileAction",0,x],837012);let b=(0,h.createServerReference)("7f4457235d7fbf5ecbfad58feb9d9f75eb0f89ccec",h.callServer,void 0,h.findSourceMapURL,"savePageAction");var w=e.i(393080),v=e.i(609856),y=e.i(647163);let j=new Set(["frame","image","audio","video"]);function k(e){let t=(0,p.workspaceRelative)(e);return t?"none"===(0,p.viewKindOf)(t)?{how:"os"}:{how:"dialog",path:t}:{how:"os"}}let _=(0,a.createContext)(null),S={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 O({kind:e,content:n,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(C,{of:r}),(0,t.jsx)(P,{kind:e,content:n,where:i})]})}function C({of:e}){return(0,t.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,y.formatBytes)(m.WORKSPACE_VIEW.textMax)} of ${(0,y.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function P({kind:e,content:n,where:r}){let i=S[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,y.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:n})});case"csv":return(0,t.jsx)(D,{content:n,className:i.block});case"json":return(0,t.jsx)(L,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(n),className:i.block});default:return(0,t.jsx)(L,{text:n,className:i.block})}}function R(e){let[t,n]=(0,a.useState)(null),[r,i]=(0,a.useState)(null),[l,o]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(!e)return;n(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${m.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,n,r]=t.map(Number);return n+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(n(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,y.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:l}}let N={named:new Map,opened:new Map,showing:new WeakMap,listening:!1},E=e=>{let t=N.named.get(e);return t||(t=crypto.randomUUID(),N.named.set(e,t),N.opened.set(t,e)),{thursday:"host",as:t}};async function M(e){let t=e.source,n=e.data;if(!t||"null"!==e.origin||"string"!=typeof n?.thursday)return;if("hello"===n.thursday){let e=N.showing.get(t);e&&t.postMessage(E(e),"*");return}let r="save"===n.thursday&&N.opened.get(n.as);if(!r||"string"!=typeof n.html)return;let i=await b(r,n.html,"string"==typeof n.base?n.base:""),l={as:n.as,id:n.id};t.postMessage((0,w.isResultOk)(i)?i.data.changed?{...l,thursday:"not-saved",changed:!0}:{...l,thursday:"saved",revision:i.data.revision}:{...l,thursday:"not-saved",error:i.message},"*")}function I({path:e,className:n,takeKeys:r}){let i=(0,a.useRef)(null),l=(0,a.useCallback)(()=>{r&&i.current?.focus();let t=i.current?.contentWindow;t&&(N.showing.set(t,e),t.postMessage(E(e),"*"))},[e,r]);return(0,a.useEffect)(l,[l]),(0,a.useEffect)(()=>{N.listening||(N.listening=!0,window.addEventListener("message",M))},[]),(0,t.jsx)("iframe",{ref:i,title:e,src:s.queryKey.file(e),allow:"clipboard-read *; clipboard-write *; fullscreen *; autoplay *",className:n,onLoad:l})}function z({path:e,kind:n,where:r,takeKeys:i}){return"frame"===n?(0,t.jsx)(I,{path:e,className:"h-full w-full bg-white",takeKeys:i}):"image"===n?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"dialog"===r?"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4":"mx-auto max-w-full p-6"}):"audio"===n?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"mx-auto max-h-full max-w-full p-4",children:(0,t.jsx)("track",{kind:"captions"})})}function T({path:e}){let[n,r]=(0,v.useServerAction)(g);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Nothing here can draw this file. It opens in its own program."}),(0,t.jsx)(o.Button,{variant:"outline",loading:r,onClick:()=>n(e),children:"Open it"})]})}function $({path:e,bytes:n}){let[r,i]=(0,v.useServerAction)(x);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,y.formatBytes)(n)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(o.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function A({path:e,opening:d,group:f=[],kind:p,byHer:h,onPath:g,onClose:x}){let b="image"===p,w=j.has(p),{content:v,failure:k,truncated:_}=R(w?null:e),S=e?.split("/").pop()??"",C=e?f.indexOf(e):-1,P=e=>{!(C<0)&&g&&g(f[(C+e+f.length)%f.length])},{left:N,keep:E}=function(e,t){let[n,r]=(0,a.useState)(null),i=(0,a.useRef)(t);i.current=t;let l=(0,a.useRef)(()=>void 0);return(0,a.useEffect)(()=>{if(!e)return void r(null);let t=Math.round(m.WORKSPACE_VIEW.autoCloseMs/1e3);r(t);let n=()=>{for(let e of(window.clearInterval(s),["pointermove","keydown","wheel","blur"]))window.removeEventListener(e,a);r(null)},a=()=>n(),s=window.setInterval(()=>{if((t-=1)>0)return r(t);n(),i.current()},1e3);for(let e of["pointermove","keydown","wheel","blur"])window.addEventListener(e,a);return l.current=n,n},[e]),{left:n,keep:(0,a.useCallback)(()=>l.current(),[])}}(h&&null!==e,x),M="frame"===p||"video"===p,I=(0,a.useRef)(null);return(0,t.jsx)(u.Dialog,{open:null!==e,onOpenChange:e=>!e&&x(),children:(0,t.jsxs)(u.DialogContent,{ref:I,initialFocus:I,onKeyDown:e=>{"ArrowLeft"===e.key&&P(-1),"ArrowRight"===e.key&&P(1)},onPointerOver:E,className:(0,y.cn)("flex flex-col gap-0 overflow-hidden p-0",M?"h-[min(42rem,calc(100vh-3rem))] sm:max-w-232":"max-h-[calc(100vh-3rem)] sm:max-w-4xl"),children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:S}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),null!==N&&(0,t.jsx)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground tabular-nums",children:`Closing in ${N}s`}),C>=0&&f.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[C+1," / ",f.length]}),(0,t.jsx)(o.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>P(-1),children:(0,t.jsx)(n.ChevronLeft,{})}),(0,t.jsx)(o.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>P(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),e&&(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:(0,y.cn)((0,o.buttonVariants)({variant:"ghost",size:"icon-sm"})),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:(0,y.cn)("min-h-0 flex-1","frame"===p?"overflow-hidden":"overflow-auto"),children:w&&e?(0,t.jsx)(z,{path:e,kind:p,where:"dialog",takeKeys:!h},d):k?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:k}):null===v?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(O,{kind:p,content:v,truncated:_})}),b&&f.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:f.map(n=>(0,t.jsx)("button",{type:"button","aria-label":n.split("/").pop(),onClick:()=>g?.(n),className:(0,y.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",n===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)(l.default,{src:s.queryKey.file(n),alt:"",width:96,height:96,loading:"lazy",className:"size-full bg-muted object-cover"})},n))})]})})}function L({text:e,className:n}){return(0,t.jsx)("pre",{className:(0,y.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",n),children:e})}function D({content:e,className:n}){let[r,...i]=(0,a.useMemo)(()=>(function(e){let t=[],n=[],r="",i=!1;for(let l=0;l<e.length;l++){let a=e[l];i?'"'===a&&'"'===e[l+1]?(r+='"',l++):'"'===a?i=!1:r+=a:'"'===a?i=!0:","===a?(n.push(r),r=""):"\n"===a||"\r"===a?("\r"===a&&"\n"===e[l+1]&&l++,n.push(r),t.push(n),n=[],r=""):r+=a}return(r.length||n.length)&&(n.push(r),t.push(n)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]),l=(0,a.useMemo)(()=>(r??[]).map((e,t)=>i.some(e=>""!==(e[t]??"").trim())&&i.every(e=>{let n=(e[t]??"").trim();return""===n||/^[+-]?[\d,]*\.?\d+%?$/.test(n)})),[r,i]);return r?(0,t.jsx)("div",{className:(0,y.cn)("overflow-x-auto",n),children:(0,t.jsxs)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsx)(f.TableRow,{children:r.map((e,n)=>(0,t.jsx)(f.TableHead,{className:(0,y.cn)("whitespace-nowrap",l[n]&&"text-right"),children:e},`${n}-${e}`))})}),(0,t.jsx)(f.TableBody,{children:i.map((e,n)=>(0,t.jsx)(f.TableRow,{children:r.map((r,i)=>(0,t.jsx)(f.TableCell,{className:(0,y.cn)("whitespace-nowrap",l[i]&&"text-right tabular-nums"),children:e[i]??""},`${n}-${i}`))},`${n}-${e[0]??""}`))})]})}):(0,t.jsx)(L,{text:e,className:n})}e.s(["FileBody",0,O,"FileFrame",0,I,"FileLink",0,function({path:e,group:n,className:r,title:i,label:l,children:o}){let u=k(e),d=(0,a.useContext)(_),[c,f]=(0,v.useServerAction)(g);return(0,t.jsx)("button",{type:"button",disabled:f,title:i??e,"aria-label":l,className:r,onClick:()=>{"dialog"===u.how?d?d(u.path,n):window.open(s.queryKey.fileView(u.path),"_blank"):c(e)},children:o})},"FilePreview",0,function({path:e,bytes:n}){let r=(0,p.viewKindOf)(e),{content:i,failure:l,truncated:a}=R(j.has(r)||"none"===r?null:e);return"none"===r?(0,t.jsx)(T,{path:e}):("frame"===r||"image"===r)&&n>m.WORKSPACE_VIEW.elementMax?(0,t.jsx)($,{path:e,bytes:n}):j.has(r)?(0,t.jsx)(z,{path:e,kind:r,where:"preview"}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(O,{kind:r,content:i,truncated:a})},"FileViewer",0,function({children:e}){let[n,r]=(0,a.useState)(null),i=(0,a.useRef)(0),l=(0,a.useCallback)((e,t=[],n=!1)=>r({path:e,group:t,byHer:n,n:++i.current}),[]);return(0,t.jsxs)(_,{value:l,children:[e,(0,t.jsx)(A,{path:n?.path??null,opening:n?.n??0,group:n?.group??[],kind:n?(0,p.viewKindOf)(n.path):"text",byHer:n?.byHer??!1,onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,k,"useFileText",0,R,"useOpenFile",0,function(){let e=(0,a.useContext)(_);return(0,a.useCallback)((t,n=[],r=!1)=>{let i=k(t);return"os"!==i.how&&(e?(e(i.path,n,r),!0):null!==window.open(s.queryKey.fileView(i.path),"_blank"))},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),n=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("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"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",a=new Set(["css","js","woff2"]),s=Object.keys(i).filter(e=>!a.has(e)),o=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),u=`${n.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),n=t.indexOf(u);return n>=0?t.slice(n+u.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let f=e=>e.startsWith(`${n.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e));e.s(["extensionOf",0,l,"leadFirst",0,function(e){let t=e.findIndex(f);return t>0?[e[t],...e.filter((e,n)=>n!==t)]:e},"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),n=new Set,r="";for(let[e]of t.matchAll(o)){let t=!e.includes("/"),i=function(e){let t=c(e);if(!t)return null;let[n,...r]=t.split("/");return r.length&&n.includes(".")?null:t}(t?r+e:e);t||(r=i?.slice(0,i.lastIndexOf("/")+1)??""),i&&n.add(i)}return[...n].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},325633,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return h},defaultHead:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let l=e.r(555682),a=e.r(190809),s=e.r(843476),o=a._(e.r(271645)),u=l._(e.r(898879)),d=e.r(742732);function c(){return[(0,s.jsx)("meta",{charSet:"utf-8"},"charset"),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,n,r,i;return e.reduce(f,[]).reverse().concat(c().reverse()).filter((t=new Set,n=new Set,r=new Set,i={},e=>{let l=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?l=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?l=!1:n.add(e.type);break;case"meta":for(let t=0,n=m.length;t<n;t++){let n=m[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?l=!1:r.add(n);else{let t=e.props[n],r=i[n]||new Set;("name"!==n||!a)&&r.has(t)?l=!1:(r.add(t),i[n]=r)}}}return l})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let h=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,s.jsx)(u.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},918556,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return l}});let r=e.r(555682)._(e.r(271645)),i=e.r(987690),l=r.default.createContext(i.imageConfigDefault)},65856,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(555682)._(e.r(271645)).default.createContext(null)},670965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},1948,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let r=e.r(670965),i=e.r(543369);function l({config:e,src:t,width:n,quality:a}){let s=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,i.getAssetToken)())s=void 0;else{let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){s=r,n.delete("dpl");let i=n.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,n.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",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,n.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},621285,672203,201830,e=>{"use strict";var t=e.i(843476),n=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(657688),a=e.i(271645),s=e.i(798120),o=e.i(167881),u=e.i(630374),d=e.i(683408),c=e.i(671428),f=e.i(947627),m=e.i(41533),p=e.i(616172),h=e.i(95187);let g=(0,h.createServerReference)("7ffcdb12b3f2adbb4765c52c5f5c261592f910fc04",h.callServer,void 0,h.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,g],672203);let x=(0,h.createServerReference)("7ff6dec4b93f6e41c5b2f110965027103451e09c2f",h.callServer,void 0,h.findSourceMapURL,"revealFileAction");e.s(["revealFileAction",0,x],201830);let b=(0,h.createServerReference)("7f2ff5562b103dfbf7107782e435676ca84e912d4d",h.callServer,void 0,h.findSourceMapURL,"savePageAction");var w=e.i(393080),v=e.i(609856),y=e.i(647163);let j=new Set(["frame","image","audio","video"]);function k(e){let t=(0,p.workspaceRelative)(e);return t?"none"===(0,p.viewKindOf)(t)?{how:"os"}:{how:"dialog",path:t}:{how:"os"}}let _=(0,a.createContext)(null),S={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 O({kind:e,content:n,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(C,{of:r}),(0,t.jsx)(P,{kind:e,content:n,where:i})]})}function C({of:e}){return(0,t.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,y.formatBytes)(m.WORKSPACE_VIEW.textMax)} of ${(0,y.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function P({kind:e,content:n,where:r}){let i=S[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,y.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:n})});case"csv":return(0,t.jsx)(D,{content:n,className:i.block});case"json":return(0,t.jsx)(L,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(n),className:i.block});default:return(0,t.jsx)(L,{text:n,className:i.block})}}function R(e){let[t,n]=(0,a.useState)(null),[r,i]=(0,a.useState)(null),[l,o]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(!e)return;n(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${m.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,n,r]=t.map(Number);return n+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(n(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,y.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:l}}let N={named:new Map,opened:new Map,showing:new WeakMap,listening:!1},E=e=>{let t=N.named.get(e);return t||(t=crypto.randomUUID(),N.named.set(e,t),N.opened.set(t,e)),{thursday:"host",as:t}};async function M(e){let t=e.source,n=e.data;if(!t||"null"!==e.origin||"string"!=typeof n?.thursday)return;if("hello"===n.thursday){let e=N.showing.get(t);e&&t.postMessage(E(e),"*");return}let r="save"===n.thursday&&N.opened.get(n.as);if(!r||"string"!=typeof n.html)return;let i=await b(r,n.html,"string"==typeof n.base?n.base:""),l={as:n.as,id:n.id};t.postMessage((0,w.isResultOk)(i)?i.data.changed?{...l,thursday:"not-saved",changed:!0}:{...l,thursday:"saved",revision:i.data.revision}:{...l,thursday:"not-saved",error:i.message},"*")}function I({path:e,className:n,takeKeys:r}){let i=(0,a.useRef)(null),l=(0,a.useCallback)(()=>{r&&i.current?.focus();let t=i.current?.contentWindow;t&&(N.showing.set(t,e),t.postMessage(E(e),"*"))},[e,r]);return(0,a.useEffect)(l,[l]),(0,a.useEffect)(()=>{N.listening||(N.listening=!0,window.addEventListener("message",M))},[]),(0,t.jsx)("iframe",{ref:i,title:e,src:s.queryKey.file(e),allow:"clipboard-write *; fullscreen *; autoplay *",className:n,onLoad:l})}function z({path:e,kind:n,where:r,takeKeys:i}){return"frame"===n?(0,t.jsx)(I,{path:e,className:"h-full w-full bg-white",takeKeys:i}):"image"===n?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"dialog"===r?"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4":"mx-auto max-w-full p-6"}):"audio"===n?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"mx-auto max-h-full max-w-full p-4",children:(0,t.jsx)("track",{kind:"captions"})})}function T({path:e}){let[n,r]=(0,v.useServerAction)(g);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Nothing here can draw this file. It opens in its own program."}),(0,t.jsx)(o.Button,{variant:"outline",loading:r,onClick:()=>n(e),children:"Open it"})]})}function $({path:e,bytes:n}){let[r,i]=(0,v.useServerAction)(x);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,y.formatBytes)(n)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(o.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function A({path:e,opening:d,group:f=[],kind:p,byHer:h,onPath:g,onClose:x}){let b="image"===p,w=j.has(p),{content:v,failure:k,truncated:_}=R(w?null:e),S=e?.split("/").pop()??"",C=e?f.indexOf(e):-1,P=e=>{!(C<0)&&g&&g(f[(C+e+f.length)%f.length])},{left:N,keep:E}=function(e,t){let[n,r]=(0,a.useState)(null),i=(0,a.useRef)(t);i.current=t;let l=(0,a.useRef)(()=>void 0);return(0,a.useEffect)(()=>{if(!e)return void r(null);let t=Math.round(m.WORKSPACE_VIEW.autoCloseMs/1e3);r(t);let n=()=>{for(let e of(window.clearInterval(s),["pointermove","keydown","wheel","blur"]))window.removeEventListener(e,a);r(null)},a=()=>n(),s=window.setInterval(()=>{if((t-=1)>0)return r(t);n(),i.current()},1e3);for(let e of["pointermove","keydown","wheel","blur"])window.addEventListener(e,a);return l.current=n,n},[e]),{left:n,keep:(0,a.useCallback)(()=>l.current(),[])}}(h&&null!==e,x),M="frame"===p||"video"===p,I=(0,a.useRef)(null);return(0,t.jsx)(u.Dialog,{open:null!==e,onOpenChange:e=>!e&&x(),children:(0,t.jsxs)(u.DialogContent,{ref:I,initialFocus:I,onKeyDown:e=>{"ArrowLeft"===e.key&&P(-1),"ArrowRight"===e.key&&P(1)},onPointerOver:E,className:(0,y.cn)("flex flex-col gap-0 overflow-hidden p-0",M?"h-[min(42rem,calc(100vh-3rem))] sm:max-w-232":"max-h-[calc(100vh-3rem)] sm:max-w-4xl"),children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:S}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),null!==N&&(0,t.jsx)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground tabular-nums",children:`Closing in ${N}s`}),C>=0&&f.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[C+1," / ",f.length]}),(0,t.jsx)(o.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>P(-1),children:(0,t.jsx)(n.ChevronLeft,{})}),(0,t.jsx)(o.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>P(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),e&&(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:(0,y.cn)((0,o.buttonVariants)({variant:"ghost",size:"icon-sm"})),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:(0,y.cn)("min-h-0 flex-1","frame"===p?"overflow-hidden":"overflow-auto"),children:w&&e?(0,t.jsx)(z,{path:e,kind:p,where:"dialog",takeKeys:!h},d):k?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:k}):null===v?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(O,{kind:p,content:v,truncated:_})}),b&&f.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:f.map(n=>(0,t.jsx)("button",{type:"button","aria-label":n.split("/").pop(),onClick:()=>g?.(n),className:(0,y.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",n===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)(l.default,{src:s.queryKey.file(n),alt:"",width:96,height:96,loading:"lazy",className:"size-full bg-muted object-cover"})},n))})]})})}function L({text:e,className:n}){return(0,t.jsx)("pre",{className:(0,y.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",n),children:e})}function D({content:e,className:n}){let[r,...i]=(0,a.useMemo)(()=>(function(e){let t=[],n=[],r="",i=!1;for(let l=0;l<e.length;l++){let a=e[l];i?'"'===a&&'"'===e[l+1]?(r+='"',l++):'"'===a?i=!1:r+=a:'"'===a?i=!0:","===a?(n.push(r),r=""):"\n"===a||"\r"===a?("\r"===a&&"\n"===e[l+1]&&l++,n.push(r),t.push(n),n=[],r=""):r+=a}return(r.length||n.length)&&(n.push(r),t.push(n)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]),l=(0,a.useMemo)(()=>(r??[]).map((e,t)=>i.some(e=>""!==(e[t]??"").trim())&&i.every(e=>{let n=(e[t]??"").trim();return""===n||/^[+-]?[\d,]*\.?\d+%?$/.test(n)})),[r,i]);return r?(0,t.jsx)("div",{className:(0,y.cn)("overflow-x-auto",n),children:(0,t.jsxs)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsx)(f.TableRow,{children:r.map((e,n)=>(0,t.jsx)(f.TableHead,{className:(0,y.cn)("whitespace-nowrap",l[n]&&"text-right"),children:e},`${n}-${e}`))})}),(0,t.jsx)(f.TableBody,{children:i.map((e,n)=>(0,t.jsx)(f.TableRow,{children:r.map((r,i)=>(0,t.jsx)(f.TableCell,{className:(0,y.cn)("whitespace-nowrap",l[i]&&"text-right tabular-nums"),children:e[i]??""},`${n}-${i}`))},`${n}-${e[0]??""}`))})]})}):(0,t.jsx)(L,{text:e,className:n})}e.s(["FileBody",0,O,"FileFrame",0,I,"FileLink",0,function({path:e,group:n,className:r,title:i,label:l,children:o}){let u=k(e),d=(0,a.useContext)(_),[c,f]=(0,v.useServerAction)(g);return(0,t.jsx)("button",{type:"button",disabled:f,title:i??e,"aria-label":l,className:r,onClick:()=>{"dialog"===u.how?d?d(u.path,n):window.open(s.queryKey.fileView(u.path),"_blank"):c(e)},children:o})},"FilePreview",0,function({path:e,bytes:n}){let r=(0,p.viewKindOf)(e),{content:i,failure:l,truncated:a}=R(j.has(r)||"none"===r?null:e);return"none"===r?(0,t.jsx)(T,{path:e}):("frame"===r||"image"===r)&&n>m.WORKSPACE_VIEW.elementMax?(0,t.jsx)($,{path:e,bytes:n}):j.has(r)?(0,t.jsx)(z,{path:e,kind:r,where:"preview"}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(O,{kind:r,content:i,truncated:a})},"FileViewer",0,function({children:e}){let[n,r]=(0,a.useState)(null),i=(0,a.useRef)(0),l=(0,a.useCallback)((e,t=[],n=!1)=>r({path:e,group:t,byHer:n,n:++i.current}),[]);return(0,t.jsxs)(_,{value:l,children:[e,(0,t.jsx)(A,{path:n?.path??null,opening:n?.n??0,group:n?.group??[],kind:n?(0,p.viewKindOf)(n.path):"text",byHer:n?.byHer??!1,onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,k,"useFileText",0,R,"useOpenFile",0,function(){let e=(0,a.useContext)(_);return(0,a.useCallback)((t,n=[],r=!1)=>{let i=k(t);return"os"!==i.how&&(e?(e(i.path,n,r),!0):null!==window.open(s.queryKey.fileView(i.path),"_blank"))},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),n=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("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"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",a=new Set(["css","js","woff2"]),s=Object.keys(i).filter(e=>!a.has(e)),o=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),u=`${n.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),n=t.indexOf(u);return n>=0?t.slice(n+u.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let f=e=>e.startsWith(`${n.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e));e.s(["extensionOf",0,l,"leadFirst",0,function(e){let t=e.findIndex(f);return t>0?[e[t],...e.filter((e,n)=>n!==t)]:e},"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),n=new Set,r="";for(let[e]of t.matchAll(o)){let t=!e.includes("/"),i=function(e){let t=c(e);if(!t)return null;let[n,...r]=t.split("/");return r.length&&n.includes(".")?null:t}(t?r+e:e);t||(r=i?.slice(0,i.lastIndexOf("/")+1)??""),i&&n.add(i)}return[...n].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},325633,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return h},defaultHead:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let l=e.r(555682),a=e.r(190809),s=e.r(843476),o=a._(e.r(271645)),u=l._(e.r(898879)),d=e.r(742732);function c(){return[(0,s.jsx)("meta",{charSet:"utf-8"},"charset"),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,n,r,i;return e.reduce(f,[]).reverse().concat(c().reverse()).filter((t=new Set,n=new Set,r=new Set,i={},e=>{let l=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?l=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?l=!1:n.add(e.type);break;case"meta":for(let t=0,n=m.length;t<n;t++){let n=m[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?l=!1:r.add(n);else{let t=e.props[n],r=i[n]||new Set;("name"!==n||!a)&&r.has(t)?l=!1:(r.add(t),i[n]=r)}}}return l})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let h=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,s.jsx)(u.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},918556,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return l}});let r=e.r(555682)._(e.r(271645)),i=e.r(987690),l=r.default.createContext(i.imageConfigDefault)},65856,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(555682)._(e.r(271645)).default.createContext(null)},670965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},1948,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let r=e.r(670965),i=e.r(543369);function l({config:e,src:t,width:n,quality:a}){let s=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,i.getAssetToken)())s=void 0;else{let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){s=r,n.delete("dpl");let i=n.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
2
2
|
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,r.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&s?`&dpl=${s}`:""}`}l.__next_img_default=!0;let a=l},818581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(271645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=l(e,r)),t&&(i.current=l(t,r))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},605500,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return y}});let r=e.r(555682),i=e.r(190809),l=e.r(843476),a=i._(e.r(271645)),s=r._(e.r(174080)),o=r._(e.r(325633)),u=e.r(908927),d=e.r(987690),c=e.r(918556),f=e.r(65856),m=r._(e.r(1948)),p=e.r(818581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[48,96,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,n,r,i,l,a){let s=e?.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function x(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b="u"<typeof window?a.useEffect:a.useLayoutEffect,w=(0,a.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:i,decoding:s,className:o,style:u,fetchPriority:d,placeholder:c,loading:f,unoptimized:m,fill:h,onLoadRef:w,onLoadingCompleteRef:v,setBlurComplete:y,setShowAltText:j,sizesInput:k,onLoad:_,onError:S,...O},C)=>{let P=(0,a.useRef)(!1),R=(0,a.useRef)(null);b(()=>{let{current:e}=P,{current:t}=R;e||null===t||(S&&(t.src=t.src),t.complete&&g(t,c,w,v,y,m,k),P.current=!0)},[e,c,w,v,S,m,k]);let N=(0,p.useMergedRef)(C,R);return(0,l.jsx)("img",{...O,...x(d),loading:f,width:i,height:r,decoding:s,"data-nimg":h?"fill":"1",className:o,style:u,sizes:n,srcSet:t,src:e,ref:N,onLoad:e=>{g(e.currentTarget,c,w,v,y,m,k)},onError:e=>{j(!0),"empty"!==c&&y(!0),S&&S(e)}})});function v({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...x(t.fetchPriority)};return e&&s.default.preload?(s.default.preload(t.src,n),null):(0,l.jsx)(o.default,{children:(0,l.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let y=(0,a.forwardRef)((e,t)=>{let n=(0,a.useContext)(f.RouterContext),r=(0,a.useContext)(c.ImageConfigContext),i=(0,a.useMemo)(()=>{let e=h||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:i,localPatterns:"u"<typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:s,onLoadingComplete:o}=e,p=(0,a.useRef)(s);(0,a.useEffect)(()=>{p.current=s},[s]);let g=(0,a.useRef)(o);(0,a.useEffect)(()=>{g.current=o},[o]);let[x,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(!1),{props:k,meta:_}=(0,u.getImgProps)(e,{defaultLoader:m.default,imgConf:i,blurComplete:x,showAltText:y});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(w,{...k,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:b,setShowAltText:j,sizesInput:e.sizes,ref:t}),_.preload?(0,l.jsx)(v,{isAppRouter:!n,imgAttributes:k}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},794909,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return u}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let l=e.r(555682),a=e.r(908927),s=e.r(605500),o=l._(e.r(1948));function u(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[48,96,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let d=s.Image},657688,(e,t,n)=>{t.exports=e.r(794909)},488143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:i,blurDataURL:l,objectFit:a}){let s=n?40*n:e,o=i?40*i:t,u=s&&o?`viewBox='0 0 ${s} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${l}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return l},imageConfigDefault:function(){return a}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let l=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},908927,(e,t,n)=>{"use strict";e.i(247167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return u}});let r=e.r(543369),i=e.r(488143),l=e.r(987690),a=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:n=!1,priority:d=!1,preload:c=!1,loading:f,className:m,quality:p,width:h,height:g,fill:x=!1,style:b,overrideSrc:w,onLoad:v,onLoadingComplete:y,placeholder:j="empty",blurDataURL:k,fetchPriority:_,decoding:S="async",layout:O,objectFit:C,objectPosition:P,lazyBoundary:R,lazyRoot:N,...E},M){var I;let z,T,$,{imgConf:A,showAltText:L,blurComplete:D,defaultLoader:F}=M,W=A||l.imageConfigDefault;if("allSizes"in W)z=W;else{let e=[...W.deviceSizes,...W.imageSizes].sort((e,t)=>e-t),t=W.deviceSizes.sort((e,t)=>e-t),n=W.qualities?.sort((e,t)=>e-t);z={...W,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===F)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let K=E.loader||F;delete E.loader,delete E.srcSet;let q="__next_img_default"in K;if(q){if("custom"===z.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
3
3
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=K;K=t=>{let{config:n,...r}=t;return e(r)}}if(O){"fill"===O&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[O];e&&(b={...b,...e});let n={responsive:"100vw",fill:"100vw"}[O];n&&!t&&(t=n)}let B="",U=o(h),V=o(g);if((I=e)&&"object"==typeof I&&(s(I)||void 0!==I.src)){let t=s(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(T=t.blurWidth,$=t.blurHeight,k=k||t.blurDataURL,B=t.src,!x)if(U||V){if(U&&!V){let e=U/t.width;V=Math.round(t.height*e)}else if(!U&&V){let e=V/t.height;U=Math.round(t.width*e)}}else U=t.width,V=t.height}let H=!d&&!c&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,H=!1),z.unoptimized&&(n=!0),q&&!z.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let G=o(p),X=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:P}:{},L?{}:{color:"transparent"},b),J=D||"empty"===j?null:"blur"===j?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:U,heightInt:V,blurWidth:T,blurHeight:$,blurDataURL:k||"",objectFit:X.objectFit})}")`:`url("${j}")`,Q=a.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,Y=J?{backgroundSize:Q,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},Z=function({config:e,src:t,unoptimized:n,width:i,quality:l,sizes:a,loader:s}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,r.getAssetToken)())e=void 0;else if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:u}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=n.exec(r);)i.push(parseInt(e[2]));if(i.length){let n=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,a),d=o.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:o.map((n,r)=>`${s({config:e,src:t,quality:l,width:n})} ${"w"===u?n:r+1}${u}`).join(", "),src:s({config:e,src:t,quality:l,width:o[d]})}}({config:z,src:e,unoptimized:n,width:U,quality:G,sizes:t,loader:K}),ee=H?"lazy":f;return{props:{...E,loading:ee,fetchPriority:_,width:U,height:V,decoding:S,className:m,style:{...X,...Y},sizes:Z.sizes,srcSet:Z.srcSet,src:w||Z.src},meta:{unoptimized:n,preload:c||d,placeholder:j,fill:x}}}},898879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(271645),i="u"<typeof window,l=i?()=>{}:r.useLayoutEffect,a=i?()=>{}:r.useEffect;function s(e){let{headManager:t,reduceComponentsToState:n}=e;function s(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return i&&(t?.mountedInstances?.add(e.children),s()),l(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),l(()=>(t&&(t._pendingUpdate=s),()=>{t&&(t._pendingUpdate=s)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var i=e.i(647163);function n({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let l=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,i.cn)(l({orientation:s}),e),...n})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,i.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(n,{"data-slot":"field-label",className:(0,i.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),i=e.i(856539),n=e.i(24071),l=e.i(867927),r=e.i(829600),a=e.i(226091),o=e.i(726067),d=e.i(456420);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let u=(0,d.default)(c);var m=e.i(91511),x=e.i(77071),f=e.i(566595);let h={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};h.node;let p=(0,d.default)(h);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let b=(0,d.default)(v);var k=e.i(271645),j=e.i(798120),y=e.i(167881),w=e.i(986530),N=e.i(23750),S=e.i(683408),z=e.i(917162),C=e.i(671428),L=e.i(319036),F=e.i(127341),M=e.i(184762),R=e.i(41533),T=e.i(895836),$=e.i(95187);let D=(0,$.createServerReference)("7f85a49d039510ceee57ee7d2b329b96c06551a77a",$.callServer,void 0,$.findSourceMapURL,"createSkillAction"),A=(0,$.createServerReference)("7faafce42cf973bdbb9083a6b4124bc2d8bc91c5c8",$.callServer,void 0,$.findSourceMapURL,"deleteSkillAction"),B=(0,$.createServerReference)("7fddaddcbf8c9216c6e81cf69e08d528e77d5c9b95",$.callServer,void 0,$.findSourceMapURL,"setSkillDisabledAction"),q=(0,$.createServerReference)("7f8e1e7b0412e588b555987ced6892dc4303906f22",$.callServer,void 0,$.findSourceMapURL,"uploadSkillAction"),I=(0,$.createServerReference)("7f8623f0cd7d7e85bf12c1ecf92e572c093a2a4abb",$.callServer,void 0,$.findSourceMapURL,"writeSkillFileAction");var K=e.i(681307);K.z.union([K.z.enum(["custom","default"]),K.z.templateLiteral(["kit:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)]),K.z.templateLiteral(["own:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let E=e=>"custom"===e||e.startsWith("own:"),U=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),O=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");K.z.object({name:O,description:K.z.string().trim().min(1,"Description is required"),metadata:K.z.record(K.z.string(),K.z.unknown()).optional(),disabled:K.z.boolean().optional(),platforms:K.z.array(K.z.string()).optional()}).extend({name:U,content:K.z.string().trim().min(1,"Content is required")});var P=e.i(609856),W=e.i(283653),_=e.i(647163);let H={artifact:u,browser:m.Globe,computer:s.AppWindow,"find-skills":f.Search,"skill-creator":p};function V({skill:e}){let[s,n]=(0,P.useServerAction)(A,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),[r]=(0,P.useServerAction)(B,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),a=async()=>{await z.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.source,e.dir)},o="default"===e.source&&H[e.dir]||i.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,z.notify.component({className:"sm:max-w-4xl",renderer:({guard:e})=>(0,t.jsx)(G,{skill:s,guard:e})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,_.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,_.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description.trim().split(/(?<=[.。])\s|\n/)[0].trim()})]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(L.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),E(e.source)?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:n,onClick:a,"aria-label":`Delete ${e.name}`,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function G({skill:e,guard:s}){let[i,l]=(0,k.useState)(""),[r,a]=(0,k.useState)("SKILL.md"),o=(0,k.useRef)(!1);(0,k.useEffect)(()=>s(()=>o.current),[s]);let d=async e=>{let t=i?`${i}/${e.name}`:e.name;"dir"===e.kind?l(t):t===r||(!o.current||await z.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${r?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(o.current=!1,a(t))};return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(Y,{skill:e,path:r??i}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[i&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(i.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:i.split("/").pop()})]}),(0,t.jsx)(J,{source:e.source,dir:e.dir,path:i,current:r,onPick:d})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r?(0,t.jsx)(X,{source:e.source,dir:e.dir,path:r,editable:E(e.source),onUnsaved:e=>{o.current=e}},r):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function Y({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let i=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:i.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,_.cn)("truncate",s===i.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function Z({icon:e,label:s,active:i,hasChildren:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,_.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",i?T.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),n&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function J({source:e,dir:s,path:i,current:n,onPick:l}){let{data:d,isLoading:c,error:u}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(Z,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(a.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(i?`${i}/${e.name}`:e.name)===n,onClick:()=>l(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function Q({content:e,description:s}){let i=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),n=s?.trim(),l=i?e.slice(i[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[n&&(0,t.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:n}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:l})})]})}function X({source:e,dir:s,path:i,editable:n,onUnsaved:l}){let[r,a]=(0,k.useState)(null),{data:o,isLoading:d,error:c}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i)),u=null!==r&&(o?.kind!=="file"||r!==o.content);(0,k.useEffect)(()=>l?.(u),[u,l]);let[m,x]=(0,P.useServerAction)(I,{okMessage:"Saved",onOk:()=>{a(null),(0,W.revalidate)(j.queryKey.skills)}});if(c)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:c.message});if(d||!o)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==o.kind)return null;let f=i.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("span",{children:(0,_.formatBytes)(o.size)}),n&&null!==o.content&&null===r&&(0,t.jsxs)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(o.content??""),children:[(0,t.jsx)(p,{}),"Edit"]}),null!==r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(null),children:"Cancel"}),(0,t.jsx)(y.Button,{size:"xs",className:"font-mono",loading:x,disabled:r===o.content,onClick:()=>m(e,s,i,r),children:"Save"})]})]})]}),null!==r?(0,t.jsx)(M.Textarea,{value:r,onChange:e=>a(e.target.value),spellCheck:!1,"aria-label":`${f} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===o.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:o.size>R.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):f.toLowerCase().endsWith(".md")?(0,t.jsx)(Q,{content:o.content,description:o.description}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:o.content})]})}function ee(){return z.notify.component({className:"sm:max-w-lg",renderer:({close:e,guard:s})=>(0,t.jsx)(et,{onDone:e,guard:s})})}function et({onDone:e,guard:s}){let[i,n]=(0,k.useState)("write"),[l,r]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),[d,c]=(0,k.useState)(""),[u,m]=(0,k.useState)(null),[f,h]=(0,k.useState)(!1),p=(0,k.useRef)(null),g=(0,k.useRef)(!1);g.current=!!(l.trim()||a.trim()||d.trim()||u),(0,k.useEffect)(()=>s(()=>g.current),[s]);let v={errorMessage:!1,onOk:()=>{(0,W.revalidate)(j.queryKey.skills),e()}},[S,z,,C]=(0,P.useServerAction)(D,v),[L,$,,A]=(0,P.useServerAction)(q,v),B=z||$,I="write"===i?C:A,K=null!==u&&u.size>R.SKILL_FILES.uploadBytes,E=Math.round(R.SKILL_FILES.uploadBytes/1024/1024),U=!B&&("write"===i?l.trim()&&a.trim()&&d.trim():null!==u&&!K),O=async()=>{if(!U)return;if("write"===i)return void S({name:l.trim(),description:a.trim(),content:d});if(!u)return;let e=new FormData;e.append("file",u),L(e)},H=e=>{let t=e?.[0]??null;t&&m(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!U,loading:B,onClick:O,children:[!B&&("write"===i?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(b,{})),"write"===i?"Create":"Upload"]})]}),children:[(0,t.jsxs)(F.Tabs,{value:i,onValueChange:e=>n(e),children:[(0,t.jsxs)(F.TabsList,{className:"w-full",children:[(0,t.jsx)(F.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(F.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(F.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(w.FieldContent,{children:[(0,t.jsx)(N.Input,{id:"skill-name",value:l,onChange:e=>r(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",l.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(w.FieldContent,{children:(0,t.jsx)(N.Input,{id:"skill-description",value:a,onChange:e=>o(e.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(M.Textarea,{id:"skill-content",value:d,onChange:e=>c(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(F.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),H(e.dataTransfer.files)},className:(0,_.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",f?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(b,{className:"size-5 text-muted-foreground"}),u?(0,t.jsxs)("span",{className:"text-sm",children:[u.name,(0,t.jsxs)("span",{className:(0,_.cn)("ml-2 font-mono text-[11px]",K?"text-destructive":"text-muted-foreground"),children:[(0,_.formatBytes)(u.size),K&&` \xb7 over ${E} MB`]})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>H(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,t.jsxs)("p",{children:["Up to ",E," MB."]})]})]})]}),I&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,k.useState)(""),{data:i,isLoading:n,error:l}=(0,W.useServerRoute)(j.queryKey.skills),r=i??[];if(n)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(l)return(0,t.jsx)(T.SettingError,{message:l.message});let a=e.trim().toLowerCase(),o=r.filter(e=>!a||`${e.name} ${e.description}`.toLowerCase().includes(a)),d=r.filter(e=>!e.disabled).length,c=r.filter(e=>!e.disabled&&("default"===e.source||"custom"===e.source)).length,u=new Map;for(let e of o)e.bot&&u.set(e.bot,[...u.get(e.bot)??[],e]);return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>!E(e.source)).length," ","shipped ·"," ",r.filter(e=>E(e.source)).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:ee},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`custom/${e.dir}`))})}),[...u].map(([e,s])=>(0,t.jsx)(T.SettingGroup,{label:`${e}'s own`,hint:`only ${e} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,t.jsx)(T.SettingItems,{children:s.map(e=>(0,t.jsx)(V,{skill:e},`${e.source}/${e.dir}`))})},e)),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`default/${e.dir}`))})}),c>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[c," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};s.node;let i=(0,t.default)(s);e.s(["Folder",0,i],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let i=(0,t.default)(s);e.s(["Trash2",0,i],759659)}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,876268,e=>{"use strict";var t,n=e.i(843476),s=e.i(493801),r=e.i(375775),i=e.i(422411),o=e.i(525335),a=e.i(689664),l=e.i(867927),d=e.i(456420);let c={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};c.node;let u=(0,d.default)(c);var h=e.i(560972),h=h,f=e.i(815170),m=e.i(758925),g=e.i(566595),x=e.i(466787),p=e.i(271645),y=e.i(798120),k=e.i(167881),v=e.i(23750),j=e.i(917162),b=e.i(59377),w=e.i(818125),N=e.i(671428),A=e.i(41533),S=e.i(412294),C=e.i(458898),M=e.i(146538),z=e.i(968978),E=e.i(265402),R=e.i(635963),I=e.i(95187);let F=(0,I.createServerReference)("7f3f3b22bfb9a472c1fae485a22c29fc1facae95d4",I.callServer,void 0,I.findSourceMapURL,"removeConfigAction");e.s(["removeConfigAction",0,F],876268);var P=e.i(287746),T=e.i(992112),K=e.i(508734),_=e.i(482022),$=((t=$||{})[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t);let B=[1,0],O=[2,3],L=[3,2],q={L:[0,1],M:B,Q:O,H:L},D=/^\d*$/,H=/^[A-Z0-9 $%*+./:-]*$/,U="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",G=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Y=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class W{constructor(e,t,n,s){if(this.version=e,this.ecc=t,e<1||e>40)throw RangeError("Version value out of range");if(s<-1||s>7)throw RangeError("Mask value out of range");this.size=4*e+17;const r=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.types.push(r.map(()=>0));this.drawFunctionPatterns();const i=this.addEccAndInterleave(n);if(this.drawCodewords(i),-1===s){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(s=t,e=n),this.applyMask(t)}}this.mask=s,this.applyMask(s),this.drawFormatBits(s)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,$.Timing),this.setFunctionModule(e,6,e%2==0,$.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)(0!==n||0!==s)&&(0!==n||s!==t-1)&&(n!==t-1||0!==s)&&this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let s=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,Q(s,e));this.setFunctionModule(8,7,Q(s,6)),this.setFunctionModule(8,8,Q(s,7)),this.setFunctionModule(7,8,Q(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,Q(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,Q(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,Q(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=Q(t,e),s=this.size-11+e%3,r=Math.floor(e/3);this.setFunctionModule(s,r,n),this.setFunctionModule(r,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){let r=Math.max(Math.abs(s),Math.abs(n)),i=e+s,o=t+n;i>=0&&i<this.size&&o>=0&&o<this.size&&this.setFunctionModule(i,o,2!==r&&4!==r,$.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!==Math.max(Math.abs(s),Math.abs(n)),$.Alignment)}setFunctionModule(e,t,n,s=$.Function){this.modules[t][e]=n,this.types[t][e]=s}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==er(t,n))throw RangeError("Invalid argument");let s=Y[n[0]][t],r=G[n[0]][t],i=Math.floor(es(t)/8),o=s-i%s,a=Math.floor(i/s),l=[],d=function(e){if(e<1||e>255)throw RangeError("Degree out of range");let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let s=0;s<e;s++){for(let e=0;e<t.length;e++)t[e]=ei(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=ei(n,2)}return t}(r);for(let t=0,n=0;t<s;t++){let s=e.slice(n,n+a-r+(t<o?0:1));n+=s.length;let i=function(e,t){let n=t.map(e=>0);for(let s of e){let e=s^n.shift();n.push(0),t.forEach((t,s)=>n[s]^=ei(t,e))}return n}(s,d);t<o&&s.push(0),l.push(s.concat(i))}let c=[];for(let e=0;e<l[0].length;e++)l.forEach((t,n)=>{(e!==a-r||n>=o)&&c.push(t[e])});return c}drawCodewords(e){if(e.length!==Math.floor(es(this.version)/8))throw RangeError("Invalid argument");let t=0;for(let n=this.size-1;n>=1;n-=2){6===n&&(n=5);for(let s=0;s<this.size;s++)for(let r=0;r<2;r++){let i=n-r,o=(n+1&2)==0?this.size-1-s:s;!this.types[o][i]&&t<8*e.length&&(this.modules[o][i]=Q(e[t>>>3],7-(7&t)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw Error("Unreachable")}!this.types[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,s=0,r=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[t][i]===n?5==++s?e+=3:s>5&&e++:(this.finderPenaltyAddHistory(s,r),n||(e+=40*this.finderPenaltyCountPatterns(r)),n=this.modules[t][i],s=1);e+=40*this.finderPenaltyTerminateAndCount(n,s,r)}for(let t=0;t<this.size;t++){let n=!1,s=0,r=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][t]===n?5==++s?e+=3:s>5&&e++:(this.finderPenaltyAddHistory(s,r),n||(e+=40*this.finderPenaltyCountPatterns(r)),n=this.modules[i][t],s=1);e+=40*this.finderPenaltyTerminateAndCount(n,s,r)}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let s=this.modules[t][n];s===this.modules[t][n+1]&&s===this.modules[t+1][n]&&s===this.modules[t+1][n+1]&&(e+=3)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size;return e+(Math.ceil(Math.abs(20*t-10*n)/n)-1)*10}getAlignmentPatternPositions(){if(1===this.version)return[];{let e=Math.floor(this.version/7)+2,t=32===this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===3*t&&e[4]===t&&e[5]===t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0===t[0]&&(e+=this.size),t.pop(),t.unshift(e)}}function V(e,t,n){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function Q(e,t){return(e>>>t&1)!=0}class X{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}let Z=[1,10,12,14],J=[2,9,11,13],ee=[4,8,16,16];function et(e,t){return e[Math.floor((t+7)/17)+1]}function en(e){let t=[];for(let n of e)V(n,8,t);return new X(ee,e.length,t)}function es(e){if(e<1||e>40)throw RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function er(e,t){return Math.floor(es(e)/8)-G[t[0]][e]*Y[t[0]][e]}function ei(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^(n>>>7)*285^(t>>>s&1)*e;return n}var eo=e.i(511769),ea=e.i(660302),el=e.i(895836),ed=e.i(609856),ec=e.i(283653),eu=e.i(647163);let eh=(0,I.createServerReference)("7f5aa08b7d2d5a47e5b26a41022a15d3ec116a260d",I.callServer,void 0,I.findSourceMapURL,"forgetReachAction");var ef=e.i(36174);let em={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},eg=`display_information:
|
|
2
2
|
name: Thursday
|
|
3
3
|
features:
|
|
4
4
|
app_home:
|
|
@@ -15,4 +15,4 @@ settings:
|
|
|
15
15
|
interactivity:
|
|
16
16
|
is_enabled: true
|
|
17
17
|
socket_mode_enabled: true
|
|
18
|
-
`,ex=({children:e})=>(0,n.jsx)("span",{className:"font-medium text-foreground",children:e}),ep={telegram:[{body:(0,n.jsxs)(n.Fragment,{children:["In Telegram, write to ",(0,n.jsx)(ex,{children:"@BotFather"}),", send ",(0,n.jsx)(ex,{children:"/newbot"})," and pick a name. It answers with a ",(0,n.jsx)(ex,{children:"token"}),"."]}),slot:{open:"https://t.me/BotFather",label:"Open @BotFather"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.TELEGRAM_TOKEN_KEY,looks:"123456789:AAE…"}},{body:(0,n.jsx)(n.Fragment,{children:"From your phone, write anything to your bot."}),slot:{says:"Point your phone's camera at it to open the chat."}},{body:(0,n.jsxs)(n.Fragment,{children:["A question with a code appears on this computer. Press ",(0,n.jsx)(ex,{children:"Allow"})," if your phone shows the same code."]})}],discord:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(ex,{children:"discord.com/developers"}),", make a ",(0,n.jsx)(ex,{children:"New Application"}),". So nobody else can add it to a server, set ",(0,n.jsx)(ex,{children:"Install Link"})," to"," ",(0,n.jsx)(ex,{children:"None"})," on its ",(0,n.jsx)(ex,{children:"Installation"})," page and turn off"," ",(0,n.jsx)(ex,{children:"Public Bot"})," on its ",(0,n.jsx)(ex,{children:"Bot"})," page. There, press"," ",(0,n.jsx)(ex,{children:"Reset Token"})," and copy it."]}),slot:{open:"https://discord.com/developers/applications",label:"Open discord.com/developers"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.DISCORD_TOKEN_KEY,looks:"MTE…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Add the bot to a server of your own"})," — Discord only delivers a message to a bot you share a server with. A private server made for this is fine."]}),slot:{says:"Point your phone's camera at it, or open it here. It asks which server, and adds the bot with no permissions in it.",does:"Add the bot to a server"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Send the bot a direct message"}),", not in the server: on a phone, tap the bot in the server's member list, then ",(0,n.jsx)(ex,{children:"Message"}),". A question with a code appears here: press ",(0,n.jsx)(ex,{children:"Allow"})," if your phone shows the same code."]})}],slack:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(({href:e,children:t})=>(0,n.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:t}),{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,n.jsx)(ex,{children:"Create New App › From a manifest"}),", and paste the manifest."]}),slot:{manifest:!0}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,n.jsx)(ex,{children:"connections:write"}),". It starts with xapp-."]}),slot:{key:ef.SLACK_APP_TOKEN_KEY,looks:"xapp-…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb-."]}),slot:{key:ef.SLACK_BOT_TOKEN_KEY,looks:"xoxb-…"}},{body:(0,n.jsxs)(n.Fragment,{children:["In Slack, open the app under ",(0,n.jsx)(ex,{children:"Apps"})," and write in its"," ",(0,n.jsx)(ex,{children:"Messages"})," tab. A question with a code appears here: press"," ",(0,n.jsx)(ex,{children:"Allow"})," if Slack shows the same code."]})}]};function ey(){let e=(0,ec.useServerRoute)(y.queryKey.config),t=(0,ec.useServerRoute)(y.queryKey.reach);(0,eo.useAppEvent)({reach:()=>void(0,ec.revalidate)(y.queryKey.reach)});let s=t=>(0,T.isConfigSet)(e.data,t),r=e=>t.data?.channels.find(t=>t.name===e)??null,i=e=>!!r(e)?.allowed,o=ef.REACH_CHANNELS.find(e=>r(e)?.refused),a=ef.REACH_CHANNELS.find(e=>ef.REACH_KEYS[e].every(s)&&!i(e)),l=!ef.REACH_CHANNELS.some(i),[d,c]=(0,p.useState)(o??a??(l?ef.REACH_CHANNELS[0]:null));return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingItems,{children:ef.REACH_CHANNELS.map(e=>(0,n.jsx)(ek,{name:e,status:r(e),tokensIn:ef.REACH_KEYS[e].filter(s).length,isSet:s,open:d===e,onOpen:()=>c(d===e?null:e)},e))}),(0,n.jsx)(el.SettingNote,{children:"Only the one person you allow can write, and only direct messages are read. Work started here runs whether or not a tab is open, while Thursday is running on this computer."})]})}function ek({name:e,status:t,tokensIn:s,isSet:r,open:i,onOpen:o}){var a;let d,c,u,h,f=ep[e],g=t?.refused??null,x=(a={connected:!!t?.bot,allowed:!!t?.allowed,refused:g},d=f.map(e=>e.slot&&"key"in e.slot?e.slot.key:null),c=e=>!r(e)||e===a.refused,u=d.findIndex(e=>e&&c(e)),h=d.reduce((e,t,n)=>t?n:e,-1),f.map((e,t)=>{let n=d[t];return n?c(n)?t===u?"now":"later":"done":u>=0?t<u?a.refused?"done":"flat":"later":a.allowed||t<h?"done":a.connected?"now":"flat"})),p=!!t?.bot&&!t?.allowed&&!g;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",onClick:o,"aria-expanded":i,className:"flex w-full items-center gap-3 px-4 py-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)(w.SiteIcon,{host:em[e],className:"size-4 rounded-[4px]",fallback:(0,n.jsx)(m.KeyRound,{className:"size-4 text-muted-foreground"})}),(0,n.jsx)("span",{className:"text-sm font-medium",children:ef.REACH_LABEL[e]}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate",children:(0,n.jsx)(ev,{status:t,tokensIn:s,tokens:ef.REACH_KEYS[e].length})}),(0,n.jsx)(l.ChevronRight,{className:(0,eu.cn)("size-4 shrink-0 text-muted-foreground transition-transform",i&&"rotate-90")})]}),i&&(0,n.jsxs)("div",{className:"px-4 pt-1 pb-4",children:[(0,n.jsx)("ol",{className:"space-y-3",children:f.map((e,s)=>(0,n.jsx)(ej,{n:s+1,step:e,state:x[s],set:!!e.slot&&"key"in e.slot&&r(e.slot.key),refused:e.slot&&"key"in e.slot&&e.slot.key===g?t?.problem??"":null,link:t?.link??null,waiting:p&&s===f.length-1},s))}),t?.allowed&&(0,n.jsx)(ez,{name:e,who:t.allowed.name,stopped:!!g})]})]})}function ev({status:e,tokensIn:t,tokens:s}){let r="text-xs";return t<s?(0,n.jsx)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:t?`${t} of ${s} tokens in`:"Not set"}):e?.refused?(0,n.jsxs)("span",{className:(0,eu.cn)(r,"text-destructive"),children:["Stopped — ",ef.REACH_LABEL[e.name]," turned the token away"]}):e?.problem?(0,n.jsx)(ea.ShinyText,{text:`${e.bot?"Reconnecting":"Connecting"}… ${e.problem}`,className:(0,eu.cn)(r,"align-middle")}):e?.allowed?(0,n.jsxs)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:["Listening as ",e.bot,". ",e.allowed.name," is let in."]}):e?.bot?(0,n.jsx)(ea.ShinyText,{text:`Listening as ${e.bot} — waiting for your first message`,tone:"waiting",className:(0,eu.cn)(r,"align-middle")}):(0,n.jsx)(ea.ShinyText,{text:"Connecting…",className:(0,eu.cn)(r,"align-middle")})}function ej({n:e,step:t,state:s,set:r,refused:i,link:o,waiting:a}){return(0,n.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,n.jsx)(eb,{n:e,state:s}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[(0,n.jsx)("p",{className:(0,eu.cn)("done"===s||"later"===s?"text-muted-foreground/60 **:text-inherit":"text-muted-foreground"),children:t.body}),(0,n.jsx)(ew,{slot:t.slot,state:s,set:r,refused:i,link:o,waiting:a})]})]})}function eb({n:e,state:t}){return"done"===t?(0,n.jsx)("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-foreground text-background",children:(0,n.jsx)(a.Check,{className:"size-3"})}):(0,n.jsx)("span",{className:(0,eu.cn)("mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] ring-1","now"===t?(0,eu.cn)(eu.WAITING_INK,"ring-waiting/40"):"text-muted-foreground ring-border/60","later"===t&&"opacity-60"),children:e})}function ew({slot:e,state:t,set:s,refused:r,link:i,waiting:o}){let a=o&&(0,n.jsx)(ea.ShinyText,{text:"Waiting for your first message…",tone:"waiting"});return"later"===t?null:e&&"key"in e?(0,n.jsx)(eC,{configKey:e.key,looks:e.looks,set:s,refused:r}):"done"===t?e&&"says"in e&&i?(0,n.jsx)(eS,{href:i,children:e.does??eA(i)}):null:e?"open"in e?(0,n.jsx)(eS,{href:e.open,children:e.label}):"manifest"in e?(0,n.jsx)(eM,{}):i?(0,n.jsxs)("div",{className:"space-y-2.5",children:[(0,n.jsx)(eN,{link:i,says:e.says,does:e.does}),a]}):a||null:a||null}function eN({link:e,says:t,does:s}){let{size:r,data:i}=function(e){let{ecc:t="L",boostEcc:n=!1,minVersion:s=1,maxVersion:r=40,maskPattern:i=-1,border:o=1}={},a="string"==typeof e?function(e){var t,n;if(""===e)return[];if(t=e,D.test(t))return[function(e){var t;if(t=e,!D.test(t))throw RangeError("String contains non-numeric characters");let n=[];for(let t=0;t<e.length;){let s=Math.min(e.length-t,3);V(Number.parseInt(e.substring(t,t+s),10),3*s+1,n),t+=s}return new X(Z,e.length,n)}(e)];return(n=e,H.test(n))?[function(e){var t;let n;if(t=e,!H.test(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let s=[];for(n=0;n+2<=e.length;n+=2){let t=45*U.indexOf(e.charAt(n));V(t+=U.indexOf(e.charAt(n+1)),11,s)}return n<e.length&&V(U.indexOf(e.charAt(n)),6,s),new X(J,e.length,s)}(e)]:[en(function(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!==e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}(e))]}(e):Array.isArray(e)?[en(e)]:void 0;if(!a)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=function(e,t,n=1,s=40,r=-1,i=!0){let o,a;if(!(1<=n&&n<=s&&s<=40)||r<-1||r>7)throw RangeError("Invalid value");for(o=n;;o++){let n=8*er(o,t),r=function(e,t){let n=0;for(let s of e){let e=et(s.mode,t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}(e,o);if(r<=n){a=r;break}if(o>=s)throw RangeError("Data too long")}for(let e of[$,O,L])i&&a<=8*er(o,e)&&(t=e);let l=[];for(let t of e)for(let e of(V(t.mode[0],4,l),V(t.numChars,et(t.mode,o),l),t.getData()))l.push(e);let d=8*er(o,t);V(0,Math.min(4,d-l.length),l),V(0,(8-l.length%8)%8,l);for(let e=236;l.length<d;e^=253)V(e,8,l);let c=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((e,t)=>c[t>>>3]|=e<<7-(7&t)),new W(o,t,c,r)}(a,q[t],s,r,i,n);return function(e,t=1){if(!t)return e;let{size:n}=e,s=n+2*t;e.size=s,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:s},e=>!1)),e.data.push(Array.from({length:s},e=>!1));let r=B.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(r),e.push(r)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:s},e=>r)),e.types.push(Array.from({length:s},e=>r));return e}({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},o)}(e),o=eA(e);return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,n.jsx)("div",{className:"rounded-lg bg-white p-2.5",children:(0,n.jsx)("svg",{viewBox:`0 0 ${r} ${r}`,className:"block size-31 text-black",role:"img","aria-label":`A picture of ${o} for a phone camera`,children:i.flatMap((e,t)=>e.map((e,s)=>e?(0,n.jsx)("rect",{x:s,y:t,width:1,height:1,fill:"currentColor"},`${s}-${t}`):null))})}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-muted-foreground",children:t}),(0,n.jsx)(eS,{href:e,children:s??o})]})]})}let eA=e=>e.replace(/^https:\/\//,"");function eS({href:e,children:t}){return(0,n.jsxs)("a",{href:e,target:"_blank",rel:"noreferrer",className:(0,eu.cn)((0,k.buttonVariants)({variant:"outline",size:"sm"})),children:[(0,n.jsx)(K.ExternalLink,{}),t]})}function eC({configKey:e,looks:t,set:s,refused:r}){let[i,o]=(0,p.useState)(""),[a,l]=(0,p.useState)(!1),d=()=>{o(""),l(!1),(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.reach)},[c,u]=(0,ed.useServerAction)(P.setConfigAction,{onOk:d}),[h,f]=(0,ed.useServerAction)(F,{onOk:d}),m=async()=>{await j.notify.confirm({title:"Remove this token?",description:"That service stops, and whoever is let in is let go.",okText:"Remove",destructive:!0})&&h(e)};return s&&!a&&null===r?(0,n.jsx)(k.Button,{size:"xs",variant:"ghost",onClick:()=>l(!0),className:"-ml-2 text-muted-foreground",children:"Change the token"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("form",{className:"flex flex-wrap items-center gap-2",onSubmit:t=>{t.preventDefault(),c(e,i)},children:[(0,n.jsx)(v.Input,{value:i,onChange:e=>o(e.target.value),placeholder:t,"aria-label":"Token",type:"password",autoComplete:"off",spellCheck:!1,className:"w-72 font-mono"}),(0,n.jsx)(k.Button,{type:"submit",size:"sm",loading:u,disabled:i.trim().length<A.KEY_MIN,children:s?"Replace":"Save"}),s&&(0,n.jsxs)(n.Fragment,{children:[null===r&&(0,n.jsx)(k.Button,{size:"sm",variant:"ghost",onClick:()=>l(!1),children:"Cancel"}),(0,n.jsx)(k.Button,{size:"sm",variant:"ghost",loading:f,onClick:()=>void m(),className:"ml-auto text-destructive hover:text-destructive",children:"Remove"})]})]}),r&&(0,n.jsx)("p",{className:"max-w-xl text-destructive",children:r})]})}function eM(){let[e,t]=(0,p.useState)(!1);return(0,n.jsxs)(k.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(eg).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}),children:[e?(0,n.jsx)(a.Check,{}):(0,n.jsx)(_.Copy,{}),e?"Copied":"Copy the manifest"]})}function ez({name:e,who:t,stopped:s}){let[r,i]=(0,ed.useServerAction)(eh,{onOk:()=>(0,ec.revalidate)(y.queryKey.reach)});return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-3 pl-8 text-[13px] text-muted-foreground",children:[(0,n.jsx)("span",{children:s?`${t} is let in.`:`${t} can write from a phone.`}),(0,n.jsx)(k.Button,{size:"sm",variant:"outline",loading:i,onClick:()=>void r(e),children:"Let them go"})]})}let eE={[T.EXA_API_KEY]:g.Search},eR={image:f.Image,video:u,speech:i.AudioLines,transcription:o.Captions},eI={keys:["voice","easy","text","search"],models:["bots","studio"]};function eF({screen:e}){let{data:t,isLoading:s,error:r}=(0,ec.useServerRoute)(y.queryKey.config);if(s)return(0,n.jsx)(el.SettingSkeleton,{rows:4});if(r)return(0,n.jsx)(el.SettingError,{message:r.message});let i=e=>(0,T.isConfigSet)(t,e),o=e=>t?.find(t=>t.key===e)?.value,a=eI[e].flatMap(e=>T.CONFIG_GROUPS.find(t=>t.id===e)??[]),l=a.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":`${l.filter(e=>i(e.key)).length} of ${l.length} set${a.some(e=>!(0,T.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:a.map(e=>(0,n.jsx)(el.SettingGroup,{label:e.title,hint:e.hint,right:(0,n.jsx)(eT,{group:e,isSet:i}),children:"easy"===e.id?(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,n.jsx)(e_,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,n.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,n.jsx)(eP,{entry:e,set:i(e.key)},e.key))}):(0,n.jsx)(el.SettingItems,{children:e.entries.map(t=>t.effortOf?null:t.choices?(0,n.jsx)(eU,{entry:t,choices:t.choices,value:o(t.key),effort:eG(e,t.key),effortValue:o(T.DEFAULT_EFFORT_KEY),isSet:i},t.key):(0,n.jsx)(e_,{entry:t,set:i(t.key),needed:!(0,T.groupSatisfied)(e,i)},t.key))})},e.id))})}function eP({entry:e,set:t}){return(0,n.jsxs)("button",{type:"button",onClick:()=>eW(e,t),"aria-label":`${e.label}: ${t?"set":"not set"}`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,n.jsx)(eH,{entry:e}),t&&(0,n.jsx)("span",{className:"absolute -top-1 -right-1 grid size-4 place-items-center rounded-full bg-primary text-primary-foreground ring-2 ring-background",children:(0,n.jsx)(a.Check,{className:"size-2.5"})})]}),(0,n.jsx)("span",{className:(0,eu.cn)("max-w-full truncate text-[11px]",t?"text-foreground":"text-muted-foreground"),children:e.label})]})}function eT({group:e,isSet:t}){return"none"===e.require?null:(0,T.groupSatisfied)(e,t)?(0,n.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,n.jsx)(a.Check,{className:"size-3"}),"ready"]}):(0,n.jsxs)("span",{className:(0,eu.cn)("flex items-center gap-1 font-mono text-[11px]",eu.WAITING_INK),children:[(0,n.jsx)(x.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function e_({entry:e,set:t,needed:s,card:r=!1,narrow:i=!1}){let o=e$(e,t),d=eL(e,t),c=eO(e,t),u=d.data?eq(d.data):eB(t,s,o.data,e.signIn),h=o.isLoading||d.isLoading,f=(0,n.jsxs)("span",{className:(0,eu.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",u.ink),children:[u.warn?(0,n.jsx)(x.TriangleAlert,{className:"size-3"}):t&&(0,n.jsx)(a.Check,{className:"size-3"}),u.text]});return(0,n.jsxs)("button",{type:"button",onClick:()=>{var s;return e.signIn?(s=e,j.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,n.jsx)(eY,{entry:s,onDone:e})})):eW(e,t)},className:(0,eu.cn)("group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",r&&"rounded-xl border border-border/60"),children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(eH,{entry:e})}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,n.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,n.jsx)("span",{className:"rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:"recommended"})]}),i?h?(0,n.jsx)(N.Skeleton,{className:"h-3 w-20"}):f:(0,n.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?t?eD(d.data,c):"sign in with your account":e.key})]}),i?null:h?(0,n.jsx)(N.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,n.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let eK=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function eB(e,t,n,s){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${eK.format(n.balance)} left`,ink:n.low?eu.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:s?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:eu.WAITING_INK,warn:!0}:{text:s?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function e$(e,t){return(0,ec.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?y.queryKey.gatewayCredits:null)}function eO(e,t){let{data:n}=(0,ec.useServerRoute)(t&&e.signIn?y.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function eL(e,t){return(0,ec.useServerRoute)(t&&e.signIn?y.queryKey.subscriptionUsage:null)}function eq(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?eu.WAITING_INK:"text-muted-foreground",warn:e.high}}function eD(e,t){let n=!e||"refused"in e?null:e,r=`${n?.plan??t??"unknown"} plan`;return n?.resetsAt?`${r} \xb7 resets in ${(0,s.formatDistanceToNowStrict)(new Date(n.resetsAt))}`:r}function eH({entry:e}){if(e.provider)return(0,n.jsx)(z.ProviderIcon,{provider:e.provider,className:"size-4"});let t=eE[e.key]??m.KeyRound,s=(0,n.jsx)(t,{className:"size-4 text-muted-foreground"});return e.site?(0,n.jsx)(w.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:s}):s}function eU({entry:e,choices:t,value:s,effort:r,effortValue:i,isSet:o}){let a=e.text?(0,E.parseTextModel)(s):(0,E.parseMediaModel)(s),l=t.filter(e=>o(e.needs)),d=e.kind?eR[e.kind]:R.BotsMark,[c]=(0,ed.useServerAction)(P.setConfigAction,{onOk:()=>(0,ec.revalidate)(y.queryKey.config)}),[u]=(0,ed.useServerAction)(F,{onOk:()=>(0,ec.revalidate)(y.queryKey.config)});return(0,n.jsxs)("div",{className:"flex w-full items-start gap-3 p-4",children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(d,{className:"size-4 text-muted-foreground"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 pt-1.5",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),!s&&(0,n.jsx)("span",{className:(0,eu.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?eu.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("div",{className:"min-w-0",children:(0,n.jsx)(M.ModelPicker,{kind:e.kind,provider:a?.provider??null,model:a?.model??"",unset:e.kind?"Not offered to bots until you pick one":l[0]?.label??"No key for any of these yet",onChange:t=>c(e.key,`${t.provider}/${t.model.trim()}`),onUnset:s?()=>{u(e.key),r&&i&&u(r.key)}:void 0})}),r&&a&&(0,n.jsxs)("div",{className:"flex items-start gap-3 pt-0.5",children:[(0,n.jsx)("span",{className:"w-12 shrink-0 pt-1.5 font-mono text-[11px] text-muted-foreground",children:"effort"}),(0,n.jsx)(C.EffortSwitch,{provider:a.provider,model:a.model,value:E.effortSchema.safeParse(i).data??null,onChange:e=>e?c(r.key,e):u(r.key)})]})]})]})]})}let eG=(e,t)=>e.entries.find(e=>e.effortOf===t);function eY({entry:e,onDone:t}){let{data:s}=(0,ec.useServerRoute)(y.queryKey.config),r=(0,T.isConfigSet)(s,e.key),i=eO(e,r),o=eL(e,r),a=o.data?eq(o.data):null,[l,d]=(0,ed.useServerAction)(F,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.llmModel),t()}});return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:r?(0,n.jsxs)(n.Fragment,{children:["Signed in ·"," ",(0,n.jsx)("span",{className:"font-mono",children:eD(o.data,i)}),a&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",a.ink),children:a.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>l(e.key),children:"Sign out"}),(0,n.jsx)(k.Button,{variant:"ghost",onClick:t,children:r?"Close":"Cancel"}),!r&&(0,n.jsx)(S.ChatGptSignIn,{})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingNote,{children:r?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),o.data&&"refused"in o.data&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:o.data.refused})]})})}function eW(e,t){return j.notify.component({className:"sm:max-w-md",renderer:({close:s})=>(0,n.jsx)(eV,{entry:e,set:t,onDone:s})})}function eV({entry:e,set:t,onDone:s}){let[i,o]=(0,p.useState)(""),{data:a}=e$(e,t),l=a?eB(t,!1,a):null,d=()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.llmModel)},[c,u]=(0,ed.useServerAction)(P.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{d(),s()}}),[h,f]=(0,ed.useServerAction)(F,{okMessage:`${e.label} key removed`,onOk:()=>{d(),s()}}),m=async()=>{await j.notify.confirm({title:`Remove the ${e.label} key?`,description:"It is deleted from this computer, and nothing runs on it until a key is pasted again.",okText:"Remove",destructive:!0})&&h(e.key)};return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,n.jsxs)(n.Fragment,{children:[" · ",e.hint]}),l&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",l.ink),children:l.text})]})]}),footer:(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(k.Button,{variant:"ghost",loading:f,onClick:()=>void m(),className:"mr-auto text-destructive hover:text-destructive",children:"Remove"}),(0,n.jsx)(k.Button,{variant:"ghost",onClick:s,children:"Cancel"}),(0,n.jsx)(k.Button,{loading:u,disabled:i.trim().length<A.KEY_MIN,onClick:()=>c(e.key,i),children:t?"Replace":"Save"})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(v.Input,{value:i,onChange:e=>o(e.target.value),onKeyDown:t=>{"Enter"===t.key&&i.trim().length>=A.KEY_MIN&&c(e.key,i)},placeholder:t?"New value — replaces the current key":e.keyLooks??"Paste the key",spellCheck:!1,type:"password",autoFocus:!0}),!t&&e.keysAt&&(0,n.jsxs)("a",{href:e.keysAt,target:"_blank",rel:"noreferrer",className:"flex w-fit items-center gap-1 px-0.5 text-[13px] text-foreground underline underline-offset-3 hover:text-foreground/80",children:["Get a key at ",new URL(e.keysAt).host,(0,n.jsx)(r.ArrowUpRight,{className:"size-3.5"})]}),a&&"refused"in a&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:a.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:t}=(0,ec.useServerRoute)(y.queryKey.config),s=e=>(0,T.isConfigSet)(t,e),r=e=>T.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,o]=(0,p.useState)(!1),a=r("voice"),l=[...a,...r("text")],d=l.filter((t,n)=>(n<4||s(t.key))&&!(e&&a.includes(t))),c=l.filter(t=>!d.includes(t)&&!(e&&a.includes(t)));return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)("div",{className:"flex flex-col gap-2",children:r("easy").map(e=>(0,n.jsx)(e_,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[d.map(e=>(0,n.jsx)(eP,{entry:e,set:s(e.key)},e.key)),c.length>0&&(0,n.jsxs)(b.Popover,{open:i,onOpenChange:o,children:[(0,n.jsxs)(b.PopoverTrigger,{"aria-label":`${c.length} more providers`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)("span",{className:"grid size-10.5 place-items-center rounded-[13px] bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,n.jsx)(h.default,{className:"size-4"})}),(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,n.jsx)(b.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>o(!1),children:c.map(e=>(0,n.jsx)(eP,{entry:e,set:s(e.key)},e.key))})]})]}),r("search").map(e=>(0,n.jsx)(e_,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,n.jsx)(eF,{screen:"keys"}),"ModelsSetting",0,()=>(0,n.jsx)(eF,{screen:"models"}),"PhoneSetting",0,()=>(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"Nothing on this computer is opened to the internet: the app asks the chat service what was written."}),children:(0,n.jsx)(ey,{})})],805995)}]);
|
|
18
|
+
`,ex=({children:e})=>(0,n.jsx)("span",{className:"font-medium text-foreground",children:e}),ep={telegram:[{body:(0,n.jsxs)(n.Fragment,{children:["In Telegram, write to ",(0,n.jsx)(ex,{children:"@BotFather"}),", send ",(0,n.jsx)(ex,{children:"/newbot"})," and pick a name. It answers with a ",(0,n.jsx)(ex,{children:"token"}),"."]}),slot:{open:"https://t.me/BotFather",label:"Open @BotFather"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.TELEGRAM_TOKEN_KEY,looks:"123456789:AAE…"}},{body:(0,n.jsx)(n.Fragment,{children:"From your phone, write anything to your bot."}),slot:{says:"Point your phone's camera at it to open the chat."}},{body:(0,n.jsxs)(n.Fragment,{children:["A question with a code appears on this computer. Press ",(0,n.jsx)(ex,{children:"Allow"})," if your phone shows the same code."]})}],discord:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(ex,{children:"discord.com/developers"}),", make a ",(0,n.jsx)(ex,{children:"New Application"}),". So nobody else can add it to a server, set ",(0,n.jsx)(ex,{children:"Install Link"})," to"," ",(0,n.jsx)(ex,{children:"None"})," on its ",(0,n.jsx)(ex,{children:"Installation"})," page and turn off"," ",(0,n.jsx)(ex,{children:"Public Bot"})," on its ",(0,n.jsx)(ex,{children:"Bot"})," page. There, press"," ",(0,n.jsx)(ex,{children:"Reset Token"})," and copy it."]}),slot:{open:"https://discord.com/developers/applications",label:"Open discord.com/developers"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.DISCORD_TOKEN_KEY,looks:"MTE…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Add the bot to a server of your own"})," — Discord only delivers a message to a bot you share a server with. A private server made for this is fine."]}),slot:{says:"Point your phone's camera at it, or open it here. It asks which server, and adds the bot with no permissions in it.",does:"Add the bot to a server"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Send the bot a direct message"}),", not in the server: on a phone, tap the bot in the server's member list, then ",(0,n.jsx)(ex,{children:"Message"}),". A question with a code appears here: press ",(0,n.jsx)(ex,{children:"Allow"})," if your phone shows the same code."]})}],slack:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(({href:e,children:t})=>(0,n.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:t}),{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,n.jsx)(ex,{children:"Create New App › From a manifest"}),", and paste the manifest."]}),slot:{manifest:!0}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,n.jsx)(ex,{children:"connections:write"}),". It starts with xapp-."]}),slot:{key:ef.SLACK_APP_TOKEN_KEY,looks:"xapp-…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb-."]}),slot:{key:ef.SLACK_BOT_TOKEN_KEY,looks:"xoxb-…"}},{body:(0,n.jsxs)(n.Fragment,{children:["In Slack, open the app under ",(0,n.jsx)(ex,{children:"Apps"})," and write in its"," ",(0,n.jsx)(ex,{children:"Messages"})," tab. A question with a code appears here: press"," ",(0,n.jsx)(ex,{children:"Allow"})," if Slack shows the same code."]})}]};function ey(){let e=(0,ec.useServerRoute)(y.queryKey.config),t=(0,ec.useServerRoute)(y.queryKey.reach);(0,eo.useAppEvent)({reach:()=>void(0,ec.revalidate)(y.queryKey.reach)});let s=t=>(0,T.isConfigSet)(e.data,t),r=e=>t.data?.channels.find(t=>t.name===e)??null,i=e=>!!r(e)?.allowed,o=ef.REACH_CHANNELS.find(e=>r(e)?.refused),a=ef.REACH_CHANNELS.find(e=>ef.REACH_KEYS[e].every(s)&&!i(e)),l=!ef.REACH_CHANNELS.some(i),[d,c]=(0,p.useState)(o??a??(l?ef.REACH_CHANNELS[0]:null));return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingItems,{children:ef.REACH_CHANNELS.map(e=>(0,n.jsx)(ek,{name:e,status:r(e),tokensIn:ef.REACH_KEYS[e].filter(s).length,isSet:s,open:d===e,onOpen:()=>c(d===e?null:e)},e))}),(0,n.jsx)(el.SettingNote,{children:"Only the one person you allow can write, and only direct messages are read. Work started here runs whether or not a tab is open, while Thursday is running on this computer."})]})}function ek({name:e,status:t,tokensIn:s,isSet:r,open:i,onOpen:o}){var a;let d,c,u,h,f=ep[e],g=t?.refused??null,x=(a={connected:!!t?.bot,allowed:!!t?.allowed,refused:g},d=f.map(e=>e.slot&&"key"in e.slot?e.slot.key:null),c=e=>!r(e)||e===a.refused,u=d.findIndex(e=>e&&c(e)),h=d.reduce((e,t,n)=>t?n:e,-1),f.map((e,t)=>{let n=d[t];return n?c(n)?t===u?"now":"later":"done":u>=0?t<u?a.refused?"done":"flat":"later":a.allowed||t<h?"done":a.connected?"now":"flat"})),p=!!t?.bot&&!t?.allowed&&!g;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",onClick:o,"aria-expanded":i,className:"flex w-full items-center gap-3 px-4 py-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)(w.SiteIcon,{host:em[e],className:"size-4 rounded-[4px]",fallback:(0,n.jsx)(m.KeyRound,{className:"size-4 text-muted-foreground"})}),(0,n.jsx)("span",{className:"text-sm font-medium",children:ef.REACH_LABEL[e]}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate",children:(0,n.jsx)(ev,{status:t,tokensIn:s,tokens:ef.REACH_KEYS[e].length})}),(0,n.jsx)(l.ChevronRight,{className:(0,eu.cn)("size-4 shrink-0 text-muted-foreground transition-transform",i&&"rotate-90")})]}),i&&(0,n.jsxs)("div",{className:"px-4 pt-1 pb-4",children:[(0,n.jsx)("ol",{className:"space-y-3",children:f.map((e,s)=>(0,n.jsx)(ej,{n:s+1,step:e,state:x[s],set:!!e.slot&&"key"in e.slot&&r(e.slot.key),refused:e.slot&&"key"in e.slot&&e.slot.key===g?t?.problem??"":null,link:t?.link??null,waiting:p&&s===f.length-1},s))}),t?.allowed&&(0,n.jsx)(ez,{name:e,who:t.allowed.name,stopped:!!g})]})]})}function ev({status:e,tokensIn:t,tokens:s}){let r="text-xs";return t<s?(0,n.jsx)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:t?`${t} of ${s} tokens in`:"Not set"}):e?.refused?(0,n.jsxs)("span",{className:(0,eu.cn)(r,"text-destructive"),children:["Stopped — ",ef.REACH_LABEL[e.name]," turned the token away"]}):e?.problem?(0,n.jsx)(ea.ShinyText,{text:`${e.bot?"Reconnecting":"Connecting"}… ${e.problem}`,className:(0,eu.cn)(r,"align-middle")}):e?.allowed?(0,n.jsxs)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:["Listening as ",e.bot,". ",e.allowed.name," is let in."]}):e?.bot?(0,n.jsx)(ea.ShinyText,{text:`Listening as ${e.bot} — waiting for your first message`,tone:"waiting",className:(0,eu.cn)(r,"align-middle")}):(0,n.jsx)(ea.ShinyText,{text:"Connecting…",className:(0,eu.cn)(r,"align-middle")})}function ej({n:e,step:t,state:s,set:r,refused:i,link:o,waiting:a}){return(0,n.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,n.jsx)(eb,{n:e,state:s}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[(0,n.jsx)("p",{className:(0,eu.cn)("done"===s||"later"===s?"text-muted-foreground/60 **:text-inherit":"text-muted-foreground"),children:t.body}),(0,n.jsx)(ew,{slot:t.slot,state:s,set:r,refused:i,link:o,waiting:a})]})]})}function eb({n:e,state:t}){return"done"===t?(0,n.jsx)("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-foreground text-background",children:(0,n.jsx)(a.Check,{className:"size-3"})}):(0,n.jsx)("span",{className:(0,eu.cn)("mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] ring-1","now"===t?(0,eu.cn)(eu.WAITING_INK,"ring-waiting/40"):"text-muted-foreground ring-border/60","later"===t&&"opacity-60"),children:e})}function ew({slot:e,state:t,set:s,refused:r,link:i,waiting:o}){let a=o&&(0,n.jsx)(ea.ShinyText,{text:"Waiting for your first message…",tone:"waiting"});return"later"===t?null:e&&"key"in e?(0,n.jsx)(eC,{configKey:e.key,looks:e.looks,set:s,refused:r}):"done"===t?e&&"says"in e&&i?(0,n.jsx)(eS,{href:i,children:e.does??eA(i)}):null:e?"open"in e?(0,n.jsx)(eS,{href:e.open,children:e.label}):"manifest"in e?(0,n.jsx)(eM,{}):i?(0,n.jsxs)("div",{className:"space-y-2.5",children:[(0,n.jsx)(eN,{link:i,says:e.says,does:e.does}),a]}):a||null:a||null}function eN({link:e,says:t,does:s}){let{size:r,data:i}=function(e){let{ecc:t="L",boostEcc:n=!1,minVersion:s=1,maxVersion:r=40,maskPattern:i=-1,border:o=1}={},a="string"==typeof e?function(e){var t,n;if(""===e)return[];if(t=e,D.test(t))return[function(e){var t;if(t=e,!D.test(t))throw RangeError("String contains non-numeric characters");let n=[];for(let t=0;t<e.length;){let s=Math.min(e.length-t,3);V(Number.parseInt(e.substring(t,t+s),10),3*s+1,n),t+=s}return new X(Z,e.length,n)}(e)];return(n=e,H.test(n))?[function(e){var t;let n;if(t=e,!H.test(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let s=[];for(n=0;n+2<=e.length;n+=2){let t=45*U.indexOf(e.charAt(n));V(t+=U.indexOf(e.charAt(n+1)),11,s)}return n<e.length&&V(U.indexOf(e.charAt(n)),6,s),new X(J,e.length,s)}(e)]:[en(function(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!==e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}(e))]}(e):Array.isArray(e)?[en(e)]:void 0;if(!a)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=function(e,t,n=1,s=40,r=-1,i=!0){let o,a;if(!(1<=n&&n<=s&&s<=40)||r<-1||r>7)throw RangeError("Invalid value");for(o=n;;o++){let n=8*er(o,t),r=function(e,t){let n=0;for(let s of e){let e=et(s.mode,t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}(e,o);if(r<=n){a=r;break}if(o>=s)throw RangeError("Data too long")}for(let e of[B,O,L])i&&a<=8*er(o,e)&&(t=e);let l=[];for(let t of e)for(let e of(V(t.mode[0],4,l),V(t.numChars,et(t.mode,o),l),t.getData()))l.push(e);let d=8*er(o,t);V(0,Math.min(4,d-l.length),l),V(0,(8-l.length%8)%8,l);for(let e=236;l.length<d;e^=253)V(e,8,l);let c=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((e,t)=>c[t>>>3]|=e<<7-(7&t)),new W(o,t,c,r)}(a,q[t],s,r,i,n);return function(e,t=1){if(!t)return e;let{size:n}=e,s=n+2*t;e.size=s,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:s},e=>!1)),e.data.push(Array.from({length:s},e=>!1));let r=$.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(r),e.push(r)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:s},e=>r)),e.types.push(Array.from({length:s},e=>r));return e}({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},o)}(e),o=eA(e);return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,n.jsx)("div",{className:"rounded-lg bg-white p-2.5",children:(0,n.jsx)("svg",{viewBox:`0 0 ${r} ${r}`,className:"block size-31 text-black",role:"img","aria-label":`A picture of ${o} for a phone camera`,children:i.flatMap((e,t)=>e.map((e,s)=>e?(0,n.jsx)("rect",{x:s,y:t,width:1,height:1,fill:"currentColor"},`${s}-${t}`):null))})}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-muted-foreground",children:t}),(0,n.jsx)(eS,{href:e,children:s??o})]})]})}let eA=e=>e.replace(/^https:\/\//,"");function eS({href:e,children:t}){return(0,n.jsxs)("a",{href:e,target:"_blank",rel:"noreferrer",className:(0,eu.cn)((0,k.buttonVariants)({variant:"outline",size:"sm"})),children:[(0,n.jsx)(_.ExternalLink,{}),t]})}function eC({configKey:e,looks:t,set:s,refused:r}){let[i,o]=(0,p.useState)(""),[a,l]=(0,p.useState)(!1),d=()=>{o(""),l(!1),(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.reach)},[c,u]=(0,ed.useServerAction)(P.setConfigAction,{onOk:d}),[h,f]=(0,ed.useServerAction)(F,{onOk:d}),m=async()=>{await j.notify.confirm({title:"Remove this token?",description:"That service stops, and whoever is let in is let go.",okText:"Remove",destructive:!0})&&h(e)};return s&&!a&&null===r?(0,n.jsx)(k.Button,{size:"xs",variant:"ghost",onClick:()=>l(!0),className:"-ml-2 text-muted-foreground",children:"Change the token"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("form",{className:"flex flex-wrap items-center gap-2",onSubmit:t=>{t.preventDefault(),c(e,i)},children:[(0,n.jsx)(v.Input,{value:i,onChange:e=>o(e.target.value),placeholder:t,"aria-label":"Token",type:"password",autoComplete:"off",spellCheck:!1,className:"w-72 font-mono"}),(0,n.jsx)(k.Button,{type:"submit",size:"sm",loading:u,disabled:i.trim().length<A.KEY_MIN,children:s?"Replace":"Save"}),s&&(0,n.jsxs)(n.Fragment,{children:[null===r&&(0,n.jsx)(k.Button,{size:"sm",variant:"ghost",onClick:()=>l(!1),children:"Cancel"}),(0,n.jsx)(k.Button,{size:"sm",variant:"ghost",loading:f,onClick:()=>void m(),className:"ml-auto text-destructive hover:text-destructive",children:"Remove"})]})]}),r&&(0,n.jsx)("p",{className:"max-w-xl text-destructive",children:r})]})}function eM(){let[e,t]=(0,p.useState)(!1);return(0,n.jsxs)(k.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(eg).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}),children:[e?(0,n.jsx)(a.Check,{}):(0,n.jsx)(K.Copy,{}),e?"Copied":"Copy the manifest"]})}function ez({name:e,who:t,stopped:s}){let[r,i]=(0,ed.useServerAction)(eh,{onOk:()=>(0,ec.revalidate)(y.queryKey.reach)});return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-3 pl-8 text-[13px] text-muted-foreground",children:[(0,n.jsx)("span",{children:s?`${t} is let in.`:`${t} can write from a phone.`}),(0,n.jsx)(k.Button,{size:"sm",variant:"outline",loading:i,onClick:async()=>{await j.notify.confirm({title:`Let ${t} go?`,description:"Nobody can write to Thursday through this service until someone is let in again.",okText:"Let them go",destructive:!0})&&r(e)},children:"Let them go"})]})}let eE={[T.EXA_API_KEY]:g.Search},eR={image:f.Image,video:u,speech:i.AudioLines,transcription:o.Captions},eI={keys:["voice","easy","text","search"],models:["bots","studio"]};function eF({screen:e}){let{data:t,isLoading:s,error:r}=(0,ec.useServerRoute)(y.queryKey.config);if(s)return(0,n.jsx)(el.SettingSkeleton,{rows:4});if(r)return(0,n.jsx)(el.SettingError,{message:r.message});let i=e=>(0,T.isConfigSet)(t,e),o=e=>t?.find(t=>t.key===e)?.value,a=eI[e].flatMap(e=>T.CONFIG_GROUPS.find(t=>t.id===e)??[]),l=a.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":`${l.filter(e=>i(e.key)).length} of ${l.length} set${a.some(e=>!(0,T.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:a.map(e=>(0,n.jsx)(el.SettingGroup,{label:e.title,hint:e.hint,right:(0,n.jsx)(eT,{group:e,isSet:i}),children:"easy"===e.id?(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,n.jsx)(eK,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,n.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,n.jsx)(eP,{entry:e,set:i(e.key)},e.key))}):(0,n.jsx)(el.SettingItems,{children:e.entries.map(t=>t.effortOf?null:t.choices?(0,n.jsx)(eU,{entry:t,choices:t.choices,value:o(t.key),effort:eG(e,t.key),effortValue:o(T.DEFAULT_EFFORT_KEY)},t.key):(0,n.jsx)(eK,{entry:t,set:i(t.key),needed:!(0,T.groupSatisfied)(e,i)},t.key))})},e.id))})}function eP({entry:e,set:t}){return(0,n.jsxs)("button",{type:"button",onClick:()=>eW(e,t),"aria-label":`${e.label}: ${t?"set":"not set"}`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,n.jsx)(eH,{entry:e}),t&&(0,n.jsx)("span",{className:"absolute -top-1 -right-1 grid size-4 place-items-center rounded-full bg-primary text-primary-foreground ring-2 ring-background",children:(0,n.jsx)(a.Check,{className:"size-2.5"})})]}),(0,n.jsx)("span",{className:(0,eu.cn)("max-w-full truncate text-[11px]",t?"text-foreground":"text-muted-foreground"),children:e.label})]})}function eT({group:e,isSet:t}){return"none"===e.require?null:(0,T.groupSatisfied)(e,t)?(0,n.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,n.jsx)(a.Check,{className:"size-3"}),"ready"]}):(0,n.jsxs)("span",{className:(0,eu.cn)("flex items-center gap-1 font-mono text-[11px]",eu.WAITING_INK),children:[(0,n.jsx)(x.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function eK({entry:e,set:t,needed:s,card:r=!1,narrow:i=!1}){let o=eB(e,t),d=eL(e,t),c=eO(e,t),u=d.data?eq(d.data):e$(t,s,o.data,e.signIn),h=o.isLoading||d.isLoading,f=(0,n.jsxs)("span",{className:(0,eu.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",u.ink),children:[u.warn?(0,n.jsx)(x.TriangleAlert,{className:"size-3"}):t&&(0,n.jsx)(a.Check,{className:"size-3"}),u.text]});return(0,n.jsxs)("button",{type:"button",onClick:()=>{var s;return e.signIn?(s=e,j.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,n.jsx)(eY,{entry:s,onDone:e})})):eW(e,t)},className:(0,eu.cn)("group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",r&&"rounded-xl border border-border/60"),children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(eH,{entry:e})}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,n.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,n.jsx)("span",{className:"rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:"recommended"})]}),i?h?(0,n.jsx)(N.Skeleton,{className:"h-3 w-20"}):f:(0,n.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?t?eD(d.data,c):"sign in with your account":e.key})]}),i?null:h?(0,n.jsx)(N.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,n.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let e_=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function e$(e,t,n,s){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${e_.format(n.balance)} left`,ink:n.low?eu.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:s?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:eu.WAITING_INK,warn:!0}:{text:s?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function eB(e,t){return(0,ec.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?y.queryKey.gatewayCredits:null)}function eO(e,t){let{data:n}=(0,ec.useServerRoute)(t&&e.signIn?y.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function eL(e,t){return(0,ec.useServerRoute)(t&&e.signIn?y.queryKey.subscriptionUsage:null)}function eq(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?eu.WAITING_INK:"text-muted-foreground",warn:e.high}}function eD(e,t){let n=!e||"refused"in e?null:e,r=`${n?.plan??t??"unknown"} plan`;return n?.resetsAt?`${r} \xb7 resets in ${(0,s.formatDistanceToNowStrict)(new Date(n.resetsAt))}`:r}function eH({entry:e}){if(e.provider)return(0,n.jsx)(z.ProviderIcon,{provider:e.provider,className:"size-4"});let t=eE[e.key]??m.KeyRound,s=(0,n.jsx)(t,{className:"size-4 text-muted-foreground"});return e.site?(0,n.jsx)(w.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:s}):s}function eU({entry:e,choices:t,value:s,effort:r,effortValue:i}){let o=e.text?(0,E.parseTextModel)(s):(0,E.parseMediaModel)(s),{data:a}=(0,ec.useServerRoute)(e.text&&!s&&y.queryKey.automaticModel),l=e.kind?eR[e.kind]:R.BotsMark,[d]=(0,ed.useServerAction)(P.setConfigAction,{onOk:()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.automaticModel)}}),[c]=(0,ed.useServerAction)(F,{onOk:()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.automaticModel)}});return(0,n.jsxs)("div",{className:"flex w-full items-start gap-3 p-4",children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(l,{className:"size-4 text-muted-foreground"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 pt-1.5",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),!s&&(0,n.jsx)("span",{className:(0,eu.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?eu.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("div",{className:"min-w-0",children:(0,n.jsx)(M.ModelPicker,{kind:e.kind,provider:o?.provider??null,model:o?.model??"",unset:e.kind?"Not offered to bots until you pick one":function(e,t){if(!e)return"Automatic";if(!e.ref)return e.problem;let{provider:n,model:s}=e.ref,r=t.find(e=>e.value===`${n}/${s}`);return`Automatic \xb7 ${r?.label??s}`}(a,t),onChange:t=>d(e.key,`${t.provider}/${t.model.trim()}`),onUnset:s?()=>{c(e.key),r&&i&&c(r.key)}:void 0})}),r&&o&&(0,n.jsxs)("div",{className:"flex items-start gap-3 pt-0.5",children:[(0,n.jsx)("span",{className:"w-12 shrink-0 pt-1.5 font-mono text-[11px] text-muted-foreground",children:"effort"}),(0,n.jsx)(C.EffortSwitch,{provider:o.provider,model:o.model,value:E.effortSchema.safeParse(i).data??null,onChange:e=>e?d(r.key,e):c(r.key)})]})]})]})]})}let eG=(e,t)=>e.entries.find(e=>e.effortOf===t);function eY({entry:e,onDone:t}){let{data:s}=(0,ec.useServerRoute)(y.queryKey.config),r=(0,T.isConfigSet)(s,e.key),i=eO(e,r),o=eL(e,r),a=o.data?eq(o.data):null,[l,d]=(0,ed.useServerAction)(F,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.llmModel),t()}});return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:r?(0,n.jsxs)(n.Fragment,{children:["Signed in ·"," ",(0,n.jsx)("span",{className:"font-mono",children:eD(o.data,i)}),a&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",a.ink),children:a.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(k.Button,{variant:"ghost",loading:d,onClick:async()=>{await j.notify.confirm({title:`Sign out of ${e.label}?`,description:"Nothing runs on your plan until you sign in again.",okText:"Sign out",destructive:!0})&&l(e.key)},children:"Sign out"}),(0,n.jsx)(k.Button,{variant:"ghost",onClick:t,children:r?"Close":"Cancel"}),!r&&(0,n.jsx)(S.ChatGptSignIn,{})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingNote,{children:r?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),o.data&&"refused"in o.data&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:o.data.refused})]})})}function eW(e,t){return j.notify.component({className:"sm:max-w-md",renderer:({close:s})=>(0,n.jsx)(eV,{entry:e,set:t,onDone:s})})}function eV({entry:e,set:t,onDone:s}){let[i,o]=(0,p.useState)(""),{data:a}=eB(e,t),l=a?e$(t,!1,a):null,d=()=>{(0,ec.revalidate)(y.queryKey.config),(0,ec.revalidate)(y.queryKey.llmModel)},[c,u]=(0,ed.useServerAction)(P.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{d(),s()}}),[h,f]=(0,ed.useServerAction)(F,{okMessage:`${e.label} key removed`,onOk:()=>{d(),s()}}),m=async()=>{await j.notify.confirm({title:`Remove the ${e.label} key?`,description:"It is deleted from this computer, and nothing runs on it until a key is pasted again.",okText:"Remove",destructive:!0})&&h(e.key)};return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,n.jsxs)(n.Fragment,{children:[" · ",e.hint]}),l&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",l.ink),children:l.text})]})]}),footer:(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(k.Button,{variant:"ghost",loading:f,onClick:()=>void m(),className:"mr-auto text-destructive hover:text-destructive",children:"Remove"}),(0,n.jsx)(k.Button,{variant:"ghost",onClick:s,children:"Cancel"}),(0,n.jsx)(k.Button,{loading:u,disabled:i.trim().length<A.KEY_MIN,onClick:()=>c(e.key,i),children:t?"Replace":"Save"})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(v.Input,{value:i,onChange:e=>o(e.target.value),onKeyDown:t=>{"Enter"===t.key&&i.trim().length>=A.KEY_MIN&&c(e.key,i)},placeholder:t?"New value — replaces the current key":e.keyLooks??"Paste the key",spellCheck:!1,type:"password",autoFocus:!0}),!t&&e.keysAt&&(0,n.jsxs)("a",{href:e.keysAt,target:"_blank",rel:"noreferrer",className:"flex w-fit items-center gap-1 px-0.5 text-[13px] text-foreground underline underline-offset-3 hover:text-foreground/80",children:["Get a key at ",new URL(e.keysAt).host,(0,n.jsx)(r.ArrowUpRight,{className:"size-3.5"})]}),a&&"refused"in a&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:a.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:t}=(0,ec.useServerRoute)(y.queryKey.config),s=e=>(0,T.isConfigSet)(t,e),r=e=>T.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,o]=(0,p.useState)(!1),a=r("voice"),l=[...a,...r("text")],d=l.filter((t,n)=>(n<4||s(t.key))&&!(e&&a.includes(t))),c=l.filter(t=>!d.includes(t)&&!(e&&a.includes(t)));return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)("div",{className:"flex flex-col gap-2",children:r("easy").map(e=>(0,n.jsx)(eK,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[d.map(e=>(0,n.jsx)(eP,{entry:e,set:s(e.key)},e.key)),c.length>0&&(0,n.jsxs)(b.Popover,{open:i,onOpenChange:o,children:[(0,n.jsxs)(b.PopoverTrigger,{"aria-label":`${c.length} more providers`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)("span",{className:"grid size-10.5 place-items-center rounded-[13px] bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,n.jsx)(h.default,{className:"size-4"})}),(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,n.jsx)(b.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>o(!1),children:c.map(e=>(0,n.jsx)(eP,{entry:e,set:s(e.key)},e.key))})]})]}),r("search").map(e=>(0,n.jsx)(eK,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,n.jsx)(eF,{screen:"keys"}),"ModelsSetting",0,()=>(0,n.jsx)(eF,{screen:"models"}),"PhoneSetting",0,()=>(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"Nothing on this computer is opened to the internet: the app asks the chat service what was written."}),children:(0,n.jsx)(ey,{})})],805995)}]);
|