thursday-agent 0.1.0 → 0.1.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/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- 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.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/artifact/[...path]/page/server-reference-manifest.json +1 -1
- 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/page/server-reference-manifest.json +41 -41
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__01id-v3._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dfwvr4._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0ng1y5l._.js → [root-of-the-server]__185grso._.js} +2 -2
- package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
- package/.next/server/chunks/ssr/_0ay6b01._.js +1 -1
- package/.next/server/chunks/ssr/{_1lz4t71._.js → _0j4v8of._.js} +2 -2
- package/.next/server/chunks/ssr/{_061oc5l._.js → _0l81bzy._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-pwe74._.js → _0lc_7c8._.js} +2 -2
- package/.next/server/chunks/ssr/_0nso8tp._.js +3 -0
- package/.next/server/chunks/ssr/{_06l25rd._.js → _0q_2f2x._.js} +2 -2
- package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
- package/.next/server/chunks/ssr/{_0c2y8ks._.js → _10uvw3l._.js} +2 -2
- package/.next/server/chunks/ssr/{_1wlc_pv._.js → _19_o9d-._.js} +2 -2
- package/.next/server/chunks/ssr/{_0vbcev4._.js → _1dcxzqe._.js} +2 -2
- package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
- package/.next/server/chunks/ssr/_1jbv7m1._.js +3 -0
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0okab9u._.js → node_modules_00d6675._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0510bcb._.js → node_modules_043-236._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13r64hh._.js → node_modules_06kvvuo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12ilj3x._.js → node_modules_0_fvxnt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n9m8ww._.js → node_modules_0_j7-g4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hfkkak._.js → node_modules_0bue6gy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0o9cu2m._.js → node_modules_0fbw5-u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01-lnjv._.js → node_modules_0ipn1ho._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1i1aztk._.js → node_modules_0ls96je._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18h15oi._.js → node_modules_0xwx4u-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04m323e._.js → node_modules_0y2-av4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wya71n._.js → node_modules_108wd2o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bog3e3._.js → node_modules_13f2md6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cagd-a._.js → node_modules_16i4o_3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ekezwy._.js → node_modules_1_588_4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_126jgz-._.js → node_modules_1d-is1o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20oe6vi._.js → node_modules_1ee8gav._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kc8lu9._.js → node_modules_1hn_sd5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1czzodm._.js → node_modules_1jatz7w._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0eq4z64._.js → node_modules_1k29j1j._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0snv8wz._.js → node_modules_1nhw9qg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06gkc-1._.js → node_modules_1t0y5jt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_14qjnj6._.js → node_modules_1ub40gk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ci9xpq._.js → node_modules_1v0077l._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0egyezs._.js → node_modules_1y8_3vg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0a7_hec._.js → node_modules_20ynonm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0babb8b._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0jiglry._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +42 -42
- package/.next/static/chunks/{0qwvymwynno3x.js → 0yysv1gzin17t.js} +1 -1
- package/.next/static/chunks/{1ti6qqe8rxjc9.js → 1fr5m75pwtyic.js} +1 -1
- package/.next/static/chunks/{2tab0u1fay-lo.js → 1gy3bbv7usnjo.js} +1 -1
- package/.next/static/chunks/{1n1_b0m4z2r2l.js → 1keib_gt066gc.js} +1 -1
- package/.next/static/chunks/{17yxvpmlyxotg.js → 1khakdu_iuedc.js} +1 -1
- package/.next/static/chunks/{3a8ieqoovwtgg.js → 21rk8w7bda-su.js} +1 -1
- package/.next/static/chunks/{3imn63hmy-dvm.js → 247d-r95j8xs0.js} +1 -1
- package/.next/static/chunks/{3v_k5wbdx5z1e.js → 28g42tw8tsvhd.js} +1 -1
- package/.next/static/chunks/{26jl58p1cmfyz.js → 2fq_86jvq9ymq.js} +1 -1
- package/.next/static/chunks/{1ma7gsnw16oor.js → 2ihkf6l2jowo9.js} +3 -3
- package/.next/static/chunks/{16jdhpex5davi.js → 2wngeetfnzxkp.js} +1 -1
- package/.next/static/chunks/{225bcu0dkzwh9.js → 3aquirz5h71da.js} +1 -1
- package/.next/static/chunks/{3ktulatcmvs36.js → 3fqvc0cg-atq_.js} +1 -1
- package/.next/static/chunks/{0t7ve-t64i24a.js → 3p4egvfjxpatb.js} +1 -1
- package/.next/static/chunks/3qe1w1ei-huhl.js +1 -0
- package/.next/static/chunks/{0m28u02ktcwrt.js → 3xxa2j56-f3nm.js} +1 -1
- package/.next/static/chunks/{1n0rxcrn8v33a.js → 3y40riycdip-i.js} +1 -1
- package/.next/static/chunks/{07hfxlyqq92v-.js → 45a6zbtkelph9.js} +1 -1
- package/README.md +24 -1
- package/bin/thursday.mjs +50 -2
- package/package.json +3 -17
- package/.next/server/chunks/ssr/[root-of-the-server]__1d9rffu._.js +0 -3
- package/.next/server/chunks/ssr/_0g7xsms._.js +0 -3
- package/.next/server/chunks/ssr/_0n0wwfo._.js +0 -3
- package/.next/static/chunks/2bd12_uvbr996.js +0 -1
- package/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -219
- package/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- package/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.18.6 +0 -0
- package/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -43
- package/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -219
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.18.6 +0 -0
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -43
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/node_modules/@img/sharp-linux-x64/index.cjs +0 -2
- package/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64-0.35.4.node +0 -0
- package/node_modules/@img/sharp-linux-x64/package.json +0 -47
- package/node_modules/@img/sharp-linuxmusl-x64/index.cjs +0 -2
- package/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64-0.35.4.node +0 -0
- package/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -47
- package/node_modules/@libsql/linux-x64-gnu/index.node +0 -0
- package/node_modules/@libsql/linux-x64-gnu/package.json +0 -36
- package/node_modules/@libsql/linux-x64-musl/index.node +0 -0
- package/node_modules/@libsql/linux-x64-musl/package.json +0 -36
- package/node_modules/libsql/auth.js +0 -22
- package/node_modules/libsql/index.js +0 -441
- package/node_modules/libsql/node_modules/detect-libc/lib/detect-libc.js +0 -279
- package/node_modules/libsql/node_modules/detect-libc/lib/filesystem.js +0 -41
- package/node_modules/libsql/node_modules/detect-libc/lib/process.js +0 -19
- package/node_modules/libsql/node_modules/detect-libc/package.json +0 -40
- package/node_modules/libsql/package.json +0 -90
- package/node_modules/libsql/sqlite-error.js +0 -21
- package/node_modules/sharp/dist/channel.cjs +0 -177
- package/node_modules/sharp/dist/channel.mjs +0 -177
- package/node_modules/sharp/dist/colour.cjs +0 -199
- package/node_modules/sharp/dist/colour.mjs +0 -199
- package/node_modules/sharp/dist/composite.cjs +0 -213
- package/node_modules/sharp/dist/composite.mjs +0 -213
- package/node_modules/sharp/dist/constructor.cjs +0 -511
- package/node_modules/sharp/dist/constructor.mjs +0 -511
- package/node_modules/sharp/dist/index.cjs +0 -25
- package/node_modules/sharp/dist/index.d.cts +0 -1999
- package/node_modules/sharp/dist/index.d.mts +0 -2046
- package/node_modules/sharp/dist/index.mjs +0 -25
- package/node_modules/sharp/dist/input.cjs +0 -819
- package/node_modules/sharp/dist/input.mjs +0 -819
- package/node_modules/sharp/dist/is.cjs +0 -143
- package/node_modules/sharp/dist/is.mjs +0 -143
- package/node_modules/sharp/dist/libvips.cjs +0 -212
- package/node_modules/sharp/dist/libvips.mjs +0 -212
- package/node_modules/sharp/dist/operation.cjs +0 -1002
- package/node_modules/sharp/dist/operation.mjs +0 -1002
- package/node_modules/sharp/dist/output.cjs +0 -1785
- package/node_modules/sharp/dist/output.mjs +0 -1785
- package/node_modules/sharp/dist/resize.cjs +0 -617
- package/node_modules/sharp/dist/resize.mjs +0 -617
- package/node_modules/sharp/dist/sharp.cjs +0 -174
- package/node_modules/sharp/dist/sharp.mjs +0 -174
- package/node_modules/sharp/dist/utility.cjs +0 -301
- package/node_modules/sharp/dist/utility.mjs +0 -301
- package/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/sharp/node_modules/semver/classes/range.js +0 -577
- package/node_modules/sharp/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/sharp/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/sharp/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/sharp/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/sharp/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/major.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/sharp/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/sharp/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/sharp/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/sharp/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/sharp/node_modules/semver/index.js +0 -93
- package/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
- package/node_modules/sharp/node_modules/semver/package.json +0 -78
- package/node_modules/sharp/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/sharp/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/sharp/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/sharp/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/sharp/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/sharp/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/sharp/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/sharp/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/sharp/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/sharp/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/sharp/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/sharp/package.json +0 -227
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → X34BUd9bfdH27ripuwwBm}/_buildManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → X34BUd9bfdH27ripuwwBm}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → X34BUd9bfdH27ripuwwBm}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,507906,e=>{"use strict";var t,n,r,o,a,i,l,s,u=e.i(843476),c=e.i(689664),d=e.i(779266),f=e.i(77071),m=e.i(759659),p=e.i(747925),h=e.i(263676),v=e.i(271645),g=e.i(798120),b=e.i(167881),x=/[\\\/_+.#"@\[\(\{&]/,y=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,w=/[\s-]/g;function S(e){return e.toLowerCase().replace(w," ")}var k=Object.defineProperty,j=(e,t)=>k(e,"name",{value:t,configurable:!0}),N=!!("u">typeof window&&window.document&&window.document.createElement);function C(e,t,{checkForDefaultPrevented:n=!0}={}){return j(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function R(e){if(!N)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function O(e){return"IFRAME"===e.tagName}j(C,"composeEventHandlers"),j(function(e){if(!N)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),j(R,"getOwnerDocument"),j(function e(t,n=!1){let{activeElement:r}=R(t);if(!r?.nodeName)return null;if(O(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=R(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),j(O,"isFrame");var P=Object.defineProperty,A=(e,t)=>P(e,"name",{value:t,configurable:!0});function M(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function D(...e){return t=>{let n=!1,r=e.map(e=>{let r=M(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():M(e[t],null)}}}}function I(...e){return v.useCallback(D(...e),e)}A(M,"setRef"),A(D,"composeRefs"),A(I,"useComposedRefs");var T=Object.defineProperty,L=(e,t)=>T(e,"name",{value:t,configurable:!0});function _(e,t=[]){let n=[];function r(t,r){let o=v.createContext(r);o.displayName=t+"Context";let a=n.length;n=[...n,r];let i=L(t=>{let{scope:n,children:r,...i}=t,l=n?.[e]?.[a]||o,s=v.useMemo(()=>i,Object.values(i));return(0,u.jsx)(l.Provider,{value:s,children:r})},"Provider");function l(n,i,s={}){let{optional:u=!1}=s,c=i?.[e]?.[a]||o,d=v.useContext(c);if(d)return d;if(void 0!==r)return r;if(!u)throw Error(`\`${n}\` must be used within \`${t}\``)}return i.displayName=t+"Provider",L(l,"useContext"),[i,l]}L(r,"createContext");let o=L(()=>{let t=n.map(e=>v.createContext(e));return L(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},"useScope")},"createScope");return o.scopeName=e,[r,F(o,...t)]}function F(...e){let t=e[0];if(1===e.length)return t;let n=L(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return L(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}L(function(e,t){let n=v.createContext(t);n.displayName=e+"Context";let r=L(e=>{let{children:t,...r}=e,o=v.useMemo(()=>r,Object.values(r));return(0,u.jsx)(n.Provider,{value:o,children:t})},"Provider");function o(r,a={}){let{optional:i=!1}=a,l=v.useContext(n);if(l)return l;if(void 0!==t)return t;if(!i)throw Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",L(o,"useContext"),[r,o]},"createContext"),L(_,"createContextScope"),L(F,"composeContextScopes");var B=globalThis?.document?v.useLayoutEffect:()=>{},$=Object.defineProperty,z=v[" useId ".trim().toString()]||(()=>void 0),W=0;function K(e){let[t,n]=v.useState(z());return B(()=>{e||n(e=>e??String(W++))},[e]),e||(t?`radix-${t}`:"")}$(K,"name",{value:"useId",configurable:!0});var U=Object.defineProperty,V=v[" useEffectEvent ".trim().toString()],q=v[" useInsertionEffect ".trim().toString()];function H(e){if("function"==typeof V)return V(e);let t=v.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof q?q(()=>{t.current=e}):B(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}U(H,"name",{value:"useEffectEvent",configurable:!0});var X=Object.defineProperty,Y=(e,t)=>X(e,"name",{value:t,configurable:!0}),G=v[" useInsertionEffect ".trim().toString()]||B;function Z({prop:e,defaultProp:t,onChange:n=Y(()=>{},"onChange"),caller:r}){let[o,a,i]=J({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:o;return[s,v.useCallback(t=>{if(l){let n=Q(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[l,e,a,i])]}function J({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),o=v.useRef(n),a=v.useRef(t);return G(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Q(e){return"function"==typeof e}Y(Z,"useControllableState"),Y(J,"useUncontrolledState"),Y(Q,"isFunction");var ee=Symbol("RADIX:SYNC_STATE");Y(function(e,t,n,r){let{prop:o,defaultProp:a,onChange:i,caller:l}=t,s=void 0!==o,u=H(i),c=[{...n,state:a}];r&&c.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===ee)return{...t,state:n.state};let r=e(t,n);return s&&!Object.is(r.state,t.state)&&u(r.state),r},...c),m=d.state,p=v.useRef(m);v.useEffect(()=>{p.current!==m&&(p.current=m,s||u(m))},[m,p,s]);let h=v.useMemo(()=>void 0!==o?{...d,state:o}:d,[d,o]);return v.useEffect(()=>{s&&!Object.is(o,d.state)&&f({type:ee,state:o})},[o,d.state,s]),[h,f]},"useControllableStateReducer");var et=e.i(174080),en=Object.defineProperty,er=(e,t)=>en(e,"name",{value:t,configurable:!0});function eo(e){let t=v.forwardRef((t,n)=>{let{children:r,...o}=t,a=null,i=!1,l=[];ed(r)&&"function"==typeof eh&&(r=eh(r._payload)),v.Children.forEach(r,e=>{if(eu(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;ed(t)&&"function"==typeof eh&&(t=eh(t._payload)),a=ei(e,t),l.push(a?.props?.children)}else l.push(e)}),a?a=v.cloneElement(a,void 0,l):!i&&1===v.Children.count(r)&&v.isValidElement(r)&&(a=r);let s=a?es(a):void 0,u=I(n,s);if(!a){if(r||0===r)throw Error(i?ep(e):em(e));return r}let c=el(o,a.props??{});return a.type!==v.Fragment&&(c.ref=n?u:s),v.cloneElement(a,c)});return t.displayName=`${e}.Slot`,t}er(eo,"createSlot");var ea=Symbol.for("radix.slottable");er(function(e){let t=er(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ea,t},"createSlottable");var ei=er((e,t)=>{if("child"in e.props){let t=e.props.child;return v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null}return v.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function el(e,t){let n={...t};for(let r in t){let o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{let t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function es(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}function eu(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ea}er(el,"mergeProps"),er(es,"getElementRef"),er(eu,"isSlottable");var ec=Symbol.for("react.lazy");function ed(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ec&&"_payload"in e&&ef(e._payload)}function ef(e){return"object"==typeof e&&null!==e&&"then"in e}er(ed,"isLazyComponent"),er(ef,"isPromiseLike");var em=er(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ep=er(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),eh=v[" use ".trim().toString()],ev=Object.defineProperty,eg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=eo(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:o,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,u.jsx)(o?n:t,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eb(e,t){e&&et.flushSync(()=>e.dispatchEvent(t))}function ex(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}ev(eb,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(ex,"name",{value:"useCallbackRef",configurable:!0});var ey=Object.defineProperty,eE=(e,t)=>ey(e,"name",{value:t,configurable:!0}),ew="dismissableLayer.update",eS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ek=v.forwardRef(eE(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...d}=e,f=v.useContext(eS),[m,p]=v.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=v.useState({}),b=I(t,p),x=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=y?x.indexOf(y):-1,w=m?x.indexOf(m):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=E,j=v.useRef(!1),N=eC(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:j,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return k&&!t},[f.branches,k])}),R=eR(e=>{if(r&&j.current)return;let t=e.target;![...f.branches].some(e=>e.contains(t))&&(i?.(e),s?.(e),e.defaultPrevented||c?.())},h),O=!!m&&w===x.length-1,P=ex(e=>{"Escape"===e.key&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(O)return h.addEventListener("keydown",P,{capture:!0}),()=>h.removeEventListener("keydown",P,{capture:!0})},[h,O,P]),v.useEffect(()=>{if(m)return n&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(l=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),eO(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(m),0===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=l))}},[m,h,n,f]),v.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),eO())},[m,f]),v.useEffect(()=>{let e=eE(()=>g({}),"handleUpdate");return document.addEventListener(ew,e),()=>document.removeEventListener(ew,e)},[]),(0,u.jsx)(eg.div,{...d,ref:b,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:C(e.onFocusCapture,R.onFocusCapture),onBlurCapture:C(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:C(e.onPointerDownCapture,N.onPointerDownCapture)})},"DismissableLayer"));function ej(){let e=v.useContext(eS),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}eE(ej,"useDismissableLayerSurface");var eN=eE(()=>!0,"IS_TRUE");function eC(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a,shouldHandlePointerDownOutside:i=eN}=t,l=ex(e),s=v.useRef(!1),u=v.useRef(!1),c=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){u.current=!1,o.current=!1,c.current.clear()}function t(){return Array.from(c.current.values()).some(Boolean)}function f(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||c.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{u.current&&d.current()},0)}function m(e){u.current&&c.current.set(e.type,!1)}eE(e,"resetOutsideInteraction"),eE(t,"isOutsideInteractionIntercepted"),eE(f,"handleInteractionCapture"),eE(m,"handleInteractionBubble");let p=eE(a=>{if(a.target&&!s.current){let f=function(){n.removeEventListener("click",d.current);let r=t();e(),r||eP("dismissableLayer.pointerDownOutside",l,m,{discrete:!0})};if(eE(f,"handleAndDispatchPointerDownOutsideEvent"),!i(a.target)){n.removeEventListener("click",d.current),e(),s.current=!1;return}let m={originalEvent:a};u.current=!0,o.current=r&&0===a.button,c.current.clear(),r&&0===a.button?(n.removeEventListener("click",d.current),d.current=f,n.addEventListener("click",d.current,{once:!0})):f()}else n.removeEventListener("click",d.current),e();s.current=!1},"handlePointerDown"),h=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,m);let v=window.setTimeout(()=>{n.addEventListener("pointerdown",p)},0);return()=>{for(let e of(window.clearTimeout(v),n.removeEventListener("pointerdown",p),n.removeEventListener("click",d.current),h))n.removeEventListener(e,f,!0),n.removeEventListener(e,m)}},[n,l,r,o,a,i]),{onPointerDownCapture:eE(()=>s.current=!0,"onPointerDownCapture")}}function eR(e,t=globalThis?.document){let n=ex(e),r=v.useRef(!1);return v.useEffect(()=>{let e=eE(e=>{e.target&&!r.current&&eP("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:eE(()=>r.current=!0,"onFocusCapture"),onBlurCapture:eE(()=>r.current=!1,"onBlurCapture")}}function eO(){let e=new CustomEvent(ew);document.dispatchEvent(e)}function eP(e,t,n,{discrete:r}){let o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?eb(o,a):o.dispatchEvent(a)}eE(eC,"usePointerDownOutside"),eE(eR,"useFocusOutside"),eE(eO,"dispatchUpdate"),eE(eP,"handleAndDispatchCustomEvent");var eA=Object.defineProperty,eM=(e,t)=>eA(e,"name",{value:t,configurable:!0}),eD="focusScope.autoFocusOnMount",eI="focusScope.autoFocusOnUnmount",eT={bubbles:!1,cancelable:!0},eL=v.forwardRef(eM(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=v.useState(null),c=ex(o),d=ex(a),f=v.useRef(null),m=I(t,s),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?f.current=t:eK(f.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||eK(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&eK(l)};eM(e,"handleFocusIn"),eM(t,"handleFocusOut"),eM(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){eU.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(eD,eT);l.addEventListener(eD,c),l.dispatchEvent(t),t.defaultPrevented||(e_(eH(eB(l)),{select:!0}),document.activeElement===e&&eK(l))}return()=>{l.removeEventListener(eD,c),setTimeout(()=>{let t=new CustomEvent(eI,eT);l.addEventListener(eI,d),l.dispatchEvent(t),t.defaultPrevented||eK(e??document.body,{select:!0}),l.removeEventListener(eI,d),eU.remove(p)},0)}}},[l,c,d,p]);let h=v.useCallback(e=>{if(!n&&!r||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,a]=eF(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&eK(a,{select:!0})):(e.preventDefault(),n&&eK(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return(0,u.jsx)(eg.div,{tabIndex:-1,...i,ref:m,onKeyDown:h})},"FocusScope"));function e_(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eK(r,{select:t}),document.activeElement!==n)return}function eF(e){let t=eB(e);return[e$(t,e),e$(t.reverse(),e)]}function eB(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:eM(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function e$(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ez(r,{upTo:t})))return r}function ez(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function eW(e){return e instanceof HTMLInputElement&&"select"in e}function eK(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eW(e)&&t&&e.select()}}eM(e_,"focusFirst"),eM(eF,"getTabbableEdges"),eM(eB,"getTabbableCandidates"),eM(e$,"findVisible"),eM(ez,"isHidden"),eM(eW,"isSelectableInput"),eM(eK,"focus");var eU=eV();function eV(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=eq(e,t)).unshift(t)},remove(t){e=eq(e,t),e[0]?.resume()}}}function eq(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function eH(e){return e.filter(e=>"A"!==e.tagName)}eM(eV,"createFocusScopesStack"),eM(eq,"arrayRemove"),eM(eH,"removeLinks");var eX=Object.defineProperty,eY=v.forwardRef(eX(function(e,t){let{container:n,...r}=e,[o,a]=v.useState(!1);B(()=>a(!0),[]);let i=n||o&&globalThis?.document?.body;return i?et.createPortal((0,u.jsx)(eg.div,{...r,ref:t}),i):null},"name",{value:"Portal",configurable:!0})),eG=Object.defineProperty,eZ=(e,t)=>eG(e,"name",{value:t,configurable:!0});function eJ(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}eZ(eJ,"useStateMachine");var eQ=eZ(e=>{let{present:t,children:n}=e,r=e0(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=e2(r.ref,e3(o));return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null},"Presence");function e0(e){let[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=v.useRef(void 0),[l,s]=eJ(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{"mounted"===l?(a.current=i.current??e5(r.current),i.current=void 0):a.current="none"},[l]),B(()=>{let t=r.current,n=o.current;if(n!==e){let r=a.current,l=e5(t);e?(i.current=l,s("MOUNT")):"none"===l||t?.display==="none"?s("UNMOUNT"):n&&r!==l?s("ANIMATION_OUT"):s("UNMOUNT"),o.current=e}},[e,s]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=eZ(a=>{let i=e5(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){let r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},"handleAnimationEnd"),l=eZ(e=>{e.target===t&&(a.current=e5(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,i.current=e5(t)}else r.current=null;n(e)},[])}}function e1(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function e2(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,o=n.map(t=>{let n=e1(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<o.length;e++){let t=o[e];"function"==typeof t?t():e1(n[e],null)}}},[])}function e5(e){return e?.animationName||"none"}function e3(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}eZ(e0,"usePresence"),eZ(e1,"setRef"),eZ(e2,"useStableComposedRefs"),eZ(e5,"getAnimationName"),eZ(e3,"getElementRef");var e6=Object.defineProperty,e9=(e,t)=>e6(e,"name",{value:t,configurable:!0}),e4=0,e7=null;function e8(){v.useEffect(()=>{e7||(e7={start:te(),end:te()});let{start:e,end:t}=e7;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),e4++,()=>{1===e4&&(e7?.start.remove(),e7?.end.remove(),e7=null),e4=Math.max(0,e4-1)}},[])}function te(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e9(function(e){return e8(),e.children},"FocusGuards"),e9(e8,"useFocusGuards"),e9(te,"createFocusGuard");var tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var tr=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),to="width-before-scroll-bar";function ta(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ti="u">typeof window?v.useLayoutEffect:v.useEffect,tl=new WeakMap,ts=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,a={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}}).options=tt({async:!0,ssr:!1},t),a),tu=function(){},tc=v.forwardRef(function(e,t){var n,r,o,a,i=v.useRef(null),l=v.useState({onScrollCapture:tu,onWheelCapture:tu,onTouchMoveCapture:tu}),s=l[0],u=l[1],c=e.forwardProps,d=e.children,f=e.className,m=e.removeScrollBar,p=e.enabled,h=e.shards,g=e.sideCar,b=e.noRelative,x=e.noIsolation,y=e.inert,E=e.allowPinchZoom,w=e.as,S=e.gapMode,k=tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=(n=[i,t],r=function(e){return n.forEach(function(t){return ta(t,e)})},(o=(0,v.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,a=o.facade,ti(function(){var e=tl.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||ta(e,null)}),r.forEach(function(e){t.has(e)||ta(e,o)})}tl.set(a,n)},[n]),a),N=tt(tt({},k),s);return v.createElement(v.Fragment,null,p&&v.createElement(g,{sideCar:ts,removeScrollBar:m,shards:h,noRelative:b,noIsolation:x,inert:y,setCallbacks:u,allowPinchZoom:!!E,lockRef:i,gapMode:S}),c?v.cloneElement(v.Children.only(d),tt(tt({},N),{ref:j})):v.createElement(void 0===w?"div":w,tt({},N,{className:f,ref:j}),d))});tc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tc.classNames={fullWidth:to,zeroRight:tr};var td=function(e){var t=e.sideCar,n=tn(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return v.createElement(r,tt({},n))};td.isSideCarExport=!0;var tf=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tm=function(){var e=tf();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tp=function(){var e=tm();return function(t){return e(t.styles,t.dynamic),null}},th={left:0,top:0,right:0,gap:0},tv=function(e){return parseInt(e||"",10)||0},tg=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[tv(n),tv(r),tv(o)]},tb=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return th;var t=tg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tx=tp(),ty="data-scroll-locked",tE=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(ty,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tr," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(to," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(tr," .").concat(tr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(to," .").concat(to," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(ty,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},tw=function(){var e=parseInt(document.body.getAttribute(ty)||"0",10);return isFinite(e)?e:0},tS=function(){v.useEffect(function(){return document.body.setAttribute(ty,(tw()+1).toString()),function(){var e=tw()-1;e<=0?document.body.removeAttribute(ty):document.body.setAttribute(ty,e.toString())}},[])},tk=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;tS();var a=v.useMemo(function(){return tb(o)},[o]);return v.createElement(tx,{styles:tE(a,!t,o,n?"":"!important")})},tj=!1;if("u">typeof window)try{var tN=Object.defineProperty({},"passive",{get:function(){return tj=!0,!0}});window.addEventListener("test",tN,tN),window.removeEventListener("test",tN,tN)}catch(e){tj=!1}var tC=!!tj&&{passive:!1},tR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},tO=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tP(e,r)){var o=tA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},tP=function(e,t){return"v"===e?tR(t,"overflowY"):tR(t,"overflowX")},tA=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},tM=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),l=i*r,s=n.target,u=t.contains(s),c=!1,d=l>0,f=0,m=0;do{if(!s)break;var p=tA(e,s),h=p[0],v=p[1]-p[2]-i*h;(h||v)&&tP(e,s)&&(f+=v,m+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(o&&1>Math.abs(f)||!o&&l>f)?c=!0:!d&&(o&&1>Math.abs(m)||!o&&-l>m)&&(c=!0),c},tD=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tI=function(e){return[e.deltaX,e.deltaY]},tT=function(e){return e&&"current"in e?e.current:e},tL=0,t_=[];let tF=(i=function(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(tL++)[0],a=v.useState(tp)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(tT),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=tD(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],u="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),m=f&&f.anchorNode;if(m&&(m===c||m.contains(c)))return!1;var p=tO(d,c);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=tO(d,c)),!p)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return tM(h,t,e,"h"===h?s:u,!0)},[]),s=v.useCallback(function(e){if(t_.length&&t_[t_.length-1]===a){var n="deltaY"in e?tI(e):tD(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(tT).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=v.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=v.useCallback(function(e){n.current=tD(e),r.current=void 0},[]),d=v.useCallback(function(t){u(t.type,tI(t),t.target,l(t,e.lockRef.current))},[]),f=v.useCallback(function(t){u(t.type,tD(t),t.target,l(t,e.lockRef.current))},[]);v.useEffect(function(){return t_.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,tC),document.addEventListener("touchmove",s,tC),document.addEventListener("touchstart",c,tC),function(){t_=t_.filter(function(e){return e!==a}),document.removeEventListener("wheel",s,tC),document.removeEventListener("touchmove",s,tC),document.removeEventListener("touchstart",c,tC)}},[]);var m=e.removeScrollBar,p=e.inert;return v.createElement(v.Fragment,null,p?v.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?v.createElement(tk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},ts.useMedium(i),td);var tB=v.forwardRef(function(e,t){return v.createElement(tc,tt({},e,{ref:t,sideCar:tF}))});tB.classNames=tc.classNames;var t$=new WeakMap,tz=new WeakMap,tW={},tK=0,tU=function(e){return e&&(e.host||tU(e.parentNode))},tV=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tU(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tW[n]||(tW[n]=new WeakMap);var a=tW[n],i=[],l=new Set,s=new Set(o),u=function(e){!e||l.has(e)||(l.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(t$.get(e)||0)+1,u=(a.get(e)||0)+1;t$.set(e,s),a.set(e,u),i.push(e),1===s&&o&&tz.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),tK++,function(){i.forEach(function(e){var t=t$.get(e)-1,o=a.get(e)-1;t$.set(e,t),a.set(e,o),t||(tz.has(e)||e.removeAttribute(r),tz.delete(e)),o||e.removeAttribute(n)}),--tK||(t$=new WeakMap,t$=new WeakMap,tz=new WeakMap,tW={})}},tq=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tV(r,o,n,"aria-hidden")):function(){return null}},tH=Object.defineProperty,tX=(e,t)=>tH(e,"name",{value:t,configurable:!0}),tY="Dialog",[tG,tZ]=_(tY),[tJ,tQ]=tG(tY),t0=tX(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=v.useRef(null),s=v.useRef(null),[c,d]=Z({prop:r,defaultProp:o??!1,onChange:a,caller:tY}),[f,m]=v.useState(0),[p,h]=v.useState(0);return(0,u.jsx)(tJ,{scope:t,triggerRef:l,contentRef:s,contentId:K(),titleId:K(),descriptionId:K(),titlePresent:f>0,descriptionPresent:p>0,setTitleCount:m,setDescriptionCount:h,open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:i,children:n})},"Dialog"),t1="DialogPortal",[t2,t5]=tG(t1,{forceMount:void 0}),t3=tX(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=tQ(t1,t);return(0,u.jsx)(t2,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,u.jsx)(eQ,{present:n||a.open,children:(0,u.jsx)(eY,{asChild:!0,container:o,children:e})}))})},"DialogPortal"),t6="DialogOverlay",t9=v.forwardRef(tX(function(e,t){let n=t5(t6,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tQ(t6,e.__scopeDialog);return a.modal?(0,u.jsx)(eQ,{present:r||a.open,children:(0,u.jsx)(t7,{...o,ref:t})}):null},"DialogOverlay")),t4=eo("DialogOverlay.RemoveScroll"),t7=v.forwardRef(tX(function(e,t){let{__scopeDialog:n,...r}=e,o=tQ(t6,n),a=I(t,ej());return(0,u.jsx)(tB,{as:t4,allowPinchZoom:!0,shards:[o.contentRef],children:(0,u.jsx)(eg.div,{"data-state":no(o.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),t8="DialogContent",ne=v.forwardRef(tX(function(e,t){let n=t5(t8,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tQ(t8,e.__scopeDialog);return(0,u.jsx)(eQ,{present:r||a.open,children:a.modal?(0,u.jsx)(nt,{...o,ref:t}):(0,u.jsx)(nn,{...o,ref:t})})},"DialogContent")),nt=v.forwardRef(tX(function(e,t){let n=tQ(t8,e.__scopeDialog),r=v.useRef(null),o=I(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return tq(e)},[]),(0,u.jsx)(nr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:C(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:C(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),nn=v.forwardRef(tX(function(e,t){let n=tQ(t8,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return(0,u.jsx)(nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})},"DialogContentNonModal")),nr=v.forwardRef(tX(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=tQ(t8,n);return e8(),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(eL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,u.jsx)(ek,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":no(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl"));function no(e){return e?"open":"closed"}tX(no,"getState");var na='[cmdk-group=""]',ni='[cmdk-group-items=""]',nl='[cmdk-item=""]',ns=`${nl}:not([aria-disabled="true"])`,nu="cmdk-item-select",nc="data-value",nd=(e,t,n)=>{var r;return r=e,function e(t,n,r,o,a,i,l){if(i===n.length)return a===t.length?1:.99;var s=`${a},${i}`;if(void 0!==l[s])return l[s];for(var u,c,d,f,m=o.charAt(i),p=r.indexOf(m,a),h=0;p>=0;)(u=e(t,n,r,o,p+1,i+1,l))>h&&(p===a?u*=1:x.test(t.charAt(p-1))?(u*=.8,(d=t.slice(a,p-1).match(y))&&a>0&&(u*=Math.pow(.999,d.length))):E.test(t.charAt(p-1))?(u*=.9,(f=t.slice(a,p-1).match(w))&&a>0&&(u*=Math.pow(.999,f.length))):(u*=.17,a>0&&(u*=Math.pow(.999,p-a))),t.charAt(p)!==n.charAt(i)&&(u*=.9999)),(u<.1&&r.charAt(p-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&r.charAt(p-1)!==o.charAt(i))&&.1*(c=e(t,n,r,o,p+1,i+2,l))>u&&(u=.1*c),u>h&&(h=u),p=r.indexOf(m,p+1);return l[s]=h,h}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,S(r),S(t),0,0,{})},nf=v.createContext(void 0),nm=v.createContext(void 0),np=v.createContext(void 0),nh=v.forwardRef((e,t)=>{let n=nj(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=nj(()=>new Set),o=nj(()=>new Map),a=nj(()=>new Map),i=nj(()=>new Set),l=nS(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:p,disablePointerSelection:h=!1,vimBindings:g=!0,...b}=e,x=K(),y=K(),E=K(),w=v.useRef(null),S=nR();nk(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}},[c]),nk(()=>{S(6,P)},[]);let k=v.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),C(),S(1,R);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(E);e?e.focus():null==(o=document.getElementById(x))||o.focus()}if(S(7,()=>{var e;n.current.selectedItemId=null==(e=A())?void 0:e.id,k.emit()}),r||S(5,P),(null==(a=l.current)?void 0:a.value)!==void 0){null==(s=(i=l.current).onValueChange)||s.call(i,null!=t?t:"");return}}k.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),j=v.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,N(t,r)),S(2,()=>{C(),k.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,()=>{O(),C(),n.current.value||R(),k.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&R(),k.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:E,labelId:y,listInnerRef:w}),[]);function N(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:nd;return e?a(e,n.current.search,t):0}function C(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([n,a])});let r=w.current;M().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(ni);t?t.appendChild(e.parentElement===t?e:e.closest(`${ni} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ni} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=w.current)?void 0:t.querySelector(`${na}[${nc}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function R(){let e=M().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(nc);k.setState("value",t||void 0)}function O(){var e,t,i,s;if(!n.current.search||!1===l.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=N(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function P(){var e,t,n;let r=A();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(na))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=w.current)?void 0:e.querySelector(`${nl}[aria-selected="true"]`)}function M(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(ns))||[])}function D(e){let t=M()[e];t&&k.setState("value",t.getAttribute(nc))}function I(e){var t;let n=A(),r=M(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(nc))}function T(e){let t=A(),n=null==t?void 0:t.closest(na),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,na):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,na))?void 0:n.querySelector(ns);r?k.setState("value",r.getAttribute(nc)):I(e)}let L=()=>D(M().length-1),_=e=>{e.preventDefault(),e.metaKey?L():e.altKey?T(1):I(1)},F=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?T(-1):I(-1)};return v.createElement(eg.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":g&&e.ctrlKey&&_(e);break;case"ArrowDown":_(e);break;case"p":case"k":g&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),L();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(nu);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:nP},s),nO(e,e=>v.createElement(nm.Provider,{value:k},v.createElement(nf.Provider,{value:j},e))))}),nv=v.forwardRef((e,t)=>{var n,r;let o=K(),a=v.useRef(null),i=v.useContext(np),l=v.useContext(nf),s=nS(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;nk(()=>{if(!u)return l.item(o,null==i?void 0:i.id)},[u]);let c=nC(o,a,[e.value,e.children,a],e.keywords),d=v.useContext(nm),f=nN(e=>e.value&&e.value===c.current),m=nN(e=>!!u||!1===l.filter()||!e.search||e.filtered.items.get(o)>0);function p(){var e,t;h(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(v.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(nu,p),()=>t.removeEventListener(nu,p)},[m,e.onSelect,e.disabled]),!m)return null;let{disabled:g,value:b,onSelect:x,forceMount:y,keywords:E,...w}=e;return v.createElement(eg.div,{ref:D(a,t),...w,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.getDisablePointerSelection()?void 0:h,onClick:g?void 0:p},e.children)}),ng=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=K(),l=v.useRef(null),s=v.useRef(null),u=K(),c=v.useContext(nf),d=nN(e=>!!o||!1===c.filter()||!e.search||e.filtered.groups.has(i));nk(()=>c.group(i),[]),nC(i,l,[e.value,e.heading,s]);let f=v.useMemo(()=>({id:i,forceMount:o}),[o]);return v.createElement(eg.div,{ref:D(l,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&v.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),nO(e,e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},v.createElement(np.Provider,{value:f},e))))}),nb=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=v.useRef(null),a=nN(e=>!e.search);return n||a?v.createElement(eg.div,{ref:D(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),nx=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=v.useContext(nm),i=nN(e=>e.search),l=nN(e=>e.selectedItemId),s=v.useContext(nf);return v.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),v.createElement(eg.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),ny=v.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),l=nN(e=>e.selectedItemId),s=v.useContext(nf);return v.useEffect(()=>{if(i.current&&a.current){let e=i.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),v.createElement(eg.div,{ref:D(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:s.listId},nO(e,e=>v.createElement("div",{ref:D(i,s.listInnerRef),"cmdk-list-sizer":""},e)))}),nE=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return v.createElement(t0,{open:n,onOpenChange:r},v.createElement(t3,{container:i},v.createElement(t9,{"cmdk-overlay":"",className:o}),v.createElement(ne,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(nh,{ref:t,...l}))))}),nw=Object.assign(nh,{List:ny,Item:nv,Input:nx,Group:ng,Separator:nb,Dialog:nE,Empty:v.forwardRef((e,t)=>nN(e=>0===e.filtered.count)?v.createElement(eg.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:v.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return v.createElement(eg.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},nO(e,e=>v.createElement("div",{"aria-hidden":!0},e)))})});function nS(e){let t=v.useRef(e);return nk(()=>{t.current=e}),t}var nk="u"<typeof window?v.useEffect:v.useLayoutEffect;function nj(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function nN(e){let t=v.useContext(nm),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function nC(e,t,n,r=[]){let o=v.useRef(),a=v.useContext(nf);return nk(()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=r.map(e=>e.trim());a.value(e,l,s),null==(i=t.current)||i.setAttribute(nc,l),o.current=l}),o}var nR=()=>{let[e,t]=v.useState(),n=nj(()=>new Map);return nk(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function nO({asChild:e,children:t},n){let r;return e&&v.isValidElement(t)?v.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var nP={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},nA=e.i(593698),nM=e.i(630299),nM=nM;e.i(630374);var nD=e.i(225913),nI=e.i(23750),nT=e.i(184762),nL=e.i(647163);function n_({className:e,...t}){return(0,u.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,nL.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}let nF=(0,nD.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function nB({className:e,align:t="inline-start",...n}){return(0,u.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,nL.cn)(nF({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function n$({className:e,...t}){return(0,u.jsx)(nw,{"data-slot":"command",className:(0,nL.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function nz({className:e,...t}){return(0,u.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,u.jsxs)(n_,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,u.jsx)(nw.Input,{"data-slot":"command-input",className:(0,nL.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,u.jsx)(nB,{children:(0,u.jsx)(nM.default,{className:"size-4 shrink-0 opacity-50"})})]})})}function nW({className:e,...t}){return(0,u.jsx)(nw.List,{"data-slot":"command-list",className:(0,nL.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function nK({className:e,...t}){return(0,u.jsx)(nw.Empty,{"data-slot":"command-empty",className:(0,nL.cn)("py-6 text-center text-sm",e),...t})}function nU({className:e,...t}){return(0,u.jsx)(nw.Group,{"data-slot":"command-group",className:(0,nL.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function nV({className:e,children:t,...n}){return(0,u.jsxs)(nw.Item,{"data-slot":"command-item",className:(0,nL.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...n,children:[t,(0,u.jsx)(nA.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}(0,nD.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var nq=e.i(917162),nH=e.i(660302),nX=e.i(161483),nY=e.i(146538),nG=e.i(95187);let nZ=(0,nG.createServerReference)("7f852a03e3fd479e22097dca7cbde4b52d2b283cab",nG.callServer,void 0,nG.findSourceMapURL,"createBotAction");var nJ=e.i(68685);let nQ=(0,nG.createServerReference)("7f9430f15084b5e425ae62b8383282536177456087",nG.callServer,void 0,nG.findSourceMapURL,"deleteBotAction"),n0=(0,nG.createServerReference)("7f0a316cd73cb70fe9f88e4c00943579ebbfea7d89",nG.callServer,void 0,nG.findSourceMapURL,"updateBotAction");var n1=e.i(451888),n2=e.i(463625),n5=e.i(635963),n3=e.i(895836),n6=e.i(989409),n9=e.i(333999),n4=e.i(245629),n7=e.i(981203),n8=e.i(609856),re=e.i(283653),rt=e.i(864723);let rn=" new",rr=" seeds";function ro({bot:e,job:t,active:n,onPick:r}){var o,a;let i=(o=t,a=e.lastJobAt,o?"waiting"===o.status?(0,n1.isBudgetAsk)(o.ask)?{text:"out of steps"}:{text:"waiting on you",shine:!0,amber:!0}:"running"===o.status?{text:`working \xb7 ${o.label}`,shine:!0}:{text:`idle \xb7 last job ${ra(o.updatedAt)}`}:a?{text:`idle \xb7 last job ${ra(a)}`}:{text:"idle · no jobs yet"});return(0,u.jsxs)("button",{type:"button",onClick:r,className:(0,nL.cn)("mx-2 flex items-center gap-2.5 rounded-md px-2 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary":"hover:bg-muted/60"),children:[(0,u.jsx)(n5.BotMark,{size:32,...rs(e.name,e.icon),state:t?.status==="running"?"thinking":"idle",notify:t?.status==="waiting",className:"shrink-0"}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:(0,nL.cn)("block truncate text-[13px]",n?"font-medium":"text-foreground/90"),children:e.name}),i.shine?(0,u.jsx)("span",{className:(0,nL.cn)("block",i.amber?"[--rest:var(--color-amber-700)] [--shine:var(--color-amber-400)] dark:[--rest:var(--color-amber-400)] dark:[--shine:var(--color-amber-100)]":"[--rest:var(--muted-foreground)] [--shine:var(--foreground)]"),children:(0,u.jsx)(nH.default,{text:i.text,speed:2.4,color:"var(--rest)",shineColor:"var(--shine)",className:"truncate font-mono text-[11px] leading-4"})}):(0,u.jsx)("span",{className:"block truncate font-mono text-[11px] leading-4 text-muted-foreground",children:i.text})]})]})}function ra(e){let t=(0,n4.shortAgo)(e);return"now"===t?"just now":`${t} ago`}function ri({missing:e,active:t,onPick:n}){return(0,u.jsxs)("button",{type:"button",onClick:n,className:(0,nL.cn)("mx-2 mt-1 flex items-center gap-2.5 rounded-md px-2 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",t?"bg-secondary":"hover:bg-muted/60"),children:[(0,u.jsx)("span",{className:"flex shrink-0 items-center",children:e.map((e,t)=>(0,u.jsx)("span",{className:(0,nL.cn)("block",t>0&&"-ml-1.5"),children:(0,u.jsx)(n5.BotMark,{size:22,...rs(e.name,e.icon)})},e.name))}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:(0,nL.cn)("block truncate text-[13px]",t?"font-medium":"text-foreground/90"),children:"Ready-made"}),(0,u.jsx)("span",{className:"block truncate font-mono text-[10px] leading-4 text-muted-foreground",children:e.length===n2.BOT_SEEDS.length?`${e.length} bots`:`${e.length} left`})]})]})}function rl({have:e,onDone:t}){let[n,r]=(0,v.useState)(new Set),[o,a]=(0,n8.useServerAction)(nJ.createSeedBotsAction,{onOk:e=>{(0,re.revalidate)(g.queryKey.bot),t(e.created[0]??null)}}),i=n2.BOT_SEEDS.filter(t=>!e.has(t.name)&&!n.has(t.name));return(0,u.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,u.jsx)("div",{className:"flex h-11 shrink-0 items-center border-b border-border/60 px-4 font-mono text-[11px] text-muted-foreground",children:"Ready-made"}),(0,u.jsxs)("div",{className:"px-8 pt-7 pb-1",children:[(0,u.jsx)("h3",{className:"text-[17px] font-medium tracking-tight",children:1===n2.BOT_SEEDS.length?"One bot comes with her":`${2===n2.BOT_SEEDS.length?"Two":n2.BOT_SEEDS.length} bots come with her`}),(0,u.jsx)("p",{className:"mt-1.5 max-w-lg text-[13px] leading-relaxed text-muted-foreground break-keep",children:"They take the work that would leave the call silent, and report back. Untick anything you would rather not have; each runs on the app default model until you give it one of its own."})]}),(0,u.jsx)("div",{className:"flex flex-col gap-2 px-8 pt-4",children:n2.BOT_SEEDS.map(t=>{let o=e.has(t.name),i=o||!n.has(t.name);return(0,u.jsx)("div",{className:(0,nL.cn)("rounded-2xl ring-1 transition-colors",o?"opacity-45 ring-border/60":i?"ring-foreground":"ring-border/60"),children:(0,u.jsxs)("button",{type:"button",disabled:o||a,"aria-pressed":i,onClick:()=>r(e=>{let n=new Set(e);return n.has(t.name)?n.delete(t.name):n.add(t.name),n}),className:"flex w-full items-center gap-3.5 rounded-2xl px-4 py-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,u.jsx)(n5.BotMark,{size:32,...rs(t.name,t.icon),className:(0,nL.cn)("shrink-0 transition-opacity",!i&&"opacity-35")}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:"block text-[14px] font-medium",children:t.name}),(0,u.jsx)("span",{className:"block text-[12px] leading-normal text-muted-foreground break-keep",children:t.description})]}),o&&(0,u.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"already added"}),(0,u.jsx)("span",{className:(0,nL.cn)("grid size-6 shrink-0 place-items-center rounded-full transition-colors",i?"bg-foreground text-background":"ring-1 ring-border/60 ring-inset"),children:i&&(0,u.jsx)(c.Check,{className:"size-3.5"})})]})},t.name)})}),(0,u.jsxs)("div",{className:"mt-auto flex items-center gap-3 border-t border-border/60 px-8 py-4",children:[(0,u.jsx)("span",{className:"flex-1 font-mono text-[11px] text-muted-foreground",children:0===i.length?"nothing ticked":`${i.length} of ${n2.BOT_SEEDS.length-e.size} ticked`}),(0,u.jsx)(b.Button,{variant:"ghost",onClick:()=>t(null),children:"Cancel"}),(0,u.jsx)(b.Button,{loading:a,disabled:0===i.length,onClick:()=>o(i.map(e=>({name:e.name}))),children:1===i.length?`Add ${i[0].name}`:`Add ${i.length} bots`})]})]})}function rs(e,t){return{seed:e||"bot",color:t?.color,shape:t?.shape,outline:t?.outline}}function ru({bot:e,jobs:t,onDone:n,onCancel:r}){let[o,a]=(0,n9.useObjectState)(()=>({name:e?.name??"",description:e?.description??"",systemPrompt:e?.systemPrompt??"",icon:e?.icon??(0,n1.randomBotIcon)(),provider:e?.provider??null,model:e?.model??"",toolIds:e?.tools.map(e=>e.id)??[]})),{name:i,description:l,systemPrompt:s,icon:c,provider:d,model:f,toolIds:p}=o,[h]=(0,n8.useServerAction)(n0,{onOk:()=>(0,re.revalidate)(g.queryKey.bot)}),v=t=>{e&&h(e.name,t)},[x,y,,E]=(0,n8.useServerAction)(nZ,{errorMessage:!1,okMessage:"Bot created",onOk:e=>{(0,re.revalidate)(g.queryKey.bot),n(e.name)}}),[w,S]=(0,n8.useServerAction)(nQ,{okMessage:"Bot deleted",onOk:()=>{(0,re.revalidate)(g.queryKey.bot),n(null)}}),k=i.trim()&&l.trim()&&d&&f.trim()&&!y,j=async()=>{!e||await nq.notify.confirm({title:`Delete ${e.name}?`,description:"The agent can no longer hand work to it.",okText:"Delete",destructive:!0})&&w(e.name)};return(0,u.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,u.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border/60 px-4",children:[(0,u.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:e?e.name:"New bot"}),e&&(0,u.jsx)(b.Button,{size:"icon-sm",variant:"ghost",loading:S,"aria-label":"Delete this bot",onClick:j,className:"text-muted-foreground hover:text-destructive",children:(0,u.jsx)(m.Trash2,{})})]}),(0,u.jsxs)("div",{className:"flex-1 space-y-5 p-6",children:[(0,u.jsxs)("div",{className:"flex items-start gap-4",children:[(0,u.jsx)(n5.BotMark,{size:72,...rs(i,c),className:"shrink-0"}),(0,u.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[e?(0,u.jsx)("p",{className:"truncate text-lg leading-8 font-medium",children:e.name}):(0,u.jsx)(nI.Input,{value:i,onChange:e=>a({name:e.target.value}),placeholder:"researcher",spellCheck:!1,maxLength:n7.COMMON_VALIDATE.name.max,autoFocus:!0}),(0,u.jsx)(nI.Input,{value:l,onChange:e=>a({description:e.target.value}),onBlur:()=>{let t=l.trim();e&&t&&t!==e.description&&v({description:t})},placeholder:"Searches the web and reports back",maxLength:n7.COMMON_VALIDATE.description.max})]})]}),(0,u.jsx)(rm,{icon:c,onChange:e=>{a({icon:e}),v({icon:e})}}),(0,u.jsx)(rd,{label:"Runs on",children:(0,u.jsx)(nY.ModelPicker,{provider:d,model:f,onChange:e=>{a({provider:e.provider,model:e.model}),e.model&&v(e)}})}),(0,u.jsx)(rd,{label:"Tools",children:(0,u.jsx)(rp,{selected:p,onChange:e=>{a({toolIds:e}),v({toolIds:e})}})}),(0,u.jsxs)(rd,{label:"Prompt",children:[(0,u.jsx)(nT.Textarea,{value:s,onChange:e=>a({systemPrompt:e.target.value}),onBlur:()=>{let t=s.trim();e&&t!==(e.systemPrompt??"")&&v({systemPrompt:t})},placeholder:`How it should work (optional). e.g.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,507906,e=>{"use strict";var t,n,r,o,a,i,l,s,u=e.i(843476),c=e.i(689664),d=e.i(779266),f=e.i(77071),m=e.i(759659),p=e.i(747925),h=e.i(263676),v=e.i(271645),g=e.i(798120),b=e.i(167881),x=/[\\\/_+.#"@\[\(\{&]/,y=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,w=/[\s-]/g;function S(e){return e.toLowerCase().replace(w," ")}var k=Object.defineProperty,j=(e,t)=>k(e,"name",{value:t,configurable:!0}),N=!!("u">typeof window&&window.document&&window.document.createElement);function C(e,t,{checkForDefaultPrevented:n=!0}={}){return j(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function R(e){if(!N)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function O(e){return"IFRAME"===e.tagName}j(C,"composeEventHandlers"),j(function(e){if(!N)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),j(R,"getOwnerDocument"),j(function e(t,n=!1){let{activeElement:r}=R(t);if(!r?.nodeName)return null;if(O(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=R(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),j(O,"isFrame");var P=Object.defineProperty,A=(e,t)=>P(e,"name",{value:t,configurable:!0});function M(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function D(...e){return t=>{let n=!1,r=e.map(e=>{let r=M(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():M(e[t],null)}}}}function I(...e){return v.useCallback(D(...e),e)}A(M,"setRef"),A(D,"composeRefs"),A(I,"useComposedRefs");var T=Object.defineProperty,L=(e,t)=>T(e,"name",{value:t,configurable:!0});function _(e,t=[]){let n=[];function r(t,r){let o=v.createContext(r);o.displayName=t+"Context";let a=n.length;n=[...n,r];let i=L(t=>{let{scope:n,children:r,...i}=t,l=n?.[e]?.[a]||o,s=v.useMemo(()=>i,Object.values(i));return(0,u.jsx)(l.Provider,{value:s,children:r})},"Provider");function l(n,i,s={}){let{optional:u=!1}=s,c=i?.[e]?.[a]||o,d=v.useContext(c);if(d)return d;if(void 0!==r)return r;if(!u)throw Error(`\`${n}\` must be used within \`${t}\``)}return i.displayName=t+"Provider",L(l,"useContext"),[i,l]}L(r,"createContext");let o=L(()=>{let t=n.map(e=>v.createContext(e));return L(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},"useScope")},"createScope");return o.scopeName=e,[r,F(o,...t)]}function F(...e){let t=e[0];if(1===e.length)return t;let n=L(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return L(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}L(function(e,t){let n=v.createContext(t);n.displayName=e+"Context";let r=L(e=>{let{children:t,...r}=e,o=v.useMemo(()=>r,Object.values(r));return(0,u.jsx)(n.Provider,{value:o,children:t})},"Provider");function o(r,a={}){let{optional:i=!1}=a,l=v.useContext(n);if(l)return l;if(void 0!==t)return t;if(!i)throw Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",L(o,"useContext"),[r,o]},"createContext"),L(_,"createContextScope"),L(F,"composeContextScopes");var B=globalThis?.document?v.useLayoutEffect:()=>{},$=Object.defineProperty,z=v[" useId ".trim().toString()]||(()=>void 0),W=0;function K(e){let[t,n]=v.useState(z());return B(()=>{e||n(e=>e??String(W++))},[e]),e||(t?`radix-${t}`:"")}$(K,"name",{value:"useId",configurable:!0});var U=Object.defineProperty,V=v[" useEffectEvent ".trim().toString()],q=v[" useInsertionEffect ".trim().toString()];function H(e){if("function"==typeof V)return V(e);let t=v.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof q?q(()=>{t.current=e}):B(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}U(H,"name",{value:"useEffectEvent",configurable:!0});var X=Object.defineProperty,Y=(e,t)=>X(e,"name",{value:t,configurable:!0}),G=v[" useInsertionEffect ".trim().toString()]||B;function Z({prop:e,defaultProp:t,onChange:n=Y(()=>{},"onChange"),caller:r}){let[o,a,i]=J({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:o;return[s,v.useCallback(t=>{if(l){let n=Q(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[l,e,a,i])]}function J({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),o=v.useRef(n),a=v.useRef(t);return G(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Q(e){return"function"==typeof e}Y(Z,"useControllableState"),Y(J,"useUncontrolledState"),Y(Q,"isFunction");var ee=Symbol("RADIX:SYNC_STATE");Y(function(e,t,n,r){let{prop:o,defaultProp:a,onChange:i,caller:l}=t,s=void 0!==o,u=H(i),c=[{...n,state:a}];r&&c.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===ee)return{...t,state:n.state};let r=e(t,n);return s&&!Object.is(r.state,t.state)&&u(r.state),r},...c),m=d.state,p=v.useRef(m);v.useEffect(()=>{p.current!==m&&(p.current=m,s||u(m))},[m,p,s]);let h=v.useMemo(()=>void 0!==o?{...d,state:o}:d,[d,o]);return v.useEffect(()=>{s&&!Object.is(o,d.state)&&f({type:ee,state:o})},[o,d.state,s]),[h,f]},"useControllableStateReducer");var et=e.i(174080),en=Object.defineProperty,er=(e,t)=>en(e,"name",{value:t,configurable:!0});function eo(e){let t=v.forwardRef((t,n)=>{let{children:r,...o}=t,a=null,i=!1,l=[];ed(r)&&"function"==typeof eh&&(r=eh(r._payload)),v.Children.forEach(r,e=>{if(eu(e)){i=!0;let t="child"in e.props?e.props.child:e.props.children;ed(t)&&"function"==typeof eh&&(t=eh(t._payload)),a=ei(e,t),l.push(a?.props?.children)}else l.push(e)}),a?a=v.cloneElement(a,void 0,l):!i&&1===v.Children.count(r)&&v.isValidElement(r)&&(a=r);let s=a?es(a):void 0,u=I(n,s);if(!a){if(r||0===r)throw Error(i?ep(e):em(e));return r}let c=el(o,a.props??{});return a.type!==v.Fragment&&(c.ref=n?u:s),v.cloneElement(a,c)});return t.displayName=`${e}.Slot`,t}er(eo,"createSlot");var ea=Symbol.for("radix.slottable");er(function(e){let t=er(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ea,t},"createSlottable");var ei=er((e,t)=>{if("child"in e.props){let t=e.props.child;return v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null}return v.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function el(e,t){let n={...t};for(let r in t){let o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{let t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function es(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}function eu(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ea}er(el,"mergeProps"),er(es,"getElementRef"),er(eu,"isSlottable");var ec=Symbol.for("react.lazy");function ed(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ec&&"_payload"in e&&ef(e._payload)}function ef(e){return"object"==typeof e&&null!==e&&"then"in e}er(ed,"isLazyComponent"),er(ef,"isPromiseLike");var em=er(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ep=er(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),eh=v[" use ".trim().toString()],ev=Object.defineProperty,eg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=eo(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:o,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,u.jsx)(o?n:t,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eb(e,t){e&&et.flushSync(()=>e.dispatchEvent(t))}function ex(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}ev(eb,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(ex,"name",{value:"useCallbackRef",configurable:!0});var ey=Object.defineProperty,eE=(e,t)=>ey(e,"name",{value:t,configurable:!0}),ew="dismissableLayer.update",eS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ek=v.forwardRef(eE(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...d}=e,f=v.useContext(eS),[m,p]=v.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=v.useState({}),b=I(t,p),x=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=y?x.indexOf(y):-1,w=m?x.indexOf(m):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=E,j=v.useRef(!1),N=eC(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:j,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return k&&!t},[f.branches,k])}),R=eR(e=>{if(r&&j.current)return;let t=e.target;![...f.branches].some(e=>e.contains(t))&&(i?.(e),s?.(e),e.defaultPrevented||c?.())},h),O=!!m&&w===x.length-1,P=ex(e=>{"Escape"===e.key&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(O)return h.addEventListener("keydown",P,{capture:!0}),()=>h.removeEventListener("keydown",P,{capture:!0})},[h,O,P]),v.useEffect(()=>{if(m)return n&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(l=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),eO(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(m),0===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=l))}},[m,h,n,f]),v.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),eO())},[m,f]),v.useEffect(()=>{let e=eE(()=>g({}),"handleUpdate");return document.addEventListener(ew,e),()=>document.removeEventListener(ew,e)},[]),(0,u.jsx)(eg.div,{...d,ref:b,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:C(e.onFocusCapture,R.onFocusCapture),onBlurCapture:C(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:C(e.onPointerDownCapture,N.onPointerDownCapture)})},"DismissableLayer"));function ej(){let e=v.useContext(eS),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}eE(ej,"useDismissableLayerSurface");var eN=eE(()=>!0,"IS_TRUE");function eC(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a,shouldHandlePointerDownOutside:i=eN}=t,l=ex(e),s=v.useRef(!1),u=v.useRef(!1),c=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){u.current=!1,o.current=!1,c.current.clear()}function t(){return Array.from(c.current.values()).some(Boolean)}function f(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||c.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{u.current&&d.current()},0)}function m(e){u.current&&c.current.set(e.type,!1)}eE(e,"resetOutsideInteraction"),eE(t,"isOutsideInteractionIntercepted"),eE(f,"handleInteractionCapture"),eE(m,"handleInteractionBubble");let p=eE(a=>{if(a.target&&!s.current){let f=function(){n.removeEventListener("click",d.current);let r=t();e(),r||eP("dismissableLayer.pointerDownOutside",l,m,{discrete:!0})};if(eE(f,"handleAndDispatchPointerDownOutsideEvent"),!i(a.target)){n.removeEventListener("click",d.current),e(),s.current=!1;return}let m={originalEvent:a};u.current=!0,o.current=r&&0===a.button,c.current.clear(),r&&0===a.button?(n.removeEventListener("click",d.current),d.current=f,n.addEventListener("click",d.current,{once:!0})):f()}else n.removeEventListener("click",d.current),e();s.current=!1},"handlePointerDown"),h=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,m);let v=window.setTimeout(()=>{n.addEventListener("pointerdown",p)},0);return()=>{for(let e of(window.clearTimeout(v),n.removeEventListener("pointerdown",p),n.removeEventListener("click",d.current),h))n.removeEventListener(e,f,!0),n.removeEventListener(e,m)}},[n,l,r,o,a,i]),{onPointerDownCapture:eE(()=>s.current=!0,"onPointerDownCapture")}}function eR(e,t=globalThis?.document){let n=ex(e),r=v.useRef(!1);return v.useEffect(()=>{let e=eE(e=>{e.target&&!r.current&&eP("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:eE(()=>r.current=!0,"onFocusCapture"),onBlurCapture:eE(()=>r.current=!1,"onBlurCapture")}}function eO(){let e=new CustomEvent(ew);document.dispatchEvent(e)}function eP(e,t,n,{discrete:r}){let o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?eb(o,a):o.dispatchEvent(a)}eE(eC,"usePointerDownOutside"),eE(eR,"useFocusOutside"),eE(eO,"dispatchUpdate"),eE(eP,"handleAndDispatchCustomEvent");var eA=Object.defineProperty,eM=(e,t)=>eA(e,"name",{value:t,configurable:!0}),eD="focusScope.autoFocusOnMount",eI="focusScope.autoFocusOnUnmount",eT={bubbles:!1,cancelable:!0},eL=v.forwardRef(eM(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=v.useState(null),c=ex(o),d=ex(a),f=v.useRef(null),m=I(t,s),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?f.current=t:eK(f.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||eK(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&eK(l)};eM(e,"handleFocusIn"),eM(t,"handleFocusOut"),eM(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){eU.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(eD,eT);l.addEventListener(eD,c),l.dispatchEvent(t),t.defaultPrevented||(e_(eH(eB(l)),{select:!0}),document.activeElement===e&&eK(l))}return()=>{l.removeEventListener(eD,c),setTimeout(()=>{let t=new CustomEvent(eI,eT);l.addEventListener(eI,d),l.dispatchEvent(t),t.defaultPrevented||eK(e??document.body,{select:!0}),l.removeEventListener(eI,d),eU.remove(p)},0)}}},[l,c,d,p]);let h=v.useCallback(e=>{if(!n&&!r||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,a]=eF(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&eK(a,{select:!0})):(e.preventDefault(),n&&eK(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return(0,u.jsx)(eg.div,{tabIndex:-1,...i,ref:m,onKeyDown:h})},"FocusScope"));function e_(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eK(r,{select:t}),document.activeElement!==n)return}function eF(e){let t=eB(e);return[e$(t,e),e$(t.reverse(),e)]}function eB(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:eM(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function e$(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ez(r,{upTo:t})))return r}function ez(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function eW(e){return e instanceof HTMLInputElement&&"select"in e}function eK(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eW(e)&&t&&e.select()}}eM(e_,"focusFirst"),eM(eF,"getTabbableEdges"),eM(eB,"getTabbableCandidates"),eM(e$,"findVisible"),eM(ez,"isHidden"),eM(eW,"isSelectableInput"),eM(eK,"focus");var eU=eV();function eV(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=eq(e,t)).unshift(t)},remove(t){e=eq(e,t),e[0]?.resume()}}}function eq(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function eH(e){return e.filter(e=>"A"!==e.tagName)}eM(eV,"createFocusScopesStack"),eM(eq,"arrayRemove"),eM(eH,"removeLinks");var eX=Object.defineProperty,eY=v.forwardRef(eX(function(e,t){let{container:n,...r}=e,[o,a]=v.useState(!1);B(()=>a(!0),[]);let i=n||o&&globalThis?.document?.body;return i?et.createPortal((0,u.jsx)(eg.div,{...r,ref:t}),i):null},"name",{value:"Portal",configurable:!0})),eG=Object.defineProperty,eZ=(e,t)=>eG(e,"name",{value:t,configurable:!0});function eJ(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}eZ(eJ,"useStateMachine");var eQ=eZ(e=>{let{present:t,children:n}=e,r=e0(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=e2(r.ref,e3(o));return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null},"Presence");function e0(e){let[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=v.useRef(void 0),[l,s]=eJ(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{"mounted"===l?(a.current=i.current??e5(r.current),i.current=void 0):a.current="none"},[l]),B(()=>{let t=r.current,n=o.current;if(n!==e){let r=a.current,l=e5(t);e?(i.current=l,s("MOUNT")):"none"===l||t?.display==="none"?s("UNMOUNT"):n&&r!==l?s("ANIMATION_OUT"):s("UNMOUNT"),o.current=e}},[e,s]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=eZ(a=>{let i=e5(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){let r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},"handleAnimationEnd"),l=eZ(e=>{e.target===t&&(a.current=e5(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,i.current=e5(t)}else r.current=null;n(e)},[])}}function e1(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function e2(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,o=n.map(t=>{let n=e1(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<o.length;e++){let t=o[e];"function"==typeof t?t():e1(n[e],null)}}},[])}function e5(e){return e?.animationName||"none"}function e3(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}eZ(e0,"usePresence"),eZ(e1,"setRef"),eZ(e2,"useStableComposedRefs"),eZ(e5,"getAnimationName"),eZ(e3,"getElementRef");var e6=Object.defineProperty,e9=(e,t)=>e6(e,"name",{value:t,configurable:!0}),e4=0,e7=null;function e8(){v.useEffect(()=>{e7||(e7={start:te(),end:te()});let{start:e,end:t}=e7;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),e4++,()=>{1===e4&&(e7?.start.remove(),e7?.end.remove(),e7=null),e4=Math.max(0,e4-1)}},[])}function te(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e9(function(e){return e8(),e.children},"FocusGuards"),e9(e8,"useFocusGuards"),e9(te,"createFocusGuard");var tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var tr=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),to="width-before-scroll-bar";function ta(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ti="u">typeof window?v.useLayoutEffect:v.useEffect,tl=new WeakMap,ts=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,a={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}}).options=tt({async:!0,ssr:!1},t),a),tu=function(){},tc=v.forwardRef(function(e,t){var n,r,o,a,i=v.useRef(null),l=v.useState({onScrollCapture:tu,onWheelCapture:tu,onTouchMoveCapture:tu}),s=l[0],u=l[1],c=e.forwardProps,d=e.children,f=e.className,m=e.removeScrollBar,p=e.enabled,h=e.shards,g=e.sideCar,b=e.noRelative,x=e.noIsolation,y=e.inert,E=e.allowPinchZoom,w=e.as,S=e.gapMode,k=tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=(n=[i,t],r=function(e){return n.forEach(function(t){return ta(t,e)})},(o=(0,v.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,a=o.facade,ti(function(){var e=tl.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||ta(e,null)}),r.forEach(function(e){t.has(e)||ta(e,o)})}tl.set(a,n)},[n]),a),N=tt(tt({},k),s);return v.createElement(v.Fragment,null,p&&v.createElement(g,{sideCar:ts,removeScrollBar:m,shards:h,noRelative:b,noIsolation:x,inert:y,setCallbacks:u,allowPinchZoom:!!E,lockRef:i,gapMode:S}),c?v.cloneElement(v.Children.only(d),tt(tt({},N),{ref:j})):v.createElement(void 0===w?"div":w,tt({},N,{className:f,ref:j}),d))});tc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tc.classNames={fullWidth:to,zeroRight:tr};var td=function(e){var t=e.sideCar,n=tn(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return v.createElement(r,tt({},n))};td.isSideCarExport=!0;var tf=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tm=function(){var e=tf();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tp=function(){var e=tm();return function(t){return e(t.styles,t.dynamic),null}},th={left:0,top:0,right:0,gap:0},tv=function(e){return parseInt(e||"",10)||0},tg=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[tv(n),tv(r),tv(o)]},tb=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return th;var t=tg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tx=tp(),ty="data-scroll-locked",tE=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(ty,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tr," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(to," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(tr," .").concat(tr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(to," .").concat(to," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(ty,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},tw=function(){var e=parseInt(document.body.getAttribute(ty)||"0",10);return isFinite(e)?e:0},tS=function(){v.useEffect(function(){return document.body.setAttribute(ty,(tw()+1).toString()),function(){var e=tw()-1;e<=0?document.body.removeAttribute(ty):document.body.setAttribute(ty,e.toString())}},[])},tk=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;tS();var a=v.useMemo(function(){return tb(o)},[o]);return v.createElement(tx,{styles:tE(a,!t,o,n?"":"!important")})},tj=!1;if("u">typeof window)try{var tN=Object.defineProperty({},"passive",{get:function(){return tj=!0,!0}});window.addEventListener("test",tN,tN),window.removeEventListener("test",tN,tN)}catch(e){tj=!1}var tC=!!tj&&{passive:!1},tR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},tO=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tP(e,r)){var o=tA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},tP=function(e,t){return"v"===e?tR(t,"overflowY"):tR(t,"overflowX")},tA=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},tM=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),l=i*r,s=n.target,u=t.contains(s),c=!1,d=l>0,f=0,m=0;do{if(!s)break;var p=tA(e,s),h=p[0],v=p[1]-p[2]-i*h;(h||v)&&tP(e,s)&&(f+=v,m+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(o&&1>Math.abs(f)||!o&&l>f)?c=!0:!d&&(o&&1>Math.abs(m)||!o&&-l>m)&&(c=!0),c},tD=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tI=function(e){return[e.deltaX,e.deltaY]},tT=function(e){return e&&"current"in e?e.current:e},tL=0,t_=[];let tF=(i=function(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(tL++)[0],a=v.useState(tp)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(tT),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=tD(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],u="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),m=f&&f.anchorNode;if(m&&(m===c||m.contains(c)))return!1;var p=tO(d,c);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=tO(d,c)),!p)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return tM(h,t,e,"h"===h?s:u,!0)},[]),s=v.useCallback(function(e){if(t_.length&&t_[t_.length-1]===a){var n="deltaY"in e?tI(e):tD(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(tT).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=v.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=v.useCallback(function(e){n.current=tD(e),r.current=void 0},[]),d=v.useCallback(function(t){u(t.type,tI(t),t.target,l(t,e.lockRef.current))},[]),f=v.useCallback(function(t){u(t.type,tD(t),t.target,l(t,e.lockRef.current))},[]);v.useEffect(function(){return t_.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,tC),document.addEventListener("touchmove",s,tC),document.addEventListener("touchstart",c,tC),function(){t_=t_.filter(function(e){return e!==a}),document.removeEventListener("wheel",s,tC),document.removeEventListener("touchmove",s,tC),document.removeEventListener("touchstart",c,tC)}},[]);var m=e.removeScrollBar,p=e.inert;return v.createElement(v.Fragment,null,p?v.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?v.createElement(tk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},ts.useMedium(i),td);var tB=v.forwardRef(function(e,t){return v.createElement(tc,tt({},e,{ref:t,sideCar:tF}))});tB.classNames=tc.classNames;var t$=new WeakMap,tz=new WeakMap,tW={},tK=0,tU=function(e){return e&&(e.host||tU(e.parentNode))},tV=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tU(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tW[n]||(tW[n]=new WeakMap);var a=tW[n],i=[],l=new Set,s=new Set(o),u=function(e){!e||l.has(e)||(l.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(t$.get(e)||0)+1,u=(a.get(e)||0)+1;t$.set(e,s),a.set(e,u),i.push(e),1===s&&o&&tz.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),tK++,function(){i.forEach(function(e){var t=t$.get(e)-1,o=a.get(e)-1;t$.set(e,t),a.set(e,o),t||(tz.has(e)||e.removeAttribute(r),tz.delete(e)),o||e.removeAttribute(n)}),--tK||(t$=new WeakMap,t$=new WeakMap,tz=new WeakMap,tW={})}},tq=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tV(r,o,n,"aria-hidden")):function(){return null}},tH=Object.defineProperty,tX=(e,t)=>tH(e,"name",{value:t,configurable:!0}),tY="Dialog",[tG,tZ]=_(tY),[tJ,tQ]=tG(tY),t0=tX(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=v.useRef(null),s=v.useRef(null),[c,d]=Z({prop:r,defaultProp:o??!1,onChange:a,caller:tY}),[f,m]=v.useState(0),[p,h]=v.useState(0);return(0,u.jsx)(tJ,{scope:t,triggerRef:l,contentRef:s,contentId:K(),titleId:K(),descriptionId:K(),titlePresent:f>0,descriptionPresent:p>0,setTitleCount:m,setDescriptionCount:h,open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:i,children:n})},"Dialog"),t1="DialogPortal",[t2,t5]=tG(t1,{forceMount:void 0}),t3=tX(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=tQ(t1,t);return(0,u.jsx)(t2,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,u.jsx)(eQ,{present:n||a.open,children:(0,u.jsx)(eY,{asChild:!0,container:o,children:e})}))})},"DialogPortal"),t6="DialogOverlay",t9=v.forwardRef(tX(function(e,t){let n=t5(t6,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tQ(t6,e.__scopeDialog);return a.modal?(0,u.jsx)(eQ,{present:r||a.open,children:(0,u.jsx)(t7,{...o,ref:t})}):null},"DialogOverlay")),t4=eo("DialogOverlay.RemoveScroll"),t7=v.forwardRef(tX(function(e,t){let{__scopeDialog:n,...r}=e,o=tQ(t6,n),a=I(t,ej());return(0,u.jsx)(tB,{as:t4,allowPinchZoom:!0,shards:[o.contentRef],children:(0,u.jsx)(eg.div,{"data-state":no(o.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),t8="DialogContent",ne=v.forwardRef(tX(function(e,t){let n=t5(t8,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tQ(t8,e.__scopeDialog);return(0,u.jsx)(eQ,{present:r||a.open,children:a.modal?(0,u.jsx)(nt,{...o,ref:t}):(0,u.jsx)(nn,{...o,ref:t})})},"DialogContent")),nt=v.forwardRef(tX(function(e,t){let n=tQ(t8,e.__scopeDialog),r=v.useRef(null),o=I(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return tq(e)},[]),(0,u.jsx)(nr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:C(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:C(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),nn=v.forwardRef(tX(function(e,t){let n=tQ(t8,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return(0,u.jsx)(nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})},"DialogContentNonModal")),nr=v.forwardRef(tX(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=tQ(t8,n);return e8(),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(eL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,u.jsx)(ek,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":no(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl"));function no(e){return e?"open":"closed"}tX(no,"getState");var na='[cmdk-group=""]',ni='[cmdk-group-items=""]',nl='[cmdk-item=""]',ns=`${nl}:not([aria-disabled="true"])`,nu="cmdk-item-select",nc="data-value",nd=(e,t,n)=>{var r;return r=e,function e(t,n,r,o,a,i,l){if(i===n.length)return a===t.length?1:.99;var s=`${a},${i}`;if(void 0!==l[s])return l[s];for(var u,c,d,f,m=o.charAt(i),p=r.indexOf(m,a),h=0;p>=0;)(u=e(t,n,r,o,p+1,i+1,l))>h&&(p===a?u*=1:x.test(t.charAt(p-1))?(u*=.8,(d=t.slice(a,p-1).match(y))&&a>0&&(u*=Math.pow(.999,d.length))):E.test(t.charAt(p-1))?(u*=.9,(f=t.slice(a,p-1).match(w))&&a>0&&(u*=Math.pow(.999,f.length))):(u*=.17,a>0&&(u*=Math.pow(.999,p-a))),t.charAt(p)!==n.charAt(i)&&(u*=.9999)),(u<.1&&r.charAt(p-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&r.charAt(p-1)!==o.charAt(i))&&.1*(c=e(t,n,r,o,p+1,i+2,l))>u&&(u=.1*c),u>h&&(h=u),p=r.indexOf(m,p+1);return l[s]=h,h}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,S(r),S(t),0,0,{})},nf=v.createContext(void 0),nm=v.createContext(void 0),np=v.createContext(void 0),nh=v.forwardRef((e,t)=>{let n=nj(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=nj(()=>new Set),o=nj(()=>new Map),a=nj(()=>new Map),i=nj(()=>new Set),l=nS(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:p,disablePointerSelection:h=!1,vimBindings:g=!0,...b}=e,x=K(),y=K(),E=K(),w=v.useRef(null),S=nR();nk(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}},[c]),nk(()=>{S(6,P)},[]);let k=v.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),C(),S(1,R);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(E);e?e.focus():null==(o=document.getElementById(x))||o.focus()}if(S(7,()=>{var e;n.current.selectedItemId=null==(e=A())?void 0:e.id,k.emit()}),r||S(5,P),(null==(a=l.current)?void 0:a.value)!==void 0){null==(s=(i=l.current).onValueChange)||s.call(i,null!=t?t:"");return}}k.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),j=v.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,N(t,r)),S(2,()=>{C(),k.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,()=>{O(),C(),n.current.value||R(),k.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&R(),k.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:E,labelId:y,listInnerRef:w}),[]);function N(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:nd;return e?a(e,n.current.search,t):0}function C(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([n,a])});let r=w.current;M().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(ni);t?t.appendChild(e.parentElement===t?e:e.closest(`${ni} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ni} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=w.current)?void 0:t.querySelector(`${na}[${nc}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function R(){let e=M().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(nc);k.setState("value",t||void 0)}function O(){var e,t,i,s;if(!n.current.search||!1===l.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=N(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function P(){var e,t,n;let r=A();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(na))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=w.current)?void 0:e.querySelector(`${nl}[aria-selected="true"]`)}function M(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(ns))||[])}function D(e){let t=M()[e];t&&k.setState("value",t.getAttribute(nc))}function I(e){var t;let n=A(),r=M(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(nc))}function T(e){let t=A(),n=null==t?void 0:t.closest(na),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,na):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,na))?void 0:n.querySelector(ns);r?k.setState("value",r.getAttribute(nc)):I(e)}let L=()=>D(M().length-1),_=e=>{e.preventDefault(),e.metaKey?L():e.altKey?T(1):I(1)},F=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?T(-1):I(-1)};return v.createElement(eg.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":g&&e.ctrlKey&&_(e);break;case"ArrowDown":_(e);break;case"p":case"k":g&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),L();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(nu);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:nP},s),nO(e,e=>v.createElement(nm.Provider,{value:k},v.createElement(nf.Provider,{value:j},e))))}),nv=v.forwardRef((e,t)=>{var n,r;let o=K(),a=v.useRef(null),i=v.useContext(np),l=v.useContext(nf),s=nS(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;nk(()=>{if(!u)return l.item(o,null==i?void 0:i.id)},[u]);let c=nC(o,a,[e.value,e.children,a],e.keywords),d=v.useContext(nm),f=nN(e=>e.value&&e.value===c.current),m=nN(e=>!!u||!1===l.filter()||!e.search||e.filtered.items.get(o)>0);function p(){var e,t;h(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(v.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(nu,p),()=>t.removeEventListener(nu,p)},[m,e.onSelect,e.disabled]),!m)return null;let{disabled:g,value:b,onSelect:x,forceMount:y,keywords:E,...w}=e;return v.createElement(eg.div,{ref:D(a,t),...w,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.getDisablePointerSelection()?void 0:h,onClick:g?void 0:p},e.children)}),ng=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=K(),l=v.useRef(null),s=v.useRef(null),u=K(),c=v.useContext(nf),d=nN(e=>!!o||!1===c.filter()||!e.search||e.filtered.groups.has(i));nk(()=>c.group(i),[]),nC(i,l,[e.value,e.heading,s]);let f=v.useMemo(()=>({id:i,forceMount:o}),[o]);return v.createElement(eg.div,{ref:D(l,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&v.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),nO(e,e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},v.createElement(np.Provider,{value:f},e))))}),nb=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=v.useRef(null),a=nN(e=>!e.search);return n||a?v.createElement(eg.div,{ref:D(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),nx=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=v.useContext(nm),i=nN(e=>e.search),l=nN(e=>e.selectedItemId),s=v.useContext(nf);return v.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),v.createElement(eg.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),ny=v.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),l=nN(e=>e.selectedItemId),s=v.useContext(nf);return v.useEffect(()=>{if(i.current&&a.current){let e=i.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),v.createElement(eg.div,{ref:D(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:s.listId},nO(e,e=>v.createElement("div",{ref:D(i,s.listInnerRef),"cmdk-list-sizer":""},e)))}),nE=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return v.createElement(t0,{open:n,onOpenChange:r},v.createElement(t3,{container:i},v.createElement(t9,{"cmdk-overlay":"",className:o}),v.createElement(ne,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(nh,{ref:t,...l}))))}),nw=Object.assign(nh,{List:ny,Item:nv,Input:nx,Group:ng,Separator:nb,Dialog:nE,Empty:v.forwardRef((e,t)=>nN(e=>0===e.filtered.count)?v.createElement(eg.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:v.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return v.createElement(eg.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},nO(e,e=>v.createElement("div",{"aria-hidden":!0},e)))})});function nS(e){let t=v.useRef(e);return nk(()=>{t.current=e}),t}var nk="u"<typeof window?v.useEffect:v.useLayoutEffect;function nj(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function nN(e){let t=v.useContext(nm),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function nC(e,t,n,r=[]){let o=v.useRef(),a=v.useContext(nf);return nk(()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=r.map(e=>e.trim());a.value(e,l,s),null==(i=t.current)||i.setAttribute(nc,l),o.current=l}),o}var nR=()=>{let[e,t]=v.useState(),n=nj(()=>new Map);return nk(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function nO({asChild:e,children:t},n){let r;return e&&v.isValidElement(t)?v.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var nP={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},nA=e.i(593698),nM=e.i(630299),nM=nM;e.i(630374);var nD=e.i(225913),nI=e.i(23750),nT=e.i(184762),nL=e.i(647163);function n_({className:e,...t}){return(0,u.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,nL.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}let nF=(0,nD.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function nB({className:e,align:t="inline-start",...n}){return(0,u.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,nL.cn)(nF({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function n$({className:e,...t}){return(0,u.jsx)(nw,{"data-slot":"command",className:(0,nL.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function nz({className:e,...t}){return(0,u.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,u.jsxs)(n_,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,u.jsx)(nw.Input,{"data-slot":"command-input",className:(0,nL.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,u.jsx)(nB,{children:(0,u.jsx)(nM.default,{className:"size-4 shrink-0 opacity-50"})})]})})}function nW({className:e,...t}){return(0,u.jsx)(nw.List,{"data-slot":"command-list",className:(0,nL.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function nK({className:e,...t}){return(0,u.jsx)(nw.Empty,{"data-slot":"command-empty",className:(0,nL.cn)("py-6 text-center text-sm",e),...t})}function nU({className:e,...t}){return(0,u.jsx)(nw.Group,{"data-slot":"command-group",className:(0,nL.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function nV({className:e,children:t,...n}){return(0,u.jsxs)(nw.Item,{"data-slot":"command-item",className:(0,nL.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...n,children:[t,(0,u.jsx)(nA.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}(0,nD.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var nq=e.i(917162),nH=e.i(660302),nX=e.i(161483),nY=e.i(146538),nG=e.i(95187);let nZ=(0,nG.createServerReference)("7fcde5fe88db84dceeb9b2ffe60d0ca1e3a1a00a10",nG.callServer,void 0,nG.findSourceMapURL,"createBotAction");var nJ=e.i(320553);let nQ=(0,nG.createServerReference)("7fc29457d8d7aed08760ab0333ee56596b621a82fa",nG.callServer,void 0,nG.findSourceMapURL,"deleteBotAction"),n0=(0,nG.createServerReference)("7f25ff0eeb6f841d78f67da83b08e04174786539db",nG.callServer,void 0,nG.findSourceMapURL,"updateBotAction");var n1=e.i(451888),n2=e.i(463625),n5=e.i(635963),n3=e.i(895836),n6=e.i(989409),n9=e.i(333999),n4=e.i(245629),n7=e.i(981203),n8=e.i(609856),re=e.i(283653),rt=e.i(864723);let rn=" new",rr=" seeds";function ro({bot:e,job:t,active:n,onPick:r}){var o,a;let i=(o=t,a=e.lastJobAt,o?"waiting"===o.status?(0,n1.isBudgetAsk)(o.ask)?{text:"out of steps"}:{text:"waiting on you",shine:!0,amber:!0}:"running"===o.status?{text:`working \xb7 ${o.label}`,shine:!0}:{text:`idle \xb7 last job ${ra(o.updatedAt)}`}:a?{text:`idle \xb7 last job ${ra(a)}`}:{text:"idle · no jobs yet"});return(0,u.jsxs)("button",{type:"button",onClick:r,className:(0,nL.cn)("mx-2 flex items-center gap-2.5 rounded-md px-2 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary":"hover:bg-muted/60"),children:[(0,u.jsx)(n5.BotMark,{size:32,...rs(e.name,e.icon),state:t?.status==="running"?"thinking":"idle",notify:t?.status==="waiting",className:"shrink-0"}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:(0,nL.cn)("block truncate text-[13px]",n?"font-medium":"text-foreground/90"),children:e.name}),i.shine?(0,u.jsx)("span",{className:(0,nL.cn)("block",i.amber?"[--rest:var(--color-amber-700)] [--shine:var(--color-amber-400)] dark:[--rest:var(--color-amber-400)] dark:[--shine:var(--color-amber-100)]":"[--rest:var(--muted-foreground)] [--shine:var(--foreground)]"),children:(0,u.jsx)(nH.default,{text:i.text,speed:2.4,color:"var(--rest)",shineColor:"var(--shine)",className:"truncate font-mono text-[11px] leading-4"})}):(0,u.jsx)("span",{className:"block truncate font-mono text-[11px] leading-4 text-muted-foreground",children:i.text})]})]})}function ra(e){let t=(0,n4.shortAgo)(e);return"now"===t?"just now":`${t} ago`}function ri({missing:e,active:t,onPick:n}){return(0,u.jsxs)("button",{type:"button",onClick:n,className:(0,nL.cn)("mx-2 mt-1 flex items-center gap-2.5 rounded-md px-2 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",t?"bg-secondary":"hover:bg-muted/60"),children:[(0,u.jsx)("span",{className:"flex shrink-0 items-center",children:e.map((e,t)=>(0,u.jsx)("span",{className:(0,nL.cn)("block",t>0&&"-ml-1.5"),children:(0,u.jsx)(n5.BotMark,{size:22,...rs(e.name,e.icon)})},e.name))}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:(0,nL.cn)("block truncate text-[13px]",t?"font-medium":"text-foreground/90"),children:"Ready-made"}),(0,u.jsx)("span",{className:"block truncate font-mono text-[10px] leading-4 text-muted-foreground",children:e.length===n2.BOT_SEEDS.length?`${e.length} bots`:`${e.length} left`})]})]})}function rl({have:e,onDone:t}){let[n,r]=(0,v.useState)(new Set),[o,a]=(0,n8.useServerAction)(nJ.createSeedBotsAction,{onOk:e=>{(0,re.revalidate)(g.queryKey.bot),t(e.created[0]??null)}}),i=n2.BOT_SEEDS.filter(t=>!e.has(t.name)&&!n.has(t.name));return(0,u.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,u.jsx)("div",{className:"flex h-11 shrink-0 items-center border-b border-border/60 px-4 font-mono text-[11px] text-muted-foreground",children:"Ready-made"}),(0,u.jsxs)("div",{className:"px-8 pt-7 pb-1",children:[(0,u.jsx)("h3",{className:"text-[17px] font-medium tracking-tight",children:1===n2.BOT_SEEDS.length?"One bot comes with her":`${2===n2.BOT_SEEDS.length?"Two":n2.BOT_SEEDS.length} bots come with her`}),(0,u.jsx)("p",{className:"mt-1.5 max-w-lg text-[13px] leading-relaxed text-muted-foreground break-keep",children:"They take the work that would leave the call silent, and report back. Untick anything you would rather not have; each runs on the app default model until you give it one of its own."})]}),(0,u.jsx)("div",{className:"flex flex-col gap-2 px-8 pt-4",children:n2.BOT_SEEDS.map(t=>{let o=e.has(t.name),i=o||!n.has(t.name);return(0,u.jsx)("div",{className:(0,nL.cn)("rounded-2xl ring-1 transition-colors",o?"opacity-45 ring-border/60":i?"ring-foreground":"ring-border/60"),children:(0,u.jsxs)("button",{type:"button",disabled:o||a,"aria-pressed":i,onClick:()=>r(e=>{let n=new Set(e);return n.has(t.name)?n.delete(t.name):n.add(t.name),n}),className:"flex w-full items-center gap-3.5 rounded-2xl px-4 py-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,u.jsx)(n5.BotMark,{size:32,...rs(t.name,t.icon),className:(0,nL.cn)("shrink-0 transition-opacity",!i&&"opacity-35")}),(0,u.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,u.jsx)("span",{className:"block text-[14px] font-medium",children:t.name}),(0,u.jsx)("span",{className:"block text-[12px] leading-normal text-muted-foreground break-keep",children:t.description})]}),o&&(0,u.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"already added"}),(0,u.jsx)("span",{className:(0,nL.cn)("grid size-6 shrink-0 place-items-center rounded-full transition-colors",i?"bg-foreground text-background":"ring-1 ring-border/60 ring-inset"),children:i&&(0,u.jsx)(c.Check,{className:"size-3.5"})})]})},t.name)})}),(0,u.jsxs)("div",{className:"mt-auto flex items-center gap-3 border-t border-border/60 px-8 py-4",children:[(0,u.jsx)("span",{className:"flex-1 font-mono text-[11px] text-muted-foreground",children:0===i.length?"nothing ticked":`${i.length} of ${n2.BOT_SEEDS.length-e.size} ticked`}),(0,u.jsx)(b.Button,{variant:"ghost",onClick:()=>t(null),children:"Cancel"}),(0,u.jsx)(b.Button,{loading:a,disabled:0===i.length,onClick:()=>o(i.map(e=>({name:e.name}))),children:1===i.length?`Add ${i[0].name}`:`Add ${i.length} bots`})]})]})}function rs(e,t){return{seed:e||"bot",color:t?.color,shape:t?.shape,outline:t?.outline}}function ru({bot:e,jobs:t,onDone:n,onCancel:r}){let[o,a]=(0,n9.useObjectState)(()=>({name:e?.name??"",description:e?.description??"",systemPrompt:e?.systemPrompt??"",icon:e?.icon??(0,n1.randomBotIcon)(),provider:e?.provider??null,model:e?.model??"",toolIds:e?.tools.map(e=>e.id)??[]})),{name:i,description:l,systemPrompt:s,icon:c,provider:d,model:f,toolIds:p}=o,[h]=(0,n8.useServerAction)(n0,{onOk:()=>(0,re.revalidate)(g.queryKey.bot)}),v=t=>{e&&h(e.name,t)},[x,y,,E]=(0,n8.useServerAction)(nZ,{errorMessage:!1,okMessage:"Bot created",onOk:e=>{(0,re.revalidate)(g.queryKey.bot),n(e.name)}}),[w,S]=(0,n8.useServerAction)(nQ,{okMessage:"Bot deleted",onOk:()=>{(0,re.revalidate)(g.queryKey.bot),n(null)}}),k=i.trim()&&l.trim()&&d&&f.trim()&&!y,j=async()=>{!e||await nq.notify.confirm({title:`Delete ${e.name}?`,description:"The agent can no longer hand work to it.",okText:"Delete",destructive:!0})&&w(e.name)};return(0,u.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,u.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border/60 px-4",children:[(0,u.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:e?e.name:"New bot"}),e&&(0,u.jsx)(b.Button,{size:"icon-sm",variant:"ghost",loading:S,"aria-label":"Delete this bot",onClick:j,className:"text-muted-foreground hover:text-destructive",children:(0,u.jsx)(m.Trash2,{})})]}),(0,u.jsxs)("div",{className:"flex-1 space-y-5 p-6",children:[(0,u.jsxs)("div",{className:"flex items-start gap-4",children:[(0,u.jsx)(n5.BotMark,{size:72,...rs(i,c),className:"shrink-0"}),(0,u.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[e?(0,u.jsx)("p",{className:"truncate text-lg leading-8 font-medium",children:e.name}):(0,u.jsx)(nI.Input,{value:i,onChange:e=>a({name:e.target.value}),placeholder:"researcher",spellCheck:!1,maxLength:n7.COMMON_VALIDATE.name.max,autoFocus:!0}),(0,u.jsx)(nI.Input,{value:l,onChange:e=>a({description:e.target.value}),onBlur:()=>{let t=l.trim();e&&t&&t!==e.description&&v({description:t})},placeholder:"Searches the web and reports back",maxLength:n7.COMMON_VALIDATE.description.max})]})]}),(0,u.jsx)(rm,{icon:c,onChange:e=>{a({icon:e}),v({icon:e})}}),(0,u.jsx)(rd,{label:"Runs on",children:(0,u.jsx)(nY.ModelPicker,{provider:d,model:f,onChange:e=>{a({provider:e.provider,model:e.model}),e.model&&v(e)}})}),(0,u.jsx)(rd,{label:"Tools",children:(0,u.jsx)(rp,{selected:p,onChange:e=>{a({toolIds:e}),v({toolIds:e})}})}),(0,u.jsxs)(rd,{label:"Prompt",children:[(0,u.jsx)(nT.Textarea,{value:s,onChange:e=>a({systemPrompt:e.target.value}),onBlur:()=>{let t=s.trim();e&&t!==(e.systemPrompt??"")&&v({systemPrompt:t})},placeholder:`How it should work (optional). e.g.
|
|
2
2
|
Search the web, answer with a short summary and links.`,maxLength:n7.COMMON_VALIDATE.prompt.max,className:"max-h-48 min-h-24 resize-none overflow-y-auto text-sm"}),s.length>0&&(0,u.jsxs)("p",{className:"text-right font-mono text-[10px] text-muted-foreground",children:[s.length,"/",n7.COMMON_VALIDATE.prompt.max]})]}),e&&(0,u.jsx)(rf,{jobs:t}),!e&&(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,u.jsx)(b.Button,{variant:"ghost",onClick:r,children:"Cancel"}),(0,u.jsx)(b.Button,{loading:y,disabled:!k,onClick:()=>{k&&d&&x({name:i.trim(),description:l.trim(),systemPrompt:s.trim()||void 0,icon:c,provider:d,model:f.trim(),toolIds:p})},children:"Create"})]}),E&&(0,u.jsx)("p",{className:"font-mono text-xs text-destructive",children:E})]})]})}function rc({bot:e}){if(!e)return(0,u.jsx)(n3.SettingRailNote,{children:"Becomes a bot once it has a name and a model"});let t=e.tokens.input+e.tokens.output;return(0,u.jsx)(n3.SettingRailNote,{children:(0,u.jsxs)("span",{className:"font-mono text-[11px]",children:[e.name,(0,u.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),(0,u.jsx)("span",{title:`in ${(0,nL.formatCount)(e.tokens.input)} \xb7 out ${(0,nL.formatCount)(e.tokens.output)}`,children:t>0?`${(0,nL.formatCount)(t)} tokens`:"no tokens yet"}),(0,u.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),"since ",(0,n4.whenOf)(e.createdAt)]})})}function rd({label:e,children:t}){return(0,u.jsxs)("div",{className:"flex gap-3",children:[(0,u.jsx)("span",{className:"w-20 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:e}),(0,u.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:t})]})}function rf({jobs:e}){return(0,u.jsxs)("div",{className:"pt-1",children:[(0,u.jsxs)("div",{className:"flex h-6 items-center",children:[(0,u.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Recent"}),(0,u.jsx)("span",{className:"flex-1"}),(0,u.jsxs)("button",{type:"button",onClick:()=>(0,n6.openSettings)("tasks"),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,u.jsx)(d.History,{className:"size-3"}),"History"]})]}),0===e.length?(0,u.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Nothing handed over yet."}):e.map(e=>{let t=function(e){switch(e.status){case"waiting":return(0,n1.isBudgetAsk)(e.ask)?{text:"out of steps",tone:"text-muted-foreground"}:{text:"waiting on you",tone:nL.WAITING_INK};case"running":return{text:"working",tone:"text-muted-foreground"};case"failed":return{text:"failed",tone:"text-destructive"};default:return{text:"done",tone:"text-muted-foreground"}}}(e);return(0,u.jsxs)("div",{className:"flex h-9 items-center gap-3 border-t border-border/60 text-[13px]",children:[(0,u.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),(0,u.jsx)("span",{className:(0,nL.cn)("shrink-0 font-mono text-[11px]",t.tone),children:t.text}),(0,u.jsx)("span",{className:"w-28 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,n4.whenOf)(e.updatedAt)})]},e.id)})]})}function rm({icon:e,onChange:t}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(rd,{label:"Color",children:(0,u.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,u.jsx)(nX.Swatch,{color:null,picked:e.color===rt.MARK_SYSTEM,onPick:()=>t({...e,color:rt.MARK_SYSTEM})}),rt.MARK_PALETTE.map(n=>(0,u.jsx)(nX.Swatch,{color:n,picked:e.color===n,onPick:()=>t({...e,color:e.color===n?void 0:n})},n))]})}),(0,u.jsx)(rd,{label:"Face",children:(0,u.jsxs)("div",{className:"flex gap-1",children:[rt.MARK_SHAPES.map(n=>(0,u.jsx)("button",{type:"button",onClick:()=>t({...e,shape:e.shape===n?void 0:n}),className:(0,nL.cn)("rounded-md px-2 py-1 font-mono text-[11px] capitalize transition-colors",e.shape===n?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:n},n)),(0,u.jsx)("span",{className:"mx-1 w-px self-stretch bg-border/60"}),(0,u.jsx)("button",{type:"button",onClick:()=>t({...e,outline:!e.outline||void 0}),className:(0,nL.cn)("rounded-md px-2 py-1 font-mono text-[11px] transition-colors",e.outline?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"outline"})]})})]})}function rp({selected:e,onChange:t}){let{data:n=[]}=(0,re.useServerRoute)(g.queryKey.mcpTools),[r,o]=(0,v.useState)(!1),a=e.length>=n1.MAX_PINNED_TOOLS,i=[...new Set(n.map(e=>e.serverName))],l=e.map(e=>n.find(t=>t.id===e)).filter(e=>!!e),s=r?l:l.slice(0,4),d=l.length-s.length,f=n=>t(e.includes(n)?e.filter(e=>e!==n):[...e,n]);return 0===n.length?(0,u.jsx)("p",{className:"pt-1.5 text-xs text-muted-foreground",children:"Nothing to pin — connect an MCP server first (Settings › Connectors)."}):(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,u.jsx)(b.Button,{size:"icon-sm",variant:r?"secondary":"outline",onClick:()=>o(!r),"aria-label":"Pick tools",className:"border-dashed",children:(0,u.jsx)(p.Wrench,{})}),s.map(e=>(0,u.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-muted py-1 pr-1.5 pl-2.5 font-mono text-[11px]",children:[e.name,(0,u.jsx)("button",{type:"button","aria-label":`Unpin ${e.name}`,onClick:()=>f(e.id),className:"rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground",children:(0,u.jsx)(h.X,{className:"size-3"})})]},e.id)),d>0&&(0,u.jsxs)("button",{type:"button",onClick:()=>o(!0),className:"rounded-full bg-muted px-2.5 py-1 font-mono text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:["+",d]}),0===l.length&&(0,u.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loaded from the start — everything else stays searchable"}),(0,u.jsx)("span",{className:"flex-1"}),(0,u.jsxs)("span",{className:(0,nL.cn)("font-mono text-[11px] text-muted-foreground",a&&"text-foreground"),children:[e.length,"/",n1.MAX_PINNED_TOOLS]})]}),r&&(0,u.jsxs)(n$,{className:"rounded-lg border border-input",children:[(0,u.jsx)(nz,{placeholder:"Search tools"}),(0,u.jsxs)(nW,{className:"max-h-44",children:[(0,u.jsx)(nK,{children:"Nothing matches"}),i.map(t=>(0,u.jsx)(nU,{heading:t,children:n.filter(e=>e.serverName===t).map(t=>{let n=e.includes(t.id);return(0,u.jsxs)(nV,{value:`${t.serverName}/${t.name}`,disabled:!n&&a,onSelect:()=>f(t.id),children:[(0,u.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:t.name}),n&&(0,u.jsx)(c.Check,{className:"size-3.5 shrink-0"})]},t.id)})},t))]})]})]})}e.s(["BotSetting",0,function(){let{data:e,isLoading:t,error:n}=(0,re.useServerRoute)(g.queryKey.bot),r=e??[],{data:o}=(0,re.useServerRoute)(g.queryKey.taskHistory(null)),a=o??[],[i,l]=(0,v.useState)(null);if(t)return(0,u.jsx)(n3.SettingPanesSkeleton,{});if(n)return(0,u.jsx)(n3.SettingError,{message:n.message});let s=i===rn,c=new Set(r.map(e=>e.name)),d=n2.BOT_SEEDS.filter(e=>!c.has(e.name)),m=s||i===rr?null:r.find(e=>e.name===i)??r[0]??null;return(0,u.jsx)(n3.SettingPanes,{footer:i===rr?null:(0,u.jsx)(rc,{bot:m}),left:(0,u.jsxs)("div",{className:"flex flex-col py-2",children:[(0,u.jsxs)("button",{type:"button",onClick:()=>l(rn),className:(0,nL.cn)("mx-2 mb-1 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",s?"bg-secondary text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,u.jsx)(f.Plus,{className:"size-3.5 shrink-0"}),"New bot"]}),r.map(e=>(0,u.jsx)(ro,{bot:e,job:a.find(t=>t.bot===e.name)??null,active:!s&&e.name===m?.name,onPick:()=>l(e.name)},e.name)),d.length>0&&(0,u.jsx)(ri,{missing:d,active:i===rr,onPick:()=>l(rr)})]}),right:i===rr?(0,u.jsx)(rl,{have:c,onDone:e=>l(e)}):s?(0,u.jsx)(ru,{jobs:[],onDone:e=>l(e),onCancel:()=>l(null)},"new"):m?(0,u.jsx)(ru,{bot:m,jobs:a.filter(e=>e.bot===m.name).slice(0,3),onDone:()=>l(null)},m.name):(0,u.jsxs)("div",{className:"space-y-4 p-8",children:[(0,u.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"The agent talks; bots do the rest — search the web, draft a reply, check a schedule. Give one a job and a model, and work gets handed over mid-call while the conversation keeps going."}),(0,u.jsxs)(b.Button,{variant:"outline",onClick:()=>l(rn),children:[(0,u.jsx)(f.Plus,{}),"New bot"]})]})})}],507906)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(482022),s=e.i(829600),r=e.i(434322),a=e.i(905015),o=e.i(226091),l=e.i(569644),c=e.i(815170),d=e.i(456420);let u={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};u.node;let m=(0,d.default)(u);var f=e.i(51921),h=e.i(650639),x=e.i(759659),g=e.i(438583),p=e.i(271645),y=e.i(798120),v=e.i(167881),b=e.i(917162),j=e.i(671428),k=e.i(41533),N=e.i(95187);let w=(0,N.createServerReference)("7fdad44e62ddf8a72f8c27c74a9673daded0d24847",N.callServer,void 0,N.findSourceMapURL,"deleteArtifactAction");var S=e.i(895836),A=e.i(621285),C=e.i(492615),F=e.i(245629),$=e.i(609856),z=e.i(283653),T=e.i(647163);let R={markdown:o.FileText,csv:h.Sheet,json:a.FileJson,text:o.FileText,frame:r.FileCode2,image:c.Image,audio:f.Music,video:g.Video,none:s.File};function M({entry:e,active:n,onPick:i}){let s="set"===e.kind?m:R[e.view];return(0,t.jsxs)("button",{type:"button",onClick:i,title:`${e.name} \xb7 ${(0,F.shortAgo)(e.at)}`,className:(0,T.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(s,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===e.kind?e.count:(0,T.formatBytes)(e.bytes)})]})}function V({row:e,file:s,onOpen:r,onBack:a,onGone:o}){let[c]=(0,$.useServerAction)(C.openFileAction),[d,u]=(0,$.useServerAction)(w,{okMessage:"Deleted",onOk:()=>{(0,z.revalidate)(y.queryKey.artifacts),s?a():o()}}),m=s?{path:s.path,bytes:s.bytes,at:s.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,f=async e=>{await b.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&d(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:a,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,T.formatBytes)(m.bytes)} \xb7 ${(0,F.shortAgo)(m.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,F.shortAgo)(e.at)}`}),m&&(0,t.jsx)("a",{href:y.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ExternalLink,{className:"size-4"})}),(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>c(m?.path??e.path),children:(0,t.jsx)(l.FolderOpen,{})}),m&&(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:u,className:"text-muted-foreground",onClick:()=>f(m.path),children:(0,t.jsx)(x.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,t.jsx)(A.FilePreview,{path:m.path,bytes:m.bytes}):(0,t.jsx)(I,{name:e.name,onOpen:r})})]})}function I({name:e,onOpen:n}){let{data:i,isLoading:s,error:r}=(0,z.useServerRoute)(y.queryKey.artifactSet(e,k.ARTIFACT_VIEW.setFiles));if(s)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(j.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(r)return(0,t.jsx)(S.SettingError,{message:r.message});let a=i?.files??[];return 0===a.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(L,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),i&&i.total>a.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${a.length} of ${i.total.toLocaleString("en")} — the rest are in the folder`})]})}function L({file:e}){if("image"===e.view&&e.bytes<=k.WORKSPACE_VIEW.elementMax)return(0,t.jsx)("img",{src:y.queryKey.file(e.path),alt:e.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let n=R[e.view];return(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,t.jsx)(n,{className:"size-5"})})}function B({empty:e,onReveal:n}){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:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,t.jsxs)(v.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,p.useState)(null),[i,s]=(0,p.useState)(""),[r,a]=(0,p.useState)(k.ARTIFACT_VIEW.rows),{data:o,isLoading:c,error:d}=(0,z.useServerRoute)(y.queryKey.artifactShelf(r),{keepPreviousData:!0}),[u]=(0,$.useServerAction)(C.openFileAction);if(c)return(0,t.jsx)(S.SettingPanesSkeleton,{});if(d)return(0,t.jsx)(S.SettingError,{message:d.message});let m=o?.entries??[],f=o?.total??0,h=i.trim().toLowerCase(),x=h?m.filter(e=>e.name.toLowerCase().includes(h)):m,g=m.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(S.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let i=t>e.length?`${e.length} of ${t.toLocaleString("en")} artifacts`:`${t} ${1===t?"artifact":"artifacts"}`;return n>t?`${i} \xb7 ${n.toLocaleString("en")} files`:i}(m,f,o?.files??0)}`]})}),(0,t.jsxs)(v.Button,{variant:"outline",size:"sm",onClick:()=>u("artifacts"),children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(S.SettingFilter,{value:i,onChange:s,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===x.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:h?"Nothing matches":"Nothing here yet"}):x.map(e=>(0,t.jsx)(M,{entry:e,active:e.path===g?.path,onPick:()=>n({row:e,file:null})},e.path)),f>m.length&&(0,t.jsx)("button",{type:"button",onClick:()=>a(r+k.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.ARTIFACT_VIEW.rows,f-m.length)} more of ${f.toLocaleString("en")}`})]}),right:g?(0,t.jsx)(V,{row:g,file:e?.file??null,onOpen:e=>n({row:g,file:e}),onBack:()=>n({row:g,file:null}),onGone:()=>n(null)},g.path):(0,t.jsx)(B,{empty:0===f,onReveal:()=>u("artifacts")})})}],94682)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let c=(0,t.default)(l);e.s(["Video",0,c],438583)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(482022),s=e.i(829600),r=e.i(434322),a=e.i(905015),o=e.i(226091),l=e.i(569644),c=e.i(815170),d=e.i(456420);let u={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};u.node;let m=(0,d.default)(u);var f=e.i(51921),h=e.i(650639),x=e.i(759659),g=e.i(438583),p=e.i(271645),y=e.i(798120),v=e.i(167881),b=e.i(917162),j=e.i(671428),k=e.i(41533),N=e.i(95187);let w=(0,N.createServerReference)("7f3f437b7e31640c30158a87a505166dd8cf350e75",N.callServer,void 0,N.findSourceMapURL,"deleteArtifactAction");var S=e.i(895836),A=e.i(621285),C=e.i(186065),F=e.i(245629),$=e.i(609856),z=e.i(283653),T=e.i(647163);let R={markdown:o.FileText,csv:h.Sheet,json:a.FileJson,text:o.FileText,frame:r.FileCode2,image:c.Image,audio:f.Music,video:g.Video,none:s.File};function M({entry:e,active:n,onPick:i}){let s="set"===e.kind?m:R[e.view];return(0,t.jsxs)("button",{type:"button",onClick:i,title:`${e.name} \xb7 ${(0,F.shortAgo)(e.at)}`,className:(0,T.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(s,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===e.kind?e.count:(0,T.formatBytes)(e.bytes)})]})}function V({row:e,file:s,onOpen:r,onBack:a,onGone:o}){let[c]=(0,$.useServerAction)(C.openFileAction),[d,u]=(0,$.useServerAction)(w,{okMessage:"Deleted",onOk:()=>{(0,z.revalidate)(y.queryKey.artifacts),s?a():o()}}),m=s?{path:s.path,bytes:s.bytes,at:s.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,f=async e=>{await b.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&d(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:a,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,T.formatBytes)(m.bytes)} \xb7 ${(0,F.shortAgo)(m.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,F.shortAgo)(e.at)}`}),m&&(0,t.jsx)("a",{href:y.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ExternalLink,{className:"size-4"})}),(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>c(m?.path??e.path),children:(0,t.jsx)(l.FolderOpen,{})}),m&&(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:u,className:"text-muted-foreground",onClick:()=>f(m.path),children:(0,t.jsx)(x.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,t.jsx)(A.FilePreview,{path:m.path,bytes:m.bytes}):(0,t.jsx)(I,{name:e.name,onOpen:r})})]})}function I({name:e,onOpen:n}){let{data:i,isLoading:s,error:r}=(0,z.useServerRoute)(y.queryKey.artifactSet(e,k.ARTIFACT_VIEW.setFiles));if(s)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(j.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(r)return(0,t.jsx)(S.SettingError,{message:r.message});let a=i?.files??[];return 0===a.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(L,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),i&&i.total>a.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${a.length} of ${i.total.toLocaleString("en")} — the rest are in the folder`})]})}function L({file:e}){if("image"===e.view&&e.bytes<=k.WORKSPACE_VIEW.elementMax)return(0,t.jsx)("img",{src:y.queryKey.file(e.path),alt:e.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let n=R[e.view];return(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,t.jsx)(n,{className:"size-5"})})}function B({empty:e,onReveal:n}){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:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,t.jsxs)(v.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,p.useState)(null),[i,s]=(0,p.useState)(""),[r,a]=(0,p.useState)(k.ARTIFACT_VIEW.rows),{data:o,isLoading:c,error:d}=(0,z.useServerRoute)(y.queryKey.artifactShelf(r),{keepPreviousData:!0}),[u]=(0,$.useServerAction)(C.openFileAction);if(c)return(0,t.jsx)(S.SettingPanesSkeleton,{});if(d)return(0,t.jsx)(S.SettingError,{message:d.message});let m=o?.entries??[],f=o?.total??0,h=i.trim().toLowerCase(),x=h?m.filter(e=>e.name.toLowerCase().includes(h)):m,g=m.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(S.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let i=t>e.length?`${e.length} of ${t.toLocaleString("en")} artifacts`:`${t} ${1===t?"artifact":"artifacts"}`;return n>t?`${i} \xb7 ${n.toLocaleString("en")} files`:i}(m,f,o?.files??0)}`]})}),(0,t.jsxs)(v.Button,{variant:"outline",size:"sm",onClick:()=>u("artifacts"),children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(S.SettingFilter,{value:i,onChange:s,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===x.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:h?"Nothing matches":"Nothing here yet"}):x.map(e=>(0,t.jsx)(M,{entry:e,active:e.path===g?.path,onPick:()=>n({row:e,file:null})},e.path)),f>m.length&&(0,t.jsx)("button",{type:"button",onClick:()=>a(r+k.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.ARTIFACT_VIEW.rows,f-m.length)} more of ${f.toLocaleString("en")}`})]}),right:g?(0,t.jsx)(V,{row:g,file:e?.file??null,onOpen:e=>n({row:g,file:e}),onBack:()=>n({row:g,file:null}),onGone:()=>n(null)},g.path):(0,t.jsx)(B,{empty:0===f,onReveal:()=>u("artifacts")})})}],94682)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let c=(0,t.default)(l);e.s(["Video",0,c],438583)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let i={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};i.node;let s=(0,n.default)(i),o={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};o.node;let r=(0,n.default)(o);var a=e.i(689664),l=e.i(867927);let d={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"}]]};d.node;let c=(0,n.default)(d);var u=e.i(815170),g=e.i(466787),m=e.i(271645),h=e.i(798120),f=e.i(167881),x=e.i(23750),k=e.i(917162),p=e.i(146538),y=e.i(968978),v=e.i(265402),j=e.i(635963),b=e.i(95187);let N=(0,b.createServerReference)("
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let i={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};i.node;let s=(0,n.default)(i),o={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};o.node;let r=(0,n.default)(o);var a=e.i(689664),l=e.i(867927);let d={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"}]]};d.node;let c=(0,n.default)(d);var u=e.i(815170),g=e.i(466787),m=e.i(271645),h=e.i(798120),f=e.i(167881),x=e.i(23750),k=e.i(917162),p=e.i(146538),y=e.i(968978),v=e.i(265402),j=e.i(635963),b=e.i(95187);let N=(0,b.createServerReference)("7f25c6b89ec9d7c8f1bbbd8a43e823b5f135abdb02",b.callServer,void 0,b.findSourceMapURL,"removeConfigAction");var S=e.i(131531),C=e.i(992112),M=e.i(895836),A=e.i(609856),w=e.i(283653),z=e.i(647163);let R={image:u.Image,video:c,speech:s,transcription:r};function I({section:e}){let{data:n,isLoading:i,error:s}=(0,w.useServerRoute)(h.queryKey.config);if(i)return(0,t.jsx)(M.SettingSkeleton,{rows:4});if(s)return(0,t.jsx)(M.SettingError,{message:s.message});let o=e=>(0,C.isConfigSet)(n,e),r=e=>n?.find(t=>t.key===e)?.value,a=C.CONFIG_GROUPS.filter(t=>t.section===e),l=a.flatMap(e=>e.entries);return(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsx)(M.SettingRailNote,{children:"keys"===e?(0,t.jsxs)(t.Fragment,{children:[l.filter(e=>o(e.key)).length," of"," ",l.length," set",a.some(e=>!(0,C.groupSatisfied)(e,o))?" · a call needs one voice key":" · your keys stay on this machine"]}):(0,t.jsxs)(t.Fragment,{children:[l.length," of ",l.length," resolved ·"," ",l.filter(e=>r(e.key)).length," pinned"]})}),children:a.map(e=>(0,t.jsx)(M.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(K,{group:e,isSet:o}),children:(0,t.jsx)(M.SettingItems,{children:e.entries.map(n=>n.choices?(0,t.jsx)($,{entry:n,choices:n.choices,value:r(n.key),isSet:o},n.key):(0,t.jsx)(T,{entry:n,set:o(n.key),needed:!(0,C.groupSatisfied)(e,o)},n.key))})},e.id))})}function K({group:e,isSet:n}){return"none"===e.require?null:(0,C.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(a.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,z.cn)("flex items-center gap-1 font-mono text-[11px]",z.WAITING_INK),children:[(0,t.jsx)(g.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function T({entry:e,set:n,needed:i}){return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s;return i=e,s=n,k.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(O,{entry:i,set:s,onDone:e})})},className:"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",children:[e.provider&&(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(y.ProviderIcon,{provider:e.provider,className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.key})]}),(0,t.jsxs)("span",{className:(0,z.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",n?"text-muted-foreground":i?z.WAITING_INK:"text-muted-foreground/60"),children:[n&&(0,t.jsx)(a.Check,{className:"size-3"}),!n&&i&&(0,t.jsx)(g.TriangleAlert,{className:"size-3"}),n?"Set":i?"Needed":"Not set"]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function $({entry:e,choices:n,value:i,isSet:s}){let o=n.find(e=>e.value===i),r=n.filter(e=>s(e.needs)),a=i&&!o?i:null,d=e.kind?R[e.kind]:j.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s,o;return e.kind||e.text?(i=e,k.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(q,{entry:i,onDone:e})})):(s=e,o=n,k.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(B,{entry:s,choices:o,onDone:e})}))},className:"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",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(d,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!o&&!a&&(0,t.jsx)("span",{className:(0,z.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?z.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:o?.label??a??(e.kind?"Not offered to bots until you pick one":r[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function q({entry:e,onDone:n}){let{data:i}=(0,w.useServerRoute)(h.queryKey.config),s=i?.find(t=>t.key===e.key)?.value,[o,r]=(0,m.useState)(()=>{let t=e.text?(0,v.parseTextModel)(s):(0,v.parseMediaModel)(s);return{provider:t?.provider??null,model:t?.model??""}}),a=()=>{(0,w.revalidate)(h.queryKey.config),n()},[l]=(0,A.useServerAction)(S.setConfigAction,{okMessage:`${e.label} saved`,onOk:a}),[d,c]=(0,A.useServerAction)(N,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:a});return(0,t.jsx)(M.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(f.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(f.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(p.ModelPicker,{kind:e.kind,provider:o.provider,model:o.model,onChange:t=>{r(t),t.model.trim()&&l(e.key,`${t.provider}/${t.model.trim()}`)}})})}function B({entry:e,choices:n,onDone:i}){let{data:s}=(0,w.useServerRoute)(h.queryKey.config),o=s?.find(t=>t.key===e.key)?.value,r=()=>{(0,w.revalidate)(h.queryKey.config),i()},[a,l]=(0,A.useServerAction)(S.setConfigAction,{okMessage:`${e.label} saved`,onOk:r}),[d,c]=(0,A.useServerAction)(N,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:r});return(0,t.jsx)(M.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)(f.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(f.Button,{variant:"ghost",onClick:i,children:"Close"})]}),children:(0,t.jsx)(M.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,C.isConfigSet)(s,e.needs)&&`needs ${e.needs}`})),value:o,onChange:t=>a(e.key,t),disabled:l})})}function O({entry:e,set:n,onDone:i}){let[s,o]=(0,m.useState)(""),r=()=>{(0,w.revalidate)(h.queryKey.config),(0,w.revalidate)(h.queryKey.llmModel)},[a,l]=(0,A.useServerAction)(S.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{r(),i()}}),[d,c]=(0,A.useServerAction)(N,{okMessage:`${e.label} key removed`,onOk:()=>{r(),i()}});return(0,t.jsx)(M.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(f.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:"Remove"}),(0,t.jsx)(f.Button,{variant:"ghost",onClick:i,children:"Cancel"}),(0,t.jsx)(f.Button,{loading:l,disabled:s.trim().length<8,onClick:()=>a(e.key,s),children:n?"Replace":"Save"})]}),children:(0,t.jsx)(x.Input,{value:s,onChange:e=>o(e.target.value),onKeyDown:t=>{"Enter"===t.key&&s.trim().length>=8&&a(e.key,s)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0})})}e.s(["ConfigGroups",0,I,"ConfigSetting",0,function(){return(0,t.jsx)(I,{section:"keys"})}],805995)}]);
|