browsentic 0.7.4 → 0.7.5

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.
@@ -1 +1 @@
1
- import{S as e,_ as t,f as n,g as r,h as i,i as a,m as o,o as s,p as c,v as l,x as u,y as d}from"./globals-Bis7MDt7.js";import{B as f,K as p,V as m,_ as h,g,h as _,m as v,p as y,r as b,t as x}from"./use-voice-composer-DfBR4M8I.js";var S=t(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),C=e(d(),1),w=e(u(),1),T=c(),E={unpaired:`Pair this browser to start`,offline:`The daemon isn’t answering — start browsentic`,agent:`That agent cannot run — pick another below`};function D(){let e=h(),t=b(),[a,c]=(0,w.useState)(!1),u=e?.paired??!1;async function d(){let e=await l.windows.getCurrent();e.id!=null&&(await y(e.id),window.close())}let C=x({active:a&&(e?.connected??!1),onSubmit:e=>{c(!1),t.send(e),d()}}),D=m(e,{running:t.running,listening:a&&C.listening}),O=D.ready;function k(){O&&C.submitNow()}function A(){if(C.supported){if(a&&C.needsGrant){C.grant();return}if(a&&C.error){C.retry();return}c(e=>!e)}}let j=D.blocker?E[D.blocker]:C.needsGrant?`${C.error} Tap to allow it.`:C.error?C.error:a&&C.listening?C.interim||`Listening… speak, then pause`:t.running?`Working — open the side panel to watch`:C.supported?`Tap to talk, or type below`:`Type your instruction below`;return(0,T.jsxs)(`div`,{className:`flex w-[22rem] flex-col`,children:[(0,T.jsxs)(`header`,{className:`flex items-center gap-2 px-4 py-3`,children:[(0,T.jsx)(n,{className:`flex-1`}),(0,T.jsx)(f,{tone:D.tone,children:D.label})]}),u&&(0,T.jsxs)(`main`,{className:`dot-grid flex flex-col items-center gap-4 border-y border-line px-4 py-6`,children:[(0,T.jsxs)(`button`,{type:`button`,"aria-label":a?`Stop listening`:`Start listening`,onClick:A,disabled:!O||!C.supported,className:o(`relative flex size-20 items-center justify-center rounded-full border transition-all outline-none`,`focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-ground`,(!O||!C.supported)&&`opacity-40`,a?`border-magenta/60 bg-magenta/15 text-magenta`:`glow-brand border-brand/50 bg-brand/10 text-brand enabled:hover:scale-105 enabled:hover:bg-brand/20`),children:[a&&C.listening&&(0,T.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-magenta/25`}),a?(0,T.jsx)(r,{className:`size-8`}):(0,T.jsx)(i,{className:`size-8`})]}),(0,T.jsx)(`p`,{className:o(`min-h-8 text-center text-xs leading-relaxed`,C.error||!D.ready?`text-amber`:`text-ink-dim`),children:j}),(0,T.jsxs)(`form`,{className:`flex w-full gap-1.5`,onSubmit:e=>{e.preventDefault(),k()},children:[(0,T.jsx)(_,{value:C.input,onChange:e=>C.setInput(e.target.value),placeholder:`What should I do?`,"aria-label":`Instruction for Browsentic`,className:`h-8 text-xs`,disabled:!O}),(0,T.jsx)(s,{type:`submit`,size:`sm`,"aria-label":`Send`,disabled:!O||!C.input.trim(),children:(0,T.jsx)(p,{})})]}),(0,T.jsxs)(s,{variant:`outline`,size:`sm`,className:`w-full`,onClick:d,children:[(0,T.jsx)(S,{}),` Open the side panel`]})]}),(0,T.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,T.jsx)(v,{}),(0,T.jsx)(g,{})]})]})}a(),C.createRoot(document.getElementById(`root`)).render((0,T.jsx)(w.StrictMode,{children:(0,T.jsx)(D,{})}));
1
+ import{S as e,_ as t,f as n,g as r,h as i,i as a,m as o,o as s,p as c,v as l,x as u,y as d}from"./globals-Bis7MDt7.js";import{B as f,K as p,V as m,_ as h,g,h as _,m as v,p as y,r as b,t as x}from"./use-voice-composer-DqX_NzK_.js";var S=t(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),C=e(d(),1),w=e(u(),1),T=c(),E={unpaired:`Pair this browser to start`,offline:`The daemon isn’t answering — start browsentic`,agent:`That agent cannot run — pick another below`};function D(){let e=h(),t=b(),[a,c]=(0,w.useState)(!1),u=e?.paired??!1;async function d(){let e=await l.windows.getCurrent();e.id!=null&&(await y(e.id),window.close())}let C=x({active:a&&(e?.connected??!1),onSubmit:e=>{c(!1),t.send(e),d()}}),D=m(e,{running:t.running,listening:a&&C.listening}),O=D.ready;function k(){O&&C.submitNow()}function A(){if(C.supported){if(a&&C.needsGrant){C.grant();return}if(a&&C.error){C.retry();return}c(e=>!e)}}let j=D.blocker?E[D.blocker]:C.needsGrant?`${C.error} Tap to allow it.`:C.error?C.error:a&&C.listening?C.interim||`Listening… speak, then pause`:t.running?`Working — open the side panel to watch`:C.supported?`Tap to talk, or type below`:`Type your instruction below`;return(0,T.jsxs)(`div`,{className:`flex w-[22rem] flex-col`,children:[(0,T.jsxs)(`header`,{className:`flex items-center gap-2 px-4 py-3`,children:[(0,T.jsx)(n,{className:`flex-1`}),(0,T.jsx)(f,{tone:D.tone,children:D.label})]}),u&&(0,T.jsxs)(`main`,{className:`dot-grid flex flex-col items-center gap-4 border-y border-line px-4 py-6`,children:[(0,T.jsxs)(`button`,{type:`button`,"aria-label":a?`Stop listening`:`Start listening`,onClick:A,disabled:!O||!C.supported,className:o(`relative flex size-20 items-center justify-center rounded-full border transition-all outline-none`,`focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-ground`,(!O||!C.supported)&&`opacity-40`,a?`border-magenta/60 bg-magenta/15 text-magenta`:`glow-brand border-brand/50 bg-brand/10 text-brand enabled:hover:scale-105 enabled:hover:bg-brand/20`),children:[a&&C.listening&&(0,T.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-magenta/25`}),a?(0,T.jsx)(r,{className:`size-8`}):(0,T.jsx)(i,{className:`size-8`})]}),(0,T.jsx)(`p`,{className:o(`min-h-8 text-center text-xs leading-relaxed`,C.error||!D.ready?`text-amber`:`text-ink-dim`),children:j}),(0,T.jsxs)(`form`,{className:`flex w-full gap-1.5`,onSubmit:e=>{e.preventDefault(),k()},children:[(0,T.jsx)(_,{value:C.input,onChange:e=>C.setInput(e.target.value),placeholder:`What should I do?`,"aria-label":`Instruction for Browsentic`,className:`h-8 text-xs`,disabled:!O}),(0,T.jsx)(s,{type:`submit`,size:`sm`,"aria-label":`Send`,disabled:!O||!C.input.trim(),children:(0,T.jsx)(p,{})})]}),(0,T.jsxs)(s,{variant:`outline`,size:`sm`,className:`w-full`,onClick:d,children:[(0,T.jsx)(S,{}),` Open the side panel`]})]}),(0,T.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,T.jsx)(v,{}),(0,T.jsx)(g,{})]})]})}a(),C.createRoot(document.getElementById(`root`)).render((0,T.jsx)(w.StrictMode,{children:(0,T.jsx)(D,{})}));
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,a as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v,x as y,y as b}from"./globals-Bis7MDt7.js";import{A as x,B as S,C,D as w,E as T,F as E,G as D,H as O,I as ee,J as k,K as te,L as A,M as j,N as M,O as N,P,R as F,S as I,T as L,U as R,V as ne,W as re,X as z,Y as ie,_ as ae,a as oe,b as se,c as ce,d as le,f as ue,g as de,h as fe,i as pe,j as me,k as he,l as ge,m as _e,n as ve,o as ye,q as be,r as xe,s as B,t as Se,u as Ce,v as we,x as Te,y as Ee,z as De}from"./use-voice-composer-DfBR4M8I.js";var Oe=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),V=t(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),ke=t(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Ae=t(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),je=t(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),H=t(`clapperboard`,[[`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`}]]),Me=t(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Ne=t(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Pe=t(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Fe=t(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Ie=t(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Le=t(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Re=t(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ze=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),Be=t(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),U=t(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ve=t(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),He=t(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]),Ue=t(`images`,[[`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`}]]),We=t(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ge=t(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ke=t(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),qe=t(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Je=t(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Ye=t(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Xe=t(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),Ze=t(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),Qe=t(`move-vertical`,[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m8 18 4 4 4-4`,key:`bh5tu3`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}]]),$e=t(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),et=t(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),tt=t(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),nt=t(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),rt=t(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),it=t(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),at=t(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ot=t(`scan-eye`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0`,key:`11ak4c`}]]),st=t(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ct=t(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),lt=t(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ut=t(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),dt=t(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ft=t(`square-slash`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),pt=t(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),mt=t(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ht=t(`text-cursor-input`,[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]),gt=t(`trash-2`,[[`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`}]]),_t=t(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),vt=t(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),yt=t(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),bt=t(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),W=t(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),xt=t(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),G=e(y(),1),St=e(b(),1),Ct=[`general`,`site-exploration`],wt=/^[a-z0-9][a-z0-9-]{0,47}$/,Tt=32*1024,Et=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/,Dt=300,Ot=3,kt=60;function At(e){let t=/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!t)return{fields:{},body:e};let n={};for(let e of t[1].split(/\r?\n/)){let t=e.indexOf(`:`);t>0&&(n[e.slice(0,t).trim()]=e.slice(t+1).trim())}return{fields:n,body:e.slice(t[0].length)}}function jt(e){return e?e.replace(/^\[|\]$/g,``).split(`,`).map(e=>e.trim().replace(/^['"]|['"]$/g,``)).filter(Boolean):[]}function Mt(e){return e?.trim()===`site-exploration`?`site-exploration`:`general`}function Nt(e){return e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim()}function Pt(e){try{return new URL(e).hostname.toLowerCase()}catch{return``}}function Ft(e){let t=e.trim().toLowerCase();return t?(t.includes(`://`)?Pt(t):t).replace(/^\/+|\/+$/g,``).split(`/`)[0].split(`:`)[0].replace(/^\.+|\.+$/g,``):``}function It(e){return e===`localhost`||e.length<=253&&Et.test(e)}function Lt(e,t){return Rt(e,t).length>0}function Rt(e,t){let n=e.toLowerCase();return n?t.filter(e=>n===e||n.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length):[]}function zt(e,t={}){let n=e.name.trim().toLowerCase();if(!n)return K(`Give the skill a name.`);if(!wt.test(n))return K(`Names use lowercase letters, digits and hyphens only, starting with a letter or digit (max 48).`);if(t.reservedNames?.some(e=>e.toLowerCase()===n))return K(`"${n}" is the name of a built-in skill. Pick another.`);let r=Nt(e.description).slice(0,Dt),i=e.category;if(!Ct.includes(i))return K(`Unknown category "${String(i)}".`);let a=Ht(e.domains.map(Ft).filter(Boolean));if(i===`site-exploration`){if(!a.length)return K(`A site-exploration skill needs at least one domain, like acme.com.`);if(a.length>20)return K(`At most 20 domains.`);for(let e of a){if(e.includes(`*`))return K(`"${e}" — wildcards are not supported; subdomains match automatically.`);if(!It(e))return K(`"${e}" is not a domain. Use something like acme.com.`)}}let o=i===`site-exploration`?[]:Ht(e.triggers.map(e=>Nt(e).toLowerCase()).filter(Boolean));if(o.length>30)return K(`At most 30 triggers.`);for(let e of o)if(e.length<Ot||e.length>kt)return K(`Trigger "${e}" must be ${Ot}–${kt} characters.`);let s=At(e.body.replace(/\r\n/g,`
1
+ import{S as e,_ as t,a as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v,x as y,y as b}from"./globals-Bis7MDt7.js";import{A as x,B as S,C,D as w,E as T,F as E,G as D,H as O,I as ee,J as k,K as te,L as A,M as j,N as M,O as N,P,R as F,S as I,T as L,U as R,V as ne,W as re,X as z,Y as ie,_ as ae,a as oe,b as se,c as ce,d as le,f as ue,g as de,h as fe,i as pe,j as me,k as he,l as ge,m as _e,n as ve,o as ye,q as be,r as xe,s as B,t as Se,u as Ce,v as we,x as Te,y as Ee,z as De}from"./use-voice-composer-DqX_NzK_.js";var Oe=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),V=t(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),ke=t(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Ae=t(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),je=t(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),H=t(`clapperboard`,[[`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`}]]),Me=t(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Ne=t(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Pe=t(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Fe=t(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Ie=t(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Le=t(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Re=t(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ze=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),Be=t(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),U=t(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ve=t(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),He=t(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]),Ue=t(`images`,[[`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`}]]),We=t(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ge=t(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ke=t(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),qe=t(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Je=t(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Ye=t(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Xe=t(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),Ze=t(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),Qe=t(`move-vertical`,[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m8 18 4 4 4-4`,key:`bh5tu3`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}]]),$e=t(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),et=t(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),tt=t(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),nt=t(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),rt=t(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),it=t(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),at=t(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ot=t(`scan-eye`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0`,key:`11ak4c`}]]),st=t(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ct=t(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),lt=t(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ut=t(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),dt=t(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ft=t(`square-slash`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),pt=t(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),mt=t(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ht=t(`text-cursor-input`,[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]),gt=t(`trash-2`,[[`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`}]]),_t=t(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),vt=t(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),yt=t(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),bt=t(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),W=t(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),xt=t(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),G=e(y(),1),St=e(b(),1),Ct=[`general`,`site-exploration`],wt=/^[a-z0-9][a-z0-9-]{0,47}$/,Tt=32*1024,Et=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/,Dt=300,Ot=3,kt=60;function At(e){let t=/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!t)return{fields:{},body:e};let n={};for(let e of t[1].split(/\r?\n/)){let t=e.indexOf(`:`);t>0&&(n[e.slice(0,t).trim()]=e.slice(t+1).trim())}return{fields:n,body:e.slice(t[0].length)}}function jt(e){return e?e.replace(/^\[|\]$/g,``).split(`,`).map(e=>e.trim().replace(/^['"]|['"]$/g,``)).filter(Boolean):[]}function Mt(e){return e?.trim()===`site-exploration`?`site-exploration`:`general`}function Nt(e){return e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim()}function Pt(e){try{return new URL(e).hostname.toLowerCase()}catch{return``}}function Ft(e){let t=e.trim().toLowerCase();return t?(t.includes(`://`)?Pt(t):t).replace(/^\/+|\/+$/g,``).split(`/`)[0].split(`:`)[0].replace(/^\.+|\.+$/g,``):``}function It(e){return e===`localhost`||e.length<=253&&Et.test(e)}function Lt(e,t){return Rt(e,t).length>0}function Rt(e,t){let n=e.toLowerCase();return n?t.filter(e=>n===e||n.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length):[]}function zt(e,t={}){let n=e.name.trim().toLowerCase();if(!n)return K(`Give the skill a name.`);if(!wt.test(n))return K(`Names use lowercase letters, digits and hyphens only, starting with a letter or digit (max 48).`);if(t.reservedNames?.some(e=>e.toLowerCase()===n))return K(`"${n}" is the name of a built-in skill. Pick another.`);let r=Nt(e.description).slice(0,Dt),i=e.category;if(!Ct.includes(i))return K(`Unknown category "${String(i)}".`);let a=Ht(e.domains.map(Ft).filter(Boolean));if(i===`site-exploration`){if(!a.length)return K(`A site-exploration skill needs at least one domain, like acme.com.`);if(a.length>20)return K(`At most 20 domains.`);for(let e of a){if(e.includes(`*`))return K(`"${e}" — wildcards are not supported; subdomains match automatically.`);if(!It(e))return K(`"${e}" is not a domain. Use something like acme.com.`)}}let o=i===`site-exploration`?[]:Ht(e.triggers.map(e=>Nt(e).toLowerCase()).filter(Boolean));if(o.length>30)return K(`At most 30 triggers.`);for(let e of o)if(e.length<Ot||e.length>kt)return K(`Trigger "${e}" must be ${Ot}–${kt} characters.`);let s=At(e.body.replace(/\r\n/g,`
2
2
  `)).body.trim();return s?Bt(s)>32768?K(`The skill is larger than ${Math.round(Tt/1024)} KB. Trim it down.`):{ok:!0,draft:{name:n,description:r,category:i,domains:a,triggers:o,body:s}}:K(`The skill has no instructions — add some markdown below the front matter.`)}function Bt(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=1:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t}function Vt(e,t){let{fields:n,body:r}=At(e.replace(/\r\n/g,`
3
3
  `)),i=Ft(t.replace(/\.(md|markdown)$/i,``)).replace(/[^a-z0-9-]+/g,`-`).replace(/^-+|-+$/g,``);return{name:(n.name||i).toLowerCase(),description:n.description??``,category:Mt(n.category),domains:jt(n.domains).map(Ft).filter(Boolean),triggers:jt(n.triggers).map(e=>e.toLowerCase()),body:r.trim()}}function Ht(e){return[...new Set(e)]}function K(e){return{ok:!1,message:e}}var Ut=48;function Wt(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`)return null;let n=t.hostname.toLowerCase().replace(/^www\./,``);if(!n)return null;let[r=``]=t.pathname.split(`/`).filter(Boolean);return{host:n,segment:qt(r)||`root`}}function Gt(e,t){return`${e.host}:${e.segment}:${t}`}function Kt(e,t){let n=Wt(t);return!!n&&n.host===e.host&&n.segment===e.segment}function qt(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,Ut).replace(/-+$/,``)}var Jt=`/context`,Yt=`/remove-tools`,Xt=`Review the tools you saved, and delete any you are done with.`,Zt=e=>e.trim().toLowerCase()===Yt,Qt=`See what this conversation carries — messages, files, recordings, tabs.`,q=p(),$t={tool:0,command:1,site:2,general:3,agent:4,"other-site":5};function en(e,t,n,r=[]){let i=Pt(t),a=[{key:`command:context`,group:`command`,name:`context`,description:Qt,command:Jt}];r.length&&a.push({key:`command:remove-tools`,group:`command`,name:`remove-tools`,description:Xt,command:Yt});for(let e of r)Kt(e.scope,t)&&a.push({key:`tool:${e.id}`,group:`tool`,name:e.name,description:e.description,savedToolId:e.id});for(let t of e?.skills??[]){let e=t.category===`site-exploration`?i&&Lt(i,t.domains)?`site`:`other-site`:`general`;a.push({key:`${e}:${t.name}`,group:e,name:t.name,description:t.description})}for(let t of e?.agentSkills??[])a.push({key:`agent:${t.id}`,group:`agent`,name:t.name,description:t.description,agentSkillId:t.id});let o=n.trim().toLowerCase();return(o?a.filter(e=>e.name.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)):a).sort((e,t)=>$t[e.group]-$t[t.group]||e.name.localeCompare(t.name))}function tn({items:e,agent:t,highlight:n,onHover:r,onSelect:i}){let a={tool:`Your tools`,command:`Commands`,site:`On this site`,general:`Browsentic skills`,agent:`${t?O[t].label:`Agent`} skills`,"other-site":`Other sites`};return(0,q.jsx)(`div`,{role:`listbox`,"aria-label":`Skills and commands`,className:`enters absolute inset-x-0 bottom-full z-20 mb-2 max-h-64 overflow-y-auto rounded-xl border border-line bg-surface shadow-lg`,children:e.length===0?(0,q.jsx)(`p`,{className:`px-3 py-2.5 text-[11px] text-ink-faint`,children:`Nothing matches — keep typing, or press Escape.`}):e.map((t,o)=>(0,q.jsxs)(`div`,{children:[(o===0||e[o-1].group!==t.group)&&(0,q.jsx)(`p`,{className:`px-3 pt-2 pb-1 font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:a[t.group]}),(0,q.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":o===n,onMouseEnter:()=>r(o),onMouseDown:e=>{e.preventDefault(),i(t)},className:u(`flex w-full items-start gap-2 px-3 py-1.5 text-left transition-colors`,o===n?`bg-brand/12`:`hover:bg-ground/40`),children:[t.group===`tool`?(0,q.jsx)(xt,{className:`mt-0.5 size-3 shrink-0 text-lime`}):t.group===`command`?(0,q.jsx)(ft,{className:`mt-0.5 size-3 shrink-0 text-amber`}):t.group===`agent`?(0,q.jsx)(ut,{className:`mt-0.5 size-3 shrink-0 text-brand`}):t.group===`general`?(0,q.jsx)(V,{className:`mt-0.5 size-3 shrink-0 text-ink-faint`}):(0,q.jsx)(U,{className:`mt-0.5 size-3 shrink-0 text-ink-faint`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block truncate text-xs font-medium text-ink`,children:t.name}),t.description&&(0,q.jsx)(`span`,{className:`block truncate text-[11px] text-ink-dim`,children:t.description})]})]})]},t.key))})}function nn({className:e,...t}){return(0,q.jsx)(`textarea`,{"data-slot":`textarea`,className:u(`field-sizing-content flex min-h-16 w-full rounded-lg border border-line-strong bg-ground/60 px-3 py-2 text-sm text-ink outline-none transition-colors`,`placeholder:text-ink-faint selection:bg-brand/30 selection:text-ink`,`focus-visible:border-brand/55`,`disabled:cursor-not-allowed disabled:opacity-45`,e),...t})}async function rn(){let[e]=await v.tabs.query({active:!0,currentWindow:!0});if(e?.id==null)return{error:`No active tab to point at`};let t=await we({id:e.id,windowId:e.windowId});if(!t.ok)return t.error.code===`PICK_CANCELLED`?{cancelled:!0}:{error:t.error.message};let{element:n,content:r,truncated:i,url:a,title:o,shot:s}=t.data;return{focus:{tag:n.tag,role:n.role,selector:n.selector,label:n.text,content:r,truncated:i,url:a,title:o,shot:s?.dataUrl}}}var an=e=>e.label?.trim()||e.role||e.tag;function on({voice:e,voiceEnabled:t,connected:n,running:r,files:i,attachError:a,catalog:o,tabUrl:l,attachedSkill:d,focus:p,picking:m,liveTools:h,onToggleLiveTools:g,onAttachSkill:_,onCommand:v,tools:y,onRunTool:b,onSend:x,onStop:S,onToggleVoice:C,onPick:w,onClearFocus:T,onAttachPage:E,onAttachFile:D,onRemoveFile:O,onRetryFile:ee}){let k=(0,G.useRef)(null),A=(0,G.useRef)(null),j=e.input.startsWith(`/`)?e.input.slice(1):null,M=j!==null&&n,[N,P]=(0,G.useState)(0),F=(0,G.useMemo)(()=>M?en(o,l,j??``,y):[],[M,o,l,j,y]);(0,G.useEffect)(()=>P(0),[j]);let{cancelPending:I}=e;(0,G.useEffect)(()=>{M&&I()},[M,I]);function L(t){t.savedToolId?(e.setInput(``),b(t.savedToolId)):t.command?(e.setInput(``),v(t.command)):t.agentSkillId?(_({id:t.agentSkillId,name:t.name}),e.setInput(``)):e.setInput(`@${t.name} `),A.current?.focus()}function R(e){e.target.closest(`button, textarea`)||A.current?.focus()}return(0,q.jsxs)(q.Fragment,{children:[a&&(0,q.jsx)(`p`,{className:`mb-2 rounded-lg border border-amber/40 bg-amber/10 px-2.5 py-1.5 text-[11px] text-amber`,children:a}),(0,q.jsx)(sn,{focus:p,picking:m,onClear:T}),d&&(0,q.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 rounded-xl border border-brand/35 bg-brand/8 px-2.5 py-1.5 text-xs`,children:[(0,q.jsx)(ut,{className:`size-3.5 shrink-0 text-brand`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-ink`,children:[`Skill attached: `,(0,q.jsx)(`span`,{className:`font-medium`,children:d.name})]}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>_(null),"aria-label":`Detach ${d.name}`,className:`shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3`})})]}),h&&(0,q.jsxs)(`div`,{className:`enters mb-2 flex items-center gap-2 rounded-xl border border-ember/40 bg-ember/8 px-2.5 py-1.5 text-xs`,children:[(0,q.jsx)(Me,{className:`size-3.5 shrink-0 text-ember`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 text-ink-dim`,children:[(0,q.jsx)(`span`,{className:`font-medium text-ink`,children:`Live tool on`}),` — the agent may write a script for this page. You approve the code first.`]}),(0,q.jsx)(`button`,{type:`button`,onClick:g,"aria-label":`Turn live tools off`,className:`shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3`})})]}),(0,q.jsx)(ln,{files:i,onRemove:O,onRetry:ee}),(0,q.jsx)(cn,{voice:e,voiceEnabled:t}),(0,q.jsxs)(`div`,{onClick:R,className:u(`panel-card relative flex flex-col rounded-2xl transition-colors has-[textarea:focus]:border-brand/50`,n&&`cursor-text`),children:[M&&(0,q.jsx)(tn,{items:F,agent:o?.agent,highlight:N,onHover:P,onSelect:L}),(0,q.jsx)(nn,{ref:A,value:e.input,onChange:t=>e.setInput(t.target.value),onKeyDown:t=>{if(M){if(t.key===`Escape`){t.preventDefault(),e.setInput(``);return}if(F.length>0){if(t.key===`ArrowDown`){t.preventDefault(),P(e=>(e+1)%F.length);return}if(t.key===`ArrowUp`){t.preventDefault(),P(e=>(e-1+F.length)%F.length);return}if(t.key===`Enter`||t.key===`Tab`){t.preventDefault(),L(F[Math.min(N,F.length-1)]);return}}}t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),x())},placeholder:n?`Tell me what to do on this page…`:`Pair the browser to get started`,disabled:!n,rows:2,className:`max-h-48 min-h-14 resize-none rounded-none border-0 bg-transparent px-3 pt-2.5 pb-0 focus-visible:border-0`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-0.5 px-1.5 pb-1.5`,children:[(0,q.jsx)(f,{variant:p||m?`subtle`:`ghost`,size:`icon-sm`,title:`A-Eye — point at an element on the page and send it with your next message`,"aria-label":`Point at an element with A-Eye`,onClick:w,disabled:!n||m,className:u(p||m?`text-ember`:void 0),children:(0,q.jsx)(ot,{className:u(`size-3.5`,m&&`animate-pulse`)})}),(0,q.jsx)(f,{variant:`ghost`,size:`icon-sm`,title:`Add this page’s title, URL and selection to the message`,"aria-label":`Attach page context`,onClick:E,disabled:!n,children:(0,q.jsx)(et,{className:`size-3.5`})}),(0,q.jsx)(f,{variant:`ghost`,size:`icon-sm`,title:`Attach a file for the agent to read`,"aria-label":`Attach a file`,onClick:()=>k.current?.click(),disabled:!n,children:(0,q.jsx)(ze,{className:`size-3.5`})}),(0,q.jsx)(f,{variant:h?`subtle`:`ghost`,size:`icon-sm`,role:`switch`,"aria-checked":h,"aria-label":h?`Turn live tools off`:`Turn live tools on`,title:h?`Live tool is on — the agent may write a small script for this page and ask you to approve it. Turn it off to keep to the built-in tools.`:`Live tool — let the agent write a small script for repetitive work or for something no tool covers. You review and approve the code before it runs.`,onClick:g,disabled:!n,className:u(h?`text-ember`:void 0),children:(0,q.jsx)(Me,{className:`size-3.5`})}),(0,q.jsxs)(f,{variant:t&&!e.error?`subtle`:`ghost`,size:`icon-sm`,"aria-label":t?`Turn voice off`:`Turn voice on`,title:e.supported?`Speak instead of typing`:`Voice input is not available in this browser`,onClick:C,disabled:!e.supported,className:`relative`,children:[t&&e.listening&&(0,q.jsx)(`span`,{className:`absolute inset-0 animate-ping rounded-full bg-magenta/30`}),t&&!e.error?(0,q.jsx)(c,{className:`size-3.5`}):(0,q.jsx)(s,{className:`size-3.5`})]}),r?(0,q.jsx)(f,{size:`icon-sm`,variant:`destructive`,className:`ml-auto`,"aria-label":`Stop the agent`,onClick:S,children:(0,q.jsx)(pt,{className:`size-3 fill-current`})}):(0,q.jsx)(f,{size:`icon-sm`,className:`ml-auto`,"aria-label":`Send message`,onClick:x,disabled:!e.input.trim()||!n,children:(0,q.jsx)(te,{className:`size-3.5`})})]})]}),(0,q.jsx)(`input`,{ref:k,type:`file`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&D(t)}}),(0,q.jsx)(`p`,{className:`mt-2 text-center font-mono text-[10px] text-ink-faint`,children:t&&e.supported?`Speak and pause to send · Enter sends now`:`Enter to send · Shift + Enter for a new line · / for skills and commands`})]})}function sn({focus:e,picking:t,onClear:n}){return!t&&!e?null:(0,q.jsxs)(`div`,{className:`enters mb-2 flex items-center gap-2 rounded-xl border border-ember/40 bg-ember/8 px-2.5 py-1.5 text-xs`,children:[(0,q.jsx)(ot,{className:u(`size-3.5 shrink-0 text-ember`,t&&`animate-pulse`)}),t||!e?(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-ink-dim`,children:[`Point at anything on the page — `,(0,q.jsx)(`span`,{className:`text-ink-faint`,children:`Esc cancels`})]}):(0,q.jsxs)(q.Fragment,{children:[e.shot&&(0,q.jsx)(`img`,{src:e.shot,alt:`The element you picked`,className:`max-h-7 max-w-14 shrink-0 rounded border border-ember/40 object-cover`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-ink`,children:[`A-Eye: `,(0,q.jsx)(`span`,{className:`font-medium`,children:an(e)})]}),(0,q.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-ink-faint`,children:e.tag}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Drop the A-Eye selection`,className:`shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3`})})]})]})}function cn({voice:e,voiceEnabled:t}){return t&&e.error?(0,q.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 rounded-lg border border-amber/40 bg-amber/10 px-2.5 py-1.5 text-[11px] text-amber`,children:[(0,q.jsx)(`span`,{className:`flex-1`,children:e.error}),e.needsGrant&&(0,q.jsx)(`button`,{type:`button`,onClick:e.grant,className:`shrink-0 rounded-full border border-amber/50 px-2 py-0.5 transition-colors hover:bg-amber/15`,children:`Allow microphone`})]}):e.pendingSend?(0,q.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 rounded-lg bg-brand/10 px-2.5 py-1.5 text-[11px] text-brand`,children:[(0,q.jsx)(`span`,{className:`relative flex-1 overflow-hidden rounded-full bg-brand/20`,children:(0,q.jsx)(`span`,{className:`block h-1 rounded-full bg-brand`,style:{animation:`browsentic-countdown ${e.autoSendMs}ms linear forwards`}})}),(0,q.jsx)(`span`,{className:`shrink-0`,children:`Sending…`}),(0,q.jsxs)(`button`,{type:`button`,onClick:e.cancelPending,className:`flex shrink-0 items-center gap-0.5 rounded-full px-1.5 py-0.5 transition-colors hover:bg-brand/15`,"aria-label":`Cancel sending`,children:[(0,q.jsx)(W,{className:`size-3`}),` Edit`]})]}):t&&e.listening?(0,q.jsxs)(`p`,{className:`mb-2 flex items-center gap-1.5 px-1 text-[11px] text-ink-dim`,children:[(0,q.jsx)(`span`,{className:`glow-dot inline-flex size-1.5 shrink-0 animate-pulse rounded-full bg-magenta text-magenta`}),e.interim?(0,q.jsx)(`span`,{className:`truncate italic`,children:e.interim}):(0,q.jsx)(`span`,{children:`Listening…`})]}):t&&!e.supported?(0,q.jsx)(`p`,{className:`mb-2 px-1 text-[11px] text-ink-faint`,children:`Voice input isn’t available in this browser.`}):null}function ln({files:e,onRemove:t,onRetry:n}){return e.length===0?null:(0,q.jsx)(`div`,{className:`mb-2 flex max-h-40 flex-col gap-1.5 overflow-y-auto`,children:e.map(e=>(0,q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-xl border border-line bg-ground/40 px-2.5 py-1.5 text-xs`,children:[(0,q.jsx)(Re,{className:`mt-0.5 size-3.5 shrink-0 text-ink-faint`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium text-ink`,children:e.name}),(0,q.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-ink-faint`,children:un(e.size)})]}),e.status===`pending`&&(0,q.jsxs)(`span`,{className:`mt-0.5 flex items-center gap-1 text-[11px] text-ink-faint`,children:[(0,q.jsx)(k,{className:`size-3 animate-spin`}),` Analyzing…`]}),e.status===`analyzed`&&e.report?.summary&&(0,q.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-[11px] text-ink-dim`,children:e.report.summary}),e.status===`rejected`&&(0,q.jsxs)(`span`,{className:`mt-0.5 block text-[11px] text-amber`,children:[`Not read — `,e.report?.reason?.message??`Browsentic does not read this kind of file.`]}),e.status===`failed`&&(0,q.jsx)(`span`,{className:`mt-0.5 block text-[11px] text-destructive`,children:e.report?.reason?.message??`The file could not be read.`})]}),e.status===`failed`&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>n(e.id),"aria-label":`Read ${e.name} again`,title:`Read it again`,className:`mt-0.5 shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(at,{className:`size-3`})}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>t(e.id),"aria-label":`Remove ${e.name}`,className:`mt-0.5 shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3`})})]},e.id))})}function un(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function dn({onClose:e}){return(0,q.jsxs)(`div`,{className:`enters max-h-[60%] shrink-0 overflow-y-auto border-b border-line bg-ground-2/80 px-3 py-3 backdrop-blur`,children:[(0,q.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-2`,children:[(0,q.jsx)(`p`,{className:`text-xs font-medium text-ink`,children:`Connection`}),(0,q.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close connection settings`,onClick:e,children:(0,q.jsx)(W,{className:`size-3.5`})})]}),(0,q.jsxs)(`div`,{className:`space-y-4`,children:[(0,q.jsx)(_e,{}),(0,q.jsx)(de,{})]})]})}function fn({connected:e,maxBytes:t}){return(0,q.jsx)(`div`,{className:`enters pointer-events-none absolute inset-0 z-50 flex items-center justify-center bg-ground/85 p-4 backdrop-blur-[2px]`,children:(0,q.jsxs)(`div`,{className:u(`flex w-full flex-col items-center gap-2 rounded-2xl border-2 border-dashed px-4 py-8 text-center`,e?`border-brand/55 bg-brand/8`:`border-line-strong bg-surface/40`),children:[e?(0,q.jsx)(ze,{className:`neon-text size-7 text-brand`}):(0,q.jsx)(vt,{className:`size-7 text-ink-faint`}),(0,q.jsx)(`p`,{className:`text-sm font-medium text-ink`,children:e?`Drop to attach`:`Not connected`}),(0,q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:e?`Release anywhere in the panel and I’ll read it with your next message — up to ${t/1024/1024} MB each.`:`Pair the browser before attaching a file.`})]})})}var pn=[`Summarise what this page says`,`Fill this form in with my details`,`Find the unpaid invoices and open the newest`],mn={unpaired:`This browser isn’t paired yet, so nothing can drive it. Pairing takes one command and one code.`,offline:`Paired, but the daemon isn’t answering. Start browsentic and this reconnects on its own.`,agent:`The chosen agent can’t run on this machine. Pick another one, or let Browsentic fix it.`};function hn({blocker:e,voiceOn:t,onGo:n,onFix:r,onUse:i}){return(0,q.jsxs)(`div`,{className:`dot-grid fade-bottom flex flex-col gap-4 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,q.jsx)(a,{className:`mt-0.5 size-7 shrink-0 text-brand`}),(0,q.jsx)(`div`,{className:`panel-card min-w-0 rounded-2xl rounded-tl-md px-3 py-2.5 text-sm leading-relaxed text-ink`,children:e?mn[e]:(0,q.jsxs)(q.Fragment,{children:[t?`Just talk`:`Tell me`,` what to do on this page — read it, fill something in, click through a flow — and every action shows up here as I take it.`]})})]}),e?(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(0,q.jsx)(gn,{icon:st,label:e===`agent`?`Choose an agent`:`Set up the link`,onClick:r})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:pn.map(e=>(0,q.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:`rounded-xl border border-line bg-ground/40 px-3 py-2 text-left text-xs text-ink-dim transition-colors hover:border-brand/40 hover:bg-surface/60 hover:text-ink`,children:e},e))}),(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,q.jsx)(gn,{icon:V,label:`Teach it this site`,onClick:()=>n(`skills`)}),(0,q.jsx)(gn,{icon:H,label:`Record a flow`,onClick:()=>n(`recordings`)}),(0,q.jsx)(gn,{icon:it,label:`Past chats`,onClick:()=>n(`history`)})]})]})]})}function gn({icon:e,label:t,onClick:n}){return(0,q.jsxs)(`button`,{type:`button`,onClick:n,className:`inline-flex items-center gap-1.5 rounded-full border border-line bg-ground-2/70 px-2.5 py-1 text-[11px] text-ink-dim transition-colors hover:border-brand/40 hover:text-ink`,children:[(0,q.jsx)(e,{className:`size-3`}),t]})}function _n({state:e,onStop:t}){let n=yn(e.startedAt),r=Math.max(0,e.timeoutMs-n),i=e.percent==null?null:Math.round(e.percent);return(0,q.jsxs)(`div`,{className:`enters mb-2 rounded-xl border border-magenta/35 bg-magenta/8 p-2.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(rt,{className:`size-3.5 shrink-0 animate-pulse text-magenta`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium text-ink`,children:[`Watching `,e.label??e.host]}),(0,q.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] tabular-nums text-ink-faint`,children:[bn(n),i!=null&&` · ${i}%`]}),(0,q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`shrink-0 text-magenta hover:text-magenta`,onClick:t,children:[(0,q.jsx)(pt,{className:`size-3 fill-current`}),` Stop`]})]}),i!=null&&(0,q.jsx)(`div`,{className:`mt-2 h-1 overflow-hidden rounded-full bg-magenta/15`,children:(0,q.jsx)(`div`,{className:`glow-dot h-full rounded-full bg-magenta text-magenta transition-[width] duration-500`,style:{width:`${i}%`}})}),(0,q.jsx)(`p`,{className:`mt-1.5 text-[11px] leading-relaxed text-ink-faint`,children:vn(e,r)})]})}function vn(e,t){return e.stalledForMs==null?e.percent!=null&&e.etaMs!=null?`${Math.round(e.percent)}% · ${x(e.etaMs)} left`:e.logs.at(-1)?.text??`Stops automatically in ${bn(t)}.`:`No change for ${bn(e.stalledForMs)}.`}function yn(e){let[t,n]=(0,G.useState)(()=>Date.now());return(0,G.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),Math.max(0,t-e)}function bn(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var xn=[{id:`chat`,label:`Chat`,icon:Xe},{id:`history`,label:`History`,icon:it},{id:`skills`,label:`Skills`,icon:V},{id:`recordings`,label:`Recordings`,icon:H},{id:`settings`,label:`Settings`,icon:lt}];function Sn({tab:e,counts:t,onSelect:n}){let r=(0,G.useRef)(null),[i,a]=(0,G.useState)(`full`),o=(0,G.useRef)({full:0,active:0});return(0,G.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=!0,n=()=>{if(!t)return;let n=e.clientWidth;i!==`icons`&&(o.current[i]=Cn(e));let{full:r,active:s}=o.current;a(r>0&&n>=r?`full`:i===`full`||n>=s?`active`:`icons`)};n();let s=new ResizeObserver(n);return s.observe(e),document.fonts.ready.then(n),()=>{t=!1,s.disconnect()}},[i,e,xn.map(({id:e})=>t[e]??0).join(`·`)]),(0,q.jsx)(`nav`,{ref:r,"aria-label":`Panel sections`,className:`flex shrink-0 items-center gap-0.5 overflow-x-auto border-b border-line px-2 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:xn.map(({id:r,label:a,icon:o})=>{let s=e===r,c=t[r]??0,l=i===`full`||i===`active`&&s;return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>n(r),title:l?void 0:a,"aria-label":a,"aria-current":s?`page`:void 0,className:u(`relative inline-flex shrink-0 items-center gap-1.5 rounded-full px-2.5 py-1.5 text-[11px] font-medium transition-colors`,s?`bg-brand/12 text-brand`:`text-ink-faint hover:bg-surface/60 hover:text-ink-dim`),children:[(0,q.jsx)(o,{className:`size-3.5`}),l&&a,c>0&&(l?(0,q.jsx)(`span`,{className:u(`rounded-full px-1 font-mono text-[9px] tabular-nums`,s?`bg-brand/20`:`bg-surface text-ink-faint`),children:c}):(0,q.jsx)(`span`,{className:u(`absolute top-1 right-1 size-1.5 rounded-full`,s?`bg-brand/70`:`bg-ink-faint/60`)}))]},r)})})}function Cn(e){let t=getComputedStyle(e),n=parseFloat(t.columnGap)||0,r=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i=Array.from(e.children);return i.reduce((e,t)=>e+t.getBoundingClientRect().width,0)+n*Math.max(0,i.length-1)+r}function wn({state:e,onStop:t}){let n=Tn(e.startedAt),r=Math.max(0,T-n);return(0,q.jsxs)(`div`,{className:`enters mb-2 rounded-xl border border-destructive/40 bg-destructive/8 p-2.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`glow-dot size-2 shrink-0 animate-pulse rounded-full bg-destructive text-destructive`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium text-ink`,children:[`Recording `,e.host]}),(0,q.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] tabular-nums text-ink-faint`,children:[En(n),` · `,e.events,` `,e.events===1?`step`:`steps`]}),(0,q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`shrink-0 text-destructive hover:text-destructive`,onClick:t,children:[(0,q.jsx)(pt,{className:`size-3 fill-current`}),` Stop`]})]}),(0,q.jsxs)(`p`,{className:`mt-1.5 text-[11px] leading-relaxed text-ink-faint`,children:[e.warning??`Stops automatically in ${En(r)}.`,!e.captureValues&&` Typed values are not being saved.`]})]})}function Tn(e){let[t,n]=(0,G.useState)(()=>Date.now());return(0,G.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),Math.max(0,t-e)}function En(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Dn=h(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-[0.08em] whitespace-nowrap uppercase [&>svg]:pointer-events-none [&>svg]:size-2.5`,{variants:{variant:{default:`border-brand/35 bg-brand/12 text-brand`,secondary:`border-line-strong bg-surface/70 text-ink-dim`,destructive:`border-destructive/40 bg-destructive/12 text-destructive`,warning:`border-amber/40 bg-amber/12 text-amber`,outline:`border-line text-ink-faint`}},defaultVariants:{variant:`default`}});function J({className:e,variant:t,asChild:n=!1,...r}){return(0,q.jsx)(n?i:`span`,{"data-slot":`badge`,className:u(Dn({variant:t}),e),...r})}function On({recordings:e,busy:t,onReplay:n,onRemove:r}){return e.length===0?(0,q.jsxs)(`div`,{className:`dot-grid fade-bottom rounded-xl border border-line px-3 py-6 text-center`,children:[(0,q.jsx)(H,{className:`mx-auto size-5 text-ink-faint`}),(0,q.jsx)(`p`,{className:`mt-2 text-[11px] leading-relaxed text-ink-faint`,children:`No recordings yet. Press Record above and walk through the flow you want repeated.`})]}):(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[t&&(0,q.jsx)(`p`,{className:`px-1 pb-1 text-[11px] text-ink-faint`,children:`Waiting on the current run — stop it to replay a recording.`}),e.map(e=>(0,q.jsx)(kn,{recording:e,busy:t===!0,onReplay:n,onRemove:r},e.id))]})}function kn({recording:e,busy:t,onReplay:n,onRemove:r}){let[i,a]=(0,G.useState)(null),o=e.status===`ready`;return(0,q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-xl border border-line bg-ground/40 px-2.5 py-2 text-xs`,children:[(0,q.jsx)(H,{className:`mt-0.5 size-3.5 shrink-0 text-ink-faint`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i===null?(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium text-ink`,children:e.name}),e.capturedValues&&(0,q.jsxs)(J,{variant:`warning`,children:[(0,q.jsx)(Ge,{}),` values`]})]}):(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(fe,{value:i,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:t=>{t.key===`Escape`&&a(null),t.key===`Enter`&&(Te(e.id,i),a(null))},"aria-label":`Recording name`,className:`h-7 text-xs`}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{Te(e.id,i),a(null)},"aria-label":`Save name`,className:`shrink-0 rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(z,{className:`size-3`})})]}),(0,q.jsxs)(`span`,{className:`mt-0.5 flex items-center gap-1 font-mono text-[10px] text-ink-faint`,children:[(0,q.jsx)(U,{className:`size-2.5 shrink-0`}),(0,q.jsx)(`span`,{className:`truncate`,children:e.host})]}),e.goal&&e.goal!==e.name&&(0,q.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-[11px] text-ink-dim`,children:e.goal}),(0,q.jsx)(`span`,{className:`mt-0.5 flex items-center gap-1 text-[11px] text-ink-faint`,children:e.status===`analyzing`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(k,{className:`size-3 animate-spin`}),` Splitting into steps…`]}):e.status===`error`?(0,q.jsx)(`span`,{className:`text-destructive`,children:e.error??`Could not read this recording`}):(0,q.jsxs)(q.Fragment,{children:[e.steps??0,` `,e.steps===1?`step`:`steps`,` · `,Nn(e.durationMs),` ·`,` `,Pn(e.updatedAt)]})}),o&&(0,q.jsxs)(`button`,{type:`button`,onClick:()=>n(e),disabled:t,className:`mt-1.5 inline-flex items-center gap-1 rounded-full bg-brand/12 px-2 py-0.5 text-[11px] text-brand transition-colors hover:bg-brand/20 disabled:opacity-50`,children:[(0,q.jsx)(nt,{className:`size-3`}),` Do this again`]})]}),(0,q.jsxs)(`div`,{className:`mt-0.5 flex shrink-0 gap-0.5`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:()=>a(e.name),"aria-label":`Rename ${e.name}`,className:`rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(tt,{className:`size-3`})}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),"aria-label":`Delete ${e.name}`,className:`rounded-full p-1 text-ink-faint transition-colors hover:bg-surface hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3`})})]})]})}var An=6e4,jn=60*An,Mn=24*jn;function Nn(e){let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,`0`)}s`}function Pn(e){let t=Date.now()-e;return t<An?`just now`:t<jn?`${Math.floor(t/An)}m ago`:t<Mn?`${Math.floor(t/jn)}h ago`:t<7*Mn?`${Math.floor(t/Mn)}d ago`:new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function Fn({tabUrl:e,recordings:t,recording:n,busy:r,onStart:i,onStop:a,onReplay:o,onRemove:s}){let[c,l]=(0,G.useState)(!1),u=Pt(e),d=!r&&!n&&/^https?:/.test(e);return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 p-3`,children:[(0,q.jsx)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:`Capture what you do on a site — the clicks, the fields you fill, the pages you move through — and the agent can repeat it later. A recording runs for at most 15 minutes.`}),n?(0,q.jsxs)(f,{variant:`destructive`,onClick:a,children:[(0,q.jsx)(pt,{className:`fill-current`}),` Stop recording`]}):(0,q.jsxs)(f,{variant:`destructive`,onClick:()=>i(c),disabled:!d,title:d?`Record what you do on ${u}`:`Open an http(s) page, with nothing else running`,children:[(0,q.jsx)(je,{className:`fill-current`}),(0,q.jsxs)(`span`,{className:`truncate`,children:[`Record `,u||`this page`]})]}),!n&&(0,q.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 rounded-xl border border-line bg-ground/40 px-2.5 py-2 text-[11px] leading-relaxed text-ink-dim`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked),className:`mt-0.5 size-3 shrink-0 accent-destructive`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`span`,{className:`font-medium text-ink`,children:`Save what I type.`}),` Off by default — every field becomes a placeholder the agent asks you to fill. Passwords and card numbers are never saved either way.`]})]}),(0,q.jsx)(On,{recordings:t,busy:r,onReplay:o,onRemove:s})]})}var In=e(r(),1);function Ln({purpose:e,code:t,site:n,onAllow:r,onDeny:i,onClose:a}){return(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]),(0,In.createPortal)((0,q.jsxs)(`div`,{className:`enters fixed inset-0 z-50 flex flex-col bg-ground/96 backdrop-blur`,children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-ember/30 bg-ember/8 px-3 py-2.5`,children:[(0,q.jsx)(ct,{className:`mt-0.5 size-3.5 shrink-0 text-ember`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`p`,{className:`text-xs font-medium text-ink`,children:`Code the agent wrote`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-[11px] leading-relaxed text-ink-dim`,children:e})]}),(0,q.jsx)(`button`,{type:`button`,onClick:a,title:`Close without deciding`,className:`mt-0.5 shrink-0 rounded p-0.5 text-ink-faint transition-colors hover:text-ink`,children:(0,q.jsx)(W,{className:`size-3.5`})})]}),(0,q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-ground/70`,children:(0,q.jsx)(`pre`,{className:`min-w-full p-3 font-mono text-[11px] leading-relaxed whitespace-pre text-ink-dim`,children:(0,q.jsx)(`code`,{children:t})})}),(0,q.jsxs)(`div`,{className:`border-t border-line px-3 py-2.5`,children:[(0,q.jsxs)(`p`,{className:`mb-2 text-[11px] leading-relaxed text-ink-faint`,children:[`This runs in `,n?(0,q.jsx)(`span`,{className:`font-mono text-ink`,children:n}):`the page`,` with your logged-in session, and can do anything you could do there. Later calls reuse these functions without asking again.`]}),(0,q.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,q.jsxs)(f,{variant:`ghost`,size:`sm`,className:`flex-1`,onClick:i,children:[(0,q.jsx)(W,{className:`size-3`}),` Deny`]}),(0,q.jsxs)(f,{size:`sm`,className:`flex-1`,onClick:r,children:[(0,q.jsx)(z,{className:`size-3`}),` Allow`]})]})]})]}),document.body)}var Rn=[{key:`user`,label:`you`,color:`bg-brand`},{key:`assistant`,label:`replies`,color:`bg-magenta`},{key:`tools`,label:`tools`,color:`bg-amber`},{key:`notices`,label:`notices`,color:`bg-ink-faint`}];function zn({breakdown:e}){let{messages:t,files:n,recordings:r,filesOmitted:i,recordingsOmitted:a}=e,o=Rn.reduce((e,n)=>e+t[n.key],0),s=o===0&&n.length===0&&r.length===0;return(0,q.jsxs)(`div`,{className:`enters panel-card min-w-0 rounded-2xl px-3 py-2.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(qe,{className:`size-3.5 shrink-0 text-brand`}),(0,q.jsx)(`span`,{className:`flex-1 truncate font-mono text-[10px] tracking-[0.14em] text-ink uppercase`,children:`Session context`}),(0,q.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 rounded-full bg-ground/60 px-2 py-0.5 font-mono text-[9px] tracking-[0.1em] text-ink-faint uppercase`,children:[e.agent&&(0,q.jsx)(R,{kind:e.agent,className:`size-2.5`}),Vn(e)]})]}),s?(0,q.jsx)(`p`,{className:`mt-2 text-[11px] text-ink-dim`,children:`This conversation is empty — nothing rides along yet.`}):(0,q.jsxs)(q.Fragment,{children:[o>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`mt-2.5 flex h-1.5 gap-px overflow-hidden rounded-full`,children:Rn.filter(e=>t[e.key]>0).map(e=>(0,q.jsx)(`span`,{className:e.color,style:{flexGrow:t[e.key]}},e.key))}),(0,q.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-3 gap-y-0.5`,children:Rn.map(e=>(0,q.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] text-ink-dim`,children:[(0,q.jsx)(`span`,{className:u(`size-1.5 shrink-0 rounded-full`,e.color)}),(0,q.jsx)(`span`,{className:`font-mono`,children:t[e.key]}),` `,e.label]},e.key))})]}),(0,q.jsxs)(`div`,{className:`mt-2.5 flex flex-col gap-1 border-t border-line pt-2`,children:[(0,q.jsxs)(Bn,{icon:U,children:[e.tabCount===1?`1 tab`:`${e.tabCount} tabs`,e.host&&(0,q.jsxs)(q.Fragment,{children:[` · `,e.host]}),` · turn`,` `,(0,q.jsx)(`span`,{className:`font-mono text-[10px]`,children:e.turns}),` ·`,` `,(0,q.jsx)(`span`,{className:`font-mono text-[10px]`,children:Hn(t.chars)}),` characters`]}),(0,q.jsx)(Bn,{icon:Fe,children:e.usage?(0,q.jsxs)(q.Fragment,{children:[`Agent window ≈ `,(0,q.jsx)(`span`,{className:`font-mono text-[10px]`,children:Hn(e.usage.contextTokens)}),` `,`tokens · `,(0,q.jsx)(`span`,{className:`font-mono text-[10px]`,children:Hn(e.usage.outputTokens)}),` `,`generated last run`]}):e.agent===`antigravity`?`Antigravity does not report token counts.`:e.agent===`vibe`?`Mistral Vibe does not report token counts.`:`Token counts appear after the agent’s first reply.`}),n.map((e,t)=>(0,q.jsxs)(Bn,{icon:Re,children:[(0,q.jsx)(`span`,{className:`text-ink`,children:e.name}),(0,q.jsxs)(`span`,{className:`font-mono text-[10px] text-ink-faint`,children:[` · `,Un(e.size)]}),e.status===`pending`&&(0,q.jsx)(`span`,{className:`text-ink-faint`,children:` · analyzing`}),e.status===`rejected`&&(0,q.jsx)(`span`,{className:`text-amber`,children:` · not read`}),e.status===`failed`&&(0,q.jsx)(`span`,{className:`text-destructive`,children:` · analysis failed`})]},t)),i>0&&(0,q.jsxs)(`p`,{className:`pl-[18px] text-[10px] text-ink-faint`,children:[i,` more `,i===1?`file stays`:`files stay`,` behind — only the first`,` `,n.length,` ride along.`]}),r.map((e,t)=>(0,q.jsxs)(Bn,{icon:H,children:[(0,q.jsx)(`span`,{className:`text-ink`,children:e.name}),e.steps!==void 0&&(0,q.jsxs)(`span`,{className:`font-mono text-[10px] text-ink-faint`,children:[` · `,e.steps,` steps`]})]},t)),a>0&&(0,q.jsxs)(`p`,{className:`pl-[18px] text-[10px] text-ink-faint`,children:[a,` more `,a===1?`recording stays`:`recordings stay`,` behind — only the first `,r.length,` ride along.`]})]})]}),(0,q.jsx)(`p`,{className:`mt-2 text-[10px] leading-relaxed text-ink-faint`,children:`Held in this browser — files and ready recordings ride along with your next message.`})]})}function Bn({icon:e,children:t}){return(0,q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-1.5 text-[11px] text-ink-dim`,children:[(0,q.jsx)(e,{className:`mt-0.5 size-3 shrink-0 text-ink-faint`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:t})]})}function Vn(e){return e.agent?`${O[e.agent].label}${e.resumes?` · resumes`:``}`:`no agent yet`}function Hn(e){return e<1e3?String(e):`${(e/1e3).toFixed(+(e<1e4))} k`}function Un(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Wn({text:e,streaming:t,className:n}){let r=(0,G.useRef)(!1);t&&(r.current=!0);let i=(0,G.useMemo)(()=>tr(e).map(e=>({block:e,sig:JSON.stringify(e)})),[e]);return(0,q.jsx)(`div`,{"data-stream":t?`live`:r.current?`done`:void 0,className:u(`flex min-w-0 flex-col gap-2`,n),children:i.map(({block:e,sig:t},n)=>(0,q.jsx)(Gn,{block:e,sig:t},n))})}var Gn=(0,G.memo)(({block:e})=>ur(e,`0`),(e,t)=>e.sig===t.sig),Kn=/^ {0,3}(`{3,}|~{3,})[^\n]*$/,qn=/^ {0,3}(?:`{3,}|~{3,})[ \t]*([^\s`~]*)/,Jn=/^ {0,3}(`{3,}|~{3,})[ \t]*$/,Yn=/^ {0,3}(#{1,6})[ \t]+(.*?)[ \t]*#*[ \t]*$/,Xn=/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/,Zn=/^ {0,3}>[ \t]?/,Qn=/^([ \t]*)(?:([-*+])|(\d{1,9})[.)])[ \t]+(.*)$/,$n=/^ {0,3}\|?[ \t]*:?-+:?[ \t]*(?:\|[ \t]*:?-+:?[ \t]*)+\|?[ \t]*$/,er=12;function tr(e,t=0){let n=e.replace(/\r\n?/g,`
4
4
  `).split(`
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,b as n,l as r,m as i,o as a,p as o,u as s,v as c,x as l}from"./globals-Bis7MDt7.js";var u=t(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=t(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f=t(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),p=t(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),m=t(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),h=t(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),g=t(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),_=t(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),v=t(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),y=t(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),b=e(l(),1),x=o(),S={claude:{viewBox:`0 0 24 24`,path:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`},codex:{viewBox:`1.68 1.75 16.65 16.5`,path:`M11.248 18.25q-.825 0-1.568-.314a4.3 4.3 0 0 1-1.32-.874 4 4 0 0 1-1.304.214 4 4 0 0 1-2.046-.544 4.27 4.27 0 0 1-1.518-1.485 4 4 0 0 1-.56-2.095q0-.48.131-1.04A4.4 4.4 0 0 1 2.04 10.71a4.07 4.07 0 0 1 .017-3.4 4.2 4.2 0 0 1 1.056-1.418 3.8 3.8 0 0 1 1.6-.842 3.9 3.9 0 0 1 .76-1.683q.593-.759 1.451-1.188a4.04 4.04 0 0 1 1.832-.429q.825 0 1.567.313.742.314 1.32.875a4 4 0 0 1 1.304-.215q1.106 0 2.046.545a4.14 4.14 0 0 1 1.501 1.485q.578.941.578 2.095 0 .48-.132 1.04.66.61 1.023 1.419.363.792.363 1.666 0 .892-.38 1.717a4.3 4.3 0 0 1-1.072 1.435 3.8 3.8 0 0 1-1.584.825 3.8 3.8 0 0 1-.775 1.683 4.06 4.06 0 0 1-1.436 1.188 4.04 4.04 0 0 1-1.832.429m-4.076-2.062q.825 0 1.435-.347l3.103-1.782a.36.36 0 0 0 .164-.313v-1.42L7.881 14.62a.67.67 0 0 1-.726 0l-3.118-1.798a.5.5 0 0 1-.017.115v.198q0 .841.396 1.551.413.693 1.139 1.089a3.2 3.2 0 0 0 1.617.412m.165-2.69a.4.4 0 0 0 .181.05q.083 0 .165-.05l1.238-.71-3.977-2.31a.7.7 0 0 1-.363-.643v-3.58q-.825.362-1.32 1.122a2.9 2.9 0 0 0-.495 1.65q0 .809.413 1.55.412.743 1.072 1.123zm3.91 3.663q.875 0 1.585-.396a2.96 2.96 0 0 0 1.534-2.64v-3.564a.32.32 0 0 0-.165-.297l-1.254-.726v4.604a.7.7 0 0 1-.363.643l-3.119 1.799a3 3 0 0 0 1.783.577m.627-6.039V8.878L10.01 7.822 8.129 8.878v2.244l1.881 1.056zM7.057 5.859a.7.7 0 0 1 .363-.644l3.119-1.798a3 3 0 0 0-1.782-.578q-.874 0-1.584.396A2.96 2.96 0 0 0 6.05 4.324a3.07 3.07 0 0 0-.396 1.551v3.547q0 .199.165.314l1.237.726zm8.383 7.887q.825-.364 1.303-1.123.495-.758.495-1.65a3.15 3.15 0 0 0-.412-1.55q-.413-.743-1.073-1.123l-3.086-1.782q-.099-.065-.181-.049a.3.3 0 0 0-.165.05l-1.238.692 3.993 2.327a.6.6 0 0 1 .264.264.64.64 0 0 1 .1.363zm-3.317-8.382a.63.63 0 0 1 .726 0l3.135 1.831v-.297q0-.792-.396-1.501a2.86 2.86 0 0 0-1.105-1.155q-.71-.43-1.65-.43-.825 0-1.436.347L8.294 5.941a.36.36 0 0 0-.165.314v1.418z`},antigravity:{viewBox:`0 0 125 113`,path:`M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z`},vibe:{viewBox:`0 0 24 24`,path:`M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z`},grok:{viewBox:`0 0 466.04 516.93`,path:`M0.12 182.71L234.14 516.92H338.15L104.13 182.71ZM0 516.92H104.08L156.08 442.67L104.04 368.34ZM466.04 0H361.96L182.1 256.86L234.15 331.18ZM380.78 516.92H466.04V37.16L380.78 158.92Z`},cursor:{viewBox:`0 0 24 24`,path:`M11.925 24l10.425-6-10.425-6L1.5 18l10.425 6zM22.35 18V6L11.925 0v12l10.425 6zM11.925 12V0L1.5 6v12l10.425-6z`},qwen:{viewBox:`0 0 24 24`,path:`M23.919 14.545 20.817 9.17l1.47-2.544a.56.56 0 0 0 0-.566l-1.633-2.83a.57.57 0 0 0-.49-.283h-6.207L12.487.402a.57.57 0 0 0-.49-.284H8.732a.56.56 0 0 0-.49.284L5.139 5.775h-2.94a.56.56 0 0 0-.49.284L.077 8.887a.56.56 0 0 0 0 .567L3.18 14.83l-1.47 2.545a.56.56 0 0 0 0 .566l1.634 2.83a.57.57 0 0 0 .49.283h6.205l1.47 2.545a.57.57 0 0 0 .49.284h3.266a.57.57 0 0 0 .49-.284l3.104-5.375h2.94a.57.57 0 0 0 .49-.283l1.634-2.828a.55.55 0 0 0-.004-.568M8.733.686l1.634 2.828-1.634 2.828H21.8L20.164 9.17H7.425L5.63 6.06Zm1.306 19.801-6.205-.002 1.634-2.83h3.265L2.201 6.344h3.267q3.182 5.517 6.367 11.032zm10.124-5.66L18.53 12l-6.532 11.315-1.634-2.83c2.129-3.673 4.25-7.351 6.373-11.028h3.592l3.102 5.374z`}};function C({kind:e,className:t}){let n=S[e];return(0,x.jsx)(`svg`,{viewBox:n.viewBox,fill:`currentColor`,className:i(`size-3.5 shrink-0`,t),"aria-hidden":!0,children:(0,x.jsx)(`path`,{d:n.path})})}var w=[`claude`,`codex`,`antigravity`,`vibe`,`grok`,`cursor`,`qwen`],T={claude:{kind:`claude`,label:`Claude Code`,vendor:`Anthropic`,bin:`claude`,install:`npm i -g @anthropic-ai/claude-code`,docs:`https://claude.com/claude-code`,models:[`claude-fable-5`,`claude-opus-5`,`claude-sonnet-5`,`claude-haiku-4-5`]},codex:{kind:`codex`,label:`Codex`,vendor:`OpenAI`,bin:`codex`,install:`npm i -g @openai/codex`,docs:`https://developers.openai.com/codex/cli`,models:[`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`]},antigravity:{kind:`antigravity`,label:`Antigravity`,vendor:`Google`,bin:`agy`,install:`https://antigravity.google/docs/cli/install`,docs:`https://antigravity.google/docs/cli`,models:[`gemini-3-pro`,`gemini-3-flash`]},vibe:{kind:`vibe`,label:`Mistral Vibe`,vendor:`Mistral AI`,bin:`vibe`,install:`uv tool install mistral-vibe`,docs:`https://github.com/mistralai/mistral-vibe`,models:[`mistral-medium-3.5`],beta:!0},grok:{kind:`grok`,label:`Grok Build`,vendor:`xAI`,bin:`grok`,install:`curl -fsSL https://x.ai/cli/install.sh | bash`,docs:`https://docs.x.ai/build/overview`,models:[`grok-4.7`],beta:!0},cursor:{kind:`cursor`,label:`Cursor CLI`,vendor:`Anysphere`,bin:`cursor-agent`,install:`curl https://cursor.com/install -fsS | bash`,docs:`https://cursor.com/docs/cli/overview`,models:[`composer-2.5`,`claude-opus-4-8`,`gpt-5`,`sonnet-4-thinking`],beta:!0},qwen:{kind:`qwen`,label:`Qwen Code`,vendor:`Alibaba`,bin:`qwen`,install:`npm i -g @qwen-code/qwen-code`,docs:`https://qwenlm.github.io/qwen-code-docs/en/`,models:[`qwen3-coder-plus`,`qwen3.7-plus`,`qwen3.6-plus`,`qwen3-max-2026-01-23`],beta:!0}},E=w.map(e=>T[e]);function ee(e){return e?.runners.find(t=>t.kind===e.active)}function te(e,{running:t,listening:n}={}){let r=ee(e?.agent)?.ready!==!1,i=(e?.connected??!1)&&r;return e?.paired?e.connected?r?t?{tone:`busy`,label:`Working`,ready:i}:n?{tone:`listening`,label:`Listening`,ready:i}:{tone:`live`,label:`Online`,ready:i}:{tone:`warn`,label:`Agent blocked`,ready:i,blocker:`agent`}:{tone:`pending`,label:`Reconnecting`,ready:i,blocker:`offline`}:{tone:`off`,label:`Not paired`,ready:i,blocker:`unpaired`}}var D={off:`bg-ink-faint/50`,pending:`glow-dot animate-pulse bg-amber text-amber`,live:`glow-dot bg-lime text-lime`,busy:`glow-dot animate-pulse bg-brand text-brand`,listening:`glow-dot animate-pulse bg-magenta text-magenta`,warn:`glow-dot bg-ember text-ember`},O={off:`text-ink-faint`,pending:`text-amber`,live:`text-ink-dim`,busy:`text-brand`,listening:`text-magenta`,warn:`text-ember`};function k({tone:e,className:t}){return(0,x.jsx)(`span`,{className:i(`size-1.5 shrink-0 rounded-full`,D[e],t)})}function ne({tone:e,children:t,onClick:n,expanded:r,className:a}){let o=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(k,{tone:e}),(0,x.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),n&&(0,x.jsx)(d,{className:i(`size-3 shrink-0 text-ink-faint transition-transform`,r&&`rotate-180`)})]}),s=i(`inline-flex max-w-full items-center gap-1.5 rounded-full border border-line bg-ground-2/70 px-2.5 py-1`,`font-mono text-[10px] tracking-[0.12em] uppercase`,O[e],a);return n?(0,x.jsx)(`button`,{type:`button`,onClick:n,"aria-expanded":r,className:i(s,`transition-colors hover:border-brand/40 hover:bg-surface/60`),children:o}):(0,x.jsx)(`span`,{className:s,children:o})}var re=e(n(),1),ie=Object.defineProperty,ae=(e,t)=>ie(e,`name`,{value:t,configurable:!0});function oe(e,[t,n]){return Math.min(n,Math.max(t,e))}ae(oe,`clamp`);var se=Object.defineProperty,ce=(e,t)=>se(e,`name`,{value:t,configurable:!0}),le=!!(typeof window<`u`&&window.document&&window.document.createElement);function A(e,t,{checkForDefaultPrevented:n=!0}={}){return ce(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ce(A,`composeEventHandlers`);function ue(e){if(!le)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ce(ue,`getOwnerWindow`);function de(e){if(!le)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ce(de,`getOwnerDocument`);function fe(e,t=!1){let{activeElement:n}=de(e);if(!n?.nodeName)return null;if(pe(n)&&n.contentDocument)return fe(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=de(n).getElementById(e);if(t)return t}}return n}ce(fe,`getActiveElement`);function pe(e){return e.tagName===`IFRAME`}ce(pe,`isFrame`);var me=Object.defineProperty,he=(e,t)=>me(e,`name`,{value:t,configurable:!0});function ge(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=he(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,x.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return he(i,`useContext`),[r,i]}he(ge,`createContext`);function _e(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=he(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,x.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return he(s,`useContext`),[o,s]}he(r,`createContext`);let i=he(()=>{let t=n.map(e=>b.createContext(e));return he(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ve(i,...t)]}he(_e,`createContextScope`);function ve(...e){let t=e[0];if(e.length===1)return t;let n=he(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return he(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}he(ve,`composeContextScopes`);var ye=Object.defineProperty,j=(e,t)=>ye(e,`name`,{value:t,configurable:!0});function be(e){let t=e+`CollectionProvider`,[n,i]=_e(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=j(e=>{let{scope:t,children:n}=e,r=b.useRef(null),i=b.useRef(new Map).current;return(0,x.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let l=e+`CollectionSlot`,u=r(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=s(t,o(l,n).collectionRef);return(0,x.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=r(f),h=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),c=s(t,a),l=o(f,n);return b.useEffect(()=>(l.itemMap.set(a,{ref:a,...i}),()=>void l.itemMap.delete(a))),(0,x.jsx)(m,{[p]:``,ref:c,children:r})});h.displayName=f;function g(t){let n=o(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return j(g,`useCollection`),[{Provider:c,Slot:d,ItemSlot:h},g,i]}j(be,`createCollection`);var xe=new WeakMap,Se=class e extends Map{static{j(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],xe.set(this,!0)}set(e,t){return xe.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Te(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Ce(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Ce(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ce(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Ce(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=we(e,t);return n===-1?void 0:e[n]}j(Ce,`at`);function we(e,t){let n=e.length,r=Te(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}j(we,`toSafeIndex`);function Te(e){return e!==e||e===0?0:Math.trunc(e)}j(Te,`toSafeInteger`);function Ee(e){let t=e+`CollectionProvider`,[n,i]=_e(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Se,setItemMap:j(()=>void 0,`setItemMap`)}),c=j(({state:e,...t})=>e?(0,x.jsx)(u,{...t,state:e}):(0,x.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=j(e=>{let t=_();return(0,x.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=t+`Init`;let u=j(e=>{let{scope:t,children:n,state:r}=e,i=b.useRef(null),[o,c]=b.useState(null),l=s(i,c),[u,d]=r;return b.useEffect(()=>{if(!o)return;let e=Ae(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,x.jsx)(a,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:i,collectionElement:o,children:n})},`CollectionProviderImpl`);u.displayName=t+`Impl`;let d=e+`CollectionSlot`,f=r(d),p=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=s(t,o(d,n).collectionRef);return(0,x.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=r(m),g=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),[c,l]=b.useState(null),u=s(t,a,l),{setItemMap:d}=o(m,n),f=b.useRef(i);De(f.current,i)||(f.current=i);let p=f.current;return b.useEffect(()=>{let e=p;return d(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(ke):(t.set(c,{...e,element:c}),t.toSorted(ke)):t),()=>{d(e=>!c||!e.has(c)?e:(e.delete(c),new Se(e)))}},[c,p,d]),(0,x.jsx)(h,{"data-radix-collection-item":``,ref:u,children:r})});g.displayName=m;function _(){return b.useState(new Se)}j(_,`useInitCollection`);function v(t){let{itemMap:n}=o(e+`CollectionConsumer`,t);return n}return j(v,`useCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:i,useCollection:v,useInitCollection:_}]}j(Ee,`createCollection`);function De(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}j(De,`shallowEqual`);function Oe(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}j(Oe,`isElementPreceding`);function ke(e,t){return!e[1].element||!t[1].element?0:Oe(e[1].element,t[1].element)?-1:1}j(ke,`sortByDocumentPosition`);function Ae(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}j(Ae,`getChildListObserver`);var je=Object.defineProperty,Me=(e,t)=>je(e,`name`,{value:t,configurable:!0}),Ne=b.createContext(void 0);function Pe(e){let t=b.useContext(Ne);return e||t||`ltr`}Me(Pe,`useDirection`);var Fe=Object.defineProperty,Ie=(e,t)=>Fe(e,`name`,{value:t,configurable:!0}),Le=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=r(`Primitive.${t}`),i=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,x.jsx)(o,{...a,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Re(e,t){e&&re.flushSync(()=>e.dispatchEvent(t))}Ie(Re,`dispatchDiscreteCustomEvent`);var ze=Object.defineProperty,Be=(e,t)=>ze(e,`name`,{value:t,configurable:!0});function Ve(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}Be(Ve,`useCallbackRef`);var He=Object.defineProperty,M=(e,t)=>He(e,`name`,{value:t,configurable:!0}),Ue=`dismissableLayer.update`,We=`dismissableLayer.pointerDownOutside`,Ge=`dismissableLayer.focusOutside`,Ke,qe=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Je=b.forwardRef(M(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:c,onDismiss:l,...u}=e,d=b.useContext(qe),[f,p]=b.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=b.useState({}),g=s(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,S=f?_.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,w=S>=y,T=b.useRef(!1),E=Ze(e=>{a?.(e),c?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return w&&!t},[d.branches,w])}),ee=Qe(e=>{if(r&&T.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),c?.(e),e.defaultPrevented||l?.())},m),te=f?S===_.length-1:!1,D=Ve(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return b.useEffect(()=>{if(te)return m.addEventListener(`keydown`,D,{capture:!0}),()=>m.removeEventListener(`keydown`,D,{capture:!0})},[m,te,D]),b.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ke=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),$e(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=Ke))}},[f,m,n,d]),b.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),$e())},[f,d]),b.useEffect(()=>{let e=M(()=>h({}),`handleUpdate`);return document.addEventListener(Ue,e),()=>document.removeEventListener(Ue,e)},[]),(0,x.jsx)(Le.div,{...u,ref:g,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,ee.onFocusCapture),onBlurCapture:A(e.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function Ye(){let e=b.useContext(qe),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}M(Ye,`useDismissableLayerSurface`);var Xe=M(()=>!0,`IS_TRUE`);function Ze(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Xe}=t,s=Ve(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}M(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}M(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}M(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}M(p,`handleInteractionBubble`);let m=M(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||et(We,s,p,{discrete:!0})};if(M(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:M(()=>c.current=!0,`onPointerDownCapture`)}}M(Ze,`usePointerDownOutside`);function Qe(e,t=globalThis?.document){let n=Ve(e),r=b.useRef(!1);return b.useEffect(()=>{let e=M(e=>{e.target&&!r.current&&et(Ge,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:M(()=>r.current=!0,`onFocusCapture`),onBlurCapture:M(()=>r.current=!1,`onBlurCapture`)}}M(Qe,`useFocusOutside`);function $e(){let e=new CustomEvent(Ue);document.dispatchEvent(e)}M($e,`dispatchUpdate`);function et(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Re(i,a):i.dispatchEvent(a)}M(et,`handleAndDispatchCustomEvent`);var tt=Object.defineProperty,nt=(e,t)=>tt(e,`name`,{value:t,configurable:!0}),rt=0,it=null;function at(e){return ot(),e.children}nt(at,`FocusGuards`);function ot(){b.useEffect(()=>{it||={start:st(),end:st()};let{start:e,end:t}=it;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),rt++,()=>{rt===1&&(it?.start.remove(),it?.end.remove(),it=null),rt=Math.max(0,rt-1)}},[])}nt(ot,`useFocusGuards`);function st(){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}nt(st,`createFocusGuard`);var ct=Object.defineProperty,lt=(e,t)=>ct(e,`name`,{value:t,configurable:!0}),ut=`focusScope.autoFocusOnMount`,dt=`focusScope.autoFocusOnUnmount`,ft={bubbles:!1,cancelable:!0},pt=b.forwardRef(lt(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[c,l]=b.useState(null),u=Ve(i),d=Ve(a),f=b.useRef(null),p=s(t,l),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(m.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:bt(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||bt(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bt(c)};lt(e,`handleFocusIn`),lt(t,`handleFocusOut`),lt(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,m.paused]),b.useEffect(()=>{if(c){xt.add(m);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ut,ft);c.addEventListener(ut,u),c.dispatchEvent(t),t.defaultPrevented||(mt(wt(gt(c)),{select:!0}),document.activeElement===e&&bt(c))}return()=>{c.removeEventListener(ut,u),setTimeout(()=>{let t=new CustomEvent(dt,ft);c.addEventListener(dt,d),c.dispatchEvent(t),t.defaultPrevented||bt(e??document.body,{select:!0}),c.removeEventListener(dt,d),xt.remove(m)},0)}}},[c,u,d,m]);let h=b.useCallback(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ht(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bt(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bt(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,x.jsx)(Le.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})},`FocusScope`));function mt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bt(r,{select:t}),document.activeElement!==n)return}lt(mt,`focusFirst`);function ht(e){let t=gt(e);return[_t(t,e),_t(t.reverse(),e)]}lt(ht,`getTabbableEdges`);function gt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:lt(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;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}lt(gt,`getTabbableCandidates`);function _t(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vt(r,{upTo:t})))return r}lt(_t,`findVisible`);function vt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}lt(vt,`isHidden`);function yt(e){return e instanceof HTMLInputElement&&`select`in e}lt(yt,`isSelectableInput`);function bt(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yt(e)&&t&&e.select()}}lt(bt,`focus`);var xt=St();function St(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ct(e,t),e.unshift(t)},remove(t){e=Ct(e,t),e[0]?.resume()}}}lt(St,`createFocusScopesStack`);function Ct(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}lt(Ct,`arrayRemove`);function wt(e){return e.filter(e=>e.tagName!==`A`)}lt(wt,`removeLinks`);var N=globalThis?.document?b.useLayoutEffect:()=>{},Tt=Object.defineProperty,Et=(e,t)=>Tt(e,`name`,{value:t,configurable:!0}),Dt=b.useId||(()=>void 0),Ot=0;function kt(e){let[t,n]=b.useState(Dt());return N(()=>{e||n(e=>e??String(Ot++))},[e]),e||(t?`radix-${t}`:``)}Et(kt,`useId`);var At=[`top`,`right`,`bottom`,`left`],jt=Math.min,Mt=Math.max,Nt=Math.round,Pt=Math.floor,Ft=e=>({x:e,y:e}),It={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Lt(e,t,n){return Mt(e,jt(t,n))}function Rt(e,t){return typeof e==`function`?e(t):e}function zt(e){return e.split(`-`)[0]}function Bt(e){return e.split(`-`)[1]}function Vt(e){return e===`x`?`y`:`x`}function Ht(e){return e===`y`?`height`:`width`}function Ut(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wt(e){return Vt(Ut(e))}function Gt(e,t,n){n===void 0&&(n=!1);let r=Bt(e),i=Wt(e),a=Ht(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=en(o)),[o,en(o)]}function Kt(e){let t=en(e);return[qt(e),t,qt(t)]}function qt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jt=[`left`,`right`],Yt=[`right`,`left`],Xt=[`top`,`bottom`],Zt=[`bottom`,`top`];function Qt(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yt:Jt:t?Jt:Yt;case`left`:case`right`:return t?Xt:Zt;default:return[]}}function $t(e,t,n,r){let i=Bt(e),a=Qt(zt(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qt)))),a}function en(e){let t=zt(e);return It[t]+e.slice(t.length)}function tn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tn(e)}function rn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function an(e,t,n){let{reference:r,floating:i}=e,a=Ut(t),o=Wt(t),s=Ht(o),c=zt(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bt(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function on(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rt(t,e),p=nn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var sn=50,cn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:on},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=an(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<sn&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=an(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ln=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Rt(e,t)||{};if(l==null)return{};let d=nn(u),f={x:n,y:r},p=Wt(i),m=Ht(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jt(d[_],T),ee=jt(d[v],T),te=C-h[m]-ee,D=C/2-h[m]/2+w,O=Lt(E,D,te),k=!c.arrow&&Bt(i)!=null&&D!==O&&a.reference[m]/2-(D<E?E:ee)-h[m]/2<0,ne=k?D<E?D-E:D-te:0;return{[p]:f[p]+ne,data:{[p]:O,centerOffset:D-O-ne,...k&&{alignmentOffset:ne}},reset:k}}}),un=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zt(r),_=Ut(o),v=zt(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[en(o)]:Kt(o)),x=p!==`none`;!d&&x&&b.push(...$t(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Ut(t))||T.every(e=>Ut(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ut(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function dn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fn(e){return At.some(t=>e[t]>=0)}var pn=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Rt(e,t);switch(i){case`referenceHidden`:{let e=dn(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fn(e)}}}case`escaped`:{let e=dn(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fn(e)}}}default:return{}}}}},mn=new Set([`left`,`top`]);async function hn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zt(n),s=Bt(n),c=Ut(n)===`y`,l=mn.has(o)?-1:1,u=a&&c?-1:1,d=Rt(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_n=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rt(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ut(i),p=Vt(f),m=u[p],h=u[f],g=(e,t)=>Lt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vn=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rt(e,t),u={x:n,y:r},d=Ut(i),f=Vt(d),p=u[f],m=u[d],h=Rt(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mn.has(zt(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rt(e,t),c=await i.detectOverflow(t,s),l=zt(n),u=Bt(n),d=Ut(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jt(p-c[m],g),y=jt(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Mt(c.left,c.right):S=p-2*Mt(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bn(){return typeof window<`u`}function xn(e){return wn(e)?(e.nodeName||``).toLowerCase():`#document`}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){return((wn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wn(e){return bn()?e instanceof Node||e instanceof Sn(e).Node:!1}function Tn(e){return bn()?e instanceof Element||e instanceof Sn(e).Element:!1}function En(e){return bn()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function Dn(e){return!bn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function On(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function kn(e){return/^(table|td|th)$/.test(xn(e))}function An(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var jn=/transform|translate|scale|rotate|perspective|filter/,Mn=/paint|layout|strict|content/,Nn=e=>!!e&&e!==`none`,Pn;function Fn(e){let t=Tn(e)?zn(e):e;return Nn(t.transform)||Nn(t.translate)||Nn(t.scale)||Nn(t.rotate)||Nn(t.perspective)||!Ln()&&(Nn(t.backdropFilter)||Nn(t.filter))||jn.test(t.willChange||``)||Mn.test(t.contain||``)}function In(e){let t=Vn(e);for(;En(t)&&!Rn(t);){if(Fn(t))return t;if(An(t))return null;t=Vn(t)}return null}function Ln(){return Pn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pn}function Rn(e){return/^(html|body|#document)$/.test(xn(e))}function zn(e){return Sn(e).getComputedStyle(e)}function Bn(e){return Tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vn(e){if(xn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Dn(e)&&e.host||Cn(e);return Dn(t)?t.host:t}function Hn(e){let t=Vn(e);return Rn(t)?(e.ownerDocument||e).body:En(t)&&On(t)?t:Hn(t)}function Un(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Hn(e),i=r===e.ownerDocument?.body,a=Sn(r);if(i){let e=Wn(a);return t.concat(a,a.visualViewport||[],On(r)?r:[],e&&n?Un(e):[])}else return t.concat(r,Un(r,[],n))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gn(e){let t=zn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=En(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nt(n)!==a||Nt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Kn(e){return Tn(e)?e:e.contextElement}function qn(e){let t=Kn(e);if(!En(t))return Ft(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gn(t),o=(a?Nt(n.width):n.width)/r,s=(a?Nt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Jn=Ft(0);function Yn(e){let t=Sn(e);return!Ln()||!t.visualViewport?Jn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Sn(e)}function Zn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Kn(e),o=Ft(1);t&&(r?Tn(r)&&(o=qn(r)):o=qn(e));let s=Xn(a,n,r)?Yn(a):Ft(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Sn(a),t=Tn(r)?Sn(r):r,n=e,i=Wn(n);for(;i&&t!==n;){let e=qn(i),t=i.getBoundingClientRect(),r=zn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Sn(i),i=Wn(n)}}return rn({width:u,height:d,x:c,y:l})}function Qn(e,t){let n=Bn(e).scrollLeft;return t?t.left+n:Zn(Cn(e)).left+n}function $n(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qn(e,n),y:n.top+t.scrollTop}}function er(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Cn(r),s=t?An(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ft(1),u=Ft(0),d=En(r);if((d||!a)&&((xn(r)!==`body`||On(o))&&(c=Bn(r)),d)){let e=Zn(r);l=qn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$n(o,c):Ft(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function tr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function nr(e){let t=Bn(e),n=e.ownerDocument.body,r=Mt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Mt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qn(e),o=-t.scrollTop;return zn(n).direction===`rtl`&&(a+=Mt(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var rr=25;function ir(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Sn(e),a=Cn(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ln()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=rr&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ar(e,t){let n=Zn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function or(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ir(e,n,t);else if(t===`document`)r=nr(Cn(e));else if(Tn(t))r=ar(t,n);else{let n=Yn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rn(r)}function sr(e,t){let n=t.get(e);if(n)return n;let r=Un(e,[],!1).filter(e=>Tn(e)&&xn(e)!==`body`),i=null,a=zn(e).position===`fixed`,o=a?Vn(e):e;for(;Tn(o)&&!Rn(o);){let e=zn(o),t=Fn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Vn(o)}return t.set(e,r),r}function cr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?An(t)?[]:sr(t,this._c):[].concat(n),r],o=or(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=or(t,a[e],i);s=Mt(n.top,s),c=jt(n.right,c),l=jt(n.bottom,l),u=Mt(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function lr(e){let{width:t,height:n}=Gn(e);return{width:t,height:n}}function ur(e,t,n){let r=En(t),i=Cn(t),a=n===`fixed`,o=Zn(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ft(0);if((r||!a)&&((xn(t)!==`body`||On(i))&&(s=Bn(t)),r)){let e=Zn(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qn(i));let l=i&&!r&&!a?$n(i,s):Ft(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function dr(e){return zn(e).position===`static`}function fr(e,t){if(!En(e)||zn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Cn(e)===n&&(n=n.ownerDocument.body),n}function pr(e,t){let n=Sn(e);if(An(e))return n;if(!En(e)){let t=Vn(e);for(;t&&!Rn(t);){if(Tn(t)&&!dr(t))return t;t=Vn(t)}return n}let r=fr(e,t);for(;r&&kn(r)&&dr(r);)r=fr(r,t);return r&&Rn(r)&&dr(r)&&!Fn(r)?n:r||In(e)||n}var mr=async function(e){let t=this.getOffsetParent||pr,n=this.getDimensions,r=await n(e.floating);return{reference:ur(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hr(e){return zn(e).direction===`rtl`}var gr={convertOffsetParentRelativeRectToViewportRelativeRect:er,getDocumentElement:Cn,getClippingRect:cr,getOffsetParent:pr,getElementRects:mr,getClientRects:tr,getDimensions:lr,getScale:qn,isElement:Tn,isRTL:hr};function _r(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vr(e,t,n){let r=null,i,a=Cn(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pt(d),h=Pt(a.clientWidth-(u+f)),g=Pt(a.clientHeight-(d+p)),_=Pt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mt(0,jt(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!_r(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Sn(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function yr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Kn(e),u=i||a?[...l?Un(l):[],...t?Un(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?vr(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zn(e):null;c&&g();function g(){let t=Zn(e);h&&!_r(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var br=gn,xr=_n,Sr=un,Cr=yn,wr=pn,Tr=ln,Er=vn,Dr=(e,t,n)=>{let r=new Map,i=n??{},a={...gr,...i.platform,_c:r};return cn(e,t,{...i,platform:a})},Or=typeof document<`u`?b.useLayoutEffect:function(){};function kr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!kr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ar(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){let n=Ar(e);return Math.round(t*n)/n}function Mr(e){let t=b.useRef(e);return Or(()=>{t.current=e}),t}function Nr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);kr(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,ee=Mr(c),te=Mr(i),D=Mr(l),O=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),Dr(C.current,w.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};k.current&&!kr(T.current,t)&&(T.current=t,re.flushSync(()=>{d(t)}))})},[f,t,n,te,D]);Or(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=b.useRef(!1);Or(()=>(k.current=!0,()=>{k.current=!1}),[]),Or(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(ee.current)return ee.current(x,S,O);O()}},[x,S,O,ee,E]);let ne=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),ie=b.useMemo(()=>({reference:x,floating:S}),[x,S]),ae=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!ie.floating)return e;let t=jr(ie.floating,u.x),r=jr(ie.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ar(ie.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ie.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:ne,elements:ie,floatingStyles:ae}),[u,O,ne,ie,ae])}var Pr=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Tr({element:r.current,padding:i}).fn(n):r?Tr({element:r,padding:i}).fn(n):{}}}},Fr=(e,t)=>{let n=br(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ir=(e,t)=>{let n=xr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lr=(e,t)=>({fn:Er(e).fn,options:[e,t]}),Rr=(e,t)=>{let n=Sr(e);return{name:n.name,fn:n.fn,options:[e,t]}},zr=(e,t)=>{let n=Cr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Br=(e,t)=>{let n=wr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vr=(e,t)=>{let n=Pr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hr=Object.defineProperty,Ur=(e,t)=>Hr(e,`name`,{value:t,configurable:!0});function Wr(e){let[t,n]=b.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}Ur(Wr,`useSize`);var Gr=Object.defineProperty,Kr=(e,t)=>Gr(e,`name`,{value:t,configurable:!0}),qr=`Popper`,[Jr,Yr]=_e(qr),[Xr,Zr]=Jr(qr),Qr=Kr(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,x.jsx)(Xr,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),$r=`PopperAnchor`,ei=b.forwardRef(Kr(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Zr($r,n),o=b.useRef(null),c=a.onAnchorChange,l=s(t,b.useCallback(e=>{o.current=e,e&&c(e)},[c])),u=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let d=a.placementState&&si(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,x.jsx)(Le.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),ti=`PopperContent`,[ni,ri]=Jr(ti),ii=b.forwardRef(Kr(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:h,...g}=e,_=Zr(ti,n),[v,y]=b.useState(null),S=s(t,y),[C,w]=b.useState(null),T=Wr(C),E=T?.width??0,ee=T?.height??0,te=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,ne={padding:D,boundary:O.filter(ai),altBoundary:k},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=Nr({strategy:`fixed`,placement:te,whileElementsMounted:Kr((...e)=>yr(...e,{animationFrame:m===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Fr({mainAxis:i+ee,alignmentAxis:o}),l&&Ir({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?Lr():void 0,...ne}),l&&Rr({...ne}),zr({...ne,apply:Kr(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),C&&Vr({element:C,padding:c}),oi({arrowWidth:E,arrowHeight:ee}),p&&Br({strategy:`referenceHidden`,...ne,boundary:k?ne.boundary:void 0})]}),ce=_.setPlacementState;N(()=>(ce(ae),()=>{ce(void 0)}),[ae,ce]);let[le,A]=si(ae),ue=Ve(h);N(()=>{oe&&ue?.()},[oe,ue]);let de=se.arrow?.x,fe=se.arrow?.y,pe=se.arrow?.centerOffset!==0,[me,he]=b.useState();return N(()=>{v&&he(window.getComputedStyle(v).zIndex)},[v]),(0,x.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:me,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,x.jsx)(ni,{scope:n,placedSide:le,placedAlign:A,onArrowChange:w,arrowX:de,arrowY:fe,shouldHideArrow:pe,children:(0,x.jsx)(Le.div,{"data-side":le,"data-align":A,...g,ref:S,style:{...g.style,animation:oe?g.style?.animation:`none`}})})})},`PopperContent`));function ai(e){return e!==null}Kr(ai,`isNotNull`);var oi=Kr(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=si(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function si(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Kr(si,`getSideAndAlignFromPlacement`);var ci=Qr,li=ei,ui=ii,di=Object.defineProperty,fi=b.forwardRef(((e,t)=>di(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);N(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?re.createPortal((0,x.jsx)(Le.div,{...r,ref:t}),o):null},`Portal`)),pi=Object.defineProperty,mi=(e,t)=>pi(e,`name`,{value:t,configurable:!0});function hi(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}mi(hi,`useStateMachine`);var gi=mi(e=>{let{present:t,children:n}=e,r=_i(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=yi(r.ref,xi(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function _i(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=hi(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??bi(r.current),o.current=void 0):a.current=`none`},[s]),N(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=bi(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),N(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=mi(a=>{let o=bi(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=mi(e=>{e.target===t&&(a.current=bi(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=bi(t)}else r.current=null;n(e)},[])}}mi(_i,`usePresence`);function vi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}mi(vi,`setRef`);function yi(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=vi(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():vi(n[e],null)}}},[])}mi(yi,`useStableComposedRefs`);function bi(e){return e?.animationName||`none`}mi(bi,`getAnimationName`);function xi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}mi(xi,`getElementRef`);var Si=Object.defineProperty,Ci=(e,t)=>Si(e,`name`,{value:t,configurable:!0}),wi=b.useEffectEvent,Ti=b.useInsertionEffect;function Ei(e){if(typeof wi==`function`)return wi(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ti==`function`?Ti(()=>{t.current=e}):N(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ci(Ei,`useEffectEvent`);var Di=Object.defineProperty,Oi=(e,t)=>Di(e,`name`,{value:t,configurable:!0}),ki=b.useInsertionEffect||N;function Ai({prop:e,defaultProp:t,onChange:n=Oi(()=>{},`onChange`),caller:r}){let[i,a,o]=ji({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=Mi(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Oi(Ai,`useControllableState`);function ji({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return ki(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Oi(ji,`useUncontrolledState`);function Mi(e){return typeof e==`function`}Oi(Mi,`isFunction`);var Ni=Symbol(`RADIX:SYNC_STATE`);function Pi(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ei(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===Ni)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Ni,state:i})},[i,d.state,c]),[h,f]}Oi(Pi,`useControllableStateReducer`);var Fi=Object.defineProperty,Ii=(e,t)=>Fi(e,`name`,{value:t,configurable:!0});function Li(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Ii(Li,`usePrevious`);var Ri=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),zi=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Bi=new WeakMap,Vi=new WeakMap,Hi={},Ui=0,Wi=function(e){return e&&(e.host||Wi(e.parentNode))},Gi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Wi(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ki=function(e,t,n,r){var i=Gi(t,Array.isArray(e)?e:[e]);Hi[n]||(Hi[n]=new WeakMap);var a=Hi[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Bi.get(e)||0)+1,l=(a.get(e)||0)+1;Bi.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Vi.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ui++,function(){o.forEach(function(e){var t=Bi.get(e)-1,i=a.get(e)-1;Bi.set(e,t),a.set(e,i),t||(Vi.has(e)||e.removeAttribute(r),Vi.delete(e)),i||e.removeAttribute(n)}),Ui--,Ui||(Bi=new WeakMap,Bi=new WeakMap,Vi=new WeakMap,Hi={})}},qi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zi(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ki(r,i,n,`aria-hidden`)):function(){return null}},Ji=function(){return Ji=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ji.apply(this,arguments)};function Yi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Zi=`right-scroll-bar-position`,Qi=`width-before-scroll-bar`,$i=`with-scroll-bars-hidden`,ea=`--removed-body-scroll-bar-size`;function ta(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function na(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ra=typeof window<`u`?b.useLayoutEffect:b.useEffect,ia=new WeakMap;function aa(e,t){var n=na(t||null,function(t){return e.forEach(function(e){return ta(e,t)})});return ra(function(){var t=ia.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ta(e,null)}),i.forEach(function(e){r.has(e)||ta(e,a)})}ia.set(n,e)},[e]),n}function oa(e){return e}function sa(e,t){t===void 0&&(t=oa);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ca(e){e===void 0&&(e={});var t=sa(null);return t.options=Ji({async:!0,ssr:!1},e),t}var la=function(e){var t=e.sideCar,n=Yi(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 b.createElement(r,Ji({},n))};la.isSideCarExport=!0;function ua(e,t){return e.useMedium(t),la}var da=ca(),fa=function(){},pa=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:fa,onWheelCapture:fa,onTouchMoveCapture:fa}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=Yi(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=aa([n,t]),w=Ji(Ji({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:da,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),Ji(Ji({},w),{ref:C})):b.createElement(v,Ji({},w,{className:c,ref:C}),s))});pa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pa.classNames={fullWidth:Qi,zeroRight:Zi};var ma,ha=function(){if(ma)return ma;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ga(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ha();return t&&e.setAttribute(`nonce`,t),e}function _a(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function va(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ya=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ga())&&(_a(t,n),va(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ba=function(){var e=ya();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xa=function(){var e=ba();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Sa={left:0,top:0,right:0,gap:0},Ca=function(e){return parseInt(e||``,10)||0},wa=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Ca(n),Ca(r),Ca(i)]},Ta=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Sa;var t=wa(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])}},Ea=xa(),Da=`data-scroll-locked`,Oa=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{S as e,_ as t,b as n,l as r,m as i,o as a,p as o,u as s,v as c,x as l}from"./globals-Bis7MDt7.js";var u=t(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=t(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f=t(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),p=t(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),m=t(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),h=t(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),g=t(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),_=t(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),v=t(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),y=t(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),b=e(l(),1),x=o(),S={claude:{viewBox:`0 0 24 24`,path:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`},codex:{viewBox:`1.68 1.75 16.65 16.5`,path:`M11.248 18.25q-.825 0-1.568-.314a4.3 4.3 0 0 1-1.32-.874 4 4 0 0 1-1.304.214 4 4 0 0 1-2.046-.544 4.27 4.27 0 0 1-1.518-1.485 4 4 0 0 1-.56-2.095q0-.48.131-1.04A4.4 4.4 0 0 1 2.04 10.71a4.07 4.07 0 0 1 .017-3.4 4.2 4.2 0 0 1 1.056-1.418 3.8 3.8 0 0 1 1.6-.842 3.9 3.9 0 0 1 .76-1.683q.593-.759 1.451-1.188a4.04 4.04 0 0 1 1.832-.429q.825 0 1.567.313.742.314 1.32.875a4 4 0 0 1 1.304-.215q1.106 0 2.046.545a4.14 4.14 0 0 1 1.501 1.485q.578.941.578 2.095 0 .48-.132 1.04.66.61 1.023 1.419.363.792.363 1.666 0 .892-.38 1.717a4.3 4.3 0 0 1-1.072 1.435 3.8 3.8 0 0 1-1.584.825 3.8 3.8 0 0 1-.775 1.683 4.06 4.06 0 0 1-1.436 1.188 4.04 4.04 0 0 1-1.832.429m-4.076-2.062q.825 0 1.435-.347l3.103-1.782a.36.36 0 0 0 .164-.313v-1.42L7.881 14.62a.67.67 0 0 1-.726 0l-3.118-1.798a.5.5 0 0 1-.017.115v.198q0 .841.396 1.551.413.693 1.139 1.089a3.2 3.2 0 0 0 1.617.412m.165-2.69a.4.4 0 0 0 .181.05q.083 0 .165-.05l1.238-.71-3.977-2.31a.7.7 0 0 1-.363-.643v-3.58q-.825.362-1.32 1.122a2.9 2.9 0 0 0-.495 1.65q0 .809.413 1.55.412.743 1.072 1.123zm3.91 3.663q.875 0 1.585-.396a2.96 2.96 0 0 0 1.534-2.64v-3.564a.32.32 0 0 0-.165-.297l-1.254-.726v4.604a.7.7 0 0 1-.363.643l-3.119 1.799a3 3 0 0 0 1.783.577m.627-6.039V8.878L10.01 7.822 8.129 8.878v2.244l1.881 1.056zM7.057 5.859a.7.7 0 0 1 .363-.644l3.119-1.798a3 3 0 0 0-1.782-.578q-.874 0-1.584.396A2.96 2.96 0 0 0 6.05 4.324a3.07 3.07 0 0 0-.396 1.551v3.547q0 .199.165.314l1.237.726zm8.383 7.887q.825-.364 1.303-1.123.495-.758.495-1.65a3.15 3.15 0 0 0-.412-1.55q-.413-.743-1.073-1.123l-3.086-1.782q-.099-.065-.181-.049a.3.3 0 0 0-.165.05l-1.238.692 3.993 2.327a.6.6 0 0 1 .264.264.64.64 0 0 1 .1.363zm-3.317-8.382a.63.63 0 0 1 .726 0l3.135 1.831v-.297q0-.792-.396-1.501a2.86 2.86 0 0 0-1.105-1.155q-.71-.43-1.65-.43-.825 0-1.436.347L8.294 5.941a.36.36 0 0 0-.165.314v1.418z`},antigravity:{viewBox:`0 0 125 113`,path:`M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z`},vibe:{viewBox:`0 0 24 24`,path:`M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z`},grok:{viewBox:`0 0 466.04 516.93`,path:`M0.12 182.71L234.14 516.92H338.15L104.13 182.71ZM0 516.92H104.08L156.08 442.67L104.04 368.34ZM466.04 0H361.96L182.1 256.86L234.15 331.18ZM380.78 516.92H466.04V37.16L380.78 158.92Z`},cursor:{viewBox:`0 0 24 24`,path:`M11.925 24l10.425-6-10.425-6L1.5 18l10.425 6zM22.35 18V6L11.925 0v12l10.425 6zM11.925 12V0L1.5 6v12l10.425-6z`},qwen:{viewBox:`0 0 24 24`,path:`M23.919 14.545 20.817 9.17l1.47-2.544a.56.56 0 0 0 0-.566l-1.633-2.83a.57.57 0 0 0-.49-.283h-6.207L12.487.402a.57.57 0 0 0-.49-.284H8.732a.56.56 0 0 0-.49.284L5.139 5.775h-2.94a.56.56 0 0 0-.49.284L.077 8.887a.56.56 0 0 0 0 .567L3.18 14.83l-1.47 2.545a.56.56 0 0 0 0 .566l1.634 2.83a.57.57 0 0 0 .49.283h6.205l1.47 2.545a.57.57 0 0 0 .49.284h3.266a.57.57 0 0 0 .49-.284l3.104-5.375h2.94a.57.57 0 0 0 .49-.283l1.634-2.828a.55.55 0 0 0-.004-.568M8.733.686l1.634 2.828-1.634 2.828H21.8L20.164 9.17H7.425L5.63 6.06Zm1.306 19.801-6.205-.002 1.634-2.83h3.265L2.201 6.344h3.267q3.182 5.517 6.367 11.032zm10.124-5.66L18.53 12l-6.532 11.315-1.634-2.83c2.129-3.673 4.25-7.351 6.373-11.028h3.592l3.102 5.374z`},opencode:{viewBox:`128 96 256 320`,path:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}};function C({kind:e,className:t}){let n=S[e];return(0,x.jsx)(`svg`,{viewBox:n.viewBox,fill:`currentColor`,className:i(`size-3.5 shrink-0`,t),"aria-hidden":!0,children:(0,x.jsx)(`path`,{d:n.path})})}var w=[`claude`,`codex`,`antigravity`,`vibe`,`grok`,`cursor`,`qwen`,`opencode`],T={claude:{kind:`claude`,label:`Claude Code`,vendor:`Anthropic`,bin:`claude`,install:`npm i -g @anthropic-ai/claude-code`,docs:`https://claude.com/claude-code`,models:[`claude-fable-5`,`claude-opus-5`,`claude-sonnet-5`,`claude-haiku-4-5`]},codex:{kind:`codex`,label:`Codex`,vendor:`OpenAI`,bin:`codex`,install:`npm i -g @openai/codex`,docs:`https://developers.openai.com/codex/cli`,models:[`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`]},antigravity:{kind:`antigravity`,label:`Antigravity`,vendor:`Google`,bin:`agy`,install:`https://antigravity.google/docs/cli/install`,docs:`https://antigravity.google/docs/cli`,models:[`gemini-3-pro`,`gemini-3-flash`]},vibe:{kind:`vibe`,label:`Mistral Vibe`,vendor:`Mistral AI`,bin:`vibe`,install:`uv tool install mistral-vibe`,docs:`https://github.com/mistralai/mistral-vibe`,models:[`mistral-medium-3.5`],beta:!0},grok:{kind:`grok`,label:`Grok Build`,vendor:`xAI`,bin:`grok`,install:`curl -fsSL https://x.ai/cli/install.sh | bash`,docs:`https://docs.x.ai/build/overview`,models:[`grok-4.7`],beta:!0},cursor:{kind:`cursor`,label:`Cursor CLI`,vendor:`Anysphere`,bin:`cursor-agent`,install:`curl https://cursor.com/install -fsS | bash`,docs:`https://cursor.com/docs/cli/overview`,models:[`composer-2.5`,`claude-opus-4-8`,`gpt-5`,`sonnet-4-thinking`],beta:!0},qwen:{kind:`qwen`,label:`Qwen Code`,vendor:`Alibaba`,bin:`qwen`,install:`npm i -g @qwen-code/qwen-code`,docs:`https://qwenlm.github.io/qwen-code-docs/en/`,models:[`qwen3-coder-plus`,`qwen3.7-plus`,`qwen3.6-plus`,`qwen3-max-2026-01-23`],beta:!0},opencode:{kind:`opencode`,label:`OpenCode`,vendor:`Anomaly`,bin:`opencode`,install:`npm i -g opencode-ai`,docs:`https://opencode.ai/docs/cli/`,models:[`anthropic/claude-opus-5-5`,`anthropic/claude-sonnet-5`,`openai/gpt-5.6`,`google/gemini-3.1-pro-preview`],beta:!0}},E=w.map(e=>T[e]);function ee(e){return e?.runners.find(t=>t.kind===e.active)}function te(e,{running:t,listening:n}={}){let r=ee(e?.agent)?.ready!==!1,i=(e?.connected??!1)&&r;return e?.paired?e.connected?r?t?{tone:`busy`,label:`Working`,ready:i}:n?{tone:`listening`,label:`Listening`,ready:i}:{tone:`live`,label:`Online`,ready:i}:{tone:`warn`,label:`Agent blocked`,ready:i,blocker:`agent`}:{tone:`pending`,label:`Reconnecting`,ready:i,blocker:`offline`}:{tone:`off`,label:`Not paired`,ready:i,blocker:`unpaired`}}var D={off:`bg-ink-faint/50`,pending:`glow-dot animate-pulse bg-amber text-amber`,live:`glow-dot bg-lime text-lime`,busy:`glow-dot animate-pulse bg-brand text-brand`,listening:`glow-dot animate-pulse bg-magenta text-magenta`,warn:`glow-dot bg-ember text-ember`},O={off:`text-ink-faint`,pending:`text-amber`,live:`text-ink-dim`,busy:`text-brand`,listening:`text-magenta`,warn:`text-ember`};function k({tone:e,className:t}){return(0,x.jsx)(`span`,{className:i(`size-1.5 shrink-0 rounded-full`,D[e],t)})}function ne({tone:e,children:t,onClick:n,expanded:r,className:a}){let o=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(k,{tone:e}),(0,x.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),n&&(0,x.jsx)(d,{className:i(`size-3 shrink-0 text-ink-faint transition-transform`,r&&`rotate-180`)})]}),s=i(`inline-flex max-w-full items-center gap-1.5 rounded-full border border-line bg-ground-2/70 px-2.5 py-1`,`font-mono text-[10px] tracking-[0.12em] uppercase`,O[e],a);return n?(0,x.jsx)(`button`,{type:`button`,onClick:n,"aria-expanded":r,className:i(s,`transition-colors hover:border-brand/40 hover:bg-surface/60`),children:o}):(0,x.jsx)(`span`,{className:s,children:o})}var re=e(n(),1),ie=Object.defineProperty,ae=(e,t)=>ie(e,`name`,{value:t,configurable:!0});function oe(e,[t,n]){return Math.min(n,Math.max(t,e))}ae(oe,`clamp`);var se=Object.defineProperty,ce=(e,t)=>se(e,`name`,{value:t,configurable:!0}),le=!!(typeof window<`u`&&window.document&&window.document.createElement);function A(e,t,{checkForDefaultPrevented:n=!0}={}){return ce(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ce(A,`composeEventHandlers`);function ue(e){if(!le)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ce(ue,`getOwnerWindow`);function de(e){if(!le)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ce(de,`getOwnerDocument`);function fe(e,t=!1){let{activeElement:n}=de(e);if(!n?.nodeName)return null;if(pe(n)&&n.contentDocument)return fe(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=de(n).getElementById(e);if(t)return t}}return n}ce(fe,`getActiveElement`);function pe(e){return e.tagName===`IFRAME`}ce(pe,`isFrame`);var me=Object.defineProperty,he=(e,t)=>me(e,`name`,{value:t,configurable:!0});function ge(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=he(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,x.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return he(i,`useContext`),[r,i]}he(ge,`createContext`);function _e(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=he(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,x.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return he(s,`useContext`),[o,s]}he(r,`createContext`);let i=he(()=>{let t=n.map(e=>b.createContext(e));return he(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ve(i,...t)]}he(_e,`createContextScope`);function ve(...e){let t=e[0];if(e.length===1)return t;let n=he(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return he(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}he(ve,`composeContextScopes`);var ye=Object.defineProperty,j=(e,t)=>ye(e,`name`,{value:t,configurable:!0});function be(e){let t=e+`CollectionProvider`,[n,i]=_e(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=j(e=>{let{scope:t,children:n}=e,r=b.useRef(null),i=b.useRef(new Map).current;return(0,x.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let l=e+`CollectionSlot`,u=r(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=s(t,o(l,n).collectionRef);return(0,x.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=r(f),h=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),c=s(t,a),l=o(f,n);return b.useEffect(()=>(l.itemMap.set(a,{ref:a,...i}),()=>void l.itemMap.delete(a))),(0,x.jsx)(m,{[p]:``,ref:c,children:r})});h.displayName=f;function g(t){let n=o(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return j(g,`useCollection`),[{Provider:c,Slot:d,ItemSlot:h},g,i]}j(be,`createCollection`);var xe=new WeakMap,Se=class e extends Map{static{j(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],xe.set(this,!0)}set(e,t){return xe.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Te(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Ce(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Ce(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ce(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Ce(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=we(e,t);return n===-1?void 0:e[n]}j(Ce,`at`);function we(e,t){let n=e.length,r=Te(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}j(we,`toSafeIndex`);function Te(e){return e!==e||e===0?0:Math.trunc(e)}j(Te,`toSafeInteger`);function Ee(e){let t=e+`CollectionProvider`,[n,i]=_e(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Se,setItemMap:j(()=>void 0,`setItemMap`)}),c=j(({state:e,...t})=>e?(0,x.jsx)(u,{...t,state:e}):(0,x.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=j(e=>{let t=_();return(0,x.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=t+`Init`;let u=j(e=>{let{scope:t,children:n,state:r}=e,i=b.useRef(null),[o,c]=b.useState(null),l=s(i,c),[u,d]=r;return b.useEffect(()=>{if(!o)return;let e=Ae(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,x.jsx)(a,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:i,collectionElement:o,children:n})},`CollectionProviderImpl`);u.displayName=t+`Impl`;let d=e+`CollectionSlot`,f=r(d),p=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=s(t,o(d,n).collectionRef);return(0,x.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=r(m),g=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),[c,l]=b.useState(null),u=s(t,a,l),{setItemMap:d}=o(m,n),f=b.useRef(i);De(f.current,i)||(f.current=i);let p=f.current;return b.useEffect(()=>{let e=p;return d(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(ke):(t.set(c,{...e,element:c}),t.toSorted(ke)):t),()=>{d(e=>!c||!e.has(c)?e:(e.delete(c),new Se(e)))}},[c,p,d]),(0,x.jsx)(h,{"data-radix-collection-item":``,ref:u,children:r})});g.displayName=m;function _(){return b.useState(new Se)}j(_,`useInitCollection`);function v(t){let{itemMap:n}=o(e+`CollectionConsumer`,t);return n}return j(v,`useCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:i,useCollection:v,useInitCollection:_}]}j(Ee,`createCollection`);function De(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}j(De,`shallowEqual`);function Oe(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}j(Oe,`isElementPreceding`);function ke(e,t){return!e[1].element||!t[1].element?0:Oe(e[1].element,t[1].element)?-1:1}j(ke,`sortByDocumentPosition`);function Ae(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}j(Ae,`getChildListObserver`);var je=Object.defineProperty,Me=(e,t)=>je(e,`name`,{value:t,configurable:!0}),Ne=b.createContext(void 0);function Pe(e){let t=b.useContext(Ne);return e||t||`ltr`}Me(Pe,`useDirection`);var Fe=Object.defineProperty,Ie=(e,t)=>Fe(e,`name`,{value:t,configurable:!0}),Le=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=r(`Primitive.${t}`),i=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,x.jsx)(o,{...a,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Re(e,t){e&&re.flushSync(()=>e.dispatchEvent(t))}Ie(Re,`dispatchDiscreteCustomEvent`);var ze=Object.defineProperty,Be=(e,t)=>ze(e,`name`,{value:t,configurable:!0});function Ve(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}Be(Ve,`useCallbackRef`);var He=Object.defineProperty,M=(e,t)=>He(e,`name`,{value:t,configurable:!0}),Ue=`dismissableLayer.update`,We=`dismissableLayer.pointerDownOutside`,Ge=`dismissableLayer.focusOutside`,Ke,qe=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Je=b.forwardRef(M(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:c,onDismiss:l,...u}=e,d=b.useContext(qe),[f,p]=b.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=b.useState({}),g=s(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,S=f?_.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,w=S>=y,T=b.useRef(!1),E=Ze(e=>{a?.(e),c?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return w&&!t},[d.branches,w])}),ee=Qe(e=>{if(r&&T.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),c?.(e),e.defaultPrevented||l?.())},m),te=f?S===_.length-1:!1,D=Ve(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return b.useEffect(()=>{if(te)return m.addEventListener(`keydown`,D,{capture:!0}),()=>m.removeEventListener(`keydown`,D,{capture:!0})},[m,te,D]),b.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ke=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),$e(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=Ke))}},[f,m,n,d]),b.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),$e())},[f,d]),b.useEffect(()=>{let e=M(()=>h({}),`handleUpdate`);return document.addEventListener(Ue,e),()=>document.removeEventListener(Ue,e)},[]),(0,x.jsx)(Le.div,{...u,ref:g,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,ee.onFocusCapture),onBlurCapture:A(e.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function Ye(){let e=b.useContext(qe),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}M(Ye,`useDismissableLayerSurface`);var Xe=M(()=>!0,`IS_TRUE`);function Ze(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Xe}=t,s=Ve(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}M(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}M(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}M(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}M(p,`handleInteractionBubble`);let m=M(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||et(We,s,p,{discrete:!0})};if(M(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:M(()=>c.current=!0,`onPointerDownCapture`)}}M(Ze,`usePointerDownOutside`);function Qe(e,t=globalThis?.document){let n=Ve(e),r=b.useRef(!1);return b.useEffect(()=>{let e=M(e=>{e.target&&!r.current&&et(Ge,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:M(()=>r.current=!0,`onFocusCapture`),onBlurCapture:M(()=>r.current=!1,`onBlurCapture`)}}M(Qe,`useFocusOutside`);function $e(){let e=new CustomEvent(Ue);document.dispatchEvent(e)}M($e,`dispatchUpdate`);function et(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Re(i,a):i.dispatchEvent(a)}M(et,`handleAndDispatchCustomEvent`);var tt=Object.defineProperty,nt=(e,t)=>tt(e,`name`,{value:t,configurable:!0}),rt=0,it=null;function at(e){return ot(),e.children}nt(at,`FocusGuards`);function ot(){b.useEffect(()=>{it||={start:st(),end:st()};let{start:e,end:t}=it;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),rt++,()=>{rt===1&&(it?.start.remove(),it?.end.remove(),it=null),rt=Math.max(0,rt-1)}},[])}nt(ot,`useFocusGuards`);function st(){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}nt(st,`createFocusGuard`);var ct=Object.defineProperty,lt=(e,t)=>ct(e,`name`,{value:t,configurable:!0}),ut=`focusScope.autoFocusOnMount`,dt=`focusScope.autoFocusOnUnmount`,ft={bubbles:!1,cancelable:!0},pt=b.forwardRef(lt(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[c,l]=b.useState(null),u=Ve(i),d=Ve(a),f=b.useRef(null),p=s(t,l),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(m.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:bt(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||bt(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bt(c)};lt(e,`handleFocusIn`),lt(t,`handleFocusOut`),lt(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,m.paused]),b.useEffect(()=>{if(c){xt.add(m);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ut,ft);c.addEventListener(ut,u),c.dispatchEvent(t),t.defaultPrevented||(mt(wt(gt(c)),{select:!0}),document.activeElement===e&&bt(c))}return()=>{c.removeEventListener(ut,u),setTimeout(()=>{let t=new CustomEvent(dt,ft);c.addEventListener(dt,d),c.dispatchEvent(t),t.defaultPrevented||bt(e??document.body,{select:!0}),c.removeEventListener(dt,d),xt.remove(m)},0)}}},[c,u,d,m]);let h=b.useCallback(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ht(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bt(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bt(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,x.jsx)(Le.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})},`FocusScope`));function mt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bt(r,{select:t}),document.activeElement!==n)return}lt(mt,`focusFirst`);function ht(e){let t=gt(e);return[_t(t,e),_t(t.reverse(),e)]}lt(ht,`getTabbableEdges`);function gt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:lt(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;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}lt(gt,`getTabbableCandidates`);function _t(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vt(r,{upTo:t})))return r}lt(_t,`findVisible`);function vt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}lt(vt,`isHidden`);function yt(e){return e instanceof HTMLInputElement&&`select`in e}lt(yt,`isSelectableInput`);function bt(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yt(e)&&t&&e.select()}}lt(bt,`focus`);var xt=St();function St(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ct(e,t),e.unshift(t)},remove(t){e=Ct(e,t),e[0]?.resume()}}}lt(St,`createFocusScopesStack`);function Ct(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}lt(Ct,`arrayRemove`);function wt(e){return e.filter(e=>e.tagName!==`A`)}lt(wt,`removeLinks`);var N=globalThis?.document?b.useLayoutEffect:()=>{},Tt=Object.defineProperty,Et=(e,t)=>Tt(e,`name`,{value:t,configurable:!0}),Dt=b.useId||(()=>void 0),Ot=0;function kt(e){let[t,n]=b.useState(Dt());return N(()=>{e||n(e=>e??String(Ot++))},[e]),e||(t?`radix-${t}`:``)}Et(kt,`useId`);var At=[`top`,`right`,`bottom`,`left`],jt=Math.min,Mt=Math.max,Nt=Math.round,Pt=Math.floor,Ft=e=>({x:e,y:e}),It={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Lt(e,t,n){return Mt(e,jt(t,n))}function Rt(e,t){return typeof e==`function`?e(t):e}function zt(e){return e.split(`-`)[0]}function Bt(e){return e.split(`-`)[1]}function Vt(e){return e===`x`?`y`:`x`}function Ht(e){return e===`y`?`height`:`width`}function Ut(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wt(e){return Vt(Ut(e))}function Gt(e,t,n){n===void 0&&(n=!1);let r=Bt(e),i=Wt(e),a=Ht(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=en(o)),[o,en(o)]}function Kt(e){let t=en(e);return[qt(e),t,qt(t)]}function qt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jt=[`left`,`right`],Yt=[`right`,`left`],Xt=[`top`,`bottom`],Zt=[`bottom`,`top`];function Qt(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yt:Jt:t?Jt:Yt;case`left`:case`right`:return t?Xt:Zt;default:return[]}}function $t(e,t,n,r){let i=Bt(e),a=Qt(zt(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qt)))),a}function en(e){let t=zt(e);return It[t]+e.slice(t.length)}function tn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tn(e)}function rn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function an(e,t,n){let{reference:r,floating:i}=e,a=Ut(t),o=Wt(t),s=Ht(o),c=zt(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bt(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function on(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rt(t,e),p=nn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var sn=50,cn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:on},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=an(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<sn&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=an(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ln=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Rt(e,t)||{};if(l==null)return{};let d=nn(u),f={x:n,y:r},p=Wt(i),m=Ht(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jt(d[_],T),ee=jt(d[v],T),te=C-h[m]-ee,D=C/2-h[m]/2+w,O=Lt(E,D,te),k=!c.arrow&&Bt(i)!=null&&D!==O&&a.reference[m]/2-(D<E?E:ee)-h[m]/2<0,ne=k?D<E?D-E:D-te:0;return{[p]:f[p]+ne,data:{[p]:O,centerOffset:D-O-ne,...k&&{alignmentOffset:ne}},reset:k}}}),un=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zt(r),_=Ut(o),v=zt(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[en(o)]:Kt(o)),x=p!==`none`;!d&&x&&b.push(...$t(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Ut(t))||T.every(e=>Ut(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ut(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function dn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fn(e){return At.some(t=>e[t]>=0)}var pn=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Rt(e,t);switch(i){case`referenceHidden`:{let e=dn(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fn(e)}}}case`escaped`:{let e=dn(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fn(e)}}}default:return{}}}}},mn=new Set([`left`,`top`]);async function hn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zt(n),s=Bt(n),c=Ut(n)===`y`,l=mn.has(o)?-1:1,u=a&&c?-1:1,d=Rt(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_n=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rt(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ut(i),p=Vt(f),m=u[p],h=u[f],g=(e,t)=>Lt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vn=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rt(e,t),u={x:n,y:r},d=Ut(i),f=Vt(d),p=u[f],m=u[d],h=Rt(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mn.has(zt(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rt(e,t),c=await i.detectOverflow(t,s),l=zt(n),u=Bt(n),d=Ut(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jt(p-c[m],g),y=jt(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Mt(c.left,c.right):S=p-2*Mt(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bn(){return typeof window<`u`}function xn(e){return wn(e)?(e.nodeName||``).toLowerCase():`#document`}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){return((wn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wn(e){return bn()?e instanceof Node||e instanceof Sn(e).Node:!1}function Tn(e){return bn()?e instanceof Element||e instanceof Sn(e).Element:!1}function En(e){return bn()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function Dn(e){return!bn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function On(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function kn(e){return/^(table|td|th)$/.test(xn(e))}function An(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var jn=/transform|translate|scale|rotate|perspective|filter/,Mn=/paint|layout|strict|content/,Nn=e=>!!e&&e!==`none`,Pn;function Fn(e){let t=Tn(e)?zn(e):e;return Nn(t.transform)||Nn(t.translate)||Nn(t.scale)||Nn(t.rotate)||Nn(t.perspective)||!Ln()&&(Nn(t.backdropFilter)||Nn(t.filter))||jn.test(t.willChange||``)||Mn.test(t.contain||``)}function In(e){let t=Vn(e);for(;En(t)&&!Rn(t);){if(Fn(t))return t;if(An(t))return null;t=Vn(t)}return null}function Ln(){return Pn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pn}function Rn(e){return/^(html|body|#document)$/.test(xn(e))}function zn(e){return Sn(e).getComputedStyle(e)}function Bn(e){return Tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vn(e){if(xn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Dn(e)&&e.host||Cn(e);return Dn(t)?t.host:t}function Hn(e){let t=Vn(e);return Rn(t)?(e.ownerDocument||e).body:En(t)&&On(t)?t:Hn(t)}function Un(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Hn(e),i=r===e.ownerDocument?.body,a=Sn(r);if(i){let e=Wn(a);return t.concat(a,a.visualViewport||[],On(r)?r:[],e&&n?Un(e):[])}else return t.concat(r,Un(r,[],n))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gn(e){let t=zn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=En(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nt(n)!==a||Nt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Kn(e){return Tn(e)?e:e.contextElement}function qn(e){let t=Kn(e);if(!En(t))return Ft(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gn(t),o=(a?Nt(n.width):n.width)/r,s=(a?Nt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Jn=Ft(0);function Yn(e){let t=Sn(e);return!Ln()||!t.visualViewport?Jn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Sn(e)}function Zn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Kn(e),o=Ft(1);t&&(r?Tn(r)&&(o=qn(r)):o=qn(e));let s=Xn(a,n,r)?Yn(a):Ft(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Sn(a),t=Tn(r)?Sn(r):r,n=e,i=Wn(n);for(;i&&t!==n;){let e=qn(i),t=i.getBoundingClientRect(),r=zn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Sn(i),i=Wn(n)}}return rn({width:u,height:d,x:c,y:l})}function Qn(e,t){let n=Bn(e).scrollLeft;return t?t.left+n:Zn(Cn(e)).left+n}function $n(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qn(e,n),y:n.top+t.scrollTop}}function er(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Cn(r),s=t?An(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ft(1),u=Ft(0),d=En(r);if((d||!a)&&((xn(r)!==`body`||On(o))&&(c=Bn(r)),d)){let e=Zn(r);l=qn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$n(o,c):Ft(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function tr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function nr(e){let t=Bn(e),n=e.ownerDocument.body,r=Mt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Mt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qn(e),o=-t.scrollTop;return zn(n).direction===`rtl`&&(a+=Mt(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var rr=25;function ir(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Sn(e),a=Cn(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ln()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=rr&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ar(e,t){let n=Zn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function or(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ir(e,n,t);else if(t===`document`)r=nr(Cn(e));else if(Tn(t))r=ar(t,n);else{let n=Yn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rn(r)}function sr(e,t){let n=t.get(e);if(n)return n;let r=Un(e,[],!1).filter(e=>Tn(e)&&xn(e)!==`body`),i=null,a=zn(e).position===`fixed`,o=a?Vn(e):e;for(;Tn(o)&&!Rn(o);){let e=zn(o),t=Fn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Vn(o)}return t.set(e,r),r}function cr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?An(t)?[]:sr(t,this._c):[].concat(n),r],o=or(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=or(t,a[e],i);s=Mt(n.top,s),c=jt(n.right,c),l=jt(n.bottom,l),u=Mt(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function lr(e){let{width:t,height:n}=Gn(e);return{width:t,height:n}}function ur(e,t,n){let r=En(t),i=Cn(t),a=n===`fixed`,o=Zn(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ft(0);if((r||!a)&&((xn(t)!==`body`||On(i))&&(s=Bn(t)),r)){let e=Zn(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qn(i));let l=i&&!r&&!a?$n(i,s):Ft(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function dr(e){return zn(e).position===`static`}function fr(e,t){if(!En(e)||zn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Cn(e)===n&&(n=n.ownerDocument.body),n}function pr(e,t){let n=Sn(e);if(An(e))return n;if(!En(e)){let t=Vn(e);for(;t&&!Rn(t);){if(Tn(t)&&!dr(t))return t;t=Vn(t)}return n}let r=fr(e,t);for(;r&&kn(r)&&dr(r);)r=fr(r,t);return r&&Rn(r)&&dr(r)&&!Fn(r)?n:r||In(e)||n}var mr=async function(e){let t=this.getOffsetParent||pr,n=this.getDimensions,r=await n(e.floating);return{reference:ur(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hr(e){return zn(e).direction===`rtl`}var gr={convertOffsetParentRelativeRectToViewportRelativeRect:er,getDocumentElement:Cn,getClippingRect:cr,getOffsetParent:pr,getElementRects:mr,getClientRects:tr,getDimensions:lr,getScale:qn,isElement:Tn,isRTL:hr};function _r(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vr(e,t,n){let r=null,i,a=Cn(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pt(d),h=Pt(a.clientWidth-(u+f)),g=Pt(a.clientHeight-(d+p)),_=Pt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mt(0,jt(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!_r(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Sn(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function yr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Kn(e),u=i||a?[...l?Un(l):[],...t?Un(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?vr(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zn(e):null;c&&g();function g(){let t=Zn(e);h&&!_r(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var br=gn,xr=_n,Sr=un,Cr=yn,wr=pn,Tr=ln,Er=vn,Dr=(e,t,n)=>{let r=new Map,i=n??{},a={...gr,...i.platform,_c:r};return cn(e,t,{...i,platform:a})},Or=typeof document<`u`?b.useLayoutEffect:function(){};function kr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!kr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ar(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){let n=Ar(e);return Math.round(t*n)/n}function Mr(e){let t=b.useRef(e);return Or(()=>{t.current=e}),t}function Nr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);kr(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,ee=Mr(c),te=Mr(i),D=Mr(l),O=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),Dr(C.current,w.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};k.current&&!kr(T.current,t)&&(T.current=t,re.flushSync(()=>{d(t)}))})},[f,t,n,te,D]);Or(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=b.useRef(!1);Or(()=>(k.current=!0,()=>{k.current=!1}),[]),Or(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(ee.current)return ee.current(x,S,O);O()}},[x,S,O,ee,E]);let ne=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),ie=b.useMemo(()=>({reference:x,floating:S}),[x,S]),ae=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!ie.floating)return e;let t=jr(ie.floating,u.x),r=jr(ie.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ar(ie.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ie.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:ne,elements:ie,floatingStyles:ae}),[u,O,ne,ie,ae])}var Pr=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Tr({element:r.current,padding:i}).fn(n):r?Tr({element:r,padding:i}).fn(n):{}}}},Fr=(e,t)=>{let n=br(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ir=(e,t)=>{let n=xr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lr=(e,t)=>({fn:Er(e).fn,options:[e,t]}),Rr=(e,t)=>{let n=Sr(e);return{name:n.name,fn:n.fn,options:[e,t]}},zr=(e,t)=>{let n=Cr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Br=(e,t)=>{let n=wr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vr=(e,t)=>{let n=Pr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hr=Object.defineProperty,Ur=(e,t)=>Hr(e,`name`,{value:t,configurable:!0});function Wr(e){let[t,n]=b.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}Ur(Wr,`useSize`);var Gr=Object.defineProperty,Kr=(e,t)=>Gr(e,`name`,{value:t,configurable:!0}),qr=`Popper`,[Jr,Yr]=_e(qr),[Xr,Zr]=Jr(qr),Qr=Kr(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,x.jsx)(Xr,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),$r=`PopperAnchor`,ei=b.forwardRef(Kr(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Zr($r,n),o=b.useRef(null),c=a.onAnchorChange,l=s(t,b.useCallback(e=>{o.current=e,e&&c(e)},[c])),u=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let d=a.placementState&&si(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,x.jsx)(Le.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),ti=`PopperContent`,[ni,ri]=Jr(ti),ii=b.forwardRef(Kr(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:h,...g}=e,_=Zr(ti,n),[v,y]=b.useState(null),S=s(t,y),[C,w]=b.useState(null),T=Wr(C),E=T?.width??0,ee=T?.height??0,te=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,ne={padding:D,boundary:O.filter(ai),altBoundary:k},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=Nr({strategy:`fixed`,placement:te,whileElementsMounted:Kr((...e)=>yr(...e,{animationFrame:m===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Fr({mainAxis:i+ee,alignmentAxis:o}),l&&Ir({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?Lr():void 0,...ne}),l&&Rr({...ne}),zr({...ne,apply:Kr(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),C&&Vr({element:C,padding:c}),oi({arrowWidth:E,arrowHeight:ee}),p&&Br({strategy:`referenceHidden`,...ne,boundary:k?ne.boundary:void 0})]}),ce=_.setPlacementState;N(()=>(ce(ae),()=>{ce(void 0)}),[ae,ce]);let[le,A]=si(ae),ue=Ve(h);N(()=>{oe&&ue?.()},[oe,ue]);let de=se.arrow?.x,fe=se.arrow?.y,pe=se.arrow?.centerOffset!==0,[me,he]=b.useState();return N(()=>{v&&he(window.getComputedStyle(v).zIndex)},[v]),(0,x.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:me,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,x.jsx)(ni,{scope:n,placedSide:le,placedAlign:A,onArrowChange:w,arrowX:de,arrowY:fe,shouldHideArrow:pe,children:(0,x.jsx)(Le.div,{"data-side":le,"data-align":A,...g,ref:S,style:{...g.style,animation:oe?g.style?.animation:`none`}})})})},`PopperContent`));function ai(e){return e!==null}Kr(ai,`isNotNull`);var oi=Kr(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=si(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function si(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Kr(si,`getSideAndAlignFromPlacement`);var ci=Qr,li=ei,ui=ii,di=Object.defineProperty,fi=b.forwardRef(((e,t)=>di(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);N(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?re.createPortal((0,x.jsx)(Le.div,{...r,ref:t}),o):null},`Portal`)),pi=Object.defineProperty,mi=(e,t)=>pi(e,`name`,{value:t,configurable:!0});function hi(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}mi(hi,`useStateMachine`);var gi=mi(e=>{let{present:t,children:n}=e,r=_i(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=yi(r.ref,xi(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function _i(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=hi(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??bi(r.current),o.current=void 0):a.current=`none`},[s]),N(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=bi(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),N(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=mi(a=>{let o=bi(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=mi(e=>{e.target===t&&(a.current=bi(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=bi(t)}else r.current=null;n(e)},[])}}mi(_i,`usePresence`);function vi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}mi(vi,`setRef`);function yi(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=vi(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():vi(n[e],null)}}},[])}mi(yi,`useStableComposedRefs`);function bi(e){return e?.animationName||`none`}mi(bi,`getAnimationName`);function xi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}mi(xi,`getElementRef`);var Si=Object.defineProperty,Ci=(e,t)=>Si(e,`name`,{value:t,configurable:!0}),wi=b.useEffectEvent,Ti=b.useInsertionEffect;function Ei(e){if(typeof wi==`function`)return wi(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ti==`function`?Ti(()=>{t.current=e}):N(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ci(Ei,`useEffectEvent`);var Di=Object.defineProperty,Oi=(e,t)=>Di(e,`name`,{value:t,configurable:!0}),ki=b.useInsertionEffect||N;function Ai({prop:e,defaultProp:t,onChange:n=Oi(()=>{},`onChange`),caller:r}){let[i,a,o]=ji({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=Mi(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Oi(Ai,`useControllableState`);function ji({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return ki(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Oi(ji,`useUncontrolledState`);function Mi(e){return typeof e==`function`}Oi(Mi,`isFunction`);var Ni=Symbol(`RADIX:SYNC_STATE`);function Pi(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ei(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===Ni)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Ni,state:i})},[i,d.state,c]),[h,f]}Oi(Pi,`useControllableStateReducer`);var Fi=Object.defineProperty,Ii=(e,t)=>Fi(e,`name`,{value:t,configurable:!0});function Li(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Ii(Li,`usePrevious`);var Ri=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),zi=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Bi=new WeakMap,Vi=new WeakMap,Hi={},Ui=0,Wi=function(e){return e&&(e.host||Wi(e.parentNode))},Gi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Wi(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ki=function(e,t,n,r){var i=Gi(t,Array.isArray(e)?e:[e]);Hi[n]||(Hi[n]=new WeakMap);var a=Hi[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Bi.get(e)||0)+1,l=(a.get(e)||0)+1;Bi.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Vi.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ui++,function(){o.forEach(function(e){var t=Bi.get(e)-1,i=a.get(e)-1;Bi.set(e,t),a.set(e,i),t||(Vi.has(e)||e.removeAttribute(r),Vi.delete(e)),i||e.removeAttribute(n)}),Ui--,Ui||(Bi=new WeakMap,Bi=new WeakMap,Vi=new WeakMap,Hi={})}},qi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zi(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ki(r,i,n,`aria-hidden`)):function(){return null}},Ji=function(){return Ji=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ji.apply(this,arguments)};function Yi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Zi=`right-scroll-bar-position`,Qi=`width-before-scroll-bar`,$i=`with-scroll-bars-hidden`,ea=`--removed-body-scroll-bar-size`;function ta(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function na(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ra=typeof window<`u`?b.useLayoutEffect:b.useEffect,ia=new WeakMap;function aa(e,t){var n=na(t||null,function(t){return e.forEach(function(e){return ta(e,t)})});return ra(function(){var t=ia.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ta(e,null)}),i.forEach(function(e){r.has(e)||ta(e,a)})}ia.set(n,e)},[e]),n}function oa(e){return e}function sa(e,t){t===void 0&&(t=oa);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ca(e){e===void 0&&(e={});var t=sa(null);return t.options=Ji({async:!0,ssr:!1},e),t}var la=function(e){var t=e.sideCar,n=Yi(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 b.createElement(r,Ji({},n))};la.isSideCarExport=!0;function ua(e,t){return e.useMedium(t),la}var da=ca(),fa=function(){},pa=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:fa,onWheelCapture:fa,onTouchMoveCapture:fa}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=Yi(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=aa([n,t]),w=Ji(Ji({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:da,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),Ji(Ji({},w),{ref:C})):b.createElement(v,Ji({},w,{className:c,ref:C}),s))});pa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pa.classNames={fullWidth:Qi,zeroRight:Zi};var ma,ha=function(){if(ma)return ma;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ga(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ha();return t&&e.setAttribute(`nonce`,t),e}function _a(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function va(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ya=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ga())&&(_a(t,n),va(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ba=function(){var e=ya();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xa=function(){var e=ba();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Sa={left:0,top:0,right:0,gap:0},Ca=function(e){return parseInt(e||``,10)||0},wa=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Ca(n),Ca(r),Ca(i)]},Ta=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Sa;var t=wa(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])}},Ea=xa(),Da=`data-scroll-locked`,Oa=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${$i} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -1 +1 @@
1
- {"manifest_version":3,"name":"Browsentic","description":"Reimagine browsing as agentic — driven by the AI agent you already run, in your own logged-in browser.","version":"0.7.4","icons":{"16":"icon/16.png","32":"icon/32.png","48":"icon/48.png","96":"icon/96.png","128":"icon/128.png"},"permissions":["storage","unlimitedStorage","activeTab","contextMenus","alarms","scripting","notifications","downloads","sidePanel","debugger"],"host_permissions":["<all_urls>"],"background":{"service_worker":"background.js"},"action":{"default_title":"Browsentic","default_popup":"popup.html"},"side_panel":{"default_path":"sidepanel.html"},"content_scripts":[{"matches":["*://*/*"],"js":["content-scripts/content.js"]}]}
1
+ {"manifest_version":3,"name":"Browsentic","description":"Reimagine browsing as agentic — driven by the AI agent you already run, in your own logged-in browser.","version":"0.7.5","icons":{"16":"icon/16.png","32":"icon/32.png","48":"icon/48.png","96":"icon/96.png","128":"icon/128.png"},"permissions":["storage","unlimitedStorage","activeTab","contextMenus","alarms","scripting","notifications","downloads","sidePanel","debugger"],"host_permissions":["<all_urls>"],"background":{"service_worker":"background.js"},"action":{"default_title":"Browsentic","default_popup":"popup.html"},"side_panel":{"default_path":"sidepanel.html"},"content_scripts":[{"matches":["*://*/*"],"js":["content-scripts/content.js"]}]}
@@ -5,9 +5,9 @@
5
5
  <meta name="color-scheme" content="dark">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>Browsentic</title>
8
- <script type="module" crossorigin src="/chunks/popup-D_jEQFBQ.js"></script>
8
+ <script type="module" crossorigin src="/chunks/popup-D1kmahbZ.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/chunks/globals-Bis7MDt7.js">
10
- <link rel="modulepreload" crossorigin href="/chunks/use-voice-composer-DfBR4M8I.js">
10
+ <link rel="modulepreload" crossorigin href="/chunks/use-voice-composer-DqX_NzK_.js">
11
11
  <link rel="stylesheet" crossorigin href="/assets/globals-Drv30qJX.css">
12
12
  </head>
13
13
  <body>
@@ -5,9 +5,9 @@
5
5
  <meta name="color-scheme" content="dark">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>Browsentic Chat</title>
8
- <script type="module" crossorigin src="/chunks/sidepanel-Dx3hYTrY.js"></script>
8
+ <script type="module" crossorigin src="/chunks/sidepanel-CREhtYV6.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/chunks/globals-Bis7MDt7.js">
10
- <link rel="modulepreload" crossorigin href="/chunks/use-voice-composer-DfBR4M8I.js">
10
+ <link rel="modulepreload" crossorigin href="/chunks/use-voice-composer-DqX_NzK_.js">
11
11
  <link rel="stylesheet" crossorigin href="/assets/globals-Drv30qJX.css">
12
12
  </head>
13
13
  <body>
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "browsentic",
3
- "version": "0.7.4",
3
+ "mcpName": "io.github.imshaikot/browsentic",
4
+ "version": "0.7.5",
4
5
  "description": "A browser extension with an AI side panel that hands your real, logged-in browser to the AI agent you already run. Installs the extension, runs the local daemon, and optionally speaks MCP.",
5
6
  "type": "module",
6
7
  "license": "MIT",