@inf-monkeys-tech/monkeys-design 2.0.369 → 2.0.370

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.
@@ -15,34 +15,36 @@ import * as ke from '@radix-ui/react-dropdown-menu';
15
15
  import * as we from '@radix-ui/react-select';
16
16
  import * as Ue from '@radix-ui/react-dialog';
17
17
  import * as He from '@radix-ui/react-alert-dialog';
18
- import * as _t from '@radix-ui/react-accordion';
19
- import * as Fn from '@radix-ui/react-checkbox';
20
- import * as Lt from '@radix-ui/react-scroll-area';
18
+ import * as Ft from '@radix-ui/react-accordion';
19
+ import * as Vn from '@radix-ui/react-checkbox';
20
+ import * as Dt from '@radix-ui/react-scroll-area';
21
21
  import { Slot } from '@radix-ui/react-slot';
22
- import * as On from '@radix-ui/react-switch';
23
- import * as Qt from '@radix-ui/react-tabs';
24
- import * as mo from '@radix-ui/react-tooltip';
25
- import ym, { defaultUrlTransform } from 'react-markdown';
26
- import wm from 'remark-gfm';
27
- import * as Ct from '@radix-ui/react-popover';
28
-
29
- var Ks=Object.defineProperty;var r=(e,t)=>Ks(e,"name",{value:t,configurable:true});var Qs={page:["background"],canvas:["background"],surface:["card"],inset:["secondary"],field:["muted"],hover:["accent"],"hover-2":["accent"],ink:["foreground"],"ink-2":["muted-foreground"],"ink-3":["muted-foreground"],line:["border"],"line-strong":["input","border"],"line-soft":["border"],accent:["primary"],"accent-ink":["primary"],"color-white":["primary-foreground"],green:["success"],orange:["warning"],red:["destructive"],"tooltip-bg":["popover"],"tooltip-fg":["popover-foreground"],"tooltip-muted":["muted-foreground"],"tooltip-border":["border"],"monogram-fill":["primary"],"filter-todo":["warning"],"filter-progress":["primary"],"filter-done":["success"],"flow-condition":["primary"],"flow-branch":["warning"],"chart-alert":["destructive"]},Zs={"radius-control":["semantic.ui.radius.control","semantic.radius.base"],"radius-card":["semantic.ui.radius.container","semantic.radius.base"],"radius-chip":["semantic.ui.radius.content","semantic.radius.base"],shadow:["semantic.bento.default.shadow","semantic.shadow.card"],"sidebar-row-height":["semantic.ui.control.height.sm"],"composer-control-height":["semantic.ui.control.height.sm"],"composer-gap":["semantic.ui.spacing.controlGap"]},fa=["xs","sm","base","lg","xl"],Js=["normal","medium","semibold","bold"],nr=new WeakMap;function ba(e){if(e&&nr.has(e))return nr.get(e);let t={},o=r(s=>e&&s.map(c=>getThemeTokenCssValue(e,c)).find(c=>c!==void 0),"read"),n=r((s,c)=>{t[`--bui-token-${s}`]=o(c)??"initial";},"token");for(let[s,c]of Object.entries(Zs))n(s,c);n("primary",["semantic.color.primary"]),n("primary-foreground",["semantic.color.primary-foreground"]),n("focus-ring",["semantic.color.ring"]);for(let s of ["success","warning","destructive"])n(`${s}-foreground`,[`semantic.color.${s}-foreground`]);n("font-family",["semantic.font.body"]),n("font-mono",["semantic.font.mono"]);for(let s of ["sidebar-inset","sidebar-padding","sidebar-section-gap","composer-inset","composer-padding","composer-spacing"])n(s,[]);for(let s of fa)n(`font-size-${s}`,[`semantic.font.size.${s}`]),n(`line-height-${s}`,[`semantic.font.lineHeight.${s}`]);if(!e)return Object.freeze(t);for(let s of fa){let c=t[`--bui-token-font-size-${s}`];c!=="initial"&&(t[`--bui-text-${s}`]=c);}for(let[s,c]of Object.entries(Qs)){let u=o(c.map(g=>`semantic.color.${g}`));u!==void 0&&(t[`--bui-${s}`]=u);}for(let[s,c]of [["font-inter","body"],["font-mono-face","mono"]]){let u=o([`semantic.font.${c}`]);u!==void 0&&(t[`--bui-${s}`]=u);}for(let s of Js){let c=o([`semantic.font.weight.${s}`]);c!==void 0&&(t[`--bui-font-weight-${s}`]=c);}let a=e.cssValues[`semantic.spacing.global.${e.density}`]??e.cssValues["semantic.spacing.global"];a!==void 0&&(t["--bui-spacing"]=`calc(${a} / 2)`),a!==void 0&&(t["--bui-token-sidebar-inset"]="0px",t["--bui-token-sidebar-padding"]=`calc(${a} / 2)`,t["--bui-token-sidebar-section-gap"]=a,t["--bui-token-sidebar-row-height"]==="initial"&&(t["--bui-token-sidebar-row-height"]=`calc(var(--bui-token-line-height-sm, 1.5em) + ${a})`),t["--bui-token-composer-inset"]=a,t["--bui-token-composer-padding"]=`calc(${a} / 2)`,t["--bui-token-composer-spacing"]=`calc(${a} / 3)`,t["--bui-token-composer-gap"]==="initial"&&(t["--bui-token-composer-gap"]=`calc(${a} / 2)`),t["--bui-token-composer-control-height"]==="initial"&&(t["--bui-token-composer-control-height"]=`calc(var(--bui-token-line-height-sm, 1.5em) + ${a})`));for(let s of ["accent","green","orange","red"])t[`--bui-${s}`]&&(t[`--bui-${s}-tint`]=`color-mix(in srgb, var(--bui-${s}) 12%, var(--bui-surface))`);let i=t["--bui-token-shadow"];if(i!=="initial")for(let s of ["xs","sm","md","lg","btn","card","raised","overlay"])t[`--bui-shadow-${s}`]=i;let l=Object.freeze(t);return nr.set(e,l),l}r(ba,"resolveBeautifulTheme");var rr=createContext(null);function xa(){return useContext(rr)?.dark??false}r(xa,"useBUIDark");function A({children:e,portal:t=false}){let o=useContext(rr),n=useMonkeysResolvedTheme(),a=useMemo(()=>ba(n),[n]),i=useRef(null),[l,s]=useState(false);useEffect(()=>{if(o||n)return;let u=[];for(let m=i.current?.parentElement;m;m=m.parentElement)u.push(m);let g=r(()=>s(u.some(m=>m.classList.contains("dark")||m.getAttribute("data-monkeys-theme-mode")==="dark")),"update");g();let d=new MutationObserver(g);return u.forEach(m=>d.observe(m,{attributes:true,attributeFilter:["class","data-monkeys-theme-mode"]})),()=>d.disconnect()},[o,n]);let c=n?.colorMode==="dark"||(n?false:o?.dark??l);return o&&o.theme===n&&!t?jsx(Fragment,{children:e}):jsx(rr.Provider,{value:{dark:c,theme:n},children:jsx("span",{ref:i,"data-bui-color-mode":n?.colorMode,className:"monkeys-beautiful"+(c?" monkeys-beautiful-dark":""),style:{...a,display:"contents"},children:e})})}r(A,"BUIScope");function vo(e,t,o){return jsx(ll,{container:t,portalKey:o,children:e})}r(vo,"beautifulPortal");function ll({children:e,container:t,portalKey:o}){let n=useMonkeysPortalOptions(),a=typeof n.container=="function"?n.container():n.container,i=jsx(A,{portal:true,children:e});return n.disabled?i:createPortal(i,a??t,o)}r(ll,"BUIPortal");function Oo(...e){return twMerge(clsx(e))}r(Oo,"cn");var ar=new WeakMap;function va(e){let t=ar.get(e)??{count:0,overflow:e.body.style.overflow};return t.count+=1,ar.set(e,t),e.body.style.overflow="hidden",()=>{t.count-=1,t.count===0&&(e.body.style.overflow=t.overflow,ar.delete(e));}}r(va,"lockBUIScroll");var ir="shadow-[inset_0_1px_0_rgba(255,255,255,0.14)]",wa=cva(`inline-flex items-center justify-center font-medium select-none
22
+ import * as jn from '@radix-ui/react-switch';
23
+ import * as Jt from '@radix-ui/react-tabs';
24
+ import * as ho from '@radix-ui/react-tooltip';
25
+ import ef, { defaultUrlTransform } from 'react-markdown';
26
+ import tf from 'remark-gfm';
27
+ import of from 'remark-cjk-friendly';
28
+ import { visit } from 'unist-util-visit';
29
+ import * as Rt from '@radix-ui/react-popover';
30
+
31
+ var vl=Object.defineProperty;var r=(e,t)=>vl(e,"name",{value:t,configurable:true});var wl={page:["background"],canvas:["background"],surface:["card"],inset:["secondary"],field:["muted"],hover:["accent"],"hover-2":["accent"],ink:["foreground"],"ink-2":["muted-foreground"],"ink-3":["muted-foreground"],line:["border"],"line-strong":["input","border"],"line-soft":["border"],accent:["primary"],"accent-ink":["primary"],"color-white":["primary-foreground"],green:["success"],orange:["warning"],red:["destructive"],"tooltip-bg":["popover"],"tooltip-fg":["popover-foreground"],"tooltip-muted":["muted-foreground"],"tooltip-border":["border"],"monogram-fill":["primary"],"filter-todo":["warning"],"filter-progress":["primary"],"filter-done":["success"],"flow-condition":["primary"],"flow-branch":["warning"],"chart-alert":["destructive"]},kl={"radius-control":["semantic.ui.radius.control","semantic.radius.base"],"radius-card":["semantic.ui.radius.container","semantic.radius.base"],"radius-chip":["semantic.ui.radius.content","semantic.radius.base"],shadow:["semantic.bento.default.shadow","semantic.shadow.card"],"sidebar-row-height":["semantic.ui.control.height.sm"],"composer-control-height":["semantic.ui.control.height.sm"],"composer-gap":["semantic.ui.spacing.controlGap"]},Ca=["xs","sm","base","lg","xl"],Sl=["normal","medium","semibold","bold"],cr=new WeakMap;function Ta(e){if(e&&cr.has(e))return cr.get(e);let t={},o=r(s=>e&&s.map(c=>getThemeTokenCssValue(e,c)).find(c=>c!==void 0),"read"),n=r((s,c)=>{t[`--bui-token-${s}`]=o(c)??"initial";},"token");for(let[s,c]of Object.entries(kl))n(s,c);n("primary",["semantic.color.primary"]),n("primary-foreground",["semantic.color.primary-foreground"]),n("focus-ring",["semantic.color.ring"]);for(let s of ["success","warning","destructive"])n(`${s}-foreground`,[`semantic.color.${s}-foreground`]);n("font-family",["semantic.font.body"]),n("font-mono",["semantic.font.mono"]);for(let s of ["sidebar-inset","sidebar-padding","sidebar-section-gap","composer-inset","composer-padding","composer-spacing"])n(s,[]);for(let s of Ca)n(`font-size-${s}`,[`semantic.font.size.${s}`]),n(`line-height-${s}`,[`semantic.font.lineHeight.${s}`]);if(!e)return Object.freeze(t);for(let s of Ca){let c=t[`--bui-token-font-size-${s}`];c!=="initial"&&(t[`--bui-text-${s}`]=c);}for(let[s,c]of Object.entries(wl)){let u=o(c.map(g=>`semantic.color.${g}`));u!==void 0&&(t[`--bui-${s}`]=u);}for(let[s,c]of [["font-inter","body"],["font-mono-face","mono"]]){let u=o([`semantic.font.${c}`]);u!==void 0&&(t[`--bui-${s}`]=u);}for(let s of Sl){let c=o([`semantic.font.weight.${s}`]);c!==void 0&&(t[`--bui-font-weight-${s}`]=c);}let a=e.cssValues[`semantic.spacing.global.${e.density}`]??e.cssValues["semantic.spacing.global"];a!==void 0&&(t["--bui-spacing"]=`calc(${a} / 2)`),a!==void 0&&(t["--bui-token-sidebar-inset"]="0px",t["--bui-token-sidebar-padding"]=`calc(${a} / 2)`,t["--bui-token-sidebar-section-gap"]=a,t["--bui-token-sidebar-row-height"]==="initial"&&(t["--bui-token-sidebar-row-height"]=`calc(var(--bui-token-line-height-sm, 1.5em) + ${a})`),t["--bui-token-composer-inset"]=a,t["--bui-token-composer-padding"]=`calc(${a} / 2)`,t["--bui-token-composer-spacing"]=`calc(${a} / 3)`,t["--bui-token-composer-gap"]==="initial"&&(t["--bui-token-composer-gap"]=`calc(${a} / 2)`),t["--bui-token-composer-control-height"]==="initial"&&(t["--bui-token-composer-control-height"]=`calc(var(--bui-token-line-height-sm, 1.5em) + ${a})`));for(let s of ["accent","green","orange","red"])t[`--bui-${s}`]&&(t[`--bui-${s}-tint`]=`color-mix(in srgb, var(--bui-${s}) 12%, var(--bui-surface))`);let i=t["--bui-token-shadow"];if(i!=="initial")for(let s of ["xs","sm","md","lg","btn","card","raised","overlay"])t[`--bui-shadow-${s}`]=i;let l=Object.freeze(t);return cr.set(e,l),l}r(Ta,"resolveBeautifulTheme");var dr=createContext(null);function Na(){return useContext(dr)?.dark??false}r(Na,"useBUIDark");function A({children:e,portal:t=false}){let o=useContext(dr),n=useMonkeysResolvedTheme(),a=useMemo(()=>Ta(n),[n]),i=useRef(null),[l,s]=useState(false);useEffect(()=>{if(o||n)return;let u=[];for(let m=i.current?.parentElement;m;m=m.parentElement)u.push(m);let g=r(()=>s(u.some(m=>m.classList.contains("dark")||m.getAttribute("data-monkeys-theme-mode")==="dark")),"update");g();let d=new MutationObserver(g);return u.forEach(m=>d.observe(m,{attributes:true,attributeFilter:["class","data-monkeys-theme-mode"]})),()=>d.disconnect()},[o,n]);let c=n?.colorMode==="dark"||(n?false:o?.dark??l);return o&&o.theme===n&&!t?jsx(Fragment,{children:e}):jsx(dr.Provider,{value:{dark:c,theme:n},children:jsx("span",{ref:i,"data-bui-color-mode":n?.colorMode,className:"monkeys-beautiful"+(c?" monkeys-beautiful-dark":""),style:{...a,display:"contents"},children:e})})}r(A,"BUIScope");function Co(e,t,o){return jsx(Bl,{container:t,portalKey:o,children:e})}r(Co,"beautifulPortal");function Bl({children:e,container:t,portalKey:o}){let n=useMonkeysPortalOptions(),a=typeof n.container=="function"?n.container():n.container,i=jsx(A,{portal:true,children:e});return n.disabled?i:createPortal(i,a??t,o)}r(Bl,"BUIPortal");function jo(...e){return twMerge(clsx(e))}r(jo,"cn");var ur=new WeakMap;function Pa(e){let t=ur.get(e)??{count:0,overflow:e.body.style.overflow};return t.count+=1,ur.set(e,t),e.body.style.overflow="hidden",()=>{t.count-=1,t.count===0&&(e.body.style.overflow=t.overflow,ur.delete(e));}}r(Pa,"lockBUIScroll");var pr="shadow-[inset_0_1px_0_rgba(255,255,255,0.14)]",Ia=cva(`inline-flex items-center justify-center font-medium select-none
30
32
  transition-[transform,background-color,opacity] duration-150 ease-out
31
- active:scale-[0.96] disabled:opacity-50 disabled:pointer-events-none`,{variants:{variant:{primary:`bg-ink text-canvas hover:opacity-90 dark:bg-ink dark:text-canvas ${ir}`,secondary:"bg-surface text-ink shadow-btn hover:bg-inset aria-expanded:bg-hover",ghost:"bg-hover-2 text-ink hover:bg-line-strong",accent:`bg-accent text-white hover:bg-accent-ink ${ir}`,success:`bg-green text-white hover:brightness-95 ${ir}`,quiet:"text-ink hover:bg-hover"},size:{xs:"h-7 rounded-full px-2.5 text-[12px] font-normal leading-none gap-1",sm:"h-[27px] px-3 text-[13px] leading-none rounded-full gap-1.5",md:"px-4 py-[9px] text-sm leading-none rounded-full gap-2"}},defaultVariants:{variant:"secondary",size:"md"}}),Ce=forwardRef(r(function({variant:t,size:o,className:n,...a},i){return jsx(A,{children:jsx("button",{ref:i,className:Oo(wa({variant:t,size:o}),n),...a})})},"BUIButton"));function gl({children:e,tone:t="neutral",className:o=""}){return jsx(A,{children:jsx("code",{className:`inline rounded-md px-1.5 py-0.5 font-mono text-[12px]
32
- leading-none align-[-1px] ${{neutral:"bg-inset text-ink-2",accent:"bg-accent-tint text-accent-ink",orange:"bg-orange-tint text-orange"}[t]} ${o}`,children:e})})}r(gl,"BUIChip");function Sa({children:e,color:t="var(--bui-monogram-fill)",className:o=""}){return jsx(A,{children:jsx("span",{className:`flex size-4 shrink-0 items-center justify-center rounded-full
33
- text-[9px] font-semibold leading-none text-white ${o}`,style:{background:t},children:e})})}r(Sa,"BUIMonogram");function fl({name:e,color:t,monogram:o,className:n=""}){return jsx(A,{children:jsxs("span",{className:`mx-0.5 inline-flex items-center gap-1 rounded-full bg-field
34
- py-px pl-[3px] pr-1.5 align-middle shadow-hairline ${n}`,children:[jsx(Sa,{color:t,children:o??e.charAt(0)}),jsx("span",{className:"text-[12px] font-medium text-ink",children:e})]})})}r(fl,"BUIEntityChip");function hl({progress:e,tone:t="orange",children:o,size:n=28}){let i=(n-2)/2,l=2*Math.PI*i,s={orange:"var(--bui-orange)",green:"var(--bui-green)",red:"var(--bui-red)",accent:"var(--bui-accent)"};return jsx(A,{children:jsxs("span",{className:"relative inline-flex items-center justify-center",style:{width:n,height:n},children:[jsxs("svg",{width:n,height:n,className:"-rotate-90 absolute inset-0",children:[jsx("circle",{cx:n/2,cy:n/2,r:i,fill:"none",stroke:"var(--bui-line)",strokeWidth:2}),jsx("circle",{cx:n/2,cy:n/2,r:i,fill:"none",stroke:s[t],strokeWidth:2,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:l*(1-Math.min(1,Math.max(0,e))),style:{transition:"stroke-dashoffset 400ms cubic-bezier(0.23,1,0.32,1)"}})]}),jsx("span",{className:"relative text-[12px] font-semibold tabular-nums",children:o})]})})}r(hl,"BUIProgressRing");function xl({options:e,value:t,onChange:o,className:n=""}){let a=e.indexOf(t);return jsx(A,{children:jsxs("div",{className:`relative inline-grid h-8 select-none rounded-full bg-line/60 p-0.5 ${n}`,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`},role:"tablist",children:[jsx("span",{"aria-hidden":true,className:`absolute inset-y-0.5 rounded-full bg-surface shadow-hairline
33
+ active:scale-[0.96] disabled:opacity-50 disabled:pointer-events-none`,{variants:{variant:{primary:`bg-ink text-canvas hover:opacity-90 dark:bg-ink dark:text-canvas ${pr}`,secondary:"bg-surface text-ink shadow-btn hover:bg-inset aria-expanded:bg-hover",ghost:"bg-hover-2 text-ink hover:bg-line-strong",accent:`bg-accent text-white hover:bg-accent-ink ${pr}`,success:`bg-green text-white hover:brightness-95 ${pr}`,quiet:"text-ink hover:bg-hover"},size:{xs:"h-7 rounded-full px-2.5 text-[12px] font-normal leading-none gap-1",sm:"h-[27px] px-3 text-[13px] leading-none rounded-full gap-1.5",md:"px-4 py-[9px] text-sm leading-none rounded-full gap-2"}},defaultVariants:{variant:"secondary",size:"md"}}),Ce=forwardRef(r(function({variant:t,size:o,className:n,...a},i){return jsx(A,{children:jsx("button",{ref:i,className:jo(Ia({variant:t,size:o}),n),...a})})},"BUIButton"));function _l({children:e,tone:t="neutral",className:o=""}){return jsx(A,{children:jsx("code",{className:`inline rounded-md px-1.5 py-0.5 font-mono text-[12px]
34
+ leading-none align-[-1px] ${{neutral:"bg-inset text-ink-2",accent:"bg-accent-tint text-accent-ink",orange:"bg-orange-tint text-orange"}[t]} ${o}`,children:e})})}r(_l,"BUIChip");function Ba({children:e,color:t="var(--bui-monogram-fill)",className:o=""}){return jsx(A,{children:jsx("span",{className:`flex size-4 shrink-0 items-center justify-center rounded-full
35
+ text-[9px] font-semibold leading-none text-white ${o}`,style:{background:t},children:e})})}r(Ba,"BUIMonogram");function Ol({name:e,color:t,monogram:o,className:n=""}){return jsx(A,{children:jsxs("span",{className:`mx-0.5 inline-flex items-center gap-1 rounded-full bg-field
36
+ py-px pl-[3px] pr-1.5 align-middle shadow-hairline ${n}`,children:[jsx(Ba,{color:t,children:o??e.charAt(0)}),jsx("span",{className:"text-[12px] font-medium text-ink",children:e})]})})}r(Ol,"BUIEntityChip");function $l({progress:e,tone:t="orange",children:o,size:n=28}){let i=(n-2)/2,l=2*Math.PI*i,s={orange:"var(--bui-orange)",green:"var(--bui-green)",red:"var(--bui-red)",accent:"var(--bui-accent)"};return jsx(A,{children:jsxs("span",{className:"relative inline-flex items-center justify-center",style:{width:n,height:n},children:[jsxs("svg",{width:n,height:n,className:"-rotate-90 absolute inset-0",children:[jsx("circle",{cx:n/2,cy:n/2,r:i,fill:"none",stroke:"var(--bui-line)",strokeWidth:2}),jsx("circle",{cx:n/2,cy:n/2,r:i,fill:"none",stroke:s[t],strokeWidth:2,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:l*(1-Math.min(1,Math.max(0,e))),style:{transition:"stroke-dashoffset 400ms cubic-bezier(0.23,1,0.32,1)"}})]}),jsx("span",{className:"relative text-[12px] font-semibold tabular-nums",children:o})]})})}r($l,"BUIProgressRing");function Hl({options:e,value:t,onChange:o,className:n=""}){let a=e.indexOf(t);return jsx(A,{children:jsxs("div",{className:`relative inline-grid h-8 select-none rounded-full bg-line/60 p-0.5 ${n}`,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`},role:"tablist",children:[jsx("span",{"aria-hidden":true,className:`absolute inset-y-0.5 rounded-full bg-surface shadow-hairline
35
37
  transition-transform duration-200`,style:{width:`calc((100% - 4px) / ${e.length})`,left:2,transform:`translateX(${a*100}%)`,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}}),e.map(i=>jsx("button",{role:"tab","aria-selected":i===t,onClick:()=>o(i),className:`relative z-10 rounded-[var(--bui-radius-pill)] px-3 text-[13px] font-medium
36
38
  transition-colors duration-150
37
- ${i===t?"text-ink":"text-ink-3 hover:text-ink-2"}`,children:i},i))]})})}r(xl,"BUISegmentedControl");function lr({children:e,className:t=""}){return jsx(A,{children:jsx("span",{className:`inline-block bg-clip-text text-transparent ${t}`,style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.8s linear infinite"},children:e})})}r(lr,"BUIShimmer");var wl=cva("inline-flex h-6 items-center gap-1.5 rounded-full px-2.5 text-[13px] font-medium leading-none",{variants:{tone:{green:"bg-green-tint text-green",orange:"bg-orange-tint text-orange",red:"bg-red-tint text-red",accent:"bg-accent-tint text-accent-ink",neutral:"bg-inset text-ink-2"}},defaultVariants:{tone:"neutral"}}),kl={green:"bg-green",orange:"bg-orange",red:"bg-red",accent:"bg-accent",neutral:"bg-ink-3"};function Sl({tone:e="neutral",children:t,dot:o=true,className:n}){return jsx(A,{children:jsxs("span",{className:Oo(wl({tone:e}),n),children:[o&&jsx("span",{className:Oo("size-1.5 rounded-full",kl[e])}),t]})})}r(Sl,"BUIStatusPill");function dr({text:e,charsPerTick:t=2,tickMs:o=9,blurTail:n=6,caret:a=true,className:i,onProgress:l,onDone:s}){let[c,u]=useState(0),g=useRef(""),d=useRef(0);d.current=c;let m=useRef(l),b=useRef(s);m.current=l,b.current=s,useEffect(()=>{let f=e.startsWith(g.current)?d.current:0;g.current=e,u(f);let w=setInterval(()=>{f=Math.min(f+Math.max(1,t),e.length),u(f),m.current?.(),f>=e.length&&(clearInterval(w),b.current?.());},Math.max(16,o));return ()=>clearInterval(w)},[e,t,o]);let v=c<e.length,S=e.slice(0,c),h=v?Math.max(0,S.length-n):S.length;return jsx(A,{children:jsxs("span",{className:i,children:[S.slice(0,h),h<S.length&&jsx("span",{className:"stream-tail",children:S.slice(h)}),a&&jsx("span",{"aria-hidden":true,className:`stream-caret${v?" is-streaming":""}`})]})})}r(dr,"BUIStreamText");function Pl({checked:e,onChange:t,label:o}){return jsx(A,{children:jsx("button",{role:"switch","aria-checked":e,"aria-label":o,onClick:()=>t(!e),className:`relative h-6 w-10 shrink-0 rounded-[var(--bui-radius-pill)] transition-colors duration-200
39
+ ${i===t?"text-ink":"text-ink-3 hover:text-ink-2"}`,children:i},i))]})})}r(Hl,"BUISegmentedControl");function gr({children:e,className:t=""}){return jsx(A,{children:jsx("span",{className:`inline-block bg-clip-text text-transparent ${t}`,style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.8s linear infinite"},children:e})})}r(gr,"BUIShimmer");var jl=cva("inline-flex h-6 items-center gap-1.5 rounded-full px-2.5 text-[13px] font-medium leading-none",{variants:{tone:{green:"bg-green-tint text-green",orange:"bg-orange-tint text-orange",red:"bg-red-tint text-red",accent:"bg-accent-tint text-accent-ink",neutral:"bg-inset text-ink-2"}},defaultVariants:{tone:"neutral"}}),Gl={green:"bg-green",orange:"bg-orange",red:"bg-red",accent:"bg-accent",neutral:"bg-ink-3"};function ql({tone:e="neutral",children:t,dot:o=true,className:n}){return jsx(A,{children:jsxs("span",{className:jo(jl({tone:e}),n),children:[o&&jsx("span",{className:jo("size-1.5 rounded-full",Gl[e])}),t]})})}r(ql,"BUIStatusPill");function br({text:e,charsPerTick:t=2,tickMs:o=9,blurTail:n=6,caret:a=true,className:i,onProgress:l,onDone:s}){let[c,u]=useState(0),g=useRef(""),d=useRef(0);d.current=c;let m=useRef(l),b=useRef(s);m.current=l,b.current=s,useEffect(()=>{let f=e.startsWith(g.current)?d.current:0;g.current=e,u(f);let w=setInterval(()=>{f=Math.min(f+Math.max(1,t),e.length),u(f),m.current?.(),f>=e.length&&(clearInterval(w),b.current?.());},Math.max(16,o));return ()=>clearInterval(w)},[e,t,o]);let v=c<e.length,S=e.slice(0,c),h=v?Math.max(0,S.length-n):S.length;return jsx(A,{children:jsxs("span",{className:i,children:[S.slice(0,h),h<S.length&&jsx("span",{className:"stream-tail",children:S.slice(h)}),a&&jsx("span",{"aria-hidden":true,className:`stream-caret${v?" is-streaming":""}`})]})})}r(br,"BUIStreamText");function Zl({checked:e,onChange:t,label:o}){return jsx(A,{children:jsx("button",{role:"switch","aria-checked":e,"aria-label":o,onClick:()=>t(!e),className:`relative h-6 w-10 shrink-0 rounded-[var(--bui-radius-pill)] transition-colors duration-200
38
40
  ${e?"bg-ink":"bg-line-strong"}`,children:jsx("span",{className:`absolute top-0.5 left-0.5 size-5 rounded-full bg-white
39
- shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-transform duration-200`,style:{transform:e?"translateX(16px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}})})})}r(Pl,"BUISwitch");function Ml({label:e,value:t,meta:o,className:n=""}){return jsx(A,{children:jsxs("div",{className:`flex min-h-11 items-center justify-between gap-4 py-2 ${n}`,children:[jsx("span",{className:"text-sm text-ink-2",children:e}),jsxs("span",{className:"flex items-baseline gap-2 text-right",children:[jsx("span",{className:"text-sm font-medium text-ink tabular-nums",children:t}),o&&jsx("span",{className:"text-[13px] text-ink-3",children:o})]})]})})}r(Ml,"BUITextRow");var Il={neutral:{cls:"bg-field text-ink-2",ring:"var(--bui-shadow-hairline)"},green:{cls:"bg-green-tint text-green",ring:"0 0 0 1px color-mix(in oklch, var(--bui-green) 28%, transparent)"},orange:{cls:"bg-orange-tint text-orange",ring:"0 0 0 1px color-mix(in oklch, var(--bui-orange) 28%, transparent)"},red:{cls:"bg-red-tint text-red",ring:"0 0 0 1px color-mix(in oklch, var(--bui-red) 28%, transparent)"},accent:{cls:"bg-accent-tint text-accent-ink",ring:"0 0 0 1px color-mix(in oklch, var(--bui-accent) 28%, transparent)"}};function Al({children:e,tone:t="neutral",className:o=""}){let n=Il[t];return jsx(A,{children:jsx("span",{className:`mx-0.5 inline-flex items-center rounded-full px-1.5 py-0
40
- align-middle text-[12px] font-medium ${n.cls} ${o}`,style:{boxShadow:n.ring},children:e})})}r(Al,"BUIValuePill");var Ma={"Chat history":"chatHistory","Start a conversation":"startAConversation","Stop response":"stopResponse","Load more":"loadMore","% average":"average","'s screen":"sScreen","About grounding":"aboutGrounding","Answer could not be sent":"questionAnswerFailed","Answer sent":"questionAnswerSent","Cancel question":"questionCancel",Cancelling:"questionCancelling","Question cancelled":"questionCancelled",Accepted:"accepted","Add attachments and sources":"addAttachmentsAndSources","Add calculation":"addCalculation","Add property":"addProperty",Adjust:"adjust","Adjust your search to try again":"adjustYourSearchToTryAgain",Advisor:"advisor","All chunks":"allChunks","Allocation segments":"allocationSegments",Alternatives:"alternatives","Answers sent":"answersSent",Apply:"apply",Behavior:"behavior","Calculating\u2026":"calculating","Calculation inputs":"calculationInputs","Chat prompt":"chatPrompt",Chats:"chats","Choose model":"chooseModel","Clear search":"clearSearch","Clear selection":"clearSelection","Click changed rows to toggle":"clickChangedRowsToToggle","Close chat search":"closeChatSearch",Collapse:"collapse","Collapse sidebar":"collapseSidebar","Compact columns":"compactColumns","Companies table. Scroll horizontally and vertically to view all columns and records.":"companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords",Company:"company",Completed:"completed","Connecting to agent's screen":"connectingToAgentSScreen",Continue:"continue","Continue in new conversation":"continueInNewConversation","Contribution snapshot across current inventory value. Segment selection changes the inspected group without moving the card.":"contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard",Copied:"copied",Copy:"copy","Copy code":"copyCode","Custom answer":"customAnswer",Date:"date","Describe edits":"describeEdits",Discard:"discard",Dismiss:"dismiss",Edited:"edited",End:"end","Enter a message":"enterAMessage","Expand sidebar":"expandSidebar",Failed:"failed","Follow-ups":"followUps","Go calculate":"goCalculate","Grounding lets the model verify generated values against connected sources.":"groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources","Hide from view":"hideFromView",If:"if",Insights:"insights",Keep:"keep",Layout:"layout",More:"more","More settings":"moreSettings","New property":"newProperty","Next question":"nextQuestion","No chats found":"noChatsFound","No matches for \u201C":"noMatchesFor","No results found":"noResultsFound",Open:"open","Open approval":"openApproval","Other options":"otherOptions","Previous question":"previousQuestion",Prompt:"prompt",Recommendation:"recommendation",Recommended:"recommended","Reset column widths":"resetColumnWidths","Resize Company column":"resizeCompanyColumn","Scrollable task table":"scrollableTaskTable",Search:"search","Search chat history":"searchChatHistory","Search chats":"searchChats","Search\u2026":"search","Select inputs":"selectInputs","Select type":"selectType",Send:"send","Send answer":"sendAnswer","Send edit instruction":"sendEditInstruction","Set a prompt (press @ to mention an input)":"setAPromptPressToMentionAnInput","Sign out":"signOut",Skip:"skip",Snapshot:"snapshot","Something else\u2026":"somethingElse",Sending:"sending","Sending recommended answers in {seconds}s":"autoSendAnswers",Sources:"sources","Start over":"startOver",Status:"status","Table options":"tableOptions","Task name":"taskName","Teach a task":"teachATask","Tool calls":"toolCalls","Trend snapshot":"trendSnapshot","Try again":"tryAgain",Type:"type","Use values from":"useValuesFrom","Your answer":"answerPlaceholder",V:"v","Video unavailable":"videoUnavailable","Workspace navigation":"workspaceNavigation",and:"and",applied:"applied",count:"count",for:"for",h:"h",is:"is",links:"links",spent:"spent",Configuration:"configuration",New:"new",History:"history",edit:"edit",edits:"edits",removal:"removal",removals:"removals",addition:"addition",additions:"additions",change:"change",changes:"changes",Spend:"spend",Usage:"usage","Previous insight":"previousInsight","Next insight":"nextInsight",Connected:"connected",Connect:"connect","Type to search sources & files":"typeToSearchSourcesFiles","Type to search commands":"typeToSearchCommands","Listening\u2026":"listening","Stop dictation":"stopDictation","Start dictation":"startDictation",Unpin:"unpin",Pin:"pin","Show fewer actions":"showFewerActions","Show more actions":"showMoreActions",Retry:"retry",Like:"like",Dislike:"dislike","New workspace":"newWorkspace","Workspace settings":"workspaceSettings","Invite team members":"inviteTeamMembers",Loading:"loading",Thinking:"thinking","Thought complete":"thoughtComplete",Model:"model",Agent:"agent","View sources":"viewSources",Close:"close","No files":"noFiles",Done:"done",Edit:"edit","Done editing":"doneEditing","New chat":"newChat",All:"all","To do":"toDo","In Progress":"inProgress","Very strong":"veryStrong",Weak:"weak","Very weak":"veryWeak","No communication":"noCommunication",Cancel:"cancel",Improve:"improve",Explain:"explain",Shorten:"shorten",Tone:"tone",Grammar:"grammar","Write a message\u2026":"writeMessage","Select all companies":"selectAllCompanies",Categories:"categories","Last interaction":"lastInteraction","Connection strength":"connectionStrength",Links:"linksHeading","Property type":"propertyType",Tool:"tool",Grounding:"grounding",Inputs:"inputs","Required value":"requiredValue","Allow empty results":"allowEmptyResults","Show confidence":"showConfidence","Categories: {categories}":"categoriesSummary","Sort by {label}":"sortByLabel","Resize {label} column":"resizeColumn","Select {name}":"selectName","{column} calculation prompt":"columnCalculationPrompt","Proposed changes":"proposedChanges",Name:"name",Category:"category",Value:"value",Anomaly:"anomaly",Allocation:"allocation"},sn={taskProgressTitle:"Task progress",taskProgressCurrent:"{current}/{total} {title}","taskProgressStatus.done":"Completed","taskProgressStatus.running":"In progress","taskProgressStatus.pending":"Pending","taskProgressStatus.failed":"Failed","taskProgressStatus.skipped":"Skipped","taskProgressStatus.stopped":"Stopped",recentClose:"Close",recentMore:"More actions for {title}",recentMoreLabel:"More",recentRunning:"Running",recentRename:"Rename",recentDelete:"Delete conversation",recentDeleteDescription:"Delete \u201C{title}\u201D? This conversation will be removed.",recentRenameDescription:"Choose a name for this conversation.",recentName:"Conversation name",recentCancel:"Cancel",recentSave:"Save",recentSaving:"Saving\u2026",recentActionFailed:"Could not confirm the change. Refresh the conversation list before trying again.",chatHistory:"Chat history",startAConversation:"Start a conversation",stopResponse:"Stop response",loadMore:"Load more",average:"% average",sScreen:"'s screen",aboutGrounding:"About grounding",questionPanel:"Questions",questionNavigation:"Question navigation",questionPosition:"{current} of {total}",questionAnswerFailed:"Answer could not be sent. Try again.",questionAnswerSent:"Answer sent",questionCancel:"Skip",questionCancelling:"Skipping\u2026",questionCancelled:"Skipped",answerPlaceholder:"Your answer",autoSendAnswers:"Sending recommended answers in {seconds}s",recommended:"Recommended",sendAnswer:"Send answer",sending:"Sending\u2026",accepted:"Accepted",addAttachmentsAndSources:"Add attachments and sources",addCalculation:"Add calculation",addProperty:"Add property",adjust:"Adjust",adjustYourSearchToTryAgain:"Adjust your search to try again",advisor:"Advisor",allChunks:"All chunks",allocationSegments:"Allocation segments",alternatives:"Alternatives",answersSent:"Answers sent",apply:"Apply",behavior:"Behavior",calculating:"Calculating\u2026",calculationInputs:"Calculation inputs",chatPrompt:"Chat prompt",chats:"Chats",chooseModel:"Choose model",clearSearch:"Clear search",clearSelection:"Clear selection",clickChangedRowsToToggle:"Click changed rows to toggle",closeChatSearch:"Close chat search",collapse:"Collapse",collapseSidebar:"Collapse sidebar",compactColumns:"Compact columns",companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords:"Companies table. Scroll horizontally and vertically to view all columns and records.",company:"Company",completed:"Completed",connectingToAgentSScreen:"Connecting to agent's screen",continue:"Continue",continueInNewConversation:"Continue in new conversation",contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard:"Contribution snapshot across current inventory value. Segment selection changes the inspected group without moving the card.",copied:"Copied",copy:"Copy",copyCode:"Copy code",customAnswer:"Custom answer",date:"Date",describeEdits:"Describe edits",discard:"Discard",dismiss:"Dismiss",edited:"Edited",end:"End",enterAMessage:"Enter a message",expandSidebar:"Expand sidebar",failed:"Failed",followUps:"Follow-ups",goCalculate:"Go calculate",groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources:"Grounding lets the model verify generated values against connected sources.",hideFromView:"Hide from view",if:"If",insights:"Insights",keep:"Keep",layout:"Layout",more:"More",moreSettings:"More settings",newProperty:"New property",nextQuestion:"Next question",noChatsFound:"No chats found",noMatchesFor:"No matches for \u201C",noResultsFound:"No results found",open:"Open",openApproval:"Open approval",otherOptions:"Other options",previousQuestion:"Previous question",prompt:"Prompt",recommendation:"Recommendation",resetColumnWidths:"Reset column widths",resizeCompanyColumn:"Resize Company column",scrollableTaskTable:"Scrollable task table",search:"Search\u2026",searchChatHistory:"Search chat history",searchChats:"Search chats",selectInputs:"Select inputs",selectType:"Select type",send:"Send",sendEditInstruction:"Send edit instruction",setAPromptPressToMentionAnInput:"Set a prompt (press @ to mention an input)",signOut:"Sign out",skip:"Skip",snapshot:"Snapshot",somethingElse:"Something else\u2026",sources:"Sources",startOver:"Start over",status:"Status",tableOptions:"Table options",taskName:"Task name",teachATask:"Teach a task",toolCalls:"Tool calls",trendSnapshot:"Trend snapshot",tryAgain:"Try again",type:"Type",useValuesFrom:"Use values from",v:"V",videoUnavailable:"Video unavailable",workspaceNavigation:"Workspace navigation",and:"and",applied:"applied",count:"count",for:"for",h:"h",is:"is",links:"links",spent:"spent",configuration:"Configuration",new:"New",history:"History",edit:"Edit",edits:"edits",removal:"removal",removals:"removals",addition:"addition",additions:"additions",change:"change",changes:"changes",spend:"Spend",usage:"Usage",previousInsight:"Previous insight",nextInsight:"Next insight",connected:"Connected",connect:"Connect",typeToSearchSourcesFiles:"Type to search sources & files",typeToSearchCommands:"Type to search commands",listening:"Listening\u2026",stopDictation:"Stop dictation",startDictation:"Start dictation",unpin:"Unpin",pin:"Pin",showFewerActions:"Show fewer actions",showMoreActions:"Show more actions",retry:"Retry",like:"Like",dislike:"Dislike",newWorkspace:"New workspace",workspaceSettings:"Workspace settings",inviteTeamMembers:"Invite team members",loading:"Loading",thinking:"Thinking",thoughtComplete:"Thought complete",model:"Model",agent:"Agent",viewSources:"View sources",close:"Close",noFiles:"No files",done:"Done",doneEditing:"Done editing",newChat:"New chat",all:"All",toDo:"To do",inProgress:"In Progress",veryStrong:"Very strong",weak:"Weak",veryWeak:"Very weak",noCommunication:"No communication",cancel:"Cancel",improve:"Improve",explain:"Explain",shorten:"Shorten",tone:"Tone",grammar:"Grammar",screenTitle:"{name}'s screen",duration:"for {time}",noMatches:"No matches for \u201C{query}\u201D",editsApplied_one:"{count} edit applied",editsApplied_other:"{count} edits applied",changesSummary:"{removals} removed \xB7 {additions} added",applyChanges_one:"Apply {count} change",applyChanges_other:"Apply {count} changes",sourceCount_one:"{count} source",sourceCount_other:"{count} sources",writeMessage:"Write a message\u2026",selectAllCompanies:"Select all companies",categories:"Categories",lastInteraction:"Last interaction",connectionStrength:"Connection strength",linksHeading:"Links",propertyType:"Property type",tool:"Tool",grounding:"Grounding",inputs:"Inputs",requiredValue:"Required value",allowEmptyResults:"Allow empty results",showConfidence:"Show confidence",categoriesSummary:"Categories: {categories}",sortByLabel:"Sort by {label}",resizeColumn:"Resize {label} column",selectName:"Select {name}",columnCalculationPrompt:"{column} calculation prompt",proposedChanges:"Proposed changes",name:"Name",category:"Category",value:"Value",anomaly:"Anomaly",allocation:"Allocation"},Ia={taskProgressTitle:"\u4EFB\u52A1\u8FDB\u5EA6",taskProgressCurrent:"{current}/{total} {title}","taskProgressStatus.done":"\u5DF2\u5B8C\u6210","taskProgressStatus.running":"\u8FDB\u884C\u4E2D","taskProgressStatus.pending":"\u5F85\u6267\u884C","taskProgressStatus.failed":"\u5931\u8D25","taskProgressStatus.skipped":"\u5DF2\u8DF3\u8FC7","taskProgressStatus.stopped":"\u5DF2\u505C\u6B62",recentClose:"\u5173\u95ED",recentMore:"{title}\u7684\u66F4\u591A\u64CD\u4F5C",recentMoreLabel:"\u66F4\u591A",recentRunning:"\u8FD0\u884C\u4E2D",recentRename:"\u91CD\u547D\u540D",recentDelete:"\u5220\u9664\u5BF9\u8BDD",recentDeleteDescription:"\u786E\u5B9A\u5220\u9664\u201C{title}\u201D\u5417\uFF1F\u8BE5\u5BF9\u8BDD\u5C06\u88AB\u79FB\u9664\u3002",recentRenameDescription:"\u4E3A\u8FD9\u6BB5\u5BF9\u8BDD\u8BBE\u7F6E\u4E00\u4E2A\u540D\u79F0\u3002",recentName:"\u5BF9\u8BDD\u540D\u79F0",recentCancel:"\u53D6\u6D88",recentSave:"\u4FDD\u5B58",recentSaving:"\u4FDD\u5B58\u4E2D\u2026",recentActionFailed:"\u672A\u80FD\u786E\u8BA4\u4FEE\u6539\u7ED3\u679C\uFF0C\u8BF7\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u540E\u518D\u8BD5\u3002",chatHistory:"\u5BF9\u8BDD\u5386\u53F2",startAConversation:"\u5F00\u59CB\u65B0\u7684\u5BF9\u8BDD",stopResponse:"\u505C\u6B62\u56DE\u590D",loadMore:"\u52A0\u8F7D\u66F4\u591A",average:"% \u5E73\u5747\u503C",sScreen:"\u7684\u5C4F\u5E55",aboutGrounding:"\u5173\u4E8E\u4FE1\u606F\u9A8C\u8BC1",questionPanel:"\u95EE\u9898",questionNavigation:"\u5207\u6362\u95EE\u9898",questionPosition:"{current} / {total}",questionAnswerFailed:"\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",questionAnswerSent:"\u56DE\u7B54\u5DF2\u53D1\u9001",questionCancel:"\u8DF3\u8FC7",questionCancelling:"\u6B63\u5728\u8DF3\u8FC7\u2026",questionCancelled:"\u5DF2\u8DF3\u8FC7",answerPlaceholder:"\u8F93\u5165\u4F60\u7684\u56DE\u7B54",autoSendAnswers:"\u5C06\u5728 {seconds} \u79D2\u540E\u63D0\u4EA4\u63A8\u8350\u7B54\u6848",recommended:"\u63A8\u8350",sendAnswer:"\u63D0\u4EA4\u56DE\u7B54",sending:"\u6B63\u5728\u63D0\u4EA4\u2026",accepted:"\u5DF2\u63A5\u53D7",addAttachmentsAndSources:"\u6DFB\u52A0\u9644\u4EF6\u548C\u6765\u6E90",addCalculation:"\u6DFB\u52A0\u8BA1\u7B97",addProperty:"\u6DFB\u52A0\u5C5E\u6027",adjust:"\u8C03\u6574",adjustYourSearchToTryAgain:"\u8BF7\u8C03\u6574\u641C\u7D22\u5185\u5BB9\u540E\u91CD\u8BD5",advisor:"\u8D1F\u8D23\u4EBA",allChunks:"\u6240\u6709\u7247\u6BB5",allocationSegments:"\u5206\u914D\u5206\u7EC4",alternatives:"\u5907\u9009\u65B9\u6848",answersSent:"\u7B54\u6848\u5DF2\u53D1\u9001",apply:"\u5E94\u7528",behavior:"\u884C\u4E3A",calculating:"\u8BA1\u7B97\u4E2D\u2026",calculationInputs:"\u8BA1\u7B97\u8F93\u5165",chatPrompt:"\u804A\u5929\u8F93\u5165",chats:"\u5BF9\u8BDD",chooseModel:"\u9009\u62E9\u6A21\u578B",clearSearch:"\u6E05\u7A7A\u641C\u7D22",clearSelection:"\u6E05\u7A7A\u9009\u62E9",clickChangedRowsToToggle:"\u70B9\u51FB\u53D8\u66F4\u884C\u5207\u6362\u9009\u62E9",closeChatSearch:"\u5173\u95ED\u5BF9\u8BDD\u641C\u7D22",collapse:"\u6536\u8D77",collapseSidebar:"\u6536\u8D77\u4FA7\u680F",compactColumns:"\u7D27\u51D1\u5217\u5BBD",companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords:"\u8BB0\u5F55\u8868\u683C\uFF0C\u53EF\u6A2A\u5411\u6216\u7EB5\u5411\u6EDA\u52A8\u67E5\u770B\u6240\u6709\u5217\u548C\u8BB0\u5F55\u3002",company:"\u540D\u79F0",completed:"\u5DF2\u5B8C\u6210",connectingToAgentSScreen:"\u6B63\u5728\u8FDE\u63A5\u667A\u80FD\u4F53\u5C4F\u5E55",continue:"\u7EE7\u7EED",contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard:"\u5F53\u524D\u5206\u914D\u5FEB\u7167\uFF0C\u9009\u62E9\u5206\u7EC4\u67E5\u770B\u8BE6\u7EC6\u6570\u636E\u3002",copied:"\u5DF2\u590D\u5236",continueInNewConversation:"\u5728\u65B0\u5BF9\u8BDD\u4E2D\u7EE7\u7EED",copy:"\u590D\u5236",copyCode:"\u590D\u5236\u4EE3\u7801",customAnswer:"\u81EA\u5B9A\u4E49\u7B54\u6848",date:"\u65E5\u671F",describeEdits:"\u63CF\u8FF0\u4FEE\u6539\u8981\u6C42",discard:"\u820D\u5F03",dismiss:"\u5173\u95ED",edited:"\u5DF2\u4FEE\u6539",end:"\u7ED3\u675F",enterAMessage:"\u8F93\u5165\u6D88\u606F",expandSidebar:"\u5C55\u5F00\u4FA7\u680F",failed:"\u5931\u8D25",followUps:"\u540E\u7EED\u95EE\u9898",goCalculate:"\u5F00\u59CB\u8BA1\u7B97",groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources:"\u901A\u8FC7\u5DF2\u8FDE\u63A5\u7684\u6765\u6E90\u9A8C\u8BC1\u751F\u6210\u7684\u6570\u636E\u3002",hideFromView:"\u4ECE\u89C6\u56FE\u9690\u85CF",if:"\u5982\u679C",insights:"\u6D1E\u5BDF",keep:"\u4FDD\u7559",layout:"\u5E03\u5C40",more:"\u66F4\u591A",moreSettings:"\u66F4\u591A\u8BBE\u7F6E",newProperty:"\u65B0\u5EFA\u5C5E\u6027",nextQuestion:"\u4E0B\u4E00\u9898",noChatsFound:"\u6CA1\u6709\u627E\u5230\u5BF9\u8BDD",noMatchesFor:"\u672A\u627E\u5230\u5339\u914D\u9879\uFF1A\u201C",noResultsFound:"\u6CA1\u6709\u627E\u5230\u7ED3\u679C",open:"\u6253\u5F00",openApproval:"\u6253\u5F00\u5BA1\u6279",otherOptions:"\u5176\u4ED6\u9009\u9879",previousQuestion:"\u4E0A\u4E00\u9898",prompt:"\u63D0\u793A\u8BCD",recommendation:"\u5EFA\u8BAE",resetColumnWidths:"\u91CD\u7F6E\u5217\u5BBD",resizeCompanyColumn:"\u8C03\u6574\u540D\u79F0\u5217\u5BBD",scrollableTaskTable:"\u53EF\u6EDA\u52A8\u4EFB\u52A1\u8868\u683C",search:"\u641C\u7D22\u2026",searchChatHistory:"\u641C\u7D22\u5BF9\u8BDD\u5386\u53F2",searchChats:"\u641C\u7D22\u5BF9\u8BDD",selectInputs:"\u9009\u62E9\u8F93\u5165",selectType:"\u9009\u62E9\u7C7B\u578B",send:"\u53D1\u9001",sendEditInstruction:"\u53D1\u9001\u4FEE\u6539\u6307\u4EE4",setAPromptPressToMentionAnInput:"\u8BBE\u7F6E\u63D0\u793A\u8BCD\uFF08\u6309 @ \u5F15\u7528\u8F93\u5165\uFF09",signOut:"\u9000\u51FA\u767B\u5F55",skip:"\u8DF3\u8FC7",snapshot:"\u5FEB\u7167",somethingElse:"\u5176\u4ED6\u7B54\u6848\u2026",sources:"\u6765\u6E90",startOver:"\u91CD\u65B0\u5F00\u59CB",status:"\u72B6\u6001",tableOptions:"\u8868\u683C\u9009\u9879",taskName:"\u4EFB\u52A1\u540D\u79F0",teachATask:"\u6F14\u793A\u4EFB\u52A1",toolCalls:"\u5DE5\u5177\u8C03\u7528",trendSnapshot:"\u8D8B\u52BF\u5FEB\u7167",tryAgain:"\u91CD\u8BD5",type:"\u7C7B\u578B",useValuesFrom:"\u4F7F\u7528\u4EE5\u4E0B\u503C",v:"V",videoUnavailable:"\u89C6\u9891\u4E0D\u53EF\u7528",workspaceNavigation:"\u5DE5\u4F5C\u533A\u5BFC\u822A",and:"\u5E76\u4E14",applied:"\u5DF2\u5E94\u7528",count:"\u6570\u91CF",for:"\u9488\u5BF9",h:"h",is:"\u4E3A",links:"\u94FE\u63A5",spent:"\u652F\u51FA",configuration:"\u914D\u7F6E",new:"\u65B0\u5EFA",history:"\u5386\u53F2",edit:"\u7F16\u8F91",edits:"\u4FEE\u6539",removal:"\u5220\u9664",removals:"\u5220\u9664",addition:"\u65B0\u589E",additions:"\u65B0\u589E",change:"\u4FEE\u6539",changes:"\u4FEE\u6539",spend:"\u652F\u51FA",usage:"\u7528\u91CF",previousInsight:"\u4E0A\u4E00\u6761\u6D1E\u5BDF",nextInsight:"\u4E0B\u4E00\u6761\u6D1E\u5BDF",connected:"\u5DF2\u8FDE\u63A5",connect:"\u8FDE\u63A5",typeToSearchSourcesFiles:"\u8F93\u5165\u4EE5\u641C\u7D22\u6765\u6E90\u548C\u6587\u4EF6",typeToSearchCommands:"\u8F93\u5165\u4EE5\u641C\u7D22\u547D\u4EE4",listening:"\u6B63\u5728\u542C\u5199\u2026",stopDictation:"\u505C\u6B62\u542C\u5199",startDictation:"\u5F00\u59CB\u542C\u5199",unpin:"\u53D6\u6D88\u56FA\u5B9A",pin:"\u56FA\u5B9A",showFewerActions:"\u6536\u8D77\u64CD\u4F5C",showMoreActions:"\u66F4\u591A\u64CD\u4F5C",retry:"\u91CD\u8BD5",like:"\u8D5E",dislike:"\u4E0D\u8D5E",newWorkspace:"\u65B0\u5EFA\u5DE5\u4F5C\u533A",workspaceSettings:"\u5DE5\u4F5C\u533A\u8BBE\u7F6E",inviteTeamMembers:"\u9080\u8BF7\u56E2\u961F\u6210\u5458",loading:"\u52A0\u8F7D\u4E2D",thinking:"\u601D\u8003\u4E2D",thoughtComplete:"\u601D\u8003\u5B8C\u6210",model:"\u6A21\u578B",agent:"\u667A\u80FD\u4F53",viewSources:"\u67E5\u770B\u6765\u6E90",close:"\u5173\u95ED",noFiles:"\u6682\u65E0\u6587\u4EF6",done:"\u5B8C\u6210",doneEditing:"\u5B8C\u6210\u7F16\u8F91",newChat:"\u65B0\u5BF9\u8BDD",all:"\u5168\u90E8",toDo:"\u5F85\u529E",inProgress:"\u8FDB\u884C\u4E2D",veryStrong:"\u5F88\u5F3A",weak:"\u8F83\u5F31",veryWeak:"\u5F88\u5F31",noCommunication:"\u65E0\u4EA4\u6D41",cancel:"\u53D6\u6D88",improve:"\u6539\u5584",explain:"\u89E3\u91CA",shorten:"\u7CBE\u7B80",tone:"\u8BED\u6C14",grammar:"\u8BED\u6CD5",screenTitle:"{name}\u7684\u5C4F\u5E55",duration:"\u8017\u65F6 {time}",noMatches:"\u672A\u627E\u5230\u5339\u914D\u9879\uFF1A\u201C{query}\u201D",editsApplied_one:"\u5DF2\u5E94\u7528 {count} \u9879\u4FEE\u6539",editsApplied_other:"\u5DF2\u5E94\u7528 {count} \u9879\u4FEE\u6539",changesSummary:"\u5220\u9664 {removals} \u9879 \xB7 \u65B0\u589E {additions} \u9879",applyChanges_one:"\u5E94\u7528 {count} \u9879\u4FEE\u6539",applyChanges_other:"\u5E94\u7528 {count} \u9879\u4FEE\u6539",sourceCount_one:"{count} \u4E2A\u6765\u6E90",sourceCount_other:"{count} \u4E2A\u6765\u6E90",writeMessage:"\u8F93\u5165\u6D88\u606F\u2026",selectAllCompanies:"\u9009\u62E9\u6240\u6709\u516C\u53F8",categories:"\u5206\u7C7B",lastInteraction:"\u6700\u8FD1\u4E92\u52A8",connectionStrength:"\u8054\u7CFB\u5F3A\u5EA6",linksHeading:"\u94FE\u63A5",propertyType:"\u5C5E\u6027\u7C7B\u578B",tool:"\u5DE5\u5177",grounding:"\u6EAF\u6E90",inputs:"\u8F93\u5165",requiredValue:"\u5FC5\u586B\u503C",allowEmptyResults:"\u5141\u8BB8\u7A7A\u7ED3\u679C",showConfidence:"\u663E\u793A\u7F6E\u4FE1\u5EA6",categoriesSummary:"\u5206\u7C7B\uFF1A{categories}",sortByLabel:"\u6309{label}\u6392\u5E8F",resizeColumn:"\u8C03\u6574{label}\u5217\u5BBD",selectName:"\u9009\u62E9{name}",columnCalculationPrompt:"{column}\u8BA1\u7B97\u63D0\u793A\u8BCD",proposedChanges:"\u5EFA\u8BAE\u66F4\u6539",name:"\u540D\u79F0",category:"\u5206\u7C7B",value:"\u503C",anomaly:"\u5F02\u5E38",allocation:"\u5206\u5E03"};function q(){let e=useMonkeysLocaleMessages(),{locale:t}=useMonkeysLocale(),o=t==="zh-CN"?Ia:sn;return (n,a={})=>{let i=Ma[n]??n,l=typeof a.count=="number"?"_"+new Intl.PluralRules(t).select(a.count):"";return (e.beautiful?.[i+l]??e.beautiful?.[i]??o[i+l]??o[i]??sn[i+l]??sn[i]??n).replace(/\{(\w+)\}/g,(c,u)=>String(a[u]??""))}}r(q,"useBUICopy");function ye(e,t){let o=q(),n=r(a=>typeof a=="string"?o(a):a&&typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,l])=>[i,n(l)])):a,"visit");return {...n(e),...t}}r(ye,"useBUILabels");var Ba="aspect-[2964/1856]";function mr({path:e,size:t=15,sw:o=2}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true,children:e})}r(mr,"Ico");var El=jsxs(Fragment,{children:[jsx("polyline",{points:"4 14 10 14 10 20"}),jsx("polyline",{points:"20 10 14 10 14 4"}),jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),Dl=jsxs(Fragment,{children:[jsx("polyline",{points:"15 3 21 3 21 9"}),jsx("polyline",{points:"9 21 3 21 3 15"}),jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]});function Ul(e){let t=Math.floor(e/60),o=e%60;return `${String(t).padStart(2,"0")}:${String(o).padStart(2,"0")}`}r(Ul,"fmt");function Ea({className:e,style:t}){return jsx("svg",{className:e,style:t,width:"30",height:"30",viewBox:"0 0 24 24",fill:"var(--bui-screen-cursor-fill)",stroke:"var(--bui-screen-foreground)",strokeWidth:"1.4",strokeLinejoin:"round","aria-hidden":true,children:jsx("path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"})})}r(Ea,"CursorSvg");function zl(){return jsx(Ea,{className:"agent-cursor",style:{left:"42%",top:"53%"}})}r(zl,"DriftCursor");function _l({streamSrc:e,cursor:t=true}){return jsxs("div",{className:"absolute inset-0 overflow-hidden bg-inset",children:[e?/\.(mp4|webm|mov|m4v)(\?|$)/i.test(e)?jsx("video",{src:e??"",autoPlay:true,muted:true,loop:true,playsInline:true,className:"absolute inset-0 h-full w-full object-cover"}):jsx("img",{src:e??"",alt:"",className:"absolute inset-0 h-full w-full object-cover"}):jsx("div",{className:"h-full w-full bg-inset"}),t&&jsx(zl,{})]})}r(_l,"Screen");function Fl({src:e}){if(!e)return null;let t={maxHeight:"calc(100vh - 150px)",maxWidth:"min(960px, 90vw)"},o="block h-auto w-auto object-contain";return /\.(mp4|webm|mov|m4v)(\?|$)/i.test(e)?jsx("video",{src:e,autoPlay:true,muted:true,loop:true,playsInline:true,className:o,style:t}):jsx("img",{src:e,alt:"",className:o,style:t})}r(Fl,"MediaSizer");function La(){let e=q(),t=26,o=2,n=(t-o)/2,a=2*Math.PI*n;return jsxs("div",{className:"absolute inset-0 bg-black",children:[jsx("span",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:jsxs("svg",{width:t,height:t,className:"block",style:{animation:"bui-spin 1.1s linear infinite"},"aria-hidden":true,children:[jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--bui-screen-progress-track)",strokeWidth:o}),jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--bui-screen-foreground)",strokeWidth:o,strokeLinecap:"round",strokeDasharray:`${a*.28} ${a*.72}`})]})}),jsx("span",{className:"absolute inset-x-0 text-center text-[12.5px] font-medium text-white/70",style:{top:"calc(50% + 28px)"},children:e("Connecting to agent's screen")})]})}r(La,"LoadingScreen");function Ol({agentName:e="Agent",streamSrc:t,variant:o,recording:n=false,elapsedSeconds:a=0,onRecordingChange:i}){let l=q(),s=o==="Loading",[c,u]=useState(false),[g,d]=useState(false),[m,b]=useState(null);useEffect(()=>d(true),[]),useEffect(()=>{if(!c)return;let f=r(x=>x.key==="Escape"&&u(false),"onKey");document.addEventListener("keydown",f);let w=va(document);return ()=>{document.removeEventListener("keydown",f),w();}},[c]);let h=jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[n?jsxs("button",{type:"button",onClick:r(()=>{i?.(false);},"endRecording"),className:"inline-flex h-[27px] items-center gap-1.5 rounded-[var(--bui-radius-pill)] bg-red pl-2.5 pr-3 text-[13px] font-medium leading-none text-white shadow-[inset_0_1px_0_var(--bui-screen-record-highlight)] transition-[transform,filter] duration-150 ease-out hover:brightness-95 active:scale-[0.96]",children:[jsx("span",{className:"size-2.5 rounded-[2px] bg-white"}),l("End")]}):jsxs(Ce,{variant:"secondary",size:"sm",className:"gap-1 pl-1.5",onClick:r(()=>{i?.(true);},"startRecording"),children:[jsx(mr,{size:15,path:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("circle",{cx:"12",cy:"12",r:"3.5",fill:"currentColor",stroke:"none"})]})}),l("Teach a task")]}),jsx("button",{type:"button","aria-label":l("Collapse"),onClick:()=>u(false),className:"primitive-icon-button text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(mr,{size:15,path:El})})]});return jsx(A,{children:jsxs("div",{className:"w-full max-w-[340px]",children:[jsx("div",{className:`group/screen relative ${Ba} overflow-hidden rounded-window bg-inset shadow-card transition-shadow duration-150 ${s?"":"cursor-pointer hover:shadow-raised"}`,onClick:s?void 0:()=>u(true),style:{animation:"bui-fade-up 380ms cubic-bezier(0.23,1,0.32,1) both"},children:s?jsx(La,{}):jsxs(Fragment,{children:[jsx(_l,{streamSrc:t}),jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-[var(--bui-screen-rest)] transition-colors duration-150 group-hover/screen:bg-[var(--bui-screen-hover)]",children:jsx("span",{className:"translate-y-1 opacity-0 transition duration-150 group-hover/screen:translate-y-0 group-hover/screen:opacity-100",children:jsxs(Ce,{variant:"accent",size:"sm",onClick:f=>{f.stopPropagation(),u(true);},children:[jsx(mr,{size:14,path:Dl}),l("Open")]})})})]})}),jsx("div",{className:"mt-2.5 truncate px-0.5 text-[13px] font-medium text-ink",children:l("screenTitle",{name:e})}),c&&g&&vo(jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 sm:p-6",role:"dialog","aria-modal":"true","aria-label":l("screenTitle",{name:e}),children:[jsx("div",{className:"absolute inset-0 bg-black/60 dark:bg-black/75",style:{animation:"bui-fade-in 180ms ease-out both"},onClick:()=>u(false)}),jsxs("div",{className:"relative flex max-h-full flex-col overflow-hidden rounded-[16px] bg-surface p-2 pt-0 shadow-overlay",style:{animation:"bui-pop-in 240ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between gap-3 px-1.5",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[jsx("span",{className:"truncate text-[13px] font-semibold text-ink",children:e}),n&&jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-red-tint py-0.5 pl-1.5 pr-2 text-[11.5px] font-medium tabular-nums text-red",children:[jsx("span",{className:"size-2 rounded-full bg-red",style:{animation:"bui-records-pulse 1.1s ease-in-out infinite"}}),Ul(a)]})]}),h]}),jsxs("div",{className:"relative min-h-0 overflow-hidden rounded-[8px] bg-inset [cursor:none]",onMouseMove:f=>{let w=f.currentTarget.getBoundingClientRect();b({x:f.clientX-w.left,y:f.clientY-w.top});},onMouseLeave:()=>b(null),children:[s?jsx("div",{className:Ba,style:{width:"min(960px, 90vw)"},children:jsx(La,{})}):jsx(Fl,{src:t??""}),!s&&m&&jsx(Ea,{className:"pointer-events-none absolute z-10",style:{left:m.x,top:m.y,filter:"drop-shadow(0 1px 1.5px var(--bui-screen-cursor-shadow))"}})]})]})]}),document.body)]})})}r(Ol,"BUIAgentScreen");function Xe({children:e,className:t="",highlightClassName:o="inset-x-0 rounded-[8px] bg-hover",rowSelector:n="[data-menu-row]"}){let a=useRef(null),[i,l]=useState(null),[s,c]=useState(false),u=r(g=>{let d=a.current;if(!(g instanceof Element)||!d)return;let m=g.closest(n);if(!(m instanceof HTMLElement)||!d.contains(m))return;let b=d.getBoundingClientRect(),v=m.getBoundingClientRect();l({top:v.top-b.top,height:v.height}),c(true);},"moveTo");return jsx(A,{children:jsxs("div",{ref:a,onMouseOver:g=>u(g.target),onMouseLeave:()=>c(false),onFocusCapture:g=>u(g.target),onBlurCapture:g=>{a.current?.contains(g.relatedTarget)||c(false);},className:`group/glide-menu relative ${t}`,children:[jsx("span",{"aria-hidden":true,className:`pointer-events-none absolute ${o}`,style:{top:i?.top??0,height:i?.height??0,opacity:i&&s?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),e]})})}r(Xe,"BUIGlideMenu");var Vl=[],jl={skip:"Skip",continue:"Continue",send:"Send",customPlaceholder:"Something else\u2026",sentMessage:"Answers sent"},Gl=400,gr="360ms cubic-bezier(0.22, 1, 0.36, 1)";function ql({value:e}){let t=useRef(e),[o,n]=useState(e),[a,i]=useState(e),[l,s]=useState(false),[c,u]=useState(false),[g,d]=useState("up");useEffect(()=>{if(t.current===e)return;let b=t.current;t.current=e;let v=parseInt(b,10),S=parseInt(e,10);d(Number.isFinite(v)&&Number.isFinite(S)&&S<v?"down":"up"),n(b),i(e),s(true),u(false);let h=0,f=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>u(true));}),w=setTimeout(()=>{s(false),n(e),u(false);},Gl);return ()=>{cancelAnimationFrame(f),cancelAnimationFrame(h),clearTimeout(w);}},[e]);let m=l?a:o;return jsx(Fragment,{children:Array.from({length:m.length},(b,v)=>{let S=o[v]??"",h=m[v]??"";return !l||S===h?jsx("span",{children:h},`${v}-${h}`):jsx("span",{style:{display:"inline-block",position:"relative",overflow:"hidden",height:"1em",lineHeight:"1em",verticalAlign:"-0.05em"},children:jsxs("span",{style:{display:"flex",flexDirection:"column",transition:"transform 350ms cubic-bezier(0.4, 0, 0.2, 1)",transform:`translateY(${c?g==="down"?"0":"-1em":g==="down"?"-1em":"0"})`},children:[jsx("span",{style:{height:"1em",lineHeight:"1em"},children:g==="down"?h:S}),jsx("span",{style:{height:"1em",lineHeight:"1em"},children:g==="down"?S:h})]})},`${v}-${S}-${h}-${g}`)})})}r(ql,"RollingDigits");function fr({path:e,size:t=14,sw:o=2}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true,children:e})}r(fr,"Ico");function Xl({questions:e=Vl,labels:t,onSubmitted:o,onAnswerChange:n,resettable:a=true,allowSkip:i=true,status:l="idle",onReset:s}){let c=q(),u=ye(jl,t),[g,d]=useState(0),[m,b]=useState({}),[v,S]=useState({}),h=l==="submitted",f=useRef(m),w=useRef(v);f.current=m,w.current=v;let[x,C]=useState(true),I=useRef(null),D=useRef([]),P=useRef(false),[E,V]=useState(void 0),[j,B]=useState(0),[y,R]=useState(false),[W,J]=useState(false),G=g===e.length-1,de=(m[g]??[]).length>0||!!v[g]?.trim(),le=r(N=>{let L=D.current[g];if(!L)return;let Y=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;V(L.offsetHeight),B(L.offsetTop),R(N&&!Y);},"sync");useLayoutEffect(()=>{let N=P.current;P.current=true,le(N),J(true);},[g,m,v,x,h]),useEffect(()=>{let N=requestAnimationFrame(()=>le(P.current));return ()=>cancelAnimationFrame(N)},[g]),useEffect(()=>()=>{I.current&&clearTimeout(I.current);},[]);let _=r(N=>{I.current&&clearTimeout(I.current),d(Math.min(Math.max(N,0),e.length-1));},"goTo"),ae=r(()=>{I.current&&clearTimeout(I.current),l!=="submitting"&&o?.(f.current,w.current);},"send"),K=r(()=>{G?ae():_(g+1);},"advance"),me=r(N=>{let L=e[g].type,Y=f.current,X=Y[g]??[],Me=L==="radio"?[N]:X.includes(N)?X.filter(se=>se!==N):[...X,N],oe={...Y,[g]:Me};f.current=oe,b(oe),n?.(g,Me),L==="radio"&&(S(se=>({...se,[g]:""})),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{G?ae():d(se=>Math.min(e.length-1,se+1));},480));},"toggle"),Pe=r(()=>{d(0),b({}),S({}),s?.(),C(true),P.current=false;},"reset");return e.length?x?h?jsx(A,{children:jsxs("div",{className:"flex w-full max-w-80 items-center gap-3",style:{animation:"bui-pop-in 260ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-tint py-1 pr-2.5 pl-1 text-[12.5px] font-medium text-green",children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-full bg-green text-white",children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),u.sentMessage]}),a&&jsx("button",{type:"button",onClick:Pe,className:"text-[12px] font-medium text-ink-3 transition-colors duration-150 hover:text-ink",children:c("Start over")})]})}):jsx(A,{children:jsx("div",{className:"w-full max-w-80",children:jsxs("div",{className:"relative overflow-hidden rounded-card bg-surface shadow-card",style:{animation:"bui-fade-up 380ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("button",{type:"button","aria-label":c("Dismiss"),onClick:()=>C(false),className:"primitive-icon-button absolute right-2.5 top-2.5 z-10 text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(fr,{size:14,sw:2.2,path:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),jsx("div",{className:"primitive-card-pad",children:jsx("div",{className:"overflow-hidden",style:{height:E,transition:y?`height ${gr}`:void 0},"aria-live":"polite",children:jsx("div",{style:{display:"flex",flexDirection:"column",gap:"calc(var(--bui-spacing) * 6.5)",transform:`translate3d(0, ${-j}px, 0)`,transition:y?`transform ${gr}`:void 0,willChange:"transform"},children:e.map((N,L)=>{let Y=L===g;if(!W&&!Y)return null;let X=m[L]??[],Me={opacity:Y?1:0,transition:y?`opacity ${gr}`:void 0,pointerEvents:Y?void 0:"none"};return jsxs("div",{ref:oe=>{D.current[L]=oe;},"aria-hidden":Y?void 0:true,style:Me,children:[jsx("div",{className:"pr-7 text-[14px] font-medium text-ink",children:N.q}),jsxs(Xe,{className:"mt-2.5 flex flex-col gap-1",highlightClassName:"inset-x-0 rounded-control bg-hover",children:[N.options.map((oe,se)=>{let Ie=X.includes(se);return jsxs("button",{type:"button","data-menu-row":true,"aria-pressed":Ie,tabIndex:Y?0:-1,disabled:l==="submitting",onClick:()=>{Y&&me(se);},className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 text-left transition-colors duration-100",children:[jsx("span",{className:`flex size-4 shrink-0 items-center justify-center transition-colors duration-200
41
+ shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-transform duration-200`,style:{transform:e?"translateX(16px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}})})})}r(Zl,"BUISwitch");function Jl({label:e,value:t,meta:o,className:n=""}){return jsx(A,{children:jsxs("div",{className:`flex min-h-11 items-center justify-between gap-4 py-2 ${n}`,children:[jsx("span",{className:"text-sm text-ink-2",children:e}),jsxs("span",{className:"flex items-baseline gap-2 text-right",children:[jsx("span",{className:"text-sm font-medium text-ink tabular-nums",children:t}),o&&jsx("span",{className:"text-[13px] text-ink-3",children:o})]})]})})}r(Jl,"BUITextRow");var ec={neutral:{cls:"bg-field text-ink-2",ring:"var(--bui-shadow-hairline)"},green:{cls:"bg-green-tint text-green",ring:"0 0 0 1px color-mix(in oklch, var(--bui-green) 28%, transparent)"},orange:{cls:"bg-orange-tint text-orange",ring:"0 0 0 1px color-mix(in oklch, var(--bui-orange) 28%, transparent)"},red:{cls:"bg-red-tint text-red",ring:"0 0 0 1px color-mix(in oklch, var(--bui-red) 28%, transparent)"},accent:{cls:"bg-accent-tint text-accent-ink",ring:"0 0 0 1px color-mix(in oklch, var(--bui-accent) 28%, transparent)"}};function tc({children:e,tone:t="neutral",className:o=""}){let n=ec[t];return jsx(A,{children:jsx("span",{className:`mx-0.5 inline-flex items-center rounded-full px-1.5 py-0
42
+ align-middle text-[12px] font-medium ${n.cls} ${o}`,style:{boxShadow:n.ring},children:e})})}r(tc,"BUIValuePill");var _a={"Chat history":"chatHistory","Start a conversation":"startAConversation","Stop response":"stopResponse","Load more":"loadMore","% average":"average","'s screen":"sScreen","About grounding":"aboutGrounding","Answer could not be sent":"questionAnswerFailed","Answer sent":"questionAnswerSent","Cancel question":"questionCancel",Cancelling:"questionCancelling","Question cancelled":"questionCancelled",Accepted:"accepted","Add attachments and sources":"addAttachmentsAndSources","Add calculation":"addCalculation","Add property":"addProperty",Adjust:"adjust","Adjust your search to try again":"adjustYourSearchToTryAgain",Advisor:"advisor","All chunks":"allChunks","Allocation segments":"allocationSegments",Alternatives:"alternatives","Answers sent":"answersSent",Apply:"apply",Behavior:"behavior","Calculating\u2026":"calculating","Calculation inputs":"calculationInputs","Chat prompt":"chatPrompt",Chats:"chats","Choose model":"chooseModel","Clear search":"clearSearch","Clear selection":"clearSelection","Click changed rows to toggle":"clickChangedRowsToToggle","Close chat search":"closeChatSearch",Collapse:"collapse","Collapse sidebar":"collapseSidebar","Compact columns":"compactColumns","Companies table. Scroll horizontally and vertically to view all columns and records.":"companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords",Company:"company",Completed:"completed","Connecting to agent's screen":"connectingToAgentSScreen",Continue:"continue","Continue in new conversation":"continueInNewConversation","Contribution snapshot across current inventory value. Segment selection changes the inspected group without moving the card.":"contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard",Copied:"copied",Copy:"copy","Copy code":"copyCode","Custom answer":"customAnswer",Date:"date","Describe edits":"describeEdits",Discard:"discard",Dismiss:"dismiss",Edited:"edited",End:"end","Enter a message":"enterAMessage","Expand sidebar":"expandSidebar",Failed:"failed","Follow-ups":"followUps","Go calculate":"goCalculate","Grounding lets the model verify generated values against connected sources.":"groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources","Hide from view":"hideFromView",If:"if",Insights:"insights",Keep:"keep",Layout:"layout",More:"more","More settings":"moreSettings","New property":"newProperty","Next question":"nextQuestion","No chats found":"noChatsFound","No matches for \u201C":"noMatchesFor","No results found":"noResultsFound",Open:"open","Open approval":"openApproval","Other options":"otherOptions","Previous question":"previousQuestion",Prompt:"prompt",Recommendation:"recommendation",Recommended:"recommended","Reset column widths":"resetColumnWidths","Resize Company column":"resizeCompanyColumn","Scrollable task table":"scrollableTaskTable",Search:"search","Search chat history":"searchChatHistory","Search chats":"searchChats","Search\u2026":"search","Select inputs":"selectInputs","Select type":"selectType",Send:"send","Send answer":"sendAnswer","Send edit instruction":"sendEditInstruction","Set a prompt (press @ to mention an input)":"setAPromptPressToMentionAnInput","Sign out":"signOut",Skip:"skip",Snapshot:"snapshot","Something else\u2026":"somethingElse",Sending:"sending","Sending recommended answers in {seconds}s":"autoSendAnswers",Sources:"sources","Start over":"startOver",Status:"status","Table options":"tableOptions","Task name":"taskName","Teach a task":"teachATask","Tool calls":"toolCalls","Trend snapshot":"trendSnapshot","Try again":"tryAgain",Type:"type","Use values from":"useValuesFrom","Your answer":"answerPlaceholder",V:"v","Video unavailable":"videoUnavailable","Workspace navigation":"workspaceNavigation",and:"and",applied:"applied",count:"count",for:"for",h:"h",is:"is",links:"links",spent:"spent",Configuration:"configuration",New:"new",History:"history",edit:"edit",edits:"edits",removal:"removal",removals:"removals",addition:"addition",additions:"additions",change:"change",changes:"changes",Spend:"spend",Usage:"usage","Previous insight":"previousInsight","Next insight":"nextInsight",Connected:"connected",Connect:"connect","Type to search sources & files":"typeToSearchSourcesFiles","Type to search commands":"typeToSearchCommands","Listening\u2026":"listening","Stop dictation":"stopDictation","Start dictation":"startDictation",Unpin:"unpin",Pin:"pin","Show fewer actions":"showFewerActions","Show more actions":"showMoreActions",Retry:"retry",Like:"like",Dislike:"dislike","New workspace":"newWorkspace","Workspace settings":"workspaceSettings","Invite team members":"inviteTeamMembers",Loading:"loading",Thinking:"thinking","Thought complete":"thoughtComplete",Model:"model",Agent:"agent","View sources":"viewSources",Close:"close","No files":"noFiles",Done:"done",Edit:"edit","Done editing":"doneEditing","New chat":"newChat",All:"all","To do":"toDo","In Progress":"inProgress","Very strong":"veryStrong",Weak:"weak","Very weak":"veryWeak","No communication":"noCommunication",Cancel:"cancel",Improve:"improve",Explain:"explain",Shorten:"shorten",Tone:"tone",Grammar:"grammar","Write a message\u2026":"writeMessage","Select all companies":"selectAllCompanies",Categories:"categories","Last interaction":"lastInteraction","Connection strength":"connectionStrength",Links:"linksHeading","Property type":"propertyType",Tool:"tool",Grounding:"grounding",Inputs:"inputs","Required value":"requiredValue","Allow empty results":"allowEmptyResults","Show confidence":"showConfidence","Categories: {categories}":"categoriesSummary","Sort by {label}":"sortByLabel","Resize {label} column":"resizeColumn","Select {name}":"selectName","{column} calculation prompt":"columnCalculationPrompt","Proposed changes":"proposedChanges",Name:"name",Category:"category",Value:"value",Anomaly:"anomaly",Allocation:"allocation"},pn={taskProgressTitle:"Task progress",taskProgressCurrent:"{current}/{total} {title}","taskProgressStatus.done":"Completed","taskProgressStatus.running":"In progress","taskProgressStatus.pending":"Pending","taskProgressStatus.failed":"Failed","taskProgressStatus.skipped":"Skipped","taskProgressStatus.stopped":"Stopped",recentClose:"Close",recentMore:"More actions for {title}",recentMoreLabel:"More",recentRunning:"Running",recentRename:"Rename",recentDelete:"Delete conversation",recentDeleteDescription:"Delete \u201C{title}\u201D? This conversation will be removed.",recentRenameDescription:"Choose a name for this conversation.",recentName:"Conversation name",recentCancel:"Cancel",recentSave:"Save",recentSaving:"Saving\u2026",recentActionFailed:"Could not confirm the change. Refresh the conversation list before trying again.",chatHistory:"Chat history",startAConversation:"Start a conversation",stopResponse:"Stop response",loadMore:"Load more",average:"% average",sScreen:"'s screen",aboutGrounding:"About grounding",questionPanel:"Questions",questionNavigation:"Question navigation",questionPosition:"{current} of {total}",questionAnswerFailed:"Answer could not be sent. Try again.",questionAnswerSent:"Answer sent",questionCancel:"Skip",questionCancelling:"Skipping\u2026",questionCancelled:"Skipped",answerPlaceholder:"Your answer",autoSendAnswers:"Sending recommended answers in {seconds}s",recommended:"Recommended",sendAnswer:"Send answer",sending:"Sending\u2026",accepted:"Accepted",addAttachmentsAndSources:"Add attachments and sources",addCalculation:"Add calculation",addProperty:"Add property",adjust:"Adjust",adjustYourSearchToTryAgain:"Adjust your search to try again",advisor:"Advisor",allChunks:"All chunks",allocationSegments:"Allocation segments",alternatives:"Alternatives",answersSent:"Answers sent",apply:"Apply",behavior:"Behavior",calculating:"Calculating\u2026",calculationInputs:"Calculation inputs",chatPrompt:"Chat prompt",chats:"Chats",chooseModel:"Choose model",clearSearch:"Clear search",clearSelection:"Clear selection",clickChangedRowsToToggle:"Click changed rows to toggle",closeChatSearch:"Close chat search",collapse:"Collapse",collapseSidebar:"Collapse sidebar",compactColumns:"Compact columns",companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords:"Companies table. Scroll horizontally and vertically to view all columns and records.",company:"Company",completed:"Completed",connectingToAgentSScreen:"Connecting to agent's screen",continue:"Continue",continueInNewConversation:"Continue in new conversation",contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard:"Contribution snapshot across current inventory value. Segment selection changes the inspected group without moving the card.",copied:"Copied",copy:"Copy",copyCode:"Copy code",customAnswer:"Custom answer",date:"Date",describeEdits:"Describe edits",discard:"Discard",dismiss:"Dismiss",edited:"Edited",end:"End",enterAMessage:"Enter a message",expandSidebar:"Expand sidebar",failed:"Failed",followUps:"Follow-ups",goCalculate:"Go calculate",groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources:"Grounding lets the model verify generated values against connected sources.",hideFromView:"Hide from view",if:"If",insights:"Insights",keep:"Keep",layout:"Layout",more:"More",moreSettings:"More settings",newProperty:"New property",nextQuestion:"Next question",noChatsFound:"No chats found",noMatchesFor:"No matches for \u201C",noResultsFound:"No results found",open:"Open",openApproval:"Open approval",otherOptions:"Other options",previousQuestion:"Previous question",prompt:"Prompt",recommendation:"Recommendation",resetColumnWidths:"Reset column widths",resizeCompanyColumn:"Resize Company column",scrollableTaskTable:"Scrollable task table",search:"Search\u2026",searchChatHistory:"Search chat history",searchChats:"Search chats",selectInputs:"Select inputs",selectType:"Select type",send:"Send",sendEditInstruction:"Send edit instruction",setAPromptPressToMentionAnInput:"Set a prompt (press @ to mention an input)",signOut:"Sign out",skip:"Skip",snapshot:"Snapshot",somethingElse:"Something else\u2026",sources:"Sources",startOver:"Start over",status:"Status",tableOptions:"Table options",taskName:"Task name",teachATask:"Teach a task",toolCalls:"Tool calls",trendSnapshot:"Trend snapshot",tryAgain:"Try again",type:"Type",useValuesFrom:"Use values from",v:"V",videoUnavailable:"Video unavailable",workspaceNavigation:"Workspace navigation",and:"and",applied:"applied",count:"count",for:"for",h:"h",is:"is",links:"links",spent:"spent",configuration:"Configuration",new:"New",history:"History",edit:"Edit",edits:"edits",removal:"removal",removals:"removals",addition:"addition",additions:"additions",change:"change",changes:"changes",spend:"Spend",usage:"Usage",previousInsight:"Previous insight",nextInsight:"Next insight",connected:"Connected",connect:"Connect",typeToSearchSourcesFiles:"Type to search sources & files",typeToSearchCommands:"Type to search commands",listening:"Listening\u2026",stopDictation:"Stop dictation",startDictation:"Start dictation",unpin:"Unpin",pin:"Pin",showFewerActions:"Show fewer actions",showMoreActions:"Show more actions",retry:"Retry",like:"Like",dislike:"Dislike",newWorkspace:"New workspace",workspaceSettings:"Workspace settings",inviteTeamMembers:"Invite team members",loading:"Loading",thinking:"Thinking",thoughtComplete:"Thought complete",model:"Model",agent:"Agent",viewSources:"View sources",close:"Close",noFiles:"No files",done:"Done",doneEditing:"Done editing",newChat:"New chat",all:"All",toDo:"To do",inProgress:"In Progress",veryStrong:"Very strong",weak:"Weak",veryWeak:"Very weak",noCommunication:"No communication",cancel:"Cancel",improve:"Improve",explain:"Explain",shorten:"Shorten",tone:"Tone",grammar:"Grammar",screenTitle:"{name}'s screen",duration:"for {time}",noMatches:"No matches for \u201C{query}\u201D",editsApplied_one:"{count} edit applied",editsApplied_other:"{count} edits applied",changesSummary:"{removals} removed \xB7 {additions} added",applyChanges_one:"Apply {count} change",applyChanges_other:"Apply {count} changes",sourceCount_one:"{count} source",sourceCount_other:"{count} sources",writeMessage:"Write a message\u2026",selectAllCompanies:"Select all companies",categories:"Categories",lastInteraction:"Last interaction",connectionStrength:"Connection strength",linksHeading:"Links",propertyType:"Property type",tool:"Tool",grounding:"Grounding",inputs:"Inputs",requiredValue:"Required value",allowEmptyResults:"Allow empty results",showConfidence:"Show confidence",categoriesSummary:"Categories: {categories}",sortByLabel:"Sort by {label}",resizeColumn:"Resize {label} column",selectName:"Select {name}",columnCalculationPrompt:"{column} calculation prompt",proposedChanges:"Proposed changes",name:"Name",category:"Category",value:"Value",anomaly:"Anomaly",allocation:"Allocation"},Oa={taskProgressTitle:"\u4EFB\u52A1\u8FDB\u5EA6",taskProgressCurrent:"{current}/{total} {title}","taskProgressStatus.done":"\u5DF2\u5B8C\u6210","taskProgressStatus.running":"\u8FDB\u884C\u4E2D","taskProgressStatus.pending":"\u5F85\u6267\u884C","taskProgressStatus.failed":"\u5931\u8D25","taskProgressStatus.skipped":"\u5DF2\u8DF3\u8FC7","taskProgressStatus.stopped":"\u5DF2\u505C\u6B62",recentClose:"\u5173\u95ED",recentMore:"{title}\u7684\u66F4\u591A\u64CD\u4F5C",recentMoreLabel:"\u66F4\u591A",recentRunning:"\u8FD0\u884C\u4E2D",recentRename:"\u91CD\u547D\u540D",recentDelete:"\u5220\u9664\u5BF9\u8BDD",recentDeleteDescription:"\u786E\u5B9A\u5220\u9664\u201C{title}\u201D\u5417\uFF1F\u8BE5\u5BF9\u8BDD\u5C06\u88AB\u79FB\u9664\u3002",recentRenameDescription:"\u4E3A\u8FD9\u6BB5\u5BF9\u8BDD\u8BBE\u7F6E\u4E00\u4E2A\u540D\u79F0\u3002",recentName:"\u5BF9\u8BDD\u540D\u79F0",recentCancel:"\u53D6\u6D88",recentSave:"\u4FDD\u5B58",recentSaving:"\u4FDD\u5B58\u4E2D\u2026",recentActionFailed:"\u672A\u80FD\u786E\u8BA4\u4FEE\u6539\u7ED3\u679C\uFF0C\u8BF7\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u540E\u518D\u8BD5\u3002",chatHistory:"\u5BF9\u8BDD\u5386\u53F2",startAConversation:"\u5F00\u59CB\u65B0\u7684\u5BF9\u8BDD",stopResponse:"\u505C\u6B62\u56DE\u590D",loadMore:"\u52A0\u8F7D\u66F4\u591A",average:"% \u5E73\u5747\u503C",sScreen:"\u7684\u5C4F\u5E55",aboutGrounding:"\u5173\u4E8E\u4FE1\u606F\u9A8C\u8BC1",questionPanel:"\u95EE\u9898",questionNavigation:"\u5207\u6362\u95EE\u9898",questionPosition:"{current} / {total}",questionAnswerFailed:"\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",questionAnswerSent:"\u56DE\u7B54\u5DF2\u53D1\u9001",questionCancel:"\u8DF3\u8FC7",questionCancelling:"\u6B63\u5728\u8DF3\u8FC7\u2026",questionCancelled:"\u5DF2\u8DF3\u8FC7",answerPlaceholder:"\u8F93\u5165\u4F60\u7684\u56DE\u7B54",autoSendAnswers:"\u5C06\u5728 {seconds} \u79D2\u540E\u63D0\u4EA4\u63A8\u8350\u7B54\u6848",recommended:"\u63A8\u8350",sendAnswer:"\u63D0\u4EA4\u56DE\u7B54",sending:"\u6B63\u5728\u63D0\u4EA4\u2026",accepted:"\u5DF2\u63A5\u53D7",addAttachmentsAndSources:"\u6DFB\u52A0\u9644\u4EF6\u548C\u6765\u6E90",addCalculation:"\u6DFB\u52A0\u8BA1\u7B97",addProperty:"\u6DFB\u52A0\u5C5E\u6027",adjust:"\u8C03\u6574",adjustYourSearchToTryAgain:"\u8BF7\u8C03\u6574\u641C\u7D22\u5185\u5BB9\u540E\u91CD\u8BD5",advisor:"\u8D1F\u8D23\u4EBA",allChunks:"\u6240\u6709\u7247\u6BB5",allocationSegments:"\u5206\u914D\u5206\u7EC4",alternatives:"\u5907\u9009\u65B9\u6848",answersSent:"\u7B54\u6848\u5DF2\u53D1\u9001",apply:"\u5E94\u7528",behavior:"\u884C\u4E3A",calculating:"\u8BA1\u7B97\u4E2D\u2026",calculationInputs:"\u8BA1\u7B97\u8F93\u5165",chatPrompt:"\u804A\u5929\u8F93\u5165",chats:"\u5BF9\u8BDD",chooseModel:"\u9009\u62E9\u6A21\u578B",clearSearch:"\u6E05\u7A7A\u641C\u7D22",clearSelection:"\u6E05\u7A7A\u9009\u62E9",clickChangedRowsToToggle:"\u70B9\u51FB\u53D8\u66F4\u884C\u5207\u6362\u9009\u62E9",closeChatSearch:"\u5173\u95ED\u5BF9\u8BDD\u641C\u7D22",collapse:"\u6536\u8D77",collapseSidebar:"\u6536\u8D77\u4FA7\u680F",compactColumns:"\u7D27\u51D1\u5217\u5BBD",companiesTableScrollHorizontallyAndVerticallyToViewAllColumnsAndRecords:"\u8BB0\u5F55\u8868\u683C\uFF0C\u53EF\u6A2A\u5411\u6216\u7EB5\u5411\u6EDA\u52A8\u67E5\u770B\u6240\u6709\u5217\u548C\u8BB0\u5F55\u3002",company:"\u540D\u79F0",completed:"\u5DF2\u5B8C\u6210",connectingToAgentSScreen:"\u6B63\u5728\u8FDE\u63A5\u667A\u80FD\u4F53\u5C4F\u5E55",continue:"\u7EE7\u7EED",contributionSnapshotAcrossCurrentInventoryValueSegmentSelectionChangesTheInspectedGroupWithoutMovingTheCard:"\u5F53\u524D\u5206\u914D\u5FEB\u7167\uFF0C\u9009\u62E9\u5206\u7EC4\u67E5\u770B\u8BE6\u7EC6\u6570\u636E\u3002",copied:"\u5DF2\u590D\u5236",continueInNewConversation:"\u5728\u65B0\u5BF9\u8BDD\u4E2D\u7EE7\u7EED",copy:"\u590D\u5236",copyCode:"\u590D\u5236\u4EE3\u7801",customAnswer:"\u81EA\u5B9A\u4E49\u7B54\u6848",date:"\u65E5\u671F",describeEdits:"\u63CF\u8FF0\u4FEE\u6539\u8981\u6C42",discard:"\u820D\u5F03",dismiss:"\u5173\u95ED",edited:"\u5DF2\u4FEE\u6539",end:"\u7ED3\u675F",enterAMessage:"\u8F93\u5165\u6D88\u606F",expandSidebar:"\u5C55\u5F00\u4FA7\u680F",failed:"\u5931\u8D25",followUps:"\u540E\u7EED\u95EE\u9898",goCalculate:"\u5F00\u59CB\u8BA1\u7B97",groundingLetsTheModelVerifyGeneratedValuesAgainstConnectedSources:"\u901A\u8FC7\u5DF2\u8FDE\u63A5\u7684\u6765\u6E90\u9A8C\u8BC1\u751F\u6210\u7684\u6570\u636E\u3002",hideFromView:"\u4ECE\u89C6\u56FE\u9690\u85CF",if:"\u5982\u679C",insights:"\u6D1E\u5BDF",keep:"\u4FDD\u7559",layout:"\u5E03\u5C40",more:"\u66F4\u591A",moreSettings:"\u66F4\u591A\u8BBE\u7F6E",newProperty:"\u65B0\u5EFA\u5C5E\u6027",nextQuestion:"\u4E0B\u4E00\u9898",noChatsFound:"\u6CA1\u6709\u627E\u5230\u5BF9\u8BDD",noMatchesFor:"\u672A\u627E\u5230\u5339\u914D\u9879\uFF1A\u201C",noResultsFound:"\u6CA1\u6709\u627E\u5230\u7ED3\u679C",open:"\u6253\u5F00",openApproval:"\u6253\u5F00\u5BA1\u6279",otherOptions:"\u5176\u4ED6\u9009\u9879",previousQuestion:"\u4E0A\u4E00\u9898",prompt:"\u63D0\u793A\u8BCD",recommendation:"\u5EFA\u8BAE",resetColumnWidths:"\u91CD\u7F6E\u5217\u5BBD",resizeCompanyColumn:"\u8C03\u6574\u540D\u79F0\u5217\u5BBD",scrollableTaskTable:"\u53EF\u6EDA\u52A8\u4EFB\u52A1\u8868\u683C",search:"\u641C\u7D22\u2026",searchChatHistory:"\u641C\u7D22\u5BF9\u8BDD\u5386\u53F2",searchChats:"\u641C\u7D22\u5BF9\u8BDD",selectInputs:"\u9009\u62E9\u8F93\u5165",selectType:"\u9009\u62E9\u7C7B\u578B",send:"\u53D1\u9001",sendEditInstruction:"\u53D1\u9001\u4FEE\u6539\u6307\u4EE4",setAPromptPressToMentionAnInput:"\u8BBE\u7F6E\u63D0\u793A\u8BCD\uFF08\u6309 @ \u5F15\u7528\u8F93\u5165\uFF09",signOut:"\u9000\u51FA\u767B\u5F55",skip:"\u8DF3\u8FC7",snapshot:"\u5FEB\u7167",somethingElse:"\u5176\u4ED6\u7B54\u6848\u2026",sources:"\u6765\u6E90",startOver:"\u91CD\u65B0\u5F00\u59CB",status:"\u72B6\u6001",tableOptions:"\u8868\u683C\u9009\u9879",taskName:"\u4EFB\u52A1\u540D\u79F0",teachATask:"\u6F14\u793A\u4EFB\u52A1",toolCalls:"\u5DE5\u5177\u8C03\u7528",trendSnapshot:"\u8D8B\u52BF\u5FEB\u7167",tryAgain:"\u91CD\u8BD5",type:"\u7C7B\u578B",useValuesFrom:"\u4F7F\u7528\u4EE5\u4E0B\u503C",v:"V",videoUnavailable:"\u89C6\u9891\u4E0D\u53EF\u7528",workspaceNavigation:"\u5DE5\u4F5C\u533A\u5BFC\u822A",and:"\u5E76\u4E14",applied:"\u5DF2\u5E94\u7528",count:"\u6570\u91CF",for:"\u9488\u5BF9",h:"h",is:"\u4E3A",links:"\u94FE\u63A5",spent:"\u652F\u51FA",configuration:"\u914D\u7F6E",new:"\u65B0\u5EFA",history:"\u5386\u53F2",edit:"\u7F16\u8F91",edits:"\u4FEE\u6539",removal:"\u5220\u9664",removals:"\u5220\u9664",addition:"\u65B0\u589E",additions:"\u65B0\u589E",change:"\u4FEE\u6539",changes:"\u4FEE\u6539",spend:"\u652F\u51FA",usage:"\u7528\u91CF",previousInsight:"\u4E0A\u4E00\u6761\u6D1E\u5BDF",nextInsight:"\u4E0B\u4E00\u6761\u6D1E\u5BDF",connected:"\u5DF2\u8FDE\u63A5",connect:"\u8FDE\u63A5",typeToSearchSourcesFiles:"\u8F93\u5165\u4EE5\u641C\u7D22\u6765\u6E90\u548C\u6587\u4EF6",typeToSearchCommands:"\u8F93\u5165\u4EE5\u641C\u7D22\u547D\u4EE4",listening:"\u6B63\u5728\u542C\u5199\u2026",stopDictation:"\u505C\u6B62\u542C\u5199",startDictation:"\u5F00\u59CB\u542C\u5199",unpin:"\u53D6\u6D88\u56FA\u5B9A",pin:"\u56FA\u5B9A",showFewerActions:"\u6536\u8D77\u64CD\u4F5C",showMoreActions:"\u66F4\u591A\u64CD\u4F5C",retry:"\u91CD\u8BD5",like:"\u8D5E",dislike:"\u4E0D\u8D5E",newWorkspace:"\u65B0\u5EFA\u5DE5\u4F5C\u533A",workspaceSettings:"\u5DE5\u4F5C\u533A\u8BBE\u7F6E",inviteTeamMembers:"\u9080\u8BF7\u56E2\u961F\u6210\u5458",loading:"\u52A0\u8F7D\u4E2D",thinking:"\u601D\u8003\u4E2D",thoughtComplete:"\u601D\u8003\u5B8C\u6210",model:"\u6A21\u578B",agent:"\u667A\u80FD\u4F53",viewSources:"\u67E5\u770B\u6765\u6E90",close:"\u5173\u95ED",noFiles:"\u6682\u65E0\u6587\u4EF6",done:"\u5B8C\u6210",doneEditing:"\u5B8C\u6210\u7F16\u8F91",newChat:"\u65B0\u5BF9\u8BDD",all:"\u5168\u90E8",toDo:"\u5F85\u529E",inProgress:"\u8FDB\u884C\u4E2D",veryStrong:"\u5F88\u5F3A",weak:"\u8F83\u5F31",veryWeak:"\u5F88\u5F31",noCommunication:"\u65E0\u4EA4\u6D41",cancel:"\u53D6\u6D88",improve:"\u6539\u5584",explain:"\u89E3\u91CA",shorten:"\u7CBE\u7B80",tone:"\u8BED\u6C14",grammar:"\u8BED\u6CD5",screenTitle:"{name}\u7684\u5C4F\u5E55",duration:"\u8017\u65F6 {time}",noMatches:"\u672A\u627E\u5230\u5339\u914D\u9879\uFF1A\u201C{query}\u201D",editsApplied_one:"\u5DF2\u5E94\u7528 {count} \u9879\u4FEE\u6539",editsApplied_other:"\u5DF2\u5E94\u7528 {count} \u9879\u4FEE\u6539",changesSummary:"\u5220\u9664 {removals} \u9879 \xB7 \u65B0\u589E {additions} \u9879",applyChanges_one:"\u5E94\u7528 {count} \u9879\u4FEE\u6539",applyChanges_other:"\u5E94\u7528 {count} \u9879\u4FEE\u6539",sourceCount_one:"{count} \u4E2A\u6765\u6E90",sourceCount_other:"{count} \u4E2A\u6765\u6E90",writeMessage:"\u8F93\u5165\u6D88\u606F\u2026",selectAllCompanies:"\u9009\u62E9\u6240\u6709\u516C\u53F8",categories:"\u5206\u7C7B",lastInteraction:"\u6700\u8FD1\u4E92\u52A8",connectionStrength:"\u8054\u7CFB\u5F3A\u5EA6",linksHeading:"\u94FE\u63A5",propertyType:"\u5C5E\u6027\u7C7B\u578B",tool:"\u5DE5\u5177",grounding:"\u6EAF\u6E90",inputs:"\u8F93\u5165",requiredValue:"\u5FC5\u586B\u503C",allowEmptyResults:"\u5141\u8BB8\u7A7A\u7ED3\u679C",showConfidence:"\u663E\u793A\u7F6E\u4FE1\u5EA6",categoriesSummary:"\u5206\u7C7B\uFF1A{categories}",sortByLabel:"\u6309{label}\u6392\u5E8F",resizeColumn:"\u8C03\u6574{label}\u5217\u5BBD",selectName:"\u9009\u62E9{name}",columnCalculationPrompt:"{column}\u8BA1\u7B97\u63D0\u793A\u8BCD",proposedChanges:"\u5EFA\u8BAE\u66F4\u6539",name:"\u540D\u79F0",category:"\u5206\u7C7B",value:"\u503C",anomaly:"\u5F02\u5E38",allocation:"\u5206\u5E03"};function q(){let e=useMonkeysLocaleMessages(),{locale:t}=useMonkeysLocale(),o=t==="zh-CN"?Oa:pn;return (n,a={})=>{let i=_a[n]??n,l=typeof a.count=="number"?"_"+new Intl.PluralRules(t).select(a.count):"";return (e.beautiful?.[i+l]??e.beautiful?.[i]??o[i+l]??o[i]??pn[i+l]??pn[i]??n).replace(/\{(\w+)\}/g,(c,u)=>String(a[u]??""))}}r(q,"useBUICopy");function ye(e,t){let o=q(),n=r(a=>typeof a=="string"?o(a):a&&typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,l])=>[i,n(l)])):a,"visit");return {...n(e),...t}}r(ye,"useBUILabels");var $a="aspect-[2964/1856]";function vr({path:e,size:t=15,sw:o=2}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true,children:e})}r(vr,"Ico");var rc=jsxs(Fragment,{children:[jsx("polyline",{points:"4 14 10 14 10 20"}),jsx("polyline",{points:"20 10 14 10 14 4"}),jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),ac=jsxs(Fragment,{children:[jsx("polyline",{points:"15 3 21 3 21 9"}),jsx("polyline",{points:"9 21 3 21 3 15"}),jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]});function ic(e){let t=Math.floor(e/60),o=e%60;return `${String(t).padStart(2,"0")}:${String(o).padStart(2,"0")}`}r(ic,"fmt");function Wa({className:e,style:t}){return jsx("svg",{className:e,style:t,width:"30",height:"30",viewBox:"0 0 24 24",fill:"var(--bui-screen-cursor-fill)",stroke:"var(--bui-screen-foreground)",strokeWidth:"1.4",strokeLinejoin:"round","aria-hidden":true,children:jsx("path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"})})}r(Wa,"CursorSvg");function sc(){return jsx(Wa,{className:"agent-cursor",style:{left:"42%",top:"53%"}})}r(sc,"DriftCursor");function lc({streamSrc:e,cursor:t=true}){return jsxs("div",{className:"absolute inset-0 overflow-hidden bg-inset",children:[e?/\.(mp4|webm|mov|m4v)(\?|$)/i.test(e)?jsx("video",{src:e??"",autoPlay:true,muted:true,loop:true,playsInline:true,className:"absolute inset-0 h-full w-full object-cover"}):jsx("img",{src:e??"",alt:"",className:"absolute inset-0 h-full w-full object-cover"}):jsx("div",{className:"h-full w-full bg-inset"}),t&&jsx(sc,{})]})}r(lc,"Screen");function cc({src:e}){if(!e)return null;let t={maxHeight:"calc(100vh - 150px)",maxWidth:"min(960px, 90vw)"},o="block h-auto w-auto object-contain";return /\.(mp4|webm|mov|m4v)(\?|$)/i.test(e)?jsx("video",{src:e,autoPlay:true,muted:true,loop:true,playsInline:true,className:o,style:t}):jsx("img",{src:e,alt:"",className:o,style:t})}r(cc,"MediaSizer");function Ha(){let e=q(),t=26,o=2,n=(t-o)/2,a=2*Math.PI*n;return jsxs("div",{className:"absolute inset-0 bg-black",children:[jsx("span",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:jsxs("svg",{width:t,height:t,className:"block",style:{animation:"bui-spin 1.1s linear infinite"},"aria-hidden":true,children:[jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--bui-screen-progress-track)",strokeWidth:o}),jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--bui-screen-foreground)",strokeWidth:o,strokeLinecap:"round",strokeDasharray:`${a*.28} ${a*.72}`})]})}),jsx("span",{className:"absolute inset-x-0 text-center text-[12.5px] font-medium text-white/70",style:{top:"calc(50% + 28px)"},children:e("Connecting to agent's screen")})]})}r(Ha,"LoadingScreen");function dc({agentName:e="Agent",streamSrc:t,variant:o,recording:n=false,elapsedSeconds:a=0,onRecordingChange:i}){let l=q(),s=o==="Loading",[c,u]=useState(false),[g,d]=useState(false),[m,b]=useState(null);useEffect(()=>d(true),[]),useEffect(()=>{if(!c)return;let f=r(x=>x.key==="Escape"&&u(false),"onKey");document.addEventListener("keydown",f);let w=Pa(document);return ()=>{document.removeEventListener("keydown",f),w();}},[c]);let h=jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[n?jsxs("button",{type:"button",onClick:r(()=>{i?.(false);},"endRecording"),className:"inline-flex h-[27px] items-center gap-1.5 rounded-[var(--bui-radius-pill)] bg-red pl-2.5 pr-3 text-[13px] font-medium leading-none text-white shadow-[inset_0_1px_0_var(--bui-screen-record-highlight)] transition-[transform,filter] duration-150 ease-out hover:brightness-95 active:scale-[0.96]",children:[jsx("span",{className:"size-2.5 rounded-[2px] bg-white"}),l("End")]}):jsxs(Ce,{variant:"secondary",size:"sm",className:"gap-1 pl-1.5",onClick:r(()=>{i?.(true);},"startRecording"),children:[jsx(vr,{size:15,path:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("circle",{cx:"12",cy:"12",r:"3.5",fill:"currentColor",stroke:"none"})]})}),l("Teach a task")]}),jsx("button",{type:"button","aria-label":l("Collapse"),onClick:()=>u(false),className:"primitive-icon-button text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(vr,{size:15,path:rc})})]});return jsx(A,{children:jsxs("div",{className:"w-full max-w-[340px]",children:[jsx("div",{className:`group/screen relative ${$a} overflow-hidden rounded-window bg-inset shadow-card transition-shadow duration-150 ${s?"":"cursor-pointer hover:shadow-raised"}`,onClick:s?void 0:()=>u(true),style:{animation:"bui-fade-up 380ms cubic-bezier(0.23,1,0.32,1) both"},children:s?jsx(Ha,{}):jsxs(Fragment,{children:[jsx(lc,{streamSrc:t}),jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-[var(--bui-screen-rest)] transition-colors duration-150 group-hover/screen:bg-[var(--bui-screen-hover)]",children:jsx("span",{className:"translate-y-1 opacity-0 transition duration-150 group-hover/screen:translate-y-0 group-hover/screen:opacity-100",children:jsxs(Ce,{variant:"accent",size:"sm",onClick:f=>{f.stopPropagation(),u(true);},children:[jsx(vr,{size:14,path:ac}),l("Open")]})})})]})}),jsx("div",{className:"mt-2.5 truncate px-0.5 text-[13px] font-medium text-ink",children:l("screenTitle",{name:e})}),c&&g&&Co(jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 sm:p-6",role:"dialog","aria-modal":"true","aria-label":l("screenTitle",{name:e}),children:[jsx("div",{className:"absolute inset-0 bg-black/60 dark:bg-black/75",style:{animation:"bui-fade-in 180ms ease-out both"},onClick:()=>u(false)}),jsxs("div",{className:"relative flex max-h-full flex-col overflow-hidden rounded-[16px] bg-surface p-2 pt-0 shadow-overlay",style:{animation:"bui-pop-in 240ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between gap-3 px-1.5",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[jsx("span",{className:"truncate text-[13px] font-semibold text-ink",children:e}),n&&jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-red-tint py-0.5 pl-1.5 pr-2 text-[11.5px] font-medium tabular-nums text-red",children:[jsx("span",{className:"size-2 rounded-full bg-red",style:{animation:"bui-records-pulse 1.1s ease-in-out infinite"}}),ic(a)]})]}),h]}),jsxs("div",{className:"relative min-h-0 overflow-hidden rounded-[8px] bg-inset [cursor:none]",onMouseMove:f=>{let w=f.currentTarget.getBoundingClientRect();b({x:f.clientX-w.left,y:f.clientY-w.top});},onMouseLeave:()=>b(null),children:[s?jsx("div",{className:$a,style:{width:"min(960px, 90vw)"},children:jsx(Ha,{})}):jsx(cc,{src:t??""}),!s&&m&&jsx(Wa,{className:"pointer-events-none absolute z-10",style:{left:m.x,top:m.y,filter:"drop-shadow(0 1px 1.5px var(--bui-screen-cursor-shadow))"}})]})]})]}),document.body)]})})}r(dc,"BUIAgentScreen");function Ke({children:e,className:t="",highlightClassName:o="inset-x-0 rounded-[8px] bg-hover",rowSelector:n="[data-menu-row]"}){let a=useRef(null),[i,l]=useState(null),[s,c]=useState(false),u=r(g=>{let d=a.current;if(!(g instanceof Element)||!d)return;let m=g.closest(n);if(!(m instanceof HTMLElement)||!d.contains(m))return;let b=d.getBoundingClientRect(),v=m.getBoundingClientRect();l({top:v.top-b.top,height:v.height}),c(true);},"moveTo");return jsx(A,{children:jsxs("div",{ref:a,onMouseOver:g=>u(g.target),onMouseLeave:()=>c(false),onFocusCapture:g=>u(g.target),onBlurCapture:g=>{a.current?.contains(g.relatedTarget)||c(false);},className:`group/glide-menu relative ${t}`,children:[jsx("span",{"aria-hidden":true,className:`pointer-events-none absolute ${o}`,style:{top:i?.top??0,height:i?.height??0,opacity:i&&s?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),e]})})}r(Ke,"BUIGlideMenu");var gc=[],fc={skip:"Skip",continue:"Continue",send:"Send",customPlaceholder:"Something else\u2026",sentMessage:"Answers sent"},bc=400,yr="360ms cubic-bezier(0.22, 1, 0.36, 1)";function hc({value:e}){let t=useRef(e),[o,n]=useState(e),[a,i]=useState(e),[l,s]=useState(false),[c,u]=useState(false),[g,d]=useState("up");useEffect(()=>{if(t.current===e)return;let b=t.current;t.current=e;let v=parseInt(b,10),S=parseInt(e,10);d(Number.isFinite(v)&&Number.isFinite(S)&&S<v?"down":"up"),n(b),i(e),s(true),u(false);let h=0,f=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>u(true));}),w=setTimeout(()=>{s(false),n(e),u(false);},bc);return ()=>{cancelAnimationFrame(f),cancelAnimationFrame(h),clearTimeout(w);}},[e]);let m=l?a:o;return jsx(Fragment,{children:Array.from({length:m.length},(b,v)=>{let S=o[v]??"",h=m[v]??"";return !l||S===h?jsx("span",{children:h},`${v}-${h}`):jsx("span",{style:{display:"inline-block",position:"relative",overflow:"hidden",height:"1em",lineHeight:"1em",verticalAlign:"-0.05em"},children:jsxs("span",{style:{display:"flex",flexDirection:"column",transition:"transform 350ms cubic-bezier(0.4, 0, 0.2, 1)",transform:`translateY(${c?g==="down"?"0":"-1em":g==="down"?"-1em":"0"})`},children:[jsx("span",{style:{height:"1em",lineHeight:"1em"},children:g==="down"?h:S}),jsx("span",{style:{height:"1em",lineHeight:"1em"},children:g==="down"?S:h})]})},`${v}-${S}-${h}-${g}`)})})}r(hc,"RollingDigits");function wr({path:e,size:t=14,sw:o=2}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true,children:e})}r(wr,"Ico");function xc({questions:e=gc,labels:t,onSubmitted:o,onAnswerChange:n,resettable:a=true,allowSkip:i=true,status:l="idle",onReset:s}){let c=q(),u=ye(fc,t),[g,d]=useState(0),[m,b]=useState({}),[v,S]=useState({}),h=l==="submitted",f=useRef(m),w=useRef(v);f.current=m,w.current=v;let[x,C]=useState(true),I=useRef(null),D=useRef([]),P=useRef(false),[E,V]=useState(void 0),[j,B]=useState(0),[y,R]=useState(false),[W,J]=useState(false),G=g===e.length-1,de=(m[g]??[]).length>0||!!v[g]?.trim(),le=r(N=>{let L=D.current[g];if(!L)return;let Y=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;V(L.offsetHeight),B(L.offsetTop),R(N&&!Y);},"sync");useLayoutEffect(()=>{let N=P.current;P.current=true,le(N),J(true);},[g,m,v,x,h]),useEffect(()=>{let N=requestAnimationFrame(()=>le(P.current));return ()=>cancelAnimationFrame(N)},[g]),useEffect(()=>()=>{I.current&&clearTimeout(I.current);},[]);let _=r(N=>{I.current&&clearTimeout(I.current),d(Math.min(Math.max(N,0),e.length-1));},"goTo"),ae=r(()=>{I.current&&clearTimeout(I.current),l!=="submitting"&&o?.(f.current,w.current);},"send"),X=r(()=>{G?ae():_(g+1);},"advance"),me=r(N=>{let L=e[g].type,Y=f.current,K=Y[g]??[],Me=L==="radio"?[N]:K.includes(N)?K.filter(se=>se!==N):[...K,N],oe={...Y,[g]:Me};f.current=oe,b(oe),n?.(g,Me),L==="radio"&&(S(se=>({...se,[g]:""})),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{G?ae():d(se=>Math.min(e.length-1,se+1));},480));},"toggle"),Pe=r(()=>{d(0),b({}),S({}),s?.(),C(true),P.current=false;},"reset");return e.length?x?h?jsx(A,{children:jsxs("div",{className:"flex w-full max-w-80 items-center gap-3",style:{animation:"bui-pop-in 260ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-tint py-1 pr-2.5 pl-1 text-[12.5px] font-medium text-green",children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-full bg-green text-white",children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),u.sentMessage]}),a&&jsx("button",{type:"button",onClick:Pe,className:"text-[12px] font-medium text-ink-3 transition-colors duration-150 hover:text-ink",children:c("Start over")})]})}):jsx(A,{children:jsx("div",{className:"w-full max-w-80",children:jsxs("div",{className:"relative overflow-hidden rounded-card bg-surface shadow-card",style:{animation:"bui-fade-up 380ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("button",{type:"button","aria-label":c("Dismiss"),onClick:()=>C(false),className:"primitive-icon-button absolute right-2.5 top-2.5 z-10 text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(wr,{size:14,sw:2.2,path:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),jsx("div",{className:"primitive-card-pad",children:jsx("div",{className:"overflow-hidden",style:{height:E,transition:y?`height ${yr}`:void 0},"aria-live":"polite",children:jsx("div",{style:{display:"flex",flexDirection:"column",gap:"calc(var(--bui-spacing) * 6.5)",transform:`translate3d(0, ${-j}px, 0)`,transition:y?`transform ${yr}`:void 0,willChange:"transform"},children:e.map((N,L)=>{let Y=L===g;if(!W&&!Y)return null;let K=m[L]??[],Me={opacity:Y?1:0,transition:y?`opacity ${yr}`:void 0,pointerEvents:Y?void 0:"none"};return jsxs("div",{ref:oe=>{D.current[L]=oe;},"aria-hidden":Y?void 0:true,style:Me,children:[jsx("div",{className:"pr-7 text-[14px] font-medium text-ink",children:N.q}),jsxs(Ke,{className:"mt-2.5 flex flex-col gap-1",highlightClassName:"inset-x-0 rounded-control bg-hover",children:[N.options.map((oe,se)=>{let Ie=K.includes(se);return jsxs("button",{type:"button","data-menu-row":true,"aria-pressed":Ie,tabIndex:Y?0:-1,disabled:l==="submitting",onClick:()=>{Y&&me(se);},className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 text-left transition-colors duration-100",children:[jsx("span",{className:`flex size-4 shrink-0 items-center justify-center transition-colors duration-200
41
43
  ${N.type==="radio"?"rounded-full":"rounded-[5px]"}
42
- ${Ie?"bg-ink text-canvas":"shadow-[inset_0_0_0_1.5px_var(--bui-line-strong)] text-transparent"}`,children:N.type==="radio"?jsx("span",{className:"size-1.5 rounded-full bg-canvas transition-transform duration-200",style:{transform:Ie?"scale(1)":"scale(0)"}}):jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),jsx("span",{className:`text-[13px] leading-none transition-colors duration-200 ${Ie?"text-ink":"text-ink-2"}`,children:oe})]},oe)}),N.allowCustom!==false&&jsx("label",{"data-menu-row":true,className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 transition-colors duration-100",children:jsx("input",{type:N.customInputType??"text",disabled:l==="submitting",value:v[L]??"",tabIndex:Y?0:-1,onChange:oe=>{Y&&(S(se=>({...se,[L]:oe.target.value})),N.type==="radio"&&b(se=>({...se,[L]:[]})));},onKeyDown:oe=>{oe.key==="Enter"&&!oe.nativeEvent.isComposing&&oe.keyCode!==229&&de&&(oe.preventDefault(),K());},placeholder:u.customPlaceholder,"aria-label":c("Custom answer"),className:"min-w-0 flex-1 bg-transparent pl-1.5 text-[13px] text-ink outline-none placeholder:text-ink-3"})})]})]},L)})})})}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-1 text-ink-3",children:[jsx("button",{type:"button","aria-label":c("Previous question"),disabled:g<=0,onClick:()=>_(g-1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(fr,{size:14,path:jsx("path",{d:"M18 15l-6-6-6 6"})})}),jsx("span",{className:"inline-flex items-center text-[12px] font-medium tabular-nums text-ink-3",style:{letterSpacing:"-0.1px",lineHeight:1},children:jsx(ql,{value:`${g+1} / ${e.length}`})}),jsx("button",{type:"button","aria-label":c("Next question"),disabled:G,onClick:()=>_(g+1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(fr,{size:14,path:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsxs("div",{className:"-mr-0.5 flex items-center gap-1.5",children:[i&&jsx(Ce,{variant:"ghost",size:"sm",disabled:l==="submitting",onClick:()=>G?C(false):_(g+1),children:u.skip}),jsx(Ce,{variant:"accent",size:"sm",disabled:!de||l==="submitting",onClick:K,children:G?u.send:u.continue})]})]})]})})}):jsx(A,{children:jsx("button",{type:"button",onClick:()=>C(true),className:"rounded-control bg-surface px-3 py-2 text-[12.5px] font-medium text-ink shadow-btn transition-colors duration-150 hover:bg-hover",children:c("Open approval")})}):null}r(Xl,"BUIApprovalCard");var hr=r(e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4),"srgbToLinear"),xr=r(e=>e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055,"linearToSrgb"),Yl=r((e,t,o)=>{let n=.4122214708*e+.5363325363*t+.0514459929*o,a=.2119034982*e+.6806995451*t+.1073969566*o,i=.0883024619*e+.2817188376*t+.6299787005*o,l=Math.cbrt(n),s=Math.cbrt(a),c=Math.cbrt(i);return [.2104542553*l+.793617785*s-.0040720468*c,1.9779984951*l-2.428592205*s+.4505937099*c,.0259040371*l+.7827717662*s-.808675766*c]},"linearRgbToOklab"),Ql=r((e,t,o)=>{let n=e+.3963377774*t+.2158037573*o,a=e-.1055613458*t-.0638541728*o,i=e-.0894841775*t-1.291485548*o,l=n*n*n,s=a*a*a,c=i*i*i;return [4.0767416621*l-3.3077115913*s+.2309699292*c,-1.2684380046*l+2.6097574011*s-.3413193965*c,-0.0041960863*l-.7034186147*s+1.707614701*c]},"oklabToLinearRgb"),cn=r(e=>{let[t,o,n]=Yl(hr(e[0]),hr(e[1]),hr(e[2]));return {L:t,C:Math.sqrt(o*o+n*n),H:Math.atan2(n,o)}},"rgbToOklch"),za=r(({L:e,C:t,H:o})=>{let n=t*Math.cos(o),a=t*Math.sin(o),[i,l,s]=Ql(e,n,a),c=r(u=>Math.max(0,Math.min(1,u)),"clamp01");return [c(xr(i)),c(xr(l)),c(xr(s))]},"oklchToRgb"),ro=r(e=>{let t=parseInt(e.replace("#",""),16);return [(t>>16&255)/255,(t>>8&255)/255,(t&255)/255]},"hexToRgb"),Zl=r((e,t,o)=>{let n=t-e;return n>Math.PI&&(n-=2*Math.PI),n<-Math.PI&&(n+=2*Math.PI),e+n*o},"lerpHueShortest"),Jl=r((e,t,o)=>{let a=e.C<1e-4?t.H:e.H,i=t.C<1e-4?e.H:t.H;return {L:e.L+(t.L-e.L)*o,C:e.C+(t.C-e.C)*o,H:Zl(a,i,o)}},"lerpOklch");function Oa(e,t){if(e.length===0)return [];if(e.length===1){let a=za(e[0]);return Array.from({length:t},()=>a)}let o=[],n=e.length;for(let a=0;a<t;a++){let l=a/(t-1)*(n-1),s=Math.min(n-2,Math.floor(l)),c=l-s;o.push(za(Jl(e[s],e[s+1],c)));}return o}r(Oa,"sampleChainRgb");var vt={red:"#FF3D7F",orange:"#FF7A1A",yellow:"#FFD600",green:"#C2FF3D",mint:"#00FFA8",teal:"#00E5D6",cyan:"#1FC8FF",blue:"#2E70FF",indigo:"#7B4FFF",purple:"#D33CFF",pink:"#FF3DC0",brown:"#D8A87B"};Object.fromEntries(Object.entries(vt).map(([e,t])=>[e,cn(ro(t))]));function ec(e,t){let o=r(i=>i[0][0]*(i[1][1]*i[2][2]-i[1][2]*i[2][1])-i[0][1]*(i[1][0]*i[2][2]-i[1][2]*i[2][0])+i[0][2]*(i[1][0]*i[2][1]-i[1][1]*i[2][0]),"det"),n=o(e);if(Math.abs(n)<1e-9)return null;let a=r(i=>e.map((l,s)=>l.map((c,u)=>u===i?t[s]:c)),"col");return [o(a(0))/n,o(a(1))/n,o(a(2))/n]}r(ec,"solve3x3");function $a(e){let t=e.length,o=.5,n=e.map((h,f)=>f/(t-1)),a=n.map(h=>Math.cos(2*Math.PI*o*h)),i=n.map(h=>Math.sin(2*Math.PI*o*h)),l=a.reduce((h,f)=>h+f,0),s=i.reduce((h,f)=>h+f,0),c=a.reduce((h,f)=>h+f*f,0),u=i.reduce((h,f)=>h+f*f,0),g=a.reduce((h,f,w)=>h+f*i[w],0),d=[[t,l,s],[l,c,g],[s,g,u]],m=r(h=>{let f=e.map(B=>B[h]),w=f.reduce((B,y)=>B+y,0),x=f.reduce((B,y,R)=>B+y*a[R],0),C=f.reduce((B,y,R)=>B+y*i[R],0),I=ec(d,[w,x,C]);if(!I)return {a:w/t,b:0,d:0};let[D,P,E]=I,V=Math.sqrt(P*P+E*E),j=(Math.atan2(-E,P)/(2*Math.PI)+1)%1;return {a:D,b:V,d:j}},"fitChannel"),b=m(0),v=m(1),S=m(2);return {a:[b.a,v.a,S.a],b:[b.b,v.b,S.b],c:[o,o,o],d:[b.d,v.d,S.d]}}r($a,"fitCosinePaletteToSamples");var tc=r((e,t)=>{let o=Oa([cn(ro(e)),cn(ro(t))],17);return o[0]=ro(e),o[o.length-1]=ro(t),$a(o)},"accentPair");function Wt(e){if(e.length===0)return tc(vt.indigo,vt.cyan);if(e.length===1)return {a:ro(e[0]),b:[0,0,0],c:[1,1,1],d:[0,0,0]};let t=e.map(n=>cn(ro(n))),o=Oa(t,17);return $a(o)}r(Wt,"accentChain");var _a={prism:Wt(["#00C0E8","#6155F5","#CB30E0"]),berry:Wt(["#FF2D55","#CB30E0"]),lagoon:Wt(["#0088FF","#00C0E8","#34C759"]),citrus:Wt(["#34C759","#FFCC00","#FF8D28"]),azure:Wt(["#00C0E8","#0088FF","#6155F5"]),ember:Wt(["#FFCC00","#FF8D28","#FF2D55"])};function Ha(e){return e?typeof e=="string"?_a[e]:e:_a.prism}r(Ha,"resolvePalette");var oc=`
44
+ ${Ie?"bg-ink text-canvas":"shadow-[inset_0_0_0_1.5px_var(--bui-line-strong)] text-transparent"}`,children:N.type==="radio"?jsx("span",{className:"size-1.5 rounded-full bg-canvas transition-transform duration-200",style:{transform:Ie?"scale(1)":"scale(0)"}}):jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),jsx("span",{className:`text-[13px] leading-none transition-colors duration-200 ${Ie?"text-ink":"text-ink-2"}`,children:oe})]},oe)}),N.allowCustom!==false&&jsx("label",{"data-menu-row":true,className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 transition-colors duration-100",children:jsx("input",{type:N.customInputType??"text",disabled:l==="submitting",value:v[L]??"",tabIndex:Y?0:-1,onChange:oe=>{Y&&(S(se=>({...se,[L]:oe.target.value})),N.type==="radio"&&b(se=>({...se,[L]:[]})));},onKeyDown:oe=>{oe.key==="Enter"&&!oe.nativeEvent.isComposing&&oe.keyCode!==229&&de&&(oe.preventDefault(),X());},placeholder:u.customPlaceholder,"aria-label":c("Custom answer"),className:"min-w-0 flex-1 bg-transparent pl-1.5 text-[13px] text-ink outline-none placeholder:text-ink-3"})})]})]},L)})})})}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-1 text-ink-3",children:[jsx("button",{type:"button","aria-label":c("Previous question"),disabled:g<=0,onClick:()=>_(g-1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(wr,{size:14,path:jsx("path",{d:"M18 15l-6-6-6 6"})})}),jsx("span",{className:"inline-flex items-center text-[12px] font-medium tabular-nums text-ink-3",style:{letterSpacing:"-0.1px",lineHeight:1},children:jsx(hc,{value:`${g+1} / ${e.length}`})}),jsx("button",{type:"button","aria-label":c("Next question"),disabled:G,onClick:()=>_(g+1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(wr,{size:14,path:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsxs("div",{className:"-mr-0.5 flex items-center gap-1.5",children:[i&&jsx(Ce,{variant:"ghost",size:"sm",disabled:l==="submitting",onClick:()=>G?C(false):_(g+1),children:u.skip}),jsx(Ce,{variant:"accent",size:"sm",disabled:!de||l==="submitting",onClick:X,children:G?u.send:u.continue})]})]})]})})}):jsx(A,{children:jsx("button",{type:"button",onClick:()=>C(true),className:"rounded-control bg-surface px-3 py-2 text-[12.5px] font-medium text-ink shadow-btn transition-colors duration-150 hover:bg-hover",children:c("Open approval")})}):null}r(xc,"BUIApprovalCard");var Sr=r(e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4),"srgbToLinear"),Cr=r(e=>e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055,"linearToSrgb"),yc=r((e,t,o)=>{let n=.4122214708*e+.5363325363*t+.0514459929*o,a=.2119034982*e+.6806995451*t+.1073969566*o,i=.0883024619*e+.2817188376*t+.6299787005*o,l=Math.cbrt(n),s=Math.cbrt(a),c=Math.cbrt(i);return [.2104542553*l+.793617785*s-.0040720468*c,1.9779984951*l-2.428592205*s+.4505937099*c,.0259040371*l+.7827717662*s-.808675766*c]},"linearRgbToOklab"),wc=r((e,t,o)=>{let n=e+.3963377774*t+.2158037573*o,a=e-.1055613458*t-.0638541728*o,i=e-.0894841775*t-1.291485548*o,l=n*n*n,s=a*a*a,c=i*i*i;return [4.0767416621*l-3.3077115913*s+.2309699292*c,-1.2684380046*l+2.6097574011*s-.3413193965*c,-0.0041960863*l-.7034186147*s+1.707614701*c]},"oklabToLinearRgb"),gn=r(e=>{let[t,o,n]=yc(Sr(e[0]),Sr(e[1]),Sr(e[2]));return {L:t,C:Math.sqrt(o*o+n*n),H:Math.atan2(n,o)}},"rgbToOklch"),Ga=r(({L:e,C:t,H:o})=>{let n=t*Math.cos(o),a=t*Math.sin(o),[i,l,s]=wc(e,n,a),c=r(u=>Math.max(0,Math.min(1,u)),"clamp01");return [c(Cr(i)),c(Cr(l)),c(Cr(s))]},"oklchToRgb"),lo=r(e=>{let t=parseInt(e.replace("#",""),16);return [(t>>16&255)/255,(t>>8&255)/255,(t&255)/255]},"hexToRgb"),kc=r((e,t,o)=>{let n=t-e;return n>Math.PI&&(n-=2*Math.PI),n<-Math.PI&&(n+=2*Math.PI),e+n*o},"lerpHueShortest"),Sc=r((e,t,o)=>{let a=e.C<1e-4?t.H:e.H,i=t.C<1e-4?e.H:t.H;return {L:e.L+(t.L-e.L)*o,C:e.C+(t.C-e.C)*o,H:kc(a,i,o)}},"lerpOklch");function Xa(e,t){if(e.length===0)return [];if(e.length===1){let a=Ga(e[0]);return Array.from({length:t},()=>a)}let o=[],n=e.length;for(let a=0;a<t;a++){let l=a/(t-1)*(n-1),s=Math.min(n-2,Math.floor(l)),c=l-s;o.push(Ga(Sc(e[s],e[s+1],c)));}return o}r(Xa,"sampleChainRgb");var wt={red:"#FF3D7F",orange:"#FF7A1A",yellow:"#FFD600",green:"#C2FF3D",mint:"#00FFA8",teal:"#00E5D6",cyan:"#1FC8FF",blue:"#2E70FF",indigo:"#7B4FFF",purple:"#D33CFF",pink:"#FF3DC0",brown:"#D8A87B"};Object.fromEntries(Object.entries(wt).map(([e,t])=>[e,gn(lo(t))]));function Cc(e,t){let o=r(i=>i[0][0]*(i[1][1]*i[2][2]-i[1][2]*i[2][1])-i[0][1]*(i[1][0]*i[2][2]-i[1][2]*i[2][0])+i[0][2]*(i[1][0]*i[2][1]-i[1][1]*i[2][0]),"det"),n=o(e);if(Math.abs(n)<1e-9)return null;let a=r(i=>e.map((l,s)=>l.map((c,u)=>u===i?t[s]:c)),"col");return [o(a(0))/n,o(a(1))/n,o(a(2))/n]}r(Cc,"solve3x3");function Ya(e){let t=e.length,o=.5,n=e.map((h,f)=>f/(t-1)),a=n.map(h=>Math.cos(2*Math.PI*o*h)),i=n.map(h=>Math.sin(2*Math.PI*o*h)),l=a.reduce((h,f)=>h+f,0),s=i.reduce((h,f)=>h+f,0),c=a.reduce((h,f)=>h+f*f,0),u=i.reduce((h,f)=>h+f*f,0),g=a.reduce((h,f,w)=>h+f*i[w],0),d=[[t,l,s],[l,c,g],[s,g,u]],m=r(h=>{let f=e.map(B=>B[h]),w=f.reduce((B,y)=>B+y,0),x=f.reduce((B,y,R)=>B+y*a[R],0),C=f.reduce((B,y,R)=>B+y*i[R],0),I=Cc(d,[w,x,C]);if(!I)return {a:w/t,b:0,d:0};let[D,P,E]=I,V=Math.sqrt(P*P+E*E),j=(Math.atan2(-E,P)/(2*Math.PI)+1)%1;return {a:D,b:V,d:j}},"fitChannel"),b=m(0),v=m(1),S=m(2);return {a:[b.a,v.a,S.a],b:[b.b,v.b,S.b],c:[o,o,o],d:[b.d,v.d,S.d]}}r(Ya,"fitCosinePaletteToSamples");var Tc=r((e,t)=>{let o=Xa([gn(lo(e)),gn(lo(t))],17);return o[0]=lo(e),o[o.length-1]=lo(t),Ya(o)},"accentPair");function jt(e){if(e.length===0)return Tc(wt.indigo,wt.cyan);if(e.length===1)return {a:lo(e[0]),b:[0,0,0],c:[1,1,1],d:[0,0,0]};let t=e.map(n=>gn(lo(n))),o=Xa(t,17);return Ya(o)}r(jt,"accentChain");var qa={prism:jt(["#00C0E8","#6155F5","#CB30E0"]),berry:jt(["#FF2D55","#CB30E0"]),lagoon:jt(["#0088FF","#00C0E8","#34C759"]),citrus:jt(["#34C759","#FFCC00","#FF8D28"]),azure:jt(["#00C0E8","#0088FF","#6155F5"]),ember:jt(["#FFCC00","#FF8D28","#FF2D55"])};function Qa(e){return e?typeof e=="string"?qa[e]:e:qa.prism}r(Qa,"resolvePalette");var Rc=`
43
45
  attribute vec2 a;
44
46
  void main(){ gl_Position = vec4(a, 0.0, 1.0); }
45
- `,nc=`
47
+ `,Nc=`
46
48
  precision mediump float;
47
49
  uniform vec2 uRes;
48
50
  uniform float uTime;
@@ -169,52 +171,73 @@ void main(){
169
171
 
170
172
  gl_FragColor = vec4(bodyPM + highEmit, min(bodyA + highA, 1.0));
171
173
  }
172
- `,rc=r(e=>{switch(e){case "ltr":return {axis:0,posStart:-0.2,posEnd:1.2};case "rtl":return {axis:0,posStart:1.2,posEnd:-0.2};case "ttb":return {axis:1,posStart:-0.2,posEnd:1.2};case "btt":return {axis:1,posStart:1.2,posEnd:-0.2}}},"dirToUniforms");function Wa(e={}){if(typeof window>"u")return null;let t=e.canvas??document.createElement("canvas"),o=t.getContext("webgl",{alpha:true,antialias:false,premultipliedAlpha:true});if(!o)return null;let n=r((_,ae)=>{let K=o.createShader(_);return K?(o.shaderSource(K,ae),o.compileShader(K),o.getShaderParameter(K,o.COMPILE_STATUS)?K:(console.error("[glimm] shader compile error:",o.getShaderInfoLog(K)),o.deleteShader(K),null)):null},"compile"),a=n(o.VERTEX_SHADER,oc);if(!a)return null;let i=n(o.FRAGMENT_SHADER,nc);if(!i)return o.deleteShader(a),null;let l=o.createProgram();if(!l)return o.deleteShader(a),o.deleteShader(i),null;if(o.attachShader(l,a),o.attachShader(l,i),o.linkProgram(l),!o.getProgramParameter(l,o.LINK_STATUS))return console.error("[glimm] shader link error:",o.getProgramInfoLog(l)),o.deleteProgram(l),o.deleteShader(a),o.deleteShader(i),null;o.useProgram(l);let s=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,s),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),o.STATIC_DRAW);let c=o.getAttribLocation(l,"a");o.enableVertexAttribArray(c),o.vertexAttribPointer(c,2,o.FLOAT,false,0,0);let u=r(_=>o.getUniformLocation(l,_),"u"),g=u("uRes"),d=u("uTime"),m=u("uProgress"),b=u("uAlpha"),v=u("uBandTight"),S=u("uPosStart"),h=u("uPosEnd"),f=u("uHueShift"),w=u("uDirection"),x=u("uWaveAmount"),C=u("uRippleAmount"),I=u("uWaveSpeed"),D=u("uBrightness"),P=u("uSwellAmount"),E=u("uPalA"),V=u("uPalB"),j=u("uPalC"),B=u("uPalD");o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA);let y=r((_,ae,K)=>Math.max(ae,Math.min(K,_)),"clamp"),R={progress:0,alpha:0,palette:e.palette??Ha(void 0),bandTight:y(e.bandTight??14,.1,200),direction:e.direction??"ltr",waveAmount:y(e.waveAmount??0,0,2),rippleAmount:y(e.rippleAmount??1,0,2),waveSpeed:y(e.waveSpeed??1,0,3),brightness:y(e.brightness??1,0,1.5),swellAmount:y(e.swellAmount??.55,0,1)},W=Math.random()*.4,J=r(()=>{let _=Math.min(window.devicePixelRatio||1,2),ae=t.getBoundingClientRect(),K=Math.max(1,Math.round(ae.width*_)),me=Math.max(1,Math.round(ae.height*_));(t.width!==K||t.height!==me)&&(t.width=K,t.height=me,o.viewport(0,0,K,me));},"resize");J();let G=new ResizeObserver(J);G.observe(t);let Z=performance.now(),de=0,le=r(()=>{let _=(performance.now()-Z)/1e3,ae=rc(R.direction);o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.uniform2f(g,t.width,t.height),o.uniform1f(d,_),o.uniform1f(m,R.progress),o.uniform1f(b,R.alpha),o.uniform1f(v,R.bandTight),o.uniform1f(S,ae.posStart),o.uniform1f(h,ae.posEnd),o.uniform1f(w,ae.axis),o.uniform1f(x,R.waveAmount),o.uniform1f(C,R.rippleAmount),o.uniform1f(I,R.waveSpeed),o.uniform1f(D,R.brightness),o.uniform1f(P,R.swellAmount),o.uniform1f(f,W),o.uniform3f(E,R.palette.a[0],R.palette.a[1],R.palette.a[2]),o.uniform3f(V,R.palette.b[0],R.palette.b[1],R.palette.b[2]),o.uniform3f(j,R.palette.c[0],R.palette.c[1],R.palette.c[2]),o.uniform3f(B,R.palette.d[0],R.palette.d[1],R.palette.d[2]),o.drawArrays(o.TRIANGLE_STRIP,0,4),de=requestAnimationFrame(le);},"tick");return de=requestAnimationFrame(le),{canvas:t,setProgress:r(_=>{R.progress=y(_,0,1);},"setProgress"),setAlpha:r(_=>{R.alpha=y(_,0,1.5);},"setAlpha"),setPalette:r(_=>{R.palette=_;},"setPalette"),setBandTight:r(_=>{R.bandTight=y(_,.1,200);},"setBandTight"),setDirection:r(_=>{R.direction=_;},"setDirection"),setWaveAmount:r(_=>{R.waveAmount=y(_,0,2);},"setWaveAmount"),setRippleAmount:r(_=>{R.rippleAmount=y(_,0,2);},"setRippleAmount"),setWaveSpeed:r(_=>{R.waveSpeed=y(_,0,3);},"setWaveSpeed"),setBrightness:r(_=>{R.brightness=y(_,0,1.5);},"setBrightness"),setSwellAmount:r(_=>{R.swellAmount=y(_,0,1);},"setSwellAmount"),getProgress:r(()=>R.progress,"getProgress"),getAlpha:r(()=>R.alpha,"getAlpha"),destroy:r(()=>{cancelAnimationFrame(de),G.disconnect(),o.deleteProgram(l),o.deleteBuffer(s),o.deleteShader(a),o.deleteShader(i);},"destroy")}}r(Wa,"createShader");function vr(e,t,o,n){let a=r(s=>3*(1-s)*(1-s)*s*e+3*(1-s)*s*s*o+s*s*s,"bezX"),i=r(s=>3*(1-s)*(1-s)*s*t+3*(1-s)*s*s*n+s*s*s,"bezY"),l=r(s=>3*(1-4*s+3*s*s)*e+3*(2*s-3*s*s)*o+3*s*s,"bezXd");return s=>{if(s<=0)return 0;if(s>=1)return 1;let c=s;for(let u=0;u<8;u++){let g=a(c)-s;if(Math.abs(g)<1e-6)break;let d=l(c);if(Math.abs(d)<1e-6)break;c-=g/d;}return i(c)}}r(vr,"cubicBezier");var Fa={linear:r(e=>e,"linear"),easeOutQuart:r(e=>1-Math.pow(1-e,4),"easeOutQuart"),easeOutCubic:r(e=>1-Math.pow(1-e,3),"easeOutCubic"),easeInCubic:r(e=>e*e*e,"easeInCubic"),easeInOutCubic:r(e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,"easeInOutCubic"),easeOutExpo:r(e=>e===1?1:1-Math.pow(2,-10*e),"easeOutExpo"),easeInOutQuint:r(e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,"easeInOutQuint"),snap:vr(1,0,.35,.95),ease:vr(.25,.1,.25,1),back:vr(.175,.885,.32,1.1)},ac=r(e=>e?typeof e=="function"?e:Fa[e]:Fa.easeOutQuart,"resolveEasing"),ic=r(e=>1-Math.pow(1-e,4),"easeOutQuart"),sc=r(e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,"easeInOutCubic");function Va(e,t={}){let o=t.sweepMs??1100,n=t.outroMs??700,a=Math.max(0,Math.min(1,t.midpoint??.56)),i=ac(t.easing??"ease")??ic,l=Math.max(0,Math.min(1.5,t.peakAlpha??1));t.palette&&e.setPalette(Ha(t.palette)),t.bandTight!==void 0&&e.setBandTight(t.bandTight),t.direction&&e.setDirection(t.direction),t.waveAmount!==void 0&&e.setWaveAmount(t.waveAmount),t.rippleAmount!==void 0&&e.setRippleAmount(t.rippleAmount),t.waveSpeed!==void 0&&e.setWaveSpeed(t.waveSpeed),t.brightness!==void 0&&e.setBrightness(t.brightness),t.swellAmount!==void 0&&e.setSwellAmount(t.swellAmount);let s=false,c=0,u,g,d=new Promise(b=>{u=b;}),m=new Promise(b=>{g=b;});return (async()=>{let b=e.getProgress(),v=b>=.999?0:Math.max(0,Math.min(1,b));e.setAlpha(l),e.setProgress(v);let S=1-v,h=Math.max(80,o*S),f=false,w=Promise.resolve(),x=r(()=>{f=true,w=Promise.resolve().then(()=>t.onMidpoint?.()).then(()=>{}),w.then(u,I=>{console.error("[glimm] midpoint callback failed:",I),u();});},"fireMidpoint"),C=performance.now();await new Promise(I=>{let D=r(()=>{if(s){I();return}let P=Math.min(1,(performance.now()-C)/h),E=i(P),V=v+S*E;e.setProgress(V),!f&&V>=a&&x(),P<1?c=requestAnimationFrame(D):I();},"tick");c=requestAnimationFrame(D);}),!s&&(f||x(),await w.catch(()=>{}),!s&&(await lc(n,l,0,sc,e.setAlpha,()=>s,I=>{c=I;}),!s&&(e.setProgress(0),t.onComplete?.(),g())));})(),{midpoint:d,done:m,cancel:r(()=>{s=true,cancelAnimationFrame(c),u(),g();},"cancel")}}r(Va,"playSweep");function lc(e,t,o,n,a,i,l){return new Promise(s=>{let c=performance.now(),u=r(()=>{if(i()){s();return}let g=Math.min(1,(performance.now()-c)/e);a(t+(o-t)*n(g)),g<1?l(requestAnimationFrame(u)):s();},"tick");l(requestAnimationFrame(u));})}r(lc,"runRamp");var ja=Wt([vt.red,vt.orange,vt.yellow,vt.green,vt.cyan,vt.blue,vt.purple]);function Vt({children:e,size:t=15,strokeWidth:o=1.8}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e})}r(Vt,"Icon");var cc={clip:jsx("path",{d:"m21.4 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"}),chart:jsx("path",{d:"M4 20V10M10 20V4M16 20v-7M22 20H2"}),layers:jsxs("g",{children:[jsx("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),jsx("path",{d:"M2 17l10 5 10-5M2 12l10 5 10-5"})]}),globe:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})},dc={figma:jsxs("svg",{width:"11",height:"16",viewBox:"0 0 38 57","aria-hidden":"true",children:[jsx("path",{d:"M9.5 57A9.5 9.5 0 0 0 19 47.5V38H9.5a9.5 9.5 0 0 0 0 19z",fill:"var(--bui-brand-figma-green)"}),jsx("path",{d:"M0 28.5A9.5 9.5 0 0 1 9.5 19H19v19H9.5A9.5 9.5 0 0 1 0 28.5z",fill:"var(--bui-brand-figma-purple)"}),jsx("path",{d:"M0 9.5A9.5 9.5 0 0 1 9.5 0H19v19H9.5A9.5 9.5 0 0 1 0 9.5z",fill:"var(--bui-brand-figma-red)"}),jsx("path",{d:"M19 0h9.5a9.5 9.5 0 1 1 0 19H19V0z",fill:"var(--bui-brand-figma-orange)"}),jsx("path",{d:"M38 28.5a9.5 9.5 0 1 1-19 0 9.5 9.5 0 0 1 19 0z",fill:"var(--bui-brand-figma-blue)"})]}),slack:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 127 127","aria-hidden":"true",children:[jsx("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"var(--bui-brand-slack-red)"}),jsx("path",{d:"M47 27.2c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.7 39.7.8 47 .8c7.3 0 13.2 5.9 13.2 13.2v13.2H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.3.7 54.4.7 47.1c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"var(--bui-brand-slack-blue)"}),jsx("path",{d:"M99.9 47.1c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V47.1zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.9C66.9 6.6 72.8.7 80.1.7c7.3 0 13.2 5.9 13.2 13.2v33.2z",fill:"var(--bui-brand-slack-green)"}),jsx("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"var(--bui-brand-slack-yellow)"})]}),gmail:jsxs("svg",{width:"15",height:"12",viewBox:"0 0 256 193","aria-hidden":"true",children:[jsx("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"var(--bui-brand-gmail-blue)"}),jsx("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-27.026 25.798v98.91Z",fill:"var(--bui-brand-gmail-green)"}),jsx("path",{d:"m58.182 93.14-4.174-38.647 4.174-36.989L128 69.868l69.818-52.364 4.669 34.992-4.669 40.644L128 145.504 58.182 93.14Z",fill:"var(--bui-brand-gmail-red)"}),jsx("path",{d:"M197.818 17.504V93.14L256 49.504V26.231c0-21.585-24.64-33.89-41.89-20.945l-16.292 12.218Z",fill:"var(--bui-brand-gmail-yellow)"}),jsx("path",{d:"m0 49.504 26.759 20.07L58.182 93.14V17.504L41.89 5.286C24.61-7.66 0 4.646 0 26.23v23.273Z",fill:"var(--bui-brand-gmail-fold)"})]})};function uc(e){let t=/(^|\s)([@/])([\w-]*)$/.exec(e);return t?{kind:t[2]==="@"?"at":"slash",query:t[3].toLowerCase(),start:t.index+t[1].length}:null}r(uc,"parseToken");function yr({variant:e="Rounded",sources:t=[],commands:o=[],models:n=[],files:a=[],connected:i=false,listening:l=false,onAttach:s,onConnect:c,onDictation:u,onModelChange:g,onRemoveAttachment:d,tall:m=false,minRows:b=1,showDictation:v=false,placeholder:S,onSend:h,onSubmit:f,value:w,onValueChange:x,disabled:C=false,busy:I=false,onStop:D,inputLabel:P}){let E=q(),V=e==="Pill",[j,B]=useState(""),y=w??j,R=r(M=>{B(M),x?.(M);},"setDraft"),W=useRef(y);W.current=y;let J=useRef(false),G=useRef(true),[Z,de]=useState(false);useEffect(()=>(G.current=true,()=>{G.current=false;}),[]);let le=t.length>0,_=n.length>0,ae=le||!!s,[K,me]=useState(false),[Pe,N]=useState(false),[L,Y]=useState(false),[X,Me]=useState(n[0]??{key:"",name:E("Model")}),[oe,se]=useState(0),[Ie,H]=useState(false),ue=Math.max(1,Math.min(5,Math.trunc(b)||1)),Ve=Ie||m||ue>1,[Et,bo]=useState(null),[ho,bt]=useState(false),[Rt,Nt]=useState(null),[z,qe]=useState(null),[Ot,Jn]=useState(0),[xo,$t]=useState(0),to=useRef(null),en=useRef(null),oo=useRef(null),Re=useRef(null),Pt=useRef(null),zo=useRef([]),k=useRef([]),O=useRef(null),Ae=useRef(null),pt=useRef(false),Fe=K?null:uc(y),ht=C||Z?null:Pe||Fe?.kind==="at"&&le?"at":Fe?.kind==="slash"&&o.length?"slash":null,no=Pe?"":Fe?.query??"",xt=ht==="at"?t.filter(M=>M.name.toLowerCase().includes(no)):ht==="slash"?o.filter(M=>M.name.slice(1).startsWith(no)):[];useEffect(()=>{se(0),bt(false);},[ht,no]),useLayoutEffect(()=>{let M=zo.current[oe];M&&bo({top:M.offsetTop,height:M.offsetHeight});},[ht,no,oe,i,xt.length]);let Ht=n.findIndex(M=>M.key===X.key);useLayoutEffect(()=>{if(!L)return;let M=k.current[z??Ht];M&&Nt({top:M.offsetTop,height:M.offsetHeight});},[L,z,Ht]),useLayoutEffect(()=>{if(!L||!to.current||!Pt.current)return;let M=to.current.getBoundingClientRect(),fe=Pt.current.getBoundingClientRect();Jn(Math.max(0,Math.min(fe.left-M.left,M.width-176))),$t(M.bottom-fe.top+8);},[L,Ve,X.name]),useEffect(()=>{L||qe(null);},[L]);let tn=r(()=>{let M=O.current;if(!M)return null;try{return Wa({canvas:M,palette:ja,direction:"ltr",bandTight:10,swellAmount:.85})}catch{return null}},"makeShader");useEffect(()=>{if(n.some(M=>M.accent))return Ae.current=tn(),()=>{Ae.current?.destroy(),Ae.current=null;}},[]);let er=r(()=>{if(pt.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;Ae.current?.destroy();let M=tn();if(Ae.current=M,!M)return;pt.current=true,Va(M,{palette:ja,direction:"ltr",sweepMs:570,outroMs:80,peakAlpha:1.3,bandTight:10,brightness:1.4,swellAmount:1,waveSpeed:1.8,easing:"easeOutExpo"}).done.finally(()=>{pt.current=false;});},"celebrate"),tr=r(M=>{Me(M),Y(false),g?.(M.key),M.accent&&er();},"selectModel");useLayoutEffect(()=>{let M=oo.current,fe=en.current,et=Re.current;if(!M||!fe||!et)return;let Mt=r(()=>{let da=Array.from(fe.children).filter(or=>or.tagName==="BUTTON"),Gs=parseFloat(getComputedStyle(fe).columnGap)||0,qs=fe.clientWidth-da.reduce((or,Xs)=>or+Xs.offsetWidth,0)-da.length*Gs,_o=getComputedStyle(M),ua=(parseFloat(_o.paddingTop)||0)+(parseFloat(_o.paddingBottom)||0);H(y.includes(`
173
- `)||et.offsetWidth+8>qs);let pa=Math.max(parseFloat(_o.minHeight)||28,(parseFloat(_o.lineHeight)||18)*ue+ua),ma=Math.max(pa,(parseFloat(_o.lineHeight)||18)*5+ua);M.style.height="0px";let ga=M.scrollHeight;M.style.height=`${Math.min(Math.max(ga,pa),ma)}px`,M.style.overflowY=ga>ma?"auto":"hidden";},"resize");Mt();let la=fe.clientWidth,ca=new ResizeObserver(()=>{la!==fe.clientWidth&&(la=fe.clientWidth,Mt());});return ca.observe(fe),()=>ca.disconnect()},[y,Ie,m,ue,ae,_,u,v]),useEffect(()=>{if(!L&&!Pe)return;let M=r(fe=>{fe.target.closest("[data-promptbar]")||(Y(false),N(false));},"close");return document.addEventListener("pointerdown",M),()=>document.removeEventListener("pointerdown",M)},[L,Pe]);let aa=r(()=>{N(false),Y(false);},"closeMenus"),ia=r(M=>{t.find(et=>et.key===M.key)?.attach?(s?.(),Fe&&R(y.slice(0,Fe.start))):R(ht==="at"?`${Fe?y.slice(0,Fe.start):y}@${M.name} `:`${Fe?y.slice(0,Fe.start):y}${M.name} `),N(false),me(false),oo.current?.focus();},"pick"),on=(y.trim().length>0||a.length>0)&&!!(f||h)&&!I&&!C&&!Z,sa=r(async()=>{if(!on||J.current)return;let M=y;J.current=true,de(true),aa();try{let fe=f?await f(M.trim()):void 0;fe!==!1&&await h?.(M.trim()),fe!==!1&&G.current&&W.current===M&&R("");}catch{}finally{J.current=false,G.current&&de(false);}},"send");return jsx(A,{children:jsx("div",{"data-promptbar":true,className:"w-full",children:jsxs("div",{ref:to,className:"relative",children:[ht&&jsxs("div",{onMouseLeave:()=>bt(false),className:"absolute inset-x-0 bottom-full z-10 mb-2 rounded-[10px] bg-surface p-1 shadow-raised",style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom center"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:Et?.top??0,height:Et?.height??0,opacity:Et&&ho&&xt.length>0?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),xt.map((M,fe)=>{let et=ht==="at"?t.find(Mt=>Mt.key===M.key):void 0;return jsxs("button",{type:"button",ref:Mt=>{zo.current[fe]=Mt;},onMouseDown:Mt=>Mt.preventDefault(),onMouseEnter:()=>{se(fe),bt(true);},onClick:()=>ia(M),className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[et&&jsx("span",{className:"flex size-5.5 shrink-0 items-center justify-center text-ink-2",children:et.brand?dc[et.brand]:jsx(Vt,{size:15,children:cc[et.glyph??"clip"]})}),jsx("span",{className:"shrink-0 text-[12.5px] font-medium text-ink",children:M.name}),jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] text-ink-3",children:M.desc}),et?.connect&&jsx("span",{role:"button",tabIndex:-1,onClick:Mt=>{Mt.stopPropagation(),c?.(et?.key??"");},className:`shrink-0 text-[12px] font-medium transition-colors duration-100 ${i?"text-green":"text-accent-ink hover:underline"}`,children:E(i?"Connected":"Connect")})]},M.key)}),xt.length===0&&jsx("div",{className:"flex h-9 items-center px-2 text-[12px] text-ink-3",children:E("noMatches",{query:no})}),jsx("div",{className:"mt-1 border-t border-line px-2 pt-1.5 pb-1 text-[11px] text-ink-3",children:E(ht==="at"?"Type to search sources & files":"Type to search commands")})]}),L&&jsxs("div",{onMouseLeave:()=>qe(null),className:"absolute z-10 w-44 rounded-[10px] bg-surface p-1 shadow-raised",style:{left:Ot,bottom:xo,animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom left"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:Rt?.top??0,height:Rt?.height??0,opacity:Rt&&z!==null?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),n.map((M,fe)=>jsxs("button",{type:"button",ref:et=>{k.current[fe]=et;},onMouseDown:et=>et.preventDefault(),onMouseEnter:()=>qe(fe),onClick:()=>{tr(M),oo.current?.focus();},className:"relative z-10 flex h-7.5 w-full items-center gap-2 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-ink",children:M.name}),jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:M.tag}),jsx("span",{className:`shrink-0 text-ink ${M.key===X.key?"":"invisible"}`,children:jsx(Vt,{size:13,strokeWidth:2.5,children:jsx("path",{d:"M20 6L9 17l-5-5"})})})]},M.key))]}),jsxs("div",{style:{padding:`var(--bui-token-composer-padding, ${m?"calc(var(--bui-spacing) * 3.5)":"calc(var(--bui-spacing) * 1.5)"})`,borderRadius:`var(--bui-token-radius-control, ${V?a.length>0||Ve?"24px":"9999px":m?"22px":"14px"})`},className:`promptbar-surface relative isolate flex flex-col overflow-hidden border border-line bg-surface shadow-card transition-[border-color,border-radius] duration-150 focus-within:border-line-strong ${m?"gap-2.5 p-3.5":"gap-1.5 p-1.5"} ${V?a.length>0||Ve?"rounded-[24px]":"rounded-full":m?"rounded-[22px]":"rounded-[14px]"}`,children:[jsx("canvas",{ref:O,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 -z-10 h-full w-full",style:{borderRadius:"inherit"}}),jsx("span",{ref:Re,"aria-hidden":"true",className:"promptbar-measure pointer-events-none absolute invisible whitespace-pre text-[13px] leading-[18px]",children:y}),a.length>0&&jsx("div",{className:`flex flex-wrap gap-1.5 pt-0.5 ${V?"px-1":"px-0.5"}`,children:a.map((M,fe)=>jsxs("span",{className:`flex h-6.5 items-center gap-1.5 bg-field py-1 pr-1 pl-1.5 text-[11.5px] text-ink-2 shadow-hairline ${V?"rounded-full":"rounded-chip"}`,style:{animation:"bui-pop-in 200ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx(Vt,{size:12,children:jsxs("g",{children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]})}),jsx("span",{className:"max-w-36 truncate",children:M}),jsx("button",{type:"button","aria-label":`Remove ${M}`,onClick:()=>d?.(fe),className:`-my-1 flex size-6 items-center justify-center text-ink-3 transition-colors duration-100 hover:bg-line/70 hover:text-ink ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-scale-5)]"}`,children:jsx(Vt,{size:10,strokeWidth:2.5,children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]},`${M}-${fe}`))}),jsxs("div",{ref:en,className:"promptbar-controls flex flex-wrap items-end gap-x-1 gap-y-1.5",children:[ae&&jsx("button",{type:"button","aria-label":E("Add attachments and sources"),"aria-expanded":le?Pe:void 0,disabled:C||Z,onClick:()=>{Y(false),le?N(M=>!M):s?.(),oo.current?.focus();},className:`flex size-7 shrink-0 items-center justify-center justify-self-start text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover hover:text-ink active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} ${Pe?"bg-hover text-ink":""} `,children:jsx(Vt,{size:16,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),jsx("textarea",{ref:oo,style:{minHeight:`var(--bui-token-composer-control-height, ${m?"68px":"calc(var(--bui-spacing) * 7)"})`},rows:ue,value:y,disabled:C||Z,onChange:M=>{R(M.target.value),me(false),N(false);},onKeyDown:M=>{if(!(M.nativeEvent.isComposing||M.keyCode===229)){if(ht&&xt.length>0){if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault(),bt(true),se(fe=>(fe+(M.key==="ArrowDown"?1:xt.length-1))%xt.length);return}if(M.key==="Enter"&&!M.shiftKey||M.key==="Tab"){M.preventDefault(),ia(xt[oe]);return}}if(M.key==="Escape"){me(true),aa();return}M.key==="Enter"&&!M.shiftKey&&!M.nativeEvent.isComposing&&(M.preventDefault(),sa());}},placeholder:l?E("Listening\u2026"):S??E("Write a message\u2026"),"aria-label":P??E("Prompt"),className:`promptbar-input ${m?"min-h-[68px] px-2 py-2 text-[14px] leading-5":"min-h-7 px-1 py-[5px] text-[13px] leading-[18px]"} min-w-0 w-full resize-none bg-transparent text-ink outline-none [overflow-wrap:anywhere] placeholder:text-ink-3 ${Ve?"order-first basis-full":"flex-1"}`}),_&&jsxs("button",{disabled:C||Z,ref:Pt,type:"button","aria-expanded":L,"aria-label":E("Choose model"),onClick:()=>{N(false),Y(M=>!M);},className:`promptbar-model flex h-7 shrink-0 items-center gap-1 px-1.5 text-[12px] font-medium text-ink-2 transition-colors duration-150 hover:bg-hover hover:text-ink ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} `,children:[X.name,jsx("span",{className:"text-ink-3",children:jsx(Vt,{size:11,strokeWidth:2.4,children:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),Ve&&jsx("span",{className:"flex-1","aria-hidden":"true"}),(v||u)&&jsx("button",{disabled:C||Z||!u,type:"button","aria-label":E(l?"Stop dictation":"Start dictation"),"aria-pressed":l,onClick:()=>u?.(!l),className:`flex size-7 shrink-0 items-center justify-center transition-[background-color,color,transform] duration-150 active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} ${l?"bg-accent-tint text-accent-ink":"text-ink-3 hover:bg-hover hover:text-ink"} `,children:l?jsx("span",{className:"flex h-3.5 items-center gap-[2.5px]",children:[0,1,2].map(M=>jsx("span",{className:"w-[2.5px] rounded-full bg-current",style:{height:"100%",animation:`bui-eq-bounce 900ms ease-in-out ${M*150}ms infinite`}},M))}):jsx(Vt,{size:15,strokeWidth:2,children:jsxs("g",{children:[jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2M12 19v3"})]})})}),jsx("button",{type:"button","aria-label":E(I&&D?"Stop response":"Send"),disabled:I&&D?false:!on,onClick:I&&D?D:()=>{sa();},className:`flex size-7 shrink-0 items-center justify-center transition-[background-color,color,transform] duration-200 enabled:active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} `,style:{background:on||I&&D?"var(--bui-token-primary, var(--bui-ink))":"var(--bui-line-strong)",color:on||I&&D?"var(--bui-token-primary-foreground, var(--bui-surface))":"var(--bui-ink-2)"},children:jsx(Vt,{size:16,strokeWidth:2.4,children:I&&D?jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"currentColor",stroke:"none"}):jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]})]})]})})})}r(yr,"BUIPromptBar");var Ga=Array.from({length:9},(e,t)=>{let o=Math.floor(t/3);return (t%3+Math.abs(o-1))*90}),mc=[0,1,2,5,8,7,6,3],gc=Array.from({length:9},(e,t)=>{let o=mc.indexOf(t);return o===-1?null:o*110}),un={Drive:{delays:Ga,dur:650,round:false},Dots:{delays:Ga,dur:650,round:true},Orbit:{delays:gc,dur:950,round:false}};function wr({delays:e,dur:t,round:o}){return jsx("span",{"aria-hidden":true,className:"grid shrink-0 grid-cols-[repeat(3,4px)] gap-[1.5px]",children:e.map((n,a)=>jsx("span",{className:`size-[4px] bg-ink ${o?"rounded-full":"rounded-[1px]"}`,style:{opacity:n===null?.07:.15,animation:n===null?"none":`bui-pixel-on ${t}ms ease-in-out ${n}ms infinite`}},a))})}r(wr,"LoaderGrid");function fc(e){let[t,o]=useState(0),n=e===void 0;if(useEffect(()=>{if(!n)return;let i=setInterval(()=>o(l=>l+1),100);return ()=>clearInterval(i)},[n]),e===null)return;let a=e===void 0?t/10:Math.max(0,e)/1e3;return a<60?`${a.toFixed(1)}s`:`${Math.floor(a/60)}m ${(a%60).toFixed(1)}s`}r(fc,"useElapsed");function kr({label:e,variant:t="Drive",videoSrc:o,elapsedMs:n}){let a=q(),i=fc(n),l=t==="Surfer",s=e??a("Loading"),[c,u]=useState(true),{delays:g,dur:d,round:m}=un[t]??un.Drive,b=jsx("span",{className:"min-w-0 [overflow-wrap:anywhere] bg-clip-text text-[13px] font-medium text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:s}),v=i===void 0?null:jsx("span",{className:"shrink-0 whitespace-nowrap font-mono text-[12px] text-ink-3 tabular-nums",children:i});return l?jsx(A,{children:jsxs("div",{"data-bui-loading-state":true,role:"status",className:"flex w-fit flex-col items-start",children:[jsxs("div",{className:"flex items-center gap-2.5",children:[jsx(wr,{...un.Drive}),b,v]}),jsx("div",{className:"mt-2 w-56 overflow-hidden rounded-[10px] shadow-overlay",style:{animation:"bui-pop-in 200ms cubic-bezier(0.16,1,0.3,1) both",transformOrigin:"top left"},children:jsx("div",{className:"relative aspect-video w-full",style:{background:"var(--bui-tooltip-bg)"},children:c&&o?jsx("video",{src:o,autoPlay:true,muted:true,loop:true,playsInline:true,onError:()=>u(false),className:"h-full w-full object-cover"}):jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1.5",children:[jsx(wr,{...un.Drive}),jsx("span",{className:"px-3 text-center font-mono text-[10px]",style:{color:"var(--bui-tooltip-muted)"},children:a("Video unavailable")})]})})})]})}):jsx(A,{children:jsxs("div",{"data-bui-loading-state":true,role:"status",className:"flex max-w-full w-fit items-center gap-2.5",children:[jsx(wr,{delays:g,dur:d,round:m}),b,v]})})}r(kr,"BUILoadingState");var ao={locale:"en-US",messages:{canvas:{replaceImage:"Replace image",cropImage:"Crop image",downloadImage:"Download image",useImageReference:"Use as reference",saturationValue:"Saturation and brightness",hue:"Hue",dots:"Dot grid",group:"Group",hexPlaceholder:"#F5F5F5",controls:"Canvas controls",background:"Canvas background",layers:"Layers",minimap:"Minimap",zoom:"Zoom",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Show all elements",zoomTo:r(({percent:e})=>`Zoom to ${e}%`,"zoomTo"),color:r(({value:e})=>`Use ${e}`,"color"),hex:"Hex color",close:"Close",empty:"No layers",element:r(({type:e})=>e,"element")},pagination:{navigation:"Pagination",first:"First",previous:"Previous",next:"Next",last:"Last",page:r(({page:e,pageCount:t})=>`Page ${e} of ${t}`,"page"),currentPage:r(({page:e,pageCount:t})=>`Page ${e} of ${t}, current page`,"currentPage"),emptyResults:"0 results",range:r(({start:e,end:t,total:o})=>`${e}-${t} of ${o}`,"range"),selected:r(({count:e})=>`${e} selected`,"selected"),pageSize:"Items per page",loadBatchSize:"Items per load",perLoad:"Items per load",jumpToPage:"Jump to page",pages:"pages",clickToJump:"Click to jump to a page"},dialog:{close:"Close dialog"},dropdownMenu:{actions:"Actions"},loading:{spinner:"Loading"},layout:{resizePanels:"Resize panels",expandPanel:"Expand",collapsePanel:"Collapse",movePanel:"Move",moveBefore:"Move earlier",moveAfter:"Move later"},steps:{label:"Progress",current:"Current",completed:"Completed",error:"Error",disabled:"Disabled"},numberInput:{increment:"Increase value",decrement:"Decrease value"},passwordInput:{showPassword:"Show password",hidePassword:"Hide password"},multiSelect:{placeholder:"Select options",empty:"No options",removeOption:r(({value:e})=>`Remove ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`Drag column ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`Resize column ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`Sort column ${e}`:"Sort column","sortColumn"),loadingRow:"Loading table row"},toolbar:{theme:{label:"Appearance",toggle:"Toggle theme",auto:"Auto",light:"Light",dark:"Dark"},language:{label:"Language",switch:"Switch language"}},toast:{errorTitle:"Error",warningTitle:"Warning",defaultErrorDescription:"Something went wrong.",defaultWarningDescription:"Please check and try again."},dataExplorer:{viewTree:{actions:"More actions",expand:"Expand",collapse:"Collapse",loading:"Loading...",empty:"No views",error:"Unable to load views"}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},collection:{label:"Collection",loading:"Loading items",empty:"No items",loadError:"Unable to load items",refreshError:"Unable to refresh items",retry:"Retry",loadingMore:"Loading more items",permission:"You do not have permission to view this content",offline:"You appear to be offline",requestAccess:"Request access"},interactiveTable:{columnActions:"Column actions",freezeColumn:"Freeze to left",freezeEndColumn:"Freeze to right",unfreezeColumn:"Unfreeze from left",unfreezeEndColumn:"Unfreeze from right",unfreezeAllColumns:"Unfreeze all columns",resetColumnWidth:"Reset column width",frozenColumnTitle:"Frozen column"}},agentWorkbench:{label:"Session activity",reasoning:"Reasoning",plan:"Plan",taskNoDetail:"No additional details",modes:{chat:"Chat",work:"Work"},composer:{send:"Send message",stop:"Stop generating",queue:"Queue message",attach:"Add photos or files",voice:"Start voice input",webSearch:"Web search",chatMode:"Chat mode",model:"Model",reasoning:"Reasoning effort",permissions:"Permissions",removeAttachment:"Remove attachment",editQueued:"Edit queued message",deleteQueued:"Delete queued message",moveUp:"Move message up",moveDown:"Move message down",queued:"Queued messages",uploading:"Uploading",uploadFailed:"Upload failed",retryAttachment:"Retry attachment upload",noModels:"No models available",message:"Message",attachmentOnly:"Attachment",reasoningOptions:{low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"},permissionOptions:{"approval-required":"Approval required","auto-approve":"Auto approve","full-access":"Full access"}},quickStart:{label:"Quick start",back:"Back",addFile:"Add file"},tool:{input:"Input",output:"Output",status:{pending:"Pending",running:"Running",completed:"Completed",failed:"Error",denied:"Denied"}},approval:{approve:"Approve",reject:"Reject",approved:"Approved",rejected:"Rejected"},artifact:{pending:"Preparing",ready:"Ready",failed:"Failed",open:r(({name:e})=>`Open ${e}`,"open")},run:{stopping:"Stopping...",stoppedAfter:r(({duration:e})=>`You stopped after ${e}`,"stoppedAfter")},process:{running:"Working",queued:"Queued",waitingApproval:"Waiting for approval",failed:"Failed",stopped:"Stopped",processed:"Processed",processedFor:r(({duration:e})=>`Worked for ${e}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} completed`,"completedCount")},artifactWorkspace:{outputs:"Outputs",sources:"Sources",viewAll:"View all",toggleSummary:"Toggle files",tabs:"Open files",closeTab:r(({name:e})=>`Close ${e}`,"closeTab"),closeWorkspace:"Close workspace",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",kinds:{data:"Data view",audio:"Audio",canvas:"Canvas",file:"File",html:"HTML",image:"Image",markdown:"Markdown",pdf:"PDF",presentation:"Presentation",video:"Video",web:"Web page"},collapse:"Collapse",maximize:"Full screen",restore:"Exit full screen",download:r(({name:e})=>`Download ${e}`,"download"),openExternal:r(({name:e})=>`Open ${e} in a new window`,"openExternal"),loading:"Loading preview...",failed:"Preview unavailable",retry:"Try again"},usage:{label:"Context usage",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"Search agents and sessions",searchSessions:"Search sessions",searchShortcut:"Focus search",clearSearch:"Clear search",tabsLabel:"Agent workbench navigation",agents:"Agents",sessions:"Sessions",newAgent:"New Agent",newSession:"New Session",capabilities:"Capabilities & Extensions",settings:"Agent Settings",allAgents:"All Agents",recentSessions:"Recent Sessions",chat:"Chat",work:"Work",chats:"Chats",builtIn:"Built-in",noDescription:"No description",loading:"Loading...",emptyAgents:"No agents yet",emptySessions:"No sessions yet",noResults:"No matching results",retry:"Retry",pin:"Pin",unpin:"Unpin",rename:"Rename",delete:"Delete",actions:"Actions",save:"Save",cancel:"Cancel",running:"Running",completed:"Completed",failed:"Failed",contextUsage:r(({percent:e})=>`${e}% context used`,"contextUsage")},details:{title:"Task details",description:"Summary and workspace activity",duration:"Duration",updated:"Updated",model:"Model",mode:"Mode",permissions:"Permissions",tokenUsage:"Token usage",summary:"Summary",summaryEmpty:"No summary is available yet.",summaryFailed:"The summary could not be generated.",highlights:"Highlights",pendingItems:"Pending items",tabs:{label:"Task detail views",summary:"Summary",workspace:"Workspace"},status:{queued:"Queued",running:"Running",waiting_approval:"Waiting for approval",stopping:"Stopping",stopped:"Stopped",completed:"Completed",failed:"Failed"},state:{loading:{title:"Loading task details",description:"Restoring the latest session activity."},empty:{title:"No task selected",description:"Select a task to inspect its details."},error:{title:"Unable to load task details",description:"Try again after the session is available."}},actions:{close:"Close task details",copySummary:"Copy summary",retry:"Retry",retrySummary:"Retry summary",resume:"Resume",continueInNewTask:"Continue in new task",editAndRerun:"Edit and rerun",export:"Export"},workspace:{diffs:"Code changes",files:"Files",terminals:"Terminals",tests:"Tests",artifacts:"Artifacts",exitCode:r(({code:e})=>`Exit code ${e}`,"exitCode"),diffStatus:{added:"Added",modified:"Modified",deleted:"Deleted",renamed:"Renamed"},fileOperation:{upsert:"Updated",delete:"Deleted"}}}}}};var Xa={locale:"zh-CN",messages:{canvas:{replaceImage:"\u66FF\u6362\u56FE\u7247",cropImage:"\u88C1\u526A\u56FE\u7247",downloadImage:"\u4E0B\u8F7D\u56FE\u7247",useImageReference:"\u7528\u4F5C\u53C2\u8003\u56FE",saturationValue:"\u9971\u548C\u5EA6\u4E0E\u660E\u5EA6",hue:"\u8272\u76F8",dots:"\u80CC\u666F\u70B9\u9635",group:"\u5206\u7EC4",hexPlaceholder:"#F5F5F5",controls:"\u753B\u5E03\u63A7\u5236",background:"\u753B\u5E03\u80CC\u666F\u8272",layers:"\u56FE\u5C42",minimap:"\u5C0F\u5730\u56FE",zoom:"\u7F29\u653E",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u663E\u793A\u753B\u5E03\u6240\u6709\u5143\u7D20",zoomTo:r(({percent:e})=>`\u7F29\u653E\u81F3 ${e}%`,"zoomTo"),color:r(({value:e})=>`\u4F7F\u7528 ${e}`,"color"),hex:"\u5341\u516D\u8FDB\u5236\u989C\u8272",close:"\u5173\u95ED",empty:"\u6682\u65E0\u56FE\u5C42",element:r(({type:e})=>({image:"\u56FE\u7247",text:"\u6587\u5B57",rectangle:"\u77E9\u5F62",ellipse:"\u692D\u5706",diamond:"\u83F1\u5F62",arrow:"\u7BAD\u5934",line:"\u7EBF\u6761",freedraw:"\u81EA\u7531\u7ED8\u5236",frame:"\u753B\u6846",embeddable:"\u5D4C\u5165\u5185\u5BB9",iframe:"\u7F51\u9875",magicframe:"\u753B\u6846"})[e]||"\u5143\u7D20","element")},pagination:{navigation:"\u5206\u9875\u5BFC\u822A",first:"\u9996\u9875",previous:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",last:"\u672B\u9875",page:r(({page:e,pageCount:t})=>`\u7B2C ${e} \u9875\uFF0C\u5171 ${t} \u9875`,"page"),currentPage:r(({page:e,pageCount:t})=>`\u7B2C ${e} \u9875\uFF0C\u5171 ${t} \u9875\uFF0C\u5F53\u524D\u9875`,"currentPage"),emptyResults:"\u5171 0 \u6761",range:r(({start:e,end:t,total:o})=>`\u7B2C ${e}-${t} \u6761\uFF0C\u5171 ${o} \u6761`,"range"),selected:r(({count:e})=>`\u5DF2\u9009\u62E9 ${e} \u9879`,"selected"),pageSize:"\u6BCF\u9875\u663E\u793A\u6570\u91CF",loadBatchSize:"\u6BCF\u6B21\u52A0\u8F7D\u6570\u91CF",perLoad:"\u6BCF\u6B21\u52A0\u8F7D",jumpToPage:"\u8DF3\u8F6C\u5230\u9875\u7801",pages:"\u9875",clickToJump:"\u70B9\u51FB\u8DF3\u8F6C\u9875\u7801"},dialog:{close:"\u5173\u95ED\u5BF9\u8BDD\u6846"},dropdownMenu:{actions:"\u64CD\u4F5C"},loading:{spinner:"\u6B63\u5728\u52A0\u8F7D"},layout:{resizePanels:"\u8C03\u6574\u9762\u677F\u5927\u5C0F",expandPanel:"\u5C55\u5F00",collapsePanel:"\u6536\u8D77",movePanel:"\u79FB\u52A8",moveBefore:"\u5411\u524D\u79FB\u52A8",moveAfter:"\u5411\u540E\u79FB\u52A8"},steps:{label:"\u8FDB\u5EA6",current:"\u5F53\u524D\u6B65\u9AA4",completed:"\u5DF2\u5B8C\u6210",error:"\u9519\u8BEF",disabled:"\u5DF2\u7981\u7528"},numberInput:{increment:"\u589E\u52A0\u6570\u503C",decrement:"\u51CF\u5C11\u6570\u503C"},passwordInput:{showPassword:"\u663E\u793A\u5BC6\u7801",hidePassword:"\u9690\u85CF\u5BC6\u7801"},multiSelect:{placeholder:"\u8BF7\u9009\u62E9",empty:"\u6682\u65E0\u9009\u9879",removeOption:r(({value:e})=>`\u79FB\u9664 ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`\u62D6\u52A8\u5217 ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`\u8C03\u6574\u5217\u5BBD ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`\u6392\u5E8F\u5217 ${e}`:"\u6392\u5E8F\u5217","sortColumn"),loadingRow:"\u6B63\u5728\u52A0\u8F7D\u8868\u683C\u884C"},toolbar:{theme:{label:"\u5916\u89C2",toggle:"\u5207\u6362\u4E3B\u9898",auto:"\u8DDF\u968F\u7CFB\u7EDF",light:"\u6D45\u8272\u6A21\u5F0F",dark:"\u6DF1\u8272\u6A21\u5F0F"},language:{label:"\u8BED\u8A00",switch:"\u5207\u6362\u8BED\u8A00"}},toast:{errorTitle:"\u9519\u8BEF",warningTitle:"\u63D0\u793A",defaultErrorDescription:"\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",defaultWarningDescription:"\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5\u3002"},dataExplorer:{viewTree:{actions:"\u66F4\u591A\u64CD\u4F5C",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u6B63\u5728\u52A0\u8F7D...",empty:"\u6682\u65E0\u89C6\u56FE",error:"\u65E0\u6CD5\u52A0\u8F7D\u89C6\u56FE"}},workbench:{relationshipGraph:{zoomOut:"\u7F29\u5C0F",zoomIn:"\u653E\u5927",zoomToFit:"\u9002\u5E94\u753B\u5E03",minimap:"\u56FE\u8C31\u6982\u89C8"},collection:{label:"\u5185\u5BB9\u96C6\u5408",loading:"\u6B63\u5728\u52A0\u8F7D\u5185\u5BB9",empty:"\u6682\u65E0\u5185\u5BB9",loadError:"\u65E0\u6CD5\u52A0\u8F7D\u5185\u5BB9",refreshError:"\u65E0\u6CD5\u5237\u65B0\u5185\u5BB9",retry:"\u91CD\u8BD5",loadingMore:"\u6B63\u5728\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9",permission:"\u4F60\u6CA1\u6709\u6743\u9650\u67E5\u770B\u6B64\u5185\u5BB9",offline:"\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00",requestAccess:"\u7533\u8BF7\u6743\u9650"},interactiveTable:{columnActions:"\u5217\u64CD\u4F5C",freezeColumn:"\u56FA\u5B9A\u5230\u5DE6\u4FA7",freezeEndColumn:"\u56FA\u5B9A\u5230\u53F3\u4FA7",unfreezeColumn:"\u53D6\u6D88\u5DE6\u4FA7\u56FA\u5B9A",unfreezeEndColumn:"\u53D6\u6D88\u53F3\u4FA7\u56FA\u5B9A",unfreezeAllColumns:"\u53D6\u6D88\u5168\u90E8\u56FA\u5B9A",resetColumnWidth:"\u91CD\u7F6E\u5217\u5BBD",frozenColumnTitle:"\u5DF2\u56FA\u5B9A\u5217"}},agentWorkbench:{label:"\u4F1A\u8BDD\u6D3B\u52A8",reasoning:"\u601D\u8003\u8FC7\u7A0B",plan:"\u6267\u884C\u8BA1\u5212",taskNoDetail:"\u6682\u65E0\u66F4\u591A\u8BE6\u60C5",modes:{chat:"\u5BF9\u8BDD",work:"\u5DE5\u4F5C"},composer:{send:"\u53D1\u9001\u6D88\u606F",stop:"\u505C\u6B62\u751F\u6210",queue:"\u6392\u961F\u53D1\u9001",attach:"\u6DFB\u52A0\u7167\u7247\u6216\u6587\u4EF6",voice:"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",webSearch:"\u8054\u7F51\u641C\u7D22",chatMode:"\u5BF9\u8BDD\u6A21\u5F0F",model:"\u6A21\u578B",reasoning:"\u601D\u8003\u5F3A\u5EA6",permissions:"\u6743\u9650",removeAttachment:"\u79FB\u9664\u9644\u4EF6",editQueued:"\u7F16\u8F91\u6392\u961F\u6D88\u606F",deleteQueued:"\u5220\u9664\u6392\u961F\u6D88\u606F",moveUp:"\u4E0A\u79FB\u6D88\u606F",moveDown:"\u4E0B\u79FB\u6D88\u606F",queued:"\u6392\u961F\u6D88\u606F",uploading:"\u4E0A\u4F20\u4E2D",uploadFailed:"\u4E0A\u4F20\u5931\u8D25",retryAttachment:"\u91CD\u8BD5\u9644\u4EF6\u4E0A\u4F20",noModels:"\u6682\u65E0\u53EF\u7528\u6A21\u578B",message:"\u6D88\u606F",attachmentOnly:"\u9644\u4EF6",reasoningOptions:{low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",xhigh:"\u6700\u9AD8"},permissionOptions:{"approval-required":"\u9700\u8981\u6279\u51C6","auto-approve":"\u81EA\u52A8\u6279\u51C6","full-access":"\u5B8C\u5168\u8BBF\u95EE"}},quickStart:{label:"\u5FEB\u901F\u5F00\u59CB",back:"\u8FD4\u56DE",addFile:"\u6DFB\u52A0\u6587\u4EF6"},tool:{input:"\u8F93\u5165",output:"\u8F93\u51FA",status:{pending:"\u7B49\u5F85\u4E2D",running:"\u8FD0\u884C\u4E2D",completed:"\u5DF2\u5B8C\u6210",failed:"\u9519\u8BEF",denied:"\u5DF2\u62D2\u7EDD"}},approval:{approve:"\u5141\u8BB8",reject:"\u62D2\u7EDD",approved:"\u5DF2\u5141\u8BB8",rejected:"\u5DF2\u62D2\u7EDD"},artifact:{pending:"\u51C6\u5907\u4E2D",ready:"\u5DF2\u5C31\u7EEA",failed:"\u5931\u8D25",open:r(({name:e})=>`\u6253\u5F00 ${e}`,"open")},run:{stopping:"\u6B63\u5728\u505C\u6B62...",stoppedAfter:r(({duration:e})=>`\u4F60\u5728 ${e} \u540E\u505C\u6B62\u4E86\u4EFB\u52A1`,"stoppedAfter")},process:{running:"\u6267\u884C\u8FC7\u7A0B",queued:"\u6392\u961F\u4E2D",waitingApproval:"\u7B49\u5F85\u5BA1\u6279",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62",processed:"\u5DF2\u5904\u7406",processedFor:r(({duration:e})=>`\u8017\u65F6 ${e.replace(/(\d+)h/g,"$1\u5C0F\u65F6").replace(/(\d+)m/g,"$1\u5206\u949F").replace(/(\d+)s/g,"$1\u79D2").replace(/\s+/g,"")}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} \u5DF2\u5B8C\u6210`,"completedCount")},artifactWorkspace:{outputs:"\u8F93\u51FA",sources:"\u6765\u6E90",viewAll:"\u67E5\u770B\u5168\u90E8",toggleSummary:"\u5207\u6362\u6587\u4EF6\u6458\u8981",tabs:"\u5DF2\u6253\u5F00\u6587\u4EF6",closeTab:r(({name:e})=>`\u5173\u95ED ${e}`,"closeTab"),closeWorkspace:"\u5173\u95ED\u5DE5\u4F5C\u533A",close:"\u5173\u95ED",closeOthers:"\u5173\u95ED\u5176\u4ED6\u6807\u7B7E\u9875",closeRight:"\u5173\u95ED\u53F3\u4FA7\u6807\u7B7E\u9875",closeAll:"\u5173\u95ED\u6240\u6709\u6807\u7B7E\u9875",kinds:{data:"\u6570\u636E\u89C6\u56FE",audio:"\u97F3\u9891",canvas:"\u753B\u677F",file:"\u6587\u4EF6",html:"HTML",image:"\u56FE\u7247",markdown:"Markdown",pdf:"PDF",presentation:"\u6F14\u793A\u6587\u7A3F",video:"\u89C6\u9891",web:"\u7F51\u9875"},collapse:"\u6536\u8D77",maximize:"\u5168\u5C4F",restore:"\u9000\u51FA\u5168\u5C4F",download:r(({name:e})=>`\u4E0B\u8F7D ${e}`,"download"),openExternal:r(({name:e})=>`\u5728\u65B0\u7A97\u53E3\u6253\u5F00 ${e}`,"openExternal"),loading:"\u6B63\u5728\u52A0\u8F7D\u9884\u89C8...",failed:"\u9884\u89C8\u4E0D\u53EF\u7528",retry:"\u91CD\u8BD5"},usage:{label:"\u4E0A\u4E0B\u6587\u7528\u91CF",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"\u641C\u7D22\u667A\u80FD\u4F53\u548C\u4F1A\u8BDD",searchSessions:"\u641C\u7D22\u4F1A\u8BDD",searchShortcut:"\u805A\u7126\u641C\u7D22\u6846",clearSearch:"\u6E05\u9664\u641C\u7D22",tabsLabel:"\u667A\u80FD\u4F53\u5DE5\u4F5C\u53F0\u5BFC\u822A",agents:"\u667A\u80FD\u4F53",sessions:"\u4F1A\u8BDD",newAgent:"\u65B0\u5EFA\u667A\u80FD\u4F53",newSession:"\u65B0\u5EFA\u4F1A\u8BDD",capabilities:"\u80FD\u529B\u4E0E\u6269\u5C55",settings:"\u667A\u80FD\u4F53\u8BBE\u7F6E",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",recentSessions:"\u6700\u8FD1\u4F1A\u8BDD",chat:"\u5BF9\u8BDD",work:"\u5DE5\u4F5C",chats:"\u804A\u5929",builtIn:"\u5185\u7F6E",noDescription:"\u6682\u65E0\u63CF\u8FF0",loading:"\u52A0\u8F7D\u4E2D...",emptyAgents:"\u6682\u65E0\u667A\u80FD\u4F53",emptySessions:"\u6682\u65E0\u4F1A\u8BDD",noResults:"\u6CA1\u6709\u5339\u914D\u7ED3\u679C",retry:"\u91CD\u8BD5",pin:"\u7F6E\u9876",unpin:"\u53D6\u6D88\u7F6E\u9876",rename:"\u91CD\u547D\u540D",delete:"\u5220\u9664",actions:"\u64CD\u4F5C",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",running:"\u8FD0\u884C\u4E2D",completed:"\u5DF2\u5B8C\u6210",failed:"\u5931\u8D25",contextUsage:r(({percent:e})=>`\u5DF2\u4F7F\u7528 ${e}% \u4E0A\u4E0B\u6587`,"contextUsage")},details:{title:"\u4EFB\u52A1\u8BE6\u60C5",description:"\u6458\u8981\u4E0E\u5DE5\u4F5C\u533A\u6D3B\u52A8",duration:"\u8017\u65F6",updated:"\u66F4\u65B0\u65F6\u95F4",model:"\u6A21\u578B",mode:"\u6A21\u5F0F",permissions:"\u6743\u9650",tokenUsage:"Token \u7528\u91CF",summary:"\u6458\u8981",summaryEmpty:"\u6682\u65F6\u6CA1\u6709\u53EF\u7528\u6458\u8981\u3002",summaryFailed:"\u6458\u8981\u751F\u6210\u5931\u8D25\u3002",highlights:"\u91CD\u70B9",pendingItems:"\u5F85\u5904\u7406\u4E8B\u9879",tabs:{label:"\u4EFB\u52A1\u8BE6\u60C5\u89C6\u56FE",summary:"\u6458\u8981",workspace:"\u5DE5\u4F5C\u533A"},status:{queued:"\u6392\u961F\u4E2D",running:"\u8FD0\u884C\u4E2D",waiting_approval:"\u7B49\u5F85\u5BA1\u6279",stopping:"\u6B63\u5728\u505C\u6B62",stopped:"\u5DF2\u505C\u6B62",completed:"\u5DF2\u5B8C\u6210",failed:"\u5931\u8D25"},state:{loading:{title:"\u6B63\u5728\u52A0\u8F7D\u4EFB\u52A1\u8BE6\u60C5",description:"\u6B63\u5728\u6062\u590D\u6700\u65B0\u7684\u4F1A\u8BDD\u6D3B\u52A8\u3002"},empty:{title:"\u672A\u9009\u62E9\u4EFB\u52A1",description:"\u9009\u62E9\u4EFB\u52A1\u540E\u67E5\u770B\u8BE6\u7EC6\u4FE1\u606F\u3002"},error:{title:"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u8BE6\u60C5",description:"\u4F1A\u8BDD\u6062\u590D\u53EF\u7528\u540E\u8BF7\u91CD\u8BD5\u3002"}},actions:{close:"\u5173\u95ED\u4EFB\u52A1\u8BE6\u60C5",copySummary:"\u590D\u5236\u6458\u8981",retry:"\u91CD\u8BD5",retrySummary:"\u91CD\u65B0\u751F\u6210\u6458\u8981",resume:"\u7EE7\u7EED\u8FD0\u884C",continueInNewTask:"\u5728\u65B0\u4EFB\u52A1\u4E2D\u7EE7\u7EED",editAndRerun:"\u7F16\u8F91\u5E76\u91CD\u65B0\u8FD0\u884C",export:"\u5BFC\u51FA"},workspace:{diffs:"\u4EE3\u7801\u53D8\u66F4",files:"\u6587\u4EF6",terminals:"\u7EC8\u7AEF",tests:"\u6D4B\u8BD5",artifacts:"\u4EA7\u7269",exitCode:r(({code:e})=>`\u9000\u51FA\u7801 ${e}`,"exitCode"),diffStatus:{added:"\u65B0\u589E",modified:"\u4FEE\u6539",deleted:"\u5220\u9664",renamed:"\u91CD\u547D\u540D"},fileOperation:{upsert:"\u5DF2\u66F4\u65B0",delete:"\u5DF2\u5220\u9664"}}}}}};var bc={"en-US":ao,"zh-CN":Xa};function Ka(e){if(typeof e!="string"||!e.trim())throw new TypeError("Monkeys locale must be a non-empty BCP 47 string.");try{return Intl.getCanonicalLocales(e)[0]}catch{throw new RangeError(`Monkeys locale "${e}" is not a valid BCP 47 identifier.`)}}r(Ka,"normalizeLocaleId");function Wo(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}r(Wo,"isRecord");function Ya(e,t,o){if(!Wo(e)||!Wo(t))throw new TypeError(`${o} must be an object.`);for(let[n,a]of Object.entries(e)){if(a===void 0)continue;if(!(n in t))throw new TypeError(`${o}.${n} is not a supported Monkeys message.`);let i=t[n],l=`${o}.${n}`;if(typeof i=="function"){if(typeof a!="function")throw new TypeError(`${l} must be a function.`)}else if(typeof i=="string"){if(typeof a!="string")throw new TypeError(`${l} must be a string.`)}else Ya(a,i,l);}}r(Ya,"validateMessageOverride");function Qa(e,t){let o=Wo(e)?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="beautiful")):e;if(Ya(o,ao.messages,t),Wo(e)&&e.beautiful!==void 0){if(!Wo(e.beautiful))throw new TypeError(`${t}.beautiful must be an object.`);for(let[n,a]of Object.entries(e.beautiful))if(a!==void 0&&typeof a!="string")throw new TypeError(`${t}.beautiful.${n} must be a string.`)}}r(Qa,"assertMessagesOverride");function Za(e){return e==="en-US"||e==="zh-CN"}r(Za,"isBuiltInLocale");function hc(e){if(e===void 0)return {locale:void 0,messages:void 0,hasExplicitLocale:false};if(typeof e=="string"){let o=Ka(e);if(!Za(o))throw new RangeError(`Unsupported built-in Monkeys locale "${o}". Provide a locale pack object for custom locales.`);return {locale:o,messages:void 0,hasExplicitLocale:true}}if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("Monkeys locale must be a locale id or locale pack object.");let t=Ka(e.locale);return Qa(e.messages,"Monkeys locale messages"),{locale:t,messages:e.messages,hasExplicitLocale:true}}r(hc,"normalizeLocaleInput");function wo(e,t){return t?{canvas:{...e.canvas,...t.canvas},beautiful:{...e.beautiful,...t.beautiful},pagination:{...e.pagination,...t.pagination},dialog:{...e.dialog,...t.dialog},dropdownMenu:{...e.dropdownMenu,...t.dropdownMenu},loading:{...e.loading,...t.loading},layout:{...e.layout,...t.layout},steps:{...e.steps,...t.steps},numberInput:{...e.numberInput,...t.numberInput},passwordInput:{...e.passwordInput,...t.passwordInput},multiSelect:{...e.multiSelect,...t.multiSelect},table:{...e.table,...t.table},toolbar:{theme:{...e.toolbar.theme,...t.toolbar?.theme},language:{...e.toolbar.language,...t.toolbar?.language}},toast:{...e.toast,...t.toast},dataExplorer:{viewTree:{...e.dataExplorer.viewTree,...t.dataExplorer?.viewTree}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview",...e.workbench.relationshipGraph,...t.workbench?.relationshipGraph},collection:{...e.workbench.collection,...t.workbench?.collection},interactiveTable:{...e.workbench.interactiveTable,...t.workbench?.interactiveTable}},agentWorkbench:{...e.agentWorkbench,...t.agentWorkbench,modes:{...e.agentWorkbench.modes,...t.agentWorkbench?.modes},composer:{...e.agentWorkbench.composer,...t.agentWorkbench?.composer},quickStart:{...e.agentWorkbench.quickStart,...t.agentWorkbench?.quickStart},tool:{...e.agentWorkbench.tool,...t.agentWorkbench?.tool,status:{...e.agentWorkbench.tool.status,...t.agentWorkbench?.tool?.status}},approval:{...e.agentWorkbench.approval,...t.agentWorkbench?.approval},artifact:{...e.agentWorkbench.artifact,...t.agentWorkbench?.artifact},run:{...e.agentWorkbench.run,...t.agentWorkbench?.run},process:{...e.agentWorkbench.process,...t.agentWorkbench?.process},artifactWorkspace:{...e.agentWorkbench.artifactWorkspace,...t.agentWorkbench?.artifactWorkspace},usage:{...e.agentWorkbench.usage,...t.agentWorkbench?.usage},navigation:{...e.agentWorkbench.navigation,...t.agentWorkbench?.navigation},details:{...e.agentWorkbench.details,...t.agentWorkbench?.details,tabs:{...e.agentWorkbench.details.tabs,...t.agentWorkbench?.details?.tabs},status:{...e.agentWorkbench.details.status,...t.agentWorkbench?.details?.status},state:{loading:{...e.agentWorkbench.details.state.loading,...t.agentWorkbench?.details?.state?.loading},empty:{...e.agentWorkbench.details.state.empty,...t.agentWorkbench?.details?.state?.empty},error:{...e.agentWorkbench.details.state.error,...t.agentWorkbench?.details?.state?.error}},actions:{...e.agentWorkbench.details.actions,...t.agentWorkbench?.details?.actions},workspace:{...e.agentWorkbench.details.workspace,...t.agentWorkbench?.details?.workspace,diffStatus:{...e.agentWorkbench.details.workspace.diffStatus,...t.agentWorkbench?.details?.workspace?.diffStatus},fileOperation:{...e.agentWorkbench.details.workspace.fileOperation,...t.agentWorkbench?.details?.workspace?.fileOperation}}}}}:e}r(wo,"mergeMonkeysLocaleMessages");var Sr={locale:ao.locale,messages:wo(ao.messages)};function Cr(e,t,o){t!==void 0&&Qa(t,"MonkeysProvider messages");let n=hc(e),a=n.locale??o?.locale??ao.locale,i=Za(a)?bc[a].messages:void 0,l=wo(ao.messages,i);return o&&(!n.hasExplicitLocale||o.locale===a)&&(l=wo(l,o.messages)),l=wo(l,n.messages),l=wo(l,t),{locale:a,messages:l}}r(Cr,"resolveMonkeysLocale");var vc="com.infmonkeys.css";function Rr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(Rr,"isRecord");function yc(e){let t=e?.[vc];return Rr(t)?t:void 0}r(yc,"readCssExtension");function Ye(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))}r(Ye,"formatNumber");function jt(e){return `${Ye(e.value)}${e.unit}`}r(jt,"formatDimension");function Tr(e){return `${Ye(e.value)}${e.unit}`}r(Tr,"formatDuration");function io(e){return e==="none"?e:Ye(e)}r(io,"formatColorComponent");function wc(e){return [Number.parseInt(e.slice(1,3),16)/255,Number.parseInt(e.slice(3,5),16)/255,Number.parseInt(e.slice(5,7),16)/255]}r(wc,"hexToSrgb");function kc(e){if(e.colorSpace==="srgb"&&e.components.every(t=>typeof t=="number"))return e.components;if(e.hex)return wc(e.hex);throw new TypeError(`Web semantic colors in ${e.colorSpace} require a six-digit hex fallback for hsl(var(--token)) consumers.`)}r(kc,"colorSrgbComponents");function Sc([e,t,o]){let n=Math.max(e,t,o),a=Math.min(e,t,o),i=(n+a)/2;if(n===a)return [0,0,i*100];let l=n-a,s=i>.5?l/(2-n-a):l/(n+a),c;return n===e?c=(t-o)/l+(t<o?6:0):n===t?c=(o-e)/l+2:c=(e-t)/l+4,[c/6*360,s*100,i*100]}r(Sc,"srgbToHsl");function Cc(e){if(e.colorSpace==="hsl"&&e.components.every(a=>typeof a=="number")){let[a,i,l]=e.components;return `${Ye(a)} ${Ye(i)}% ${Ye(l)}%`}let[t,o,n]=Sc(kc(e));return `${Ye(t)} ${Ye(o)}% ${Ye(n)}%`}r(Cc,"formatHslTriplet");function mn(e){let t=e.alpha??1;if(e.hex&&t===1)return e.hex;let o=e.components.map(io).join(" "),n=t===1?"":` / ${Ye(t)}`;switch(e.colorSpace){case "srgb":return `rgb(${e.components.map(i=>i==="none"?"none":Ye(i*255)).join(" ")}${n})`;case "hsl":return `hsl(${io(e.components[0])} ${io(e.components[1])}% ${io(e.components[2])}%${n})`;case "hwb":return `hwb(${io(e.components[0])} ${io(e.components[1])}% ${io(e.components[2])}%${n})`;case "lab":case "lch":case "oklab":case "oklch":return `${e.colorSpace}(${o}${n})`;default:return `color(${e.colorSpace} ${o}${n})`}}r(mn,"formatColor");function Ja(e){let t=Array.isArray(e)?e:[e],o=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);return t.map(n=>o.has(n)||/^[a-zA-Z][\w-]*$/.test(n)?n:`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`).join(", ")}r(Ja,"formatFontFamily");function Tc(e){return (Array.isArray(e)?e:[e]).map(o=>{if(!Rr(o))throw new TypeError("DTCG shadow values must be objects.");return [jt(o.offsetX),jt(o.offsetY),jt(o.blur),jt(o.spread),mn(o.color),o.inset===true?"inset":""].filter(Boolean).join(" ")}).join(", ")}r(Tc,"formatShadow");function Rc(e,t){if(!Array.isArray(e))throw new TypeError("DTCG gradient values must be arrays.");let o=e.map(a=>{if(!Rr(a))throw new TypeError("DTCG gradient stops must be objects.");return `${mn(a.color)} ${Ye(Number(a.position)*100)}%`}).join(", "),n=yc(t)?.gradient;return n?.kind==="radial"?`radial-gradient(${o})`:`linear-gradient(${Ye(n?.angle??90)}deg, ${o})`}r(Rc,"formatGradient");function ei(e){switch(e.type){case "color":return mn(e.value);case "dimension":return jt(e.value);case "fontFamily":return Ja(e.value);case "fontWeight":case "number":return String(e.value);case "duration":return Tr(e.value);case "cubicBezier":return `cubic-bezier(${e.value.map(Ye).join(", ")})`;case "strokeStyle":return typeof e.value=="string"?e.value:e.value.dashArray.map(jt).join(" ");case "border":{let t=e.value,o={...e,type:"strokeStyle",value:t.style};return `${jt(t.width)} ${ei(o)} ${mn(t.color)}`}case "transition":{let t=e.value;return `${Tr(t.duration)} cubic-bezier(${t.timingFunction.map(Ye).join(", ")}) ${Tr(t.delay)}`}case "shadow":return Tc(e.value);case "gradient":return Rc(e.value,e.extensions);case "typography":{let t=e.value;return `${t.fontWeight} ${jt(t.fontSize)}/${Ye(t.lineHeight)} ${Ja(t.fontFamily)}`}}}r(ei,"formatTokenValue");function ti(e,t){let o=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase();return `--${t}-${o}`}r(ti,"toCssVariableName");function Nc(e){if(!/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e))throw new TypeError("Theme token variablePrefix must start with a letter and contain only letters, numbers, or hyphens.")}r(Nc,"assertCssVariablePrefix");function Pc(e,t,o){let n=`${t}.${o}`;return e.has(n)?n:e.has(t)?t:void 0}r(Pc,"selectModePath");var Mc={"semantic.color.background":"--background","semantic.color.foreground":"--foreground","semantic.color.card":"--card","semantic.color.card-foreground":"--card-foreground","semantic.color.popover":"--popover","semantic.color.popover-foreground":"--popover-foreground","semantic.color.primary":"--primary","semantic.color.primary-foreground":"--primary-foreground","semantic.color.secondary":"--secondary","semantic.color.secondary-foreground":"--secondary-foreground","semantic.color.muted":"--muted","semantic.color.muted-foreground":"--muted-foreground","semantic.color.accent":"--accent","semantic.color.accent-foreground":"--accent-foreground","semantic.color.destructive":"--destructive","semantic.color.destructive-foreground":"--destructive-foreground","semantic.color.success":"--success","semantic.color.success-foreground":"--success-foreground","semantic.color.warning":"--warning","semantic.color.warning-foreground":"--warning-foreground","semantic.color.border":"--border","semantic.color.input":"--input","semantic.color.ring":"--ring","semantic.color.media-surface":"--media-surface","semantic.color.media-foreground":"--media-foreground","semantic.color.media-overlay":"--media-overlay","semantic.color.radar-canvas":"--radar-canvas","semantic.color.radar-panel":"--radar-panel","semantic.color.radar-border":"--radar-border","semantic.color.radar-shell-border":"--radar-shell-border","semantic.color.radar-grid":"--radar-grid","semantic.color.radar-axis":"--radar-axis","semantic.color.radar-series-one":"--radar-series-one","semantic.color.radar-series-two":"--radar-series-two","semantic.color.radar-series-three":"--radar-series-three","semantic.color.radar-series-four":"--radar-series-four"},Ic=Object.freeze({...Object.fromEntries(["grid","axis","fillStart","fillEnd","glow","label","value"].map(e=>[`component.chart.radar.${e}`,{variableName:ti(`chart.radar.${e}`,"monkeys"),axis:"colorMode",expectedType:"color",format:"css"}])),...Object.fromEntries(Object.entries(Mc).map(([e,t])=>[e,{variableName:t,axis:"colorMode",expectedType:"color",format:"hsl"}])),"semantic.color.neocard":{variableName:"--neocard",axis:"colorMode",expectedType:"color",format:"css"},"semantic.radius.base":{variableName:"--radius",axis:"colorMode",expectedType:"dimension",format:"css"},"semantic.spacing.global":{variableName:"--global-spacing",axis:"density",expectedType:"dimension",format:"css"},"semantic.gradient.brand":{variableName:"--monkeys-gradient",axis:"colorMode",expectedType:"gradient",format:"css"},"semantic.font.body":{variableName:"--font-sans",axis:"colorMode",expectedType:"fontFamily",format:"css"}});function Nr(e,t={}){let o=resolveThemeTokens(e),n=o.document,a=t.colorMode??"light",i=t.density??"default",l=t.variablePrefix??"monkeys";Nc(l);let s={},c={},u={},g=new Map;for(let[b,v]of o.tokens){s[b]=v.value;let S=ei(v);c[b]=S;let h=ti(b,l),f=g.get(h);if(f)throw new TypeError(`Theme token paths ${f} and ${b} both compile to ${h}. Rename one token.`);g.set(h,b),u[h]=S;}let d=new Set(o.tokens.keys());for(let[b,v]of Object.entries(Ic)){let S=v.axis==="density"?i:a,h=Pc(d,b,S);if(!h)continue;let f=o.tokens.get(h);if(!f||f.type!==v.expectedType)throw new TypeError(`${h} must be a ${v.expectedType} token to drive ${v.variableName}.`);u[v.variableName]=v.format==="hsl"?Cc(f.value):c[h];}let m=Object.entries(u).sort(([b],[v])=>b.localeCompare(v)).map(([b,v])=>`${b}:${v};`).join("");return {contract:n,colorMode:a,density:i,values:Object.freeze(s),cssValues:Object.freeze(c),cssVariables:Object.freeze(u),cssText:m}}r(Nr,"compileThemeTokens");var gn=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],Ac={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},Pr=new WeakMap;function oi(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Pr.get(e)?.get(t);if(o)return o;let n={...Ac},a=Object.fromEntries(gn.map(l=>[l,"builtin"]));for(let l of gn){let s=l==="padding"||l==="gap"?e?.density:e?.colorMode,c=l==="glowColor"?"component.bento":"semantic.bento",u=[`${c}.levels.level${t}.${l}`,`${c}.default.${l}`];for(let g of u){let d=s&&e?.cssValues[`${g}.${s}`]!==void 0?`${g}.${s}`:g,m=e?.cssValues[d];if(m!==void 0){n[l]=m,a[l]=d;break}}}let i=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let l=Pr.get(e)??new Map;l.set(t,i),Pr.set(e,l);}return i}r(oi,"resolveBentoTokens");var Bc=Object.freeze({}),Lc=Object.freeze({}),ni=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function Ec(){return Object.freeze({locale:createContext({...Sr,provided:false}),theme:createContext({provided:false}),direction:createContext({provided:false}),environment:createContext({provided:false,environment:Bc,portal:Lc})})}r(Ec,"createMonkeysProviderContexts");function Dc(){let e=globalThis,t=e[ni];if(t)return t;let o=Ec();return Object.defineProperty(e,ni,{value:o,enumerable:false,configurable:false,writable:false}),o}r(Dc,"getMonkeysProviderContexts");var bn=Dc(),hn=bn.locale,So=bn.theme,xn=bn.direction,vn=bn.environment;function Uc(e,t){return t===void 0?e:e===void 0?t:{...e,...t,slots:e.slots||t.slots?{...e.slots,...t.slots}:void 0,styles:e.styles||t.styles?{...e.styles,...t.styles}:void 0}}r(Uc,"mergeAppearance");function ai(){return useContext(So).resolvedTheme}r(ai,"useMonkeysResolvedTheme");function ii(e){let t=useContext(So).baseAppearance;return useMemo(()=>Uc(t,e),[e,t])}r(ii,"useMonkeysBaseAppearance");function si(){return useContext(vn).portal}r(si,"useMonkeysPortalOptions");function ct(){let e=useContext(hn),t=useContext(So),o=useContext(xn),n=e.provided||t.provided||o.provided;return useMemo(()=>n?{dir:o.direction,"data-monkeys-direction":o.direction,"data-monkeys-locale":e.locale,"data-monkeys-theme":t.themeId,"data-monkeys-theme-mode":t.resolvedTheme?.colorMode}:{},[o.direction,e.locale,n,t.resolvedTheme?.colorMode,t.themeId])}r(ct,"useMonkeysComponentAttributes");function li(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}r(li,"isRecord");function zc(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('MonkeysProvider direction must be "ltr" or "rtl".')}r(zc,"validateDirection");function _c(e){if(e!==void 0){if(!li(e))throw new TypeError("MonkeysProvider environment must be an object.");if(e.getDocument!==void 0&&typeof e.getDocument!="function")throw new TypeError("MonkeysProvider environment.getDocument must be a function.");if(e.getWindow!==void 0&&typeof e.getWindow!="function")throw new TypeError("MonkeysProvider environment.getWindow must be a function.")}}r(_c,"validateEnvironment");function Fc(e){if(e!==void 0){if(!li(e))throw new TypeError("MonkeysProvider portal must be an object.");if(e.disabled!==void 0&&typeof e.disabled!="boolean")throw new TypeError("MonkeysProvider portal.disabled must be a boolean.");if(e.container!=null&&typeof e.container!="function"&&typeof e.container!="object")throw new TypeError("MonkeysProvider portal.container must be an Element, null, or a function.")}}r(Fc,"validatePortal");function Oc(e,t,o,n){return e?Nr(e,{colorMode:t,density:o}):n}r(Oc,"resolveProviderTheme");function Mr({children:e,locale:t,messages:o,direction:n,theme:a,themeId:i,colorMode:l,density:s,appearance:c,environment:u,iconResolver:g,imageResolver:d,portal:m,statusStates:b,listFooter:v}){let S=useContext(hn),h=useContext(So),f=useContext(xn),w=useContext(vn);if(zc(n),_c(u),g!==void 0&&typeof g!="function")throw new TypeError("MonkeysProvider iconResolver must be a function.");if(d!==void 0&&typeof d!="function")throw new TypeError("MonkeysProvider imageResolver must be a function.");Fc(m);let x=useMemo(()=>Cr(t,o,S),[t,o,S]),C=useMemo(()=>({...x,provided:true}),[x]),I=useMemo(()=>Oc(a,l,s,h.resolvedTheme),[l,s,h.resolvedTheme,a]),D=useMemo(()=>({provided:true,resolvedTheme:I,themeId:i??h.themeId,baseAppearance:{...h.baseAppearance,...c?.base,...s?{density:s}:void 0,slots:{...h.baseAppearance?.slots,...c?.base?.slots},styles:{...h.baseAppearance?.styles,...c?.base?.styles}},dataExplorerAppearance:{...h.dataExplorerAppearance,...c?.dataExplorer,...s?{density:s}:void 0,slots:{...h.dataExplorerAppearance?.slots,...c?.dataExplorer?.slots},styles:{...h.dataExplorerAppearance?.styles,...c?.dataExplorer?.styles}},statusStates:{...h.statusStates,...b,loading:{...h.statusStates?.loading,...b?.loading},empty:{...h.statusStates?.empty,...b?.empty},error:{...h.statusStates?.error,...b?.error},permission:{...h.statusStates?.permission,...b?.permission}},listFooter:{...h.listFooter,...v,...v?.pageSizeOptions?{pageSizeOptions:[...v.pageSizeOptions]}:void 0}}),[c?.base,c?.dataExplorer,s,h.baseAppearance,h.dataExplorerAppearance,h.statusStates,h.themeId,I,b,v,i]),P=useMemo(()=>({provided:true,direction:n??f.direction??"ltr"}),[n,f.direction]),E=useMemo(()=>({provided:true,iconResolver:g??w.iconResolver,imageResolver:d??w.imageResolver,environment:{...w.environment,...u},portal:{...w.portal,...m}}),[u,w.environment,w.iconResolver,g,d,w.imageResolver,w.portal,m]);return jsx(hn.Provider,{value:C,children:jsx(So.Provider,{value:D,children:jsx(xn.Provider,{value:P,children:jsx(vn.Provider,{value:E,children:e})})})})}r(Mr,"MonkeysProvider");function Ir({container:e,composer:t=false,children:o}){let n=useRef(null),[a]=useState(()=>typeof document>"u"?null:document.createElement("div"));useLayoutEffect(()=>{if(!a)return;let l=a.contains(document.activeElement)?document.activeElement:null;a.style.display="contents",(e??n.current)?.appendChild(a),l?.focus({preventScroll:true});},[e,a]),useLayoutEffect(()=>()=>a?.remove(),[a]);let i=jsx(A,{portal:true,children:jsx("div",{className:t?"bui-composer-host":"bui-conversation-host","data-bui-composer-placement":t?e?"floating":"inline":void 0,children:jsx(Mr,{portal:t&&e?{container:a}:void 0,children:jsx("div",{className:t?"bui-composer-host-content":"bui-conversation-host",onPointerDown:t&&e?l=>l.stopPropagation():void 0,onWheel:t&&e?l=>l.stopPropagation():void 0,onKeyDown:t&&e?l=>l.stopPropagation():void 0,children:o})})})});return jsx(A,{children:jsx("div",{ref:n,className:t?"bui-composer-anchor":"bui-conversation-anchor",children:a?createPortal(i,a):i})})}r(Ir,"ConversationHost");var jc=[],Gc=[],qc={initialPrompt:"",placeholder:"Enter a message"};function Xc({label:e,sub:t,time:o,body:n,resolving:a}){let i=q();return jsxs("div",{className:"flex w-full flex-col gap-1.5 transition-[opacity,filter,transform] duration-400",style:{opacity:a?.55:1,filter:a?"blur(0.5px)":"blur(0)",transform:a?"scale(0.985)":"scale(1)",transformOrigin:"top left",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)",animation:"bui-fade-up 400ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("div",{className:"flex items-center gap-1 text-[12px] leading-[1.3]",children:[jsx("span",{className:"font-medium text-ink",children:e}),jsx("span",{className:"text-ink-2",children:t}),o&&jsx("span",{className:"text-ink",children:i("duration",{time:o})})]}),jsx("p",{className:"text-[13px] leading-normal text-ink",children:n})]})}r(Xc,"Section");function Kc({messages:e=jc,suggestions:t=Gc,labels:o,onSend:n,busy:a=false,onHeaderAction:i,fill:l=false,title:s,value:c,onValueChange:u,readOnly:g=false,loading:d=false,error:m,onRetry:b,onStop:v,children:S,renderMessage:h,pendingContent:f,composerContent:w,composerAccessory:x,composerProgress:C,composerNotice:I,composerContainer:D,conversationContainer:P,headerActions:E,sidePanel:V,readable:j=false,showMessageLabels:B=true}){let y=q(),R=ye(qc,o),[W,J]=useState(""),G=c??W,Z=r(H=>{J(H),u?.(H);},"setDraft"),[de,le]=useState(false),_=useRef(false),ae=useRef(true),K=useRef(null),me=useRef(true),Pe=[...e].reverse().find(H=>H.role==="user")?.id;useEffect(()=>{Pe&&(me.current=true);},[Pe]),useEffect(()=>(ae.current=true,()=>{ae.current=false;}),[]),useEffect(()=>{l&&me.current&&K.current&&(K.current.scrollTop=K.current.scrollHeight);},[l,e,a,S]),useEffect(()=>{let H=K.current,ue=H?.firstElementChild;if(!l||!H||!ue||typeof ResizeObserver>"u")return;let Ve=new ResizeObserver(()=>{me.current&&(H.scrollTop=H.scrollHeight);});return Ve.observe(ue),()=>Ve.disconnect()},[l]);let[N,L]=useState(R.initialPrompt),[Y,X]=useState(t[0]??""),Me=useRef(null),oe=!!N,se=G.trim().length>0&&!a&&!de&&!d&&!g&&!!n,Ie=r(async()=>{if(!se||_.current)return;let H=G.trim();_.current=true,le(true);try{await n?.(H)!==!1&&ae.current&&(L(H),Z(""),me.current=!0);}catch{}finally{_.current=false,ae.current&&le(false);}},"send");return l?jsx(Ir,{container:P,children:jsx(A,{children:jsxs("section",{"data-readable":j||void 0,"data-panel-open":!!V||void 0,"data-composer-progress":!!C||void 0,className:"chat-composer-fill flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden text-ink","aria-label":s||y("Agent"),children:[(s||E)&&jsxs("header",{className:"chat-composer-header flex shrink-0 items-center justify-between border-b border-line px-4 py-3",children:[jsx("span",{className:"truncate text-[14px] font-medium",children:s}),E]}),jsxs("div",{className:"chat-composer-body",children:[jsxs("div",{className:"chat-composer-main",children:[jsx("div",{ref:K,role:"log","aria-label":y("Chat history"),"aria-busy":a||d,className:"chat-composer-transcript flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4",onScroll:()=>{let H=K.current;H&&(me.current=H.scrollHeight-H.scrollTop-H.clientHeight<48);},children:jsxs("div",{className:"chat-composer-content",children:[d?jsx("span",{role:"status",className:"text-[13px] text-ink-2",children:y("Loading")}):e.map((H,ue)=>jsxs("article",{"aria-label":B?void 0:H.label,className:H.role==="user"?"ml-auto max-w-full rounded-xl bg-field px-3 py-2":"w-full min-w-0",style:!B&&H.role==="user"?{width:"fit-content",maxWidth:"85%"}:void 0,children:[B&&jsx("div",{className:"mb-1 text-[12px] font-medium text-ink-2",children:H.label}),h?h(H,ue):jsx("p",{className:"whitespace-pre-wrap break-words text-[13px] leading-normal",children:H.body})]},H.id??ue)),!d&&!a&&!m&&e.length===0&&Children.toArray(S).length===0&&jsx("div",{className:"flex flex-1 items-center justify-center text-[13px] text-ink-3",children:y("Start a conversation")}),S,!d&&a&&(f===void 0?jsx(kr,{variant:"Dots",label:y("Loading")}):f)]})}),(!g||x||C||m)&&jsx("div",{className:"chat-composer-footer shrink-0 p-3",children:jsxs(Ir,{container:D,composer:true,children:[C&&jsx("div",{className:"chat-composer-progress",children:C}),m&&jsxs("div",{role:"alert",className:"chat-composer-alert flex items-center gap-2 px-4 py-2 text-[13px] text-red",children:[jsx("span",{children:m}),b&&jsx("button",{type:"button",onClick:b,className:"underline",children:y("Retry")})]}),I,(!g||x)&&jsxs("div",{className:"chat-composer-input",children:[x&&jsx("div",{className:"chat-composer-accessory",children:x}),!g&&(w===void 0?jsx(yr,{value:G,onValueChange:Z,disabled:d,busy:a,onStop:v,placeholder:R.placeholder,inputLabel:y("Chat prompt"),onSubmit:n?async H=>{let ue=await n(H);return ue!==false&&(me.current=true),ue}:void 0}):w)]})]})})]}),V&&jsx("aside",{className:"chat-composer-side-panel",children:V})]})]})})}):jsx(A,{children:jsxs("div",{className:"flex h-[288px] w-full max-w-95 flex-col self-start overflow-hidden rounded-[14px] bg-surface shadow-card",children:[jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line p-1.5",children:[jsx("div",{className:"flex items-center",children:t.map(H=>jsx("button",{type:"button","aria-pressed":Y===H,onClick:()=>X(H),className:`rounded-[var(--bui-radius-chip)] px-2 py-[3px] text-[13px] text-ink transition-[background-color,opacity] duration-100 ${Y===H?"bg-field":"opacity-50 hover:opacity-75"}`,children:H},H))}),jsx("div",{className:"flex items-center gap-1",children:[jsx("path",{d:"M12 5v14M5 12h14"},"p"),jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 7v5l3 2"})]},"h"),jsxs("g",{fill:"currentColor",stroke:"none",children:[jsx("circle",{cx:"5",cy:"12",r:"1.8"}),jsx("circle",{cx:"12",cy:"12",r:"1.8"}),jsx("circle",{cx:"19",cy:"12",r:"1.8"})]},"e")].map((H,ue)=>jsx("button",{type:"button","aria-label":[y("New"),y("History"),y("More")][ue],onClick:()=>i?.(["new","history","more"][ue]),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3
174
+ `,Pc=r(e=>{switch(e){case "ltr":return {axis:0,posStart:-0.2,posEnd:1.2};case "rtl":return {axis:0,posStart:1.2,posEnd:-0.2};case "ttb":return {axis:1,posStart:-0.2,posEnd:1.2};case "btt":return {axis:1,posStart:1.2,posEnd:-0.2}}},"dirToUniforms");function Za(e={}){if(typeof window>"u")return null;let t=e.canvas??document.createElement("canvas"),o=t.getContext("webgl",{alpha:true,antialias:false,premultipliedAlpha:true});if(!o)return null;let n=r((_,ae)=>{let X=o.createShader(_);return X?(o.shaderSource(X,ae),o.compileShader(X),o.getShaderParameter(X,o.COMPILE_STATUS)?X:(console.error("[glimm] shader compile error:",o.getShaderInfoLog(X)),o.deleteShader(X),null)):null},"compile"),a=n(o.VERTEX_SHADER,Rc);if(!a)return null;let i=n(o.FRAGMENT_SHADER,Nc);if(!i)return o.deleteShader(a),null;let l=o.createProgram();if(!l)return o.deleteShader(a),o.deleteShader(i),null;if(o.attachShader(l,a),o.attachShader(l,i),o.linkProgram(l),!o.getProgramParameter(l,o.LINK_STATUS))return console.error("[glimm] shader link error:",o.getProgramInfoLog(l)),o.deleteProgram(l),o.deleteShader(a),o.deleteShader(i),null;o.useProgram(l);let s=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,s),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),o.STATIC_DRAW);let c=o.getAttribLocation(l,"a");o.enableVertexAttribArray(c),o.vertexAttribPointer(c,2,o.FLOAT,false,0,0);let u=r(_=>o.getUniformLocation(l,_),"u"),g=u("uRes"),d=u("uTime"),m=u("uProgress"),b=u("uAlpha"),v=u("uBandTight"),S=u("uPosStart"),h=u("uPosEnd"),f=u("uHueShift"),w=u("uDirection"),x=u("uWaveAmount"),C=u("uRippleAmount"),I=u("uWaveSpeed"),D=u("uBrightness"),P=u("uSwellAmount"),E=u("uPalA"),V=u("uPalB"),j=u("uPalC"),B=u("uPalD");o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA);let y=r((_,ae,X)=>Math.max(ae,Math.min(X,_)),"clamp"),R={progress:0,alpha:0,palette:e.palette??Qa(void 0),bandTight:y(e.bandTight??14,.1,200),direction:e.direction??"ltr",waveAmount:y(e.waveAmount??0,0,2),rippleAmount:y(e.rippleAmount??1,0,2),waveSpeed:y(e.waveSpeed??1,0,3),brightness:y(e.brightness??1,0,1.5),swellAmount:y(e.swellAmount??.55,0,1)},W=Math.random()*.4,J=r(()=>{let _=Math.min(window.devicePixelRatio||1,2),ae=t.getBoundingClientRect(),X=Math.max(1,Math.round(ae.width*_)),me=Math.max(1,Math.round(ae.height*_));(t.width!==X||t.height!==me)&&(t.width=X,t.height=me,o.viewport(0,0,X,me));},"resize");J();let G=new ResizeObserver(J);G.observe(t);let Z=performance.now(),de=0,le=r(()=>{let _=(performance.now()-Z)/1e3,ae=Pc(R.direction);o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.uniform2f(g,t.width,t.height),o.uniform1f(d,_),o.uniform1f(m,R.progress),o.uniform1f(b,R.alpha),o.uniform1f(v,R.bandTight),o.uniform1f(S,ae.posStart),o.uniform1f(h,ae.posEnd),o.uniform1f(w,ae.axis),o.uniform1f(x,R.waveAmount),o.uniform1f(C,R.rippleAmount),o.uniform1f(I,R.waveSpeed),o.uniform1f(D,R.brightness),o.uniform1f(P,R.swellAmount),o.uniform1f(f,W),o.uniform3f(E,R.palette.a[0],R.palette.a[1],R.palette.a[2]),o.uniform3f(V,R.palette.b[0],R.palette.b[1],R.palette.b[2]),o.uniform3f(j,R.palette.c[0],R.palette.c[1],R.palette.c[2]),o.uniform3f(B,R.palette.d[0],R.palette.d[1],R.palette.d[2]),o.drawArrays(o.TRIANGLE_STRIP,0,4),de=requestAnimationFrame(le);},"tick");return de=requestAnimationFrame(le),{canvas:t,setProgress:r(_=>{R.progress=y(_,0,1);},"setProgress"),setAlpha:r(_=>{R.alpha=y(_,0,1.5);},"setAlpha"),setPalette:r(_=>{R.palette=_;},"setPalette"),setBandTight:r(_=>{R.bandTight=y(_,.1,200);},"setBandTight"),setDirection:r(_=>{R.direction=_;},"setDirection"),setWaveAmount:r(_=>{R.waveAmount=y(_,0,2);},"setWaveAmount"),setRippleAmount:r(_=>{R.rippleAmount=y(_,0,2);},"setRippleAmount"),setWaveSpeed:r(_=>{R.waveSpeed=y(_,0,3);},"setWaveSpeed"),setBrightness:r(_=>{R.brightness=y(_,0,1.5);},"setBrightness"),setSwellAmount:r(_=>{R.swellAmount=y(_,0,1);},"setSwellAmount"),getProgress:r(()=>R.progress,"getProgress"),getAlpha:r(()=>R.alpha,"getAlpha"),destroy:r(()=>{cancelAnimationFrame(de),G.disconnect(),o.deleteProgram(l),o.deleteBuffer(s),o.deleteShader(a),o.deleteShader(i);},"destroy")}}r(Za,"createShader");function Tr(e,t,o,n){let a=r(s=>3*(1-s)*(1-s)*s*e+3*(1-s)*s*s*o+s*s*s,"bezX"),i=r(s=>3*(1-s)*(1-s)*s*t+3*(1-s)*s*s*n+s*s*s,"bezY"),l=r(s=>3*(1-4*s+3*s*s)*e+3*(2*s-3*s*s)*o+3*s*s,"bezXd");return s=>{if(s<=0)return 0;if(s>=1)return 1;let c=s;for(let u=0;u<8;u++){let g=a(c)-s;if(Math.abs(g)<1e-6)break;let d=l(c);if(Math.abs(d)<1e-6)break;c-=g/d;}return i(c)}}r(Tr,"cubicBezier");var Ka={linear:r(e=>e,"linear"),easeOutQuart:r(e=>1-Math.pow(1-e,4),"easeOutQuart"),easeOutCubic:r(e=>1-Math.pow(1-e,3),"easeOutCubic"),easeInCubic:r(e=>e*e*e,"easeInCubic"),easeInOutCubic:r(e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,"easeInOutCubic"),easeOutExpo:r(e=>e===1?1:1-Math.pow(2,-10*e),"easeOutExpo"),easeInOutQuint:r(e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,"easeInOutQuint"),snap:Tr(1,0,.35,.95),ease:Tr(.25,.1,.25,1),back:Tr(.175,.885,.32,1.1)},Mc=r(e=>e?typeof e=="function"?e:Ka[e]:Ka.easeOutQuart,"resolveEasing"),Ic=r(e=>1-Math.pow(1-e,4),"easeOutQuart"),Ac=r(e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,"easeInOutCubic");function Ja(e,t={}){let o=t.sweepMs??1100,n=t.outroMs??700,a=Math.max(0,Math.min(1,t.midpoint??.56)),i=Mc(t.easing??"ease")??Ic,l=Math.max(0,Math.min(1.5,t.peakAlpha??1));t.palette&&e.setPalette(Qa(t.palette)),t.bandTight!==void 0&&e.setBandTight(t.bandTight),t.direction&&e.setDirection(t.direction),t.waveAmount!==void 0&&e.setWaveAmount(t.waveAmount),t.rippleAmount!==void 0&&e.setRippleAmount(t.rippleAmount),t.waveSpeed!==void 0&&e.setWaveSpeed(t.waveSpeed),t.brightness!==void 0&&e.setBrightness(t.brightness),t.swellAmount!==void 0&&e.setSwellAmount(t.swellAmount);let s=false,c=0,u,g,d=new Promise(b=>{u=b;}),m=new Promise(b=>{g=b;});return (async()=>{let b=e.getProgress(),v=b>=.999?0:Math.max(0,Math.min(1,b));e.setAlpha(l),e.setProgress(v);let S=1-v,h=Math.max(80,o*S),f=false,w=Promise.resolve(),x=r(()=>{f=true,w=Promise.resolve().then(()=>t.onMidpoint?.()).then(()=>{}),w.then(u,I=>{console.error("[glimm] midpoint callback failed:",I),u();});},"fireMidpoint"),C=performance.now();await new Promise(I=>{let D=r(()=>{if(s){I();return}let P=Math.min(1,(performance.now()-C)/h),E=i(P),V=v+S*E;e.setProgress(V),!f&&V>=a&&x(),P<1?c=requestAnimationFrame(D):I();},"tick");c=requestAnimationFrame(D);}),!s&&(f||x(),await w.catch(()=>{}),!s&&(await Bc(n,l,0,Ac,e.setAlpha,()=>s,I=>{c=I;}),!s&&(e.setProgress(0),t.onComplete?.(),g())));})(),{midpoint:d,done:m,cancel:r(()=>{s=true,cancelAnimationFrame(c),u(),g();},"cancel")}}r(Ja,"playSweep");function Bc(e,t,o,n,a,i,l){return new Promise(s=>{let c=performance.now(),u=r(()=>{if(i()){s();return}let g=Math.min(1,(performance.now()-c)/e);a(t+(o-t)*n(g)),g<1?l(requestAnimationFrame(u)):s();},"tick");l(requestAnimationFrame(u));})}r(Bc,"runRamp");var ei=jt([wt.red,wt.orange,wt.yellow,wt.green,wt.cyan,wt.blue,wt.purple]);function Gt({children:e,size:t=15,strokeWidth:o=1.8}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e})}r(Gt,"Icon");var Lc={clip:jsx("path",{d:"m21.4 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"}),chart:jsx("path",{d:"M4 20V10M10 20V4M16 20v-7M22 20H2"}),layers:jsxs("g",{children:[jsx("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),jsx("path",{d:"M2 17l10 5 10-5M2 12l10 5 10-5"})]}),globe:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})},Ec={figma:jsxs("svg",{width:"11",height:"16",viewBox:"0 0 38 57","aria-hidden":"true",children:[jsx("path",{d:"M9.5 57A9.5 9.5 0 0 0 19 47.5V38H9.5a9.5 9.5 0 0 0 0 19z",fill:"var(--bui-brand-figma-green)"}),jsx("path",{d:"M0 28.5A9.5 9.5 0 0 1 9.5 19H19v19H9.5A9.5 9.5 0 0 1 0 28.5z",fill:"var(--bui-brand-figma-purple)"}),jsx("path",{d:"M0 9.5A9.5 9.5 0 0 1 9.5 0H19v19H9.5A9.5 9.5 0 0 1 0 9.5z",fill:"var(--bui-brand-figma-red)"}),jsx("path",{d:"M19 0h9.5a9.5 9.5 0 1 1 0 19H19V0z",fill:"var(--bui-brand-figma-orange)"}),jsx("path",{d:"M38 28.5a9.5 9.5 0 1 1-19 0 9.5 9.5 0 0 1 19 0z",fill:"var(--bui-brand-figma-blue)"})]}),slack:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 127 127","aria-hidden":"true",children:[jsx("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"var(--bui-brand-slack-red)"}),jsx("path",{d:"M47 27.2c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.7 39.7.8 47 .8c7.3 0 13.2 5.9 13.2 13.2v13.2H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.3.7 54.4.7 47.1c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"var(--bui-brand-slack-blue)"}),jsx("path",{d:"M99.9 47.1c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V47.1zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.9C66.9 6.6 72.8.7 80.1.7c7.3 0 13.2 5.9 13.2 13.2v33.2z",fill:"var(--bui-brand-slack-green)"}),jsx("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"var(--bui-brand-slack-yellow)"})]}),gmail:jsxs("svg",{width:"15",height:"12",viewBox:"0 0 256 193","aria-hidden":"true",children:[jsx("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"var(--bui-brand-gmail-blue)"}),jsx("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-27.026 25.798v98.91Z",fill:"var(--bui-brand-gmail-green)"}),jsx("path",{d:"m58.182 93.14-4.174-38.647 4.174-36.989L128 69.868l69.818-52.364 4.669 34.992-4.669 40.644L128 145.504 58.182 93.14Z",fill:"var(--bui-brand-gmail-red)"}),jsx("path",{d:"M197.818 17.504V93.14L256 49.504V26.231c0-21.585-24.64-33.89-41.89-20.945l-16.292 12.218Z",fill:"var(--bui-brand-gmail-yellow)"}),jsx("path",{d:"m0 49.504 26.759 20.07L58.182 93.14V17.504L41.89 5.286C24.61-7.66 0 4.646 0 26.23v23.273Z",fill:"var(--bui-brand-gmail-fold)"})]})};function Dc(e){let t=/(^|\s)([@/])([\w-]*)$/.exec(e);return t?{kind:t[2]==="@"?"at":"slash",query:t[3].toLowerCase(),start:t.index+t[1].length}:null}r(Dc,"parseToken");function Rr({variant:e="Rounded",sources:t=[],commands:o=[],models:n=[],files:a=[],connected:i=false,listening:l=false,onAttach:s,onConnect:c,onDictation:u,onModelChange:g,onRemoveAttachment:d,tall:m=false,minRows:b=1,showDictation:v=false,placeholder:S,onSend:h,onSubmit:f,value:w,onValueChange:x,disabled:C=false,busy:I=false,onStop:D,inputLabel:P}){let E=q(),V=e==="Pill",[j,B]=useState(""),y=w??j,R=r(M=>{B(M),x?.(M);},"setDraft"),W=useRef(y);W.current=y;let J=useRef(false),G=useRef(true),[Z,de]=useState(false);useEffect(()=>(G.current=true,()=>{G.current=false;}),[]);let le=t.length>0,_=n.length>0,ae=le||!!s,[X,me]=useState(false),[Pe,N]=useState(false),[L,Y]=useState(false),[K,Me]=useState(n[0]??{key:"",name:E("Model")}),[oe,se]=useState(0),[Ie,H]=useState(false),ue=Math.max(1,Math.min(5,Math.trunc(b)||1)),Ve=Ie||m||ue>1,[Ut,wo]=useState(null),[ko,xt]=useState(false),[Pt,Mt]=useState(null),[z,qe]=useState(null),[Ht,ar]=useState(0),[So,Wt]=useState(0),ao=useRef(null),an=useRef(null),io=useRef(null),Re=useRef(null),It=useRef(null),Ho=useRef([]),k=useRef([]),F=useRef(null),Ae=useRef(null),gt=useRef(false),Oe=X?null:Dc(y),vt=C||Z?null:Pe||Oe?.kind==="at"&&le?"at":Oe?.kind==="slash"&&o.length?"slash":null,so=Pe?"":Oe?.query??"",yt=vt==="at"?t.filter(M=>M.name.toLowerCase().includes(so)):vt==="slash"?o.filter(M=>M.name.slice(1).startsWith(so)):[];useEffect(()=>{se(0),xt(false);},[vt,so]),useLayoutEffect(()=>{let M=Ho.current[oe];M&&wo({top:M.offsetTop,height:M.offsetHeight});},[vt,so,oe,i,yt.length]);let Vt=n.findIndex(M=>M.key===K.key);useLayoutEffect(()=>{if(!L)return;let M=k.current[z??Vt];M&&Mt({top:M.offsetTop,height:M.offsetHeight});},[L,z,Vt]),useLayoutEffect(()=>{if(!L||!ao.current||!It.current)return;let M=ao.current.getBoundingClientRect(),fe=It.current.getBoundingClientRect();ar(Math.max(0,Math.min(fe.left-M.left,M.width-176))),Wt(M.bottom-fe.top+8);},[L,Ve,K.name]),useEffect(()=>{L||qe(null);},[L]);let sn=r(()=>{let M=F.current;if(!M)return null;try{return Za({canvas:M,palette:ei,direction:"ltr",bandTight:10,swellAmount:.85})}catch{return null}},"makeShader");useEffect(()=>{if(n.some(M=>M.accent))return Ae.current=sn(),()=>{Ae.current?.destroy(),Ae.current=null;}},[]);let ir=r(()=>{if(gt.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;Ae.current?.destroy();let M=sn();if(Ae.current=M,!M)return;gt.current=true,Ja(M,{palette:ei,direction:"ltr",sweepMs:570,outroMs:80,peakAlpha:1.3,bandTight:10,brightness:1.4,swellAmount:1,waveSpeed:1.8,easing:"easeOutExpo"}).done.finally(()=>{gt.current=false;});},"celebrate"),sr=r(M=>{Me(M),Y(false),g?.(M.key),M.accent&&ir();},"selectModel");useLayoutEffect(()=>{let M=io.current,fe=an.current,et=Re.current;if(!M||!fe||!et)return;let At=r(()=>{let va=Array.from(fe.children).filter(lr=>lr.tagName==="BUTTON"),bl=parseFloat(getComputedStyle(fe).columnGap)||0,hl=fe.clientWidth-va.reduce((lr,xl)=>lr+xl.offsetWidth,0)-va.length*bl,Wo=getComputedStyle(M),ya=(parseFloat(Wo.paddingTop)||0)+(parseFloat(Wo.paddingBottom)||0);H(y.includes(`
175
+ `)||et.offsetWidth+8>hl);let wa=Math.max(parseFloat(Wo.minHeight)||28,(parseFloat(Wo.lineHeight)||18)*ue+ya),ka=Math.max(wa,(parseFloat(Wo.lineHeight)||18)*5+ya);M.style.height="0px";let Sa=M.scrollHeight;M.style.height=`${Math.min(Math.max(Sa,wa),ka)}px`,M.style.overflowY=Sa>ka?"auto":"hidden";},"resize");At();let ha=fe.clientWidth,xa=new ResizeObserver(()=>{ha!==fe.clientWidth&&(ha=fe.clientWidth,At());});return xa.observe(fe),()=>xa.disconnect()},[y,Ie,m,ue,ae,_,u,v]),useEffect(()=>{if(!L&&!Pe)return;let M=r(fe=>{fe.target.closest("[data-promptbar]")||(Y(false),N(false));},"close");return document.addEventListener("pointerdown",M),()=>document.removeEventListener("pointerdown",M)},[L,Pe]);let ga=r(()=>{N(false),Y(false);},"closeMenus"),fa=r(M=>{t.find(et=>et.key===M.key)?.attach?(s?.(),Oe&&R(y.slice(0,Oe.start))):R(vt==="at"?`${Oe?y.slice(0,Oe.start):y}@${M.name} `:`${Oe?y.slice(0,Oe.start):y}${M.name} `),N(false),me(false),io.current?.focus();},"pick"),ln=(y.trim().length>0||a.length>0)&&!!(f||h)&&!I&&!C&&!Z,ba=r(async()=>{if(!ln||J.current)return;let M=y;J.current=true,de(true),ga();try{let fe=f?await f(M.trim()):void 0;fe!==!1&&await h?.(M.trim()),fe!==!1&&G.current&&W.current===M&&R("");}catch{}finally{J.current=false,G.current&&de(false);}},"send");return jsx(A,{children:jsx("div",{"data-promptbar":true,className:"w-full",children:jsxs("div",{ref:ao,className:"relative",children:[vt&&jsxs("div",{onMouseLeave:()=>xt(false),className:"absolute inset-x-0 bottom-full z-10 mb-2 rounded-[10px] bg-surface p-1 shadow-raised",style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom center"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:Ut?.top??0,height:Ut?.height??0,opacity:Ut&&ko&&yt.length>0?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),yt.map((M,fe)=>{let et=vt==="at"?t.find(At=>At.key===M.key):void 0;return jsxs("button",{type:"button",ref:At=>{Ho.current[fe]=At;},onMouseDown:At=>At.preventDefault(),onMouseEnter:()=>{se(fe),xt(true);},onClick:()=>fa(M),className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[et&&jsx("span",{className:"flex size-5.5 shrink-0 items-center justify-center text-ink-2",children:et.brand?Ec[et.brand]:jsx(Gt,{size:15,children:Lc[et.glyph??"clip"]})}),jsx("span",{className:"shrink-0 text-[12.5px] font-medium text-ink",children:M.name}),jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] text-ink-3",children:M.desc}),et?.connect&&jsx("span",{role:"button",tabIndex:-1,onClick:At=>{At.stopPropagation(),c?.(et?.key??"");},className:`shrink-0 text-[12px] font-medium transition-colors duration-100 ${i?"text-green":"text-accent-ink hover:underline"}`,children:E(i?"Connected":"Connect")})]},M.key)}),yt.length===0&&jsx("div",{className:"flex h-9 items-center px-2 text-[12px] text-ink-3",children:E("noMatches",{query:so})}),jsx("div",{className:"mt-1 border-t border-line px-2 pt-1.5 pb-1 text-[11px] text-ink-3",children:E(vt==="at"?"Type to search sources & files":"Type to search commands")})]}),L&&jsxs("div",{onMouseLeave:()=>qe(null),className:"absolute z-10 w-44 rounded-[10px] bg-surface p-1 shadow-raised",style:{left:Ht,bottom:So,animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom left"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:Pt?.top??0,height:Pt?.height??0,opacity:Pt&&z!==null?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),n.map((M,fe)=>jsxs("button",{type:"button",ref:et=>{k.current[fe]=et;},onMouseDown:et=>et.preventDefault(),onMouseEnter:()=>qe(fe),onClick:()=>{sr(M),io.current?.focus();},className:"relative z-10 flex h-7.5 w-full items-center gap-2 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-ink",children:M.name}),jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:M.tag}),jsx("span",{className:`shrink-0 text-ink ${M.key===K.key?"":"invisible"}`,children:jsx(Gt,{size:13,strokeWidth:2.5,children:jsx("path",{d:"M20 6L9 17l-5-5"})})})]},M.key))]}),jsxs("div",{style:{padding:`var(--bui-token-composer-padding, ${m?"calc(var(--bui-spacing) * 3.5)":"calc(var(--bui-spacing) * 1.5)"})`,borderRadius:`var(--bui-token-radius-control, ${V?a.length>0||Ve?"24px":"9999px":m?"22px":"14px"})`},className:`promptbar-surface relative isolate flex flex-col overflow-hidden border border-line bg-surface shadow-card transition-[border-color,border-radius] duration-150 focus-within:border-line-strong ${m?"gap-2.5 p-3.5":"gap-1.5 p-1.5"} ${V?a.length>0||Ve?"rounded-[24px]":"rounded-full":m?"rounded-[22px]":"rounded-[14px]"}`,children:[jsx("canvas",{ref:F,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 -z-10 h-full w-full",style:{borderRadius:"inherit"}}),jsx("span",{ref:Re,"aria-hidden":"true",className:"promptbar-measure pointer-events-none absolute invisible whitespace-pre text-[13px] leading-[18px]",children:y}),a.length>0&&jsx("div",{className:`flex flex-wrap gap-1.5 pt-0.5 ${V?"px-1":"px-0.5"}`,children:a.map((M,fe)=>jsxs("span",{className:`flex h-6.5 items-center gap-1.5 bg-field py-1 pr-1 pl-1.5 text-[11.5px] text-ink-2 shadow-hairline ${V?"rounded-full":"rounded-chip"}`,style:{animation:"bui-pop-in 200ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx(Gt,{size:12,children:jsxs("g",{children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]})}),jsx("span",{className:"max-w-36 truncate",children:M}),jsx("button",{type:"button","aria-label":`Remove ${M}`,onClick:()=>d?.(fe),className:`-my-1 flex size-6 items-center justify-center text-ink-3 transition-colors duration-100 hover:bg-line/70 hover:text-ink ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-scale-5)]"}`,children:jsx(Gt,{size:10,strokeWidth:2.5,children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]},`${M}-${fe}`))}),jsxs("div",{ref:an,className:"promptbar-controls flex flex-wrap items-end gap-x-1 gap-y-1.5",children:[ae&&jsx("button",{type:"button","aria-label":E("Add attachments and sources"),"aria-expanded":le?Pe:void 0,disabled:C||Z,onClick:()=>{Y(false),le?N(M=>!M):s?.(),io.current?.focus();},className:`flex size-7 shrink-0 items-center justify-center justify-self-start text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover hover:text-ink active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} ${Pe?"bg-hover text-ink":""} `,children:jsx(Gt,{size:16,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),jsx("textarea",{ref:io,style:{minHeight:`var(--bui-token-composer-control-height, ${m?"68px":"calc(var(--bui-spacing) * 7)"})`},rows:ue,value:y,disabled:C||Z,onChange:M=>{R(M.target.value),me(false),N(false);},onKeyDown:M=>{if(!(M.nativeEvent.isComposing||M.keyCode===229)){if(vt&&yt.length>0){if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault(),xt(true),se(fe=>(fe+(M.key==="ArrowDown"?1:yt.length-1))%yt.length);return}if(M.key==="Enter"&&!M.shiftKey||M.key==="Tab"){M.preventDefault(),fa(yt[oe]);return}}if(M.key==="Escape"){me(true),ga();return}M.key==="Enter"&&!M.shiftKey&&!M.nativeEvent.isComposing&&(M.preventDefault(),ba());}},placeholder:l?E("Listening\u2026"):S??E("Write a message\u2026"),"aria-label":P??E("Prompt"),className:`promptbar-input ${m?"min-h-[68px] px-2 py-2 text-[14px] leading-5":"min-h-7 px-1 py-[5px] text-[13px] leading-[18px]"} min-w-0 w-full resize-none bg-transparent text-ink outline-none [overflow-wrap:anywhere] placeholder:text-ink-3 ${Ve?"order-first basis-full":"flex-1"}`}),_&&jsxs("button",{disabled:C||Z,ref:It,type:"button","aria-expanded":L,"aria-label":E("Choose model"),onClick:()=>{N(false),Y(M=>!M);},className:`promptbar-model flex h-7 shrink-0 items-center gap-1 px-1.5 text-[12px] font-medium text-ink-2 transition-colors duration-150 hover:bg-hover hover:text-ink ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} `,children:[K.name,jsx("span",{className:"text-ink-3",children:jsx(Gt,{size:11,strokeWidth:2.4,children:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),Ve&&jsx("span",{className:"flex-1","aria-hidden":"true"}),(v||u)&&jsx("button",{disabled:C||Z||!u,type:"button","aria-label":E(l?"Stop dictation":"Start dictation"),"aria-pressed":l,onClick:()=>u?.(!l),className:`flex size-7 shrink-0 items-center justify-center transition-[background-color,color,transform] duration-150 active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} ${l?"bg-accent-tint text-accent-ink":"text-ink-3 hover:bg-hover hover:text-ink"} `,children:l?jsx("span",{className:"flex h-3.5 items-center gap-[2.5px]",children:[0,1,2].map(M=>jsx("span",{className:"w-[2.5px] rounded-full bg-current",style:{height:"100%",animation:`bui-eq-bounce 900ms ease-in-out ${M*150}ms infinite`}},M))}):jsx(Gt,{size:15,strokeWidth:2,children:jsxs("g",{children:[jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2M12 19v3"})]})})}),jsx("button",{type:"button","aria-label":E(I&&D?"Stop response":"Send"),disabled:I&&D?false:!ln,onClick:I&&D?D:()=>{ba();},className:`flex size-7 shrink-0 items-center justify-center transition-[background-color,color,transform] duration-200 enabled:active:scale-[0.94] ${V?"rounded-[var(--bui-radius-pill)]":"rounded-[var(--bui-radius-control)]"} `,style:{background:ln||I&&D?"var(--bui-token-primary, var(--bui-ink))":"var(--bui-line-strong)",color:ln||I&&D?"var(--bui-token-primary-foreground, var(--bui-surface))":"var(--bui-ink-2)"},children:jsx(Gt,{size:16,strokeWidth:2.4,children:I&&D?jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"currentColor",stroke:"none"}):jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]})]})]})})})}r(Rr,"BUIPromptBar");var ti=Array.from({length:9},(e,t)=>{let o=Math.floor(t/3);return (t%3+Math.abs(o-1))*90}),zc=[0,1,2,5,8,7,6,3],_c=Array.from({length:9},(e,t)=>{let o=zc.indexOf(t);return o===-1?null:o*110}),bn={Drive:{delays:ti,dur:650,round:false},Dots:{delays:ti,dur:650,round:true},Orbit:{delays:_c,dur:950,round:false}};function Nr({delays:e,dur:t,round:o}){return jsx("span",{"aria-hidden":true,className:"grid shrink-0 grid-cols-[repeat(3,4px)] gap-[1.5px]",children:e.map((n,a)=>jsx("span",{className:`size-[4px] bg-ink ${o?"rounded-full":"rounded-[1px]"}`,style:{opacity:n===null?.07:.15,animation:n===null?"none":`bui-pixel-on ${t}ms ease-in-out ${n}ms infinite`}},a))})}r(Nr,"LoaderGrid");function Oc(e){let[t,o]=useState(0),n=e===void 0;if(useEffect(()=>{if(!n)return;let i=setInterval(()=>o(l=>l+1),100);return ()=>clearInterval(i)},[n]),e===null)return;let a=e===void 0?t/10:Math.max(0,e)/1e3;return a<60?`${a.toFixed(1)}s`:`${Math.floor(a/60)}m ${(a%60).toFixed(1)}s`}r(Oc,"useElapsed");function Pr({label:e,variant:t="Drive",videoSrc:o,elapsedMs:n}){let a=q(),i=Oc(n),l=t==="Surfer",s=e??a("Loading"),[c,u]=useState(true),{delays:g,dur:d,round:m}=bn[t]??bn.Drive,b=jsx("span",{className:"min-w-0 [overflow-wrap:anywhere] bg-clip-text text-[13px] font-medium text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:s}),v=i===void 0?null:jsx("span",{className:"shrink-0 whitespace-nowrap font-mono text-[12px] text-ink-3 tabular-nums",children:i});return l?jsx(A,{children:jsxs("div",{"data-bui-loading-state":true,role:"status",className:"flex w-fit flex-col items-start",children:[jsxs("div",{className:"flex items-center gap-2.5",children:[jsx(Nr,{...bn.Drive}),b,v]}),jsx("div",{className:"mt-2 w-56 overflow-hidden rounded-[10px] shadow-overlay",style:{animation:"bui-pop-in 200ms cubic-bezier(0.16,1,0.3,1) both",transformOrigin:"top left"},children:jsx("div",{className:"relative aspect-video w-full",style:{background:"var(--bui-tooltip-bg)"},children:c&&o?jsx("video",{src:o,autoPlay:true,muted:true,loop:true,playsInline:true,onError:()=>u(false),className:"h-full w-full object-cover"}):jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1.5",children:[jsx(Nr,{...bn.Drive}),jsx("span",{className:"px-3 text-center font-mono text-[10px]",style:{color:"var(--bui-tooltip-muted)"},children:a("Video unavailable")})]})})})]})}):jsx(A,{children:jsxs("div",{"data-bui-loading-state":true,role:"status",className:"flex max-w-full w-fit items-center gap-2.5",children:[jsx(Nr,{delays:g,dur:d,round:m}),b,v]})})}r(Pr,"BUILoadingState");var co={locale:"en-US",messages:{canvas:{replaceImage:"Replace image",cropImage:"Crop image",downloadImage:"Download image",useImageReference:"Use as reference",saturationValue:"Saturation and brightness",hue:"Hue",dots:"Dot grid",group:"Group",hexPlaceholder:"#F5F5F5",controls:"Canvas controls",background:"Canvas background",layers:"Layers",minimap:"Minimap",zoom:"Zoom",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Show all elements",zoomTo:r(({percent:e})=>`Zoom to ${e}%`,"zoomTo"),color:r(({value:e})=>`Use ${e}`,"color"),hex:"Hex color",close:"Close",empty:"No layers",element:r(({type:e})=>e,"element")},pagination:{navigation:"Pagination",first:"First",previous:"Previous",next:"Next",last:"Last",page:r(({page:e,pageCount:t})=>`Page ${e} of ${t}`,"page"),currentPage:r(({page:e,pageCount:t})=>`Page ${e} of ${t}, current page`,"currentPage"),emptyResults:"0 results",range:r(({start:e,end:t,total:o})=>`${e}-${t} of ${o}`,"range"),selected:r(({count:e})=>`${e} selected`,"selected"),pageSize:"Items per page",loadBatchSize:"Items per load",perLoad:"Items per load",jumpToPage:"Jump to page",pages:"pages",clickToJump:"Click to jump to a page"},dialog:{close:"Close dialog"},dropdownMenu:{actions:"Actions"},loading:{spinner:"Loading"},layout:{resizePanels:"Resize panels",expandPanel:"Expand",collapsePanel:"Collapse",movePanel:"Move",moveBefore:"Move earlier",moveAfter:"Move later"},steps:{label:"Progress",current:"Current",completed:"Completed",error:"Error",disabled:"Disabled"},numberInput:{increment:"Increase value",decrement:"Decrease value"},passwordInput:{showPassword:"Show password",hidePassword:"Hide password"},multiSelect:{placeholder:"Select options",empty:"No options",removeOption:r(({value:e})=>`Remove ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`Drag column ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`Resize column ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`Sort column ${e}`:"Sort column","sortColumn"),loadingRow:"Loading table row"},toolbar:{theme:{label:"Appearance",toggle:"Toggle theme",auto:"Auto",light:"Light",dark:"Dark"},language:{label:"Language",switch:"Switch language"}},toast:{errorTitle:"Error",warningTitle:"Warning",defaultErrorDescription:"Something went wrong.",defaultWarningDescription:"Please check and try again."},dataExplorer:{viewTree:{actions:"More actions",expand:"Expand",collapse:"Collapse",loading:"Loading...",empty:"No views",error:"Unable to load views"}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},collection:{label:"Collection",loading:"Loading items",empty:"No items",loadError:"Unable to load items",refreshError:"Unable to refresh items",retry:"Retry",loadingMore:"Loading more items",permission:"You do not have permission to view this content",offline:"You appear to be offline",requestAccess:"Request access"},interactiveTable:{columnActions:"Column actions",freezeColumn:"Freeze to left",freezeEndColumn:"Freeze to right",unfreezeColumn:"Unfreeze from left",unfreezeEndColumn:"Unfreeze from right",unfreezeAllColumns:"Unfreeze all columns",resetColumnWidth:"Reset column width",frozenColumnTitle:"Frozen column"}},agentWorkbench:{label:"Session activity",reasoning:"Reasoning",plan:"Plan",taskNoDetail:"No additional details",modes:{chat:"Chat",work:"Work"},composer:{send:"Send message",stop:"Stop generating",queue:"Queue message",attach:"Add photos or files",voice:"Start voice input",webSearch:"Web search",chatMode:"Chat mode",model:"Model",reasoning:"Reasoning effort",permissions:"Permissions",removeAttachment:"Remove attachment",editQueued:"Edit queued message",deleteQueued:"Delete queued message",moveUp:"Move message up",moveDown:"Move message down",queued:"Queued messages",uploading:"Uploading",uploadFailed:"Upload failed",retryAttachment:"Retry attachment upload",noModels:"No models available",message:"Message",attachmentOnly:"Attachment",reasoningOptions:{low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"},permissionOptions:{"approval-required":"Approval required","auto-approve":"Auto approve","full-access":"Full access"}},quickStart:{label:"Quick start",back:"Back",addFile:"Add file"},tool:{input:"Input",output:"Output",status:{pending:"Pending",running:"Running",completed:"Completed",failed:"Error",denied:"Denied"}},approval:{approve:"Approve",reject:"Reject",approved:"Approved",rejected:"Rejected"},artifact:{pending:"Preparing",ready:"Ready",failed:"Failed",open:r(({name:e})=>`Open ${e}`,"open")},run:{stopping:"Stopping...",stoppedAfter:r(({duration:e})=>`You stopped after ${e}`,"stoppedAfter")},process:{running:"Working",queued:"Queued",waitingApproval:"Waiting for approval",failed:"Failed",stopped:"Stopped",processed:"Processed",processedFor:r(({duration:e})=>`Worked for ${e}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} completed`,"completedCount")},artifactWorkspace:{outputs:"Outputs",sources:"Sources",viewAll:"View all",toggleSummary:"Toggle files",tabs:"Open files",closeTab:r(({name:e})=>`Close ${e}`,"closeTab"),closeWorkspace:"Close workspace",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",kinds:{data:"Data view",audio:"Audio",canvas:"Canvas",file:"File",html:"HTML",image:"Image",markdown:"Markdown",pdf:"PDF",presentation:"Presentation",video:"Video",web:"Web page"},collapse:"Collapse",maximize:"Full screen",restore:"Exit full screen",download:r(({name:e})=>`Download ${e}`,"download"),openExternal:r(({name:e})=>`Open ${e} in a new window`,"openExternal"),loading:"Loading preview...",failed:"Preview unavailable",retry:"Try again"},usage:{label:"Context usage",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"Search agents and sessions",searchSessions:"Search sessions",searchShortcut:"Focus search",clearSearch:"Clear search",tabsLabel:"Agent workbench navigation",agents:"Agents",sessions:"Sessions",newAgent:"New Agent",newSession:"New Session",capabilities:"Capabilities & Extensions",settings:"Agent Settings",allAgents:"All Agents",recentSessions:"Recent Sessions",chat:"Chat",work:"Work",chats:"Chats",builtIn:"Built-in",noDescription:"No description",loading:"Loading...",emptyAgents:"No agents yet",emptySessions:"No sessions yet",noResults:"No matching results",retry:"Retry",pin:"Pin",unpin:"Unpin",rename:"Rename",delete:"Delete",actions:"Actions",save:"Save",cancel:"Cancel",running:"Running",completed:"Completed",failed:"Failed",contextUsage:r(({percent:e})=>`${e}% context used`,"contextUsage")},details:{title:"Task details",description:"Summary and workspace activity",duration:"Duration",updated:"Updated",model:"Model",mode:"Mode",permissions:"Permissions",tokenUsage:"Token usage",summary:"Summary",summaryEmpty:"No summary is available yet.",summaryFailed:"The summary could not be generated.",highlights:"Highlights",pendingItems:"Pending items",tabs:{label:"Task detail views",summary:"Summary",workspace:"Workspace"},status:{queued:"Queued",running:"Running",waiting_approval:"Waiting for approval",stopping:"Stopping",stopped:"Stopped",completed:"Completed",failed:"Failed"},state:{loading:{title:"Loading task details",description:"Restoring the latest session activity."},empty:{title:"No task selected",description:"Select a task to inspect its details."},error:{title:"Unable to load task details",description:"Try again after the session is available."}},actions:{close:"Close task details",copySummary:"Copy summary",retry:"Retry",retrySummary:"Retry summary",resume:"Resume",continueInNewTask:"Continue in new task",editAndRerun:"Edit and rerun",export:"Export"},workspace:{diffs:"Code changes",files:"Files",terminals:"Terminals",tests:"Tests",artifacts:"Artifacts",exitCode:r(({code:e})=>`Exit code ${e}`,"exitCode"),diffStatus:{added:"Added",modified:"Modified",deleted:"Deleted",renamed:"Renamed"},fileOperation:{upsert:"Updated",delete:"Deleted"}}}}}};var ni={locale:"zh-CN",messages:{canvas:{replaceImage:"\u66FF\u6362\u56FE\u7247",cropImage:"\u88C1\u526A\u56FE\u7247",downloadImage:"\u4E0B\u8F7D\u56FE\u7247",useImageReference:"\u7528\u4F5C\u53C2\u8003\u56FE",saturationValue:"\u9971\u548C\u5EA6\u4E0E\u660E\u5EA6",hue:"\u8272\u76F8",dots:"\u80CC\u666F\u70B9\u9635",group:"\u5206\u7EC4",hexPlaceholder:"#F5F5F5",controls:"\u753B\u5E03\u63A7\u5236",background:"\u753B\u5E03\u80CC\u666F\u8272",layers:"\u56FE\u5C42",minimap:"\u5C0F\u5730\u56FE",zoom:"\u7F29\u653E",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u663E\u793A\u753B\u5E03\u6240\u6709\u5143\u7D20",zoomTo:r(({percent:e})=>`\u7F29\u653E\u81F3 ${e}%`,"zoomTo"),color:r(({value:e})=>`\u4F7F\u7528 ${e}`,"color"),hex:"\u5341\u516D\u8FDB\u5236\u989C\u8272",close:"\u5173\u95ED",empty:"\u6682\u65E0\u56FE\u5C42",element:r(({type:e})=>({image:"\u56FE\u7247",text:"\u6587\u5B57",rectangle:"\u77E9\u5F62",ellipse:"\u692D\u5706",diamond:"\u83F1\u5F62",arrow:"\u7BAD\u5934",line:"\u7EBF\u6761",freedraw:"\u81EA\u7531\u7ED8\u5236",frame:"\u753B\u6846",embeddable:"\u5D4C\u5165\u5185\u5BB9",iframe:"\u7F51\u9875",magicframe:"\u753B\u6846"})[e]||"\u5143\u7D20","element")},pagination:{navigation:"\u5206\u9875\u5BFC\u822A",first:"\u9996\u9875",previous:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",last:"\u672B\u9875",page:r(({page:e,pageCount:t})=>`\u7B2C ${e} \u9875\uFF0C\u5171 ${t} \u9875`,"page"),currentPage:r(({page:e,pageCount:t})=>`\u7B2C ${e} \u9875\uFF0C\u5171 ${t} \u9875\uFF0C\u5F53\u524D\u9875`,"currentPage"),emptyResults:"\u5171 0 \u6761",range:r(({start:e,end:t,total:o})=>`\u7B2C ${e}-${t} \u6761\uFF0C\u5171 ${o} \u6761`,"range"),selected:r(({count:e})=>`\u5DF2\u9009\u62E9 ${e} \u9879`,"selected"),pageSize:"\u6BCF\u9875\u663E\u793A\u6570\u91CF",loadBatchSize:"\u6BCF\u6B21\u52A0\u8F7D\u6570\u91CF",perLoad:"\u6BCF\u6B21\u52A0\u8F7D",jumpToPage:"\u8DF3\u8F6C\u5230\u9875\u7801",pages:"\u9875",clickToJump:"\u70B9\u51FB\u8DF3\u8F6C\u9875\u7801"},dialog:{close:"\u5173\u95ED\u5BF9\u8BDD\u6846"},dropdownMenu:{actions:"\u64CD\u4F5C"},loading:{spinner:"\u6B63\u5728\u52A0\u8F7D"},layout:{resizePanels:"\u8C03\u6574\u9762\u677F\u5927\u5C0F",expandPanel:"\u5C55\u5F00",collapsePanel:"\u6536\u8D77",movePanel:"\u79FB\u52A8",moveBefore:"\u5411\u524D\u79FB\u52A8",moveAfter:"\u5411\u540E\u79FB\u52A8"},steps:{label:"\u8FDB\u5EA6",current:"\u5F53\u524D\u6B65\u9AA4",completed:"\u5DF2\u5B8C\u6210",error:"\u9519\u8BEF",disabled:"\u5DF2\u7981\u7528"},numberInput:{increment:"\u589E\u52A0\u6570\u503C",decrement:"\u51CF\u5C11\u6570\u503C"},passwordInput:{showPassword:"\u663E\u793A\u5BC6\u7801",hidePassword:"\u9690\u85CF\u5BC6\u7801"},multiSelect:{placeholder:"\u8BF7\u9009\u62E9",empty:"\u6682\u65E0\u9009\u9879",removeOption:r(({value:e})=>`\u79FB\u9664 ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`\u62D6\u52A8\u5217 ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`\u8C03\u6574\u5217\u5BBD ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`\u6392\u5E8F\u5217 ${e}`:"\u6392\u5E8F\u5217","sortColumn"),loadingRow:"\u6B63\u5728\u52A0\u8F7D\u8868\u683C\u884C"},toolbar:{theme:{label:"\u5916\u89C2",toggle:"\u5207\u6362\u4E3B\u9898",auto:"\u8DDF\u968F\u7CFB\u7EDF",light:"\u6D45\u8272\u6A21\u5F0F",dark:"\u6DF1\u8272\u6A21\u5F0F"},language:{label:"\u8BED\u8A00",switch:"\u5207\u6362\u8BED\u8A00"}},toast:{errorTitle:"\u9519\u8BEF",warningTitle:"\u63D0\u793A",defaultErrorDescription:"\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",defaultWarningDescription:"\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5\u3002"},dataExplorer:{viewTree:{actions:"\u66F4\u591A\u64CD\u4F5C",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u6B63\u5728\u52A0\u8F7D...",empty:"\u6682\u65E0\u89C6\u56FE",error:"\u65E0\u6CD5\u52A0\u8F7D\u89C6\u56FE"}},workbench:{relationshipGraph:{zoomOut:"\u7F29\u5C0F",zoomIn:"\u653E\u5927",zoomToFit:"\u9002\u5E94\u753B\u5E03",minimap:"\u56FE\u8C31\u6982\u89C8"},collection:{label:"\u5185\u5BB9\u96C6\u5408",loading:"\u6B63\u5728\u52A0\u8F7D\u5185\u5BB9",empty:"\u6682\u65E0\u5185\u5BB9",loadError:"\u65E0\u6CD5\u52A0\u8F7D\u5185\u5BB9",refreshError:"\u65E0\u6CD5\u5237\u65B0\u5185\u5BB9",retry:"\u91CD\u8BD5",loadingMore:"\u6B63\u5728\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9",permission:"\u4F60\u6CA1\u6709\u6743\u9650\u67E5\u770B\u6B64\u5185\u5BB9",offline:"\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00",requestAccess:"\u7533\u8BF7\u6743\u9650"},interactiveTable:{columnActions:"\u5217\u64CD\u4F5C",freezeColumn:"\u56FA\u5B9A\u5230\u5DE6\u4FA7",freezeEndColumn:"\u56FA\u5B9A\u5230\u53F3\u4FA7",unfreezeColumn:"\u53D6\u6D88\u5DE6\u4FA7\u56FA\u5B9A",unfreezeEndColumn:"\u53D6\u6D88\u53F3\u4FA7\u56FA\u5B9A",unfreezeAllColumns:"\u53D6\u6D88\u5168\u90E8\u56FA\u5B9A",resetColumnWidth:"\u91CD\u7F6E\u5217\u5BBD",frozenColumnTitle:"\u5DF2\u56FA\u5B9A\u5217"}},agentWorkbench:{label:"\u4F1A\u8BDD\u6D3B\u52A8",reasoning:"\u601D\u8003\u8FC7\u7A0B",plan:"\u6267\u884C\u8BA1\u5212",taskNoDetail:"\u6682\u65E0\u66F4\u591A\u8BE6\u60C5",modes:{chat:"\u5BF9\u8BDD",work:"\u5DE5\u4F5C"},composer:{send:"\u53D1\u9001\u6D88\u606F",stop:"\u505C\u6B62\u751F\u6210",queue:"\u6392\u961F\u53D1\u9001",attach:"\u6DFB\u52A0\u7167\u7247\u6216\u6587\u4EF6",voice:"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",webSearch:"\u8054\u7F51\u641C\u7D22",chatMode:"\u5BF9\u8BDD\u6A21\u5F0F",model:"\u6A21\u578B",reasoning:"\u601D\u8003\u5F3A\u5EA6",permissions:"\u6743\u9650",removeAttachment:"\u79FB\u9664\u9644\u4EF6",editQueued:"\u7F16\u8F91\u6392\u961F\u6D88\u606F",deleteQueued:"\u5220\u9664\u6392\u961F\u6D88\u606F",moveUp:"\u4E0A\u79FB\u6D88\u606F",moveDown:"\u4E0B\u79FB\u6D88\u606F",queued:"\u6392\u961F\u6D88\u606F",uploading:"\u4E0A\u4F20\u4E2D",uploadFailed:"\u4E0A\u4F20\u5931\u8D25",retryAttachment:"\u91CD\u8BD5\u9644\u4EF6\u4E0A\u4F20",noModels:"\u6682\u65E0\u53EF\u7528\u6A21\u578B",message:"\u6D88\u606F",attachmentOnly:"\u9644\u4EF6",reasoningOptions:{low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",xhigh:"\u6700\u9AD8"},permissionOptions:{"approval-required":"\u9700\u8981\u6279\u51C6","auto-approve":"\u81EA\u52A8\u6279\u51C6","full-access":"\u5B8C\u5168\u8BBF\u95EE"}},quickStart:{label:"\u5FEB\u901F\u5F00\u59CB",back:"\u8FD4\u56DE",addFile:"\u6DFB\u52A0\u6587\u4EF6"},tool:{input:"\u8F93\u5165",output:"\u8F93\u51FA",status:{pending:"\u7B49\u5F85\u4E2D",running:"\u8FD0\u884C\u4E2D",completed:"\u5DF2\u5B8C\u6210",failed:"\u9519\u8BEF",denied:"\u5DF2\u62D2\u7EDD"}},approval:{approve:"\u5141\u8BB8",reject:"\u62D2\u7EDD",approved:"\u5DF2\u5141\u8BB8",rejected:"\u5DF2\u62D2\u7EDD"},artifact:{pending:"\u51C6\u5907\u4E2D",ready:"\u5DF2\u5C31\u7EEA",failed:"\u5931\u8D25",open:r(({name:e})=>`\u6253\u5F00 ${e}`,"open")},run:{stopping:"\u6B63\u5728\u505C\u6B62...",stoppedAfter:r(({duration:e})=>`\u4F60\u5728 ${e} \u540E\u505C\u6B62\u4E86\u4EFB\u52A1`,"stoppedAfter")},process:{running:"\u6267\u884C\u8FC7\u7A0B",queued:"\u6392\u961F\u4E2D",waitingApproval:"\u7B49\u5F85\u5BA1\u6279",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62",processed:"\u5DF2\u5904\u7406",processedFor:r(({duration:e})=>`\u8017\u65F6 ${e.replace(/(\d+)h/g,"$1\u5C0F\u65F6").replace(/(\d+)m/g,"$1\u5206\u949F").replace(/(\d+)s/g,"$1\u79D2").replace(/\s+/g,"")}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} \u5DF2\u5B8C\u6210`,"completedCount")},artifactWorkspace:{outputs:"\u8F93\u51FA",sources:"\u6765\u6E90",viewAll:"\u67E5\u770B\u5168\u90E8",toggleSummary:"\u5207\u6362\u6587\u4EF6\u6458\u8981",tabs:"\u5DF2\u6253\u5F00\u6587\u4EF6",closeTab:r(({name:e})=>`\u5173\u95ED ${e}`,"closeTab"),closeWorkspace:"\u5173\u95ED\u5DE5\u4F5C\u533A",close:"\u5173\u95ED",closeOthers:"\u5173\u95ED\u5176\u4ED6\u6807\u7B7E\u9875",closeRight:"\u5173\u95ED\u53F3\u4FA7\u6807\u7B7E\u9875",closeAll:"\u5173\u95ED\u6240\u6709\u6807\u7B7E\u9875",kinds:{data:"\u6570\u636E\u89C6\u56FE",audio:"\u97F3\u9891",canvas:"\u753B\u677F",file:"\u6587\u4EF6",html:"HTML",image:"\u56FE\u7247",markdown:"Markdown",pdf:"PDF",presentation:"\u6F14\u793A\u6587\u7A3F",video:"\u89C6\u9891",web:"\u7F51\u9875"},collapse:"\u6536\u8D77",maximize:"\u5168\u5C4F",restore:"\u9000\u51FA\u5168\u5C4F",download:r(({name:e})=>`\u4E0B\u8F7D ${e}`,"download"),openExternal:r(({name:e})=>`\u5728\u65B0\u7A97\u53E3\u6253\u5F00 ${e}`,"openExternal"),loading:"\u6B63\u5728\u52A0\u8F7D\u9884\u89C8...",failed:"\u9884\u89C8\u4E0D\u53EF\u7528",retry:"\u91CD\u8BD5"},usage:{label:"\u4E0A\u4E0B\u6587\u7528\u91CF",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"\u641C\u7D22\u667A\u80FD\u4F53\u548C\u4F1A\u8BDD",searchSessions:"\u641C\u7D22\u4F1A\u8BDD",searchShortcut:"\u805A\u7126\u641C\u7D22\u6846",clearSearch:"\u6E05\u9664\u641C\u7D22",tabsLabel:"\u667A\u80FD\u4F53\u5DE5\u4F5C\u53F0\u5BFC\u822A",agents:"\u667A\u80FD\u4F53",sessions:"\u4F1A\u8BDD",newAgent:"\u65B0\u5EFA\u667A\u80FD\u4F53",newSession:"\u65B0\u5EFA\u4F1A\u8BDD",capabilities:"\u80FD\u529B\u4E0E\u6269\u5C55",settings:"\u667A\u80FD\u4F53\u8BBE\u7F6E",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",recentSessions:"\u6700\u8FD1\u4F1A\u8BDD",chat:"\u5BF9\u8BDD",work:"\u5DE5\u4F5C",chats:"\u804A\u5929",builtIn:"\u5185\u7F6E",noDescription:"\u6682\u65E0\u63CF\u8FF0",loading:"\u52A0\u8F7D\u4E2D...",emptyAgents:"\u6682\u65E0\u667A\u80FD\u4F53",emptySessions:"\u6682\u65E0\u4F1A\u8BDD",noResults:"\u6CA1\u6709\u5339\u914D\u7ED3\u679C",retry:"\u91CD\u8BD5",pin:"\u7F6E\u9876",unpin:"\u53D6\u6D88\u7F6E\u9876",rename:"\u91CD\u547D\u540D",delete:"\u5220\u9664",actions:"\u64CD\u4F5C",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",running:"\u8FD0\u884C\u4E2D",completed:"\u5DF2\u5B8C\u6210",failed:"\u5931\u8D25",contextUsage:r(({percent:e})=>`\u5DF2\u4F7F\u7528 ${e}% \u4E0A\u4E0B\u6587`,"contextUsage")},details:{title:"\u4EFB\u52A1\u8BE6\u60C5",description:"\u6458\u8981\u4E0E\u5DE5\u4F5C\u533A\u6D3B\u52A8",duration:"\u8017\u65F6",updated:"\u66F4\u65B0\u65F6\u95F4",model:"\u6A21\u578B",mode:"\u6A21\u5F0F",permissions:"\u6743\u9650",tokenUsage:"Token \u7528\u91CF",summary:"\u6458\u8981",summaryEmpty:"\u6682\u65F6\u6CA1\u6709\u53EF\u7528\u6458\u8981\u3002",summaryFailed:"\u6458\u8981\u751F\u6210\u5931\u8D25\u3002",highlights:"\u91CD\u70B9",pendingItems:"\u5F85\u5904\u7406\u4E8B\u9879",tabs:{label:"\u4EFB\u52A1\u8BE6\u60C5\u89C6\u56FE",summary:"\u6458\u8981",workspace:"\u5DE5\u4F5C\u533A"},status:{queued:"\u6392\u961F\u4E2D",running:"\u8FD0\u884C\u4E2D",waiting_approval:"\u7B49\u5F85\u5BA1\u6279",stopping:"\u6B63\u5728\u505C\u6B62",stopped:"\u5DF2\u505C\u6B62",completed:"\u5DF2\u5B8C\u6210",failed:"\u5931\u8D25"},state:{loading:{title:"\u6B63\u5728\u52A0\u8F7D\u4EFB\u52A1\u8BE6\u60C5",description:"\u6B63\u5728\u6062\u590D\u6700\u65B0\u7684\u4F1A\u8BDD\u6D3B\u52A8\u3002"},empty:{title:"\u672A\u9009\u62E9\u4EFB\u52A1",description:"\u9009\u62E9\u4EFB\u52A1\u540E\u67E5\u770B\u8BE6\u7EC6\u4FE1\u606F\u3002"},error:{title:"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u8BE6\u60C5",description:"\u4F1A\u8BDD\u6062\u590D\u53EF\u7528\u540E\u8BF7\u91CD\u8BD5\u3002"}},actions:{close:"\u5173\u95ED\u4EFB\u52A1\u8BE6\u60C5",copySummary:"\u590D\u5236\u6458\u8981",retry:"\u91CD\u8BD5",retrySummary:"\u91CD\u65B0\u751F\u6210\u6458\u8981",resume:"\u7EE7\u7EED\u8FD0\u884C",continueInNewTask:"\u5728\u65B0\u4EFB\u52A1\u4E2D\u7EE7\u7EED",editAndRerun:"\u7F16\u8F91\u5E76\u91CD\u65B0\u8FD0\u884C",export:"\u5BFC\u51FA"},workspace:{diffs:"\u4EE3\u7801\u53D8\u66F4",files:"\u6587\u4EF6",terminals:"\u7EC8\u7AEF",tests:"\u6D4B\u8BD5",artifacts:"\u4EA7\u7269",exitCode:r(({code:e})=>`\u9000\u51FA\u7801 ${e}`,"exitCode"),diffStatus:{added:"\u65B0\u589E",modified:"\u4FEE\u6539",deleted:"\u5220\u9664",renamed:"\u91CD\u547D\u540D"},fileOperation:{upsert:"\u5DF2\u66F4\u65B0",delete:"\u5DF2\u5220\u9664"}}}}}};var Fc={"en-US":co,"zh-CN":ni};function ri(e){if(typeof e!="string"||!e.trim())throw new TypeError("Monkeys locale must be a non-empty BCP 47 string.");try{return Intl.getCanonicalLocales(e)[0]}catch{throw new RangeError(`Monkeys locale "${e}" is not a valid BCP 47 identifier.`)}}r(ri,"normalizeLocaleId");function Ko(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}r(Ko,"isRecord");function ai(e,t,o){if(!Ko(e)||!Ko(t))throw new TypeError(`${o} must be an object.`);for(let[n,a]of Object.entries(e)){if(a===void 0)continue;if(!(n in t))throw new TypeError(`${o}.${n} is not a supported Monkeys message.`);let i=t[n],l=`${o}.${n}`;if(typeof i=="function"){if(typeof a!="function")throw new TypeError(`${l} must be a function.`)}else if(typeof i=="string"){if(typeof a!="string")throw new TypeError(`${l} must be a string.`)}else ai(a,i,l);}}r(ai,"validateMessageOverride");function ii(e,t){let o=Ko(e)?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="beautiful")):e;if(ai(o,co.messages,t),Ko(e)&&e.beautiful!==void 0){if(!Ko(e.beautiful))throw new TypeError(`${t}.beautiful must be an object.`);for(let[n,a]of Object.entries(e.beautiful))if(a!==void 0&&typeof a!="string")throw new TypeError(`${t}.beautiful.${n} must be a string.`)}}r(ii,"assertMessagesOverride");function si(e){return e==="en-US"||e==="zh-CN"}r(si,"isBuiltInLocale");function $c(e){if(e===void 0)return {locale:void 0,messages:void 0,hasExplicitLocale:false};if(typeof e=="string"){let o=ri(e);if(!si(o))throw new RangeError(`Unsupported built-in Monkeys locale "${o}". Provide a locale pack object for custom locales.`);return {locale:o,messages:void 0,hasExplicitLocale:true}}if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("Monkeys locale must be a locale id or locale pack object.");let t=ri(e.locale);return ii(e.messages,"Monkeys locale messages"),{locale:t,messages:e.messages,hasExplicitLocale:true}}r($c,"normalizeLocaleInput");function Ro(e,t){return t?{canvas:{...e.canvas,...t.canvas},beautiful:{...e.beautiful,...t.beautiful},pagination:{...e.pagination,...t.pagination},dialog:{...e.dialog,...t.dialog},dropdownMenu:{...e.dropdownMenu,...t.dropdownMenu},loading:{...e.loading,...t.loading},layout:{...e.layout,...t.layout},steps:{...e.steps,...t.steps},numberInput:{...e.numberInput,...t.numberInput},passwordInput:{...e.passwordInput,...t.passwordInput},multiSelect:{...e.multiSelect,...t.multiSelect},table:{...e.table,...t.table},toolbar:{theme:{...e.toolbar.theme,...t.toolbar?.theme},language:{...e.toolbar.language,...t.toolbar?.language}},toast:{...e.toast,...t.toast},dataExplorer:{viewTree:{...e.dataExplorer.viewTree,...t.dataExplorer?.viewTree}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview",...e.workbench.relationshipGraph,...t.workbench?.relationshipGraph},collection:{...e.workbench.collection,...t.workbench?.collection},interactiveTable:{...e.workbench.interactiveTable,...t.workbench?.interactiveTable}},agentWorkbench:{...e.agentWorkbench,...t.agentWorkbench,modes:{...e.agentWorkbench.modes,...t.agentWorkbench?.modes},composer:{...e.agentWorkbench.composer,...t.agentWorkbench?.composer},quickStart:{...e.agentWorkbench.quickStart,...t.agentWorkbench?.quickStart},tool:{...e.agentWorkbench.tool,...t.agentWorkbench?.tool,status:{...e.agentWorkbench.tool.status,...t.agentWorkbench?.tool?.status}},approval:{...e.agentWorkbench.approval,...t.agentWorkbench?.approval},artifact:{...e.agentWorkbench.artifact,...t.agentWorkbench?.artifact},run:{...e.agentWorkbench.run,...t.agentWorkbench?.run},process:{...e.agentWorkbench.process,...t.agentWorkbench?.process},artifactWorkspace:{...e.agentWorkbench.artifactWorkspace,...t.agentWorkbench?.artifactWorkspace},usage:{...e.agentWorkbench.usage,...t.agentWorkbench?.usage},navigation:{...e.agentWorkbench.navigation,...t.agentWorkbench?.navigation},details:{...e.agentWorkbench.details,...t.agentWorkbench?.details,tabs:{...e.agentWorkbench.details.tabs,...t.agentWorkbench?.details?.tabs},status:{...e.agentWorkbench.details.status,...t.agentWorkbench?.details?.status},state:{loading:{...e.agentWorkbench.details.state.loading,...t.agentWorkbench?.details?.state?.loading},empty:{...e.agentWorkbench.details.state.empty,...t.agentWorkbench?.details?.state?.empty},error:{...e.agentWorkbench.details.state.error,...t.agentWorkbench?.details?.state?.error}},actions:{...e.agentWorkbench.details.actions,...t.agentWorkbench?.details?.actions},workspace:{...e.agentWorkbench.details.workspace,...t.agentWorkbench?.details?.workspace,diffStatus:{...e.agentWorkbench.details.workspace.diffStatus,...t.agentWorkbench?.details?.workspace?.diffStatus},fileOperation:{...e.agentWorkbench.details.workspace.fileOperation,...t.agentWorkbench?.details?.workspace?.fileOperation}}}}}:e}r(Ro,"mergeMonkeysLocaleMessages");var Mr={locale:co.locale,messages:Ro(co.messages)};function Ir(e,t,o){t!==void 0&&ii(t,"MonkeysProvider messages");let n=$c(e),a=n.locale??o?.locale??co.locale,i=si(a)?Fc[a].messages:void 0,l=Ro(co.messages,i);return o&&(!n.hasExplicitLocale||o.locale===a)&&(l=Ro(l,o.messages)),l=Ro(l,n.messages),l=Ro(l,t),{locale:a,messages:l}}r(Ir,"resolveMonkeysLocale");var Wc="com.infmonkeys.css";function Br(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(Br,"isRecord");function Vc(e){let t=e?.[Wc];return Br(t)?t:void 0}r(Vc,"readCssExtension");function Ye(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))}r(Ye,"formatNumber");function qt(e){return `${Ye(e.value)}${e.unit}`}r(qt,"formatDimension");function Ar(e){return `${Ye(e.value)}${e.unit}`}r(Ar,"formatDuration");function uo(e){return e==="none"?e:Ye(e)}r(uo,"formatColorComponent");function jc(e){return [Number.parseInt(e.slice(1,3),16)/255,Number.parseInt(e.slice(3,5),16)/255,Number.parseInt(e.slice(5,7),16)/255]}r(jc,"hexToSrgb");function Gc(e){if(e.colorSpace==="srgb"&&e.components.every(t=>typeof t=="number"))return e.components;if(e.hex)return jc(e.hex);throw new TypeError(`Web semantic colors in ${e.colorSpace} require a six-digit hex fallback for hsl(var(--token)) consumers.`)}r(Gc,"colorSrgbComponents");function qc([e,t,o]){let n=Math.max(e,t,o),a=Math.min(e,t,o),i=(n+a)/2;if(n===a)return [0,0,i*100];let l=n-a,s=i>.5?l/(2-n-a):l/(n+a),c;return n===e?c=(t-o)/l+(t<o?6:0):n===t?c=(o-e)/l+2:c=(e-t)/l+4,[c/6*360,s*100,i*100]}r(qc,"srgbToHsl");function Kc(e){if(e.colorSpace==="hsl"&&e.components.every(a=>typeof a=="number")){let[a,i,l]=e.components;return `${Ye(a)} ${Ye(i)}% ${Ye(l)}%`}let[t,o,n]=qc(Gc(e));return `${Ye(t)} ${Ye(o)}% ${Ye(n)}%`}r(Kc,"formatHslTriplet");function xn(e){let t=e.alpha??1;if(e.hex&&t===1)return e.hex;let o=e.components.map(uo).join(" "),n=t===1?"":` / ${Ye(t)}`;switch(e.colorSpace){case "srgb":return `rgb(${e.components.map(i=>i==="none"?"none":Ye(i*255)).join(" ")}${n})`;case "hsl":return `hsl(${uo(e.components[0])} ${uo(e.components[1])}% ${uo(e.components[2])}%${n})`;case "hwb":return `hwb(${uo(e.components[0])} ${uo(e.components[1])}% ${uo(e.components[2])}%${n})`;case "lab":case "lch":case "oklab":case "oklch":return `${e.colorSpace}(${o}${n})`;default:return `color(${e.colorSpace} ${o}${n})`}}r(xn,"formatColor");function li(e){let t=Array.isArray(e)?e:[e],o=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);return t.map(n=>o.has(n)||/^[a-zA-Z][\w-]*$/.test(n)?n:`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`).join(", ")}r(li,"formatFontFamily");function Xc(e){return (Array.isArray(e)?e:[e]).map(o=>{if(!Br(o))throw new TypeError("DTCG shadow values must be objects.");return [qt(o.offsetX),qt(o.offsetY),qt(o.blur),qt(o.spread),xn(o.color),o.inset===true?"inset":""].filter(Boolean).join(" ")}).join(", ")}r(Xc,"formatShadow");function Yc(e,t){if(!Array.isArray(e))throw new TypeError("DTCG gradient values must be arrays.");let o=e.map(a=>{if(!Br(a))throw new TypeError("DTCG gradient stops must be objects.");return `${xn(a.color)} ${Ye(Number(a.position)*100)}%`}).join(", "),n=Vc(t)?.gradient;return n?.kind==="radial"?`radial-gradient(${o})`:`linear-gradient(${Ye(n?.angle??90)}deg, ${o})`}r(Yc,"formatGradient");function ci(e){switch(e.type){case "color":return xn(e.value);case "dimension":return qt(e.value);case "fontFamily":return li(e.value);case "fontWeight":case "number":return String(e.value);case "duration":return Ar(e.value);case "cubicBezier":return `cubic-bezier(${e.value.map(Ye).join(", ")})`;case "strokeStyle":return typeof e.value=="string"?e.value:e.value.dashArray.map(qt).join(" ");case "border":{let t=e.value,o={...e,type:"strokeStyle",value:t.style};return `${qt(t.width)} ${ci(o)} ${xn(t.color)}`}case "transition":{let t=e.value;return `${Ar(t.duration)} cubic-bezier(${t.timingFunction.map(Ye).join(", ")}) ${Ar(t.delay)}`}case "shadow":return Xc(e.value);case "gradient":return Yc(e.value,e.extensions);case "typography":{let t=e.value;return `${t.fontWeight} ${qt(t.fontSize)}/${Ye(t.lineHeight)} ${li(t.fontFamily)}`}}}r(ci,"formatTokenValue");function di(e,t){let o=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase();return `--${t}-${o}`}r(di,"toCssVariableName");function Qc(e){if(!/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e))throw new TypeError("Theme token variablePrefix must start with a letter and contain only letters, numbers, or hyphens.")}r(Qc,"assertCssVariablePrefix");function Zc(e,t,o){let n=`${t}.${o}`;return e.has(n)?n:e.has(t)?t:void 0}r(Zc,"selectModePath");var Jc={"semantic.color.background":"--background","semantic.color.foreground":"--foreground","semantic.color.card":"--card","semantic.color.card-foreground":"--card-foreground","semantic.color.popover":"--popover","semantic.color.popover-foreground":"--popover-foreground","semantic.color.primary":"--primary","semantic.color.primary-foreground":"--primary-foreground","semantic.color.secondary":"--secondary","semantic.color.secondary-foreground":"--secondary-foreground","semantic.color.muted":"--muted","semantic.color.muted-foreground":"--muted-foreground","semantic.color.accent":"--accent","semantic.color.accent-foreground":"--accent-foreground","semantic.color.destructive":"--destructive","semantic.color.destructive-foreground":"--destructive-foreground","semantic.color.success":"--success","semantic.color.success-foreground":"--success-foreground","semantic.color.warning":"--warning","semantic.color.warning-foreground":"--warning-foreground","semantic.color.border":"--border","semantic.color.input":"--input","semantic.color.ring":"--ring","semantic.color.media-surface":"--media-surface","semantic.color.media-foreground":"--media-foreground","semantic.color.media-overlay":"--media-overlay","semantic.color.radar-canvas":"--radar-canvas","semantic.color.radar-panel":"--radar-panel","semantic.color.radar-border":"--radar-border","semantic.color.radar-shell-border":"--radar-shell-border","semantic.color.radar-grid":"--radar-grid","semantic.color.radar-axis":"--radar-axis","semantic.color.radar-series-one":"--radar-series-one","semantic.color.radar-series-two":"--radar-series-two","semantic.color.radar-series-three":"--radar-series-three","semantic.color.radar-series-four":"--radar-series-four"},ed=Object.freeze({...Object.fromEntries(["grid","axis","fillStart","fillEnd","glow","label","value"].map(e=>[`component.chart.radar.${e}`,{variableName:di(`chart.radar.${e}`,"monkeys"),axis:"colorMode",expectedType:"color",format:"css"}])),...Object.fromEntries(Object.entries(Jc).map(([e,t])=>[e,{variableName:t,axis:"colorMode",expectedType:"color",format:"hsl"}])),"semantic.color.neocard":{variableName:"--neocard",axis:"colorMode",expectedType:"color",format:"css"},"semantic.radius.base":{variableName:"--radius",axis:"colorMode",expectedType:"dimension",format:"css"},"semantic.spacing.global":{variableName:"--global-spacing",axis:"density",expectedType:"dimension",format:"css"},"semantic.gradient.brand":{variableName:"--monkeys-gradient",axis:"colorMode",expectedType:"gradient",format:"css"},"semantic.font.body":{variableName:"--font-sans",axis:"colorMode",expectedType:"fontFamily",format:"css"}});function Lr(e,t={}){let o=resolveThemeTokens(e),n=o.document,a=t.colorMode??"light",i=t.density??"default",l=t.variablePrefix??"monkeys";Qc(l);let s={},c={},u={},g=new Map;for(let[b,v]of o.tokens){s[b]=v.value;let S=ci(v);c[b]=S;let h=di(b,l),f=g.get(h);if(f)throw new TypeError(`Theme token paths ${f} and ${b} both compile to ${h}. Rename one token.`);g.set(h,b),u[h]=S;}let d=new Set(o.tokens.keys());for(let[b,v]of Object.entries(ed)){let S=v.axis==="density"?i:a,h=Zc(d,b,S);if(!h)continue;let f=o.tokens.get(h);if(!f||f.type!==v.expectedType)throw new TypeError(`${h} must be a ${v.expectedType} token to drive ${v.variableName}.`);u[v.variableName]=v.format==="hsl"?Kc(f.value):c[h];}let m=Object.entries(u).sort(([b],[v])=>b.localeCompare(v)).map(([b,v])=>`${b}:${v};`).join("");return {contract:n,colorMode:a,density:i,values:Object.freeze(s),cssValues:Object.freeze(c),cssVariables:Object.freeze(u),cssText:m}}r(Lr,"compileThemeTokens");var vn=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],td={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},Er=new WeakMap;function ui(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Er.get(e)?.get(t);if(o)return o;let n={...td},a=Object.fromEntries(vn.map(l=>[l,"builtin"]));for(let l of vn){let s=l==="padding"||l==="gap"?e?.density:e?.colorMode,c=l==="glowColor"?"component.bento":"semantic.bento",u=[`${c}.levels.level${t}.${l}`,`${c}.default.${l}`];for(let g of u){let d=s&&e?.cssValues[`${g}.${s}`]!==void 0?`${g}.${s}`:g,m=e?.cssValues[d];if(m!==void 0){n[l]=m,a[l]=d;break}}}let i=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let l=Er.get(e)??new Map;l.set(t,i),Er.set(e,l);}return i}r(ui,"resolveBentoTokens");var od=Object.freeze({}),nd=Object.freeze({}),pi=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function rd(){return Object.freeze({locale:createContext({...Mr,provided:false}),theme:createContext({provided:false}),direction:createContext({provided:false}),environment:createContext({provided:false,environment:od,portal:nd})})}r(rd,"createMonkeysProviderContexts");function ad(){let e=globalThis,t=e[pi];if(t)return t;let o=rd();return Object.defineProperty(e,pi,{value:o,enumerable:false,configurable:false,writable:false}),o}r(ad,"getMonkeysProviderContexts");var wn=ad(),kn=wn.locale,Po=wn.theme,Sn=wn.direction,Cn=wn.environment;function id(e,t){return t===void 0?e:e===void 0?t:{...e,...t,slots:e.slots||t.slots?{...e.slots,...t.slots}:void 0,styles:e.styles||t.styles?{...e.styles,...t.styles}:void 0}}r(id,"mergeAppearance");function gi(){return useContext(Po).resolvedTheme}r(gi,"useMonkeysResolvedTheme");function fi(e){let t=useContext(Po).baseAppearance;return useMemo(()=>id(t,e),[e,t])}r(fi,"useMonkeysBaseAppearance");function bi(){return useContext(Cn).portal}r(bi,"useMonkeysPortalOptions");function ut(){let e=useContext(kn),t=useContext(Po),o=useContext(Sn),n=e.provided||t.provided||o.provided;return useMemo(()=>n?{dir:o.direction,"data-monkeys-direction":o.direction,"data-monkeys-locale":e.locale,"data-monkeys-theme":t.themeId,"data-monkeys-theme-mode":t.resolvedTheme?.colorMode}:{},[o.direction,e.locale,n,t.resolvedTheme?.colorMode,t.themeId])}r(ut,"useMonkeysComponentAttributes");function hi(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}r(hi,"isRecord");function sd(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('MonkeysProvider direction must be "ltr" or "rtl".')}r(sd,"validateDirection");function ld(e){if(e!==void 0){if(!hi(e))throw new TypeError("MonkeysProvider environment must be an object.");if(e.getDocument!==void 0&&typeof e.getDocument!="function")throw new TypeError("MonkeysProvider environment.getDocument must be a function.");if(e.getWindow!==void 0&&typeof e.getWindow!="function")throw new TypeError("MonkeysProvider environment.getWindow must be a function.")}}r(ld,"validateEnvironment");function cd(e){if(e!==void 0){if(!hi(e))throw new TypeError("MonkeysProvider portal must be an object.");if(e.disabled!==void 0&&typeof e.disabled!="boolean")throw new TypeError("MonkeysProvider portal.disabled must be a boolean.");if(e.container!=null&&typeof e.container!="function"&&typeof e.container!="object")throw new TypeError("MonkeysProvider portal.container must be an Element, null, or a function.")}}r(cd,"validatePortal");function dd(e,t,o,n){return e?Lr(e,{colorMode:t,density:o}):n}r(dd,"resolveProviderTheme");function Dr({children:e,locale:t,messages:o,direction:n,theme:a,themeId:i,colorMode:l,density:s,appearance:c,environment:u,iconResolver:g,imageResolver:d,portal:m,statusStates:b,listFooter:v}){let S=useContext(kn),h=useContext(Po),f=useContext(Sn),w=useContext(Cn);if(sd(n),ld(u),g!==void 0&&typeof g!="function")throw new TypeError("MonkeysProvider iconResolver must be a function.");if(d!==void 0&&typeof d!="function")throw new TypeError("MonkeysProvider imageResolver must be a function.");cd(m);let x=useMemo(()=>Ir(t,o,S),[t,o,S]),C=useMemo(()=>({...x,provided:true}),[x]),I=useMemo(()=>dd(a,l,s,h.resolvedTheme),[l,s,h.resolvedTheme,a]),D=useMemo(()=>({provided:true,resolvedTheme:I,themeId:i??h.themeId,baseAppearance:{...h.baseAppearance,...c?.base,...s?{density:s}:void 0,slots:{...h.baseAppearance?.slots,...c?.base?.slots},styles:{...h.baseAppearance?.styles,...c?.base?.styles}},dataExplorerAppearance:{...h.dataExplorerAppearance,...c?.dataExplorer,...s?{density:s}:void 0,slots:{...h.dataExplorerAppearance?.slots,...c?.dataExplorer?.slots},styles:{...h.dataExplorerAppearance?.styles,...c?.dataExplorer?.styles}},statusStates:{...h.statusStates,...b,loading:{...h.statusStates?.loading,...b?.loading},empty:{...h.statusStates?.empty,...b?.empty},error:{...h.statusStates?.error,...b?.error},permission:{...h.statusStates?.permission,...b?.permission}},listFooter:{...h.listFooter,...v,...v?.pageSizeOptions?{pageSizeOptions:[...v.pageSizeOptions]}:void 0}}),[c?.base,c?.dataExplorer,s,h.baseAppearance,h.dataExplorerAppearance,h.statusStates,h.themeId,I,b,v,i]),P=useMemo(()=>({provided:true,direction:n??f.direction??"ltr"}),[n,f.direction]),E=useMemo(()=>({provided:true,iconResolver:g??w.iconResolver,imageResolver:d??w.imageResolver,environment:{...w.environment,...u},portal:{...w.portal,...m}}),[u,w.environment,w.iconResolver,g,d,w.imageResolver,w.portal,m]);return jsx(kn.Provider,{value:C,children:jsx(Po.Provider,{value:D,children:jsx(Sn.Provider,{value:P,children:jsx(Cn.Provider,{value:E,children:e})})})})}r(Dr,"MonkeysProvider");function Ur({container:e,composer:t=false,children:o}){let n=useRef(null),[a]=useState(()=>typeof document>"u"?null:document.createElement("div"));useLayoutEffect(()=>{if(!a)return;let l=a.contains(document.activeElement)?document.activeElement:null;a.style.display="contents",(e??n.current)?.appendChild(a),l?.focus({preventScroll:true});},[e,a]),useLayoutEffect(()=>()=>a?.remove(),[a]);let i=jsx(A,{portal:true,children:jsx("div",{className:t?"bui-composer-host":"bui-conversation-host","data-bui-composer-placement":t?e?"floating":"inline":void 0,children:jsx(Dr,{portal:t&&e?{container:a}:void 0,children:jsx("div",{className:t?"bui-composer-host-content":"bui-conversation-host",onPointerDown:t&&e?l=>l.stopPropagation():void 0,onWheel:t&&e?l=>l.stopPropagation():void 0,onKeyDown:t&&e?l=>l.stopPropagation():void 0,children:o})})})});return jsx(A,{children:jsx("div",{ref:n,className:t?"bui-composer-anchor":"bui-conversation-anchor",children:a?createPortal(i,a):i})})}r(Ur,"ConversationHost");var fd=[],bd=[],hd={initialPrompt:"",placeholder:"Enter a message"};function xd({label:e,sub:t,time:o,body:n,resolving:a}){let i=q();return jsxs("div",{className:"flex w-full flex-col gap-1.5 transition-[opacity,filter,transform] duration-400",style:{opacity:a?.55:1,filter:a?"blur(0.5px)":"blur(0)",transform:a?"scale(0.985)":"scale(1)",transformOrigin:"top left",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)",animation:"bui-fade-up 400ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("div",{className:"flex items-center gap-1 text-[12px] leading-[1.3]",children:[jsx("span",{className:"font-medium text-ink",children:e}),jsx("span",{className:"text-ink-2",children:t}),o&&jsx("span",{className:"text-ink",children:i("duration",{time:o})})]}),jsx("p",{className:"text-[13px] leading-normal text-ink",children:n})]})}r(xd,"Section");function vd({messages:e=fd,suggestions:t=bd,labels:o,onSend:n,busy:a=false,onHeaderAction:i,fill:l=false,title:s,value:c,onValueChange:u,readOnly:g=false,loading:d=false,error:m,onRetry:b,onStop:v,children:S,renderMessage:h,pendingContent:f,composerContent:w,composerAccessory:x,composerProgress:C,composerNotice:I,composerContainer:D,conversationContainer:P,headerActions:E,sidePanel:V,readable:j=false,showMessageLabels:B=true}){let y=q(),R=ye(hd,o),[W,J]=useState(""),G=c??W,Z=r(H=>{J(H),u?.(H);},"setDraft"),[de,le]=useState(false),_=useRef(false),ae=useRef(true),X=useRef(null),me=useRef(true),Pe=[...e].reverse().find(H=>H.role==="user")?.id;useEffect(()=>{Pe&&(me.current=true);},[Pe]),useEffect(()=>(ae.current=true,()=>{ae.current=false;}),[]),useEffect(()=>{l&&me.current&&X.current&&(X.current.scrollTop=X.current.scrollHeight);},[l,e,a,S]),useEffect(()=>{let H=X.current,ue=H?.firstElementChild;if(!l||!H||!ue||typeof ResizeObserver>"u")return;let Ve=new ResizeObserver(()=>{me.current&&(H.scrollTop=H.scrollHeight);});return Ve.observe(ue),()=>Ve.disconnect()},[l]);let[N,L]=useState(R.initialPrompt),[Y,K]=useState(t[0]??""),Me=useRef(null),oe=!!N,se=G.trim().length>0&&!a&&!de&&!d&&!g&&!!n,Ie=r(async()=>{if(!se||_.current)return;let H=G.trim();_.current=true,le(true);try{await n?.(H)!==!1&&ae.current&&(L(H),Z(""),me.current=!0);}catch{}finally{_.current=false,ae.current&&le(false);}},"send");return l?jsx(Ur,{container:P,children:jsx(A,{children:jsxs("section",{"data-readable":j||void 0,"data-panel-open":!!V||void 0,"data-composer-progress":!!C||void 0,className:"chat-composer-fill flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden text-ink","aria-label":s||y("Agent"),children:[(s||E)&&jsxs("header",{className:"chat-composer-header flex shrink-0 items-center justify-between border-b border-line px-4 py-3",children:[jsx("span",{className:"truncate text-[14px] font-medium",children:s}),E]}),jsxs("div",{className:"chat-composer-body",children:[jsxs("div",{className:"chat-composer-main",children:[jsx("div",{ref:X,role:"log","aria-label":y("Chat history"),"aria-busy":a||d,className:"chat-composer-transcript flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4",onScroll:()=>{let H=X.current;H&&(me.current=H.scrollHeight-H.scrollTop-H.clientHeight<48);},children:jsxs("div",{className:"chat-composer-content",children:[d?jsx("span",{role:"status",className:"text-[13px] text-ink-2",children:y("Loading")}):e.map((H,ue)=>jsxs("article",{"aria-label":B?void 0:H.label,className:H.role==="user"?"ml-auto max-w-full rounded-xl bg-field px-3 py-2":"w-full min-w-0",style:!B&&H.role==="user"?{width:"fit-content",maxWidth:"85%"}:void 0,children:[B&&jsx("div",{className:"mb-1 text-[12px] font-medium text-ink-2",children:H.label}),h?h(H,ue):jsx("p",{className:"whitespace-pre-wrap break-words text-[13px] leading-normal",children:H.body})]},H.id??ue)),!d&&!a&&!m&&e.length===0&&Children.toArray(S).length===0&&jsx("div",{className:"flex flex-1 items-center justify-center text-[13px] text-ink-3",children:y("Start a conversation")}),S,!d&&a&&(f===void 0?jsx(Pr,{variant:"Dots",label:y("Loading")}):f)]})}),(!g||x||C||m)&&jsx("div",{className:"chat-composer-footer shrink-0 p-3",children:jsxs(Ur,{container:D,composer:true,children:[C&&jsx("div",{className:"chat-composer-progress",children:C}),m&&jsxs("div",{role:"alert",className:"chat-composer-alert flex items-center gap-2 px-4 py-2 text-[13px] text-red",children:[jsx("span",{children:m}),b&&jsx("button",{type:"button",onClick:b,className:"underline",children:y("Retry")})]}),I,(!g||x)&&jsxs("div",{className:"chat-composer-input",children:[x&&jsx("div",{className:"chat-composer-accessory",children:x}),!g&&(w===void 0?jsx(Rr,{value:G,onValueChange:Z,disabled:d,busy:a,onStop:v,placeholder:R.placeholder,inputLabel:y("Chat prompt"),onSubmit:n?async H=>{let ue=await n(H);return ue!==false&&(me.current=true),ue}:void 0}):w)]})]})})]}),V&&jsx("aside",{className:"chat-composer-side-panel",children:V})]})]})})}):jsx(A,{children:jsxs("div",{className:"flex h-[288px] w-full max-w-95 flex-col self-start overflow-hidden rounded-[14px] bg-surface shadow-card",children:[jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line p-1.5",children:[jsx("div",{className:"flex items-center",children:t.map(H=>jsx("button",{type:"button","aria-pressed":Y===H,onClick:()=>K(H),className:`rounded-[var(--bui-radius-chip)] px-2 py-[3px] text-[13px] text-ink transition-[background-color,opacity] duration-100 ${Y===H?"bg-field":"opacity-50 hover:opacity-75"}`,children:H},H))}),jsx("div",{className:"flex items-center gap-1",children:[jsx("path",{d:"M12 5v14M5 12h14"},"p"),jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 7v5l3 2"})]},"h"),jsxs("g",{fill:"currentColor",stroke:"none",children:[jsx("circle",{cx:"5",cy:"12",r:"1.8"}),jsx("circle",{cx:"12",cy:"12",r:"1.8"}),jsx("circle",{cx:"19",cy:"12",r:"1.8"})]},"e")].map((H,ue)=>jsx("button",{type:"button","aria-label":[y("New"),y("History"),y("More")][ue],onClick:()=>i?.(["new","history","more"][ue]),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3
174
176
  transition-colors duration-100 hover:bg-hover hover:text-ink-2`,children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:H})},ue))})]}),jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2.5 overflow-y-auto px-3 pt-2.5 pb-1",children:[jsx("div",{className:"flex justify-end pl-14",children:jsx("div",{className:`rounded-xl bg-field px-3 py-1.5 text-[13px] leading-[1.4] text-ink
175
- transition-[opacity,transform] duration-300`,style:{opacity:oe?1:0,transform:oe?"translateY(0)":"translateY(10px)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:N})}),e.map((H,ue)=>jsx(Xc,{...H},ue)),a&&jsx("span",{role:"status",children:R.placeholder})]}),jsx("div",{className:"chat-composer-footer mt-auto shrink-0 p-1.5",children:jsxs("div",{role:"presentation",onClick:()=>Me.current?.focus(),className:"chat-composer-field flex cursor-text flex-col gap-2 rounded-control border border-line bg-field p-2.5 shadow-[0_1px_2px_rgba(0,0,0,0.035)] transition-[border-color,box-shadow] duration-150 focus-within:border-line-strong focus-within:shadow-[0_1px_2px_rgba(0,0,0,0.025)]",children:[jsx("input",{ref:Me,value:G,onChange:H=>Z(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&H.keyCode!==229&&Ie();},placeholder:R.placeholder,"aria-label":y("Chat prompt"),className:"min-h-4.5 bg-transparent text-[13px] leading-[1.4] text-ink outline-none placeholder:text-ink-3"}),jsx("div",{className:"flex items-center justify-end",children:jsx("button",{type:"button","aria-label":y("Send"),disabled:!se,onClick:Ie,className:`chat-composer-action flex size-7 items-center justify-center rounded-[var(--bui-radius-control)]
176
- transition-[background-color,color,transform] duration-200 enabled:active:scale-[0.96]`,style:{background:se?"var(--bui-token-primary, var(--bui-ink))":"var(--bui-line-strong)",color:se?"var(--bui-token-primary-foreground, var(--bui-surface))":"var(--bui-ink-2)"},children:jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})})]})})]})})}r(Kc,"BUIChatComposer");var Jc="",ed=[],td=[],od="repeating-linear-gradient(45deg, var(--bui-red) 0, var(--bui-red) 1.5px, transparent 1.5px, transparent 3px)",nd=new Set(["import","from","export","default","async","function","const","let","var","await","return","if","else","for","while","new","throw","try","catch","null","true","false","undefined"]),rd=/("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`[^`]*`|\b\d+(?:\.\d+)?\b|\b(?:import|from|export|default|async|function|const|let|var|await|return|if|else|for|while|new|throw|try|catch|null|true|false|undefined)\b|[A-Za-z_$][\w$]*(?=\s*\())/g;function Ar(e){let t=[],o=0,n=0;for(let a of e.matchAll(rd)){let i=a.index??0,l=a[0];i>o&&t.push(jsx("span",{children:e.slice(o,i)},n++));let s,c;/^["'`]/.test(l)||/^\d/.test(l)?s="var(--bui-orange)":nd.has(l)?s="var(--bui-accent-ink)":(s="var(--bui-ink)",c="var(--bui-font-weight-medium, 500)"),t.push(jsx("span",{style:{color:s,fontWeight:c},children:l},n++)),o=i+l.length;}return o<e.length&&t.push(jsx("span",{children:e.slice(o)},n++)),t}r(Ar,"highlight");function ad({pieces:e}){return jsx(Fragment,{children:e.map((t,o)=>{if(t.change){let n=t.change==="add";return jsx("span",{className:"rounded-[3px]",style:{background:`color-mix(in srgb, var(--bui-${n?"green":"red"}) 18%, transparent)`,padding:"0 calc(var(--bui-spacing) / 2)",margin:"0 calc(var(--bui-spacing) / -4)",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"},children:Ar(t.text)},o)}return jsx("span",{children:Ar(t.text)},o)})})}r(ad,"Pieces");function id(){return jsx("svg",{"aria-hidden":true,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-ink-3",children:jsx("path",{d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})}r(id,"FileIcon");var sd={copy:"Copy",copied:"Copied"};function Br({variant:e="Code",embedded:t=false,lines:o=ed,code:n,diff:a=td,filename:i=Jc,labels:l,onCopy:s,onCopyError:c}){let u=q(),[g,d]=useState(false),m=useRef(true),b=useRef();useEffect(()=>(m.current=true,()=>{m.current=false,clearTimeout(b.current);}),[]);let v=e==="Diff",S=ye(sd,l),h=n??o.join(`
177
- `),f=useCallback(()=>{Promise.resolve().then(()=>navigator.clipboard.writeText(h)).then(()=>{m.current&&(d(true),s?.(h),clearTimeout(b.current),b.current=setTimeout(()=>d(false),1500));}).catch(C=>c?.(C instanceof Error?C.message:String(C)));},[h,s,c]),w=a.filter(C=>C.type==="add").length,x=a.filter(C=>C.type==="del").length;return jsx(A,{children:jsxs("div",{"data-bui-code-block":true,className:t?"artifact-code-embedded":"w-full max-w-105 overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"flex h-11 items-center gap-2 border-b border-line px-4 text-[12.5px]",children:[jsxs("span",{className:"inline-flex min-w-0 items-center gap-[7px]",children:[jsx(id,{}),jsx("span",{className:"truncate font-mono leading-none text-ink",children:i})]}),v?jsxs("span",{className:"ml-auto inline-flex items-center gap-2 font-mono text-[12px] leading-none tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",w]}),jsxs("span",{className:"text-red",children:["-",x]})]}):jsxs("button",{type:"button","aria-label":u("Copy code"),onClick:f,className:`-mr-1 ml-auto flex h-6 items-center gap-1 rounded-[var(--bui-radius-chip)] px-1.5 text-[12px]
177
+ transition-[opacity,transform] duration-300`,style:{opacity:oe?1:0,transform:oe?"translateY(0)":"translateY(10px)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:N})}),e.map((H,ue)=>jsx(xd,{...H},ue)),a&&jsx("span",{role:"status",children:R.placeholder})]}),jsx("div",{className:"chat-composer-footer mt-auto shrink-0 p-1.5",children:jsxs("div",{role:"presentation",onClick:()=>Me.current?.focus(),className:"chat-composer-field flex cursor-text flex-col gap-2 rounded-control border border-line bg-field p-2.5 shadow-[0_1px_2px_rgba(0,0,0,0.035)] transition-[border-color,box-shadow] duration-150 focus-within:border-line-strong focus-within:shadow-[0_1px_2px_rgba(0,0,0,0.025)]",children:[jsx("input",{ref:Me,value:G,onChange:H=>Z(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&H.keyCode!==229&&Ie();},placeholder:R.placeholder,"aria-label":y("Chat prompt"),className:"min-h-4.5 bg-transparent text-[13px] leading-[1.4] text-ink outline-none placeholder:text-ink-3"}),jsx("div",{className:"flex items-center justify-end",children:jsx("button",{type:"button","aria-label":y("Send"),disabled:!se,onClick:Ie,className:`chat-composer-action flex size-7 items-center justify-center rounded-[var(--bui-radius-control)]
178
+ transition-[background-color,color,transform] duration-200 enabled:active:scale-[0.96]`,style:{background:se?"var(--bui-token-primary, var(--bui-ink))":"var(--bui-line-strong)",color:se?"var(--bui-token-primary-foreground, var(--bui-surface))":"var(--bui-ink-2)"},children:jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})})]})})]})})}r(vd,"BUIChatComposer");var Sd="",Cd=[],Td=[],Rd="repeating-linear-gradient(45deg, var(--bui-red) 0, var(--bui-red) 1.5px, transparent 1.5px, transparent 3px)",Nd=new Set(["import","from","export","default","async","function","const","let","var","await","return","if","else","for","while","new","throw","try","catch","null","true","false","undefined"]),Pd=/("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`[^`]*`|\b\d+(?:\.\d+)?\b|\b(?:import|from|export|default|async|function|const|let|var|await|return|if|else|for|while|new|throw|try|catch|null|true|false|undefined)\b|[A-Za-z_$][\w$]*(?=\s*\())/g;function zr(e){let t=[],o=0,n=0;for(let a of e.matchAll(Pd)){let i=a.index??0,l=a[0];i>o&&t.push(jsx("span",{children:e.slice(o,i)},n++));let s,c;/^["'`]/.test(l)||/^\d/.test(l)?s="var(--bui-orange)":Nd.has(l)?s="var(--bui-accent-ink)":(s="var(--bui-ink)",c="var(--bui-font-weight-medium, 500)"),t.push(jsx("span",{style:{color:s,fontWeight:c},children:l},n++)),o=i+l.length;}return o<e.length&&t.push(jsx("span",{children:e.slice(o)},n++)),t}r(zr,"highlight");function Md({pieces:e}){return jsx(Fragment,{children:e.map((t,o)=>{if(t.change){let n=t.change==="add";return jsx("span",{className:"rounded-[3px]",style:{background:`color-mix(in srgb, var(--bui-${n?"green":"red"}) 18%, transparent)`,padding:"0 calc(var(--bui-spacing) / 2)",margin:"0 calc(var(--bui-spacing) / -4)",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"},children:zr(t.text)},o)}return jsx("span",{children:zr(t.text)},o)})})}r(Md,"Pieces");function Id(){return jsx("svg",{"aria-hidden":true,width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-ink-3",children:jsx("path",{d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})}r(Id,"FileIcon");var Ad={copy:"Copy",copied:"Copied"};function _r({variant:e="Code",embedded:t=false,lines:o=Cd,code:n,diff:a=Td,filename:i=Sd,labels:l,onCopy:s,onCopyError:c}){let u=q(),[g,d]=useState(false),m=useRef(true),b=useRef();useEffect(()=>(m.current=true,()=>{m.current=false,clearTimeout(b.current);}),[]);let v=e==="Diff",S=ye(Ad,l),h=n??o.join(`
179
+ `),f=useCallback(()=>{Promise.resolve().then(()=>navigator.clipboard.writeText(h)).then(()=>{m.current&&(d(true),s?.(h),clearTimeout(b.current),b.current=setTimeout(()=>d(false),1500));}).catch(C=>c?.(C instanceof Error?C.message:String(C)));},[h,s,c]),w=a.filter(C=>C.type==="add").length,x=a.filter(C=>C.type==="del").length;return jsx(A,{children:jsxs("div",{"data-bui-code-block":true,className:t?"artifact-code-embedded":"w-full max-w-105 overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"flex h-11 items-center gap-2 border-b border-line px-4 text-[12.5px]",children:[jsxs("span",{className:"inline-flex min-w-0 items-center gap-[7px]",children:[jsx(Id,{}),jsx("span",{className:"truncate font-mono leading-none text-ink",children:i})]}),v?jsxs("span",{className:"ml-auto inline-flex items-center gap-2 font-mono text-[12px] leading-none tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",w]}),jsxs("span",{className:"text-red",children:["-",x]})]}):jsxs("button",{type:"button","aria-label":u("Copy code"),onClick:f,className:`-mr-1 ml-auto flex h-6 items-center gap-1 rounded-[var(--bui-radius-chip)] px-1.5 text-[12px]
178
180
  font-medium transition-colors duration-100 hover:bg-hover
179
181
  ${g?"text-green":"text-ink-3 hover:text-ink"}`,children:[g?jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("rect",{x:"9",y:"9",width:"12",height:"12",rx:"2.5"}),jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),g?S.copied:S.copy]})]}),jsx("div",{className:"py-3 font-mono text-[12.5px] leading-[1.65] text-ink-2",children:v?jsxs("div",{className:"relative",children:[jsx("span",{className:"pointer-events-none absolute inset-y-0 left-5 w-px bg-line"}),a.map((C,I)=>{let D=C.type==="add",P=C.type==="del",E=P?C.old:C.cur;return jsxs("div",{className:`relative grid grid-cols-[20px_minmax(0,1fr)] items-start
180
- ${D?"bg-green-tint":P?"bg-red-tint":""}`,children:[(D||P)&&jsx("span",{className:"absolute inset-y-0 left-0 w-[3px]",style:{background:D?"var(--bui-green)":od}}),jsx("span",{className:`select-none text-center text-[11px] ${D?"text-green":P?"text-red":"text-ink-3"}`,children:E??""}),jsx("code",{className:"pr-3 pl-1 break-words whitespace-pre-wrap",children:jsx(ad,{pieces:C.pieces})})]},I)})]}):jsxs("div",{className:"relative",children:[jsx("span",{className:"pointer-events-none absolute inset-y-0 left-5 w-px bg-line"}),o.map((C,I)=>jsxs("div",{className:"grid grid-cols-[20px_minmax(0,1fr)] items-start",children:[jsx("span",{className:"select-none text-center text-[11px] text-ink-3",children:I+1}),jsx("code",{className:"pr-3 pl-1 break-words whitespace-pre-wrap",children:Ar(C)})]},I))]})})]})})}r(Br,"BUICodeBlock");var ud={header:"All chunks",count:""},pd=[];function md({chunks:e=pd,labels:t,className:o}){let[n,a]=useState(false),i=ye(ud,t);return useEffect(()=>{let l=setTimeout(()=>a(true),700);return ()=>clearTimeout(l)},[]),jsx(A,{children:jsxs("div",{className:`flex w-full max-w-95 flex-col gap-2${o?` ${o}`:""}`,children:[jsxs("div",{className:"flex items-center gap-2 px-0.5",style:{animation:"bui-fade-in 400ms ease-out both"},children:[jsx("span",{className:"text-[13px] font-semibold text-ink",children:i.header}),jsx("span",{className:"inline-flex h-5 items-center rounded-md bg-inset px-1.5 text-[11.5px] font-medium text-ink-2 shadow-hairline tabular-nums",children:t?.count??e.length})]}),e.map((l,s)=>jsxs("div",{className:"overflow-hidden rounded-card bg-surface shadow-card",style:{animation:`bui-fade-up 400ms cubic-bezier(0.23,1,0.32,1) ${s*100}ms both`},children:[jsxs("div",{className:"primitive-card-bar flex items-center gap-2.5 border-b border-line",children:[jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] font-medium text-ink",children:[jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:jsx("path",{d:"M4 6h16M4 12h16M4 18h10"})}),jsx("span",{className:"truncate",children:l.title})]}),jsx("span",{className:"ml-auto shrink-0 text-[12px] text-ink-3 tabular-nums",children:l.chars})]}),jsx("p",{className:"px-3 pt-2 pb-1 text-[12.5px] leading-relaxed text-ink-2",children:l.body}),jsx("div",{className:"px-3 pb-3",children:jsxs("span",{className:`inline-flex h-6 items-center gap-1.5 rounded-full bg-inset px-2
182
+ ${D?"bg-green-tint":P?"bg-red-tint":""}`,children:[(D||P)&&jsx("span",{className:"absolute inset-y-0 left-0 w-[3px]",style:{background:D?"var(--bui-green)":Rd}}),jsx("span",{className:`select-none text-center text-[11px] ${D?"text-green":P?"text-red":"text-ink-3"}`,children:E??""}),jsx("code",{className:"pr-3 pl-1 break-words whitespace-pre-wrap",children:jsx(Md,{pieces:C.pieces})})]},I)})]}):jsxs("div",{className:"relative",children:[jsx("span",{className:"pointer-events-none absolute inset-y-0 left-5 w-px bg-line"}),o.map((C,I)=>jsxs("div",{className:"grid grid-cols-[20px_minmax(0,1fr)] items-start",children:[jsx("span",{className:"select-none text-center text-[11px] text-ink-3",children:I+1}),jsx("code",{className:"pr-3 pl-1 break-words whitespace-pre-wrap",children:zr(C)})]},I))]})})]})})}r(_r,"BUICodeBlock");var Dd={header:"All chunks",count:""},Ud=[];function zd({chunks:e=Ud,labels:t,className:o}){let[n,a]=useState(false),i=ye(Dd,t);return useEffect(()=>{let l=setTimeout(()=>a(true),700);return ()=>clearTimeout(l)},[]),jsx(A,{children:jsxs("div",{className:`flex w-full max-w-95 flex-col gap-2${o?` ${o}`:""}`,children:[jsxs("div",{className:"flex items-center gap-2 px-0.5",style:{animation:"bui-fade-in 400ms ease-out both"},children:[jsx("span",{className:"text-[13px] font-semibold text-ink",children:i.header}),jsx("span",{className:"inline-flex h-5 items-center rounded-md bg-inset px-1.5 text-[11.5px] font-medium text-ink-2 shadow-hairline tabular-nums",children:t?.count??e.length})]}),e.map((l,s)=>jsxs("div",{className:"overflow-hidden rounded-card bg-surface shadow-card",style:{animation:`bui-fade-up 400ms cubic-bezier(0.23,1,0.32,1) ${s*100}ms both`},children:[jsxs("div",{className:"primitive-card-bar flex items-center gap-2.5 border-b border-line",children:[jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] font-medium text-ink",children:[jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:jsx("path",{d:"M4 6h16M4 12h16M4 18h10"})}),jsx("span",{className:"truncate",children:l.title})]}),jsx("span",{className:"ml-auto shrink-0 text-[12px] text-ink-3 tabular-nums",children:l.chars})]}),jsx("p",{className:"px-3 pt-2 pb-1 text-[12.5px] leading-relaxed text-ink-2",children:l.body}),jsx("div",{className:"px-3 pb-3",children:jsxs("span",{className:`inline-flex h-6 items-center gap-1.5 rounded-full bg-inset px-2
181
183
  text-[12px] font-medium text-ink-2 shadow-btn
182
- transition-[opacity,transform,background-color] duration-300 hover:bg-hover`,style:{opacity:n?1:0,transform:n?"scale(1)":"scale(0.95)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)",transitionDelay:`${s*80}ms`},children:[jsx("span",{className:`flex size-3.5 items-center justify-center rounded-[4px] ${l.tone} text-[7px] font-bold text-white`,children:l.badge}),l.source,jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M7 17L17 7M7 7h10v10"})})]})})]},l.title))]})})}r(md,"BUIContextCards");function fd(e){let[t,o]=useState(0);return useEffect(()=>{if(t>=e.length)return;let n=setTimeout(()=>o(a=>a+1),e[t]);return ()=>clearTimeout(n)},[t,e]),t}r(fd,"useStage");var bd=[180,260],hd=[];function ui({included:e,tone:t}){return jsx("span",{"aria-hidden":true,className:`flex size-4.5 shrink-0 items-center justify-center rounded-[5px] transition-[background-color,color,transform] duration-150 ${e?t==="red"?"bg-red text-white":"bg-green text-white":"bg-inset text-ink-3 shadow-hairline"}`,style:{transform:e?"scale(1)":"scale(0.92)"},children:e?jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):null})}r(ui,"IncludedMark");function xd({rows:e=hd,addedRows:t=[],title:o,columns:n,categoryColors:a={},accepted:i=false,onApply:l}){let s=q(),c=fd(bd),u=c>=1,g=c>=2,[d,m]=useState({}),b=e.filter(f=>f.removed&&d[f.key]!==false).length,v=t.filter(f=>d[f.key]!==false).length,S=g,h=r(f=>m(w=>({...w,[f]:w[f]===false})),"toggleEdit");return jsx(A,{children:jsx("div",{className:"w-full max-w-95",children:jsxs("div",{className:"relative overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"primitive-card-bar flex items-center justify-between border-b border-line",children:[jsx("span",{className:"text-[12.5px] font-medium text-ink",children:o??s("Proposed changes")}),g&&!i&&jsx("span",{className:"text-[11px] text-ink-3",children:s("Click changed rows to toggle")})]}),jsxs("table",{className:"w-full table-fixed border-collapse text-left",children:[jsxs("colgroup",{children:[jsx("col",{className:"w-[34%]"}),jsx("col",{className:"w-[30%]"}),jsx("col",{className:"w-[36%]"})]}),jsx("thead",{children:jsx("tr",{className:"border-b border-line",children:(n??[s("Name"),s("Category"),s("Value")]).map(f=>jsx("th",{className:"primitive-table-cell text-[12px] font-medium text-ink-3",children:f},f))})}),jsxs("tbody",{children:[e.map(f=>{let w=f.removed&&u&&d[f.key]!==false,x=f.removed&&g&&!i;return jsxs("tr",{tabIndex:x?0:void 0,"aria-selected":f.removed?d[f.key]!==false:void 0,onClick:x?()=>h(f.key):void 0,onKeyDown:x?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),h(f.key));}:void 0,className:`border-b border-line transition-[background-color,filter,opacity] duration-150 last:border-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent ${x?"cursor-pointer hover:brightness-[0.985]":""}`,style:{background:w?"var(--bui-red-tint)":void 0},children:[jsx("td",{className:"primitive-table-cell text-[13px] font-medium tabular-nums transition-colors duration-200",style:{color:w?"var(--bui-red)":"var(--bui-ink)"},children:f.id}),jsx("td",{className:"primitive-table-cell",children:jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-full bg-inset px-2 text-[11.5px] font-medium shadow-hairline transition-opacity duration-200",style:{opacity:w?.55:1},children:[jsx("span",{className:"size-1.5 rounded-full",style:{background:a[f.dept]??"var(--bui-ink-3)"}}),jsx("span",{className:"text-ink-2",children:f.dept})]})}),jsx("td",{className:"primitive-table-cell text-[12.5px] whitespace-nowrap transition-colors duration-200",style:{color:w?"var(--bui-red)":"var(--bui-ink-2)",textDecorationLine:w?"line-through":"none",textDecorationColor:"color-mix(in srgb, var(--bui-red) 50%, transparent)"},children:jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"min-w-0 truncate",children:f.email}),f.removed&&g&&jsx(ui,{included:d[f.key]!==false,tone:"red"})]})})]},f.key)}),t.map(f=>jsx("tr",{children:jsx("td",{colSpan:3,className:"p-0",children:jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-200",style:{gridTemplateRows:S?"1fr":"0fr",opacity:S?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{role:"checkbox",tabIndex:i?-1:0,"aria-checked":d[f.key]!==false,"aria-label":`Include adding ${f.id}`,onClick:i?void 0:()=>h(f.key),onKeyDown:i?void 0:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),h(f.key));},className:`grid grid-cols-[34%_30%_36%] items-center border-t border-line transition-[background-color,filter,opacity] duration-150 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent ${i?"":"cursor-pointer hover:brightness-[0.985]"}`,style:{background:d[f.key]!==false?"var(--bui-green-tint)":void 0},children:[jsx("span",{className:"primitive-table-cell text-[13px] font-medium tabular-nums transition-colors duration-200",style:{color:d[f.key]!==false?"var(--bui-green)":"var(--bui-ink-3)"},children:f.id}),jsx("span",{className:"primitive-table-cell",children:jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-full bg-surface px-2 text-[11.5px] font-medium shadow-hairline",children:[jsx("span",{className:"size-1.5 rounded-full bg-green"}),jsx("span",{className:"text-ink-2",children:f.dept})]})}),jsx("span",{className:"primitive-table-cell text-[13px] transition-colors duration-200",style:{color:d[f.key]!==false?"var(--bui-green)":"var(--bui-ink-3)"},children:jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"min-w-0 truncate",children:f.email}),jsx(ui,{included:d[f.key]!==false,tone:"green"})]})})]})})})})},f.key))]})]}),g&&jsx("div",{className:"primitive-card-footer flex min-h-11 items-center justify-between border-t border-line",style:{animation:"bui-fade-up 180ms cubic-bezier(0.23,1,0.32,1) both"},children:i?jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-tint py-1 pr-2.5 pl-1 text-[12.5px] font-medium text-green",style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-full bg-green text-white",children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),s("editsApplied",{count:b+v})]}):jsxs(Fragment,{children:[jsx("span",{className:"text-[11.5px] tabular-nums text-ink-3",children:s("changesSummary",{removals:b,additions:v})}),jsx("span",{className:"flex items-center gap-1.5",children:jsx(Ce,{variant:"accent",size:"sm",disabled:b+v===0,onClick:()=>{l?.([...e.filter(f=>f.removed),...t].filter(f=>d[f.key]!==false).map(f=>f.key));},className:"text-[12px]",children:s("applyChanges",{count:b+v})})})]})})]})})})}r(xd,"BUIDiffTable");var wd=[{key:"all",label:"All",count:5},{key:"todo",label:"To do",dot:"var(--bui-filter-todo)",count:2},{key:"progress",label:"In Progress",dot:"var(--bui-filter-progress)",count:2},{key:"done",label:"Completed",dot:"var(--bui-filter-done)",count:1}],kd=[],Sd={columns:{task:"Task name",date:"Date",status:"Status",owner:"Advisor"}},Cd={todo:{label:"To do",cls:"filter-status-todo"},progress:{label:"In Progress",cls:"filter-status-progress"},done:{label:"Completed",cls:"filter-status-done"}};function Td({rows:e=kd,labels:t}){let o=q(),n=ye(Sd,t),[a,i]=useState("all");return jsx(A,{children:jsxs("div",{className:"w-full max-w-105",children:[jsx("div",{className:"-mx-1 mb-1 flex items-center gap-1 overflow-x-auto px-1 py-1",style:{scrollbarWidth:"none"},children:wd.map(l=>{let s=a===l.key;return jsxs("button",{type:"button","aria-pressed":s,onClick:()=>i(l.key),className:`flex h-6.5 shrink-0 items-center gap-1.5 rounded-[var(--bui-radius-pill)] px-2.5 text-[12px]
184
+ transition-[opacity,transform,background-color] duration-300 hover:bg-hover`,style:{opacity:n?1:0,transform:n?"scale(1)":"scale(0.95)",transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)",transitionDelay:`${s*80}ms`},children:[jsx("span",{className:`flex size-3.5 items-center justify-center rounded-[4px] ${l.tone} text-[7px] font-bold text-white`,children:l.badge}),l.source,jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M7 17L17 7M7 7h10v10"})})]})})]},l.title))]})})}r(zd,"BUIContextCards");function Od(e){let[t,o]=useState(0);return useEffect(()=>{if(t>=e.length)return;let n=setTimeout(()=>o(a=>a+1),e[t]);return ()=>clearTimeout(n)},[t,e]),t}r(Od,"useStage");var Fd=[180,260],$d=[];function yi({included:e,tone:t}){return jsx("span",{"aria-hidden":true,className:`flex size-4.5 shrink-0 items-center justify-center rounded-[5px] transition-[background-color,color,transform] duration-150 ${e?t==="red"?"bg-red text-white":"bg-green text-white":"bg-inset text-ink-3 shadow-hairline"}`,style:{transform:e?"scale(1)":"scale(0.92)"},children:e?jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):null})}r(yi,"IncludedMark");function Hd({rows:e=$d,addedRows:t=[],title:o,columns:n,categoryColors:a={},accepted:i=false,onApply:l}){let s=q(),c=Od(Fd),u=c>=1,g=c>=2,[d,m]=useState({}),b=e.filter(f=>f.removed&&d[f.key]!==false).length,v=t.filter(f=>d[f.key]!==false).length,S=g,h=r(f=>m(w=>({...w,[f]:w[f]===false})),"toggleEdit");return jsx(A,{children:jsx("div",{className:"w-full max-w-95",children:jsxs("div",{className:"relative overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"primitive-card-bar flex items-center justify-between border-b border-line",children:[jsx("span",{className:"text-[12.5px] font-medium text-ink",children:o??s("Proposed changes")}),g&&!i&&jsx("span",{className:"text-[11px] text-ink-3",children:s("Click changed rows to toggle")})]}),jsxs("table",{className:"w-full table-fixed border-collapse text-left",children:[jsxs("colgroup",{children:[jsx("col",{className:"w-[34%]"}),jsx("col",{className:"w-[30%]"}),jsx("col",{className:"w-[36%]"})]}),jsx("thead",{children:jsx("tr",{className:"border-b border-line",children:(n??[s("Name"),s("Category"),s("Value")]).map(f=>jsx("th",{className:"primitive-table-cell text-[12px] font-medium text-ink-3",children:f},f))})}),jsxs("tbody",{children:[e.map(f=>{let w=f.removed&&u&&d[f.key]!==false,x=f.removed&&g&&!i;return jsxs("tr",{tabIndex:x?0:void 0,"aria-selected":f.removed?d[f.key]!==false:void 0,onClick:x?()=>h(f.key):void 0,onKeyDown:x?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),h(f.key));}:void 0,className:`border-b border-line transition-[background-color,filter,opacity] duration-150 last:border-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent ${x?"cursor-pointer hover:brightness-[0.985]":""}`,style:{background:w?"var(--bui-red-tint)":void 0},children:[jsx("td",{className:"primitive-table-cell text-[13px] font-medium tabular-nums transition-colors duration-200",style:{color:w?"var(--bui-red)":"var(--bui-ink)"},children:f.id}),jsx("td",{className:"primitive-table-cell",children:jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-full bg-inset px-2 text-[11.5px] font-medium shadow-hairline transition-opacity duration-200",style:{opacity:w?.55:1},children:[jsx("span",{className:"size-1.5 rounded-full",style:{background:a[f.dept]??"var(--bui-ink-3)"}}),jsx("span",{className:"text-ink-2",children:f.dept})]})}),jsx("td",{className:"primitive-table-cell text-[12.5px] whitespace-nowrap transition-colors duration-200",style:{color:w?"var(--bui-red)":"var(--bui-ink-2)",textDecorationLine:w?"line-through":"none",textDecorationColor:"color-mix(in srgb, var(--bui-red) 50%, transparent)"},children:jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"min-w-0 truncate",children:f.email}),f.removed&&g&&jsx(yi,{included:d[f.key]!==false,tone:"red"})]})})]},f.key)}),t.map(f=>jsx("tr",{children:jsx("td",{colSpan:3,className:"p-0",children:jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-200",style:{gridTemplateRows:S?"1fr":"0fr",opacity:S?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{role:"checkbox",tabIndex:i?-1:0,"aria-checked":d[f.key]!==false,"aria-label":`Include adding ${f.id}`,onClick:i?void 0:()=>h(f.key),onKeyDown:i?void 0:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),h(f.key));},className:`grid grid-cols-[34%_30%_36%] items-center border-t border-line transition-[background-color,filter,opacity] duration-150 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent ${i?"":"cursor-pointer hover:brightness-[0.985]"}`,style:{background:d[f.key]!==false?"var(--bui-green-tint)":void 0},children:[jsx("span",{className:"primitive-table-cell text-[13px] font-medium tabular-nums transition-colors duration-200",style:{color:d[f.key]!==false?"var(--bui-green)":"var(--bui-ink-3)"},children:f.id}),jsx("span",{className:"primitive-table-cell",children:jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-full bg-surface px-2 text-[11.5px] font-medium shadow-hairline",children:[jsx("span",{className:"size-1.5 rounded-full bg-green"}),jsx("span",{className:"text-ink-2",children:f.dept})]})}),jsx("span",{className:"primitive-table-cell text-[13px] transition-colors duration-200",style:{color:d[f.key]!==false?"var(--bui-green)":"var(--bui-ink-3)"},children:jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"min-w-0 truncate",children:f.email}),jsx(yi,{included:d[f.key]!==false,tone:"green"})]})})]})})})})},f.key))]})]}),g&&jsx("div",{className:"primitive-card-footer flex min-h-11 items-center justify-between border-t border-line",style:{animation:"bui-fade-up 180ms cubic-bezier(0.23,1,0.32,1) both"},children:i?jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-tint py-1 pr-2.5 pl-1 text-[12.5px] font-medium text-green",style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-full bg-green text-white",children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),s("editsApplied",{count:b+v})]}):jsxs(Fragment,{children:[jsx("span",{className:"text-[11.5px] tabular-nums text-ink-3",children:s("changesSummary",{removals:b,additions:v})}),jsx("span",{className:"flex items-center gap-1.5",children:jsx(Ce,{variant:"accent",size:"sm",disabled:b+v===0,onClick:()=>{l?.([...e.filter(f=>f.removed),...t].filter(f=>d[f.key]!==false).map(f=>f.key));},className:"text-[12px]",children:s("applyChanges",{count:b+v})})})]})})]})})})}r(Hd,"BUIDiffTable");var jd=[{key:"all",label:"All",count:5},{key:"todo",label:"To do",dot:"var(--bui-filter-todo)",count:2},{key:"progress",label:"In Progress",dot:"var(--bui-filter-progress)",count:2},{key:"done",label:"Completed",dot:"var(--bui-filter-done)",count:1}],Gd=[],qd={columns:{task:"Task name",date:"Date",status:"Status",owner:"Advisor"}},Kd={todo:{label:"To do",cls:"filter-status-todo"},progress:{label:"In Progress",cls:"filter-status-progress"},done:{label:"Completed",cls:"filter-status-done"}};function Xd({rows:e=Gd,labels:t}){let o=q(),n=ye(qd,t),[a,i]=useState("all");return jsx(A,{children:jsxs("div",{className:"w-full max-w-105",children:[jsx("div",{className:"-mx-1 mb-1 flex items-center gap-1 overflow-x-auto px-1 py-1",style:{scrollbarWidth:"none"},children:jd.map(l=>{let s=a===l.key;return jsxs("button",{type:"button","aria-pressed":s,onClick:()=>i(l.key),className:`flex h-6.5 shrink-0 items-center gap-1.5 rounded-[var(--bui-radius-pill)] px-2.5 text-[12px]
183
185
  font-medium transition-[background-color,box-shadow,color] duration-200
184
186
  ${s?"bg-surface text-ink shadow-btn":"text-ink-2 hover:bg-hover"}`,children:[l.dot&&jsx("span",{className:"size-1.5 rounded-full",style:{background:l.dot}}),o(l.label),jsx("span",{className:`rounded-[4px] px-1 text-[10.5px] tabular-nums
185
- ${s?"bg-field text-ink-2":"text-ink-3"}`,children:l.key==="all"?e.length:e.filter(c=>c.status===l.key).length})]},l.key)})}),jsx("div",{"aria-label":o("Scrollable task table"),className:"overflow-x-auto rounded-card bg-surface shadow-card",role:"region",tabIndex:0,style:{scrollbarWidth:"none"},children:jsxs("div",{className:"min-w-[420px]",children:[jsxs("div",{className:"grid grid-cols-[minmax(0,1.3fr)_minmax(0,0.6fr)_minmax(0,0.95fr)_minmax(0,0.9fr)] border-b border-[var(--bui-grid-line)] text-[12.5px] font-medium text-ink-2",children:[jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.task}),jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.date}),jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.status}),jsx("span",{className:"px-3 py-2",children:n.columns.owner})]}),e.map(l=>{let s=a==="all"||l.status===a,c=Cd[l.status];return jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:s?"1fr":"0fr",opacity:s?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:`grid grid-cols-[minmax(0,1.3fr)_minmax(0,0.6fr)_minmax(0,0.95fr)_minmax(0,0.9fr)] border-b
187
+ ${s?"bg-field text-ink-2":"text-ink-3"}`,children:l.key==="all"?e.length:e.filter(c=>c.status===l.key).length})]},l.key)})}),jsx("div",{"aria-label":o("Scrollable task table"),className:"overflow-x-auto rounded-card bg-surface shadow-card",role:"region",tabIndex:0,style:{scrollbarWidth:"none"},children:jsxs("div",{className:"min-w-[420px]",children:[jsxs("div",{className:"grid grid-cols-[minmax(0,1.3fr)_minmax(0,0.6fr)_minmax(0,0.95fr)_minmax(0,0.9fr)] border-b border-[var(--bui-grid-line)] text-[12.5px] font-medium text-ink-2",children:[jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.task}),jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.date}),jsx("span",{className:"border-r border-[var(--bui-grid-line)] px-3 py-2",children:n.columns.status}),jsx("span",{className:"px-3 py-2",children:n.columns.owner})]}),e.map(l=>{let s=a==="all"||l.status===a,c=Kd[l.status];return jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:s?"1fr":"0fr",opacity:s?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:`grid grid-cols-[minmax(0,1.3fr)_minmax(0,0.6fr)_minmax(0,0.95fr)_minmax(0,0.9fr)] border-b
186
188
  border-[var(--bui-grid-line)] text-[13px] transition-colors duration-100 hover:bg-hover`,children:[jsx("span",{className:"flex min-w-0 items-center border-r border-[var(--bui-grid-line)] px-3 py-2",children:jsx("span",{className:"truncate font-medium text-ink",children:l.task})}),jsx("span",{className:"flex items-center whitespace-nowrap border-r border-[var(--bui-grid-line)] px-3 py-2 text-ink-2 tabular-nums",children:l.date}),jsx("span",{className:"flex items-center border-r border-[var(--bui-grid-line)] px-3 py-2",children:jsx("span",{className:`inline-flex h-[23px] shrink-0 items-center whitespace-nowrap rounded-[8px] border px-[7px]
187
- text-[13px] font-medium ${c.cls}`,children:o(c.label)})}),jsx("span",{className:"flex min-w-0 items-center px-3 py-2 text-ink-2",children:jsx("span",{className:"truncate",children:l.owner})})]})})},l.task)})]})})]})})}r(Td,"BUIFilterTable");function Nd({label:e,value:t,onChange:o,min:n,max:a,step:i=1,suffix:l="",active:s}){let c=useRef(null),u=r(g=>Math.min(a,Math.max(n,Math.round(g))),"clamp");return jsxs("label",{className:`flex h-6.5 min-w-0 items-center gap-1 rounded-chip py-1 pr-1 pl-0.5
189
+ text-[13px] font-medium ${c.cls}`,children:o(c.label)})}),jsx("span",{className:"flex min-w-0 items-center px-3 py-2 text-ink-2",children:jsx("span",{className:"truncate",children:l.owner})})]})})},l.task)})]})})]})})}r(Xd,"BUIFilterTable");function Qd({label:e,value:t,onChange:o,min:n,max:a,step:i=1,suffix:l="",active:s}){let c=useRef(null),u=r(g=>Math.min(a,Math.max(n,Math.round(g))),"clamp");return jsxs("label",{className:`flex h-6.5 min-w-0 items-center gap-1 rounded-chip py-1 pr-1 pl-0.5
188
190
  transition-[background-color,box-shadow] duration-200`,style:{background:s?"var(--bui-accent-tint)":"var(--bui-field)",boxShadow:s?"0 0 0 1px var(--bui-accent)":"none"},children:[jsx("span",{role:"slider","aria-label":e,"aria-valuenow":t,"aria-valuemin":n,"aria-valuemax":a,tabIndex:0,onPointerDown:g=>{g.target.setPointerCapture(g.pointerId),c.current={x:g.clientX,v:t};},onPointerMove:g=>{c.current&&o(u(c.current.v+(g.clientX-c.current.x)/2*i));},onPointerUp:()=>c.current=null,onKeyDown:g=>{let d=g.shiftKey?10:1;g.key==="ArrowUp"||g.key==="ArrowRight"?(g.preventDefault(),o(u(t+i*d))):(g.key==="ArrowDown"||g.key==="ArrowLeft")&&(g.preventDefault(),o(u(t-i*d)));},className:`flex h-full shrink-0 cursor-ew-resize touch-none items-center rounded-[4px]
189
191
  px-0.5 text-[12px] text-ink-3 select-none hover:text-ink-2 focus-visible:text-accent-ink
190
- focus-visible:outline-none`,children:e}),jsx("input",{inputMode:"numeric",value:t,onChange:g=>{let d=Number(g.target.value.replace(/[^\d-]/g,""));Number.isNaN(d)||o(u(d));},"aria-label":`${e} value`,className:"min-w-0 flex-1 bg-transparent text-[12px] text-ink tabular-nums outline-none"}),l&&jsx("span",{className:"shrink-0 pr-0.5 text-[11.5px] text-ink-3",children:l})]})}r(Nd,"ScrubField");var Pd=["row","col","grid"];function Md({kind:e}){let t="size-1.5 rounded-[2px] border-[1.2px] border-current";return e==="row"?jsx("span",{className:"flex gap-0.5",children:[0,1,2].map(o=>jsx("span",{className:t},o))}):e==="col"?jsx("span",{className:"flex flex-col gap-0.5",children:[0,1].map(o=>jsx("span",{className:t},o))}):jsx("span",{className:"grid grid-cols-2 gap-0.5",children:[0,1,2,3].map(o=>jsx("span",{className:t},o))})}r(Md,"SegmentIcon");var Id=[],Ad=[],Bd={title:"Configuration",layout:"Layout",type:"Type",placeholder:"Select type",adjust:"Adjust",edited:"Edited"};function Ld(e,t){let o=[];for(let n=0;n<e.length;n+=t)o.push(e.slice(n,n+t));return o}r(Ld,"chunk");function Ed({fields:e=Id,options:t=Ad,labels:o,onChange:n}){let a=ye(Bd,o),[i,l]=useState(0),[s,c]=useState(()=>Object.fromEntries(e.map(w=>[w.key,w.value]))),[u,g]=useState(false),[d,m]=useState(a.placeholder),b=r(w=>{l(w),n?.({segment:w,values:s,type:d});},"selectSeg"),v=r((w,x)=>{let C={...s,[w]:x};c(C),n?.({segment:i,values:C,type:d});},"setValue"),S=r(w=>{m(w),g(false),n?.({segment:i,values:s,type:w});},"selectType"),h=e.some(w=>s[w.key]!==w.value),f=i!==0||h||d!==a.placeholder;return jsx(A,{children:jsxs("div",{className:"relative w-full max-w-60 rounded-card bg-surface shadow-raised",children:[jsxs("div",{className:"primitive-card-bar flex items-center justify-between border-b border-line",children:[jsx("span",{className:"text-[13px] font-medium text-ink",children:a.title}),f?jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-green",style:{animation:"bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),a.edited]}):jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-[5px] border border-accent/30 bg-accent-tint",children:jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"var(--bui-accent)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})})}),jsx("span",{className:"bg-clip-text text-[12px] font-medium text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-accent) 35%, var(--bui-accent-ink) 50%, var(--bui-accent) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:a.adjust})]})]}),jsxs("div",{className:"primitive-card-pad flex flex-col gap-2 border-b border-line",children:[jsx("p",{className:"text-[12.5px] font-medium text-ink",children:a.layout}),jsxs("div",{className:"relative grid grid-cols-3 rounded-control bg-field p-0.5",children:[jsx("span",{"aria-hidden":true,className:"absolute inset-y-0.5 rounded-[6px] bg-surface shadow-btn transition-transform duration-300",style:{width:"calc((100% - 4px) / 3)",left:2,transform:`translateX(${i*100}%)`,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}}),Pd.map((w,x)=>jsx("button",{type:"button","aria-label":`${w} layout`,"aria-pressed":x===i,onClick:()=>b(x),className:`relative z-10 flex h-6 items-center justify-center transition-colors duration-200
191
- ${x===i?"text-accent":"text-ink-3"}`,children:jsx(Md,{kind:w})},w))]}),Ld(e,2).map((w,x)=>jsx("div",{className:"grid min-w-0 grid-cols-2 gap-2",children:w.map(C=>jsx(Nd,{label:C.label,value:s[C.key],onChange:I=>v(C.key,I),min:C.min,max:C.max,step:C.step,suffix:C.suffix,active:s[C.key]!==C.value},C.key))},x))]}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between",children:[jsx("span",{className:"text-[12px] text-ink-3",children:a.type}),jsxs("div",{className:"relative -mr-0.5 w-30",children:[jsxs("button",{type:"button","aria-expanded":u,onClick:()=>g(w=>!w),className:`flex h-6.5 w-full items-center justify-between rounded-chip bg-inset py-1 pr-1 pl-2
192
- shadow-hairline transition-shadow duration-200 focus-visible:outline-none`,style:{boxShadow:u?"0 0 0 1px var(--bui-accent)":void 0},children:[jsx("span",{className:`text-[12px] ${d!==a.placeholder?"text-ink":"text-ink-3"}`,children:d}),jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-200",style:{transform:u?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),u&&jsx("div",{className:"absolute right-0 bottom-8 z-10 w-30 rounded-[10px] bg-surface p-1 shadow-raised",style:{animation:"bui-pop-in 200ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom right"},children:jsx(Xe,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[6px] bg-field",children:t.map(w=>jsx("button",{"data-menu-row":true,type:"button",onClick:()=>S(w),className:`relative z-10 flex h-6.5 w-full items-center rounded-[var(--bui-radius-chip)] px-2 text-left text-[12.5px] text-ink ${w===d?"bg-field group-hover/glide-menu:bg-transparent":""}`,children:w},w))})})]})]})]})})}r(Ed,"BUIFineTuneCard");function Lr({title:e,caption:t,kind:o,icon:n,status:a,actions:i,children:l,selected:s=false,compact:c=false,tone:u="default",hue:g,direction:d="vertical",input:m=true,output:b=true,sideOutput:v=false,className:S,style:h,...f}){return jsx(A,{children:jsxs("div",{...f,"data-bui-flow-node":true,"data-selected":s||void 0,"data-tone":u,"data-direction":d,"data-compact":c||void 0,className:["bui-flow-node",S].filter(Boolean).join(" "),style:{"--bui-flow-node-hue":g||(u==="condition"?"var(--bui-flow-condition)":u==="branch"?"var(--bui-flow-branch)":"var(--bui-accent)"),...h},children:[o&&jsx("div",{className:"bui-flow-node-kind",children:o}),jsxs("div",{className:"bui-flow-node-card",children:[m&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-input"}),jsxs("div",{className:"bui-flow-node-header",children:[n&&jsx("span",{className:"bui-flow-node-icon",children:n}),jsxs("div",{className:"bui-flow-node-copy",children:[jsx("div",{className:"bui-flow-node-title",children:e}),!c&&t&&jsx("div",{className:"bui-flow-node-caption",children:t})]}),a&&jsx("span",{className:"bui-flow-node-status",children:a}),i&&jsx("div",{className:"bui-flow-node-actions","data-ui":true,children:i})]}),l&&jsx("div",{className:"bui-flow-node-content","data-ui":true,children:l}),v&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-side-output"}),b&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-output"})]})]})})}r(Lr,"BUIFlowNode");var mi={top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},Rn=r((e,t,o)=>({x:e.x+mi[t].x*o,y:e.y+mi[t].y*o}),"offset"),gi=r(e=>`${e.x} ${e.y}`,"point");function Er({source:e,target:t,sourcePort:o="bottom",targetPort:n="top",returnLane:a}){let i=o==="left"||o==="right",l=Math.abs(i?t.x-e.x:t.y-e.y),s=Math.min(Math.max(l*.55,24),84),c=[];if(a!==void 0){let d=i?{x:(e.x+t.x)/2,y:a}:{x:a,y:(e.y+t.y)/2},m=i?t.x>=e.x?1:-1:t.y>=e.y?1:-1,b=i?{x:d.x-m*s,y:d.y}:{x:d.x,y:d.y-m*s},v=i?{x:d.x+m*s,y:d.y}:{x:d.x,y:d.y+m*s};c.push([e,Rn(e,o,s),b,d],[d,v,Rn(t,n,s),t]);}else c.push([e,Rn(e,o,s),Rn(t,n,s),t]);let u=`M ${gi(e)} `+c.map(d=>`C ${d.slice(1).map(gi).join(", ")}`).join(" "),g=[e];for(let d of c){let m=d.slice(1).reduce((v,S,h)=>v+Math.hypot(S.x-d[h].x,S.y-d[h].y),0),b=Math.max(16,Math.min(128,Math.ceil(m/8)));for(let v=1;v<=b;v++){let S=v/b,h=1-S;g.push({x:h**3*d[0].x+3*h**2*S*d[1].x+3*h*S**2*d[2].x+S**3*d[3].x,y:h**3*d[0].y+3*h**2*S*d[1].y+3*h*S**2*d[2].y+S**3*d[3].y});}}return {path:u,points:g,midpoint:g[Math.floor(g.length/2)]}}r(Er,"getBUIFlowConnection");var Ud="var(--bui-flow-branch)",fi=r((e,t,o="var(--bui-surface)")=>`color-mix(in srgb, ${e} ${t}%, ${o})`,"mix"),bi=24,zd=64,_d=30,Fd=[],Od={};function yi({size:e=16}){return jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11"}),jsx("path",{d:"M17 7A5 5 0 0 0 7 7"}),jsx("path",{d:"M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4"})]})}r(yi,"ConeIcon");function $d(){return jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-ink-3",children:jsx("path",{d:"m6 9 6 6 6-6"})})}r($d,"Chevron");function hi(){return jsx("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:"shrink-0 cursor-grab text-ink-3/70",children:[3,8,13].flatMap(e=>[jsx("circle",{cx:"3",cy:e,r:"1.1",fill:"currentColor"},`l${e}`),jsx("circle",{cx:"7.5",cy:e,r:"1.1",fill:"currentColor"},`r${e}`)])})}r(hi,"Handle");function Hd(){return jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}r(Hd,"CheckIcon");function Wd({items:e,value:t,width:o,align:n,onPick:a}){let[i,l]=useState(null),s=useRef([]),[c,u]=useState(null),g=e.findIndex(d=>d.name===t);return useLayoutEffect(()=>{let d=s.current[i??g];d&&u({top:d.offsetTop,height:d.offsetHeight});},[i,g]),jsxs("div",{onMouseLeave:()=>l(null),className:`absolute bottom-full z-20 mb-1.5 rounded-[10px] bg-surface p-1 shadow-raised ${o}
193
- ${n==="right"?"right-0":"left-0"}`,style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:n==="right"?"bottom right":"bottom left"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:c?.top??0,height:c?.height??0,opacity:c&&i!==null?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),e.map((d,m)=>jsxs("button",{type:"button",ref:b=>{s.current[m]=b;},onMouseEnter:()=>l(m),onClick:()=>a(d.name),className:"relative z-10 flex h-7.5 w-full cursor-pointer items-center gap-2 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-ink",children:d.name}),d.tag&&jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:d.tag}),jsx("span",{className:`shrink-0 text-ink ${d.name===t?"":"invisible"}`,children:jsx(Hd,{})})]},d.name))]})}r(Wd,"Menu");function xi({label:e}){return jsxs("span",{"data-ui":true,className:"inline-flex h-6 shrink-0 items-center gap-1 rounded-[6px] bg-surface px-1.5 text-[12px] font-medium text-ink shadow-btn",children:[jsx("span",{className:"text-ink-2",children:jsx(yi,{size:12})}),e]})}r(xi,"SourceChip");function Vd({id:e,value:t,dot:o,items:n,width:a,align:i="left",open:l,onToggle:s,onPick:c}){return jsxs("span",{"data-ui":true,className:"relative inline-flex min-w-0",children:[jsxs("button",{type:"button","aria-expanded":l,onClick:()=>s(e),className:`inline-flex h-6 min-w-0 cursor-pointer items-center gap-1 rounded-[var(--bui-radius-chip)] px-1.5
192
+ focus-visible:outline-none`,children:e}),jsx("input",{inputMode:"numeric",value:t,onChange:g=>{let d=Number(g.target.value.replace(/[^\d-]/g,""));Number.isNaN(d)||o(u(d));},"aria-label":`${e} value`,className:"min-w-0 flex-1 bg-transparent text-[12px] text-ink tabular-nums outline-none"}),l&&jsx("span",{className:"shrink-0 pr-0.5 text-[11.5px] text-ink-3",children:l})]})}r(Qd,"ScrubField");var Zd=["row","col","grid"];function Jd({kind:e}){let t="size-1.5 rounded-[2px] border-[1.2px] border-current";return e==="row"?jsx("span",{className:"flex gap-0.5",children:[0,1,2].map(o=>jsx("span",{className:t},o))}):e==="col"?jsx("span",{className:"flex flex-col gap-0.5",children:[0,1].map(o=>jsx("span",{className:t},o))}):jsx("span",{className:"grid grid-cols-2 gap-0.5",children:[0,1,2,3].map(o=>jsx("span",{className:t},o))})}r(Jd,"SegmentIcon");var eu=[],tu=[],ou={title:"Configuration",layout:"Layout",type:"Type",placeholder:"Select type",adjust:"Adjust",edited:"Edited"};function nu(e,t){let o=[];for(let n=0;n<e.length;n+=t)o.push(e.slice(n,n+t));return o}r(nu,"chunk");function ru({fields:e=eu,options:t=tu,labels:o,onChange:n}){let a=ye(ou,o),[i,l]=useState(0),[s,c]=useState(()=>Object.fromEntries(e.map(w=>[w.key,w.value]))),[u,g]=useState(false),[d,m]=useState(a.placeholder),b=r(w=>{l(w),n?.({segment:w,values:s,type:d});},"selectSeg"),v=r((w,x)=>{let C={...s,[w]:x};c(C),n?.({segment:i,values:C,type:d});},"setValue"),S=r(w=>{m(w),g(false),n?.({segment:i,values:s,type:w});},"selectType"),h=e.some(w=>s[w.key]!==w.value),f=i!==0||h||d!==a.placeholder;return jsx(A,{children:jsxs("div",{className:"relative w-full max-w-60 rounded-card bg-surface shadow-raised",children:[jsxs("div",{className:"primitive-card-bar flex items-center justify-between border-b border-line",children:[jsx("span",{className:"text-[13px] font-medium text-ink",children:a.title}),f?jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-green",style:{animation:"bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),a.edited]}):jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-[5px] border border-accent/30 bg-accent-tint",children:jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"var(--bui-accent)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})})}),jsx("span",{className:"bg-clip-text text-[12px] font-medium text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-accent) 35%, var(--bui-accent-ink) 50%, var(--bui-accent) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:a.adjust})]})]}),jsxs("div",{className:"primitive-card-pad flex flex-col gap-2 border-b border-line",children:[jsx("p",{className:"text-[12.5px] font-medium text-ink",children:a.layout}),jsxs("div",{className:"relative grid grid-cols-3 rounded-control bg-field p-0.5",children:[jsx("span",{"aria-hidden":true,className:"absolute inset-y-0.5 rounded-[6px] bg-surface shadow-btn transition-transform duration-300",style:{width:"calc((100% - 4px) / 3)",left:2,transform:`translateX(${i*100}%)`,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}}),Zd.map((w,x)=>jsx("button",{type:"button","aria-label":`${w} layout`,"aria-pressed":x===i,onClick:()=>b(x),className:`relative z-10 flex h-6 items-center justify-center transition-colors duration-200
193
+ ${x===i?"text-accent":"text-ink-3"}`,children:jsx(Jd,{kind:w})},w))]}),nu(e,2).map((w,x)=>jsx("div",{className:"grid min-w-0 grid-cols-2 gap-2",children:w.map(C=>jsx(Qd,{label:C.label,value:s[C.key],onChange:I=>v(C.key,I),min:C.min,max:C.max,step:C.step,suffix:C.suffix,active:s[C.key]!==C.value},C.key))},x))]}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between",children:[jsx("span",{className:"text-[12px] text-ink-3",children:a.type}),jsxs("div",{className:"relative -mr-0.5 w-30",children:[jsxs("button",{type:"button","aria-expanded":u,onClick:()=>g(w=>!w),className:`flex h-6.5 w-full items-center justify-between rounded-chip bg-inset py-1 pr-1 pl-2
194
+ shadow-hairline transition-shadow duration-200 focus-visible:outline-none`,style:{boxShadow:u?"0 0 0 1px var(--bui-accent)":void 0},children:[jsx("span",{className:`text-[12px] ${d!==a.placeholder?"text-ink":"text-ink-3"}`,children:d}),jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-200",style:{transform:u?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),u&&jsx("div",{className:"absolute right-0 bottom-8 z-10 w-30 rounded-[10px] bg-surface p-1 shadow-raised",style:{animation:"bui-pop-in 200ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"bottom right"},children:jsx(Ke,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[6px] bg-field",children:t.map(w=>jsx("button",{"data-menu-row":true,type:"button",onClick:()=>S(w),className:`relative z-10 flex h-6.5 w-full items-center rounded-[var(--bui-radius-chip)] px-2 text-left text-[12.5px] text-ink ${w===d?"bg-field group-hover/glide-menu:bg-transparent":""}`,children:w},w))})})]})]})]})})}r(ru,"BUIFineTuneCard");function Or({title:e,caption:t,kind:o,icon:n,status:a,actions:i,children:l,selected:s=false,compact:c=false,tone:u="default",hue:g,direction:d="vertical",input:m=true,output:b=true,sideOutput:v=false,className:S,style:h,...f}){return jsx(A,{children:jsxs("div",{...f,"data-bui-flow-node":true,"data-selected":s||void 0,"data-tone":u,"data-direction":d,"data-compact":c||void 0,className:["bui-flow-node",S].filter(Boolean).join(" "),style:{"--bui-flow-node-hue":g||(u==="condition"?"var(--bui-flow-condition)":u==="branch"?"var(--bui-flow-branch)":"var(--bui-accent)"),...h},children:[o&&jsx("div",{className:"bui-flow-node-kind",children:o}),jsxs("div",{className:"bui-flow-node-card",children:[m&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-input"}),jsxs("div",{className:"bui-flow-node-header",children:[n&&jsx("span",{className:"bui-flow-node-icon",children:n}),jsxs("div",{className:"bui-flow-node-copy",children:[jsx("div",{className:"bui-flow-node-title",children:e}),!c&&t&&jsx("div",{className:"bui-flow-node-caption",children:t})]}),a&&jsx("span",{className:"bui-flow-node-status",children:a}),i&&jsx("div",{className:"bui-flow-node-actions","data-ui":true,children:i})]}),l&&jsx("div",{className:"bui-flow-node-content","data-ui":true,children:l}),v&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-side-output"}),b&&jsx("span",{"aria-hidden":true,className:"bui-flow-node-port bui-flow-node-output"})]})]})})}r(Or,"BUIFlowNode");var ki={top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},An=r((e,t,o)=>({x:e.x+ki[t].x*o,y:e.y+ki[t].y*o}),"offset"),Si=r(e=>`${e.x} ${e.y}`,"point");function Fr({source:e,target:t,sourcePort:o="bottom",targetPort:n="top",returnLane:a}){let i=o==="left"||o==="right",l=Math.abs(i?t.x-e.x:t.y-e.y),s=Math.min(Math.max(l*.55,24),84),c=[];if(a!==void 0){let d=i?{x:(e.x+t.x)/2,y:a}:{x:a,y:(e.y+t.y)/2},m=i?t.x>=e.x?1:-1:t.y>=e.y?1:-1,b=i?{x:d.x-m*s,y:d.y}:{x:d.x,y:d.y-m*s},v=i?{x:d.x+m*s,y:d.y}:{x:d.x,y:d.y+m*s};c.push([e,An(e,o,s),b,d],[d,v,An(t,n,s),t]);}else c.push([e,An(e,o,s),An(t,n,s),t]);let u=`M ${Si(e)} `+c.map(d=>`C ${d.slice(1).map(Si).join(", ")}`).join(" "),g=[e];for(let d of c){let m=d.slice(1).reduce((v,S,h)=>v+Math.hypot(S.x-d[h].x,S.y-d[h].y),0),b=Math.max(16,Math.min(128,Math.ceil(m/8)));for(let v=1;v<=b;v++){let S=v/b,h=1-S;g.push({x:h**3*d[0].x+3*h**2*S*d[1].x+3*h*S**2*d[2].x+S**3*d[3].x,y:h**3*d[0].y+3*h**2*S*d[1].y+3*h*S**2*d[2].y+S**3*d[3].y});}}return {path:u,points:g,midpoint:g[Math.floor(g.length/2)]}}r(Fr,"getBUIFlowConnection");var iu="var(--bui-flow-branch)",Ci=r((e,t,o="var(--bui-surface)")=>`color-mix(in srgb, ${e} ${t}%, ${o})`,"mix"),Ti=24,su=64,lu=30,cu=[],du={};function Mi({size:e=16}){return jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11"}),jsx("path",{d:"M17 7A5 5 0 0 0 7 7"}),jsx("path",{d:"M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4"})]})}r(Mi,"ConeIcon");function uu(){return jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-ink-3",children:jsx("path",{d:"m6 9 6 6 6-6"})})}r(uu,"Chevron");function Ri(){return jsx("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:"shrink-0 cursor-grab text-ink-3/70",children:[3,8,13].flatMap(e=>[jsx("circle",{cx:"3",cy:e,r:"1.1",fill:"currentColor"},`l${e}`),jsx("circle",{cx:"7.5",cy:e,r:"1.1",fill:"currentColor"},`r${e}`)])})}r(Ri,"Handle");function pu(){return jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}r(pu,"CheckIcon");function mu({items:e,value:t,width:o,align:n,onPick:a}){let[i,l]=useState(null),s=useRef([]),[c,u]=useState(null),g=e.findIndex(d=>d.name===t);return useLayoutEffect(()=>{let d=s.current[i??g];d&&u({top:d.offsetTop,height:d.offsetHeight});},[i,g]),jsxs("div",{onMouseLeave:()=>l(null),className:`absolute bottom-full z-20 mb-1.5 rounded-[10px] bg-surface p-1 shadow-raised ${o}
195
+ ${n==="right"?"right-0":"left-0"}`,style:{animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:n==="right"?"bottom right":"bottom left"},children:[jsx("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-x-1 rounded-[6px] bg-hover",style:{top:c?.top??0,height:c?.height??0,opacity:c&&i!==null?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),e.map((d,m)=>jsxs("button",{type:"button",ref:b=>{s.current[m]=b;},onMouseEnter:()=>l(m),onClick:()=>a(d.name),className:"relative z-10 flex h-7.5 w-full cursor-pointer items-center gap-2 rounded-[var(--bui-radius-chip)] px-2 text-left",children:[jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium text-ink",children:d.name}),d.tag&&jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:d.tag}),jsx("span",{className:`shrink-0 text-ink ${d.name===t?"":"invisible"}`,children:jsx(pu,{})})]},d.name))]})}r(mu,"Menu");function Ni({label:e}){return jsxs("span",{"data-ui":true,className:"inline-flex h-6 shrink-0 items-center gap-1 rounded-[6px] bg-surface px-1.5 text-[12px] font-medium text-ink shadow-btn",children:[jsx("span",{className:"text-ink-2",children:jsx(Mi,{size:12})}),e]})}r(Ni,"SourceChip");function gu({id:e,value:t,dot:o,items:n,width:a,align:i="left",open:l,onToggle:s,onPick:c}){return jsxs("span",{"data-ui":true,className:"relative inline-flex min-w-0",children:[jsxs("button",{type:"button","aria-expanded":l,onClick:()=>s(e),className:`inline-flex h-6 min-w-0 cursor-pointer items-center gap-1 rounded-[var(--bui-radius-chip)] px-1.5
194
196
  text-[12px] font-medium text-ink transition-colors duration-100
195
- ${l?"bg-hover-2":"bg-field hover:bg-hover-2"}`,children:[o&&jsx("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:Ud}}),jsx("span",{className:"min-w-0 truncate",children:t}),jsx($d,{})]}),l&&jsx(Wd,{items:n,value:t,width:a,align:i,onPick:u=>c(e,u)})]})}r(Vd,"SelectChip");function jd({data:e,onChange:t}){let o=q(),n=e.values,a=e.properties,i=e.firstOptions,l=e.secondOptions,[s,c]=useState(null);useEffect(()=>{if(!s)return;let m=r(b=>{b.target.closest("[data-ui]")||c(null);},"close");return document.addEventListener("pointerdown",m),()=>document.removeEventListener("pointerdown",m)},[s]);let u=r(m=>c(b=>b===m?null:m),"toggle"),g=r((m,b)=>{t?.({...n,[m]:b}),c(null);},"pick"),d=r((m,b,v,S)=>jsx(Vd,{id:m,value:n[m],items:b,width:v,open:s===m,onToggle:u,onPick:g,...S}),"chip");return jsxs("div",{className:"flex flex-col gap-1.5 px-3 py-2.5",children:[jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[jsx(hi,{}),jsx("span",{className:"w-7 text-[12.5px] text-ink-2",children:o("If")}),jsx(xi,{label:e.source}),d("prop1",a.map(m=>({name:m})),"w-36"),jsx("span",{className:"text-[12.5px] text-ink-2",children:o("is")}),d("val1",i,"w-44",{dot:true,align:"right"})]}),jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1.5",children:[jsx(hi,{}),jsx("span",{className:"w-7 text-[12.5px] text-ink-2",children:o("and")}),jsx(xi,{label:e.source}),d("prop2",a.map(m=>({name:m})),"w-36"),jsx("span",{className:"text-[12.5px] text-ink-2",children:o("is")}),jsx("span",{className:"max-w-full pl-[49px]",children:d("val2",l,"w-64",{dot:true})})]})]})}r(jd,"ConditionBody");function Gd({steps:e=Fd,edges:t=[],onConditionChange:o,onMove:n}){let a=useRef(null),i=useRef(new Map),[l,s]=useState(0),[c,u]=useState(Od),[g,d]=useState(null),[m,b]=useState({}),v=useRef(null);useLayoutEffect(()=>{let y=a.current;if(!y)return;let R=r(()=>{s(y.clientWidth),u(J=>{let G={...J},Z=false;return i.current.forEach((de,le)=>{let _=de.offsetHeight;_&&Math.abs(_-(G[le]??0))>.5&&(G[le]=_,Z=true);}),Z?G:J});},"measure");R();let W=new ResizeObserver(R);return W.observe(y),i.current.forEach(J=>W.observe(J)),()=>W.disconnect()},[]);let S=[...new Set(e.map(y=>y.row))].sort((y,R)=>y-R),h=S.map(y=>Math.max(...e.filter(R=>R.row===y).map(R=>c[R.id]??90))),f=[];S.forEach((y,R)=>{f[R]=R===0?bi:f[R-1]+h[R-1]+zd;});let w=(f[S.length-1]??0)+(h[S.length-1]??0)+bi,x=l||480,C=r(y=>{let R=Math.min(y.w,x*.92),W=m[y.id];return {w:R,cx:y.x*x+(W?.dx??0),top:f[S.indexOf(y.row)]+(W?.dy??0)}},"place"),I=r(y=>{let{cx:R,top:W}=C(y);return {top:{x:R,y:W+(y.kind?_d:0)},bottom:{x:R,y:W+(c[y.id]??90)}}},"anchors"),D=r(y=>{let R=I(e.find(J=>J.id===y.from)).bottom,W=I(e.find(J=>J.id===y.to)).top;return Er({source:R,target:W}).path},"bezier"),P=r(y=>R=>{if(R.target.closest("[data-ui]"))return;let W=m[y.id];v.current={id:y.id,startX:R.clientX,startY:R.clientY,baseDx:W?.dx??0,baseDy:W?.dy??0,moved:false},R.currentTarget.setPointerCapture(R.pointerId);},"onPointerDown"),E=r(y=>R=>{let W=v.current;if(!W||W.id!==y.id)return;let J=W.baseDx+R.clientX-W.startX,G=W.baseDy+R.clientY-W.startY;if(!W.moved&&Math.hypot(J-W.baseDx,G-W.baseDy)<3)return;W.moved=true;let{w:Z}=C(y),de=c[y.id]??90,le=y.x*x,_=f[S.indexOf(y.row)],ae=Math.min(Math.max(le+J,Z/2+8),x-Z/2-8),K=Math.min(Math.max(_+G,8),w-de-8);b(me=>({...me,[y.id]:{dx:ae-le,dy:K-_}}));},"onPointerMove"),V=r(y=>()=>{let R=v.current;R?.id===y.id&&(R.moved&&n?.(R.id,m[R.id]??{dx:0,dy:0}),R.moved?setTimeout(()=>v.current=null,0):v.current=null);},"onPointerUp"),j=r(()=>v.current?.moved===true,"wasDragged"),B=r(y=>g===y.from||g===y.to,"isLit");return jsx(A,{children:jsxs("div",{ref:a,className:"relative w-full select-none overflow-hidden rounded-card bg-page shadow-hairline",style:{height:w,backgroundImage:"radial-gradient(var(--bui-line-strong) 1px, transparent 1.25px)",backgroundSize:"22px 22px",backgroundPosition:"center"},children:[jsx("svg",{width:x,height:w,className:"pointer-events-none absolute inset-0",children:t.filter(y=>e.some(R=>R.id===y.from)&&e.some(R=>R.id===y.to)).map(y=>jsx("path",{d:D(y),fill:"none",stroke:B(y)?"var(--bui-accent)":"var(--bui-line-strong)",strokeWidth:"1.25",className:"transition-[stroke] duration-150"},`${y.from}-${y.to}`))}),e.map(y=>{let{w:R,cx:W,top:J}=C(y),G=g===y.id;return jsxs("div",{ref:Z=>{Z?i.current.set(y.id,Z):i.current.delete(y.id);},onPointerDown:P(y),onPointerMove:E(y),onPointerUp:V(y),className:"absolute flex -translate-x-1/2 touch-none flex-col items-start gap-1.5",style:{left:W,top:J,width:R,zIndex:v.current?.id===y.id?2:1},children:[y.kind&&jsx("span",{className:"inline-flex h-6 items-center rounded-[6px] px-2 text-[11.5px] font-medium",style:{background:fi(y.kind.hue,14,"var(--bui-page)"),color:fi(y.kind.hue,80,"var(--bui-ink)")},children:y.kind.label}),y.condition?jsx("div",{className:"w-full rounded-[18px] bg-surface shadow-card transition-shadow duration-150 hover:shadow-raised",children:jsx(jd,{data:y.conditionData??{source:"",values:{},properties:[],firstOptions:[],secondOptions:[]},onChange:Z=>o?.(y.id,Z)})}):jsx("button",{type:"button",onClick:()=>{j()||d(G?null:y.id);},"aria-pressed":G,className:`w-full cursor-pointer rounded-[var(--bui-radius-scale-18)] bg-surface text-left outline-none
197
+ ${l?"bg-hover-2":"bg-field hover:bg-hover-2"}`,children:[o&&jsx("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:iu}}),jsx("span",{className:"min-w-0 truncate",children:t}),jsx(uu,{})]}),l&&jsx(mu,{items:n,value:t,width:a,align:i,onPick:u=>c(e,u)})]})}r(gu,"SelectChip");function fu({data:e,onChange:t}){let o=q(),n=e.values,a=e.properties,i=e.firstOptions,l=e.secondOptions,[s,c]=useState(null);useEffect(()=>{if(!s)return;let m=r(b=>{b.target.closest("[data-ui]")||c(null);},"close");return document.addEventListener("pointerdown",m),()=>document.removeEventListener("pointerdown",m)},[s]);let u=r(m=>c(b=>b===m?null:m),"toggle"),g=r((m,b)=>{t?.({...n,[m]:b}),c(null);},"pick"),d=r((m,b,v,S)=>jsx(gu,{id:m,value:n[m],items:b,width:v,open:s===m,onToggle:u,onPick:g,...S}),"chip");return jsxs("div",{className:"flex flex-col gap-1.5 px-3 py-2.5",children:[jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[jsx(Ri,{}),jsx("span",{className:"w-7 text-[12.5px] text-ink-2",children:o("If")}),jsx(Ni,{label:e.source}),d("prop1",a.map(m=>({name:m})),"w-36"),jsx("span",{className:"text-[12.5px] text-ink-2",children:o("is")}),d("val1",i,"w-44",{dot:true,align:"right"})]}),jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1.5",children:[jsx(Ri,{}),jsx("span",{className:"w-7 text-[12.5px] text-ink-2",children:o("and")}),jsx(Ni,{label:e.source}),d("prop2",a.map(m=>({name:m})),"w-36"),jsx("span",{className:"text-[12.5px] text-ink-2",children:o("is")}),jsx("span",{className:"max-w-full pl-[49px]",children:d("val2",l,"w-64",{dot:true})})]})]})}r(fu,"ConditionBody");function bu({steps:e=cu,edges:t=[],onConditionChange:o,onMove:n}){let a=useRef(null),i=useRef(new Map),[l,s]=useState(0),[c,u]=useState(du),[g,d]=useState(null),[m,b]=useState({}),v=useRef(null);useLayoutEffect(()=>{let y=a.current;if(!y)return;let R=r(()=>{s(y.clientWidth),u(J=>{let G={...J},Z=false;return i.current.forEach((de,le)=>{let _=de.offsetHeight;_&&Math.abs(_-(G[le]??0))>.5&&(G[le]=_,Z=true);}),Z?G:J});},"measure");R();let W=new ResizeObserver(R);return W.observe(y),i.current.forEach(J=>W.observe(J)),()=>W.disconnect()},[]);let S=[...new Set(e.map(y=>y.row))].sort((y,R)=>y-R),h=S.map(y=>Math.max(...e.filter(R=>R.row===y).map(R=>c[R.id]??90))),f=[];S.forEach((y,R)=>{f[R]=R===0?Ti:f[R-1]+h[R-1]+su;});let w=(f[S.length-1]??0)+(h[S.length-1]??0)+Ti,x=l||480,C=r(y=>{let R=Math.min(y.w,x*.92),W=m[y.id];return {w:R,cx:y.x*x+(W?.dx??0),top:f[S.indexOf(y.row)]+(W?.dy??0)}},"place"),I=r(y=>{let{cx:R,top:W}=C(y);return {top:{x:R,y:W+(y.kind?lu:0)},bottom:{x:R,y:W+(c[y.id]??90)}}},"anchors"),D=r(y=>{let R=I(e.find(J=>J.id===y.from)).bottom,W=I(e.find(J=>J.id===y.to)).top;return Fr({source:R,target:W}).path},"bezier"),P=r(y=>R=>{if(R.target.closest("[data-ui]"))return;let W=m[y.id];v.current={id:y.id,startX:R.clientX,startY:R.clientY,baseDx:W?.dx??0,baseDy:W?.dy??0,moved:false},R.currentTarget.setPointerCapture(R.pointerId);},"onPointerDown"),E=r(y=>R=>{let W=v.current;if(!W||W.id!==y.id)return;let J=W.baseDx+R.clientX-W.startX,G=W.baseDy+R.clientY-W.startY;if(!W.moved&&Math.hypot(J-W.baseDx,G-W.baseDy)<3)return;W.moved=true;let{w:Z}=C(y),de=c[y.id]??90,le=y.x*x,_=f[S.indexOf(y.row)],ae=Math.min(Math.max(le+J,Z/2+8),x-Z/2-8),X=Math.min(Math.max(_+G,8),w-de-8);b(me=>({...me,[y.id]:{dx:ae-le,dy:X-_}}));},"onPointerMove"),V=r(y=>()=>{let R=v.current;R?.id===y.id&&(R.moved&&n?.(R.id,m[R.id]??{dx:0,dy:0}),R.moved?setTimeout(()=>v.current=null,0):v.current=null);},"onPointerUp"),j=r(()=>v.current?.moved===true,"wasDragged"),B=r(y=>g===y.from||g===y.to,"isLit");return jsx(A,{children:jsxs("div",{ref:a,className:"relative w-full select-none overflow-hidden rounded-card bg-page shadow-hairline",style:{height:w,backgroundImage:"radial-gradient(var(--bui-line-strong) 1px, transparent 1.25px)",backgroundSize:"22px 22px",backgroundPosition:"center"},children:[jsx("svg",{width:x,height:w,className:"pointer-events-none absolute inset-0",children:t.filter(y=>e.some(R=>R.id===y.from)&&e.some(R=>R.id===y.to)).map(y=>jsx("path",{d:D(y),fill:"none",stroke:B(y)?"var(--bui-accent)":"var(--bui-line-strong)",strokeWidth:"1.25",className:"transition-[stroke] duration-150"},`${y.from}-${y.to}`))}),e.map(y=>{let{w:R,cx:W,top:J}=C(y),G=g===y.id;return jsxs("div",{ref:Z=>{Z?i.current.set(y.id,Z):i.current.delete(y.id);},onPointerDown:P(y),onPointerMove:E(y),onPointerUp:V(y),className:"absolute flex -translate-x-1/2 touch-none flex-col items-start gap-1.5",style:{left:W,top:J,width:R,zIndex:v.current?.id===y.id?2:1},children:[y.kind&&jsx("span",{className:"inline-flex h-6 items-center rounded-[6px] px-2 text-[11.5px] font-medium",style:{background:Ci(y.kind.hue,14,"var(--bui-page)"),color:Ci(y.kind.hue,80,"var(--bui-ink)")},children:y.kind.label}),y.condition?jsx("div",{className:"w-full rounded-[18px] bg-surface shadow-card transition-shadow duration-150 hover:shadow-raised",children:jsx(fu,{data:y.conditionData??{source:"",values:{},properties:[],firstOptions:[],secondOptions:[]},onChange:Z=>o?.(y.id,Z)})}):jsx("button",{type:"button",onClick:()=>{j()||d(G?null:y.id);},"aria-pressed":G,className:`w-full cursor-pointer rounded-[var(--bui-radius-scale-18)] bg-surface text-left outline-none
196
198
  transition-shadow duration-150 focus-visible:shadow-[0_0_0_1.5px_var(--bui-accent)]
197
- ${G?"shadow-[0_0_0_1.5px_var(--bui-accent),0_2px_10px_rgba(0,0,0,0.045)]":"shadow-card hover:shadow-raised"}`,children:jsx(Lr,{title:y.title,caption:y.caption,icon:jsx(yi,{}),hue:y.hue,input:false,output:false})})]},y.id)})]})})}r(Gd,"BUIFlowchart");var wi="cubic-bezier(0.16, 1, 0.3, 1)",Dr=r(e=>`${e>0?"+":""}${e.toFixed(2)}%`,"formatPercent"),Pn=r(e=>`$${Math.round(e).toLocaleString("en-US")}`,"formatMoney");function Ur(e,t=6){let o=Math.floor(Date.now()/1e3);return e.map((n,a)=>({time:o-(e.length-1-a)*t,value:n}))}r(Ur,"makePoints");function Yd(e,t=9){if(e.length<3)return e.slice();let o=[],n=e.length;for(let a=0;a<n-1;a+=1){let i=e[Math.max(0,a-1)],l=e[a],s=e[a+1],c=e[Math.min(n-1,a+2)];for(let u=0;u<t;u+=1){let g=u/t,d=g*g,m=d*g;o.push(.5*(2*l+(-i+s)*g+(2*i-5*l+4*s-c)*d+(-i+3*l-3*s+c)*m));}}return o.push(e[n-1]),o}r(Yd,"smooth");function Qd(e,t){let o=Yd(e);return Ur(o,o.length>1?t/(o.length-1):0)}r(Qd,"smoothPoints");var Si=xa;function Ci({children:e,tone:t}){return jsx("code",{className:`font-mono text-[11.5px] ${t==="red"?"text-red":"text-green"}`,children:e})}r(Ci,"Mono");function In(e,t){let o=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-o.left)/o.width));return Math.round(n*(t-1))}r(In,"chartIndexFromPointer");function Ti({rows:e}){return jsx("div",{className:"insight-chart-tooltip",children:e.map(t=>jsxs("span",{className:"insight-chart-tooltip-item",children:[jsx("span",{className:"insight-chart-tooltip-dot",style:{background:t.color}}),t.value]},t.label))})}r(Ti,"ChartTooltip");var Zd=[];function Jd({series:e=Zd}){let t=q(),o=Si(),[n,a]=useState(null),i=useMemo(()=>e.map(c=>Qd(c.values,42)),[e]),l=i[0]?.length??0,s=useMemo(()=>e.map((c,u)=>({id:c.name,label:"",data:i[u],value:i[u].at(-1)?.value??c.values.at(-1)??0,color:c.color})),[e,i]);return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsx("div",{className:"flex items-center gap-4",children:e.map((c,u)=>jsxs("div",{className:"flex-1",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[11.5px] text-ink-2",children:[jsx("span",{className:`size-2 rounded-full ${c.dot}`}),c.name]}),jsx("span",{className:`block text-[17px] font-semibold tracking-[-0.01em] tabular-nums ${c.tone==="red"?"text-red":"text-green"}`,children:Dr(i[u].at(-1)?.value??c.values.at(-1)??0)}),jsx(Ci,{tone:c.tone,children:c.sub})]},c.name))}),jsxs("div",{className:"mt-2 overflow-hidden rounded-control bg-inset shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5",children:[jsx("span",{className:"text-[11px] text-ink-3 tabular-nums",children:t("Trend snapshot")}),jsx("span",{className:"rounded-full bg-field px-2 py-0.5 text-[10.5px] font-medium text-ink-2",children:t("Snapshot")})]}),jsxs("div",{className:"insight-chart-stage relative h-[166px]",onPointerDown:c=>l>1&&a(In(c,l)),onPointerMove:c=>l>1&&a(In(c,l)),onPointerLeave:()=>a(null),onPointerCancel:()=>a(null),onPointerUp:()=>a(null),children:[jsx(Liveline,{data:[],value:0,series:s,theme:o?"dark":"light",grid:false,pulse:false,window:42,paused:true,scrub:false,cursor:"default",lineWidth:2.25,padding:{top:40,right:0,bottom:22,left:0},formatValue:Dr}),n!==null&&jsxs(Fragment,{children:[jsx("span",{className:"insight-chart-cursor",style:{left:`${n/(l-1)*100}%`}}),jsx("span",{className:"insight-chart-tooltip-anchor",style:{left:`${Math.min(Math.max(n/(l-1)*100,28),72)}%`},children:jsx(Ti,{rows:e.map((c,u)=>({label:c.name,value:Dr(i[u][n]?.value??i[u].at(-1)?.value??0),color:c.tooltipColor}))})})]})]})]})]})}r(Jd,"CompareCard");var eu={spend:[],usage:[]};function tu({data:e=eu,title:t}){let o=q(),n=useMonkeysResolvedTheme(),a=Si(),[i,l]=useState("spend"),s=useRef(null),[c,u]=useState();useLayoutEffect(()=>{s.current&&u(getComputedStyle(s.current).getPropertyValue("--bui-chart-alert").trim()||void 0);},[a,n]);let[g,d]=useState(null),m=useMemo(()=>Ur(e.spend,7),[e]),b=useMemo(()=>Ur(e.usage,7),[e]),v=i==="spend"?m:b,S=v.at(-1)?.value??0,h=i==="spend"?e.spendThreshold??"":e.usageThreshold??"",f=Pn(m.at(-1)?.value??0);return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink",children:[jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),t??o("Anomaly")]}),jsx("span",{className:"rounded-full bg-field px-2 py-0.5 text-[10.5px] font-medium text-ink-2",children:o("Snapshot")})]}),jsxs("div",{className:"mt-2 overflow-hidden rounded-control bg-inset shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5",children:[jsx("span",{className:"text-[11px] text-ink-3 tabular-nums",children:g!==null?i==="spend"?Pn(v[g]?.value??S):`${Math.round(v[g]?.value??S)} kWh`:`${h} threshold`}),jsx("span",{className:"flex rounded-full bg-field p-0.5",children:["spend","usage"].map(w=>jsx("button",{type:"button","aria-pressed":i===w,onClick:()=>l(w),className:`rounded-[var(--bui-radius-pill)] px-2 py-0.5 text-[10.5px] font-medium transition-[background-color,color,box-shadow,transform] duration-150 active:scale-[0.96] ${i===w?"bg-surface text-ink shadow-btn":"text-ink-3 hover:text-ink-2"}`,children:o(w==="spend"?"Spend":"Usage")},w))})]}),jsxs("div",{ref:s,className:"insight-chart-stage relative h-[166px]",onPointerDown:w=>v.length>1&&d(In(w,v.length)),onPointerMove:w=>v.length>1&&d(In(w,v.length)),onPointerLeave:()=>d(null),onPointerCancel:()=>d(null),onPointerUp:()=>d(null),children:[jsx(Liveline,{data:v,value:S,theme:a?"dark":"light",color:c,grid:true,scrub:false,fill:false,pulse:false,momentum:false,paused:true,window:49,lineWidth:2.25,cursor:"crosshair",padding:{top:34,right:0,bottom:22,left:0},formatValue:w=>i==="spend"?Pn(w):`${Math.round(w)} kWh`}),g!==null&&jsxs(Fragment,{children:[jsx("span",{className:"insight-chart-cursor",style:{left:`${g/(v.length-1)*100}%`}}),jsx("span",{className:"insight-chart-tooltip-anchor",style:{left:`${Math.min(Math.max(g/(v.length-1)*100,28),72)}%`},children:jsx(Ti,{rows:[{label:i==="spend"?"Spend":"Usage",value:i==="spend"?Pn(v[g]?.value??S):`${Math.round(v[g]?.value??S)} kWh`,color:"var(--bui-red)"}]})})]})]})]}),jsxs("div",{className:"mt-1.5 flex items-baseline gap-2",children:[jsxs("span",{className:"text-[17px] font-semibold tracking-[-0.01em] text-ink tabular-nums",children:[f," ",o("spent")]}),jsx(Ci,{tone:"red",children:e.comparison??""}),jsx("span",{className:"text-[11px] text-ink-3",children:e.comparisonPeriod??""})]})]})}r(tu,"AnomalyCard");var ou=[];function nu({segments:e=ou,title:t,description:o}){let n=q(),[a,i]=useState(e[0]?.name),l=e.find(s=>s.name===a)??e[0];return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink",children:[jsx("span",{className:"flex size-3.5 items-center justify-center rounded-full bg-orange text-[8px] font-bold text-white",children:n("V")}),t??n("Allocation")]}),jsx("span",{className:"mt-1 block text-[20px] font-semibold tracking-[-0.01em] text-ink tabular-nums",children:l?.amount??""}),jsx("div",{className:"mt-3 flex h-9 gap-0.5 overflow-hidden rounded-full bg-field p-0.5",role:"group","aria-label":n("Allocation segments"),children:e.map(s=>jsx("button",{type:"button","aria-pressed":a===s.name,"aria-label":`${s.label}: ${s.pct}%`,onClick:()=>i(s.name),className:`relative h-full overflow-hidden rounded-[var(--bui-radius-pill)] ${s.cls} transition-[opacity,transform,box-shadow] duration-300 active:scale-[0.98]`,style:{width:`${s.pct}%`,opacity:a===s.name?1:.58,boxShadow:a===s.name?"inset 0 0 0 1px var(--bui-allocation-highlight)":void 0,transitionTimingFunction:wi},children:jsx("span",{className:"absolute inset-y-1 left-1 rounded-full bg-white/20 transition-[width,opacity] duration-500",style:{width:a===s.name?"calc(100% - 8px)":"0%",opacity:a===s.name?1:0,transitionTimingFunction:wi}})},s.name))}),jsx("div",{className:"mt-2 flex items-center gap-1.5",children:e.map(s=>jsxs("button",{type:"button","aria-pressed":a===s.name,onClick:()=>i(s.name),className:`flex items-center gap-1 rounded-[var(--bui-radius-pill)] px-1.5 py-0.5 text-[11px] transition-[background-color,color,transform] duration-150 active:scale-[0.96] ${a===s.name?"bg-field text-ink":"text-ink-2 hover:bg-hover hover:text-ink"}`,children:[jsx("span",{className:`size-1.5 rounded-full ${s.cls}`}),s.name," ",jsxs("span",{className:"tabular-nums",children:[s.pct,"%"]})]},s.name))}),jsxs("div",{className:"mt-3 min-h-16 rounded-control bg-inset px-2.5 py-2 shadow-hairline",children:[jsx("span",{className:`block text-[11.5px] font-medium ${l?.tone??""}`,children:l?.label??""}),jsx("span",{className:"mt-1 block text-[11px] leading-relaxed text-ink-3",children:o})]})]})}r(nu,"AllocationCard");var ru=[],au={title:"Insights"};function iu({pages:e=ru,onFollowUp:t,labels:o}){let n=q(),a=ye(au,o),[i,l]=useState(0),s=r(d=>{l(m=>(m+d+e.length)%e.length);},"move"),c=e[i]??e[0];if(!c)return null;let{prose:u,pill:g}=c;return jsx(A,{children:jsxs("div",{className:"min-h-[408px] w-full max-w-86",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsxs("span",{className:"flex items-baseline gap-1.5",children:[jsx("span",{className:"text-[13px] font-semibold text-ink",children:a.title}),jsx("span",{className:"text-[13px] text-ink-3 tabular-nums",children:e.length})]}),jsx("span",{className:"flex items-center gap-0.5",children:["M15 18l-6-6 6-6","M9 6l6 6-6 6"].map((d,m)=>jsx("button",{"aria-label":n(m===0?"Previous insight":"Next insight"),onClick:()=>s(m===0?-1:1),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3
199
+ ${G?"shadow-[0_0_0_1.5px_var(--bui-accent),0_2px_10px_rgba(0,0,0,0.045)]":"shadow-card hover:shadow-raised"}`,children:jsx(Or,{title:y.title,caption:y.caption,icon:jsx(Mi,{}),hue:y.hue,input:false,output:false})})]},y.id)})]})})}r(bu,"BUIFlowchart");var Ii="cubic-bezier(0.16, 1, 0.3, 1)",$r=r(e=>`${e>0?"+":""}${e.toFixed(2)}%`,"formatPercent"),Ln=r(e=>`$${Math.round(e).toLocaleString("en-US")}`,"formatMoney");function Hr(e,t=6){let o=Math.floor(Date.now()/1e3);return e.map((n,a)=>({time:o-(e.length-1-a)*t,value:n}))}r(Hr,"makePoints");function yu(e,t=9){if(e.length<3)return e.slice();let o=[],n=e.length;for(let a=0;a<n-1;a+=1){let i=e[Math.max(0,a-1)],l=e[a],s=e[a+1],c=e[Math.min(n-1,a+2)];for(let u=0;u<t;u+=1){let g=u/t,d=g*g,m=d*g;o.push(.5*(2*l+(-i+s)*g+(2*i-5*l+4*s-c)*d+(-i+3*l-3*s+c)*m));}}return o.push(e[n-1]),o}r(yu,"smooth");function wu(e,t){let o=yu(e);return Hr(o,o.length>1?t/(o.length-1):0)}r(wu,"smoothPoints");var Bi=Na;function Li({children:e,tone:t}){return jsx("code",{className:`font-mono text-[11.5px] ${t==="red"?"text-red":"text-green"}`,children:e})}r(Li,"Mono");function Dn(e,t){let o=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-o.left)/o.width));return Math.round(n*(t-1))}r(Dn,"chartIndexFromPointer");function Ei({rows:e}){return jsx("div",{className:"insight-chart-tooltip",children:e.map(t=>jsxs("span",{className:"insight-chart-tooltip-item",children:[jsx("span",{className:"insight-chart-tooltip-dot",style:{background:t.color}}),t.value]},t.label))})}r(Ei,"ChartTooltip");var ku=[];function Su({series:e=ku}){let t=q(),o=Bi(),[n,a]=useState(null),i=useMemo(()=>e.map(c=>wu(c.values,42)),[e]),l=i[0]?.length??0,s=useMemo(()=>e.map((c,u)=>({id:c.name,label:"",data:i[u],value:i[u].at(-1)?.value??c.values.at(-1)??0,color:c.color})),[e,i]);return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsx("div",{className:"flex items-center gap-4",children:e.map((c,u)=>jsxs("div",{className:"flex-1",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[11.5px] text-ink-2",children:[jsx("span",{className:`size-2 rounded-full ${c.dot}`}),c.name]}),jsx("span",{className:`block text-[17px] font-semibold tracking-[-0.01em] tabular-nums ${c.tone==="red"?"text-red":"text-green"}`,children:$r(i[u].at(-1)?.value??c.values.at(-1)??0)}),jsx(Li,{tone:c.tone,children:c.sub})]},c.name))}),jsxs("div",{className:"mt-2 overflow-hidden rounded-control bg-inset shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5",children:[jsx("span",{className:"text-[11px] text-ink-3 tabular-nums",children:t("Trend snapshot")}),jsx("span",{className:"rounded-full bg-field px-2 py-0.5 text-[10.5px] font-medium text-ink-2",children:t("Snapshot")})]}),jsxs("div",{className:"insight-chart-stage relative h-[166px]",onPointerDown:c=>l>1&&a(Dn(c,l)),onPointerMove:c=>l>1&&a(Dn(c,l)),onPointerLeave:()=>a(null),onPointerCancel:()=>a(null),onPointerUp:()=>a(null),children:[jsx(Liveline,{data:[],value:0,series:s,theme:o?"dark":"light",grid:false,pulse:false,window:42,paused:true,scrub:false,cursor:"default",lineWidth:2.25,padding:{top:40,right:0,bottom:22,left:0},formatValue:$r}),n!==null&&jsxs(Fragment,{children:[jsx("span",{className:"insight-chart-cursor",style:{left:`${n/(l-1)*100}%`}}),jsx("span",{className:"insight-chart-tooltip-anchor",style:{left:`${Math.min(Math.max(n/(l-1)*100,28),72)}%`},children:jsx(Ei,{rows:e.map((c,u)=>({label:c.name,value:$r(i[u][n]?.value??i[u].at(-1)?.value??0),color:c.tooltipColor}))})})]})]})]})]})}r(Su,"CompareCard");var Cu={spend:[],usage:[]};function Tu({data:e=Cu,title:t}){let o=q(),n=useMonkeysResolvedTheme(),a=Bi(),[i,l]=useState("spend"),s=useRef(null),[c,u]=useState();useLayoutEffect(()=>{s.current&&u(getComputedStyle(s.current).getPropertyValue("--bui-chart-alert").trim()||void 0);},[a,n]);let[g,d]=useState(null),m=useMemo(()=>Hr(e.spend,7),[e]),b=useMemo(()=>Hr(e.usage,7),[e]),v=i==="spend"?m:b,S=v.at(-1)?.value??0,h=i==="spend"?e.spendThreshold??"":e.usageThreshold??"",f=Ln(m.at(-1)?.value??0);return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink",children:[jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),t??o("Anomaly")]}),jsx("span",{className:"rounded-full bg-field px-2 py-0.5 text-[10.5px] font-medium text-ink-2",children:o("Snapshot")})]}),jsxs("div",{className:"mt-2 overflow-hidden rounded-control bg-inset shadow-hairline",children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5",children:[jsx("span",{className:"text-[11px] text-ink-3 tabular-nums",children:g!==null?i==="spend"?Ln(v[g]?.value??S):`${Math.round(v[g]?.value??S)} kWh`:`${h} threshold`}),jsx("span",{className:"flex rounded-full bg-field p-0.5",children:["spend","usage"].map(w=>jsx("button",{type:"button","aria-pressed":i===w,onClick:()=>l(w),className:`rounded-[var(--bui-radius-pill)] px-2 py-0.5 text-[10.5px] font-medium transition-[background-color,color,box-shadow,transform] duration-150 active:scale-[0.96] ${i===w?"bg-surface text-ink shadow-btn":"text-ink-3 hover:text-ink-2"}`,children:o(w==="spend"?"Spend":"Usage")},w))})]}),jsxs("div",{ref:s,className:"insight-chart-stage relative h-[166px]",onPointerDown:w=>v.length>1&&d(Dn(w,v.length)),onPointerMove:w=>v.length>1&&d(Dn(w,v.length)),onPointerLeave:()=>d(null),onPointerCancel:()=>d(null),onPointerUp:()=>d(null),children:[jsx(Liveline,{data:v,value:S,theme:a?"dark":"light",color:c,grid:true,scrub:false,fill:false,pulse:false,momentum:false,paused:true,window:49,lineWidth:2.25,cursor:"crosshair",padding:{top:34,right:0,bottom:22,left:0},formatValue:w=>i==="spend"?Ln(w):`${Math.round(w)} kWh`}),g!==null&&jsxs(Fragment,{children:[jsx("span",{className:"insight-chart-cursor",style:{left:`${g/(v.length-1)*100}%`}}),jsx("span",{className:"insight-chart-tooltip-anchor",style:{left:`${Math.min(Math.max(g/(v.length-1)*100,28),72)}%`},children:jsx(Ei,{rows:[{label:i==="spend"?"Spend":"Usage",value:i==="spend"?Ln(v[g]?.value??S):`${Math.round(v[g]?.value??S)} kWh`,color:"var(--bui-red)"}]})})]})]})]}),jsxs("div",{className:"mt-1.5 flex items-baseline gap-2",children:[jsxs("span",{className:"text-[17px] font-semibold tracking-[-0.01em] text-ink tabular-nums",children:[f," ",o("spent")]}),jsx(Li,{tone:"red",children:e.comparison??""}),jsx("span",{className:"text-[11px] text-ink-3",children:e.comparisonPeriod??""})]})]})}r(Tu,"AnomalyCard");var Ru=[];function Nu({segments:e=Ru,title:t,description:o}){let n=q(),[a,i]=useState(e[0]?.name),l=e.find(s=>s.name===a)??e[0];return jsxs("div",{className:"min-h-[278px] rounded-card bg-surface p-3 shadow-hairline",children:[jsxs("span",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink",children:[jsx("span",{className:"flex size-3.5 items-center justify-center rounded-full bg-orange text-[8px] font-bold text-white",children:n("V")}),t??n("Allocation")]}),jsx("span",{className:"mt-1 block text-[20px] font-semibold tracking-[-0.01em] text-ink tabular-nums",children:l?.amount??""}),jsx("div",{className:"mt-3 flex h-9 gap-0.5 overflow-hidden rounded-full bg-field p-0.5",role:"group","aria-label":n("Allocation segments"),children:e.map(s=>jsx("button",{type:"button","aria-pressed":a===s.name,"aria-label":`${s.label}: ${s.pct}%`,onClick:()=>i(s.name),className:`relative h-full overflow-hidden rounded-[var(--bui-radius-pill)] ${s.cls} transition-[opacity,transform,box-shadow] duration-300 active:scale-[0.98]`,style:{width:`${s.pct}%`,opacity:a===s.name?1:.58,boxShadow:a===s.name?"inset 0 0 0 1px var(--bui-allocation-highlight)":void 0,transitionTimingFunction:Ii},children:jsx("span",{className:"absolute inset-y-1 left-1 rounded-full bg-white/20 transition-[width,opacity] duration-500",style:{width:a===s.name?"calc(100% - 8px)":"0%",opacity:a===s.name?1:0,transitionTimingFunction:Ii}})},s.name))}),jsx("div",{className:"mt-2 flex items-center gap-1.5",children:e.map(s=>jsxs("button",{type:"button","aria-pressed":a===s.name,onClick:()=>i(s.name),className:`flex items-center gap-1 rounded-[var(--bui-radius-pill)] px-1.5 py-0.5 text-[11px] transition-[background-color,color,transform] duration-150 active:scale-[0.96] ${a===s.name?"bg-field text-ink":"text-ink-2 hover:bg-hover hover:text-ink"}`,children:[jsx("span",{className:`size-1.5 rounded-full ${s.cls}`}),s.name," ",jsxs("span",{className:"tabular-nums",children:[s.pct,"%"]})]},s.name))}),jsxs("div",{className:"mt-3 min-h-16 rounded-control bg-inset px-2.5 py-2 shadow-hairline",children:[jsx("span",{className:`block text-[11.5px] font-medium ${l?.tone??""}`,children:l?.label??""}),jsx("span",{className:"mt-1 block text-[11px] leading-relaxed text-ink-3",children:o})]})]})}r(Nu,"AllocationCard");var Pu=[],Mu={title:"Insights"};function Iu({pages:e=Pu,onFollowUp:t,labels:o}){let n=q(),a=ye(Mu,o),[i,l]=useState(0),s=r(d=>{l(m=>(m+d+e.length)%e.length);},"move"),c=e[i]??e[0];if(!c)return null;let{prose:u,pill:g}=c;return jsx(A,{children:jsxs("div",{className:"min-h-[408px] w-full max-w-86",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsxs("span",{className:"flex items-baseline gap-1.5",children:[jsx("span",{className:"text-[13px] font-semibold text-ink",children:a.title}),jsx("span",{className:"text-[13px] text-ink-3 tabular-nums",children:e.length})]}),jsx("span",{className:"flex items-center gap-0.5",children:["M15 18l-6-6 6-6","M9 6l6 6-6 6"].map((d,m)=>jsx("button",{"aria-label":n(m===0?"Previous insight":"Next insight"),onClick:()=>s(m===0?-1:1),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3
198
200
  transition-[background-color,color,transform] duration-100 hover:bg-hover
199
- hover:text-ink active:scale-[0.96]`,children:jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d})})},m))})]}),jsxs("div",{className:"transition-[opacity,filter] duration-250",style:{opacity:1,filter:"blur(0)"},children:[jsx("p",{className:"mt-1.5 text-[12.5px] leading-relaxed text-ink-2",children:u}),jsx("div",{className:"mt-2",children:c.kind==="compare"?jsx(Jd,{series:c.series}):c.kind==="anomaly"?jsx(tu,{data:c.anomaly,title:c.title}):jsx(nu,{segments:c.segments,title:c.title,description:c.description})}),jsx("button",{className:`mt-2 rounded-[var(--bui-radius-pill)] bg-surface px-3 py-1.5 text-left text-[12px] text-ink
200
- shadow-btn transition-colors duration-100 hover:bg-hover`,children:g})]})]})})}r(iu,"BUIInsightCards");var su={title:"Recommendation",alternatives:"Alternatives",otherOptions:"Other options",accepted:"Accepted"},lu=[];function Pi({signal:e,tone:t}){return jsx("span",{className:"flex items-end gap-0.5",children:[0,1,2].map(o=>jsx("span",{className:"w-1 rounded-full transition-colors duration-300",style:{height:10,background:o<e?t:"var(--bui-line-strong)"}},o))})}r(Pi,"Meter");function cu({options:e=lu,labels:t,accepted:o=false,onAccept:n}){let a=ye(su,t),[i,l]=useState(0),[s,c]=useState(false),u=e[i]??e[0],g=e.map((d,m)=>({o:d,i:m})).filter(({i:d})=>d!==i);return e.length?jsx(A,{children:jsxs("div",{className:"w-full max-w-95 overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"primitive-card-pad",children:[jsx("span",{className:"text-[14px] font-medium text-ink",children:a.title}),jsx("p",{className:"mt-1.5 min-h-12 text-[13px] leading-relaxed text-ink-2",style:{animation:"bui-fade-in 180ms ease-out both"},children:u.body},u.key)]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:s?"1fr":"0fr",opacity:s?1:0,transitionTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"border-t border-line bg-surface px-2 py-2",children:[jsx("p",{className:"px-1.5 pb-1 text-[11px] font-medium text-ink-3",children:a.otherOptions}),g.map(({o:d,i:m})=>jsxs("button",{type:"button",onClick:()=>{l(m);},className:`flex w-full items-center gap-2.5 rounded-control px-1.5 py-1.5
201
- text-left transition-colors duration-100 hover:bg-hover`,children:[jsx(Pi,{signal:d.signal,tone:d.tone}),jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] text-ink",children:d.short}),jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:d.label})]},d.key))]})})}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between gap-3 bg-surface",children:[jsxs("span",{className:"flex items-center gap-2",children:[jsx(Pi,{signal:u.signal,tone:u.tone}),jsx("span",{className:"text-[12.5px] font-medium text-ink-2",children:u.label})]}),jsxs("span",{className:"-mr-0.5 flex items-center gap-2",children:[jsx(Ce,{variant:"secondary",size:"sm","aria-expanded":s,onClick:()=>c(d=>!d),className:"px-2.5 text-[12.5px]",children:a.alternatives}),jsx(Ce,{variant:o?"success":u.ctaVariant,size:"sm",onClick:()=>n?.(u.key??String(i)),className:"text-[12.5px]",children:o?a.accepted:u.cta})]})]})]})}):null}r(cu,"BUIRecommendationCard");var _r={company:270,categories:275,last:190,strength:210,links:175,ai:240},An={strong:{label:"Very strong",color:"var(--bui-green)",rank:3},weak:{label:"Weak",color:"var(--bui-orange)",rank:2},veryweak:{label:"Very weak",color:"var(--bui-red)",rank:1},none:{label:"No communication",color:"var(--bui-ink-3)",rank:0}};var uu=[];function be({children:e,size:t=14,strokeWidth:o=1.8}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e})}r(be,"Icon");var Dt={Text:jsx("path",{d:"M4 6h16M4 12h10M4 18h7"}),File:jsxs("g",{children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]}),Collection:jsxs("g",{children:[jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),jsx("path",{d:"M4 5v14c0 1.66 3.58 3 8 3s8-1.34 8-3V5M4 12c0 1.66 3.58 3 8 3s8-1.34 8-3"})]}),"Single select":jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"m8.5 12 2.4 2.4 4.6-4.9"})]}),"Multi select":jsxs("g",{children:[jsx("path",{d:"M11 6h9M11 12h9M11 18h9"}),jsx("path",{d:"M4 6l1.5 1.5L8 5M4 12l1.5 1.5L8 11M4 18l1.5 1.5L8 17"})]}),URL:jsxs("g",{children:[jsx("path",{d:"M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1"}),jsx("path",{d:"M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1"})]}),Reference:jsx("path",{d:"M7 17 17 7M9 7h8v8"}),JSON:jsxs("g",{children:[jsx("path",{d:"M8 4c-2 0-2 2-2 3s.5 3-2 3c2.5 0 2 2 2 3s0 3 2 3"}),jsx("path",{d:"M16 4c2 0 2 2 2 3s-.5 3 2 3c-2.5 0-2 2-2 3s0 3-2 3"})]}),"File splitter":jsxs("g",{children:[jsx("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"}),jsx("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"})]}),Date:jsxs("g",{children:[jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2.5"}),jsx("path",{d:"M8 3v4M16 3v4M3 10h18"})]})},Fr={model:jsx("path",{d:"M12 3l1.7 5.1a2 2 0 0 0 1.2 1.2L20 11l-5.1 1.7a2 2 0 0 0-1.2 1.2L12 19l-1.7-5.1a2 2 0 0 0-1.2-1.2L4 11l5.1-1.7a2 2 0 0 0 1.2-1.2z"}),web:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M3 12h18M12 3a13.5 13.5 0 0 1 3.5 9 13.5 13.5 0 0 1-3.5 9 13.5 13.5 0 0 1-3.5-9A13.5 13.5 0 0 1 12 3z"})]}),user:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"8",r:"4"}),jsx("path",{d:"M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1"})]})};var Mi=["Text","File","Collection","Single select","Multi select","URL","Reference","JSON","File splitter"];function Ii({checked:e,mixed:t=false,onChange:o,label:n}){return jsxs("label",{className:"records-checkbox",title:n,onClick:a=>a.stopPropagation(),children:[jsx("input",{type:"checkbox",checked:e,onChange:o,"aria-label":n}),jsx("span",{className:`records-checkbox-box ${e||t?"is-active":""}`,children:t?jsx("span",{className:"records-checkbox-dash"}):e?jsx(be,{size:12,children:jsx("path",{d:"m5 12 4 4L19 6"})}):null})]})}r(Ii,"Checkbox");function Ai({name:e,colors:t}){let o=t[e]??{base:"var(--bui-ink-3)"};return jsx("span",{className:"records-tag",style:{"--bui-tag-base":o.base},children:e})}r(Ai,"Tag");function pu({tags:e,colors:t}){let o=q(),n=useRef(null),a=useRef(null),[i,l]=useState(e.length);useLayoutEffect(()=>{let c=n.current,u=a.current;if(!c||!u)return;let g=r(()=>{let m=c.clientWidth,b=Array.from(u.querySelectorAll("[data-tag-measure]"),f=>f.offsetWidth),v=u.querySelector("[data-more-measure]")?.offsetWidth??0,S=0,h=0;for(let f=0;f<b.length;f+=1){let w=S+(h>0?4:0)+b[f],x=e.length-(f+1);if(w+(x>0?4+v:0)>m)break;S=w,h+=1;}l(h);},"update");g();let d=new ResizeObserver(g);return d.observe(c),()=>d.disconnect()},[e]);let s=e.length-i;return jsxs("div",{ref:n,className:"records-tags",title:e.join(", "),"aria-label":o("Categories: {categories}",{categories:e.join(", ")}),children:[jsxs("div",{ref:a,className:"records-tags-measure","aria-hidden":true,children:[e.map(c=>jsx("span",{"data-tag-measure":true,children:jsx(Ai,{name:c,colors:t})},c)),jsxs("span",{"data-more-measure":true,className:"records-more-tag",children:["+",e.length]})]}),e.slice(0,i).map(c=>jsx(Ai,{name:c,colors:t},c)),s>0&&jsxs("span",{className:"records-more-tag",children:["+",s]})]})}r(pu,"TagList");function Go(){let e=q();return jsxs("span",{className:"records-calc",children:[jsx("span",{className:"records-muted",children:e("Calculating\u2026")}),jsx("span",{className:"records-pulse"})]})}r(Go,"CalcCell");function Bn({on:e,onToggle:t,label:o}){return jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":o,onClick:t,className:"relative h-4.5 w-7.5 shrink-0 rounded-[var(--bui-radius-pill)] transition-colors duration-150",style:{background:e?"var(--bui-accent)":"var(--bui-line-strong)"},children:jsx("span",{className:"absolute top-0.5 left-0.5 size-3.5 rounded-full bg-white shadow-btn transition-transform duration-150",style:{transform:e?"translateX(12px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"}})})}r(Bn,"MiniSwitch");function Ln({label:e,icon:t,sortKey:o,sort:n,onSort:a,onResizeStart:i,resizing:l=false,className:s="",selected:c=false,onPick:u}){let g=q();return jsxs("th",{className:`records-header-cell ${c?"is-colsel":""} ${s}`,children:[jsxs("button",{type:"button",className:"records-header-button",onClick:u,children:[jsx("span",{className:"records-header-icon",children:t}),jsx("span",{className:"truncate",children:e}),o&&jsx("span",{role:"button",tabIndex:0,"aria-label":g("Sort by {label}",{label:e}),onClick:d=>{d.stopPropagation(),a(o);},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),a(o));},className:`records-sort ${n.key===o?"is-visible":""}`,style:{transform:n.key===o&&n.dir===-1?"rotate(180deg)":void 0},children:jsx(be,{size:12,children:jsx("path",{d:"M12 5v14M5 12l7 7 7-7"})})})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":g("Resize {label} column",{label:e}),className:`records-resize-handle ${l?"is-resizing":""}`,onPointerDown:i})]})}r(Ln,"HeaderCell");function co({label:e,children:t}){return jsxs("div",{className:"relative flex h-8 items-center justify-between",children:[jsx("span",{className:"text-[13px] text-ink-3",children:e}),t]})}r(co,"ConfigRow");function Bi({label:e,options:t,selected:o,onSelect:n}){return jsxs("div",{role:"menu","aria-label":e,className:"absolute left-full top-0 z-30 ml-5 w-[210px] rounded-[12px] bg-surface p-1.5 shadow-overlay",style:{animation:"bui-pop-in 140ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-0.5 text-[11.5px] font-medium text-ink-3",children:e}),jsx(Xe,{className:"flex flex-col gap-px",children:t.map(a=>jsxs("button",{"data-menu-row":true,type:"button",role:"menuitemradio","aria-checked":o===a.label,onClick:()=>n(a.label),className:"relative z-10 flex h-8 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] font-medium text-ink",children:[jsx("span",{className:"flex size-4 shrink-0 items-center justify-center text-ink-2",children:a.icon}),jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),jsx("span",{className:o===a.label?"text-ink":"invisible",children:jsx(be,{size:14,strokeWidth:2.2,children:jsx("path",{d:"m5 12 4 4L19 6"})})})]},a.label))})]})}r(Bi,"ConfigPicker");function mu({options:e,selected:t,onToggle:o}){let n=q();return jsxs("div",{role:"menu","aria-label":n("Calculation inputs"),className:"absolute left-full top-0 z-30 ml-5 w-[220px] rounded-[12px] bg-surface p-1.5 shadow-overlay",style:{animation:"bui-pop-in 140ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-0.5 text-[11.5px] font-medium text-ink-3",children:n("Use values from")}),jsx(Xe,{className:"flex flex-col gap-px",children:e.map(a=>{let i=t.includes(a);return jsxs("button",{"data-menu-row":true,type:"button",role:"menuitemcheckbox","aria-checked":i,onClick:()=>o(a),className:"relative z-10 flex h-8 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] font-medium text-ink",children:[jsx("span",{className:`flex size-4 shrink-0 items-center justify-center rounded-[5px] border ${i?"border-accent bg-accent text-white":"border-line-strong text-transparent"}`,children:jsx(be,{size:11,strokeWidth:2.4,children:jsx("path",{d:"m5 12 4 4L19 6"})})}),jsx("span",{className:"min-w-0 flex-1 truncate",children:a})]},a)})})]})}r(mu,"InputPicker");function gu({rows:e=uu,fill:t=false,tagColors:o={},columnMeta:n={},models:a=[],inputs:i=[],resultLabel:l="Result",results:s={},calculation:c=null,onRun:u,onSelectionChange:g}){let d=q(),[m,b]=useState(new Set),[v,S]=useState({key:"name",dir:1}),[h,f]=useState(_r),[w,x]=useState(100),[C,I]=useState(false),[D,P]=useState(null),E=useRef(null),V=useRef(null),j=useRef(null);useEffect(()=>()=>j.current?.(),[]);let[B,y]=useState(null),R=useRef({}),[W,J]=useState(false),[G,Z]=useState(false),[de,le]=useState(null),[_,ae]=useState({}),[K,me]=useState({}),[Pe,N]=useState(new Set),[L,Y]=useState(false),[X,Me]=useState({required:false,allowEmpty:true,confidence:false}),[oe,se]=useState(null),[Ie,H]=useState(null),[ue,Ve]=useState(false),Et=Object.keys(s).length>0,[bo,ho]=useState(false),bt=useRef(null),Rt=useRef(false);useLayoutEffect(()=>{if(C||!V.current)return;let k=Array.from(V.current.querySelectorAll("thead th"));if(k.length<6)return;let O={company:k[0].getBoundingClientRect().width,categories:k[1].getBoundingClientRect().width,last:k[2].getBoundingClientRect().width,strength:k[3].getBoundingClientRect().width,links:k[4].getBoundingClientRect().width,ai:_r.ai};E.current=O,f(O),x(k[k.length-1].getBoundingClientRect().width),I(true);},[C]);let Nt=useMemo(()=>[...e].sort((k,O)=>(v.key==="name"?k.name.localeCompare(O.name):v.key==="last"?k.last.localeCompare(O.last):An[k.strength].rank-An[O.strength].rank)*v.dir),[e,v]);useEffect(()=>{if(!bo||!bt.current)return;let k=bt.current.closest(".records-scroll");k&&(Rt.current=true,k.scrollLeft=k.scrollWidth);let O=bt.current.getBoundingClientRect();y({col:l,x:Math.min(O.left,window.innerWidth-336),y:O.bottom+6}),ho(false);},[bo,ue]),useEffect(()=>{if(!B&&!oe&&!Ie)return;let k=r(O=>{O.target.closest("[data-recpop]")||(y(null),le(null),Z(false),Y(false),se(null),H(null));},"close");return document.addEventListener("pointerdown",k),()=>document.removeEventListener("pointerdown",k)},[B,oe,Ie]);let z=r(k=>O=>{let Ae=O.currentTarget.closest("th");Ae&&(se(null),H(null),le(null),Z(false),Y(false),y(pt=>{if(pt?.col===k)return null;let Fe=Ae.getBoundingClientRect();return {col:k,x:Math.min(Fe.left,window.innerWidth-336),y:Fe.bottom+6}}));},"openProp"),qe=r((k,O)=>!!c&&c.col===k&&O>=c.resolved,"isCalc"),Ot=Nt.length>0&&Nt.every(k=>m.has(k.id)),Jn=!Ot&&Nt.some(k=>m.has(k.id)),xo=r(k=>S(O=>O.key===k?{key:k,dir:O.dir*-1}:{key:k,dir:1}),"toggleSort"),$t=r((k,O=120)=>Ae=>{Ae.preventDefault(),Ae.stopPropagation(),y(null),le(null),Z(false),Y(false),se(null),H(null),j.current?.();let pt=Ae.clientX,Fe=h[k],ht=document.body.style.cursor,no=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none",P(k);let xt=r(tn=>{let er=Math.max(O,Fe+tn.clientX-pt);f(tr=>({...tr,[k]:er}));},"move"),Ht=r(()=>{window.removeEventListener("pointermove",xt),window.removeEventListener("pointerup",Ht),window.removeEventListener("pointercancel",Ht),document.body.style.cursor=ht,document.body.style.userSelect=no,j.current=null,P(null);},"finish");j.current=Ht,window.addEventListener("pointermove",xt),window.addEventListener("pointerup",Ht),window.addEventListener("pointercancel",Ht);},"startColumnResize"),to=r(k=>{b(k),g?.([...k]);},"commitSelection"),en=r(k=>{let O=new Set(m);O.has(k)?O.delete(k):O.add(k),to(O);},"toggleRow"),oo=r(()=>{let k=new Set(m);Ot?Nt.forEach(O=>k.delete(O.id)):Nt.forEach(O=>k.add(O.id)),to(k);},"toggleAll"),Re=B?{...n[B.col]??{type:"Text",tool:"Manual",toolKind:"user"},..._[B.col]}:null,Pt=B&&Re?K[B.col]??(Re.inputs?[Re.inputs]:[]):[],zo=h.company+h.categories+h.last+h.strength+h.links+(ue?h.ai:0)+w;return jsx(A,{children:jsxs("div",{className:`records-shell${t?" is-fill":""}`,children:[jsx("div",{className:"records-scroll",tabIndex:0,"aria-label":d("Companies table. Scroll horizontally and vertically to view all columns and records."),onScroll:()=>{if(Rt.current){Rt.current=false;return}y(null),le(null),Z(false),Y(false),se(null),H(null);},children:jsxs("table",{ref:V,className:"records-table",style:{width:C?zo:"100%",minWidth:zo},children:[jsxs("colgroup",{children:[jsx("col",{className:"records-company-col",style:{width:h.company}}),jsx("col",{className:"records-category-col",style:{width:h.categories}}),jsx("col",{className:"records-last-col",style:{width:h.last}}),jsx("col",{className:"records-strength-col",style:{width:h.strength}}),jsx("col",{className:"records-link-col",style:{width:h.links}}),ue&&jsx("col",{style:{width:h.ai}}),jsx("col",{style:{width:100}})]}),jsx("thead",{children:jsxs("tr",{children:[jsxs("th",{className:`records-header-cell records-sticky-cell ${B?.col==="Company"?"is-colsel":""}`,children:[jsxs("div",{className:"records-company-header",style:{cursor:"pointer"},onClick:k=>z("Company")(k),children:[jsx(Ii,{checked:Ot,mixed:Jn,onChange:oo,label:d("Select all companies")}),jsx("span",{children:d("Company")})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":d("Resize Company column"),className:`records-resize-handle ${D==="company"?"is-resizing":""}`,onPointerDown:$t("company",180)})]}),jsx(Ln,{label:d("Categories"),selected:B?.col==="Categories",onPick:z("Categories"),sort:v,onSort:xo,onResizeStart:$t("categories"),resizing:D==="categories",icon:jsx(be,{size:15,children:Dt["Multi select"]})}),jsx(Ln,{label:d("Last interaction"),selected:B?.col==="Last interaction",onPick:z("Last interaction"),sortKey:"last",sort:v,onSort:xo,onResizeStart:$t("last"),resizing:D==="last",icon:jsx(be,{size:15,children:Dt.Date})}),jsx(Ln,{label:d("Connection strength"),selected:B?.col==="Connection strength",onPick:z("Connection strength"),sortKey:"strength",sort:v,onSort:xo,onResizeStart:$t("strength"),resizing:D==="strength",icon:jsx(be,{size:15,children:Dt["Single select"]})}),jsx(Ln,{label:d("Links"),selected:B?.col==="Links",onPick:z("Links"),sort:v,onSort:xo,onResizeStart:$t("links"),resizing:D==="links",icon:jsx(be,{size:15,children:Dt.URL})}),ue&&jsxs("th",{ref:bt,className:`records-header-cell ${B?.col===l?"is-colsel":""}`,children:[jsxs("button",{type:"button",className:"records-header-button",onClick:z(l),children:[jsx("span",{className:"records-header-icon",children:jsx(be,{size:15,children:Dt.Text})}),jsx("span",{className:"truncate",children:l})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":d("Resize {label} column",{label:l}),className:`records-resize-handle ${D==="ai"?"is-resizing":""}`,onPointerDown:$t("ai")})]}),jsx("th",{className:"records-header-cell",children:jsxs("div",{className:"flex h-[35px] items-center gap-1 px-2",children:[jsx("button",{type:"button","aria-label":d("New property"),"data-recpop":true,onClick:k=>{y(null),H(null);let O=k.currentTarget.getBoundingClientRect();se(Ae=>Ae?null:{x:Math.min(O.left,window.innerWidth-276),y:O.bottom+6});},className:"flex size-7 items-center justify-center rounded-[var(--bui-radius-scale-7)] text-ink-2 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(be,{size:15,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),jsx("button",{type:"button","aria-label":d("Table options"),"aria-expanded":!!Ie,"data-recpop":true,onClick:k=>{y(null),se(null);let O=k.currentTarget.getBoundingClientRect();H(Ae=>Ae?null:{x:Math.max(8,Math.min(O.right-220,window.innerWidth-228)),y:O.bottom+6});},className:"flex size-7 items-center justify-center rounded-[var(--bui-radius-scale-7)] text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:[jsx("circle",{cx:"5",cy:"12",r:"1.6"}),jsx("circle",{cx:"12",cy:"12",r:"1.6"}),jsx("circle",{cx:"19",cy:"12",r:"1.6"})]})})]})})]})}),jsx("tbody",{"data-sound-silent":true,children:Nt.map((k,O)=>{let Ae=m.has(k.id),pt=An[k.strength];return jsxs("tr",{className:`records-row ${Ae?"is-selected":""}`,children:[jsxs("td",{className:`records-cell records-sticky-cell records-company-cell ${B?.col==="Company"?"is-colsel":""}`,children:[jsx("span",{className:"records-rownum",children:O+1}),jsx(Ii,{checked:Ae,onChange:()=>en(k.id),label:d("Select {name}",{name:k.name})}),jsx("span",{className:"records-company-mark",children:k.name.slice(0,1).toUpperCase()}),jsx("a",{href:k.website?`https://${k.website}`:"#",onClick:Fe=>!k.website&&Fe.preventDefault(),title:k.name,className:`records-company-name ${k.website?"has-link":""}`,children:k.name})]}),jsx("td",{className:`records-cell ${B?.col==="Categories"?"is-colsel":""}`,children:qe("Categories",O)?jsx(Go,{}):jsx(pu,{tags:k.tags,colors:o})}),jsx("td",{className:`records-cell ${k.last==="No contact"?"records-muted":""} ${B?.col==="Last interaction"?"is-colsel":""}`,children:qe("Last interaction",O)?jsx(Go,{}):k.last}),jsx("td",{className:`records-cell ${B?.col==="Connection strength"?"is-colsel":""}`,children:qe("Connection strength",O)?jsx(Go,{}):jsxs("span",{className:"records-strength",children:[jsx("span",{className:"records-strength-dot",style:{background:pt.color}}),d(pt.label)]})}),jsx("td",{className:`records-cell ${B?.col==="Links"?"is-colsel":""}`,children:qe("Links",O)?jsx(Go,{}):k.website?jsxs("a",{className:"records-link",href:`https://${k.website}`,title:k.website,target:"_blank",rel:"noreferrer",children:[jsx("span",{className:"records-link-label",children:k.website}),jsx(be,{size:12,children:jsx("path",{d:"M14 5h5v5M19 5l-8 8"})})]}):jsx("span",{className:"records-muted",children:"\u2014"})}),ue&&jsx("td",{className:`records-cell ${B?.col===l?"is-colsel":""}`,children:c?.col===l?O<c.resolved?s[k.id]??"\u2014":jsx(Go,{}):Et?s[k.id]??"\u2014":jsx("span",{className:"records-muted",children:"\u2014"})}),jsx("td",{className:"records-cell"})]},k.id)})}),jsx("tfoot",{children:jsxs("tr",{className:"records-calculation-row",children:[jsx("td",{className:"records-cell records-sticky-cell",children:jsxs("span",{className:"records-footer-value records-calculation-label",children:[jsx("span",{className:"records-calculation-number",children:e.length})," ",d("count")]})}),jsx("td",{className:"records-cell",children:jsxs("button",{type:"button",className:"records-add-calculation",onClick:z("Categories"),children:[jsx(be,{size:15,children:jsx("path",{d:"M12 5v14M5 12h14"})}),d("Add calculation")]})}),jsx("td",{className:"records-cell records-muted",children:jsx("span",{className:"records-footer-value",children:"\u2014"})}),jsx("td",{className:"records-cell",children:jsxs("span",{className:"records-footer-value records-average",children:[jsx("span",{className:"records-strength-dot",style:{background:"var(--bui-orange)"}}),Math.round(e.reduce((k,O)=>k+An[O.strength].rank,0)/Math.max(1,e.length)/3*100),d("% average")]})}),jsx("td",{className:"records-cell",children:jsxs("span",{className:"records-footer-value records-muted",children:[e.filter(k=>k.website).length," ",d("links")]})}),ue&&jsx("td",{className:"records-cell records-muted",children:jsx("span",{className:"records-footer-value",children:Et?`${e.length} filled`:"\u2014"})}),jsx("td",{className:"records-cell"})]})})]})}),B&&Re&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[320px] rounded-[14px] bg-surface px-3 pt-3 pb-1.5 shadow-overlay",style:{top:B.y,left:B.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"pb-2 text-[13.5px] font-medium text-ink",children:d(B.col)}),jsxs(co,{label:d("Type"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="type",onClick:()=>le(k=>k==="type"?null:"type"),className:"flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] font-medium text-ink transition-colors duration-100 hover:bg-hover",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:14,children:Dt[Re.type]??Dt.Text})}),Re.type,jsx("span",{className:"text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="type"&&jsx(Bi,{label:d("Property type"),selected:Re.type,options:Mi.map(k=>({label:k,icon:jsx(be,{size:15,children:Dt[k]})})),onSelect:k=>{ae(O=>({...O,[B.col]:{...O[B.col],type:k}})),le(null);}})]}),jsxs(co,{label:d("Tool"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="tool",onClick:()=>le(k=>k==="tool"?null:"tool"),className:"flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] font-medium text-ink transition-colors duration-100 hover:bg-hover",children:[jsx("span",{className:Re.toolKind==="model"?"text-accent":"text-ink-2",children:Re.toolKind==="model"?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:Fr.model}):jsx(be,{size:14,children:Fr[Re.toolKind]})}),Re.tool,jsx("span",{className:"text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="tool"&&jsx(Bi,{label:d("Model"),selected:Re.tool,options:a.map(k=>({label:k,icon:jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:Fr.model})})),onSelect:k=>{ae(O=>({...O,[B.col]:{...O[B.col],tool:k,toolKind:"model"}})),le(null);}})]}),jsxs(co,{label:d("Grounding"),children:[jsxs("span",{className:"flex items-center gap-2",children:[jsx(Bn,{label:d("Grounding"),on:W,onToggle:()=>J(k=>!k)}),jsx("button",{type:"button","aria-label":d("About grounding"),"aria-expanded":G,onClick:()=>Z(k=>!k),className:"flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(be,{size:13,children:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 8h.01M11 12h1v4h1"})]})})})]}),G&&jsx("div",{className:"absolute right-0 top-[30px] z-30 w-[230px] rounded-[10px] px-3 py-2.5 text-[12px] leading-relaxed shadow-overlay",style:{color:"var(--bui-tooltip-fg)",background:"var(--bui-tooltip-bg)"},role:"status",children:d("Grounding lets the model verify generated values against connected sources.")})]}),jsxs(co,{label:d("Inputs"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="inputs",onClick:()=>le(k=>k==="inputs"?null:"inputs"),className:"flex max-w-[220px] items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] text-ink-2 transition-colors duration-100 hover:bg-hover hover:text-ink",children:[Pt.length?jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[Pt.slice(0,2).map(k=>jsx("span",{className:"max-w-[92px] truncate rounded-[5px] bg-accent-tint px-1.5 py-0.5 text-[12px] font-medium text-accent-ink",children:k},k)),Pt.length>2&&jsxs("span",{className:"text-[11px] font-medium text-ink-3",children:["+",Pt.length-2]})]}):jsx("span",{children:d("Select inputs")}),jsx("span",{className:"shrink-0 text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="inputs"&&jsx(mu,{selected:Pt,options:i.filter(k=>k!==B.col),onToggle:k=>{me(O=>{let Ae=O[B.col]??(Re.inputs?[Re.inputs]:[]),pt=Ae.includes(k)?Ae.filter(Fe=>Fe!==k):[...Ae,k];return {...O,[B.col]:pt}});}})]}),jsx("div",{contentEditable:true,onInput:k=>{R.current[B.col]=k.currentTarget.textContent??"";},suppressContentEditableWarning:true,role:"textbox","aria-label":d("{column} calculation prompt",{column:B.col}),"aria-multiline":"true",spellCheck:true,className:"mt-2 min-h-[88px] cursor-text rounded-[10px] bg-inset p-3 text-[13px] leading-relaxed shadow-hairline outline-none transition-[box-shadow] duration-150 focus:shadow-[0_0_0_2px_var(--bui-accent)]",children:Re.prompt?jsxs("span",{className:"text-ink",children:[Re.prompt.before,Re.prompt.chip&&jsx("span",{contentEditable:false,className:"rounded-[5px] bg-accent-tint px-1.5 py-0.5 text-[12px] font-medium text-accent-ink",children:Re.prompt.chip}),Re.prompt.after]}):jsx("span",{className:"text-ink-3",children:d("Set a prompt (press @ to mention an input)")})}),jsxs("button",{type:"button",disabled:!!c,onClick:()=>{u?.(B.col,{...Re,selectedInputs:Pt,promptText:R.current[B.col]??[Re.prompt?.before,Re.prompt?.chip,Re.prompt?.after].filter(Boolean).join(" "),grounding:W,...X}),y(null);},className:"mt-2.5 flex h-9 w-full items-center justify-center gap-2 rounded-[var(--bui-radius-scale-9)] text-[12.5px] font-medium text-ink shadow-btn transition-[background-color,transform] duration-150 hover:bg-hover active:scale-[0.98] disabled:opacity-60",children:[jsx(be,{size:14,strokeWidth:1.9,children:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"})}),d("Go calculate")]}),jsxs(Xe,{className:"mt-3 flex flex-col gap-0.5 border-t border-line pt-2",highlightClassName:"-inset-x-1.5 rounded-[8px] bg-hover",children:[jsxs("button",{"data-menu-row":true,type:"button","aria-pressed":Pe.has(B.col),onClick:()=>N(k=>{let O=new Set(k);return O.has(B.col)?O.delete(B.col):O.add(B.col),O}),className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:Pe.has(B.col)?"text-accent":"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M12 17v5M8 3h8l-1 7 3 3H6l3-3-1-7z"})})}),Pe.has(B.col)?d("Unpin"):d("Pin")]}),jsxs("button",{"data-menu-row":true,type:"button","aria-expanded":L,onClick:()=>Y(k=>!k),className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:L?"text-ink":"text-ink-2",children:jsx(be,{size:15,children:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"3"}),jsx("path",{d:"M12 2v3M12 19v3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M2 12h3M19 12h3M4.9 19.1 7 17M17 7l2.1-2.1"})]})})}),jsx("span",{className:"flex-1",children:d("More settings")}),jsx("span",{className:`text-ink-3 transition-transform duration-150 ${L?"rotate-90":""}`,children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),B.col===l&&jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{Ve(false),y(null);},className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsxs("g",{children:[jsx("path",{d:"M10.6 5.1A9.8 9.8 0 0 1 12 5c7 0 10 7 10 7a16.3 16.3 0 0 1-2.1 3M6.6 6.6A16 16 0 0 0 2 12s3 7 10 7a9.7 9.7 0 0 0 5.4-1.6M3 3l18 18"}),jsx("path",{d:"M9.9 9.9a3 3 0 0 0 4.2 4.2"})]})})}),d("Hide from view")]})]}),L&&jsxs("div",{className:"mt-2 border-t border-line pt-2",style:{animation:"bui-fade-up 160ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("div",{className:"pb-1 text-[11.5px] font-medium text-ink-3",children:d("Behavior")}),jsx(co,{label:d("Required value"),children:jsx(Bn,{label:d("Required value"),on:X.required,onToggle:()=>Me(k=>({...k,required:!k.required}))})}),jsx(co,{label:d("Allow empty results"),children:jsx(Bn,{label:d("Allow empty results"),on:X.allowEmpty,onToggle:()=>Me(k=>({...k,allowEmpty:!k.allowEmpty}))})}),jsx(co,{label:d("Show confidence"),children:jsx(Bn,{label:d("Show confidence"),on:X.confidence,onToggle:()=>Me(k=>({...k,confidence:!k.confidence}))})})]})]}),oe&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[260px] rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:oe.y,left:oe.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-1 text-[12px] font-medium text-ink-3",children:d("New property")}),jsx(Xe,{className:"flex flex-col gap-px",children:Mi.map(k=>jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{se(null),Ve(true),ho(true);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:Dt[k]})}),k]},k))})]}),Ie&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[220px] rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:Ie.y,left:Ie.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top right"},children:[jsx("div",{className:"px-2 pb-1 pt-1 text-[12px] font-medium text-ink-3",children:d("Table options")}),jsxs(Xe,{className:"flex flex-col gap-px",children:[jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{let k=Ie;H(null),se({x:Math.min(k.x,window.innerWidth-276),y:k.y});},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),d("Add property")]}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{f({company:220,categories:220,last:155,strength:180,links:160,ai:200}),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M4 8h16M7 4 3 8l4 4M17 4l4 4-4 4M4 16h16"})})}),d("Compact columns")]}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{f({...E.current??_r}),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7M3 4v6h6"})})}),d("Reset column widths")]}),jsx("div",{className:"my-1 h-px bg-line"}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{to(new Set),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M5 5l14 14M19 5 5 19"})})}),d("Clear selection")]})]})]})]})})}r(gu,"BUIRecordsTable");var bu=[],hu={placeholder:"Search\u2026",ariaLabel:"Search",emptyTitle:"No results found",emptyHint:"Adjust your search to try again"};function xu({items:e=bu,labels:t,onSelect:o}){let n=q(),a=ye(hu,t),[i,l]=useState(""),s=i?e.filter(u=>u.toLowerCase().includes(i.toLowerCase())):e.slice(0,5),c=i.length>0&&s.length===0;return jsx(A,{children:jsx("div",{className:"flex min-h-[248px] w-full max-w-72 flex-col items-stretch",children:jsxs("div",{className:"w-full self-start overflow-hidden rounded-card bg-surface shadow-raised",children:[jsxs("div",{className:"flex h-10 items-center gap-2 border-b border-line px-3 transition-colors duration-100 hover:bg-hover",children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("input",{value:i,onChange:u=>l(u.target.value),placeholder:a.placeholder,"aria-label":a.ariaLabel,className:"min-w-0 flex-1 bg-transparent text-[13px] text-ink outline-none placeholder:text-ink-3"}),i&&jsx("button",{"aria-label":n("Clear search"),type:"button",onClick:()=>l(""),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink-3
202
- transition-colors duration-100 hover:bg-line/70 hover:text-ink`,style:{animation:"bui-fade-in 150ms ease-out both"},children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),c?jsxs("div",{className:"flex flex-col items-center justify-center gap-1 px-4 py-8",style:{animation:"bui-fade-in 250ms ease-out both"},children:[jsx("span",{className:"mb-1.5 flex size-8 items-center justify-center rounded-control bg-inset text-ink-3 shadow-hairline",children:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]})}),jsx("span",{className:"text-[13px] font-medium text-ink",children:a.emptyTitle}),jsx("span",{className:"text-[12px] text-ink-3",children:a.emptyHint})]}):jsx("div",{className:"p-1",children:jsx(Xe,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[6px] bg-hover",children:s.map(u=>jsx("button",{"data-menu-row":true,type:"button",onClick:()=>{l(u),o?.(u);},className:"relative z-10 flex h-8 w-full items-center rounded-[var(--bui-radius-chip)] px-2 text-left text-[13px] text-ink",style:{animation:"bui-fade-in 200ms ease-out both"},children:u},u))})})]})})})}r(xu,"BUISearchList");var Iu={lead:"",original:"",rewrite:""},Au={keep:"Keep",discard:"Discard",placeholder:"Describe edits"},Ut={width:14,height:14,strokeWidth:1.8,"aria-hidden":true},Bt={explain:jsx(ChatBubbleQuestion,{...Ut}),improve:jsx(Spark,{...Ut}),shorten:jsx(Scissor,{...Ut}),tone:jsx(EmojiSatisfied,{...Ut}),grammar:jsx(TextBox,{...Ut}),send:jsx(ArrowUp,{width:"16",height:"16",strokeWidth:"2.4","aria-hidden":"true"}),chevron:jsx(NavArrowRight,{...Ut}),check:jsx(Check,{...Ut}),close:jsx(Xmark,{...Ut}),retry:jsx(Refresh,{...Ut})},Bu="inline-flex h-7 shrink-0 items-center gap-1 rounded-full bg-ink px-2.5 text-[12.5px] font-normal text-canvas shadow-hairline transition-[opacity,transform] duration-150 hover:opacity-90 active:scale-[0.96]",Lu={primary:[{id:"Explain",icon:Bt.explain},{id:"Improve",icon:Bt.improve,action:"Improve",busyLabel:"Improving"}],more:[{id:"Shorten",icon:Bt.shorten,action:"Shorten",busyLabel:"Shortening"},{id:"Tone",icon:Bt.tone,action:"Change tone",busyLabel:"Changing tone"},{id:"Grammar",icon:Bt.grammar,action:"Fix grammar"}]};function Eu({text:e,actions:t=Lu,labels:o,onAction:n,status:a="idle",onStatusChange:i}){let l=q(),s={...Iu,...e},c=ye(Au,o),[u,g]=useState(false),d=a,m=r(N=>i?.(N),"setMode"),[b,v]=useState("Improve"),[S,h]=useState(""),[f,w]=useState(null),[x,C]=useState(false),[I,D]=useState({x:0,y:0}),[P,E]=useState(false),V=useRef(null),j=useRef(null),B=useRef(null),y=useRef(null),R=useRef(null),W=useRef("idle"),J=useRef(0),G=useRef(null);useEffect(()=>{let N=window.setTimeout(()=>g(true),280);return ()=>window.clearTimeout(N)},[]);let Z=useCallback(()=>{R.current!==null&&cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{let N=V.current,L=j.current;if(!N||!L)return;let Y=L.getBoundingClientRect(),Me=Array.from(L.getClientRects()).at(-1);if(!Me)return;let oe=N.getBoundingClientRect(),se={x:Math.round(Y.left-oe.left+Y.width/2),y:Math.round(Me.bottom-oe.top+8)};D(Ie=>Ie.x===se.x&&Ie.y===se.y?Ie:se),E(true);});},[]);useLayoutEffect(()=>{Z();},[d,Z]),useEffect(()=>{let N=V.current;if(!N)return;let L=new ResizeObserver(Z);return L.observe(N),window.addEventListener("resize",Z),()=>{L.disconnect(),window.removeEventListener("resize",Z),R.current!==null&&cancelAnimationFrame(R.current);}},[Z]),useLayoutEffect(()=>{let N=B.current,L=y.current;if(!N||!L)return;let Y=Math.ceil(L.getBoundingClientRect().width)+8,X=J.current||Math.ceil(N.getBoundingClientRect().width);if(W.current!==d&&Math.abs(Y-X)>1){G.current?.cancel();let Me=N.animate([{width:`${X}px`},{width:`${Y}px`}],{duration:320,easing:"cubic-bezier(0.23,1,0.32,1)"});G.current=Me,Me.onfinish=()=>{J.current=Y,G.current=null;};}else J.current=Y;W.current=d;},[d]),useEffect(()=>{let N=y.current;if(!N)return;let L=new ResizeObserver(()=>{G.current?.playState!=="running"&&(J.current=Math.ceil(N.getBoundingClientRect().width)+8);});return L.observe(N),()=>{L.disconnect(),G.current?.cancel();}},[]);let de=r(N=>{v(N),C(false),m("thinking"),n?.(N);},"run"),le=r(()=>{C(false),h(""),w(null),v("Improve"),m("idle");},"reset"),_=d==="thinking"||d==="streaming",ae=u&&P,K=S.trim().length>0,me={};for(let N of [...t.primary,...t.more])N.action&&N.busyLabel&&(me[N.action]=N.busyLabel);let Pe=me[b]??"Editing";return jsx(A,{children:jsx("div",{className:"w-full max-w-[460px]",children:jsxs("div",{ref:V,className:"relative select-none pb-12",children:[jsxs("p",{className:"text-[13px] leading-relaxed text-ink",children:[s.lead,jsx("span",{ref:j,className:"box-decoration-clone rounded-[3px] bg-[color-mix(in_srgb,var(--bui-accent)_14%,var(--bui-surface))] text-ink dark:bg-accent-tint",children:d==="idle"||d==="thinking"?s.original:d==="streaming"?jsx(dr,{text:s.rewrite,onProgress:Z,onDone:()=>m("result")}):s.rewrite})]}),jsx("div",{className:"absolute top-0 left-0 z-10",style:{transform:`translate3d(${I.x}px, ${I.y}px, 0) translateX(-50%)`,transition:"transform 320ms cubic-bezier(0.77,0,0.175,1), opacity 180ms ease-out",opacity:ae?1:0,pointerEvents:ae?"auto":"none",willChange:"transform"},children:jsx("div",{ref:B,className:"flex h-9 w-fit max-w-[calc(100vw-48px)] items-center justify-center gap-0.5 overflow-hidden rounded-full bg-surface p-1 font-sans font-normal text-ink shadow-overlay",style:{width:d==="idle"&&K&&f?f:void 0,...ae?{animation:"bui-pop-in 220ms cubic-bezier(0.23,1,0.32,1) both"}:{}},children:jsxs("div",{ref:y,className:"flex w-fit shrink-0 items-center justify-center gap-0.5",style:{width:d==="idle"&&K&&f?f-8:void 0},children:[_&&jsxs("span",{className:"inline-flex h-7 items-center gap-1.5 whitespace-nowrap px-2.5 text-[12.5px] font-normal text-ink-2",children:[jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}}),d==="thinking"?jsxs(lr,{className:"text-[12.5px] font-normal",children:[Pe,"\u2026"]}):jsxs("span",{children:[Pe,"\u2026"]})]}),d==="result"&&jsxs(Fragment,{children:[jsxs("button",{type:"button",onClick:le,className:Bu,children:[Bt.check,c.keep]}),jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:le,children:[Bt.close,c.discard]}),jsx("span",{className:"mx-0.5 h-4 w-px shrink-0 bg-line"}),jsx("button",{type:"button","aria-label":l("Try again"),onClick:()=>de(b),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover-2 hover:text-ink-2 active:scale-[0.96]",children:Bt.retry})]}),d==="idle"&&jsxs(Fragment,{children:[jsx("div",{className:"flex min-w-0 items-center overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:x?0:K&&f?f-40:145,opacity:x?0:1,transform:x?"translateX(-8px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:jsx("form",{className:"flex h-7 shrink-0 items-center transition-[width] duration-400",style:{width:K&&f?f-40:145,transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},onSubmit:N=>{N.preventDefault(),de(S.trim()||"Improve");},children:jsx("input",{value:S,onChange:N=>{let L=N.target.value;!S.trim()&&L.trim()?w(Math.ceil(B.current?.getBoundingClientRect().width??0)):L.trim()||w(null),h(L);},"aria-label":c.placeholder,placeholder:c.placeholder,className:"h-7 w-full bg-transparent pr-2.5 pl-3 text-[12.5px] text-ink placeholder:text-ink-3"})})}),jsxs("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:K?0:x?462:224,opacity:K?0:1,transform:K?"translateX(-8px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:[!x&&jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-line-strong"}),t.primary.map(N=>jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:N.action?()=>de(N.action):void 0,children:[N.icon,N.id]},N.id)),jsx("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden transition-[max-width,opacity,margin] duration-400",style:{maxWidth:x?262:0,opacity:x?1:0,marginLeft:x?2:0,transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:t.more.map(N=>jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:N.action?()=>de(N.action):void 0,children:[N.icon,N.id]},N.id))}),jsx("span",{className:"mx-0.5 h-4 w-px shrink-0 bg-line"}),jsx("button",{type:"button","aria-label":l(x?"Show fewer actions":"Show more actions"),"aria-expanded":x,onClick:()=>C(N=>!N),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink transition-[background-color,transform] duration-200 hover:bg-hover active:scale-[0.96]",children:jsx("span",{className:"flex transition-transform duration-400",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:Bt.chevron})})]}),jsx("div",{className:"flex min-w-0 items-center overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:K?30:0,opacity:K?1:0,transform:K?"scale(1)":"scale(0.88)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:jsx("button",{type:"button","aria-label":l("Send edit instruction"),onClick:()=>de(S.trim()),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] bg-ink text-surface transition-[opacity,transform] duration-200 active:scale-[0.94]",children:Bt.send})})]})]})})})]})})})}r(Eu,"BUISelectionActions");function T(...e){return twMerge(e.filter(Boolean).join(" "))}r(T,"cn");function Po(e){return e!=null&&typeof e!="boolean"}r(Po,"hasRenderableNode");var Uu={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function zt(e,t={}){return ["monkeys-overlay-surface",Uu[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(zt,"getOverlaySurfaceClassName");var Xo="relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",$r=`z-50 min-w-[8rem] overflow-hidden border p-1 ${zt("menu")} data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,_i=ke.Root,Fi=ke.Trigger;var Ou=Ee.forwardRef(({className:e,inset:t,children:o,...n},a)=>jsxs(ke.SubTrigger,{ref:a,className:T(Xo,"data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[o,jsx(ChevronRight,{"aria-hidden":"true",className:"ml-auto"})]}));Ou.displayName="DropdownMenuSubTrigger";var $u=Ee.forwardRef(({className:e,...t},o)=>{let n=ct();return jsx(ke.SubContent,{...n,...t,ref:o,"data-monkeys-component":"dropdown-menu","data-slot":"content","data-surface":"menu",className:T($r,e)})});$u.displayName="DropdownMenuSubContent";var Hr=Ee.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=ct();return jsx(ke.Portal,{children:jsx(ke.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"dropdown-menu","data-slot":"content","data-surface":"menu",className:T($r,e)})})});Hr.displayName="DropdownMenuContent";var En=Ee.forwardRef(({className:e,inset:t,...o},n)=>jsx(ke.Item,{ref:n,className:T(Xo,t&&"pl-8",e),...o}));En.displayName="DropdownMenuItem";var Hu=Ee.forwardRef(({className:e,children:t,checked:o,...n},a)=>jsxs(ke.CheckboxItem,{ref:a,className:T(Xo,"pl-8",e),checked:o,...n,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(ke.ItemIndicator,{children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}),t]}));Hu.displayName="DropdownMenuCheckboxItem";var Wu=Ee.forwardRef(({className:e,children:t,...o},n)=>jsxs(ke.RadioItem,{ref:n,className:T(Xo,"pl-8",e),...o,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(ke.ItemIndicator,{children:jsx(Circle,{"aria-hidden":"true",className:"h-2 w-2 fill-current"})})}),t]}));Wu.displayName="DropdownMenuRadioItem";var Vu=Ee.forwardRef(({className:e,inset:t,...o},n)=>jsx(ke.Label,{ref:n,className:T("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Vu.displayName="DropdownMenuLabel";var ju=Ee.forwardRef(({className:e,...t},o)=>jsx(ke.Separator,{ref:o,className:T("-mx-1 my-1 h-px bg-muted",e),...t}));ju.displayName="DropdownMenuSeparator";var Gu=r(({className:e,...t})=>jsx("span",{className:T("ml-auto text-xs tracking-widest opacity-60",e),...t}),"DropdownMenuShortcut");Gu.displayName="DropdownMenuShortcut";var qu=Ee.forwardRef(({className:e,children:t,iconClassName:o,size:n="default",...a},i)=>jsxs(we.Trigger,{ref:i,className:T("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm text-foreground shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left",n==="sm"&&"h-8 px-2 py-1 text-xs",e),...a,children:[t,jsx(we.Icon,{asChild:true,children:jsx(ChevronDown,{"aria-hidden":"true",className:T("h-4 w-4 opacity-50",o)})})]}));qu.displayName="SelectTrigger";var Oi=Ee.forwardRef(({className:e,...t},o)=>jsx(we.ScrollUpButton,{ref:o,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronUp,{"aria-hidden":"true",className:"h-4 w-4"})}));Oi.displayName="SelectScrollUpButton";var $i=Ee.forwardRef(({className:e,...t},o)=>jsx(we.ScrollDownButton,{ref:o,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4"})}));$i.displayName="SelectScrollDownButton";var Xu=Ee.forwardRef(({className:e,children:t,position:o="popper",viewportClassName:n,disableTriggerViewportSizing:a=false,...i},l)=>{let s=ct();return jsx(we.Portal,{children:jsxs(we.Content,{...s,...i,ref:l,position:o,"data-monkeys-component":"select","data-slot":"content","data-surface":"menu",className:T($r,"relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),children:[jsx(Oi,{}),jsx(we.Viewport,{className:T("p-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)]",o==="popper"&&!a&&"h-[var(--radix-select-trigger-height)]",n),children:t}),jsx($i,{})]})})});Xu.displayName="SelectContent";var Ku=Ee.forwardRef(({className:e,...t},o)=>jsx(we.Label,{ref:o,className:T("px-2 py-1.5 text-sm font-semibold",e),...t}));Ku.displayName="SelectLabel";var Yu=Ee.forwardRef(({className:e,children:t,indicatorClassName:o,itemText:n,hideIndicator:a=false,...i},l)=>jsxs(we.Item,{ref:l,className:T(Xo,"w-full",a?"px-2":"pl-8 pr-2",e),...i,children:[a?null:jsx("span",{className:T("absolute left-2 flex h-3.5 w-3.5 items-center justify-center",o),children:jsx(we.ItemIndicator,{children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}),n?jsxs(Fragment,{children:[jsx(we.ItemText,{asChild:true,children:jsx("span",{className:"sr-only",children:n})}),t]}):jsx(we.ItemText,{children:t})]}));Yu.displayName="SelectItem";var Qu=Ee.forwardRef(({className:e,...t},o)=>jsx(we.Separator,{ref:o,className:T("-mx-1 my-1 h-px bg-muted",e),...t}));Qu.displayName="SelectSeparator";var Hi=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Wi=globalThis,Vi=Wi[Hi]??(Wi[Hi]=createContext(0));function Mo(){return useContext(Vi)}r(Mo,"useBentoDepth");function Dn({children:e,depth:t}){return jsx(Vi.Provider,{value:t,children:e})}r(Dn,"BentoDepthProvider");function Io({children:e}){return jsx(Dn,{depth:0,children:e})}r(Io,"BentoScope");function Wr(){let e=Mo(),t=e+1,o=oi(ai(),t),n=Object.fromEntries(gn.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(Wr,"useBentoSurface");var Vr="[data-monkeys-bento-level]",Un="data-monkeys-scrollbar-active",np='[data-monkeys-scrollbar], [data-monkeys-scroll-viewport], [data-radix-scroll-area-viewport], .monkeys-scrollbar, .monkeys-ui-scroll-viewport, .monkeys-ui-description, .monkeys-ui-page-main, .monkeys-ui-dialog, .monkeys-ui-menu, .monkeys-ui-select-content, [style*="overflow"][style*="auto"], [style*="overflow"][style*="scroll"], .overflow-auto, .overflow-x-auto, .overflow-y-auto, .overflow-scroll, .overflow-x-scroll, .overflow-y-scroll';function Gi(e,t){if(!(!(t instanceof Element)||!e.contains(t)||t.closest(Vr)!==e))for(let o=t;o;o=o.parentElement){if(o instanceof HTMLElement){let n=o.matches("[data-monkeys-scrollbar]")?o.parentElement?.querySelector(":scope > [data-radix-scroll-area-viewport]"):o.querySelector(":scope > [data-radix-scroll-area-viewport]");if(n?.closest(Vr)===e)return n;if(o.matches(np)){let a=getComputedStyle(o);if(/(auto|scroll|overlay)/.test(`${a.overflowX} ${a.overflowY}`))return o}}if(o===e)break}}r(Gi,"viewportAt");function qi(e,t=true){let o=useRef(),n=r(()=>{let i=o.current;i?.observer?.disconnect(),i?.marked.forEach(l=>l.removeAttribute(Un)),o.current=void 0;},"clear");useEffect(()=>n,[t]);let a=r((i,l)=>{if(!t||!i.isConnected||!i.matches(Vr))return;o.current?.root!==i&&(n(),o.current={root:i,marked:new Set});let s=o.current;l!==void 0&&(s.pointerTarget=l);let c=i.ownerDocument.activeElement,u=Gi(i,s.pointerTarget),g=c?.matches(":focus-visible")?Gi(i,c):void 0;if(!u&&!g){s.observer?.disconnect(),s.observer=void 0,s.marked.forEach(m=>m.removeAttribute(Un)),s.marked.clear();return}let d=new Set;for(let m of [u,g])m&&(d.add(m),m.matches("[data-radix-scroll-area-viewport]")&&m.parentElement?.querySelectorAll(":scope > [data-monkeys-scrollbar]").forEach(b=>d.add(b)));s.marked.forEach(m=>{d.has(m)||m.removeAttribute(Un);}),d.forEach(m=>{s.marked.has(m)||m.setAttribute(Un,"");}),s.marked=d,s.observer||(s.observer=new MutationObserver(()=>a(i)),s.observer.observe(i,{childList:true,subtree:true}));},"update");return {onPointerEnter(i){a(i.currentTarget,i.target),e.onPointerEnter?.(i);},onPointerLeave(i){a(i.currentTarget,null),e.onPointerLeave?.(i);},onPointerOver(i){a(i.currentTarget,i.target),e.onPointerOver?.(i);},onPointerOut(i){a(i.currentTarget,i.relatedTarget),e.onPointerOut?.(i);},onFocusCapture(i){a(i.currentTarget),e.onFocusCapture?.(i);},onBlurCapture(i){let l=i.currentTarget;queueMicrotask(()=>a(l)),e.onBlurCapture?.(i);}}}r(qi,"useBentoScrollbarVisibility");function Xi(e,t){let o=new WeakMap,n=new Map,a=1;return (...i)=>{let l=i.slice(0,-1),s=i[i.length-1],c=l.map(d=>{if(!d)return 0;let m=o.get(d);return m===void 0&&(m=a++,o.set(d,m)),m}).join(":"),u=n.get(c);if(!u){let d={};for(let m of e)d[m]=t(...l.map(b=>b?.[m]));u=Object.freeze(d),n.size>=64&&n.delete(n.keys().next().value),n.set(c,u);}let g={...u};if(s)for(let d of e){let m=s[d];m&&(g[d]=t(...l.map(b=>b?.[d]),m));}return g}}r(Xi,"createStaticSlotMerger");var rp={},_e="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",kt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",zn="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",Ki=T("[scrollbar-width:thin]","[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]","[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent","[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0","[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0","[&::-webkit-scrollbar-corner]:bg-transparent","[&::-webkit-scrollbar-track]:bg-transparent","[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]","[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40","hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55"),ap=T("[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]","[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]","[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]"),Qi={buttonBase:T("group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-hidden","cursor-pointer disabled:!cursor-not-allowed",kt),buttonDefault:"border-border bg-background text-foreground hover:bg-accent/60",buttonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",buttonSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))] hover:bg-[hsl(var(--success,142_72%_29%)_/_0.15)]",buttonWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))] hover:bg-[hsl(var(--warning,45_93%_47%)_/_0.15)]",buttonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",buttonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",buttonActive:"border-primary/35 bg-primary/10 text-primary",buttonDisabled:"!cursor-not-allowed opacity-60",buttonIconOnly:"w-9 px-0",buttonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",buttonLabel:"min-w-0 truncate",badgeBase:T("inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium",_e),badgeDefault:"border-border/60 bg-background text-foreground",badgePrimary:"border-primary/30 bg-primary/10 text-primary",badgeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))]",badgeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",badgeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",badgeMuted:"border-border/60 bg-muted text-muted-foreground",badgeIcon:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",badgeLabel:"min-w-0 truncate",textRoot:"min-w-0 break-words leading-6",textSizeXs:"text-xs",textSizeSm:"text-sm",textSizeMd:"text-base",textSizeLg:"text-lg",textSizeXl:"text-xl",typographyToneDefault:"text-foreground",typographyToneMuted:"text-muted-foreground",typographyTonePrimary:"text-primary",typographyToneSuccess:"text-emerald-700 dark:text-emerald-400",typographyToneWarning:"text-amber-700 dark:text-amber-400",typographyToneDanger:"text-destructive-text",typographyToneInherit:"text-inherit",headingRoot:"min-w-0 break-words font-semibold tracking-tight",headingSizeXs:"text-sm leading-5",headingSizeSm:"text-base leading-6",headingSizeMd:"text-lg leading-7",headingSizeLg:"text-xl leading-7",headingSizeXl:"text-2xl leading-8",headingSize2xl:"text-3xl leading-9",linkRoot:"inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",codeInline:"rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground",codeBlock:"m-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground",codeContent:"font-mono text-sm leading-6",kbdRoot:"inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]",listRoot:"m-0 min-w-0 list-outside break-words ps-5 text-foreground",listSpacingCompact:"[&>li+li]:mt-1",listSpacingDefault:"[&>li+li]:mt-2",listSpacingRelaxed:"[&>li+li]:mt-3",listMarkerNone:"list-none ps-0",listMarkerDisc:"list-disc",listMarkerCircle:"list-[circle]",listMarkerSquare:"list-[square]",listMarkerDecimal:"list-decimal",listMarkerLowerAlpha:"list-[lower-alpha]",listMarkerUpperAlpha:"list-[upper-alpha]",listItem:"min-w-0 ps-1 leading-6 marker:text-muted-foreground",stackRoot:"flex min-w-0 flex-col",inlineRoot:"flex min-w-0 flex-row",gridRoot:"grid min-w-0",containerRoot:"mx-auto w-full min-w-0",aspectRatioRoot:"relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full",spinnerRoot:"inline-flex shrink-0 items-center justify-center text-current align-middle",spinnerIndicator:"h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none",visuallyHiddenRoot:"sr-only",visuallyHiddenFocusable:"focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-hidden focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring",fieldsetRoot:"min-w-0 border-0 p-0 text-foreground",fieldsetLegend:"min-w-0 text-sm font-semibold leading-6 text-foreground",fieldsetDescription:"mt-1 text-sm leading-5 text-muted-foreground",fieldsetError:"mt-1 text-sm leading-5 text-destructive-text",fieldsetContent:"mt-3 grid min-w-0 gap-3",stepsRoot:"m-0 min-w-0 list-none p-0 text-foreground",stepsHorizontal:"flex w-full max-w-full items-start overflow-x-auto pb-2",stepsVertical:"grid",stepsItem:"relative min-w-0",stepsItemHorizontal:"flex min-w-52 flex-1 items-start",stepsItemVertical:"pb-6 last:pb-0",stepsTrigger:"flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit",stepsTriggerInteractive:"cursor-pointer hover:bg-accent/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",stepsTriggerDisabled:"!cursor-not-allowed opacity-60",stepsIndicator:"relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",stepsIndicatorPending:"border-border bg-background text-muted-foreground",stepsIndicatorCurrent:"border-primary/50 bg-primary/10 text-primary",stepsIndicatorCompleted:"border-primary bg-primary text-primary-foreground",stepsIndicatorError:"border-destructive bg-destructive text-destructive-foreground",stepsContent:"grid min-w-0 gap-1 pt-0.5",stepsLabel:"min-w-0 break-words text-sm font-medium leading-5",stepsDescription:"min-w-0 break-words text-sm leading-5 text-muted-foreground",stepsStatus:"sr-only",stepsConnector:"shrink-0 bg-border",stepsConnectorHorizontal:"mt-3.5 h-px w-8",stepsConnectorVertical:"absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2",stepsConnectorCompleted:"bg-primary/60",stepsConnectorError:"bg-destructive/60",scrollAreaViewport:"min-h-0 min-w-0",numberInputControl:"tabular-nums",numberInputStepControls:"me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border",numberInputStepButton:"flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",passwordInputControl:"pe-2",passwordInputToggle:"me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",inputGroupRoot:T("relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30",_e),inputGroupInvalid:"border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25",inputGroupDisabled:"!cursor-not-allowed bg-muted/35",inputGroupContent:"flex min-w-0 flex-1 items-stretch [&>*]:min-w-0",inputGroupStartElement:"inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75",inputGroupEndElement:"inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75",inputGroupStartAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",inputGroupEndAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",panelRoot:T("group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background",kt),panelInteractive:"cursor-pointer hover:shadow-md",panelSelected:"border-primary/45 bg-primary/5",panelDisabled:"!cursor-not-allowed opacity-60",panelMedia:"shrink-0 overflow-hidden",panelHeader:"min-w-0 p-token-lg",panelTitle:"min-w-0 truncate text-sm font-semibold leading-none text-foreground",panelDescription:"mt-1 text-sm leading-5 text-foreground/75",panelBody:"min-w-0 px-token-lg pb-token-lg text-sm text-foreground",panelBodyStandalone:"pt-token-lg",panelFooter:"shrink-0 border-t border-border/60 px-token-lg py-token-md",stateRoot:T("flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center",_e),stateIcon:"mb-token-lg flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in",stateTitle:"text-sm font-semibold text-foreground",stateDescription:"mt-2 max-w-md text-sm leading-6 text-muted-foreground",stateActions:"mt-token-xl flex flex-wrap items-center justify-center gap-token-sm",loadingSpinner:"h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none",fieldRoot:"grid min-w-0 gap-token-md",fieldLabelRow:"flex min-w-0 items-center justify-between gap-token-md",fieldLabel:"min-w-0 text-sm font-medium leading-none text-foreground",fieldRequired:"text-destructive-text",fieldDescription:"text-sm leading-5 text-muted-foreground",fieldMessage:"text-sm leading-5 text-muted-foreground",fieldControl:"min-w-0",controlWrapper:T("relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35",_e),controlBase:"min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-hidden placeholder:text-muted-foreground disabled:!cursor-not-allowed",controlInput:"h-9",controlTextarea:"min-h-24 resize-y py-2 leading-6",controlSelect:"h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed",controlIcon:"pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",controlTrailing:"mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground",controlInvalid:"border-destructive/45 focus-within:border-destructive/60",controlDisabled:"!cursor-not-allowed opacity-60",controlReadOnly:"bg-muted/35",selectChevron:T("pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground",zn),selectMenu:"absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden",selectOption:T("flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground",kt),selectOptionActive:"bg-accent text-accent-foreground",selectOptionSelected:"bg-primary/10 text-primary",selectOptionDisabled:"!cursor-not-allowed opacity-50",selectPlaceholder:"text-muted-foreground",selectNative:"sr-only",switchRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",switchInput:"sr-only",switchTrack:T("relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35",_e),switchThumb:T("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",zn),switchChecked:"border-primary/40 bg-primary/80 text-primary-foreground",switchDisabled:"!cursor-not-allowed opacity-60",switchContent:"grid min-w-0 gap-1",switchLabel:"text-sm font-medium leading-none text-foreground",switchDescription:"text-sm leading-5 text-muted-foreground",checkboxRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",checkboxInput:"sr-only",checkboxBox:T("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40",_e),checkboxBoxChecked:"border-primary/45 bg-primary text-primary-foreground",checkboxBoxInvalid:"border-destructive/50",checkboxIndicator:"text-xs font-bold leading-none",checkboxDisabled:"!cursor-not-allowed opacity-60",checkboxContent:"grid min-w-0 gap-1",checkboxLabel:"text-sm font-medium leading-none text-foreground",checkboxDescription:"text-sm leading-5 text-muted-foreground",radioGroupRoot:"grid min-w-0 gap-2",radioOption:T("inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm",kt,"hover:bg-muted/35"),radioInput:"sr-only",radioMarker:T("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40",_e),radioMarkerChecked:"border-primary/50 bg-primary/10",radioIndicator:"h-2 w-2 rounded-full bg-primary",radioOptionDisabled:"!cursor-not-allowed opacity-60 hover:bg-background",radioContent:"grid min-w-0 gap-1",radioLabel:"text-sm font-medium leading-none text-foreground",radioDescription:"text-sm leading-5 text-muted-foreground",dialogRoot:"relative",dialogTrigger:"",dialogTriggerDisabled:"!cursor-not-allowed opacity-60",dialogOverlay:"fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dialogContent:"pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4",dialogPanel:T("pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl","motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out"),dialogHeader:"grid min-w-0 gap-1 border-b border-border/60 px-5 py-4",dialogTitle:"min-w-0 pr-8 text-base font-semibold leading-6 text-foreground",dialogDescription:"text-sm leading-6 text-muted-foreground",dialogBody:"min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground",dialogFooter:"flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4",dialogClose:T("absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",kt),dropdownRoot:"relative inline-flex min-w-0",dropdownTrigger:"",dropdownTriggerDisabled:"!cursor-not-allowed opacity-60",dropdownMenu:"z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dropdownMenuTop:"bottom-[calc(100%+0.375rem)] top-auto",dropdownMenuEnd:"left-auto right-0",dropdownLabel:"px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground",dropdownSeparator:"my-1 h-px bg-border/70",dropdownItem:T("flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",kt),dropdownItemDanger:"text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10",dropdownItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent",dropdownItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",dropdownItemContent:"grid min-w-0 flex-1 gap-0.5",dropdownItemLabel:"min-w-0 truncate",dropdownItemDescription:"min-w-0 truncate text-xs leading-4 text-muted-foreground",dropdownItemShortcut:"ml-3 shrink-0 text-xs font-medium text-muted-foreground",tooltipRoot:"relative inline-flex min-w-0",tooltipTrigger:"inline-flex min-w-0",tooltipContent:"pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",noticeBase:T("flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm",_e,"motion-safe:animate-in motion-safe:fade-in"),noticeDefault:"border-border bg-background text-foreground",noticePrimary:"border-primary/25 bg-primary/10 text-primary",noticeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-foreground",noticeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",noticeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",noticeMuted:"border-border/60 bg-muted/35 text-muted-foreground",noticeIcon:"mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in",noticeTitle:"font-semibold leading-5",noticeDescription:"leading-6",noticeActions:"mt-3 flex flex-wrap items-center gap-2",dividerRoot:T("shrink-0 border-border/70",_e),dividerLabel:"mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in",sectionHeaderRoot:"flex min-w-0 flex-wrap items-start justify-between gap-token-md motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",sectionHeaderContent:"grid min-w-0 gap-1",sectionHeaderEyebrow:"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground",sectionHeaderTitle:"text-base font-semibold leading-6 text-foreground",sectionHeaderDescription:"max-w-2xl text-sm leading-6 text-muted-foreground",sectionHeaderActions:"flex shrink-0 flex-wrap items-center gap-2",tabsRoot:"grid min-w-0 gap-token-md",tabsList:T("inline-flex min-w-0 flex-wrap items-center gap-token-xs rounded-lg border border-border/70 bg-muted/30 p-token-xs",_e),tabsTrigger:T("inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none",kt),tabsTriggerActive:"bg-background text-foreground shadow-sm",tabsTriggerDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",tabsPanel:"min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",segmentedRoot:T("inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",_e),segmentedItem:T("inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden",kt),segmentedItemActive:"bg-background text-foreground shadow-sm",segmentedItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",progressRoot:"grid min-w-0 gap-2",progressTrack:"h-2 w-full overflow-hidden rounded-full bg-muted",progressIndicator:"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out",progressLabelRow:"flex min-w-0 items-center justify-between gap-3",progressLabel:"min-w-0 truncate text-sm font-medium text-foreground",progressValue:"shrink-0 text-xs font-medium text-muted-foreground",skeletonRoot:"relative overflow-hidden rounded-md bg-muted/70",avatarRoot:"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",avatarImage:"h-full w-full object-cover",avatarFallback:"flex h-full w-full items-center justify-center bg-muted text-foreground",avatarStatus:"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse",avatarText:"min-w-0 truncate text-sm font-medium text-foreground",toolbarRoot:T("flex min-w-0 flex-wrap items-center justify-between gap-token-md rounded-lg border border-border/70 bg-background px-token-lg py-token-md",_e),toolbarLeading:"flex min-w-0 items-center gap-token-md",toolbarTitle:"min-w-0 truncate text-sm font-semibold text-foreground",toolbarDescription:"mt-0.5 text-sm leading-5 text-muted-foreground",toolbarContent:"min-w-0 flex-1",toolbarActions:"flex shrink-0 flex-wrap items-center gap-token-sm",breadcrumbRoot:"min-w-0 text-sm text-muted-foreground",breadcrumbList:"flex min-w-0 flex-wrap items-center gap-1.5",breadcrumbItem:"inline-flex min-w-0 items-center gap-1.5",breadcrumbLink:"min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",breadcrumbCurrent:"min-w-0 truncate font-medium text-foreground",breadcrumbSeparator:"shrink-0 text-muted-foreground/70",paginationRoot:"flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm",paginationInfo:"min-w-0 text-muted-foreground",paginationControls:"flex min-w-0 flex-wrap items-center justify-end gap-1.5",paginationButton:"inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",paginationButtonDisabled:"!cursor-not-allowed opacity-50",paginationPage:"inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50",paginationEllipsis:"inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground",descriptionListRoot:"grid min-w-0 gap-3 text-sm",descriptionListItem:"grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm",descriptionListTerm:"min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",descriptionListValue:"min-w-0 text-sm leading-6 text-foreground",accordionRoot:"grid min-w-0 gap-2",accordionItem:"overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTrigger:"flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTriggerIcon:T("h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground",zn,"motion-reduce:transition-none"),accordionPanel:"border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none",menuTrigger:"inline-flex min-w-0",menuContent:"z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:T("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",kt),menuItemDefault:"text-foreground",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_72%_29%))] focus:text-[hsl(var(--success,142_72%_29%))] data-[highlighted]:text-[hsl(var(--success,142_72%_29%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,28_73%_26%))] focus:text-[hsl(var(--warning-foreground,28_73%_26%))] data-[highlighted]:text-[hsl(var(--warning-foreground,28_73%_26%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground",menuItemDisabled:"!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"min-w-0 flex-1 truncate",menuItemShortcut:"ml-4 shrink-0 text-xs font-medium text-muted-foreground",menuCheckboxIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuRadioIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuSubTrigger:T("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",kt),menuSubTriggerIcon:"ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",menuSubContent:"z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",tableContainer:T("relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]","[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]","[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]",Ki,_e),tableContainerFooterAttached:"!rounded-b-none !shadow-none",tableRoot:"w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableCaption:"mt-3 text-sm text-muted-foreground",tableHeader:T("relative z-[2] bg-transparent [&_tr]:bg-transparent",ap),tableBody:"[&_tr:last-child>*]:border-b-0",tableFooter:"bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70",tableFooterBar:T("flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none",_e),tableFooterBarAttached:"-mt-px rounded-t-none border-t border-border/70 shadow-none",tableFooterBarLeading:"flex min-w-0 items-center gap-2",tableFooterBarContent:"min-w-0 flex-1",tableFooterBarActions:"ms-auto flex shrink-0 flex-wrap items-center gap-2",tableSplitRoot:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableSplitHeader:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent",tableSplitBody:T("block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]",Ki),tableSplitFooter:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden",tableSplitRow:"grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]",tableSplitHead:"flex min-w-0 overflow-hidden",tableSplitCell:"block min-w-0 overflow-hidden [overflow-wrap:anywhere]",tableRow:T("[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5",_e),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>td]:bg-[var(--base-table-row-hover-bg)] hover:[&>th]:bg-[var(--base-table-row-hover-bg)]",tableRowSelected:"bg-primary/5 [&>*]:bg-primary/5",tableRowDisabled:"!cursor-not-allowed opacity-60",tableHead:"relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]",tableHeadContent:"flex min-w-0 items-center justify-between gap-2",tableHeadMain:"flex min-w-0 items-center gap-2",tableHeadIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",tableHeadText:"grid min-w-0 gap-0.5",tableHeadLabel:"min-w-0 truncate text-xs font-semibold leading-4 text-foreground",tableHeadDescription:"min-w-0 truncate text-xs font-normal leading-4 text-muted-foreground",tableHeadMeta:"shrink-0 text-xs font-medium text-muted-foreground",tableHeadActions:"flex shrink-0 items-center gap-1",tableHeadSortButton:T("inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60",_e),tableHeadSortIcon:T("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",zn),tableHeadDragHandle:T("inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",_e),tableHeadResizeHandle:T("absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",_e),tableCell:"min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]",tableCellAlignCenter:"text-center",tableCellAlignRight:"text-right",tableEmptyRow:"[&>*]:border-b [&>*]:border-border/60",tableEmptyCell:"px-4 py-10 text-center",tableEmptyContent:"mx-auto flex max-w-md flex-col items-center justify-center text-center",tableEmptyIcon:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground",tableEmptyTitle:"text-sm font-semibold text-foreground",tableEmptyDescription:"mt-1 text-sm leading-6 text-muted-foreground",tableEmptyActions:"mt-4 flex flex-wrap items-center justify-center gap-2",tableLoadingRow:"[&>*]:border-b [&>*]:border-border/60",tableLoadingCell:"px-3 py-2",tableLoadingSkeleton:"h-4 w-full rounded-md bg-muted/70",layoutRoot:T("grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground",_e),layoutRootFull:"h-full min-h-0",layoutHeader:"min-w-0",layoutBody:"grid min-h-0 min-w-0 overflow-hidden gap-token-md",layoutSidebar:"min-h-0 min-w-0 overflow-hidden",layoutMain:"min-h-0 min-w-0 overflow-hidden",layoutAside:"min-h-0 min-w-0 overflow-hidden",layoutFooter:"min-w-0",layoutPane:T("h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground",_e),layoutPaneScrollable:"overflow-auto",layoutPaneBordered:"border border-border/70",layoutPaneMuted:"bg-muted/25",layoutPaneSoft:"bg-background/95 shadow-sm",layoutPaneTransparent:"bg-transparent shadow-none",layoutSplitRoot:"grid min-h-0 min-w-0 overflow-hidden",layoutSplitHorizontal:"grid-flow-col",layoutSplitVertical:"grid-flow-row",layoutSplitPane:"min-h-0 min-w-0 overflow-hidden",layoutSplitPrimary:"",layoutSplitSecondary:"",layoutResizeHandle:T("group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",kt),layoutResizeHandleHorizontal:"w-2 cursor-col-resize",layoutResizeHandleVertical:"h-2 cursor-row-resize",layoutResizeHandleDisabled:"cursor-default opacity-60",layoutResizeHandleIndicator:"rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70"},ip={compact:{buttonBase:"h-8 px-2.5 text-xs",buttonIconOnly:"h-8 w-8 px-0",badgeBase:"px-1.5 py-0 text-xs",panelHeader:"p-token-md",panelBody:"px-token-md pb-token-md text-xs",panelBodyStandalone:"pt-token-md",panelFooter:"px-token-md py-token-md",stateRoot:"min-h-36 px-4 py-7",stateIcon:"mb-3 h-10 w-10",fieldRoot:"gap-token-sm",fieldLabel:"text-xs",fieldDescription:"text-xs leading-5",fieldMessage:"text-xs leading-5",controlInput:"h-8 text-xs",controlTextarea:"min-h-20 text-xs",controlSelect:"h-8 text-xs",selectMenu:"text-xs",selectOption:"min-h-7 px-2 py-1 text-xs",switchTrack:"h-5 w-9",switchThumb:"h-3.5 w-3.5",checkboxBox:"h-3.5 w-3.5",checkboxLabel:"text-xs",checkboxDescription:"text-xs leading-5",radioOption:"px-2 py-1.5 text-xs",radioMarker:"h-3.5 w-3.5",radioIndicator:"h-1.5 w-1.5",radioLabel:"text-xs",radioDescription:"text-xs leading-5",dialogPanel:"max-w-md",dialogHeader:"px-4 py-3",dialogTitle:"text-sm leading-5",dialogDescription:"text-xs leading-5",dialogBody:"px-4 py-3 text-xs",dialogFooter:"px-4 py-3",dropdownMenu:"min-w-44 text-xs",dropdownItem:"px-2 py-1.5 text-xs",tooltipContent:"text-xs leading-4",noticeBase:"px-3 py-2 text-xs",dividerLabel:"text-xs",sectionHeaderRoot:"gap-token-sm",sectionHeaderTitle:"text-sm leading-5",sectionHeaderDescription:"text-xs leading-5",tabsList:"gap-token-xs p-token-xs",tabsTrigger:"px-2 py-1 text-xs",tabsPanel:"p-3 text-xs",segmentedRoot:"gap-token-xs p-token-xs",segmentedItem:"px-2 py-1 text-xs",progressTrack:"h-1.5",avatarRoot:"text-xs",toolbarRoot:"gap-token-sm px-token-md py-token-md",toolbarTitle:"text-xs",toolbarDescription:"text-xs leading-5",paginationButton:"h-7 min-w-7 px-2 text-xs",paginationPage:"h-7 min-w-7 px-2 text-xs",descriptionListRoot:"gap-2 text-xs",descriptionListItem:"px-2 py-1.5",descriptionListTerm:"text-xs",descriptionListValue:"text-xs leading-5",accordionTrigger:"px-3 py-2 text-xs",accordionPanel:"px-3 py-2 text-xs leading-5",menuContent:"min-w-40 p-0.5 text-xs",menuSubContent:"min-w-36 p-0.5 text-xs",menuLabel:"px-2 py-1 text-xs",menuItem:"min-h-7 px-2 py-1 text-xs",menuSubTrigger:"min-h-7 px-2 py-1 text-xs",menuItemShortcut:"text-xs",tableContainer:"[--base-table-header-height:2.25rem]",tableHead:"h-9 px-2 py-1.5 text-xs",tableCell:"px-2 py-1.5 text-xs",tableHeadLabel:"text-xs",tableHeadDescription:"text-xs leading-3",tableLoadingCell:"px-2 py-1.5",layoutRoot:"gap-token-md p-token-md",layoutBody:"gap-token-md",layoutPane:"rounded-md text-xs",layoutResizeHandleHorizontal:"w-1.5",layoutResizeHandleVertical:"h-1.5"},default:{buttonBase:"h-9"},comfortable:{buttonBase:"h-10 px-3.5",buttonIconOnly:"h-10 w-10 px-0",badgeBase:"px-2.5 py-1",panelHeader:"p-token-xl",panelBody:"px-token-xl pb-token-xl",panelBodyStandalone:"pt-token-xl",panelFooter:"px-token-xl py-token-lg",stateRoot:"min-h-56 px-8 py-12",stateIcon:"mb-5 h-14 w-14",fieldRoot:"gap-token-md",controlInput:"h-10",controlTextarea:"min-h-28",controlSelect:"h-10",selectMenu:"p-1.5",selectOption:"min-h-9 px-3 py-2",switchTrack:"h-7 w-12",switchThumb:"h-5 w-5",checkboxBox:"h-5 w-5",radioOption:"px-4 py-3",radioMarker:"h-5 w-5",radioIndicator:"h-2.5 w-2.5",dialogPanel:"max-w-xl",dialogHeader:"px-6 py-5",dialogBody:"px-6 py-5",dialogFooter:"px-6 py-5",dropdownMenu:"min-w-56",dropdownItem:"px-3 py-2.5",noticeBase:"px-5 py-4",sectionHeaderTitle:"text-lg leading-7",tabsTrigger:"px-3.5 py-2",tabsPanel:"p-5",segmentedItem:"px-3.5 py-2",progressTrack:"h-2.5",toolbarRoot:"px-token-xl py-token-lg",paginationButton:"h-9 min-w-9 px-3",paginationPage:"h-9 min-w-9 px-3",descriptionListItem:"px-4 py-3",accordionTrigger:"px-5 py-4",accordionPanel:"px-5 py-4",menuContent:"min-w-48 p-1.5",menuSubContent:"min-w-44 p-1.5",menuItem:"min-h-9 px-3 py-2",menuSubTrigger:"min-h-9 px-3 py-2",tableContainer:"[--base-table-header-height:3rem]",tableHead:"h-12 px-4 py-3",tableCell:"px-4 py-3",tableLoadingCell:"px-4 py-3",layoutRoot:"gap-token-lg p-token-lg",layoutBody:"gap-token-lg",layoutPane:"rounded-xl",layoutResizeHandleHorizontal:"w-2.5",layoutResizeHandleVertical:"h-2.5"}},sp={none:{buttonBase:"rounded-none",badgeBase:"rounded-none",panelRoot:"rounded-none",stateRoot:"rounded-none",stateIcon:"rounded-none",controlWrapper:"rounded-none",selectMenu:"rounded-none",selectOption:"rounded-none",switchTrack:"rounded-none",switchThumb:"rounded-none",checkboxBox:"rounded-none",radioOption:"rounded-none",dialogPanel:"rounded-none",dialogClose:"rounded-none",dropdownMenu:"rounded-none",dropdownItem:"rounded-none",tooltipContent:"rounded-none",noticeBase:"rounded-none",tabsList:"rounded-none",tabsTrigger:"rounded-none",tabsPanel:"rounded-none",segmentedRoot:"rounded-none",segmentedItem:"rounded-none",progressTrack:"rounded-none",progressIndicator:"rounded-none",skeletonRoot:"rounded-none",avatarRoot:"rounded-none",avatarStatus:"rounded-none",toolbarRoot:"rounded-none",paginationButton:"rounded-none",paginationPage:"rounded-none",descriptionListItem:"rounded-none",accordionItem:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",menuSubTrigger:"rounded-none",menuSubContent:"rounded-none",tableContainer:"rounded-none",tableEmptyIcon:"rounded-none",tableLoadingSkeleton:"rounded-none",layoutRoot:"rounded-none",layoutPane:"rounded-none"},sm:{buttonBase:"rounded-sm",badgeBase:"rounded-sm",panelRoot:"rounded-sm",stateRoot:"rounded-sm",stateIcon:"rounded-sm",controlWrapper:"rounded-sm",selectMenu:"rounded-sm",selectOption:"rounded-sm",switchTrack:"rounded-sm",switchThumb:"rounded-sm",checkboxBox:"rounded-sm",radioOption:"rounded-sm",dialogPanel:"rounded-sm",dialogClose:"rounded-sm",dropdownMenu:"rounded-sm",dropdownItem:"rounded-sm",tooltipContent:"rounded-sm",noticeBase:"rounded-sm",tabsList:"rounded-sm",tabsTrigger:"rounded-sm",tabsPanel:"rounded-sm",segmentedRoot:"rounded-sm",segmentedItem:"rounded-sm",progressTrack:"rounded-sm",progressIndicator:"rounded-sm",skeletonRoot:"rounded-sm",avatarRoot:"rounded-sm",avatarStatus:"rounded-sm",toolbarRoot:"rounded-sm",paginationButton:"rounded-sm",paginationPage:"rounded-sm",descriptionListItem:"rounded-sm",accordionItem:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",menuSubTrigger:"rounded-sm",menuSubContent:"rounded-sm",tableContainer:"rounded-sm",tableEmptyIcon:"rounded-sm",tableLoadingSkeleton:"rounded-sm",layoutRoot:"rounded-sm",layoutPane:"rounded-sm"},md:{},lg:{buttonBase:"rounded-lg",badgeBase:"rounded-lg",panelRoot:"rounded-xl",stateRoot:"rounded-xl",stateIcon:"rounded-xl",controlWrapper:"rounded-lg",selectMenu:"rounded-lg",selectOption:"rounded-md",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-md",radioOption:"rounded-xl",dialogPanel:"rounded-xl",dialogClose:"rounded-lg",dropdownMenu:"rounded-lg",dropdownItem:"rounded-md",tooltipContent:"rounded-md",noticeBase:"rounded-xl",tabsList:"rounded-xl",tabsTrigger:"rounded-lg",tabsPanel:"rounded-xl",segmentedRoot:"rounded-xl",segmentedItem:"rounded-lg",skeletonRoot:"rounded-lg",toolbarRoot:"rounded-xl",descriptionListItem:"rounded-lg",accordionItem:"rounded-xl",menuContent:"rounded-lg",menuItem:"rounded-md",menuSubTrigger:"rounded-md",menuSubContent:"rounded-lg",tableContainer:"rounded-xl",tableEmptyIcon:"rounded-xl",tableLoadingSkeleton:"rounded-lg",layoutRoot:"rounded-xl",layoutPane:"rounded-xl"},xl:{buttonBase:"rounded-xl",badgeBase:"rounded-xl",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-2xl",controlWrapper:"rounded-xl",selectMenu:"rounded-xl",selectOption:"rounded-lg",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-lg",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-xl",dropdownMenu:"rounded-xl",dropdownItem:"rounded-lg",tooltipContent:"rounded-lg",noticeBase:"rounded-2xl",tabsList:"rounded-2xl",tabsTrigger:"rounded-xl",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-2xl",segmentedItem:"rounded-xl",skeletonRoot:"rounded-xl",toolbarRoot:"rounded-2xl",paginationButton:"rounded-xl",paginationPage:"rounded-xl",descriptionListItem:"rounded-xl",accordionItem:"rounded-2xl",menuContent:"rounded-xl",menuItem:"rounded-lg",menuSubTrigger:"rounded-lg",menuSubContent:"rounded-xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-2xl",tableLoadingSkeleton:"rounded-xl",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"},full:{buttonBase:"rounded-full",badgeBase:"rounded-full",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-full",controlWrapper:"rounded-full",selectMenu:"rounded-2xl",selectOption:"rounded-full",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-full",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-full",dropdownMenu:"rounded-2xl",dropdownItem:"rounded-full",tooltipContent:"rounded-full",noticeBase:"rounded-2xl",tabsList:"rounded-full",tabsTrigger:"rounded-full",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-full",segmentedItem:"rounded-full",progressTrack:"rounded-full",progressIndicator:"rounded-full",skeletonRoot:"rounded-full",avatarRoot:"rounded-full",avatarStatus:"rounded-full",toolbarRoot:"rounded-2xl",paginationButton:"rounded-full",paginationPage:"rounded-full",descriptionListItem:"rounded-2xl",accordionItem:"rounded-2xl",menuContent:"rounded-2xl",menuItem:"rounded-full",menuSubTrigger:"rounded-full",menuSubContent:"rounded-2xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-full",tableLoadingSkeleton:"rounded-full",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"}},lp={none:{buttonBase:"border-transparent",badgeBase:"border-transparent",panelRoot:"border-transparent",panelFooter:"border-transparent",stateRoot:"border-transparent",controlWrapper:"border-transparent",selectMenu:"border-transparent",switchTrack:"border-transparent",checkboxBox:"border-transparent",radioOption:"border-transparent",radioMarker:"border-transparent",dialogPanel:"border-transparent",dialogHeader:"border-transparent",dialogFooter:"border-transparent",dropdownMenu:"border-transparent",tooltipContent:"border-transparent",noticeBase:"border-transparent",dividerRoot:"border-transparent",tabsList:"border-transparent",tabsPanel:"border-transparent",segmentedRoot:"border-transparent",avatarRoot:"border-transparent",toolbarRoot:"border-transparent",paginationButton:"border-transparent",descriptionListItem:"border-transparent",accordionItem:"border-transparent",accordionPanel:"border-transparent",menuContent:"border-transparent",menuSeparator:"bg-transparent",menuSubContent:"border-transparent",tableContainer:"border-transparent [--base-table-header-separator:transparent]",tableHeader:"border-transparent",tableFooter:"[&_tr>*]:border-transparent",tableFooterBar:"border-transparent",tableFooterBarAttached:"border-t border-transparent",tableRow:"[&>*]:border-transparent",tableEmptyRow:"[&>*]:border-transparent",tableLoadingRow:"[&>*]:border-transparent",layoutRoot:"border-transparent",layoutPaneBordered:"border-transparent",layoutResizeHandle:"bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent"},subtle:{buttonDefault:"border-border/60",badgeDefault:"border-border/60",panelRoot:"border-border/60",panelFooter:"border-border/60",stateRoot:"border-border/60",controlWrapper:"border-border/60",selectMenu:"border-border/60",switchTrack:"border-border/60",checkboxBox:"border-border/60",radioOption:"border-border/60",radioMarker:"border-border/60",dialogPanel:"border-border/60",dialogHeader:"border-border/60",dialogFooter:"border-border/60",dropdownMenu:"border-border/60",tooltipContent:"border-border/60",noticeDefault:"border-border/60",dividerRoot:"border-border/60",tabsList:"border-border/60",tabsPanel:"border-border/60",segmentedRoot:"border-border/60",avatarRoot:"border-border/60",toolbarRoot:"border-border/60",paginationButton:"border-border/60",descriptionListItem:"border-border/60",accordionItem:"border-border/60",accordionPanel:"border-border/60",menuContent:"border-border/60",menuSeparator:"bg-border/60",menuSubContent:"border-border/60",tableContainer:"border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]",tableHeader:"border-border/60",tableFooter:"[&_tr>*]:border-border/60",tableFooterBar:"border-border/60",tableFooterBarAttached:"border-t border-border/60",tableRow:"[&>*]:border-border/50",tableEmptyRow:"[&>*]:border-border/50",tableLoadingRow:"[&>*]:border-border/50",layoutRoot:"border-border/60",layoutPaneBordered:"border-border/60"},solid:{},strong:{buttonDefault:"border-foreground/20",badgeDefault:"border-foreground/20",panelRoot:"border-foreground/20",panelFooter:"border-foreground/20",stateRoot:"border-foreground/20",controlWrapper:"border-foreground/20",selectMenu:"border-foreground/20",switchTrack:"border-foreground/20",checkboxBox:"border-foreground/20",radioOption:"border-foreground/20",radioMarker:"border-foreground/20",dialogPanel:"border-foreground/20",dialogHeader:"border-foreground/15",dialogFooter:"border-foreground/15",dropdownMenu:"border-foreground/20",tooltipContent:"border-foreground/20",noticeDefault:"border-foreground/20",dividerRoot:"border-foreground/20",tabsList:"border-foreground/20",tabsPanel:"border-foreground/20",segmentedRoot:"border-foreground/20",avatarRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",paginationButton:"border-foreground/20",descriptionListItem:"border-foreground/20",accordionItem:"border-foreground/20",accordionPanel:"border-foreground/20",menuContent:"border-foreground/20",menuSeparator:"bg-foreground/15",menuSubContent:"border-foreground/20",tableContainer:"border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]",tableHeader:"border-foreground/20",tableFooter:"[&_tr>*]:border-foreground/20",tableFooterBar:"border-foreground/20",tableFooterBarAttached:"border-t border-foreground/20",tableRow:"[&>*]:border-foreground/15",tableEmptyRow:"[&>*]:border-foreground/15",tableLoadingRow:"[&>*]:border-foreground/15",layoutRoot:"border-foreground/20",layoutPaneBordered:"border-foreground/20",layoutResizeHandle:"hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15"}},cp={plain:{},muted:{buttonDefault:"bg-muted/20 hover:bg-muted/45",panelRoot:"bg-card",panelFooter:"bg-muted/20",stateRoot:"bg-muted/20",controlWrapper:"bg-background",selectMenu:"bg-background",selectOptionActive:"bg-muted/70 text-foreground",checkboxBox:"bg-background",radioOption:"bg-card hover:bg-muted/45",radioMarker:"bg-background",dialogPanel:"bg-card",dropdownMenu:"bg-background",dropdownItem:"hover:bg-muted/60",tooltipContent:"bg-popover",noticeDefault:"bg-muted/20",tabsList:"bg-muted/35",tabsTriggerActive:"bg-background",tabsPanel:"bg-card",segmentedRoot:"bg-muted/35",segmentedItemActive:"bg-background",progressTrack:"bg-muted/60",skeletonRoot:"bg-muted",toolbarRoot:"bg-card",paginationButton:"bg-background hover:bg-muted/60",paginationPage:"bg-muted/60",descriptionListItem:"bg-card",accordionItem:"bg-card",menuContent:"bg-background",menuItem:"focus:bg-muted/70 data-[highlighted]:bg-muted/70",menuSubTrigger:"focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70",menuSubContent:"bg-background",tableContainer:"bg-background/95 [scrollbar-gutter:stable]",tableFooter:"bg-muted/35",tableFooterBar:"bg-muted/30 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]",tableLoadingSkeleton:"bg-muted",layoutRoot:"bg-card",layoutPane:"bg-card",layoutPaneMuted:"bg-muted/35",layoutResizeHandle:"hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70"},soft:{buttonDefault:"bg-muted/30 hover:bg-muted/55",panelRoot:"bg-background/95 shadow-sm",stateRoot:"bg-background/95 shadow-sm",controlWrapper:"bg-background/95",selectMenu:"bg-background/95 shadow-xl",selectOptionActive:"bg-muted/60 text-foreground",checkboxBox:"bg-background/95",radioOption:"bg-background/95 shadow-sm hover:bg-muted/35",radioMarker:"bg-background/95",dialogPanel:"bg-background/95 shadow-xl",dropdownMenu:"bg-background/95 shadow-xl",dropdownItem:"hover:bg-muted/55",tooltipContent:"bg-popover shadow-xl",noticeDefault:"bg-background/95 shadow-sm",tabsList:"bg-background/60 shadow-sm",tabsTriggerActive:"bg-background",tabsPanel:"bg-background/95 shadow-sm",segmentedRoot:"bg-background/60 shadow-sm",segmentedItemActive:"bg-background",skeletonRoot:"bg-background/80",toolbarRoot:"bg-background/95 shadow-sm",paginationButton:"bg-background/95 hover:bg-muted/55",descriptionListItem:"bg-background/95 shadow-sm",accordionItem:"bg-background/95 shadow-sm",menuContent:"bg-background/95 shadow-xl",menuItem:"focus:bg-muted/60 data-[highlighted]:bg-muted/60",menuSubTrigger:"focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60",menuSubContent:"bg-background/95 shadow-xl",tableContainer:"bg-background/95 shadow-sm [scrollbar-gutter:stable]",tableFooter:"bg-muted/25",tableFooterBar:"bg-muted/25 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]",tableLoadingSkeleton:"bg-muted/65",layoutRoot:"bg-background/95 shadow-sm",layoutPane:"bg-background/95 shadow-sm",layoutPaneSoft:"bg-background/95 shadow-md"},glass:{buttonBase:"backdrop-blur-md",buttonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",badgeDefault:"border-white/10 bg-white/[0.08] text-foreground",panelRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",panelFooter:"border-white/10 bg-white/[0.05]",stateRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",stateIcon:"bg-white/10 text-foreground",controlWrapper:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",selectMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",selectOption:"text-foreground",selectOptionActive:"bg-white/[0.14] text-foreground",selectOptionSelected:"bg-white/[0.18] text-foreground",switchTrack:"border-white/10 bg-white/[0.12] backdrop-blur-md",checkboxBox:"border-white/10 bg-white/[0.08] backdrop-blur-md",checkboxBoxChecked:"border-white/20 bg-white/[0.22] text-foreground",radioOption:"border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]",radioMarker:"border-white/10 bg-white/[0.08] backdrop-blur-md",radioMarkerChecked:"border-white/25 bg-white/[0.16]",dialogOverlay:"bg-background/45 backdrop-blur-md",dialogPanel:"border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md",dialogHeader:"border-white/10",dialogFooter:"border-white/10",dropdownMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",dropdownItem:"text-foreground hover:bg-white/[0.14]",tooltipContent:"border-foreground/10 bg-background/15 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",noticeDefault:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",dividerRoot:"border-white/15",tabsList:"border-white/10 bg-white/[0.08] backdrop-blur-md",tabsTrigger:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",tabsTriggerActive:"bg-white/[0.16] text-foreground shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",segmentedRoot:"border-white/10 bg-white/[0.08] backdrop-blur-md",segmentedItem:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",segmentedItemActive:"bg-white/[0.16] text-foreground shadow-none",progressTrack:"bg-white/[0.12]",skeletonRoot:"bg-white/[0.16]",avatarRoot:"border-white/10 bg-white/[0.12] text-foreground",avatarFallback:"bg-white/[0.12] text-foreground",avatarStatus:"border-background",toolbarRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",paginationButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",paginationPage:"bg-white/[0.12] text-foreground",descriptionListItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionPanel:"border-white/10",menuContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",menuSeparator:"bg-white/10",menuItem:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground",menuSubTrigger:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]",menuSubContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",tableContainer:"border-foreground/10 bg-background/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.94)] [--base-table-header-separator:hsl(var(--foreground)/0.24)]",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.08)]",tableHeadLabel:"text-foreground",tableLoadingSkeleton:"bg-white/[0.16]",layoutRoot:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",layoutPane:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",layoutPaneMuted:"bg-white/[0.08]",layoutPaneSoft:"bg-white/[0.10] shadow-none backdrop-blur-md",layoutResizeHandle:"text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"},dark:{buttonBase:"border-white/15 text-white shadow-lg backdrop-blur",buttonDefault:"bg-black/30 hover:bg-black/[0.45]",buttonPrimary:"border-white/25 bg-white/20 text-white hover:bg-white/25",buttonMuted:"border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white",badgeDefault:"border-white/10 bg-white/[0.08] text-white",badgeMuted:"border-white/10 bg-black/20 text-white/70",panelRoot:"border-white/10 bg-slate-950 text-white shadow-none",panelTitle:"text-white",panelDescription:"text-white/65",panelBody:"text-white/85",panelFooter:"border-white/10 bg-white/[0.04]",stateRoot:"border-white/10 bg-slate-950 text-white shadow-none",stateIcon:"bg-white/10 text-white/75",stateTitle:"text-white",stateDescription:"text-white/65",fieldLabel:"text-white",fieldDescription:"text-white/65",fieldMessage:"text-white/65",controlWrapper:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35",controlBase:"text-white placeholder:text-white/45",selectChevron:"text-white/65",selectMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",selectOption:"text-white",selectOptionActive:"bg-white/[0.12] text-white",selectOptionSelected:"bg-white/[0.16] text-white",selectPlaceholder:"text-white/45",switchTrack:"border-white/15 bg-black/30 shadow-lg backdrop-blur",switchChecked:"border-white/25 bg-white/25 text-white",switchLabel:"text-white",switchDescription:"text-white/65",checkboxBox:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",checkboxBoxChecked:"border-white/25 bg-white/25 text-white",checkboxLabel:"text-white",checkboxDescription:"text-white/65",radioOption:"border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]",radioMarker:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",radioMarkerChecked:"border-white/25 bg-white/25",radioIndicator:"bg-white",radioLabel:"text-white",radioDescription:"text-white/65",dialogOverlay:"bg-slate-950/75",dialogPanel:"border-white/10 bg-slate-950 text-white shadow-2xl",dialogHeader:"border-white/10",dialogTitle:"text-white",dialogDescription:"text-white/65",dialogBody:"text-white/85",dialogFooter:"border-white/10",dialogClose:"text-white/65 hover:bg-white/[0.08] hover:text-white",dropdownMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",dropdownLabel:"text-white/55",dropdownSeparator:"bg-white/15",dropdownItem:"text-white hover:bg-white/[0.10]",dropdownItemDescription:"text-white/55",dropdownItemShortcut:"text-white/55",tooltipContent:"border-white/15 bg-slate-950 text-white shadow-2xl",noticeDefault:"border-white/10 bg-white/[0.08] text-white",noticeMuted:"border-white/10 bg-black/20 text-white/70",dividerRoot:"border-white/15",dividerLabel:"text-white/55",sectionHeaderEyebrow:"text-white/55",sectionHeaderTitle:"text-white",sectionHeaderDescription:"text-white/65",tabsList:"border-white/10 bg-white/[0.08]",tabsTrigger:"text-white/65 hover:bg-white/[0.12] hover:text-white",tabsTriggerActive:"bg-white/[0.16] text-white shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] text-white",segmentedRoot:"border-white/10 bg-white/[0.08]",segmentedItem:"text-white/65 hover:bg-white/[0.12] hover:text-white",segmentedItemActive:"bg-white/[0.16] text-white shadow-none",progressTrack:"bg-white/[0.12]",progressLabel:"text-white",progressValue:"text-white/65",skeletonRoot:"bg-white/[0.14]",avatarRoot:"border-white/15 bg-white/[0.10] text-white",avatarFallback:"bg-white/[0.10] text-white/75",avatarText:"text-white",avatarStatus:"border-slate-950",toolbarRoot:"border-white/10 bg-white/[0.06] text-white",toolbarTitle:"text-white",toolbarDescription:"text-white/65",breadcrumbLink:"text-white/65 hover:text-white",breadcrumbCurrent:"text-white",breadcrumbSeparator:"text-white/45",paginationInfo:"text-white/65",paginationButton:"border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]",paginationPage:"bg-white/[0.14] text-white",descriptionListItem:"border-white/10 bg-white/[0.06]",descriptionListTerm:"text-white/55",descriptionListValue:"text-white",accordionItem:"border-white/10 bg-white/[0.06]",accordionTrigger:"text-white hover:bg-white/[0.08]",accordionPanel:"border-white/10 text-white/70",tableContainer:"border-foreground/10 bg-background text-foreground shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.98)] [--base-table-header-separator:hsl(var(--foreground)/0.16)]",tableRoot:"text-white",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] text-white/65",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.06)]",tableHead:"text-white/65",tableHeadLabel:"text-white",tableHeadDescription:"text-white/55",tableHeadMeta:"text-white/55",tableHeadIcon:"text-white/55",tableHeadSortIcon:"text-white/55",tableHeadDragHandle:"text-white/55 hover:bg-white/[0.08]",tableHeadResizeHandle:"after:bg-white/20 hover:after:bg-white/60",tableCell:"text-white/85",tableEmptyIcon:"bg-white/10 text-white/65",tableEmptyTitle:"text-white",tableEmptyDescription:"text-white/60",menuContent:"border-white/10 bg-slate-950 text-white shadow-2xl",menuLabel:"text-white/55",menuSeparator:"bg-white/10",menuItem:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white",menuItemDefault:"text-white",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_69%_58%))] focus:text-[hsl(var(--success,142_69%_58%))] data-[highlighted]:text-[hsl(var(--success,142_69%_58%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,53_98%_77%))] focus:text-[hsl(var(--warning-foreground,53_98%_77%))] data-[highlighted]:text-[hsl(var(--warning-foreground,53_98%_77%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-white/65 focus:text-white data-[highlighted]:text-white",menuItemShortcut:"text-white/45",menuSubTrigger:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]",menuSubTriggerIcon:"text-white/55",menuSubContent:"border-white/10 bg-slate-950 text-white shadow-2xl",tableLoadingSkeleton:"bg-white/[0.14]",layoutRoot:"border-white/10 bg-slate-950 text-white shadow-none",layoutPane:"border-white/10 bg-slate-950 text-white shadow-none",layoutPaneMuted:"bg-white/[0.06]",layoutPaneSoft:"bg-white/[0.08] shadow-none",layoutResizeHandle:"text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"}},Yi={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"lg",border:"subtle",background:"soft"},compact:{density:"compact",radius:"md",border:"subtle",background:"muted"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},glass:{density:"default",radius:"xl",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"strong",background:"plain"}},dp={soft:{buttonBase:"font-medium",panelRoot:"border-border/70",controlWrapper:"font-medium",tabsTrigger:"font-medium",segmentedItem:"font-medium",toolbarRoot:"border-border/70",tableContainer:"border-border/70",tableFooterBar:"border-border/70",tableHeadLabel:"font-semibold",menuItemLabel:"font-medium"},compact:{buttonBase:"text-xs",badgeBase:"text-xs",fieldLabel:"text-xs",controlBase:"text-xs",selectOption:"text-xs",menuItem:"text-xs",menuSubTrigger:"text-xs",noticeBase:"text-xs",sectionHeaderTitle:"text-sm",tabsTrigger:"text-xs",segmentedItem:"text-xs",toolbarTitle:"text-xs",paginationRoot:"text-xs"},"tinted-glass":{buttonPrimary:"border-primary/25 bg-primary/15 text-primary-foreground hover:bg-primary/20",badgePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",noticePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",progressIndicator:"bg-primary",avatarStatus:"border-background"},glass:{panelRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",stateRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",noticeBase:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",tabsPanel:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",toolbarRoot:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",descriptionListItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]",accordionItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]"},"hard-edge":{buttonBase:"shadow-none",panelRoot:"shadow-none",stateRoot:"shadow-none",controlWrapper:"shadow-none",selectMenu:"shadow-none",menuContent:"shadow-none",menuSubContent:"shadow-none",noticeBase:"shadow-none",tabsList:"shadow-none",tabsTriggerActive:"shadow-none",tabsPanel:"shadow-none",segmentedRoot:"shadow-none",segmentedItemActive:"shadow-none",toolbarRoot:"shadow-none",descriptionListItem:"shadow-none",accordionItem:"shadow-none"}};function up(e){return Yi[e]??Yi.default}r(up,"getPresetDefaults");var pp=Object.keys(Qi),mp=Xi(pp,T);function gp(...e){return Object.assign({},...e.filter(Boolean))}r(gp,"mergeStyles");function Zi(e){let t=e?.preset??"default",o=e?.variant??"default",n=up(t),a=e?.density??n.density??"default",i=e?.state??"idle",l=e?.radius??n.radius??"md",s=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:i,radius:l,border:s,background:c,styles:gp(rp,e?.styles),slots:mp(Qi,dp[t],ip[a],sp[l],lp[s],cp[c],e?.slots)}}r(Zi,"resolveBaseAppearance");function es({as:e="article",decoration:t,title:o,description:n,media:a,header:i,footer:l,children:s,interactive:c,selected:u,disabled:g,appearance:d,variant:m,density:b,state:v,className:S,classNames:h,style:f,...w}){let x=Zi({...d,variant:m,density:b,state:v}),C=e,I=i!==void 0?Po(i):Po(o)||Po(n),D=a!=null,P=!I&&!D;return jsxs(C,{...w,"aria-disabled":g||void 0,"data-variant":x.variant,"data-density":x.density,"data-state":v??(g?"disabled":u?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":c||void 0,"data-selected":u||void 0,"data-disabled":g||void 0,className:T(x.slots.panelRoot,c&&!g&&x.slots.panelInteractive,u&&x.slots.panelSelected,g&&x.slots.panelDisabled,h?.root,S),style:{...x.styles.panel,...f},children:[t,D?jsx("div",{"data-slot":"media",className:T(x.slots.panelMedia,h?.media),children:a}):null,I?jsx("div",{"data-slot":"header",className:T(x.slots.panelHeader,h?.header),style:x.styles.panelHeader,children:i!==void 0?i:jsxs(Fragment,{children:[Po(o)?jsx("div",{"data-slot":"title",className:T(x.slots.panelTitle,h?.title),children:o}):null,Po(n)?jsx("div",{"data-slot":"description",className:T(x.slots.panelDescription,h?.description),children:n}):null]})}):null,s!=null?jsx("div",{"data-slot":"body",className:T(x.slots.panelBody,P&&x.slots.panelBodyStandalone,h?.body),style:x.styles.panelBody,children:s}):null,l!=null?jsx("div",{"data-slot":"footer",className:T(x.slots.panelFooter,h?.footer),style:x.styles.panelFooter,children:l}):null]})}r(es,"BasePanel");var ts=r(e=>e==null?void 0:typeof e=="number"?`${e}px`:e,"cssSize"),os=r(e=>e!==void 0&&Number.isFinite(e)&&e>0?e:8,"safeSpeed"),bp=r(e=>{let[t,o=t]=e.trim().split(/\s*\/\s*|\s+/);return {rx:t,ry:o}},"radiusParts");function Gr({mode:e="solid",color:t,colors:o,width:n=1,radius:a,speed:i,direction:l="clockwise",className:s,style:c}){let g=`border-effect-${Ee.useId().replace(/:/g,"")}`,d=Ee.useRef(null),[m,b]=Ee.useState({width:0,height:0,rx:"0px",ry:"0px"});Ee.useEffect(()=>{let D=d.current;if(!D||typeof ResizeObserver>"u")return;let P=r(()=>{let j=getComputedStyle(D).borderTopLeftRadius,B=bp(j),{rx:y,ry:R}=B;b({width:D.clientWidth,height:D.clientHeight,rx:y,ry:R});},"update");P();let E=new ResizeObserver(P);E.observe(D);let V=new MutationObserver(P);for(let j=D;j;j=j.parentElement)V.observe(j,{attributes:true});return ()=>{E.disconnect(),V.disconnect();}},[a]);let v=o?.length?o:[t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))"],S=v.length===1?[v[0],v[0]]:v,h=l==="counterclockwise"?"reverse":"normal",f=(m.width||1)/2,w=(m.height||1)/2,x=l==="counterclockwise"?`360 ${f} ${w};0 ${f} ${w}`:`0 ${f} ${w};360 ${f} ${w}`,I={...{"--border-effect-width":ts(n),"--border-effect-radius":ts(a)||"inherit","--border-effect-speed":`${os(i)}s`,"--border-effect-color":t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))","--border-effect-gradient":`linear-gradient(90deg, ${S.join(", ")})`,"--border-effect-direction":h},...c};return jsxs("div",{ref:d,"aria-hidden":"true",className:`monkeys-border-effect monkeys-border-effect-${e}${s?` ${s}`:""}`,style:{...I,pointerEvents:"none"},children:[jsx("span",{className:"monkeys-border-effect-ring"}),e==="animated"&&jsxs("svg",{"aria-hidden":"true",focusable:"false",className:"monkeys-border-effect-svg",viewBox:`0 0 ${m.width||1} ${m.height||1}`,children:[jsx("defs",{children:jsxs("linearGradient",{id:g,gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:m.width||1,y2:"0",children:[S.map((D,P)=>jsx("stop",{offset:`${P/(S.length-1)*100}%`,stopColor:D},P)),jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",values:x,dur:`${os(i)}s`,repeatCount:"indefinite"})]})}),jsx("rect",{x:"0",y:"0",width:m.width,height:m.height,rx:m.rx,ry:m.ry,fill:"none",stroke:`url(#${g})`,style:{strokeWidth:"calc(var(--border-effect-width) * 2)"}})]})]})}r(Gr,"BorderEffect");var hp=r((e,t)=>Object.keys(e??{}).some(o=>o.startsWith("padding")&&e?.[o]!==void 0)||/(?:^|[\s:])!?p[xytrblse]?-(?:\[|[a-z0-9])/.test(t??""),"ownsPadding");function ns({children:e,className:t,contentClassName:o,chrome:n="panel",borderEffect:a,decoration:i,headerWrap:l=false,title:s,titleIcon:c,action:u,appearance:g,classNames:d,...m}){let{parentDepth:b,level:v,variables:S}=Wr(),h=ii(g),f=n==="panel",w=f&&a!=null,x=qi(m,f),C=hp(h?.styles?.panelBody,[d?.body,o,h?.slots?.panelBody].join(" "));return jsx(Dn,{depth:f?v:b,children:jsx(es,{as:"section",appearance:{...h,slots:{...h?.slots,panelRoot:h?.slots?.panelRoot},styles:{...h?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...h?.styles?.panelHeader},panelBody:{...!C||n==="plain"?{padding:0}:{},...h?.styles?.panelBody}}},classNames:{...d,root:T("min-h-0",f&&"gap-[var(--monkeys-bento-gap)]",f&&h?.radius===void 0&&!h?.preset&&"rounded-[var(--monkeys-bento-radius)]",f&&h?.border===void 0&&!h?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",f&&h?.background===void 0&&!h?.preset&&"bg-[var(--monkeys-bento-background)]",f&&!h?.preset&&h?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",f&&!C&&"p-[var(--monkeys-bento-padding)]",!f&&"border-0 bg-transparent shadow-none",h?.slots?.panelRoot,d?.root,t),header:T("flex min-w-0 items-center gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] border-b border-border p-0 pb-[var(--monkeys-bento-gap)]",n==="plain"&&"border-0 px-0 pt-0 pb-token-lg",d?.header),body:T("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",h?.slots?.panelBody,d?.body,o),footer:T("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",d?.footer)},header:s?jsxs("div",{style:{alignItems:h?.styles?.panelHeader?.alignItems},className:T("flex min-w-0 flex-1 items-center justify-between gap-token-md",l&&"flex-wrap"),children:[jsxs("div",{className:T("flex min-w-0 flex-1 items-center gap-token-sm",l&&"basis-auto"),children:[c?jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsx(c,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxs("div",{className:"min-w-0",children:[jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:s}),m.description?jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:m.description}):null]})]}),u?jsx("div",{className:T("shrink-0",l&&"max-w-full"),children:u}):null]}):void 0,...m,...x,decoration:jsxs(Fragment,{children:[i,w?jsx(Gr,{...a}):null]}),"data-monkeys-bento-level":f?v:void 0,style:{...f?S:{},...m.style,...w?{borderColor:"transparent"}:{}},children:e})})}r(ns,"BentoPanel");var rs=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),as=globalThis,wp=as[rs]??(as[rs]=Ee.createContext(null)),nt=r(()=>Ee.useContext(wp),"useDialogDock");var qr=Ee.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:i,...l},s)=>{let c=nt(),u=Ee.useId(),g=Ee.useRef(null),d=Ee.useRef(false);return Ee.useEffect(()=>{d.current&&!c?.collapsed&&c?.activeId===u&&g.current?.focus(),d.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,u]),Ee.useEffect(()=>c?.register(u),[c?.register,u]),c?.container?jsx(Ue.Portal,{container:c.container,children:jsx("div",{style:{display:"contents"},children:jsx(Io,{children:jsx(ns,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===u?void 0:"none"},children:jsxs(Ue.Content,{...l,ref:s,"data-monkeys-dialog-content":true,"data-presentation":"docked","data-title-visible":c.showTitle,"data-collapsible":c.collapsible,className:T("monkeys-dialog-dock-content",t),style:o,onInteractOutside:m=>{i?.(m),m.preventDefault();},children:[e,c.collapsible&&jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsx(PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxs(Ue.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsx(X,{"aria-hidden":"true",className:"size-4"}),jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});qr.displayName="DockedDialogContent";var Rp=Ee.forwardRef(({className:e,style:t,...o},n)=>jsx(_t.Item,{ref:n,className:T("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Rp.displayName="AccordionItem";var Np=Ee.forwardRef(({className:e,children:t,...o},n)=>jsx(_t.Header,{className:"flex",children:jsxs(_t.Trigger,{ref:n,className:T("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Np.displayName="AccordionTrigger";var Pp=Ee.forwardRef(({className:e,children:t,...o},n)=>jsx(_t.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsx("div",{className:T("pb-4 pt-0",e),children:t})}));Pp.displayName="AccordionContent";var Mp=Ee.forwardRef(({className:e,...t},o)=>jsx(Fn.Root,{ref:o,className:T("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsx(Fn.Indicator,{className:"flex items-center justify-center text-current",children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}));Mp.displayName="Checkbox";var Yo=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Lo=Ee.forwardRef(({className:e,variant:t,size:o,asChild:n=false,unstyled:a=false,...i},l)=>jsx(n?Slot:"button",{ref:l,className:a?e:Yo({variant:t,size:o,className:e}),...i}));Lo.displayName="Button";var Ip=Ee.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:i=true,scrollbarOrientation:l="vertical",scrollBarDisabled:s=false,type:c,...u},g)=>{let d=Mo();return jsxs(Lt.Root,{ref:g,type:c??(d>0?"auto":void 0),className:T("group relative overflow-hidden",s&&"no-scrollbar",e),...u,children:[jsx(Lt.Viewport,{ref:n,onScroll:a,className:T("h-full w-full rounded-[inherit]",o),children:t}),i?jsx(ss,{orientation:l,className:T(s&&"size-0 p-0")}):null,jsx(Lt.Corner,{})]})});Ip.displayName="ScrollArea";var ss=Ee.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsx(Lt.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:T("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsx(Lt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ss.displayName="ScrollBar";var Ap=Ee.forwardRef(({className:e,...t},o)=>jsx(On.Root,{ref:o,className:T("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsx(On.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));Ap.displayName="Switch";var Bp=Ee.forwardRef(({variant:e="default",...t},o)=>jsx(Qt.Root,{ref:o,"data-variant":e,...t}));Bp.displayName="Tabs";var Lp=Ee.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsx(Qt.List,{ref:a,className:T("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));Lp.displayName="TabsList";var Ep=Ee.forwardRef(({className:e,...t},o)=>jsx(Qt.Trigger,{ref:o,className:T("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ep.displayName="TabsTrigger";var Dp=Ee.forwardRef(({className:e,...t},o)=>{let n=Mo();return jsx(Qt.Content,{ref:o,className:T("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});Dp.displayName="TabsContent";var Up=Ee.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=ct();return jsx(mo.Portal,{children:jsx(mo.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:T("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",zt("menu"),e)})})});Up.displayName="TooltipContent";var cs=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),ds=globalThis,us=ds[cs]??(ds[cs]=Ee.createContext(false));function ps({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let i=nt(),[l,s]=Ee.useState(t??false),c=e??l;return jsx(us.Provider,{value:c,children:jsx(Ue.Root,{...a,open:c,modal:i?false:n,onOpenChange:u=>{s(u),o?.(u);}})})}r(ps,"Dialog");var _p=Ue.Portal;var ms=Ee.forwardRef(({className:e,...t},o)=>{let n=ct();return jsx(Ue.Overlay,{...n,...t,ref:o,className:T("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});ms.displayName="DialogOverlay";var gs=Ee.forwardRef(({className:e,...t},o)=>{let n=ct();return jsx(Ue.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});gs.displayName="DialogSurfaceContent";var Qo=Ee.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:i,...l},s)=>{let c=nt(),u=Ee.useContext(us);return c?u?jsx(qr,{...l,ref:s,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxs(_p,{children:[jsx(ms,{className:a,style:i}),jsxs(gs,{...l,ref:s,className:T("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",zt("dialog"),e),children:[jsx(Io,{children:t}),o?jsxs(Ue.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsx(X,{"aria-hidden":"true",className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:n})]}):null]})]})});Qo.displayName="DialogContent";var Fp=Ee.forwardRef(({className:e,...t},o)=>jsx(Qo,{ref:o,className:T("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));Fp.displayName="DialogContentNoAnimation";var Op=r(({className:e,...t})=>jsx("div",{className:T(nt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");Op.displayName="DialogHeader";var Xr=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");Xr.displayName="DialogFooter";var Kr=Ee.forwardRef(({className:e,...t},o)=>jsx(Ue.Title,{ref:o,className:T("text-lg font-semibold leading-none tracking-tight",e,nt()?.showTitle===false&&"sr-only"),...t}));Kr.displayName="DialogTitle";var Yr=Ee.forwardRef(({className:e,...t},o)=>jsx(Ue.Description,{ref:o,className:T("text-sm text-muted-foreground",e),...t}));Yr.displayName="DialogDescription";Ee.forwardRef((e,t)=>{let o=nt()?Ue.Trigger:He.Trigger;return jsx(o,{...e,ref:t})});var $p=He.Portal,fs=Ee.forwardRef(({className:e,style:t,...o},n)=>{let a=ct();return jsx(He.Overlay,{...a,...o,ref:n,className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});fs.displayName="AlertDialogOverlay";var Hp=Ee.forwardRef(({className:e,style:t,children:o,...n},a)=>{let i=ct();return nt()?jsx(Qo,{...n,...i,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxs($p,{children:[jsx(fs,{}),jsx(He.Content,{...i,...n,ref:a,className:T("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",zt("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsx(Io,{children:o})})]})});Hp.displayName="AlertDialogContent";var Wp=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),Vp=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),jp=Ee.forwardRef(({className:e,...t},o)=>{let n=nt()?Ue.Title:He.Title;return jsx(n,{ref:o,className:T("text-lg font-semibold",e,nt()?.showTitle===false&&"sr-only"),...t})}),Gp=Ee.forwardRef(({className:e,...t},o)=>{let n=nt()?Ue.Description:He.Description;return jsx(n,{ref:o,className:T("text-sm text-muted-foreground",e),...t})}),qp=Ee.forwardRef(({className:e,...t},o)=>{let n=nt()?Ue.Close:He.Action;return jsx(n,{ref:o,className:T(Yo(),e),...t})}),Xp=Ee.forwardRef(({className:e,...t},o)=>{let n=nt()?Ue.Close:He.Action;return jsx(n,{ref:o,className:T(Yo({variant:"destructive"}),e),...t})}),Kp=Ee.forwardRef(({className:e,...t},o)=>{let n=nt()?Ue.Close:He.Cancel;return jsx(n,{ref:o,className:T(Yo({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});Wp.displayName="AlertDialogHeader";Vp.displayName="AlertDialogFooter";jp.displayName="AlertDialogTitle";Gp.displayName="AlertDialogDescription";qp.displayName="AlertDialogAction";Xp.displayName="AlertDialogDangerAction";Kp.displayName="AlertDialogCancel";var Jo=Ee.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,type:n,...a},i)=>jsx("input",{ref:i,type:n,className:o?e:T("flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"h-9 rounded-md py-1 text-sm shadow-sm":"h-10 rounded-md py-2 text-sm shadow-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...a}));Jo.displayName="Input";var Yp=Ee.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,...n},a)=>jsx("textarea",{ref:a,className:o?e:T("flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"min-h-[60px] rounded-md text-sm shadow-sm":"min-h-[80px] rounded-md text-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...n}));Yp.displayName="Textarea";var Qp=Ee.forwardRef((e,t)=>jsx("select",{ref:t,...e}));Qp.displayName="NativeSelect";var Zp=Ee.forwardRef((e,t)=>jsx("option",{ref:t,...e}));Zp.displayName="NativeOption";var um=[],Eo={expandedWidth:224,duration:280,copyDuration:180,copyOffset:8,easing:"cubic-bezier(0.16, 1, 0.3, 1)"},Do={duration:180,closedWidth:28,easing:"cubic-bezier(0.16, 1, 0.3, 1)"};function vs({children:e}){return jsx(Xe,{rowSelector:"[data-row]",highlightClassName:"sidebar-glide-highlight rounded-[7px] bg-hover-2",className:"group/glide flex flex-col gap-px",children:e})}r(vs,"GlideGroup");function ys({icon:e,label:t,active:o=false,count:n,onClick:a}){return jsxs("button",{"data-row":true,type:"button",onClick:a,className:`sidebar-row relative z-10 mx-2 flex h-8 items-center rounded-[var(--bui-radius-control)] px-2 text-left
201
+ hover:text-ink active:scale-[0.96]`,children:jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d})})},m))})]}),jsxs("div",{className:"transition-[opacity,filter] duration-250",style:{opacity:1,filter:"blur(0)"},children:[jsx("p",{className:"mt-1.5 text-[12.5px] leading-relaxed text-ink-2",children:u}),jsx("div",{className:"mt-2",children:c.kind==="compare"?jsx(Su,{series:c.series}):c.kind==="anomaly"?jsx(Tu,{data:c.anomaly,title:c.title}):jsx(Nu,{segments:c.segments,title:c.title,description:c.description})}),jsx("button",{className:`mt-2 rounded-[var(--bui-radius-pill)] bg-surface px-3 py-1.5 text-left text-[12px] text-ink
202
+ shadow-btn transition-colors duration-100 hover:bg-hover`,children:g})]})]})})}r(Iu,"BUIInsightCards");var Au={title:"Recommendation",alternatives:"Alternatives",otherOptions:"Other options",accepted:"Accepted"},Bu=[];function zi({signal:e,tone:t}){return jsx("span",{className:"flex items-end gap-0.5",children:[0,1,2].map(o=>jsx("span",{className:"w-1 rounded-full transition-colors duration-300",style:{height:10,background:o<e?t:"var(--bui-line-strong)"}},o))})}r(zi,"Meter");function Lu({options:e=Bu,labels:t,accepted:o=false,onAccept:n}){let a=ye(Au,t),[i,l]=useState(0),[s,c]=useState(false),u=e[i]??e[0],g=e.map((d,m)=>({o:d,i:m})).filter(({i:d})=>d!==i);return e.length?jsx(A,{children:jsxs("div",{className:"w-full max-w-95 overflow-hidden rounded-card bg-surface shadow-card",children:[jsxs("div",{className:"primitive-card-pad",children:[jsx("span",{className:"text-[14px] font-medium text-ink",children:a.title}),jsx("p",{className:"mt-1.5 min-h-12 text-[13px] leading-relaxed text-ink-2",style:{animation:"bui-fade-in 180ms ease-out both"},children:u.body},u.key)]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:s?"1fr":"0fr",opacity:s?1:0,transitionTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"border-t border-line bg-surface px-2 py-2",children:[jsx("p",{className:"px-1.5 pb-1 text-[11px] font-medium text-ink-3",children:a.otherOptions}),g.map(({o:d,i:m})=>jsxs("button",{type:"button",onClick:()=>{l(m);},className:`flex w-full items-center gap-2.5 rounded-control px-1.5 py-1.5
203
+ text-left transition-colors duration-100 hover:bg-hover`,children:[jsx(zi,{signal:d.signal,tone:d.tone}),jsx("span",{className:"min-w-0 flex-1 truncate text-[12.5px] text-ink",children:d.short}),jsx("span",{className:"shrink-0 text-[11px] text-ink-3",children:d.label})]},d.key))]})})}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between gap-3 bg-surface",children:[jsxs("span",{className:"flex items-center gap-2",children:[jsx(zi,{signal:u.signal,tone:u.tone}),jsx("span",{className:"text-[12.5px] font-medium text-ink-2",children:u.label})]}),jsxs("span",{className:"-mr-0.5 flex items-center gap-2",children:[jsx(Ce,{variant:"secondary",size:"sm","aria-expanded":s,onClick:()=>c(d=>!d),className:"px-2.5 text-[12.5px]",children:a.alternatives}),jsx(Ce,{variant:o?"success":u.ctaVariant,size:"sm",onClick:()=>n?.(u.key??String(i)),className:"text-[12.5px]",children:o?a.accepted:u.cta})]})]})]})}):null}r(Lu,"BUIRecommendationCard");var Vr={company:270,categories:275,last:190,strength:210,links:175,ai:240},Un={strong:{label:"Very strong",color:"var(--bui-green)",rank:3},weak:{label:"Weak",color:"var(--bui-orange)",rank:2},veryweak:{label:"Very weak",color:"var(--bui-red)",rank:1},none:{label:"No communication",color:"var(--bui-ink-3)",rank:0}};var Du=[];function be({children:e,size:t=14,strokeWidth:o=1.8}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e})}r(be,"Icon");var zt={Text:jsx("path",{d:"M4 6h16M4 12h10M4 18h7"}),File:jsxs("g",{children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]}),Collection:jsxs("g",{children:[jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),jsx("path",{d:"M4 5v14c0 1.66 3.58 3 8 3s8-1.34 8-3V5M4 12c0 1.66 3.58 3 8 3s8-1.34 8-3"})]}),"Single select":jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"m8.5 12 2.4 2.4 4.6-4.9"})]}),"Multi select":jsxs("g",{children:[jsx("path",{d:"M11 6h9M11 12h9M11 18h9"}),jsx("path",{d:"M4 6l1.5 1.5L8 5M4 12l1.5 1.5L8 11M4 18l1.5 1.5L8 17"})]}),URL:jsxs("g",{children:[jsx("path",{d:"M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1"}),jsx("path",{d:"M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1"})]}),Reference:jsx("path",{d:"M7 17 17 7M9 7h8v8"}),JSON:jsxs("g",{children:[jsx("path",{d:"M8 4c-2 0-2 2-2 3s.5 3-2 3c2.5 0 2 2 2 3s0 3 2 3"}),jsx("path",{d:"M16 4c2 0 2 2 2 3s-.5 3 2 3c-2.5 0-2 2-2 3s0 3-2 3"})]}),"File splitter":jsxs("g",{children:[jsx("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"}),jsx("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"})]}),Date:jsxs("g",{children:[jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2.5"}),jsx("path",{d:"M8 3v4M16 3v4M3 10h18"})]})},jr={model:jsx("path",{d:"M12 3l1.7 5.1a2 2 0 0 0 1.2 1.2L20 11l-5.1 1.7a2 2 0 0 0-1.2 1.2L12 19l-1.7-5.1a2 2 0 0 0-1.2-1.2L4 11l5.1-1.7a2 2 0 0 0 1.2-1.2z"}),web:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M3 12h18M12 3a13.5 13.5 0 0 1 3.5 9 13.5 13.5 0 0 1-3.5 9 13.5 13.5 0 0 1-3.5-9A13.5 13.5 0 0 1 12 3z"})]}),user:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"8",r:"4"}),jsx("path",{d:"M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1"})]})};var _i=["Text","File","Collection","Single select","Multi select","URL","Reference","JSON","File splitter"];function Oi({checked:e,mixed:t=false,onChange:o,label:n}){return jsxs("label",{className:"records-checkbox",title:n,onClick:a=>a.stopPropagation(),children:[jsx("input",{type:"checkbox",checked:e,onChange:o,"aria-label":n}),jsx("span",{className:`records-checkbox-box ${e||t?"is-active":""}`,children:t?jsx("span",{className:"records-checkbox-dash"}):e?jsx(be,{size:12,children:jsx("path",{d:"m5 12 4 4L19 6"})}):null})]})}r(Oi,"Checkbox");function Fi({name:e,colors:t}){let o=t[e]??{base:"var(--bui-ink-3)"};return jsx("span",{className:"records-tag",style:{"--bui-tag-base":o.base},children:e})}r(Fi,"Tag");function Uu({tags:e,colors:t}){let o=q(),n=useRef(null),a=useRef(null),[i,l]=useState(e.length);useLayoutEffect(()=>{let c=n.current,u=a.current;if(!c||!u)return;let g=r(()=>{let m=c.clientWidth,b=Array.from(u.querySelectorAll("[data-tag-measure]"),f=>f.offsetWidth),v=u.querySelector("[data-more-measure]")?.offsetWidth??0,S=0,h=0;for(let f=0;f<b.length;f+=1){let w=S+(h>0?4:0)+b[f],x=e.length-(f+1);if(w+(x>0?4+v:0)>m)break;S=w,h+=1;}l(h);},"update");g();let d=new ResizeObserver(g);return d.observe(c),()=>d.disconnect()},[e]);let s=e.length-i;return jsxs("div",{ref:n,className:"records-tags",title:e.join(", "),"aria-label":o("Categories: {categories}",{categories:e.join(", ")}),children:[jsxs("div",{ref:a,className:"records-tags-measure","aria-hidden":true,children:[e.map(c=>jsx("span",{"data-tag-measure":true,children:jsx(Fi,{name:c,colors:t})},c)),jsxs("span",{"data-more-measure":true,className:"records-more-tag",children:["+",e.length]})]}),e.slice(0,i).map(c=>jsx(Fi,{name:c,colors:t},c)),s>0&&jsxs("span",{className:"records-more-tag",children:["+",s]})]})}r(Uu,"TagList");function Qo(){let e=q();return jsxs("span",{className:"records-calc",children:[jsx("span",{className:"records-muted",children:e("Calculating\u2026")}),jsx("span",{className:"records-pulse"})]})}r(Qo,"CalcCell");function zn({on:e,onToggle:t,label:o}){return jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":o,onClick:t,className:"relative h-4.5 w-7.5 shrink-0 rounded-[var(--bui-radius-pill)] transition-colors duration-150",style:{background:e?"var(--bui-accent)":"var(--bui-line-strong)"},children:jsx("span",{className:"absolute top-0.5 left-0.5 size-3.5 rounded-full bg-white shadow-btn transition-transform duration-150",style:{transform:e?"translateX(12px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"}})})}r(zn,"MiniSwitch");function _n({label:e,icon:t,sortKey:o,sort:n,onSort:a,onResizeStart:i,resizing:l=false,className:s="",selected:c=false,onPick:u}){let g=q();return jsxs("th",{className:`records-header-cell ${c?"is-colsel":""} ${s}`,children:[jsxs("button",{type:"button",className:"records-header-button",onClick:u,children:[jsx("span",{className:"records-header-icon",children:t}),jsx("span",{className:"truncate",children:e}),o&&jsx("span",{role:"button",tabIndex:0,"aria-label":g("Sort by {label}",{label:e}),onClick:d=>{d.stopPropagation(),a(o);},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),a(o));},className:`records-sort ${n.key===o?"is-visible":""}`,style:{transform:n.key===o&&n.dir===-1?"rotate(180deg)":void 0},children:jsx(be,{size:12,children:jsx("path",{d:"M12 5v14M5 12l7 7 7-7"})})})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":g("Resize {label} column",{label:e}),className:`records-resize-handle ${l?"is-resizing":""}`,onPointerDown:i})]})}r(_n,"HeaderCell");function go({label:e,children:t}){return jsxs("div",{className:"relative flex h-8 items-center justify-between",children:[jsx("span",{className:"text-[13px] text-ink-3",children:e}),t]})}r(go,"ConfigRow");function $i({label:e,options:t,selected:o,onSelect:n}){return jsxs("div",{role:"menu","aria-label":e,className:"absolute left-full top-0 z-30 ml-5 w-[210px] rounded-[12px] bg-surface p-1.5 shadow-overlay",style:{animation:"bui-pop-in 140ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-0.5 text-[11.5px] font-medium text-ink-3",children:e}),jsx(Ke,{className:"flex flex-col gap-px",children:t.map(a=>jsxs("button",{"data-menu-row":true,type:"button",role:"menuitemradio","aria-checked":o===a.label,onClick:()=>n(a.label),className:"relative z-10 flex h-8 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] font-medium text-ink",children:[jsx("span",{className:"flex size-4 shrink-0 items-center justify-center text-ink-2",children:a.icon}),jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),jsx("span",{className:o===a.label?"text-ink":"invisible",children:jsx(be,{size:14,strokeWidth:2.2,children:jsx("path",{d:"m5 12 4 4L19 6"})})})]},a.label))})]})}r($i,"ConfigPicker");function zu({options:e,selected:t,onToggle:o}){let n=q();return jsxs("div",{role:"menu","aria-label":n("Calculation inputs"),className:"absolute left-full top-0 z-30 ml-5 w-[220px] rounded-[12px] bg-surface p-1.5 shadow-overlay",style:{animation:"bui-pop-in 140ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-0.5 text-[11.5px] font-medium text-ink-3",children:n("Use values from")}),jsx(Ke,{className:"flex flex-col gap-px",children:e.map(a=>{let i=t.includes(a);return jsxs("button",{"data-menu-row":true,type:"button",role:"menuitemcheckbox","aria-checked":i,onClick:()=>o(a),className:"relative z-10 flex h-8 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] font-medium text-ink",children:[jsx("span",{className:`flex size-4 shrink-0 items-center justify-center rounded-[5px] border ${i?"border-accent bg-accent text-white":"border-line-strong text-transparent"}`,children:jsx(be,{size:11,strokeWidth:2.4,children:jsx("path",{d:"m5 12 4 4L19 6"})})}),jsx("span",{className:"min-w-0 flex-1 truncate",children:a})]},a)})})]})}r(zu,"InputPicker");function _u({rows:e=Du,fill:t=false,tagColors:o={},columnMeta:n={},models:a=[],inputs:i=[],resultLabel:l="Result",results:s={},calculation:c=null,onRun:u,onSelectionChange:g}){let d=q(),[m,b]=useState(new Set),[v,S]=useState({key:"name",dir:1}),[h,f]=useState(Vr),[w,x]=useState(100),[C,I]=useState(false),[D,P]=useState(null),E=useRef(null),V=useRef(null),j=useRef(null);useEffect(()=>()=>j.current?.(),[]);let[B,y]=useState(null),R=useRef({}),[W,J]=useState(false),[G,Z]=useState(false),[de,le]=useState(null),[_,ae]=useState({}),[X,me]=useState({}),[Pe,N]=useState(new Set),[L,Y]=useState(false),[K,Me]=useState({required:false,allowEmpty:true,confidence:false}),[oe,se]=useState(null),[Ie,H]=useState(null),[ue,Ve]=useState(false),Ut=Object.keys(s).length>0,[wo,ko]=useState(false),xt=useRef(null),Pt=useRef(false);useLayoutEffect(()=>{if(C||!V.current)return;let k=Array.from(V.current.querySelectorAll("thead th"));if(k.length<6)return;let F={company:k[0].getBoundingClientRect().width,categories:k[1].getBoundingClientRect().width,last:k[2].getBoundingClientRect().width,strength:k[3].getBoundingClientRect().width,links:k[4].getBoundingClientRect().width,ai:Vr.ai};E.current=F,f(F),x(k[k.length-1].getBoundingClientRect().width),I(true);},[C]);let Mt=useMemo(()=>[...e].sort((k,F)=>(v.key==="name"?k.name.localeCompare(F.name):v.key==="last"?k.last.localeCompare(F.last):Un[k.strength].rank-Un[F.strength].rank)*v.dir),[e,v]);useEffect(()=>{if(!wo||!xt.current)return;let k=xt.current.closest(".records-scroll");k&&(Pt.current=true,k.scrollLeft=k.scrollWidth);let F=xt.current.getBoundingClientRect();y({col:l,x:Math.min(F.left,window.innerWidth-336),y:F.bottom+6}),ko(false);},[wo,ue]),useEffect(()=>{if(!B&&!oe&&!Ie)return;let k=r(F=>{F.target.closest("[data-recpop]")||(y(null),le(null),Z(false),Y(false),se(null),H(null));},"close");return document.addEventListener("pointerdown",k),()=>document.removeEventListener("pointerdown",k)},[B,oe,Ie]);let z=r(k=>F=>{let Ae=F.currentTarget.closest("th");Ae&&(se(null),H(null),le(null),Z(false),Y(false),y(gt=>{if(gt?.col===k)return null;let Oe=Ae.getBoundingClientRect();return {col:k,x:Math.min(Oe.left,window.innerWidth-336),y:Oe.bottom+6}}));},"openProp"),qe=r((k,F)=>!!c&&c.col===k&&F>=c.resolved,"isCalc"),Ht=Mt.length>0&&Mt.every(k=>m.has(k.id)),ar=!Ht&&Mt.some(k=>m.has(k.id)),So=r(k=>S(F=>F.key===k?{key:k,dir:F.dir*-1}:{key:k,dir:1}),"toggleSort"),Wt=r((k,F=120)=>Ae=>{Ae.preventDefault(),Ae.stopPropagation(),y(null),le(null),Z(false),Y(false),se(null),H(null),j.current?.();let gt=Ae.clientX,Oe=h[k],vt=document.body.style.cursor,so=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none",P(k);let yt=r(sn=>{let ir=Math.max(F,Oe+sn.clientX-gt);f(sr=>({...sr,[k]:ir}));},"move"),Vt=r(()=>{window.removeEventListener("pointermove",yt),window.removeEventListener("pointerup",Vt),window.removeEventListener("pointercancel",Vt),document.body.style.cursor=vt,document.body.style.userSelect=so,j.current=null,P(null);},"finish");j.current=Vt,window.addEventListener("pointermove",yt),window.addEventListener("pointerup",Vt),window.addEventListener("pointercancel",Vt);},"startColumnResize"),ao=r(k=>{b(k),g?.([...k]);},"commitSelection"),an=r(k=>{let F=new Set(m);F.has(k)?F.delete(k):F.add(k),ao(F);},"toggleRow"),io=r(()=>{let k=new Set(m);Ht?Mt.forEach(F=>k.delete(F.id)):Mt.forEach(F=>k.add(F.id)),ao(k);},"toggleAll"),Re=B?{...n[B.col]??{type:"Text",tool:"Manual",toolKind:"user"},..._[B.col]}:null,It=B&&Re?X[B.col]??(Re.inputs?[Re.inputs]:[]):[],Ho=h.company+h.categories+h.last+h.strength+h.links+(ue?h.ai:0)+w;return jsx(A,{children:jsxs("div",{className:`records-shell${t?" is-fill":""}`,children:[jsx("div",{className:"records-scroll",tabIndex:0,"aria-label":d("Companies table. Scroll horizontally and vertically to view all columns and records."),onScroll:()=>{if(Pt.current){Pt.current=false;return}y(null),le(null),Z(false),Y(false),se(null),H(null);},children:jsxs("table",{ref:V,className:"records-table",style:{width:C?Ho:"100%",minWidth:Ho},children:[jsxs("colgroup",{children:[jsx("col",{className:"records-company-col",style:{width:h.company}}),jsx("col",{className:"records-category-col",style:{width:h.categories}}),jsx("col",{className:"records-last-col",style:{width:h.last}}),jsx("col",{className:"records-strength-col",style:{width:h.strength}}),jsx("col",{className:"records-link-col",style:{width:h.links}}),ue&&jsx("col",{style:{width:h.ai}}),jsx("col",{style:{width:100}})]}),jsx("thead",{children:jsxs("tr",{children:[jsxs("th",{className:`records-header-cell records-sticky-cell ${B?.col==="Company"?"is-colsel":""}`,children:[jsxs("div",{className:"records-company-header",style:{cursor:"pointer"},onClick:k=>z("Company")(k),children:[jsx(Oi,{checked:Ht,mixed:ar,onChange:io,label:d("Select all companies")}),jsx("span",{children:d("Company")})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":d("Resize Company column"),className:`records-resize-handle ${D==="company"?"is-resizing":""}`,onPointerDown:Wt("company",180)})]}),jsx(_n,{label:d("Categories"),selected:B?.col==="Categories",onPick:z("Categories"),sort:v,onSort:So,onResizeStart:Wt("categories"),resizing:D==="categories",icon:jsx(be,{size:15,children:zt["Multi select"]})}),jsx(_n,{label:d("Last interaction"),selected:B?.col==="Last interaction",onPick:z("Last interaction"),sortKey:"last",sort:v,onSort:So,onResizeStart:Wt("last"),resizing:D==="last",icon:jsx(be,{size:15,children:zt.Date})}),jsx(_n,{label:d("Connection strength"),selected:B?.col==="Connection strength",onPick:z("Connection strength"),sortKey:"strength",sort:v,onSort:So,onResizeStart:Wt("strength"),resizing:D==="strength",icon:jsx(be,{size:15,children:zt["Single select"]})}),jsx(_n,{label:d("Links"),selected:B?.col==="Links",onPick:z("Links"),sort:v,onSort:So,onResizeStart:Wt("links"),resizing:D==="links",icon:jsx(be,{size:15,children:zt.URL})}),ue&&jsxs("th",{ref:xt,className:`records-header-cell ${B?.col===l?"is-colsel":""}`,children:[jsxs("button",{type:"button",className:"records-header-button",onClick:z(l),children:[jsx("span",{className:"records-header-icon",children:jsx(be,{size:15,children:zt.Text})}),jsx("span",{className:"truncate",children:l})]}),jsx("span",{role:"separator","aria-orientation":"vertical","aria-label":d("Resize {label} column",{label:l}),className:`records-resize-handle ${D==="ai"?"is-resizing":""}`,onPointerDown:Wt("ai")})]}),jsx("th",{className:"records-header-cell",children:jsxs("div",{className:"flex h-[35px] items-center gap-1 px-2",children:[jsx("button",{type:"button","aria-label":d("New property"),"data-recpop":true,onClick:k=>{y(null),H(null);let F=k.currentTarget.getBoundingClientRect();se(Ae=>Ae?null:{x:Math.min(F.left,window.innerWidth-276),y:F.bottom+6});},className:"flex size-7 items-center justify-center rounded-[var(--bui-radius-scale-7)] text-ink-2 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(be,{size:15,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),jsx("button",{type:"button","aria-label":d("Table options"),"aria-expanded":!!Ie,"data-recpop":true,onClick:k=>{y(null),se(null);let F=k.currentTarget.getBoundingClientRect();H(Ae=>Ae?null:{x:Math.max(8,Math.min(F.right-220,window.innerWidth-228)),y:F.bottom+6});},className:"flex size-7 items-center justify-center rounded-[var(--bui-radius-scale-7)] text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:[jsx("circle",{cx:"5",cy:"12",r:"1.6"}),jsx("circle",{cx:"12",cy:"12",r:"1.6"}),jsx("circle",{cx:"19",cy:"12",r:"1.6"})]})})]})})]})}),jsx("tbody",{"data-sound-silent":true,children:Mt.map((k,F)=>{let Ae=m.has(k.id),gt=Un[k.strength];return jsxs("tr",{className:`records-row ${Ae?"is-selected":""}`,children:[jsxs("td",{className:`records-cell records-sticky-cell records-company-cell ${B?.col==="Company"?"is-colsel":""}`,children:[jsx("span",{className:"records-rownum",children:F+1}),jsx(Oi,{checked:Ae,onChange:()=>an(k.id),label:d("Select {name}",{name:k.name})}),jsx("span",{className:"records-company-mark",children:k.name.slice(0,1).toUpperCase()}),jsx("a",{href:k.website?`https://${k.website}`:"#",onClick:Oe=>!k.website&&Oe.preventDefault(),title:k.name,className:`records-company-name ${k.website?"has-link":""}`,children:k.name})]}),jsx("td",{className:`records-cell ${B?.col==="Categories"?"is-colsel":""}`,children:qe("Categories",F)?jsx(Qo,{}):jsx(Uu,{tags:k.tags,colors:o})}),jsx("td",{className:`records-cell ${k.last==="No contact"?"records-muted":""} ${B?.col==="Last interaction"?"is-colsel":""}`,children:qe("Last interaction",F)?jsx(Qo,{}):k.last}),jsx("td",{className:`records-cell ${B?.col==="Connection strength"?"is-colsel":""}`,children:qe("Connection strength",F)?jsx(Qo,{}):jsxs("span",{className:"records-strength",children:[jsx("span",{className:"records-strength-dot",style:{background:gt.color}}),d(gt.label)]})}),jsx("td",{className:`records-cell ${B?.col==="Links"?"is-colsel":""}`,children:qe("Links",F)?jsx(Qo,{}):k.website?jsxs("a",{className:"records-link",href:`https://${k.website}`,title:k.website,target:"_blank",rel:"noreferrer",children:[jsx("span",{className:"records-link-label",children:k.website}),jsx(be,{size:12,children:jsx("path",{d:"M14 5h5v5M19 5l-8 8"})})]}):jsx("span",{className:"records-muted",children:"\u2014"})}),ue&&jsx("td",{className:`records-cell ${B?.col===l?"is-colsel":""}`,children:c?.col===l?F<c.resolved?s[k.id]??"\u2014":jsx(Qo,{}):Ut?s[k.id]??"\u2014":jsx("span",{className:"records-muted",children:"\u2014"})}),jsx("td",{className:"records-cell"})]},k.id)})}),jsx("tfoot",{children:jsxs("tr",{className:"records-calculation-row",children:[jsx("td",{className:"records-cell records-sticky-cell",children:jsxs("span",{className:"records-footer-value records-calculation-label",children:[jsx("span",{className:"records-calculation-number",children:e.length})," ",d("count")]})}),jsx("td",{className:"records-cell",children:jsxs("button",{type:"button",className:"records-add-calculation",onClick:z("Categories"),children:[jsx(be,{size:15,children:jsx("path",{d:"M12 5v14M5 12h14"})}),d("Add calculation")]})}),jsx("td",{className:"records-cell records-muted",children:jsx("span",{className:"records-footer-value",children:"\u2014"})}),jsx("td",{className:"records-cell",children:jsxs("span",{className:"records-footer-value records-average",children:[jsx("span",{className:"records-strength-dot",style:{background:"var(--bui-orange)"}}),Math.round(e.reduce((k,F)=>k+Un[F.strength].rank,0)/Math.max(1,e.length)/3*100),d("% average")]})}),jsx("td",{className:"records-cell",children:jsxs("span",{className:"records-footer-value records-muted",children:[e.filter(k=>k.website).length," ",d("links")]})}),ue&&jsx("td",{className:"records-cell records-muted",children:jsx("span",{className:"records-footer-value",children:Ut?`${e.length} filled`:"\u2014"})}),jsx("td",{className:"records-cell"})]})})]})}),B&&Re&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[320px] rounded-[14px] bg-surface px-3 pt-3 pb-1.5 shadow-overlay",style:{top:B.y,left:B.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"pb-2 text-[13.5px] font-medium text-ink",children:d(B.col)}),jsxs(go,{label:d("Type"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="type",onClick:()=>le(k=>k==="type"?null:"type"),className:"flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] font-medium text-ink transition-colors duration-100 hover:bg-hover",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:14,children:zt[Re.type]??zt.Text})}),Re.type,jsx("span",{className:"text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="type"&&jsx($i,{label:d("Property type"),selected:Re.type,options:_i.map(k=>({label:k,icon:jsx(be,{size:15,children:zt[k]})})),onSelect:k=>{ae(F=>({...F,[B.col]:{...F[B.col],type:k}})),le(null);}})]}),jsxs(go,{label:d("Tool"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="tool",onClick:()=>le(k=>k==="tool"?null:"tool"),className:"flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] font-medium text-ink transition-colors duration-100 hover:bg-hover",children:[jsx("span",{className:Re.toolKind==="model"?"text-accent":"text-ink-2",children:Re.toolKind==="model"?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:jr.model}):jsx(be,{size:14,children:jr[Re.toolKind]})}),Re.tool,jsx("span",{className:"text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="tool"&&jsx($i,{label:d("Model"),selected:Re.tool,options:a.map(k=>({label:k,icon:jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true,children:jr.model})})),onSelect:k=>{ae(F=>({...F,[B.col]:{...F[B.col],tool:k,toolKind:"model"}})),le(null);}})]}),jsxs(go,{label:d("Grounding"),children:[jsxs("span",{className:"flex items-center gap-2",children:[jsx(zn,{label:d("Grounding"),on:W,onToggle:()=>J(k=>!k)}),jsx("button",{type:"button","aria-label":d("About grounding"),"aria-expanded":G,onClick:()=>Z(k=>!k),className:"flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(be,{size:13,children:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 8h.01M11 12h1v4h1"})]})})})]}),G&&jsx("div",{className:"absolute right-0 top-[30px] z-30 w-[230px] rounded-[10px] px-3 py-2.5 text-[12px] leading-relaxed shadow-overlay",style:{color:"var(--bui-tooltip-fg)",background:"var(--bui-tooltip-bg)"},role:"status",children:d("Grounding lets the model verify generated values against connected sources.")})]}),jsxs(go,{label:d("Inputs"),children:[jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":de==="inputs",onClick:()=>le(k=>k==="inputs"?null:"inputs"),className:"flex max-w-[220px] items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1.5 py-1 text-[13px] text-ink-2 transition-colors duration-100 hover:bg-hover hover:text-ink",children:[It.length?jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[It.slice(0,2).map(k=>jsx("span",{className:"max-w-[92px] truncate rounded-[5px] bg-accent-tint px-1.5 py-0.5 text-[12px] font-medium text-accent-ink",children:k},k)),It.length>2&&jsxs("span",{className:"text-[11px] font-medium text-ink-3",children:["+",It.length-2]})]}):jsx("span",{children:d("Select inputs")}),jsx("span",{className:"shrink-0 text-ink-3",children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),de==="inputs"&&jsx(zu,{selected:It,options:i.filter(k=>k!==B.col),onToggle:k=>{me(F=>{let Ae=F[B.col]??(Re.inputs?[Re.inputs]:[]),gt=Ae.includes(k)?Ae.filter(Oe=>Oe!==k):[...Ae,k];return {...F,[B.col]:gt}});}})]}),jsx("div",{contentEditable:true,onInput:k=>{R.current[B.col]=k.currentTarget.textContent??"";},suppressContentEditableWarning:true,role:"textbox","aria-label":d("{column} calculation prompt",{column:B.col}),"aria-multiline":"true",spellCheck:true,className:"mt-2 min-h-[88px] cursor-text rounded-[10px] bg-inset p-3 text-[13px] leading-relaxed shadow-hairline outline-none transition-[box-shadow] duration-150 focus:shadow-[0_0_0_2px_var(--bui-accent)]",children:Re.prompt?jsxs("span",{className:"text-ink",children:[Re.prompt.before,Re.prompt.chip&&jsx("span",{contentEditable:false,className:"rounded-[5px] bg-accent-tint px-1.5 py-0.5 text-[12px] font-medium text-accent-ink",children:Re.prompt.chip}),Re.prompt.after]}):jsx("span",{className:"text-ink-3",children:d("Set a prompt (press @ to mention an input)")})}),jsxs("button",{type:"button",disabled:!!c,onClick:()=>{u?.(B.col,{...Re,selectedInputs:It,promptText:R.current[B.col]??[Re.prompt?.before,Re.prompt?.chip,Re.prompt?.after].filter(Boolean).join(" "),grounding:W,...K}),y(null);},className:"mt-2.5 flex h-9 w-full items-center justify-center gap-2 rounded-[var(--bui-radius-scale-9)] text-[12.5px] font-medium text-ink shadow-btn transition-[background-color,transform] duration-150 hover:bg-hover active:scale-[0.98] disabled:opacity-60",children:[jsx(be,{size:14,strokeWidth:1.9,children:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"})}),d("Go calculate")]}),jsxs(Ke,{className:"mt-3 flex flex-col gap-0.5 border-t border-line pt-2",highlightClassName:"-inset-x-1.5 rounded-[8px] bg-hover",children:[jsxs("button",{"data-menu-row":true,type:"button","aria-pressed":Pe.has(B.col),onClick:()=>N(k=>{let F=new Set(k);return F.has(B.col)?F.delete(B.col):F.add(B.col),F}),className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:Pe.has(B.col)?"text-accent":"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M12 17v5M8 3h8l-1 7 3 3H6l3-3-1-7z"})})}),Pe.has(B.col)?d("Unpin"):d("Pin")]}),jsxs("button",{"data-menu-row":true,type:"button","aria-expanded":L,onClick:()=>Y(k=>!k),className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:L?"text-ink":"text-ink-2",children:jsx(be,{size:15,children:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"12",r:"3"}),jsx("path",{d:"M12 2v3M12 19v3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M2 12h3M19 12h3M4.9 19.1 7 17M17 7l2.1-2.1"})]})})}),jsx("span",{className:"flex-1",children:d("More settings")}),jsx("span",{className:`text-ink-3 transition-transform duration-150 ${L?"rotate-90":""}`,children:jsx(be,{size:12,strokeWidth:2.2,children:jsx("path",{d:"M9 6l6 6-6 6"})})})]}),B.col===l&&jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{Ve(false),y(null);},className:"relative z-10 -mx-1.5 flex h-8 items-center gap-2.5 rounded-[var(--bui-radius-control)] px-1.5 text-left text-[13px] leading-none text-ink transition-transform duration-150 active:scale-[0.96]",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsxs("g",{children:[jsx("path",{d:"M10.6 5.1A9.8 9.8 0 0 1 12 5c7 0 10 7 10 7a16.3 16.3 0 0 1-2.1 3M6.6 6.6A16 16 0 0 0 2 12s3 7 10 7a9.7 9.7 0 0 0 5.4-1.6M3 3l18 18"}),jsx("path",{d:"M9.9 9.9a3 3 0 0 0 4.2 4.2"})]})})}),d("Hide from view")]})]}),L&&jsxs("div",{className:"mt-2 border-t border-line pt-2",style:{animation:"bui-fade-up 160ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("div",{className:"pb-1 text-[11.5px] font-medium text-ink-3",children:d("Behavior")}),jsx(go,{label:d("Required value"),children:jsx(zn,{label:d("Required value"),on:K.required,onToggle:()=>Me(k=>({...k,required:!k.required}))})}),jsx(go,{label:d("Allow empty results"),children:jsx(zn,{label:d("Allow empty results"),on:K.allowEmpty,onToggle:()=>Me(k=>({...k,allowEmpty:!k.allowEmpty}))})}),jsx(go,{label:d("Show confidence"),children:jsx(zn,{label:d("Show confidence"),on:K.confidence,onToggle:()=>Me(k=>({...k,confidence:!k.confidence}))})})]})]}),oe&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[260px] rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:oe.y,left:oe.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:[jsx("div",{className:"px-2 pb-1 pt-1 text-[12px] font-medium text-ink-3",children:d("New property")}),jsx(Ke,{className:"flex flex-col gap-px",children:_i.map(k=>jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{se(null),Ve(true),ko(true);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:zt[k]})}),k]},k))})]}),Ie&&jsxs("div",{"data-recpop":true,className:"fixed z-50 w-[220px] rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:Ie.y,left:Ie.x,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top right"},children:[jsx("div",{className:"px-2 pb-1 pt-1 text-[12px] font-medium text-ink-3",children:d("Table options")}),jsxs(Ke,{className:"flex flex-col gap-px",children:[jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{let k=Ie;H(null),se({x:Math.min(k.x,window.innerWidth-276),y:k.y});},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,strokeWidth:2,children:jsx("path",{d:"M12 5v14M5 12h14"})})}),d("Add property")]}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{f({company:220,categories:220,last:155,strength:180,links:160,ai:200}),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M4 8h16M7 4 3 8l4 4M17 4l4 4-4 4M4 16h16"})})}),d("Compact columns")]}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{f({...E.current??Vr}),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7M3 4v6h6"})})}),d("Reset column widths")]}),jsx("div",{className:"my-1 h-px bg-line"}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{ao(new Set),H(null);},className:"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[var(--bui-radius-control)] px-2 text-left text-[13px] text-ink",children:[jsx("span",{className:"text-ink-2",children:jsx(be,{size:15,children:jsx("path",{d:"M5 5l14 14M19 5 5 19"})})}),d("Clear selection")]})]})]})]})})}r(_u,"BUIRecordsTable");var Fu=[],$u={placeholder:"Search\u2026",ariaLabel:"Search",emptyTitle:"No results found",emptyHint:"Adjust your search to try again"};function Hu({items:e=Fu,labels:t,onSelect:o}){let n=q(),a=ye($u,t),[i,l]=useState(""),s=i?e.filter(u=>u.toLowerCase().includes(i.toLowerCase())):e.slice(0,5),c=i.length>0&&s.length===0;return jsx(A,{children:jsx("div",{className:"flex min-h-[248px] w-full max-w-72 flex-col items-stretch",children:jsxs("div",{className:"w-full self-start overflow-hidden rounded-card bg-surface shadow-raised",children:[jsxs("div",{className:"flex h-10 items-center gap-2 border-b border-line px-3 transition-colors duration-100 hover:bg-hover",children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("input",{value:i,onChange:u=>l(u.target.value),placeholder:a.placeholder,"aria-label":a.ariaLabel,className:"min-w-0 flex-1 bg-transparent text-[13px] text-ink outline-none placeholder:text-ink-3"}),i&&jsx("button",{"aria-label":n("Clear search"),type:"button",onClick:()=>l(""),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink-3
204
+ transition-colors duration-100 hover:bg-line/70 hover:text-ink`,style:{animation:"bui-fade-in 150ms ease-out both"},children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),c?jsxs("div",{className:"flex flex-col items-center justify-center gap-1 px-4 py-8",style:{animation:"bui-fade-in 250ms ease-out both"},children:[jsx("span",{className:"mb-1.5 flex size-8 items-center justify-center rounded-control bg-inset text-ink-3 shadow-hairline",children:jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]})}),jsx("span",{className:"text-[13px] font-medium text-ink",children:a.emptyTitle}),jsx("span",{className:"text-[12px] text-ink-3",children:a.emptyHint})]}):jsx("div",{className:"p-1",children:jsx(Ke,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[6px] bg-hover",children:s.map(u=>jsx("button",{"data-menu-row":true,type:"button",onClick:()=>{l(u),o?.(u);},className:"relative z-10 flex h-8 w-full items-center rounded-[var(--bui-radius-chip)] px-2 text-left text-[13px] text-ink",style:{animation:"bui-fade-in 200ms ease-out both"},children:u},u))})})]})})})}r(Hu,"BUISearchList");var ep={lead:"",original:"",rewrite:""},tp={keep:"Keep",discard:"Discard",placeholder:"Describe edits"},_t={width:14,height:14,strokeWidth:1.8,"aria-hidden":true},Et={explain:jsx(ChatBubbleQuestion,{..._t}),improve:jsx(Spark,{..._t}),shorten:jsx(Scissor,{..._t}),tone:jsx(EmojiSatisfied,{..._t}),grammar:jsx(TextBox,{..._t}),send:jsx(ArrowUp,{width:"16",height:"16",strokeWidth:"2.4","aria-hidden":"true"}),chevron:jsx(NavArrowRight,{..._t}),check:jsx(Check,{..._t}),close:jsx(Xmark,{..._t}),retry:jsx(Refresh,{..._t})},op="inline-flex h-7 shrink-0 items-center gap-1 rounded-full bg-ink px-2.5 text-[12.5px] font-normal text-canvas shadow-hairline transition-[opacity,transform] duration-150 hover:opacity-90 active:scale-[0.96]",np={primary:[{id:"Explain",icon:Et.explain},{id:"Improve",icon:Et.improve,action:"Improve",busyLabel:"Improving"}],more:[{id:"Shorten",icon:Et.shorten,action:"Shorten",busyLabel:"Shortening"},{id:"Tone",icon:Et.tone,action:"Change tone",busyLabel:"Changing tone"},{id:"Grammar",icon:Et.grammar,action:"Fix grammar"}]};function rp({text:e,actions:t=np,labels:o,onAction:n,status:a="idle",onStatusChange:i}){let l=q(),s={...ep,...e},c=ye(tp,o),[u,g]=useState(false),d=a,m=r(N=>i?.(N),"setMode"),[b,v]=useState("Improve"),[S,h]=useState(""),[f,w]=useState(null),[x,C]=useState(false),[I,D]=useState({x:0,y:0}),[P,E]=useState(false),V=useRef(null),j=useRef(null),B=useRef(null),y=useRef(null),R=useRef(null),W=useRef("idle"),J=useRef(0),G=useRef(null);useEffect(()=>{let N=window.setTimeout(()=>g(true),280);return ()=>window.clearTimeout(N)},[]);let Z=useCallback(()=>{R.current!==null&&cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{let N=V.current,L=j.current;if(!N||!L)return;let Y=L.getBoundingClientRect(),Me=Array.from(L.getClientRects()).at(-1);if(!Me)return;let oe=N.getBoundingClientRect(),se={x:Math.round(Y.left-oe.left+Y.width/2),y:Math.round(Me.bottom-oe.top+8)};D(Ie=>Ie.x===se.x&&Ie.y===se.y?Ie:se),E(true);});},[]);useLayoutEffect(()=>{Z();},[d,Z]),useEffect(()=>{let N=V.current;if(!N)return;let L=new ResizeObserver(Z);return L.observe(N),window.addEventListener("resize",Z),()=>{L.disconnect(),window.removeEventListener("resize",Z),R.current!==null&&cancelAnimationFrame(R.current);}},[Z]),useLayoutEffect(()=>{let N=B.current,L=y.current;if(!N||!L)return;let Y=Math.ceil(L.getBoundingClientRect().width)+8,K=J.current||Math.ceil(N.getBoundingClientRect().width);if(W.current!==d&&Math.abs(Y-K)>1){G.current?.cancel();let Me=N.animate([{width:`${K}px`},{width:`${Y}px`}],{duration:320,easing:"cubic-bezier(0.23,1,0.32,1)"});G.current=Me,Me.onfinish=()=>{J.current=Y,G.current=null;};}else J.current=Y;W.current=d;},[d]),useEffect(()=>{let N=y.current;if(!N)return;let L=new ResizeObserver(()=>{G.current?.playState!=="running"&&(J.current=Math.ceil(N.getBoundingClientRect().width)+8);});return L.observe(N),()=>{L.disconnect(),G.current?.cancel();}},[]);let de=r(N=>{v(N),C(false),m("thinking"),n?.(N);},"run"),le=r(()=>{C(false),h(""),w(null),v("Improve"),m("idle");},"reset"),_=d==="thinking"||d==="streaming",ae=u&&P,X=S.trim().length>0,me={};for(let N of [...t.primary,...t.more])N.action&&N.busyLabel&&(me[N.action]=N.busyLabel);let Pe=me[b]??"Editing";return jsx(A,{children:jsx("div",{className:"w-full max-w-[460px]",children:jsxs("div",{ref:V,className:"relative select-none pb-12",children:[jsxs("p",{className:"text-[13px] leading-relaxed text-ink",children:[s.lead,jsx("span",{ref:j,className:"box-decoration-clone rounded-[3px] bg-[color-mix(in_srgb,var(--bui-accent)_14%,var(--bui-surface))] text-ink dark:bg-accent-tint",children:d==="idle"||d==="thinking"?s.original:d==="streaming"?jsx(br,{text:s.rewrite,onProgress:Z,onDone:()=>m("result")}):s.rewrite})]}),jsx("div",{className:"absolute top-0 left-0 z-10",style:{transform:`translate3d(${I.x}px, ${I.y}px, 0) translateX(-50%)`,transition:"transform 320ms cubic-bezier(0.77,0,0.175,1), opacity 180ms ease-out",opacity:ae?1:0,pointerEvents:ae?"auto":"none",willChange:"transform"},children:jsx("div",{ref:B,className:"flex h-9 w-fit max-w-[calc(100vw-48px)] items-center justify-center gap-0.5 overflow-hidden rounded-full bg-surface p-1 font-sans font-normal text-ink shadow-overlay",style:{width:d==="idle"&&X&&f?f:void 0,...ae?{animation:"bui-pop-in 220ms cubic-bezier(0.23,1,0.32,1) both"}:{}},children:jsxs("div",{ref:y,className:"flex w-fit shrink-0 items-center justify-center gap-0.5",style:{width:d==="idle"&&X&&f?f-8:void 0},children:[_&&jsxs("span",{className:"inline-flex h-7 items-center gap-1.5 whitespace-nowrap px-2.5 text-[12.5px] font-normal text-ink-2",children:[jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}}),d==="thinking"?jsxs(gr,{className:"text-[12.5px] font-normal",children:[Pe,"\u2026"]}):jsxs("span",{children:[Pe,"\u2026"]})]}),d==="result"&&jsxs(Fragment,{children:[jsxs("button",{type:"button",onClick:le,className:op,children:[Et.check,c.keep]}),jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:le,children:[Et.close,c.discard]}),jsx("span",{className:"mx-0.5 h-4 w-px shrink-0 bg-line"}),jsx("button",{type:"button","aria-label":l("Try again"),onClick:()=>de(b),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover-2 hover:text-ink-2 active:scale-[0.96]",children:Et.retry})]}),d==="idle"&&jsxs(Fragment,{children:[jsx("div",{className:"flex min-w-0 items-center overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:x?0:X&&f?f-40:145,opacity:x?0:1,transform:x?"translateX(-8px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:jsx("form",{className:"flex h-7 shrink-0 items-center transition-[width] duration-400",style:{width:X&&f?f-40:145,transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},onSubmit:N=>{N.preventDefault(),de(S.trim()||"Improve");},children:jsx("input",{value:S,onChange:N=>{let L=N.target.value;!S.trim()&&L.trim()?w(Math.ceil(B.current?.getBoundingClientRect().width??0)):L.trim()||w(null),h(L);},"aria-label":c.placeholder,placeholder:c.placeholder,className:"h-7 w-full bg-transparent pr-2.5 pl-3 text-[12.5px] text-ink placeholder:text-ink-3"})})}),jsxs("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:X?0:x?462:224,opacity:X?0:1,transform:X?"translateX(-8px)":"translateX(0)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:[!x&&jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-line-strong"}),t.primary.map(N=>jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:N.action?()=>de(N.action):void 0,children:[N.icon,N.id]},N.id)),jsx("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden transition-[max-width,opacity,margin] duration-400",style:{maxWidth:x?262:0,opacity:x?1:0,marginLeft:x?2:0,transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:t.more.map(N=>jsxs(Ce,{type:"button",variant:"quiet",size:"xs",className:"shrink-0",onClick:N.action?()=>de(N.action):void 0,children:[N.icon,N.id]},N.id))}),jsx("span",{className:"mx-0.5 h-4 w-px shrink-0 bg-line"}),jsx("button",{type:"button","aria-label":l(x?"Show fewer actions":"Show more actions"),"aria-expanded":x,onClick:()=>C(N=>!N),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] text-ink transition-[background-color,transform] duration-200 hover:bg-hover active:scale-[0.96]",children:jsx("span",{className:"flex transition-transform duration-400",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:Et.chevron})})]}),jsx("div",{className:"flex min-w-0 items-center overflow-hidden transition-[max-width,opacity,transform] duration-400",style:{maxWidth:X?30:0,opacity:X?1:0,transform:X?"scale(1)":"scale(0.88)",transitionTimingFunction:"cubic-bezier(0.23,1,0.32,1)"},children:jsx("button",{type:"button","aria-label":l("Send edit instruction"),onClick:()=>de(S.trim()),className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--bui-radius-pill)] bg-ink text-surface transition-[opacity,transform] duration-200 active:scale-[0.94]",children:Et.send})})]})]})})})]})})})}r(rp,"BUISelectionActions");function T(...e){return twMerge(e.filter(Boolean).join(" "))}r(T,"cn");function Lo(e){return e!=null&&typeof e!="boolean"}r(Lo,"hasRenderableNode");var ip={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function Ot(e,t={}){return ["monkeys-overlay-surface",ip[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(Ot,"getOverlaySurfaceClassName");var Jo="relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",qr=`z-50 min-w-[8rem] overflow-hidden border p-1 ${Ot("menu")} data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,qi=ke.Root,Ki=ke.Trigger;var dp=Ee.forwardRef(({className:e,inset:t,children:o,...n},a)=>jsxs(ke.SubTrigger,{ref:a,className:T(Jo,"data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[o,jsx(ChevronRight,{"aria-hidden":"true",className:"ml-auto"})]}));dp.displayName="DropdownMenuSubTrigger";var up=Ee.forwardRef(({className:e,...t},o)=>{let n=ut();return jsx(ke.SubContent,{...n,...t,ref:o,"data-monkeys-component":"dropdown-menu","data-slot":"content","data-surface":"menu",className:T(qr,e)})});up.displayName="DropdownMenuSubContent";var Kr=Ee.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=ut();return jsx(ke.Portal,{children:jsx(ke.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"dropdown-menu","data-slot":"content","data-surface":"menu",className:T(qr,e)})})});Kr.displayName="DropdownMenuContent";var On=Ee.forwardRef(({className:e,inset:t,...o},n)=>jsx(ke.Item,{ref:n,className:T(Jo,t&&"pl-8",e),...o}));On.displayName="DropdownMenuItem";var pp=Ee.forwardRef(({className:e,children:t,checked:o,...n},a)=>jsxs(ke.CheckboxItem,{ref:a,className:T(Jo,"pl-8",e),checked:o,...n,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(ke.ItemIndicator,{children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}),t]}));pp.displayName="DropdownMenuCheckboxItem";var mp=Ee.forwardRef(({className:e,children:t,...o},n)=>jsxs(ke.RadioItem,{ref:n,className:T(Jo,"pl-8",e),...o,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(ke.ItemIndicator,{children:jsx(Circle,{"aria-hidden":"true",className:"h-2 w-2 fill-current"})})}),t]}));mp.displayName="DropdownMenuRadioItem";var gp=Ee.forwardRef(({className:e,inset:t,...o},n)=>jsx(ke.Label,{ref:n,className:T("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));gp.displayName="DropdownMenuLabel";var fp=Ee.forwardRef(({className:e,...t},o)=>jsx(ke.Separator,{ref:o,className:T("-mx-1 my-1 h-px bg-muted",e),...t}));fp.displayName="DropdownMenuSeparator";var bp=r(({className:e,...t})=>jsx("span",{className:T("ml-auto text-xs tracking-widest opacity-60",e),...t}),"DropdownMenuShortcut");bp.displayName="DropdownMenuShortcut";var hp=Ee.forwardRef(({className:e,children:t,iconClassName:o,size:n="default",...a},i)=>jsxs(we.Trigger,{ref:i,className:T("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm text-foreground shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left",n==="sm"&&"h-8 px-2 py-1 text-xs",e),...a,children:[t,jsx(we.Icon,{asChild:true,children:jsx(ChevronDown,{"aria-hidden":"true",className:T("h-4 w-4 opacity-50",o)})})]}));hp.displayName="SelectTrigger";var Xi=Ee.forwardRef(({className:e,...t},o)=>jsx(we.ScrollUpButton,{ref:o,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronUp,{"aria-hidden":"true",className:"h-4 w-4"})}));Xi.displayName="SelectScrollUpButton";var Yi=Ee.forwardRef(({className:e,...t},o)=>jsx(we.ScrollDownButton,{ref:o,className:T("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4"})}));Yi.displayName="SelectScrollDownButton";var xp=Ee.forwardRef(({className:e,children:t,position:o="popper",viewportClassName:n,disableTriggerViewportSizing:a=false,...i},l)=>{let s=ut();return jsx(we.Portal,{children:jsxs(we.Content,{...s,...i,ref:l,position:o,"data-monkeys-component":"select","data-slot":"content","data-surface":"menu",className:T(qr,"relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),children:[jsx(Xi,{}),jsx(we.Viewport,{className:T("p-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)]",o==="popper"&&!a&&"h-[var(--radix-select-trigger-height)]",n),children:t}),jsx(Yi,{})]})})});xp.displayName="SelectContent";var vp=Ee.forwardRef(({className:e,...t},o)=>jsx(we.Label,{ref:o,className:T("px-2 py-1.5 text-sm font-semibold",e),...t}));vp.displayName="SelectLabel";var yp=Ee.forwardRef(({className:e,children:t,indicatorClassName:o,itemText:n,hideIndicator:a=false,...i},l)=>jsxs(we.Item,{ref:l,className:T(Jo,"w-full",a?"px-2":"pl-8 pr-2",e),...i,children:[a?null:jsx("span",{className:T("absolute left-2 flex h-3.5 w-3.5 items-center justify-center",o),children:jsx(we.ItemIndicator,{children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}),n?jsxs(Fragment,{children:[jsx(we.ItemText,{asChild:true,children:jsx("span",{className:"sr-only",children:n})}),t]}):jsx(we.ItemText,{children:t})]}));yp.displayName="SelectItem";var wp=Ee.forwardRef(({className:e,...t},o)=>jsx(we.Separator,{ref:o,className:T("-mx-1 my-1 h-px bg-muted",e),...t}));wp.displayName="SelectSeparator";var Qi=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Zi=globalThis,Ji=Zi[Qi]??(Zi[Qi]=createContext(0));function Eo(){return useContext(Ji)}r(Eo,"useBentoDepth");function Fn({children:e,depth:t}){return jsx(Ji.Provider,{value:t,children:e})}r(Fn,"BentoDepthProvider");function Do({children:e}){return jsx(Fn,{depth:0,children:e})}r(Do,"BentoScope");function Xr(){let e=Eo(),t=e+1,o=ui(gi(),t),n=Object.fromEntries(vn.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(Xr,"useBentoSurface");var Yr="[data-monkeys-bento-level]",$n="data-monkeys-scrollbar-active",Np='[data-monkeys-scrollbar], [data-monkeys-scroll-viewport], [data-radix-scroll-area-viewport], .monkeys-scrollbar, .monkeys-ui-scroll-viewport, .monkeys-ui-description, .monkeys-ui-page-main, .monkeys-ui-dialog, .monkeys-ui-menu, .monkeys-ui-select-content, [style*="overflow"][style*="auto"], [style*="overflow"][style*="scroll"], .overflow-auto, .overflow-x-auto, .overflow-y-auto, .overflow-scroll, .overflow-x-scroll, .overflow-y-scroll';function ts(e,t){if(!(!(t instanceof Element)||!e.contains(t)||t.closest(Yr)!==e))for(let o=t;o;o=o.parentElement){if(o instanceof HTMLElement){let n=o.matches("[data-monkeys-scrollbar]")?o.parentElement?.querySelector(":scope > [data-radix-scroll-area-viewport]"):o.querySelector(":scope > [data-radix-scroll-area-viewport]");if(n?.closest(Yr)===e)return n;if(o.matches(Np)){let a=getComputedStyle(o);if(/(auto|scroll|overlay)/.test(`${a.overflowX} ${a.overflowY}`))return o}}if(o===e)break}}r(ts,"viewportAt");function os(e,t=true){let o=useRef(),n=r(()=>{let i=o.current;i?.observer?.disconnect(),i?.marked.forEach(l=>l.removeAttribute($n)),o.current=void 0;},"clear");useEffect(()=>n,[t]);let a=r((i,l)=>{if(!t||!i.isConnected||!i.matches(Yr))return;o.current?.root!==i&&(n(),o.current={root:i,marked:new Set});let s=o.current;l!==void 0&&(s.pointerTarget=l);let c=i.ownerDocument.activeElement,u=ts(i,s.pointerTarget),g=c?.matches(":focus-visible")?ts(i,c):void 0;if(!u&&!g){s.observer?.disconnect(),s.observer=void 0,s.marked.forEach(m=>m.removeAttribute($n)),s.marked.clear();return}let d=new Set;for(let m of [u,g])m&&(d.add(m),m.matches("[data-radix-scroll-area-viewport]")&&m.parentElement?.querySelectorAll(":scope > [data-monkeys-scrollbar]").forEach(b=>d.add(b)));s.marked.forEach(m=>{d.has(m)||m.removeAttribute($n);}),d.forEach(m=>{s.marked.has(m)||m.setAttribute($n,"");}),s.marked=d,s.observer||(s.observer=new MutationObserver(()=>a(i)),s.observer.observe(i,{childList:true,subtree:true}));},"update");return {onPointerEnter(i){a(i.currentTarget,i.target),e.onPointerEnter?.(i);},onPointerLeave(i){a(i.currentTarget,null),e.onPointerLeave?.(i);},onPointerOver(i){a(i.currentTarget,i.target),e.onPointerOver?.(i);},onPointerOut(i){a(i.currentTarget,i.relatedTarget),e.onPointerOut?.(i);},onFocusCapture(i){a(i.currentTarget),e.onFocusCapture?.(i);},onBlurCapture(i){let l=i.currentTarget;queueMicrotask(()=>a(l)),e.onBlurCapture?.(i);}}}r(os,"useBentoScrollbarVisibility");function ns(e,t){let o=new WeakMap,n=new Map,a=1;return (...i)=>{let l=i.slice(0,-1),s=i[i.length-1],c=l.map(d=>{if(!d)return 0;let m=o.get(d);return m===void 0&&(m=a++,o.set(d,m)),m}).join(":"),u=n.get(c);if(!u){let d={};for(let m of e)d[m]=t(...l.map(b=>b?.[m]));u=Object.freeze(d),n.size>=64&&n.delete(n.keys().next().value),n.set(c,u);}let g={...u};if(s)for(let d of e){let m=s[d];m&&(g[d]=t(...l.map(b=>b?.[d]),m));}return g}}r(ns,"createStaticSlotMerger");var Pp={},_e="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Ct="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",Hn="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",rs=T("[scrollbar-width:thin]","[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]","[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent","[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0","[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0","[&::-webkit-scrollbar-corner]:bg-transparent","[&::-webkit-scrollbar-track]:bg-transparent","[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]","[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40","hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55"),Mp=T("[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]","[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]","[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]"),is={buttonBase:T("group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-hidden","cursor-pointer disabled:!cursor-not-allowed",Ct),buttonDefault:"border-border bg-background text-foreground hover:bg-accent/60",buttonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",buttonSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))] hover:bg-[hsl(var(--success,142_72%_29%)_/_0.15)]",buttonWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))] hover:bg-[hsl(var(--warning,45_93%_47%)_/_0.15)]",buttonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",buttonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",buttonActive:"border-primary/35 bg-primary/10 text-primary",buttonDisabled:"!cursor-not-allowed opacity-60",buttonIconOnly:"w-9 px-0",buttonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",buttonLabel:"min-w-0 truncate",badgeBase:T("inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium",_e),badgeDefault:"border-border/60 bg-background text-foreground",badgePrimary:"border-primary/30 bg-primary/10 text-primary",badgeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))]",badgeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",badgeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",badgeMuted:"border-border/60 bg-muted text-muted-foreground",badgeIcon:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",badgeLabel:"min-w-0 truncate",textRoot:"min-w-0 break-words leading-6",textSizeXs:"text-xs",textSizeSm:"text-sm",textSizeMd:"text-base",textSizeLg:"text-lg",textSizeXl:"text-xl",typographyToneDefault:"text-foreground",typographyToneMuted:"text-muted-foreground",typographyTonePrimary:"text-primary",typographyToneSuccess:"text-emerald-700 dark:text-emerald-400",typographyToneWarning:"text-amber-700 dark:text-amber-400",typographyToneDanger:"text-destructive-text",typographyToneInherit:"text-inherit",headingRoot:"min-w-0 break-words font-semibold tracking-tight",headingSizeXs:"text-sm leading-5",headingSizeSm:"text-base leading-6",headingSizeMd:"text-lg leading-7",headingSizeLg:"text-xl leading-7",headingSizeXl:"text-2xl leading-8",headingSize2xl:"text-3xl leading-9",linkRoot:"inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",codeInline:"rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground",codeBlock:"m-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground",codeContent:"font-mono text-sm leading-6",kbdRoot:"inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]",listRoot:"m-0 min-w-0 list-outside break-words ps-5 text-foreground",listSpacingCompact:"[&>li+li]:mt-1",listSpacingDefault:"[&>li+li]:mt-2",listSpacingRelaxed:"[&>li+li]:mt-3",listMarkerNone:"list-none ps-0",listMarkerDisc:"list-disc",listMarkerCircle:"list-[circle]",listMarkerSquare:"list-[square]",listMarkerDecimal:"list-decimal",listMarkerLowerAlpha:"list-[lower-alpha]",listMarkerUpperAlpha:"list-[upper-alpha]",listItem:"min-w-0 ps-1 leading-6 marker:text-muted-foreground",stackRoot:"flex min-w-0 flex-col",inlineRoot:"flex min-w-0 flex-row",gridRoot:"grid min-w-0",containerRoot:"mx-auto w-full min-w-0",aspectRatioRoot:"relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full",spinnerRoot:"inline-flex shrink-0 items-center justify-center text-current align-middle",spinnerIndicator:"h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none",visuallyHiddenRoot:"sr-only",visuallyHiddenFocusable:"focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-hidden focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring",fieldsetRoot:"min-w-0 border-0 p-0 text-foreground",fieldsetLegend:"min-w-0 text-sm font-semibold leading-6 text-foreground",fieldsetDescription:"mt-1 text-sm leading-5 text-muted-foreground",fieldsetError:"mt-1 text-sm leading-5 text-destructive-text",fieldsetContent:"mt-3 grid min-w-0 gap-3",stepsRoot:"m-0 min-w-0 list-none p-0 text-foreground",stepsHorizontal:"flex w-full max-w-full items-start overflow-x-auto pb-2",stepsVertical:"grid",stepsItem:"relative min-w-0",stepsItemHorizontal:"flex min-w-52 flex-1 items-start",stepsItemVertical:"pb-6 last:pb-0",stepsTrigger:"flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit",stepsTriggerInteractive:"cursor-pointer hover:bg-accent/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",stepsTriggerDisabled:"!cursor-not-allowed opacity-60",stepsIndicator:"relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",stepsIndicatorPending:"border-border bg-background text-muted-foreground",stepsIndicatorCurrent:"border-primary/50 bg-primary/10 text-primary",stepsIndicatorCompleted:"border-primary bg-primary text-primary-foreground",stepsIndicatorError:"border-destructive bg-destructive text-destructive-foreground",stepsContent:"grid min-w-0 gap-1 pt-0.5",stepsLabel:"min-w-0 break-words text-sm font-medium leading-5",stepsDescription:"min-w-0 break-words text-sm leading-5 text-muted-foreground",stepsStatus:"sr-only",stepsConnector:"shrink-0 bg-border",stepsConnectorHorizontal:"mt-3.5 h-px w-8",stepsConnectorVertical:"absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2",stepsConnectorCompleted:"bg-primary/60",stepsConnectorError:"bg-destructive/60",scrollAreaViewport:"min-h-0 min-w-0",numberInputControl:"tabular-nums",numberInputStepControls:"me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border",numberInputStepButton:"flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",passwordInputControl:"pe-2",passwordInputToggle:"me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",inputGroupRoot:T("relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30",_e),inputGroupInvalid:"border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25",inputGroupDisabled:"!cursor-not-allowed bg-muted/35",inputGroupContent:"flex min-w-0 flex-1 items-stretch [&>*]:min-w-0",inputGroupStartElement:"inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75",inputGroupEndElement:"inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75",inputGroupStartAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",inputGroupEndAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",panelRoot:T("group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background",Ct),panelInteractive:"cursor-pointer hover:shadow-md",panelSelected:"border-primary/45 bg-primary/5",panelDisabled:"!cursor-not-allowed opacity-60",panelMedia:"shrink-0 overflow-hidden",panelHeader:"min-w-0 p-token-lg",panelTitle:"min-w-0 truncate text-sm font-semibold leading-none text-foreground",panelDescription:"mt-1 text-sm leading-5 text-foreground/75",panelBody:"min-w-0 px-token-lg pb-token-lg text-sm text-foreground",panelBodyStandalone:"pt-token-lg",panelFooter:"shrink-0 border-t border-border/60 px-token-lg py-token-md",stateRoot:T("flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center",_e),stateIcon:"mb-token-lg flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in",stateTitle:"text-sm font-semibold text-foreground",stateDescription:"mt-2 max-w-md text-sm leading-6 text-muted-foreground",stateActions:"mt-token-xl flex flex-wrap items-center justify-center gap-token-sm",loadingSpinner:"h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none",fieldRoot:"grid min-w-0 gap-token-md",fieldLabelRow:"flex min-w-0 items-center justify-between gap-token-md",fieldLabel:"min-w-0 text-sm font-medium leading-none text-foreground",fieldRequired:"text-destructive-text",fieldDescription:"text-sm leading-5 text-muted-foreground",fieldMessage:"text-sm leading-5 text-muted-foreground",fieldControl:"min-w-0",controlWrapper:T("relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35",_e),controlBase:"min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-hidden placeholder:text-muted-foreground disabled:!cursor-not-allowed",controlInput:"h-9",controlTextarea:"min-h-24 resize-y py-2 leading-6",controlSelect:"h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed",controlIcon:"pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",controlTrailing:"mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground",controlInvalid:"border-destructive/45 focus-within:border-destructive/60",controlDisabled:"!cursor-not-allowed opacity-60",controlReadOnly:"bg-muted/35",selectChevron:T("pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground",Hn),selectMenu:"absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden",selectOption:T("flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground",Ct),selectOptionActive:"bg-accent text-accent-foreground",selectOptionSelected:"bg-primary/10 text-primary",selectOptionDisabled:"!cursor-not-allowed opacity-50",selectPlaceholder:"text-muted-foreground",selectNative:"sr-only",switchRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",switchInput:"sr-only",switchTrack:T("relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35",_e),switchThumb:T("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",Hn),switchChecked:"border-primary/40 bg-primary/80 text-primary-foreground",switchDisabled:"!cursor-not-allowed opacity-60",switchContent:"grid min-w-0 gap-1",switchLabel:"text-sm font-medium leading-none text-foreground",switchDescription:"text-sm leading-5 text-muted-foreground",checkboxRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",checkboxInput:"sr-only",checkboxBox:T("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40",_e),checkboxBoxChecked:"border-primary/45 bg-primary text-primary-foreground",checkboxBoxInvalid:"border-destructive/50",checkboxIndicator:"text-xs font-bold leading-none",checkboxDisabled:"!cursor-not-allowed opacity-60",checkboxContent:"grid min-w-0 gap-1",checkboxLabel:"text-sm font-medium leading-none text-foreground",checkboxDescription:"text-sm leading-5 text-muted-foreground",radioGroupRoot:"grid min-w-0 gap-2",radioOption:T("inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm",Ct,"hover:bg-muted/35"),radioInput:"sr-only",radioMarker:T("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40",_e),radioMarkerChecked:"border-primary/50 bg-primary/10",radioIndicator:"h-2 w-2 rounded-full bg-primary",radioOptionDisabled:"!cursor-not-allowed opacity-60 hover:bg-background",radioContent:"grid min-w-0 gap-1",radioLabel:"text-sm font-medium leading-none text-foreground",radioDescription:"text-sm leading-5 text-muted-foreground",dialogRoot:"relative",dialogTrigger:"",dialogTriggerDisabled:"!cursor-not-allowed opacity-60",dialogOverlay:"fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dialogContent:"pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4",dialogPanel:T("pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl","motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out"),dialogHeader:"grid min-w-0 gap-1 border-b border-border/60 px-5 py-4",dialogTitle:"min-w-0 pr-8 text-base font-semibold leading-6 text-foreground",dialogDescription:"text-sm leading-6 text-muted-foreground",dialogBody:"min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground",dialogFooter:"flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4",dialogClose:T("absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Ct),dropdownRoot:"relative inline-flex min-w-0",dropdownTrigger:"",dropdownTriggerDisabled:"!cursor-not-allowed opacity-60",dropdownMenu:"z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dropdownMenuTop:"bottom-[calc(100%+0.375rem)] top-auto",dropdownMenuEnd:"left-auto right-0",dropdownLabel:"px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground",dropdownSeparator:"my-1 h-px bg-border/70",dropdownItem:T("flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Ct),dropdownItemDanger:"text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10",dropdownItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent",dropdownItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",dropdownItemContent:"grid min-w-0 flex-1 gap-0.5",dropdownItemLabel:"min-w-0 truncate",dropdownItemDescription:"min-w-0 truncate text-xs leading-4 text-muted-foreground",dropdownItemShortcut:"ml-3 shrink-0 text-xs font-medium text-muted-foreground",tooltipRoot:"relative inline-flex min-w-0",tooltipTrigger:"inline-flex min-w-0",tooltipContent:"pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",noticeBase:T("flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm",_e,"motion-safe:animate-in motion-safe:fade-in"),noticeDefault:"border-border bg-background text-foreground",noticePrimary:"border-primary/25 bg-primary/10 text-primary",noticeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-foreground",noticeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",noticeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",noticeMuted:"border-border/60 bg-muted/35 text-muted-foreground",noticeIcon:"mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in",noticeTitle:"font-semibold leading-5",noticeDescription:"leading-6",noticeActions:"mt-3 flex flex-wrap items-center gap-2",dividerRoot:T("shrink-0 border-border/70",_e),dividerLabel:"mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in",sectionHeaderRoot:"flex min-w-0 flex-wrap items-start justify-between gap-token-md motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",sectionHeaderContent:"grid min-w-0 gap-1",sectionHeaderEyebrow:"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground",sectionHeaderTitle:"text-base font-semibold leading-6 text-foreground",sectionHeaderDescription:"max-w-2xl text-sm leading-6 text-muted-foreground",sectionHeaderActions:"flex shrink-0 flex-wrap items-center gap-2",tabsRoot:"grid min-w-0 gap-token-md",tabsList:T("inline-flex min-w-0 flex-wrap items-center gap-token-xs rounded-lg border border-border/70 bg-muted/30 p-token-xs",_e),tabsTrigger:T("inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none",Ct),tabsTriggerActive:"bg-background text-foreground shadow-sm",tabsTriggerDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",tabsPanel:"min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",segmentedRoot:T("inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",_e),segmentedItem:T("inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden",Ct),segmentedItemActive:"bg-background text-foreground shadow-sm",segmentedItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",progressRoot:"grid min-w-0 gap-2",progressTrack:"h-2 w-full overflow-hidden rounded-full bg-muted",progressIndicator:"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out",progressLabelRow:"flex min-w-0 items-center justify-between gap-3",progressLabel:"min-w-0 truncate text-sm font-medium text-foreground",progressValue:"shrink-0 text-xs font-medium text-muted-foreground",skeletonRoot:"relative overflow-hidden rounded-md bg-muted/70",avatarRoot:"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",avatarImage:"h-full w-full object-cover",avatarFallback:"flex h-full w-full items-center justify-center bg-muted text-foreground",avatarStatus:"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse",avatarText:"min-w-0 truncate text-sm font-medium text-foreground",toolbarRoot:T("flex min-w-0 flex-wrap items-center justify-between gap-token-md rounded-lg border border-border/70 bg-background px-token-lg py-token-md",_e),toolbarLeading:"flex min-w-0 items-center gap-token-md",toolbarTitle:"min-w-0 truncate text-sm font-semibold text-foreground",toolbarDescription:"mt-0.5 text-sm leading-5 text-muted-foreground",toolbarContent:"min-w-0 flex-1",toolbarActions:"flex shrink-0 flex-wrap items-center gap-token-sm",breadcrumbRoot:"min-w-0 text-sm text-muted-foreground",breadcrumbList:"flex min-w-0 flex-wrap items-center gap-1.5",breadcrumbItem:"inline-flex min-w-0 items-center gap-1.5",breadcrumbLink:"min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",breadcrumbCurrent:"min-w-0 truncate font-medium text-foreground",breadcrumbSeparator:"shrink-0 text-muted-foreground/70",paginationRoot:"flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm",paginationInfo:"min-w-0 text-muted-foreground",paginationControls:"flex min-w-0 flex-wrap items-center justify-end gap-1.5",paginationButton:"inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",paginationButtonDisabled:"!cursor-not-allowed opacity-50",paginationPage:"inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50",paginationEllipsis:"inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground",descriptionListRoot:"grid min-w-0 gap-3 text-sm",descriptionListItem:"grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm",descriptionListTerm:"min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",descriptionListValue:"min-w-0 text-sm leading-6 text-foreground",accordionRoot:"grid min-w-0 gap-2",accordionItem:"overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTrigger:"flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTriggerIcon:T("h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground",Hn,"motion-reduce:transition-none"),accordionPanel:"border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none",menuTrigger:"inline-flex min-w-0",menuContent:"z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:T("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",Ct),menuItemDefault:"text-foreground",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_72%_29%))] focus:text-[hsl(var(--success,142_72%_29%))] data-[highlighted]:text-[hsl(var(--success,142_72%_29%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,28_73%_26%))] focus:text-[hsl(var(--warning-foreground,28_73%_26%))] data-[highlighted]:text-[hsl(var(--warning-foreground,28_73%_26%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground",menuItemDisabled:"!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"min-w-0 flex-1 truncate",menuItemShortcut:"ml-4 shrink-0 text-xs font-medium text-muted-foreground",menuCheckboxIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuRadioIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuSubTrigger:T("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",Ct),menuSubTriggerIcon:"ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",menuSubContent:"z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",tableContainer:T("relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]","[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]","[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]",rs,_e),tableContainerFooterAttached:"!rounded-b-none !shadow-none",tableRoot:"w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableCaption:"mt-3 text-sm text-muted-foreground",tableHeader:T("relative z-[2] bg-transparent [&_tr]:bg-transparent",Mp),tableBody:"[&_tr:last-child>*]:border-b-0",tableFooter:"bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70",tableFooterBar:T("flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none",_e),tableFooterBarAttached:"-mt-px rounded-t-none border-t border-border/70 shadow-none",tableFooterBarLeading:"flex min-w-0 items-center gap-2",tableFooterBarContent:"min-w-0 flex-1",tableFooterBarActions:"ms-auto flex shrink-0 flex-wrap items-center gap-2",tableSplitRoot:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableSplitHeader:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent",tableSplitBody:T("block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]",rs),tableSplitFooter:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden",tableSplitRow:"grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]",tableSplitHead:"flex min-w-0 overflow-hidden",tableSplitCell:"block min-w-0 overflow-hidden [overflow-wrap:anywhere]",tableRow:T("[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5",_e),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>td]:bg-[var(--base-table-row-hover-bg)] hover:[&>th]:bg-[var(--base-table-row-hover-bg)]",tableRowSelected:"bg-primary/5 [&>*]:bg-primary/5",tableRowDisabled:"!cursor-not-allowed opacity-60",tableHead:"relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]",tableHeadContent:"flex min-w-0 items-center justify-between gap-2",tableHeadMain:"flex min-w-0 items-center gap-2",tableHeadIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",tableHeadText:"grid min-w-0 gap-0.5",tableHeadLabel:"min-w-0 truncate text-xs font-semibold leading-4 text-foreground",tableHeadDescription:"min-w-0 truncate text-xs font-normal leading-4 text-muted-foreground",tableHeadMeta:"shrink-0 text-xs font-medium text-muted-foreground",tableHeadActions:"flex shrink-0 items-center gap-1",tableHeadSortButton:T("inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60",_e),tableHeadSortIcon:T("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",Hn),tableHeadDragHandle:T("inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",_e),tableHeadResizeHandle:T("absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",_e),tableCell:"min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]",tableCellAlignCenter:"text-center",tableCellAlignRight:"text-right",tableEmptyRow:"[&>*]:border-b [&>*]:border-border/60",tableEmptyCell:"px-4 py-10 text-center",tableEmptyContent:"mx-auto flex max-w-md flex-col items-center justify-center text-center",tableEmptyIcon:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground",tableEmptyTitle:"text-sm font-semibold text-foreground",tableEmptyDescription:"mt-1 text-sm leading-6 text-muted-foreground",tableEmptyActions:"mt-4 flex flex-wrap items-center justify-center gap-2",tableLoadingRow:"[&>*]:border-b [&>*]:border-border/60",tableLoadingCell:"px-3 py-2",tableLoadingSkeleton:"h-4 w-full rounded-md bg-muted/70",layoutRoot:T("grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground",_e),layoutRootFull:"h-full min-h-0",layoutHeader:"min-w-0",layoutBody:"grid min-h-0 min-w-0 overflow-hidden gap-token-md",layoutSidebar:"min-h-0 min-w-0 overflow-hidden",layoutMain:"min-h-0 min-w-0 overflow-hidden",layoutAside:"min-h-0 min-w-0 overflow-hidden",layoutFooter:"min-w-0",layoutPane:T("h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground",_e),layoutPaneScrollable:"overflow-auto",layoutPaneBordered:"border border-border/70",layoutPaneMuted:"bg-muted/25",layoutPaneSoft:"bg-background/95 shadow-sm",layoutPaneTransparent:"bg-transparent shadow-none",layoutSplitRoot:"grid min-h-0 min-w-0 overflow-hidden",layoutSplitHorizontal:"grid-flow-col",layoutSplitVertical:"grid-flow-row",layoutSplitPane:"min-h-0 min-w-0 overflow-hidden",layoutSplitPrimary:"",layoutSplitSecondary:"",layoutResizeHandle:T("group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Ct),layoutResizeHandleHorizontal:"w-2 cursor-col-resize",layoutResizeHandleVertical:"h-2 cursor-row-resize",layoutResizeHandleDisabled:"cursor-default opacity-60",layoutResizeHandleIndicator:"rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70"},Ip={compact:{buttonBase:"h-8 px-2.5 text-xs",buttonIconOnly:"h-8 w-8 px-0",badgeBase:"px-1.5 py-0 text-xs",panelHeader:"p-token-md",panelBody:"px-token-md pb-token-md text-xs",panelBodyStandalone:"pt-token-md",panelFooter:"px-token-md py-token-md",stateRoot:"min-h-36 px-4 py-7",stateIcon:"mb-3 h-10 w-10",fieldRoot:"gap-token-sm",fieldLabel:"text-xs",fieldDescription:"text-xs leading-5",fieldMessage:"text-xs leading-5",controlInput:"h-8 text-xs",controlTextarea:"min-h-20 text-xs",controlSelect:"h-8 text-xs",selectMenu:"text-xs",selectOption:"min-h-7 px-2 py-1 text-xs",switchTrack:"h-5 w-9",switchThumb:"h-3.5 w-3.5",checkboxBox:"h-3.5 w-3.5",checkboxLabel:"text-xs",checkboxDescription:"text-xs leading-5",radioOption:"px-2 py-1.5 text-xs",radioMarker:"h-3.5 w-3.5",radioIndicator:"h-1.5 w-1.5",radioLabel:"text-xs",radioDescription:"text-xs leading-5",dialogPanel:"max-w-md",dialogHeader:"px-4 py-3",dialogTitle:"text-sm leading-5",dialogDescription:"text-xs leading-5",dialogBody:"px-4 py-3 text-xs",dialogFooter:"px-4 py-3",dropdownMenu:"min-w-44 text-xs",dropdownItem:"px-2 py-1.5 text-xs",tooltipContent:"text-xs leading-4",noticeBase:"px-3 py-2 text-xs",dividerLabel:"text-xs",sectionHeaderRoot:"gap-token-sm",sectionHeaderTitle:"text-sm leading-5",sectionHeaderDescription:"text-xs leading-5",tabsList:"gap-token-xs p-token-xs",tabsTrigger:"px-2 py-1 text-xs",tabsPanel:"p-3 text-xs",segmentedRoot:"gap-token-xs p-token-xs",segmentedItem:"px-2 py-1 text-xs",progressTrack:"h-1.5",avatarRoot:"text-xs",toolbarRoot:"gap-token-sm px-token-md py-token-md",toolbarTitle:"text-xs",toolbarDescription:"text-xs leading-5",paginationButton:"h-7 min-w-7 px-2 text-xs",paginationPage:"h-7 min-w-7 px-2 text-xs",descriptionListRoot:"gap-2 text-xs",descriptionListItem:"px-2 py-1.5",descriptionListTerm:"text-xs",descriptionListValue:"text-xs leading-5",accordionTrigger:"px-3 py-2 text-xs",accordionPanel:"px-3 py-2 text-xs leading-5",menuContent:"min-w-40 p-0.5 text-xs",menuSubContent:"min-w-36 p-0.5 text-xs",menuLabel:"px-2 py-1 text-xs",menuItem:"min-h-7 px-2 py-1 text-xs",menuSubTrigger:"min-h-7 px-2 py-1 text-xs",menuItemShortcut:"text-xs",tableContainer:"[--base-table-header-height:2.25rem]",tableHead:"h-9 px-2 py-1.5 text-xs",tableCell:"px-2 py-1.5 text-xs",tableHeadLabel:"text-xs",tableHeadDescription:"text-xs leading-3",tableLoadingCell:"px-2 py-1.5",layoutRoot:"gap-token-md p-token-md",layoutBody:"gap-token-md",layoutPane:"rounded-md text-xs",layoutResizeHandleHorizontal:"w-1.5",layoutResizeHandleVertical:"h-1.5"},default:{buttonBase:"h-9"},comfortable:{buttonBase:"h-10 px-3.5",buttonIconOnly:"h-10 w-10 px-0",badgeBase:"px-2.5 py-1",panelHeader:"p-token-xl",panelBody:"px-token-xl pb-token-xl",panelBodyStandalone:"pt-token-xl",panelFooter:"px-token-xl py-token-lg",stateRoot:"min-h-56 px-8 py-12",stateIcon:"mb-5 h-14 w-14",fieldRoot:"gap-token-md",controlInput:"h-10",controlTextarea:"min-h-28",controlSelect:"h-10",selectMenu:"p-1.5",selectOption:"min-h-9 px-3 py-2",switchTrack:"h-7 w-12",switchThumb:"h-5 w-5",checkboxBox:"h-5 w-5",radioOption:"px-4 py-3",radioMarker:"h-5 w-5",radioIndicator:"h-2.5 w-2.5",dialogPanel:"max-w-xl",dialogHeader:"px-6 py-5",dialogBody:"px-6 py-5",dialogFooter:"px-6 py-5",dropdownMenu:"min-w-56",dropdownItem:"px-3 py-2.5",noticeBase:"px-5 py-4",sectionHeaderTitle:"text-lg leading-7",tabsTrigger:"px-3.5 py-2",tabsPanel:"p-5",segmentedItem:"px-3.5 py-2",progressTrack:"h-2.5",toolbarRoot:"px-token-xl py-token-lg",paginationButton:"h-9 min-w-9 px-3",paginationPage:"h-9 min-w-9 px-3",descriptionListItem:"px-4 py-3",accordionTrigger:"px-5 py-4",accordionPanel:"px-5 py-4",menuContent:"min-w-48 p-1.5",menuSubContent:"min-w-44 p-1.5",menuItem:"min-h-9 px-3 py-2",menuSubTrigger:"min-h-9 px-3 py-2",tableContainer:"[--base-table-header-height:3rem]",tableHead:"h-12 px-4 py-3",tableCell:"px-4 py-3",tableLoadingCell:"px-4 py-3",layoutRoot:"gap-token-lg p-token-lg",layoutBody:"gap-token-lg",layoutPane:"rounded-xl",layoutResizeHandleHorizontal:"w-2.5",layoutResizeHandleVertical:"h-2.5"}},Ap={none:{buttonBase:"rounded-none",badgeBase:"rounded-none",panelRoot:"rounded-none",stateRoot:"rounded-none",stateIcon:"rounded-none",controlWrapper:"rounded-none",selectMenu:"rounded-none",selectOption:"rounded-none",switchTrack:"rounded-none",switchThumb:"rounded-none",checkboxBox:"rounded-none",radioOption:"rounded-none",dialogPanel:"rounded-none",dialogClose:"rounded-none",dropdownMenu:"rounded-none",dropdownItem:"rounded-none",tooltipContent:"rounded-none",noticeBase:"rounded-none",tabsList:"rounded-none",tabsTrigger:"rounded-none",tabsPanel:"rounded-none",segmentedRoot:"rounded-none",segmentedItem:"rounded-none",progressTrack:"rounded-none",progressIndicator:"rounded-none",skeletonRoot:"rounded-none",avatarRoot:"rounded-none",avatarStatus:"rounded-none",toolbarRoot:"rounded-none",paginationButton:"rounded-none",paginationPage:"rounded-none",descriptionListItem:"rounded-none",accordionItem:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",menuSubTrigger:"rounded-none",menuSubContent:"rounded-none",tableContainer:"rounded-none",tableEmptyIcon:"rounded-none",tableLoadingSkeleton:"rounded-none",layoutRoot:"rounded-none",layoutPane:"rounded-none"},sm:{buttonBase:"rounded-sm",badgeBase:"rounded-sm",panelRoot:"rounded-sm",stateRoot:"rounded-sm",stateIcon:"rounded-sm",controlWrapper:"rounded-sm",selectMenu:"rounded-sm",selectOption:"rounded-sm",switchTrack:"rounded-sm",switchThumb:"rounded-sm",checkboxBox:"rounded-sm",radioOption:"rounded-sm",dialogPanel:"rounded-sm",dialogClose:"rounded-sm",dropdownMenu:"rounded-sm",dropdownItem:"rounded-sm",tooltipContent:"rounded-sm",noticeBase:"rounded-sm",tabsList:"rounded-sm",tabsTrigger:"rounded-sm",tabsPanel:"rounded-sm",segmentedRoot:"rounded-sm",segmentedItem:"rounded-sm",progressTrack:"rounded-sm",progressIndicator:"rounded-sm",skeletonRoot:"rounded-sm",avatarRoot:"rounded-sm",avatarStatus:"rounded-sm",toolbarRoot:"rounded-sm",paginationButton:"rounded-sm",paginationPage:"rounded-sm",descriptionListItem:"rounded-sm",accordionItem:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",menuSubTrigger:"rounded-sm",menuSubContent:"rounded-sm",tableContainer:"rounded-sm",tableEmptyIcon:"rounded-sm",tableLoadingSkeleton:"rounded-sm",layoutRoot:"rounded-sm",layoutPane:"rounded-sm"},md:{},lg:{buttonBase:"rounded-lg",badgeBase:"rounded-lg",panelRoot:"rounded-xl",stateRoot:"rounded-xl",stateIcon:"rounded-xl",controlWrapper:"rounded-lg",selectMenu:"rounded-lg",selectOption:"rounded-md",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-md",radioOption:"rounded-xl",dialogPanel:"rounded-xl",dialogClose:"rounded-lg",dropdownMenu:"rounded-lg",dropdownItem:"rounded-md",tooltipContent:"rounded-md",noticeBase:"rounded-xl",tabsList:"rounded-xl",tabsTrigger:"rounded-lg",tabsPanel:"rounded-xl",segmentedRoot:"rounded-xl",segmentedItem:"rounded-lg",skeletonRoot:"rounded-lg",toolbarRoot:"rounded-xl",descriptionListItem:"rounded-lg",accordionItem:"rounded-xl",menuContent:"rounded-lg",menuItem:"rounded-md",menuSubTrigger:"rounded-md",menuSubContent:"rounded-lg",tableContainer:"rounded-xl",tableEmptyIcon:"rounded-xl",tableLoadingSkeleton:"rounded-lg",layoutRoot:"rounded-xl",layoutPane:"rounded-xl"},xl:{buttonBase:"rounded-xl",badgeBase:"rounded-xl",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-2xl",controlWrapper:"rounded-xl",selectMenu:"rounded-xl",selectOption:"rounded-lg",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-lg",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-xl",dropdownMenu:"rounded-xl",dropdownItem:"rounded-lg",tooltipContent:"rounded-lg",noticeBase:"rounded-2xl",tabsList:"rounded-2xl",tabsTrigger:"rounded-xl",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-2xl",segmentedItem:"rounded-xl",skeletonRoot:"rounded-xl",toolbarRoot:"rounded-2xl",paginationButton:"rounded-xl",paginationPage:"rounded-xl",descriptionListItem:"rounded-xl",accordionItem:"rounded-2xl",menuContent:"rounded-xl",menuItem:"rounded-lg",menuSubTrigger:"rounded-lg",menuSubContent:"rounded-xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-2xl",tableLoadingSkeleton:"rounded-xl",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"},full:{buttonBase:"rounded-full",badgeBase:"rounded-full",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-full",controlWrapper:"rounded-full",selectMenu:"rounded-2xl",selectOption:"rounded-full",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-full",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-full",dropdownMenu:"rounded-2xl",dropdownItem:"rounded-full",tooltipContent:"rounded-full",noticeBase:"rounded-2xl",tabsList:"rounded-full",tabsTrigger:"rounded-full",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-full",segmentedItem:"rounded-full",progressTrack:"rounded-full",progressIndicator:"rounded-full",skeletonRoot:"rounded-full",avatarRoot:"rounded-full",avatarStatus:"rounded-full",toolbarRoot:"rounded-2xl",paginationButton:"rounded-full",paginationPage:"rounded-full",descriptionListItem:"rounded-2xl",accordionItem:"rounded-2xl",menuContent:"rounded-2xl",menuItem:"rounded-full",menuSubTrigger:"rounded-full",menuSubContent:"rounded-2xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-full",tableLoadingSkeleton:"rounded-full",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"}},Bp={none:{buttonBase:"border-transparent",badgeBase:"border-transparent",panelRoot:"border-transparent",panelFooter:"border-transparent",stateRoot:"border-transparent",controlWrapper:"border-transparent",selectMenu:"border-transparent",switchTrack:"border-transparent",checkboxBox:"border-transparent",radioOption:"border-transparent",radioMarker:"border-transparent",dialogPanel:"border-transparent",dialogHeader:"border-transparent",dialogFooter:"border-transparent",dropdownMenu:"border-transparent",tooltipContent:"border-transparent",noticeBase:"border-transparent",dividerRoot:"border-transparent",tabsList:"border-transparent",tabsPanel:"border-transparent",segmentedRoot:"border-transparent",avatarRoot:"border-transparent",toolbarRoot:"border-transparent",paginationButton:"border-transparent",descriptionListItem:"border-transparent",accordionItem:"border-transparent",accordionPanel:"border-transparent",menuContent:"border-transparent",menuSeparator:"bg-transparent",menuSubContent:"border-transparent",tableContainer:"border-transparent [--base-table-header-separator:transparent]",tableHeader:"border-transparent",tableFooter:"[&_tr>*]:border-transparent",tableFooterBar:"border-transparent",tableFooterBarAttached:"border-t border-transparent",tableRow:"[&>*]:border-transparent",tableEmptyRow:"[&>*]:border-transparent",tableLoadingRow:"[&>*]:border-transparent",layoutRoot:"border-transparent",layoutPaneBordered:"border-transparent",layoutResizeHandle:"bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent"},subtle:{buttonDefault:"border-border/60",badgeDefault:"border-border/60",panelRoot:"border-border/60",panelFooter:"border-border/60",stateRoot:"border-border/60",controlWrapper:"border-border/60",selectMenu:"border-border/60",switchTrack:"border-border/60",checkboxBox:"border-border/60",radioOption:"border-border/60",radioMarker:"border-border/60",dialogPanel:"border-border/60",dialogHeader:"border-border/60",dialogFooter:"border-border/60",dropdownMenu:"border-border/60",tooltipContent:"border-border/60",noticeDefault:"border-border/60",dividerRoot:"border-border/60",tabsList:"border-border/60",tabsPanel:"border-border/60",segmentedRoot:"border-border/60",avatarRoot:"border-border/60",toolbarRoot:"border-border/60",paginationButton:"border-border/60",descriptionListItem:"border-border/60",accordionItem:"border-border/60",accordionPanel:"border-border/60",menuContent:"border-border/60",menuSeparator:"bg-border/60",menuSubContent:"border-border/60",tableContainer:"border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]",tableHeader:"border-border/60",tableFooter:"[&_tr>*]:border-border/60",tableFooterBar:"border-border/60",tableFooterBarAttached:"border-t border-border/60",tableRow:"[&>*]:border-border/50",tableEmptyRow:"[&>*]:border-border/50",tableLoadingRow:"[&>*]:border-border/50",layoutRoot:"border-border/60",layoutPaneBordered:"border-border/60"},solid:{},strong:{buttonDefault:"border-foreground/20",badgeDefault:"border-foreground/20",panelRoot:"border-foreground/20",panelFooter:"border-foreground/20",stateRoot:"border-foreground/20",controlWrapper:"border-foreground/20",selectMenu:"border-foreground/20",switchTrack:"border-foreground/20",checkboxBox:"border-foreground/20",radioOption:"border-foreground/20",radioMarker:"border-foreground/20",dialogPanel:"border-foreground/20",dialogHeader:"border-foreground/15",dialogFooter:"border-foreground/15",dropdownMenu:"border-foreground/20",tooltipContent:"border-foreground/20",noticeDefault:"border-foreground/20",dividerRoot:"border-foreground/20",tabsList:"border-foreground/20",tabsPanel:"border-foreground/20",segmentedRoot:"border-foreground/20",avatarRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",paginationButton:"border-foreground/20",descriptionListItem:"border-foreground/20",accordionItem:"border-foreground/20",accordionPanel:"border-foreground/20",menuContent:"border-foreground/20",menuSeparator:"bg-foreground/15",menuSubContent:"border-foreground/20",tableContainer:"border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]",tableHeader:"border-foreground/20",tableFooter:"[&_tr>*]:border-foreground/20",tableFooterBar:"border-foreground/20",tableFooterBarAttached:"border-t border-foreground/20",tableRow:"[&>*]:border-foreground/15",tableEmptyRow:"[&>*]:border-foreground/15",tableLoadingRow:"[&>*]:border-foreground/15",layoutRoot:"border-foreground/20",layoutPaneBordered:"border-foreground/20",layoutResizeHandle:"hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15"}},Lp={plain:{},muted:{buttonDefault:"bg-muted/20 hover:bg-muted/45",panelRoot:"bg-card",panelFooter:"bg-muted/20",stateRoot:"bg-muted/20",controlWrapper:"bg-background",selectMenu:"bg-background",selectOptionActive:"bg-muted/70 text-foreground",checkboxBox:"bg-background",radioOption:"bg-card hover:bg-muted/45",radioMarker:"bg-background",dialogPanel:"bg-card",dropdownMenu:"bg-background",dropdownItem:"hover:bg-muted/60",tooltipContent:"bg-popover",noticeDefault:"bg-muted/20",tabsList:"bg-muted/35",tabsTriggerActive:"bg-background",tabsPanel:"bg-card",segmentedRoot:"bg-muted/35",segmentedItemActive:"bg-background",progressTrack:"bg-muted/60",skeletonRoot:"bg-muted",toolbarRoot:"bg-card",paginationButton:"bg-background hover:bg-muted/60",paginationPage:"bg-muted/60",descriptionListItem:"bg-card",accordionItem:"bg-card",menuContent:"bg-background",menuItem:"focus:bg-muted/70 data-[highlighted]:bg-muted/70",menuSubTrigger:"focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70",menuSubContent:"bg-background",tableContainer:"bg-background/95 [scrollbar-gutter:stable]",tableFooter:"bg-muted/35",tableFooterBar:"bg-muted/30 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]",tableLoadingSkeleton:"bg-muted",layoutRoot:"bg-card",layoutPane:"bg-card",layoutPaneMuted:"bg-muted/35",layoutResizeHandle:"hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70"},soft:{buttonDefault:"bg-muted/30 hover:bg-muted/55",panelRoot:"bg-background/95 shadow-sm",stateRoot:"bg-background/95 shadow-sm",controlWrapper:"bg-background/95",selectMenu:"bg-background/95 shadow-xl",selectOptionActive:"bg-muted/60 text-foreground",checkboxBox:"bg-background/95",radioOption:"bg-background/95 shadow-sm hover:bg-muted/35",radioMarker:"bg-background/95",dialogPanel:"bg-background/95 shadow-xl",dropdownMenu:"bg-background/95 shadow-xl",dropdownItem:"hover:bg-muted/55",tooltipContent:"bg-popover shadow-xl",noticeDefault:"bg-background/95 shadow-sm",tabsList:"bg-background/60 shadow-sm",tabsTriggerActive:"bg-background",tabsPanel:"bg-background/95 shadow-sm",segmentedRoot:"bg-background/60 shadow-sm",segmentedItemActive:"bg-background",skeletonRoot:"bg-background/80",toolbarRoot:"bg-background/95 shadow-sm",paginationButton:"bg-background/95 hover:bg-muted/55",descriptionListItem:"bg-background/95 shadow-sm",accordionItem:"bg-background/95 shadow-sm",menuContent:"bg-background/95 shadow-xl",menuItem:"focus:bg-muted/60 data-[highlighted]:bg-muted/60",menuSubTrigger:"focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60",menuSubContent:"bg-background/95 shadow-xl",tableContainer:"bg-background/95 shadow-sm [scrollbar-gutter:stable]",tableFooter:"bg-muted/25",tableFooterBar:"bg-muted/25 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]",tableLoadingSkeleton:"bg-muted/65",layoutRoot:"bg-background/95 shadow-sm",layoutPane:"bg-background/95 shadow-sm",layoutPaneSoft:"bg-background/95 shadow-md"},glass:{buttonBase:"backdrop-blur-md",buttonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",badgeDefault:"border-white/10 bg-white/[0.08] text-foreground",panelRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",panelFooter:"border-white/10 bg-white/[0.05]",stateRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",stateIcon:"bg-white/10 text-foreground",controlWrapper:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",selectMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",selectOption:"text-foreground",selectOptionActive:"bg-white/[0.14] text-foreground",selectOptionSelected:"bg-white/[0.18] text-foreground",switchTrack:"border-white/10 bg-white/[0.12] backdrop-blur-md",checkboxBox:"border-white/10 bg-white/[0.08] backdrop-blur-md",checkboxBoxChecked:"border-white/20 bg-white/[0.22] text-foreground",radioOption:"border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]",radioMarker:"border-white/10 bg-white/[0.08] backdrop-blur-md",radioMarkerChecked:"border-white/25 bg-white/[0.16]",dialogOverlay:"bg-background/45 backdrop-blur-md",dialogPanel:"border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md",dialogHeader:"border-white/10",dialogFooter:"border-white/10",dropdownMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",dropdownItem:"text-foreground hover:bg-white/[0.14]",tooltipContent:"border-foreground/10 bg-background/15 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",noticeDefault:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",dividerRoot:"border-white/15",tabsList:"border-white/10 bg-white/[0.08] backdrop-blur-md",tabsTrigger:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",tabsTriggerActive:"bg-white/[0.16] text-foreground shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",segmentedRoot:"border-white/10 bg-white/[0.08] backdrop-blur-md",segmentedItem:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",segmentedItemActive:"bg-white/[0.16] text-foreground shadow-none",progressTrack:"bg-white/[0.12]",skeletonRoot:"bg-white/[0.16]",avatarRoot:"border-white/10 bg-white/[0.12] text-foreground",avatarFallback:"bg-white/[0.12] text-foreground",avatarStatus:"border-background",toolbarRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",paginationButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",paginationPage:"bg-white/[0.12] text-foreground",descriptionListItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionPanel:"border-white/10",menuContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",menuSeparator:"bg-white/10",menuItem:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground",menuSubTrigger:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]",menuSubContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",tableContainer:"border-foreground/10 bg-background/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.94)] [--base-table-header-separator:hsl(var(--foreground)/0.24)]",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.08)]",tableHeadLabel:"text-foreground",tableLoadingSkeleton:"bg-white/[0.16]",layoutRoot:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",layoutPane:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",layoutPaneMuted:"bg-white/[0.08]",layoutPaneSoft:"bg-white/[0.10] shadow-none backdrop-blur-md",layoutResizeHandle:"text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"},dark:{buttonBase:"border-white/15 text-white shadow-lg backdrop-blur",buttonDefault:"bg-black/30 hover:bg-black/[0.45]",buttonPrimary:"border-white/25 bg-white/20 text-white hover:bg-white/25",buttonMuted:"border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white",badgeDefault:"border-white/10 bg-white/[0.08] text-white",badgeMuted:"border-white/10 bg-black/20 text-white/70",panelRoot:"border-white/10 bg-slate-950 text-white shadow-none",panelTitle:"text-white",panelDescription:"text-white/65",panelBody:"text-white/85",panelFooter:"border-white/10 bg-white/[0.04]",stateRoot:"border-white/10 bg-slate-950 text-white shadow-none",stateIcon:"bg-white/10 text-white/75",stateTitle:"text-white",stateDescription:"text-white/65",fieldLabel:"text-white",fieldDescription:"text-white/65",fieldMessage:"text-white/65",controlWrapper:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35",controlBase:"text-white placeholder:text-white/45",selectChevron:"text-white/65",selectMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",selectOption:"text-white",selectOptionActive:"bg-white/[0.12] text-white",selectOptionSelected:"bg-white/[0.16] text-white",selectPlaceholder:"text-white/45",switchTrack:"border-white/15 bg-black/30 shadow-lg backdrop-blur",switchChecked:"border-white/25 bg-white/25 text-white",switchLabel:"text-white",switchDescription:"text-white/65",checkboxBox:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",checkboxBoxChecked:"border-white/25 bg-white/25 text-white",checkboxLabel:"text-white",checkboxDescription:"text-white/65",radioOption:"border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]",radioMarker:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",radioMarkerChecked:"border-white/25 bg-white/25",radioIndicator:"bg-white",radioLabel:"text-white",radioDescription:"text-white/65",dialogOverlay:"bg-slate-950/75",dialogPanel:"border-white/10 bg-slate-950 text-white shadow-2xl",dialogHeader:"border-white/10",dialogTitle:"text-white",dialogDescription:"text-white/65",dialogBody:"text-white/85",dialogFooter:"border-white/10",dialogClose:"text-white/65 hover:bg-white/[0.08] hover:text-white",dropdownMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",dropdownLabel:"text-white/55",dropdownSeparator:"bg-white/15",dropdownItem:"text-white hover:bg-white/[0.10]",dropdownItemDescription:"text-white/55",dropdownItemShortcut:"text-white/55",tooltipContent:"border-white/15 bg-slate-950 text-white shadow-2xl",noticeDefault:"border-white/10 bg-white/[0.08] text-white",noticeMuted:"border-white/10 bg-black/20 text-white/70",dividerRoot:"border-white/15",dividerLabel:"text-white/55",sectionHeaderEyebrow:"text-white/55",sectionHeaderTitle:"text-white",sectionHeaderDescription:"text-white/65",tabsList:"border-white/10 bg-white/[0.08]",tabsTrigger:"text-white/65 hover:bg-white/[0.12] hover:text-white",tabsTriggerActive:"bg-white/[0.16] text-white shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] text-white",segmentedRoot:"border-white/10 bg-white/[0.08]",segmentedItem:"text-white/65 hover:bg-white/[0.12] hover:text-white",segmentedItemActive:"bg-white/[0.16] text-white shadow-none",progressTrack:"bg-white/[0.12]",progressLabel:"text-white",progressValue:"text-white/65",skeletonRoot:"bg-white/[0.14]",avatarRoot:"border-white/15 bg-white/[0.10] text-white",avatarFallback:"bg-white/[0.10] text-white/75",avatarText:"text-white",avatarStatus:"border-slate-950",toolbarRoot:"border-white/10 bg-white/[0.06] text-white",toolbarTitle:"text-white",toolbarDescription:"text-white/65",breadcrumbLink:"text-white/65 hover:text-white",breadcrumbCurrent:"text-white",breadcrumbSeparator:"text-white/45",paginationInfo:"text-white/65",paginationButton:"border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]",paginationPage:"bg-white/[0.14] text-white",descriptionListItem:"border-white/10 bg-white/[0.06]",descriptionListTerm:"text-white/55",descriptionListValue:"text-white",accordionItem:"border-white/10 bg-white/[0.06]",accordionTrigger:"text-white hover:bg-white/[0.08]",accordionPanel:"border-white/10 text-white/70",tableContainer:"border-foreground/10 bg-background text-foreground shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.98)] [--base-table-header-separator:hsl(var(--foreground)/0.16)]",tableRoot:"text-white",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] text-white/65",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.06)]",tableHead:"text-white/65",tableHeadLabel:"text-white",tableHeadDescription:"text-white/55",tableHeadMeta:"text-white/55",tableHeadIcon:"text-white/55",tableHeadSortIcon:"text-white/55",tableHeadDragHandle:"text-white/55 hover:bg-white/[0.08]",tableHeadResizeHandle:"after:bg-white/20 hover:after:bg-white/60",tableCell:"text-white/85",tableEmptyIcon:"bg-white/10 text-white/65",tableEmptyTitle:"text-white",tableEmptyDescription:"text-white/60",menuContent:"border-white/10 bg-slate-950 text-white shadow-2xl",menuLabel:"text-white/55",menuSeparator:"bg-white/10",menuItem:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white",menuItemDefault:"text-white",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_69%_58%))] focus:text-[hsl(var(--success,142_69%_58%))] data-[highlighted]:text-[hsl(var(--success,142_69%_58%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,53_98%_77%))] focus:text-[hsl(var(--warning-foreground,53_98%_77%))] data-[highlighted]:text-[hsl(var(--warning-foreground,53_98%_77%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-white/65 focus:text-white data-[highlighted]:text-white",menuItemShortcut:"text-white/45",menuSubTrigger:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]",menuSubTriggerIcon:"text-white/55",menuSubContent:"border-white/10 bg-slate-950 text-white shadow-2xl",tableLoadingSkeleton:"bg-white/[0.14]",layoutRoot:"border-white/10 bg-slate-950 text-white shadow-none",layoutPane:"border-white/10 bg-slate-950 text-white shadow-none",layoutPaneMuted:"bg-white/[0.06]",layoutPaneSoft:"bg-white/[0.08] shadow-none",layoutResizeHandle:"text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"}},as={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"lg",border:"subtle",background:"soft"},compact:{density:"compact",radius:"md",border:"subtle",background:"muted"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},glass:{density:"default",radius:"xl",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"strong",background:"plain"}},Ep={soft:{buttonBase:"font-medium",panelRoot:"border-border/70",controlWrapper:"font-medium",tabsTrigger:"font-medium",segmentedItem:"font-medium",toolbarRoot:"border-border/70",tableContainer:"border-border/70",tableFooterBar:"border-border/70",tableHeadLabel:"font-semibold",menuItemLabel:"font-medium"},compact:{buttonBase:"text-xs",badgeBase:"text-xs",fieldLabel:"text-xs",controlBase:"text-xs",selectOption:"text-xs",menuItem:"text-xs",menuSubTrigger:"text-xs",noticeBase:"text-xs",sectionHeaderTitle:"text-sm",tabsTrigger:"text-xs",segmentedItem:"text-xs",toolbarTitle:"text-xs",paginationRoot:"text-xs"},"tinted-glass":{buttonPrimary:"border-primary/25 bg-primary/15 text-primary-foreground hover:bg-primary/20",badgePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",noticePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",progressIndicator:"bg-primary",avatarStatus:"border-background"},glass:{panelRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",stateRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",noticeBase:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",tabsPanel:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",toolbarRoot:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",descriptionListItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]",accordionItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]"},"hard-edge":{buttonBase:"shadow-none",panelRoot:"shadow-none",stateRoot:"shadow-none",controlWrapper:"shadow-none",selectMenu:"shadow-none",menuContent:"shadow-none",menuSubContent:"shadow-none",noticeBase:"shadow-none",tabsList:"shadow-none",tabsTriggerActive:"shadow-none",tabsPanel:"shadow-none",segmentedRoot:"shadow-none",segmentedItemActive:"shadow-none",toolbarRoot:"shadow-none",descriptionListItem:"shadow-none",accordionItem:"shadow-none"}};function Dp(e){return as[e]??as.default}r(Dp,"getPresetDefaults");var Up=Object.keys(is),zp=ns(Up,T);function _p(...e){return Object.assign({},...e.filter(Boolean))}r(_p,"mergeStyles");function ss(e){let t=e?.preset??"default",o=e?.variant??"default",n=Dp(t),a=e?.density??n.density??"default",i=e?.state??"idle",l=e?.radius??n.radius??"md",s=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:i,radius:l,border:s,background:c,styles:_p(Pp,e?.styles),slots:zp(is,Ep[t],Ip[a],Ap[l],Bp[s],Lp[c],e?.slots)}}r(ss,"resolveBaseAppearance");function cs({as:e="article",decoration:t,title:o,description:n,media:a,header:i,footer:l,children:s,interactive:c,selected:u,disabled:g,appearance:d,variant:m,density:b,state:v,className:S,classNames:h,style:f,...w}){let x=ss({...d,variant:m,density:b,state:v}),C=e,I=i!==void 0?Lo(i):Lo(o)||Lo(n),D=a!=null,P=!I&&!D;return jsxs(C,{...w,"aria-disabled":g||void 0,"data-variant":x.variant,"data-density":x.density,"data-state":v??(g?"disabled":u?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":c||void 0,"data-selected":u||void 0,"data-disabled":g||void 0,className:T(x.slots.panelRoot,c&&!g&&x.slots.panelInteractive,u&&x.slots.panelSelected,g&&x.slots.panelDisabled,h?.root,S),style:{...x.styles.panel,...f},children:[t,D?jsx("div",{"data-slot":"media",className:T(x.slots.panelMedia,h?.media),children:a}):null,I?jsx("div",{"data-slot":"header",className:T(x.slots.panelHeader,h?.header),style:x.styles.panelHeader,children:i!==void 0?i:jsxs(Fragment,{children:[Lo(o)?jsx("div",{"data-slot":"title",className:T(x.slots.panelTitle,h?.title),children:o}):null,Lo(n)?jsx("div",{"data-slot":"description",className:T(x.slots.panelDescription,h?.description),children:n}):null]})}):null,s!=null?jsx("div",{"data-slot":"body",className:T(x.slots.panelBody,P&&x.slots.panelBodyStandalone,h?.body),style:x.styles.panelBody,children:s}):null,l!=null?jsx("div",{"data-slot":"footer",className:T(x.slots.panelFooter,h?.footer),style:x.styles.panelFooter,children:l}):null]})}r(cs,"BasePanel");var ds=r(e=>e==null?void 0:typeof e=="number"?`${e}px`:e,"cssSize"),us=r(e=>e!==void 0&&Number.isFinite(e)&&e>0?e:8,"safeSpeed"),Fp=r(e=>{let[t,o=t]=e.trim().split(/\s*\/\s*|\s+/);return {rx:t,ry:o}},"radiusParts");function Zr({mode:e="solid",color:t,colors:o,width:n=1,radius:a,speed:i,direction:l="clockwise",className:s,style:c}){let g=`border-effect-${Ee.useId().replace(/:/g,"")}`,d=Ee.useRef(null),[m,b]=Ee.useState({width:0,height:0,rx:"0px",ry:"0px"});Ee.useEffect(()=>{let D=d.current;if(!D||typeof ResizeObserver>"u")return;let P=r(()=>{let j=getComputedStyle(D).borderTopLeftRadius,B=Fp(j),{rx:y,ry:R}=B;b({width:D.clientWidth,height:D.clientHeight,rx:y,ry:R});},"update");P();let E=new ResizeObserver(P);E.observe(D);let V=new MutationObserver(P);for(let j=D;j;j=j.parentElement)V.observe(j,{attributes:true});return ()=>{E.disconnect(),V.disconnect();}},[a]);let v=o?.length?o:[t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))"],S=v.length===1?[v[0],v[0]]:v,h=l==="counterclockwise"?"reverse":"normal",f=(m.width||1)/2,w=(m.height||1)/2,x=l==="counterclockwise"?`360 ${f} ${w};0 ${f} ${w}`:`0 ${f} ${w};360 ${f} ${w}`,I={...{"--border-effect-width":ds(n),"--border-effect-radius":ds(a)||"inherit","--border-effect-speed":`${us(i)}s`,"--border-effect-color":t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))","--border-effect-gradient":`linear-gradient(90deg, ${S.join(", ")})`,"--border-effect-direction":h},...c};return jsxs("div",{ref:d,"aria-hidden":"true",className:`monkeys-border-effect monkeys-border-effect-${e}${s?` ${s}`:""}`,style:{...I,pointerEvents:"none"},children:[jsx("span",{className:"monkeys-border-effect-ring"}),e==="animated"&&jsxs("svg",{"aria-hidden":"true",focusable:"false",className:"monkeys-border-effect-svg",viewBox:`0 0 ${m.width||1} ${m.height||1}`,children:[jsx("defs",{children:jsxs("linearGradient",{id:g,gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:m.width||1,y2:"0",children:[S.map((D,P)=>jsx("stop",{offset:`${P/(S.length-1)*100}%`,stopColor:D},P)),jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",values:x,dur:`${us(i)}s`,repeatCount:"indefinite"})]})}),jsx("rect",{x:"0",y:"0",width:m.width,height:m.height,rx:m.rx,ry:m.ry,fill:"none",stroke:`url(#${g})`,style:{strokeWidth:"calc(var(--border-effect-width) * 2)"}})]})]})}r(Zr,"BorderEffect");var $p=r((e,t)=>Object.keys(e??{}).some(o=>o.startsWith("padding")&&e?.[o]!==void 0)||/(?:^|[\s:])!?p[xytrblse]?-(?:\[|[a-z0-9])/.test(t??""),"ownsPadding");function ps({children:e,className:t,contentClassName:o,chrome:n="panel",borderEffect:a,decoration:i,headerWrap:l=false,title:s,titleIcon:c,action:u,appearance:g,classNames:d,...m}){let{parentDepth:b,level:v,variables:S}=Xr(),h=fi(g),f=n==="panel",w=f&&a!=null,x=os(m,f),C=$p(h?.styles?.panelBody,[d?.body,o,h?.slots?.panelBody].join(" "));return jsx(Fn,{depth:f?v:b,children:jsx(cs,{as:"section",appearance:{...h,slots:{...h?.slots,panelRoot:h?.slots?.panelRoot},styles:{...h?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...h?.styles?.panelHeader},panelBody:{...!C||n==="plain"?{padding:0}:{},...h?.styles?.panelBody}}},classNames:{...d,root:T("min-h-0",f&&"gap-[var(--monkeys-bento-gap)]",f&&h?.radius===void 0&&!h?.preset&&"rounded-[var(--monkeys-bento-radius)]",f&&h?.border===void 0&&!h?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",f&&h?.background===void 0&&!h?.preset&&"bg-[var(--monkeys-bento-background)]",f&&!h?.preset&&h?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",f&&!C&&"p-[var(--monkeys-bento-padding)]",!f&&"border-0 bg-transparent shadow-none",h?.slots?.panelRoot,d?.root,t),header:T("flex min-w-0 items-center gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] border-b border-border p-0 pb-[var(--monkeys-bento-gap)]",n==="plain"&&"border-0 px-0 pt-0 pb-token-lg",d?.header),body:T("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",h?.slots?.panelBody,d?.body,o),footer:T("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",d?.footer)},header:s?jsxs("div",{style:{alignItems:h?.styles?.panelHeader?.alignItems},className:T("flex min-w-0 flex-1 items-center justify-between gap-token-md",l&&"flex-wrap"),children:[jsxs("div",{className:T("flex min-w-0 flex-1 items-center gap-token-sm",l&&"basis-auto"),children:[c?jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsx(c,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxs("div",{className:"min-w-0",children:[jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:s}),m.description?jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:m.description}):null]})]}),u?jsx("div",{className:T("shrink-0",l&&"max-w-full"),children:u}):null]}):void 0,...m,...x,decoration:jsxs(Fragment,{children:[i,w?jsx(Zr,{...a}):null]}),"data-monkeys-bento-level":f?v:void 0,style:{...f?S:{},...m.style,...w?{borderColor:"transparent"}:{}},children:e})})}r(ps,"BentoPanel");var ms=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),gs=globalThis,jp=gs[ms]??(gs[ms]=Ee.createContext(null)),at=r(()=>Ee.useContext(jp),"useDialogDock");var Jr=Ee.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:i,...l},s)=>{let c=at(),u=Ee.useId(),g=Ee.useRef(null),d=Ee.useRef(false);return Ee.useEffect(()=>{d.current&&!c?.collapsed&&c?.activeId===u&&g.current?.focus(),d.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,u]),Ee.useEffect(()=>c?.register(u),[c?.register,u]),c?.container?jsx(Ue.Portal,{container:c.container,children:jsx("div",{style:{display:"contents"},children:jsx(Do,{children:jsx(ps,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===u?void 0:"none"},children:jsxs(Ue.Content,{...l,ref:s,"data-monkeys-dialog-content":true,"data-presentation":"docked","data-title-visible":c.showTitle,"data-collapsible":c.collapsible,className:T("monkeys-dialog-dock-content",t),style:o,onInteractOutside:m=>{i?.(m),m.preventDefault();},children:[e,c.collapsible&&jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsx(PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxs(Ue.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsx(X,{"aria-hidden":"true",className:"size-4"}),jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});Jr.displayName="DockedDialogContent";var Yp=Ee.forwardRef(({className:e,style:t,...o},n)=>jsx(Ft.Item,{ref:n,className:T("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Yp.displayName="AccordionItem";var Qp=Ee.forwardRef(({className:e,children:t,...o},n)=>jsx(Ft.Header,{className:"flex",children:jsxs(Ft.Trigger,{ref:n,className:T("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Qp.displayName="AccordionTrigger";var Zp=Ee.forwardRef(({className:e,children:t,...o},n)=>jsx(Ft.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsx("div",{className:T("pb-4 pt-0",e),children:t})}));Zp.displayName="AccordionContent";var Jp=Ee.forwardRef(({className:e,...t},o)=>jsx(Vn.Root,{ref:o,className:T("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsx(Vn.Indicator,{className:"flex items-center justify-center text-current",children:jsx(Check$1,{"aria-hidden":"true",className:"h-4 w-4"})})}));Jp.displayName="Checkbox";var tn=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_o=Ee.forwardRef(({className:e,variant:t,size:o,asChild:n=false,unstyled:a=false,...i},l)=>jsx(n?Slot:"button",{ref:l,className:a?e:tn({variant:t,size:o,className:e}),...i}));_o.displayName="Button";var em=Ee.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:i=true,scrollbarOrientation:l="vertical",scrollBarDisabled:s=false,type:c,...u},g)=>{let d=Eo();return jsxs(Dt.Root,{ref:g,type:c??(d>0?"auto":void 0),className:T("group relative overflow-hidden",s&&"no-scrollbar",e),...u,children:[jsx(Dt.Viewport,{ref:n,onScroll:a,className:T("h-full w-full rounded-[inherit]",o),children:t}),i?jsx(bs,{orientation:l,className:T(s&&"size-0 p-0")}):null,jsx(Dt.Corner,{})]})});em.displayName="ScrollArea";var bs=Ee.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsx(Dt.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:T("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsx(Dt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));bs.displayName="ScrollBar";var tm=Ee.forwardRef(({className:e,...t},o)=>jsx(jn.Root,{ref:o,className:T("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsx(jn.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));tm.displayName="Switch";var om=Ee.forwardRef(({variant:e="default",...t},o)=>jsx(Jt.Root,{ref:o,"data-variant":e,...t}));om.displayName="Tabs";var nm=Ee.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsx(Jt.List,{ref:a,className:T("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));nm.displayName="TabsList";var rm=Ee.forwardRef(({className:e,...t},o)=>jsx(Jt.Trigger,{ref:o,className:T("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));rm.displayName="TabsTrigger";var am=Ee.forwardRef(({className:e,...t},o)=>{let n=Eo();return jsx(Jt.Content,{ref:o,className:T("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});am.displayName="TabsContent";var im=Ee.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=ut();return jsx(ho.Portal,{children:jsx(ho.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:T("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",Ot("menu"),e)})})});im.displayName="TooltipContent";var xs=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),vs=globalThis,ys=vs[xs]??(vs[xs]=Ee.createContext(false));function ws({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let i=at(),[l,s]=Ee.useState(t??false),c=e??l;return jsx(ys.Provider,{value:c,children:jsx(Ue.Root,{...a,open:c,modal:i?false:n,onOpenChange:u=>{s(u),o?.(u);}})})}r(ws,"Dialog");var lm=Ue.Portal;var ks=Ee.forwardRef(({className:e,...t},o)=>{let n=ut();return jsx(Ue.Overlay,{...n,...t,ref:o,className:T("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});ks.displayName="DialogOverlay";var Ss=Ee.forwardRef(({className:e,...t},o)=>{let n=ut();return jsx(Ue.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});Ss.displayName="DialogSurfaceContent";var on=Ee.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:i,...l},s)=>{let c=at(),u=Ee.useContext(ys);return c?u?jsx(Jr,{...l,ref:s,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxs(lm,{children:[jsx(ks,{className:a,style:i}),jsxs(Ss,{...l,ref:s,className:T("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",Ot("dialog"),e),children:[jsx(Do,{children:t}),o?jsxs(Ue.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsx(X,{"aria-hidden":"true",className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:n})]}):null]})]})});on.displayName="DialogContent";var cm=Ee.forwardRef(({className:e,...t},o)=>jsx(on,{ref:o,className:T("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));cm.displayName="DialogContentNoAnimation";var dm=r(({className:e,...t})=>jsx("div",{className:T(at()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");dm.displayName="DialogHeader";var ea=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");ea.displayName="DialogFooter";var ta=Ee.forwardRef(({className:e,...t},o)=>jsx(Ue.Title,{ref:o,className:T("text-lg font-semibold leading-none tracking-tight",e,at()?.showTitle===false&&"sr-only"),...t}));ta.displayName="DialogTitle";var oa=Ee.forwardRef(({className:e,...t},o)=>jsx(Ue.Description,{ref:o,className:T("text-sm text-muted-foreground",e),...t}));oa.displayName="DialogDescription";Ee.forwardRef((e,t)=>{let o=at()?Ue.Trigger:He.Trigger;return jsx(o,{...e,ref:t})});var um=He.Portal,Cs=Ee.forwardRef(({className:e,style:t,...o},n)=>{let a=ut();return jsx(He.Overlay,{...a,...o,ref:n,className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});Cs.displayName="AlertDialogOverlay";var pm=Ee.forwardRef(({className:e,style:t,children:o,...n},a)=>{let i=ut();return at()?jsx(on,{...n,...i,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxs(um,{children:[jsx(Cs,{}),jsx(He.Content,{...i,...n,ref:a,className:T("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",Ot("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsx(Do,{children:o})})]})});pm.displayName="AlertDialogContent";var mm=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),gm=r(({className:e,...t})=>jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),fm=Ee.forwardRef(({className:e,...t},o)=>{let n=at()?Ue.Title:He.Title;return jsx(n,{ref:o,className:T("text-lg font-semibold",e,at()?.showTitle===false&&"sr-only"),...t})}),bm=Ee.forwardRef(({className:e,...t},o)=>{let n=at()?Ue.Description:He.Description;return jsx(n,{ref:o,className:T("text-sm text-muted-foreground",e),...t})}),hm=Ee.forwardRef(({className:e,...t},o)=>{let n=at()?Ue.Close:He.Action;return jsx(n,{ref:o,className:T(tn(),e),...t})}),xm=Ee.forwardRef(({className:e,...t},o)=>{let n=at()?Ue.Close:He.Action;return jsx(n,{ref:o,className:T(tn({variant:"destructive"}),e),...t})}),vm=Ee.forwardRef(({className:e,...t},o)=>{let n=at()?Ue.Close:He.Cancel;return jsx(n,{ref:o,className:T(tn({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});mm.displayName="AlertDialogHeader";gm.displayName="AlertDialogFooter";fm.displayName="AlertDialogTitle";bm.displayName="AlertDialogDescription";hm.displayName="AlertDialogAction";xm.displayName="AlertDialogDangerAction";vm.displayName="AlertDialogCancel";var rn=Ee.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,type:n,...a},i)=>jsx("input",{ref:i,type:n,className:o?e:T("flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"h-9 rounded-md py-1 text-sm shadow-sm":"h-10 rounded-md py-2 text-sm shadow-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...a}));rn.displayName="Input";var ym=Ee.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,...n},a)=>jsx("textarea",{ref:a,className:o?e:T("flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"min-h-[60px] rounded-md text-sm shadow-sm":"min-h-[80px] rounded-md text-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...n}));ym.displayName="Textarea";var wm=Ee.forwardRef((e,t)=>jsx("select",{ref:t,...e}));wm.displayName="NativeSelect";var km=Ee.forwardRef((e,t)=>jsx("option",{ref:t,...e}));km.displayName="NativeOption";var Dm=[],Oo={expandedWidth:224,duration:280,copyDuration:180,copyOffset:8,easing:"cubic-bezier(0.16, 1, 0.3, 1)"},Fo={duration:180,closedWidth:28,easing:"cubic-bezier(0.16, 1, 0.3, 1)"};function Ps({children:e}){return jsx(Ke,{rowSelector:"[data-row]",highlightClassName:"sidebar-glide-highlight rounded-[7px] bg-hover-2",className:"group/glide flex flex-col gap-px",children:e})}r(Ps,"GlideGroup");function Ms({icon:e,label:t,active:o=false,count:n,onClick:a}){return jsxs("button",{"data-row":true,type:"button",onClick:a,className:`sidebar-row relative z-10 mx-2 flex h-8 items-center rounded-[var(--bui-radius-control)] px-2 text-left
203
205
  transition-[width,background-color,color,transform] duration-150 active:scale-[0.98]
204
- ${o?"bg-hover-2":""}`,children:[jsx("span",{className:`sidebar-row-icon flex size-5 shrink-0 items-center justify-center ${o?"text-ink":"text-ink-2"}`,children:e}),jsx("span",{className:`sidebar-copy ml-1.5 min-w-0 flex-1 truncate text-[14px] font-medium ${o?"text-ink":"text-ink-2"}`,children:t}),n&&jsx("span",{className:"sidebar-copy mr-2 shrink-0 text-[12px] font-medium tabular-nums text-ink-3",children:n})]})}r(ys,"RailButton");function pm({position:e,onClose:t,workspace:o,onAction:n}){let a=q();return vo(jsx("div",{"data-workspace-menu":true,className:"fixed z-50 w-64 rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:e.top,left:e.left,animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:jsxs(Xe,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[8px] bg-hover-2",children:[jsxs("button",{"data-menu-row":true,type:"button",onClick:t,className:"relative z-10 flex h-10 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-[7px] bg-ink text-[11px] font-semibold text-surface",children:o.monogram}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] font-medium text-ink",children:o.name}),jsx("span",{className:"shrink-0 text-ink",children:jsx(Check$1,{size:18})})]}),jsx("div",{className:"my-1 h-px bg-line"}),[{key:"new",label:"New workspace",icon:jsx(Plus,{size:16})},{key:"settings",label:"Workspace settings",icon:jsx(Settings,{size:16})},{key:"invite",label:"Invite team members",icon:jsx(UserPlus,{size:16})}].map(i=>jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{n?.(i.key),t();},className:"relative z-10 flex h-9 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-2",children:i.icon}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] text-ink",children:a(i.label)})]},i.label)),jsx("div",{className:"my-1 h-px bg-line"}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{n?.("sign-out"),t();},className:"relative z-10 flex h-9 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-2",children:jsx(LogOut,{size:16})}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] text-ink",children:a("Sign out")})]})]})}),document.body)}r(pm,"WorkspaceMenu");function mm({workspace:e={key:"",name:"",monogram:""},items:t=[],activeTitle:o,activeId:n,collapsible:a=true,showWorkspaceMenu:i=true,hasMore:l=false,loadingMore:s=false,onLoadMore:c,onWorkspaceAction:u,className:g="",fill:d=false,onNewChat:m,onPick:b,activeNav:v,onNavigate:S,footerLabel:h="",footerIcon:f,onFooterClick:w,recents:x=um,recentUpdate:C,onRenameRecent:I,onDeleteRecent:D}){let P=q(),[E,V]=useState(false),[j,B]=useState("chats"),y=v??j,R=r(z=>{B(z),S?.(z);},"selectNav"),[W,J]=useState(null),[G,Z]=useState(false),[de,le]=useState({top:0,left:0}),[_,ae]=useState(false),[K,me]=useState(""),Pe=useRef(null),N=useRef(null),[L,Y]=useState(),[X$1,Me]=useState(""),[oe,se]=useState(false),[Ie,H]=useState(false),ue=useRef(false),Ve=useRef(true);useEffect(()=>(Ve.current=true,()=>{Ve.current=false;}),[]);let Et=r((z,qe)=>{Y({item:z,action:qe}),Me(z.label),H(false);},"openEditor"),bo=r(async()=>{if(!(!L||ue.current||L.action==="rename"&&!X$1.trim())){ue.current=true,se(true),H(false);try{L.action==="rename"?await I?.(L.item.id,X$1.trim()):await D?.(L.item.id),Ve.current&&Y(void 0);}catch{Ve.current&&H(true);}finally{ue.current=false,Ve.current&&se(false);}}},"submitEdit"),ho=C?.id?x.some(z=>z.id===C.id)?x.map(z=>z.id===C.id?{...z,label:C.label}:z):[{...C},...x]:x,bt=o===void 0?W:o,Rt=ho.filter(z=>z.label.toLowerCase().includes(K.trim().toLowerCase()));useEffect(()=>{if(!G)return;let z=r(qe=>{let Ot=qe.target;!Ot.closest("[data-workspace-trigger]")&&!Ot.closest("[data-workspace-menu]")&&Z(false);},"close");return document.addEventListener("pointerdown",z),()=>document.removeEventListener("pointerdown",z)},[G]),useEffect(()=>{_&&N.current?.focus();},[_]);let Nt=r(()=>{V(true),Z(false),ae(false),me("");},"collapse");return jsx(A,{children:jsxs("aside",{"data-sidebar-collapsed":E,"aria-label":P("Workspace navigation"),className:`relative flex shrink-0 overflow-hidden transition-[width] ${d?"h-full":"h-[600px]"} ${g}`,style:{width:E?"calc(var(--bui-token-sidebar-row-height, var(--bui-spacing) * 9) + var(--bui-token-sidebar-inset, var(--bui-spacing) * 2) * 2)":d?"100%":Eo.expandedWidth,transitionDuration:`${Eo.duration}ms`,transitionTimingFunction:Eo.easing,"--bui-sidebar-copy-duration":`${Eo.copyDuration}ms`,"--bui-sidebar-copy-offset":`${Eo.copyOffset}px`,"--bui-sidebar-easing":Eo.easing},children:[jsxs("div",{className:`flex min-h-0 shrink-0 flex-col ${d?"w-full":"w-[224px]"}`,children:[jsxs("div",{className:"sidebar-header relative mb-2.5 h-10 shrink-0",children:[jsxs("button",{ref:Pe,"data-workspace-trigger":true,type:"button","aria-expanded":i?G:void 0,disabled:!i,"aria-hidden":E,tabIndex:E?-1:0,onClick:()=>{if(!G&&Pe.current){let z=Pe.current.getBoundingClientRect();le({top:z.bottom+6,left:z.left});}Z(z=>!z);},className:"sidebar-workspace-control absolute left-2 top-1 flex h-8 w-[164px] items-center rounded-[var(--bui-radius-control)] px-2 text-left transition-[background-color,transform] duration-100 hover:bg-hover-2 active:scale-[0.99]",children:[jsx("span",{className:"sidebar-logo flex size-5 shrink-0 items-center justify-center text-ink",children:jsx(IceCreamCone,{size:18})}),jsx("span",{className:"sidebar-copy ml-1.5 min-w-0 flex-1 truncate text-[14px] font-medium text-ink-2",children:e.name}),jsx("span",{className:"sidebar-copy ml-1 flex shrink-0 text-ink-3",children:i&&jsx(ChevronDown,{size:16})})]}),G&&jsx(pm,{workspace:e,onAction:u,position:de,onClose:()=>Z(false)}),jsx("button",{type:"button","aria-label":P("Collapse sidebar"),hidden:!a,style:{display:a?void 0:"none"},"aria-hidden":E,tabIndex:E?-1:0,onClick:Nt,className:"sidebar-collapse-control absolute right-2 top-1 flex size-8 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color] duration-150 hover:bg-hover-2 hover:text-ink",children:jsx(PanelLeftClose,{size:18})}),jsx("button",{type:"button","aria-label":P("Expand sidebar"),"aria-hidden":!E,tabIndex:E?0:-1,onClick:()=>V(false),className:"sidebar-expand-control absolute left-2 top-0.5 flex size-9 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color] duration-150 hover:bg-hover-2 hover:text-ink",children:jsx(PanelLeftClose,{size:18,className:"rotate-180"})})]}),jsxs(vs,{children:[jsx(ys,{icon:jsx(SquarePen,{size:18}),label:P("New chat"),onClick:()=>{o===void 0&&J(null),R("chats"),m?.();}}),t.map(z=>jsx(ys,{icon:z.icon,label:z.label,count:z.count,active:y===z.key,onClick:()=>R(z.key)},z.key))]}),jsxs("div",{hidden:E,className:"sidebar-history mt-3 min-h-0 flex-1 overflow-y-auto",children:[jsxs("div",{className:"sidebar-history-header sidebar-copy relative mx-2 mb-1 h-8",children:[jsxs("div",{"aria-hidden":_,className:`sidebar-history-label absolute inset-0 flex items-center gap-1.5 px-2 text-[12.5px] font-medium text-ink-3 transition-[opacity,transform] ${_?"pointer-events-none -translate-x-1 opacity-0":"translate-x-0 opacity-100"}`,style:{transitionDuration:`${Do.duration}ms`,transitionTimingFunction:Do.easing},children:[jsx(ChevronDown,{size:16}),jsx("span",{children:P("Chats")})]}),jsx("button",{type:"button","aria-label":P("Search chats"),"aria-expanded":_,onClick:()=>ae(true),className:`sidebar-search-control absolute right-0 top-0 z-10 flex size-8 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color,transform] hover:bg-hover-2 hover:text-ink active:scale-[0.96] ${_?"pointer-events-none opacity-0":"opacity-100"}`,style:{transitionDuration:`${Do.duration}ms`},children:jsx(Search,{size:16})}),jsxs("div",{className:`sidebar-search-field absolute right-0 top-0 z-20 flex h-8 items-center overflow-hidden rounded-[8px] bg-field text-ink-3 shadow-hairline transition-[width,opacity] focus-within:text-ink-2 ${_?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"}`,style:{width:_?"100%":Do.closedWidth,transitionDuration:`${Do.duration}ms`,transitionTimingFunction:Do.easing},children:[jsx("span",{className:"ml-2 flex shrink-0 items-center justify-center",children:jsx(Search,{size:15})}),jsx("input",{ref:N,value:K,onChange:z=>me(z.target.value),onKeyDown:z=>{z.key==="Escape"&&(ae(false),me(""));},placeholder:P("Search chats"),"aria-label":P("Search chat history"),className:"ml-1.5 min-w-0 flex-1 bg-transparent text-[13px] font-medium text-ink outline-none placeholder:text-ink-3"}),jsx("button",{type:"button","aria-label":P("Close chat search"),onClick:()=>{ae(false),me("");},className:"sidebar-search-control flex size-8 shrink-0 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover-2 hover:text-ink active:scale-[0.96]",children:jsx(X,{size:16})})]})]}),jsxs(vs,{children:[Rt.map(z=>{let qe=n!==void 0?z.id===n:z.label===bt;return jsxs("div",{"data-row":true,"data-running":z.running||void 0,title:z.label,className:`sidebar-row sidebar-recent-row relative z-10 flex items-center rounded-[var(--bui-radius-control)] ${qe?"bg-hover-2":""}`,children:[jsx("button",{type:"button",title:z.label,"aria-current":qe?"page":void 0,onClick:()=>{R("chats"),o===void 0&&J(z.label),b?.(z.id,z.label,z.prompt);},className:"sidebar-recent-select min-w-0 flex-1 self-stretch text-left",children:jsx("span",{className:`sidebar-copy block truncate text-sm font-medium ${qe?"text-ink":"text-ink-2"}`,children:z.label})}),z.running&&jsx("span",{className:"sidebar-recent-running",role:"status","aria-label":P("recentRunning"),title:P("recentRunning"),children:jsx(LoaderCircle,{size:16,className:"animate-spin","aria-hidden":"true"})}),(I||D)&&jsxs(_i,{children:[jsx(Fi,{asChild:true,children:jsx("button",{type:"button",className:"sidebar-recent-more flex shrink-0 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 hover:bg-hover hover:text-ink","aria-label":P("recentMore",{title:z.label}),title:P("recentMoreLabel"),children:jsx(MoreHorizontal,{size:16,"aria-hidden":"true"})})}),jsxs(Hr,{side:"right",align:"start",children:[I&&jsxs(En,{onSelect:()=>Et(z,"rename"),children:[jsx(Pencil,{size:16,"aria-hidden":"true"}),P("recentRename")]}),D&&jsxs(En,{onSelect:()=>Et(z,"delete"),children:[jsx(Trash2,{size:16,"aria-hidden":"true"}),P("recentDelete")]})]})]})]},z.id)}),K&&Rt.length===0&&jsx("div",{className:"sidebar-support-row sidebar-copy mx-2 px-2 py-2 text-[12.5px] text-ink-3",children:P("No chats found")})]}),l&&jsx("button",{type:"button",disabled:s||!c,onClick:c,className:"sidebar-support-row mx-2 rounded-[var(--bui-radius-chip)] px-2 py-2 text-left text-[13px] text-ink-2 hover:bg-hover-2 disabled:opacity-50",children:P(s?"Loading":"Load more")})]}),h&&jsx("div",{hidden:E,className:"sidebar-footer sidebar-copy mx-2 mt-3 w-[208px] border-t border-line pt-3",children:jsxs("button",{type:"button",onClick:w??m,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-control bg-hover-2 text-[12.5px] font-medium text-ink transition-[background-color,transform] duration-150 hover:bg-line-strong active:scale-[0.98]",children:[f,h]})})]}),jsx(ps,{open:!!L,onOpenChange:z=>{!z&&!ue.current&&Y(void 0);},children:jsxs(Qo,{closeLabel:P("recentClose"),showCloseButton:!oe,children:[jsx(Kr,{children:P(L?.action==="delete"?"recentDelete":"recentRename")}),jsx(Yr,{children:P(L?.action==="delete"?"recentDeleteDescription":"recentRenameDescription",{title:L?.item.label??""})}),jsxs("form",{onSubmit:z=>{z.preventDefault(),bo();},children:[L?.action==="rename"&&jsx(Jo,{autoFocus:true,maxLength:256,value:X$1,"aria-label":P("recentName"),disabled:oe,onChange:z=>Me(z.target.value)}),Ie&&jsx("p",{role:"alert",children:P("recentActionFailed")}),jsxs(Xr,{children:[jsx(Ce,{type:"button",disabled:oe,onClick:()=>Y(void 0),children:P("recentCancel")}),jsx(Ce,{type:"submit",disabled:oe||L?.action==="rename"&&!X$1.trim(),children:P(oe?"recentSaving":L?.action==="delete"?"recentDelete":"recentSave")})]})]})]})})]})})}r(mm,"BUISidebarNav");function Zt(e,t){if(typeof e!="string")return;let o=e.trim();if(!o||/[\u0000-\u001f\u007f\\]/.test(o)||/^https?:/i.test(o)&&!/^https?:\/\//i.test(o))return;let n;try{n=new URL(o,"https://monkeys.invalid/");}catch{return}if(!(n.username||n.password)){if(n.protocol==="http:"||n.protocol==="https:"||t==="link"&&(n.protocol==="mailto:"||n.protocol==="tel:"))return o;if(n.protocol==="blob:"){if(n.pathname.startsWith("null/"))return o;try{let a=new URL(n.pathname);if(["https:","http:"].includes(a.protocol)&&!a.username&&!a.password)return o}catch{}}}}r(Zt,"safeDisplayUrl");function ws(e){let t=Zt(e,"link");if(!(!t||!/^https?:\/\//i.test(t)))try{let o=new URL(t);return o.hash="",`${o.protocol}//${o.host.toLowerCase()}${o.pathname.replace(/\/+$/,"")}${o.search}`}catch{return}}r(ws,"citationKey");function ks(e,t){let o=ws(t);return o?e.find(n=>ws(n.href)===o):void 0}r(ks,"citedSource");function jn({source:e,className:t}){let o=Zt(e.image,"media");return o?jsx("img",{src:o,alt:"",className:`source-avatar ${t}`}):jsx("span",{"aria-hidden":true,className:`source-avatar inline-flex shrink-0 items-center justify-center bg-inset font-sans text-[8px] font-semibold uppercase leading-none text-ink-2 ${t}`,children:(e.domain||e.name).replace(/^www\./,"").charAt(0)})}r(jn,"SourceAvatar");function Gn({source:e}){return e?jsxs("a",{href:Zt(e.href,"link"),target:"_blank",rel:"noreferrer","data-bui-source-chip":true,className:`ml-0 mr-1 inline-flex h-4.5 translate-y-[-1px] items-center gap-1 rounded-[5px]
206
+ ${o?"bg-hover-2":""}`,children:[jsx("span",{className:`sidebar-row-icon flex size-5 shrink-0 items-center justify-center ${o?"text-ink":"text-ink-2"}`,children:e}),jsx("span",{className:`sidebar-copy ml-1.5 min-w-0 flex-1 truncate text-[14px] font-medium ${o?"text-ink":"text-ink-2"}`,children:t}),n&&jsx("span",{className:"sidebar-copy mr-2 shrink-0 text-[12px] font-medium tabular-nums text-ink-3",children:n})]})}r(Ms,"RailButton");function Um({position:e,onClose:t,workspace:o,onAction:n}){let a=q();return Co(jsx("div",{"data-workspace-menu":true,className:"fixed z-50 w-64 rounded-[14px] bg-surface p-1.5 shadow-overlay",style:{top:e.top,left:e.left,animation:"bui-pop-in 180ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:"top left"},children:jsxs(Ke,{className:"flex flex-col gap-px",highlightClassName:"inset-x-0 rounded-[8px] bg-hover-2",children:[jsxs("button",{"data-menu-row":true,type:"button",onClick:t,className:"relative z-10 flex h-10 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-[7px] bg-ink text-[11px] font-semibold text-surface",children:o.monogram}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] font-medium text-ink",children:o.name}),jsx("span",{className:"shrink-0 text-ink",children:jsx(Check$1,{size:18})})]}),jsx("div",{className:"my-1 h-px bg-line"}),[{key:"new",label:"New workspace",icon:jsx(Plus,{size:16})},{key:"settings",label:"Workspace settings",icon:jsx(Settings,{size:16})},{key:"invite",label:"Invite team members",icon:jsx(UserPlus,{size:16})}].map(i=>jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{n?.(i.key),t();},className:"relative z-10 flex h-9 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-2",children:i.icon}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] text-ink",children:a(i.label)})]},i.label)),jsx("div",{className:"my-1 h-px bg-line"}),jsxs("button",{"data-menu-row":true,type:"button",onClick:()=>{n?.("sign-out"),t();},className:"relative z-10 flex h-9 w-full items-center gap-1.5 rounded-[var(--bui-radius-control)] px-2 text-left",children:[jsx("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-2",children:jsx(LogOut,{size:16})}),jsx("span",{className:"min-w-0 flex-1 truncate text-[13.5px] text-ink",children:a("Sign out")})]})]})}),document.body)}r(Um,"WorkspaceMenu");function zm({workspace:e={key:"",name:"",monogram:""},items:t=[],activeTitle:o,activeId:n,collapsible:a=true,showWorkspaceMenu:i=true,hasMore:l=false,loadingMore:s=false,onLoadMore:c,onWorkspaceAction:u,className:g="",fill:d=false,onNewChat:m,onPick:b,activeNav:v,onNavigate:S,footerLabel:h="",footerIcon:f,onFooterClick:w,recents:x=Dm,recentUpdate:C,onRenameRecent:I,onDeleteRecent:D}){let P=q(),[E,V]=useState(false),[j,B]=useState("chats"),y=v??j,R=r(z=>{B(z),S?.(z);},"selectNav"),[W,J]=useState(null),[G,Z]=useState(false),[de,le]=useState({top:0,left:0}),[_,ae]=useState(false),[X$1,me]=useState(""),Pe=useRef(null),N=useRef(null),[L,Y]=useState(),[K,Me]=useState(""),[oe,se]=useState(false),[Ie,H]=useState(false),ue=useRef(false),Ve=useRef(true);useEffect(()=>(Ve.current=true,()=>{Ve.current=false;}),[]);let Ut=r((z,qe)=>{Y({item:z,action:qe}),Me(z.label),H(false);},"openEditor"),wo=r(async()=>{if(!(!L||ue.current||L.action==="rename"&&!K.trim())){ue.current=true,se(true),H(false);try{L.action==="rename"?await I?.(L.item.id,K.trim()):await D?.(L.item.id),Ve.current&&Y(void 0);}catch{Ve.current&&H(true);}finally{ue.current=false,Ve.current&&se(false);}}},"submitEdit"),ko=C?.id?x.some(z=>z.id===C.id)?x.map(z=>z.id===C.id?{...z,label:C.label}:z):[{...C},...x]:x,xt=o===void 0?W:o,Pt=ko.filter(z=>z.label.toLowerCase().includes(X$1.trim().toLowerCase()));useEffect(()=>{if(!G)return;let z=r(qe=>{let Ht=qe.target;!Ht.closest("[data-workspace-trigger]")&&!Ht.closest("[data-workspace-menu]")&&Z(false);},"close");return document.addEventListener("pointerdown",z),()=>document.removeEventListener("pointerdown",z)},[G]),useEffect(()=>{_&&N.current?.focus();},[_]);let Mt=r(()=>{V(true),Z(false),ae(false),me("");},"collapse");return jsx(A,{children:jsxs("aside",{"data-sidebar-collapsed":E,"aria-label":P("Workspace navigation"),className:`relative flex shrink-0 overflow-hidden transition-[width] ${d?"h-full":"h-[600px]"} ${g}`,style:{width:E?"calc(var(--bui-token-sidebar-row-height, var(--bui-spacing) * 9) + var(--bui-token-sidebar-inset, var(--bui-spacing) * 2) * 2)":d?"100%":Oo.expandedWidth,transitionDuration:`${Oo.duration}ms`,transitionTimingFunction:Oo.easing,"--bui-sidebar-copy-duration":`${Oo.copyDuration}ms`,"--bui-sidebar-copy-offset":`${Oo.copyOffset}px`,"--bui-sidebar-easing":Oo.easing},children:[jsxs("div",{className:`flex min-h-0 shrink-0 flex-col ${d?"w-full":"w-[224px]"}`,children:[jsxs("div",{className:"sidebar-header relative mb-2.5 h-10 shrink-0",children:[jsxs("button",{ref:Pe,"data-workspace-trigger":true,type:"button","aria-expanded":i?G:void 0,disabled:!i,"aria-hidden":E,tabIndex:E?-1:0,onClick:()=>{if(!G&&Pe.current){let z=Pe.current.getBoundingClientRect();le({top:z.bottom+6,left:z.left});}Z(z=>!z);},className:"sidebar-workspace-control absolute left-2 top-1 flex h-8 w-[164px] items-center rounded-[var(--bui-radius-control)] px-2 text-left transition-[background-color,transform] duration-100 hover:bg-hover-2 active:scale-[0.99]",children:[jsx("span",{className:"sidebar-logo flex size-5 shrink-0 items-center justify-center text-ink",children:jsx(IceCreamCone,{size:18})}),jsx("span",{className:"sidebar-copy ml-1.5 min-w-0 flex-1 truncate text-[14px] font-medium text-ink-2",children:e.name}),jsx("span",{className:"sidebar-copy ml-1 flex shrink-0 text-ink-3",children:i&&jsx(ChevronDown,{size:16})})]}),G&&jsx(Um,{workspace:e,onAction:u,position:de,onClose:()=>Z(false)}),jsx("button",{type:"button","aria-label":P("Collapse sidebar"),hidden:!a,style:{display:a?void 0:"none"},"aria-hidden":E,tabIndex:E?-1:0,onClick:Mt,className:"sidebar-collapse-control absolute right-2 top-1 flex size-8 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color] duration-150 hover:bg-hover-2 hover:text-ink",children:jsx(PanelLeftClose,{size:18})}),jsx("button",{type:"button","aria-label":P("Expand sidebar"),"aria-hidden":!E,tabIndex:E?0:-1,onClick:()=>V(false),className:"sidebar-expand-control absolute left-2 top-0.5 flex size-9 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color] duration-150 hover:bg-hover-2 hover:text-ink",children:jsx(PanelLeftClose,{size:18,className:"rotate-180"})})]}),jsxs(Ps,{children:[jsx(Ms,{icon:jsx(SquarePen,{size:18}),label:P("New chat"),onClick:()=>{o===void 0&&J(null),R("chats"),m?.();}}),t.map(z=>jsx(Ms,{icon:z.icon,label:z.label,count:z.count,active:y===z.key,onClick:()=>R(z.key)},z.key))]}),jsxs("div",{hidden:E,className:"sidebar-history mt-3 min-h-0 flex-1 overflow-y-auto",children:[jsxs("div",{className:"sidebar-history-header sidebar-copy relative mx-2 mb-1 h-8",children:[jsxs("div",{"aria-hidden":_,className:`sidebar-history-label absolute inset-0 flex items-center gap-1.5 px-2 text-[12.5px] font-medium text-ink-3 transition-[opacity,transform] ${_?"pointer-events-none -translate-x-1 opacity-0":"translate-x-0 opacity-100"}`,style:{transitionDuration:`${Fo.duration}ms`,transitionTimingFunction:Fo.easing},children:[jsx(ChevronDown,{size:16}),jsx("span",{children:P("Chats")})]}),jsx("button",{type:"button","aria-label":P("Search chats"),"aria-expanded":_,onClick:()=>ae(true),className:`sidebar-search-control absolute right-0 top-0 z-10 flex size-8 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[opacity,background-color,color,transform] hover:bg-hover-2 hover:text-ink active:scale-[0.96] ${_?"pointer-events-none opacity-0":"opacity-100"}`,style:{transitionDuration:`${Fo.duration}ms`},children:jsx(Search,{size:16})}),jsxs("div",{className:`sidebar-search-field absolute right-0 top-0 z-20 flex h-8 items-center overflow-hidden rounded-[8px] bg-field text-ink-3 shadow-hairline transition-[width,opacity] focus-within:text-ink-2 ${_?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"}`,style:{width:_?"100%":Fo.closedWidth,transitionDuration:`${Fo.duration}ms`,transitionTimingFunction:Fo.easing},children:[jsx("span",{className:"ml-2 flex shrink-0 items-center justify-center",children:jsx(Search,{size:15})}),jsx("input",{ref:N,value:X$1,onChange:z=>me(z.target.value),onKeyDown:z=>{z.key==="Escape"&&(ae(false),me(""));},placeholder:P("Search chats"),"aria-label":P("Search chat history"),className:"ml-1.5 min-w-0 flex-1 bg-transparent text-[13px] font-medium text-ink outline-none placeholder:text-ink-3"}),jsx("button",{type:"button","aria-label":P("Close chat search"),onClick:()=>{ae(false),me("");},className:"sidebar-search-control flex size-8 shrink-0 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover-2 hover:text-ink active:scale-[0.96]",children:jsx(X,{size:16})})]})]}),jsxs(Ps,{children:[Pt.map(z=>{let qe=n!==void 0?z.id===n:z.label===xt;return jsxs("div",{"data-row":true,"data-running":z.running||void 0,title:z.label,className:`sidebar-row sidebar-recent-row relative z-10 flex items-center rounded-[var(--bui-radius-control)] ${qe?"bg-hover-2":""}`,children:[jsx("button",{type:"button",title:z.label,"aria-current":qe?"page":void 0,onClick:()=>{R("chats"),o===void 0&&J(z.label),b?.(z.id,z.label,z.prompt);},className:"sidebar-recent-select min-w-0 flex-1 self-stretch text-left",children:jsx("span",{className:`sidebar-copy block truncate text-sm font-medium ${qe?"text-ink":"text-ink-2"}`,children:z.label})}),z.running&&jsx("span",{className:"sidebar-recent-running",role:"status","aria-label":P("recentRunning"),title:P("recentRunning"),children:jsx(LoaderCircle,{size:16,className:"animate-spin","aria-hidden":"true"})}),(I||D)&&jsxs(qi,{children:[jsx(Ki,{asChild:true,children:jsx("button",{type:"button",className:"sidebar-recent-more flex shrink-0 items-center justify-center rounded-[var(--bui-radius-control)] text-ink-3 hover:bg-hover hover:text-ink","aria-label":P("recentMore",{title:z.label}),title:P("recentMoreLabel"),children:jsx(MoreHorizontal,{size:16,"aria-hidden":"true"})})}),jsxs(Kr,{side:"right",align:"start",children:[I&&jsxs(On,{onSelect:()=>Ut(z,"rename"),children:[jsx(Pencil,{size:16,"aria-hidden":"true"}),P("recentRename")]}),D&&jsxs(On,{onSelect:()=>Ut(z,"delete"),children:[jsx(Trash2,{size:16,"aria-hidden":"true"}),P("recentDelete")]})]})]})]},z.id)}),X$1&&Pt.length===0&&jsx("div",{className:"sidebar-support-row sidebar-copy mx-2 px-2 py-2 text-[12.5px] text-ink-3",children:P("No chats found")})]}),l&&jsx("button",{type:"button",disabled:s||!c,onClick:c,className:"sidebar-support-row mx-2 rounded-[var(--bui-radius-chip)] px-2 py-2 text-left text-[13px] text-ink-2 hover:bg-hover-2 disabled:opacity-50",children:P(s?"Loading":"Load more")})]}),h&&jsx("div",{hidden:E,className:"sidebar-footer sidebar-copy mx-2 mt-3 w-[208px] border-t border-line pt-3",children:jsxs("button",{type:"button",onClick:w??m,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-control bg-hover-2 text-[12.5px] font-medium text-ink transition-[background-color,transform] duration-150 hover:bg-line-strong active:scale-[0.98]",children:[f,h]})})]}),jsx(ws,{open:!!L,onOpenChange:z=>{!z&&!ue.current&&Y(void 0);},children:jsxs(on,{closeLabel:P("recentClose"),showCloseButton:!oe,children:[jsx(ta,{children:P(L?.action==="delete"?"recentDelete":"recentRename")}),jsx(oa,{children:P(L?.action==="delete"?"recentDeleteDescription":"recentRenameDescription",{title:L?.item.label??""})}),jsxs("form",{onSubmit:z=>{z.preventDefault(),wo();},children:[L?.action==="rename"&&jsx(rn,{autoFocus:true,maxLength:256,value:K,"aria-label":P("recentName"),disabled:oe,onChange:z=>Me(z.target.value)}),Ie&&jsx("p",{role:"alert",children:P("recentActionFailed")}),jsxs(ea,{children:[jsx(Ce,{type:"button",disabled:oe,onClick:()=>Y(void 0),children:P("recentCancel")}),jsx(Ce,{type:"submit",disabled:oe||L?.action==="rename"&&!K.trim(),children:P(oe?"recentSaving":L?.action==="delete"?"recentDelete":"recentSave")})]})]})]})})]})})}r(zm,"BUISidebarNav");function eo(e,t){if(typeof e!="string")return;let o=e.trim();if(!o||/[\u0000-\u001f\u007f\\]/.test(o)||/^https?:/i.test(o)&&!/^https?:\/\//i.test(o))return;let n;try{n=new URL(o,"https://monkeys.invalid/");}catch{return}if(!(n.username||n.password)){if(n.protocol==="http:"||n.protocol==="https:"||t==="link"&&(n.protocol==="mailto:"||n.protocol==="tel:"))return o;if(n.protocol==="blob:"){if(n.pathname.startsWith("null/"))return o;try{let a=new URL(n.pathname);if(["https:","http:"].includes(a.protocol)&&!a.username&&!a.password)return o}catch{}}}}r(eo,"safeDisplayUrl");var _m=Object.defineProperty,Om=Object.defineProperties,Fm=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,$m=Object.prototype.hasOwnProperty,Hm=Object.prototype.propertyIsEnumerable,As=r((e,t,o)=>t in e?_m(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o,"O"),Ds=r((e,t)=>{for(var o in t||(t={}))$m.call(t,o)&&As(e,o,t[o]);if(Is)for(var o of Is(t))Hm.call(t,o)&&As(e,o,t[o]);return e},"I"),Us=r((e,t)=>Om(e,Fm(t)),"k"),nt=r((e,t)=>{let o=false,n=false;for(let a=0;a<t;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){n=!n,a+=2;continue}!n&&e[a]==="`"&&(o=!o);}return o||n},"c"),Wm=r((e,t)=>{let o=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",a=t>1&&e.substring(t-2,t+1)==="```";return o||n||a},"hn"),Vm=r(e=>{let t=0;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}e[o]==="`"&&!Wm(e,o)&&(t+=1);}return t},"L"),to=r((e,t)=>{let o=false,n=false,a=-1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){n=!n,i+=2;continue}if(!n&&e[i]==="`")if(o){if(a<t&&t<i)return true;o=false,a=-1;}else o=true,a=i;}return false},"f"),jm=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Gm=r(e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(jm,(t,o,n,a)=>nt(e,a)?t:`${o}\\>${n}`),"E"),qm=/(\*\*)([^*]*\*?)$/,Km=/(__)([^_]*?)$/,Xm=/(\*\*\*)([^*]*?)$/,Ym=/(\*)([^*]*?)$/,Qm=/(_)([^_]*?)$/,Zm=/(`)([^`]*?)$/,Jm=/(~~)([^~]*?)$/,xo=/^[\s_~*`]*$/,zs=/^[\s]*[-*+][\s]+$/,eg=/[\p{L}\p{N}_]/u,tg=/^```[^`\n]*```?$/,og=/^\*{4,}$/,ng=/(__)([^_]+)_$/,rg=/(~~)([^~]+)~$/,Bs=/~~/g,oo=r(e=>{if(!e)return false;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?true:eg.test(e)},"g");var ag=r((e,t)=>{let o=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")o+=1;else if(e[n]==="["&&(o-=1,o===0))return n;return -1},"X"),_s=r((e,t)=>{let o=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")o+=1;else if(e[n]==="]"&&(o-=1,o===0))return n;return -1},"C"),Xn=r((e,t)=>{let o=false,n=false;for(let a=0;a<e.length&&a<t;a+=1){if(e[a]==="\\"&&e[a+1]==="$"){a+=1;continue}e[a]==="$"&&(e[a+1]==="$"?(n=!n,a+=1,o=false):n||(o=!o));}return o||n},"h"),ig=r((e,t)=>{for(let o=t;o<e.length;o+=1){if(e[o]===")")return true;if(e[o]===`
207
+ `)return false}return false},"In"),Os=r((e,t)=>{for(let o=t-1;o>=0;o-=1){if(e[o]===")")return false;if(e[o]==="(")return o>0&&e[o-1]==="]"?ig(e,t):false;if(e[o]===`
208
+ `)return false}return false},"m"),sg=r((e,t)=>{for(let o=t-1;o>=0;o-=1){if(e[o]===">")return false;if(e[o]==="<"){let n=o+1<e.length?e[o+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[o]===`
209
+ `)return false}return false},"z"),aa=r((e,t,o)=>{let n=0;for(let c=t-1;c>=0;c-=1)if(e[c]===`
210
+ `){n=c+1;break}let a=e.length;for(let c=t;c<e.length;c+=1)if(e[c]===`
211
+ `){a=c;break}let i=e.substring(n,a),l=0,s=false;for(let c of i)if(c===o)l+=1;else if(c!==" "&&c!==" "){s=true;break}return l>=3&&!s},"p"),lg=r((e,t,o,n)=>o==="\\"||e.includes("$")&&Xn(e,t)?true:o!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(o==="*"||o&&n&&oo(o)&&oo(n)||(!o||o===" "||o===" "||o===`
212
+ `)&&(!n||n===" "||n===" "||n===`
213
+ `)),"kn"),Fs=r(e=>{let t=0,o=false,n=e.length;for(let a=0;a<n;a+=1){if(e[a]==="`"&&a+2<n&&e[a+1]==="`"&&e[a+2]==="`"){o=!o,a+=2;continue}if(o||e[a]!=="*")continue;let i=a>0?e[a-1]:"",l=a<n-1?e[a+1]:"";lg(e,a,i,l)||(t+=1);}return t},"Y"),cg=r((e,t,o,n)=>!!(o==="\\"||e.includes("$")&&Xn(e,t)||Os(e,t)||sg(e,t)||o==="_"||n==="_"||o&&n&&oo(o)&&oo(n)),"bn"),dg=r(e=>{let t=0,o=false,n=e.length;for(let a=0;a<n;a+=1){if(e[a]==="`"&&a+2<n&&e[a+1]==="`"&&e[a+2]==="`"){o=!o,a+=2;continue}if(o||e[a]!=="_")continue;let i=a>0?e[a-1]:"",l=a<n-1?e[a+1]:"";cg(e,a,i,l)||(t+=1);}return t},"Tn"),ug=r(e=>{let t=0,o=0,n=false;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){o>=3&&(t+=Math.floor(o/3)),o=0,n=!n,a+=2;continue}n||(e[a]==="*"?o+=1:(o>=3&&(t+=Math.floor(o/3)),o=0));}return o>=3&&(t+=Math.floor(o/3)),t},"Cn"),ia=r(e=>{let t=0,o=false;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){o=!o,n+=2;continue}o||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1);}return t},"A"),Ls=r(e=>{let t=0,o=false;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){o=!o,n+=2;continue}o||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1);}return t},"v"),pg=r((e,t,o)=>{if(!t||xo.test(t))return true;let n=e.substring(0,o).lastIndexOf(`
214
+ `),a=n===-1?0:n+1,i=e.substring(a,o);return zs.test(i)&&t.includes(`
215
+ `)?true:aa(e,o,"*")},"An"),mg=r(e=>{let t=e.match(qm);if(!t)return e;let o=t[2],n=e.lastIndexOf(t[1]);return nt(e,n)||to(e,n)||pg(e,o,n)?e:ia(e)%2===1?o.endsWith("*")?`${e}*`:`${e}**`:e},"j"),gg=r((e,t,o)=>{if(!t||xo.test(t))return true;let n=e.substring(0,o).lastIndexOf(`
216
+ `),a=n===-1?0:n+1,i=e.substring(a,o);return zs.test(i)&&t.includes(`
217
+ `)?true:aa(e,o,"_")},"Bn"),fg=r(e=>{let t=e.match(Km);if(!t){let a=e.match(ng);if(a){let i=e.lastIndexOf(a[1]);if(!(nt(e,i)||to(e,i))&&Ls(e)%2===1)return `${e}_`}return e}let o=t[2],n=e.lastIndexOf(t[1]);return nt(e,n)||to(e,n)||gg(e,o,n)?e:Ls(e)%2===1?`${e}__`:e},"Q"),bg=r(e=>{let t=false;for(let o=0;o<e.length;o+=1){if(e[o]==="`"&&o+2<e.length&&e[o+1]==="`"&&e[o+2]==="`"){t=!t,o+=2;continue}if(!t&&e[o]==="*"&&e[o-1]!=="*"&&e[o+1]!=="*"&&e[o-1]!=="\\"&&!Xn(e,o)){let n=o>0?e[o-1]:"",a=o<e.length-1?e[o+1]:"";if((!n||n===" "||n===" "||n===`
218
+ `)&&(!a||a===" "||a===" "||a===`
219
+ `)||n&&a&&oo(n)&&oo(a))continue;return o}}return -1},"Sn"),hg=r(e=>{if(!e.match(Ym))return e;let t=bg(e);if(t===-1||nt(e,t)||to(e,t))return e;let o=e.substring(t+1);return !o||xo.test(o)?e:Fs(e)%2===1?`${e}*`:e},"Z"),$s=r(e=>{let t=false;for(let o=0;o<e.length;o+=1){if(e[o]==="`"&&o+2<e.length&&e[o+1]==="`"&&e[o+2]==="`"){t=!t,o+=2;continue}if(!t&&e[o]==="_"&&e[o-1]!=="_"&&e[o+1]!=="_"&&e[o-1]!=="\\"&&!Xn(e,o)&&!Os(e,o)){let n=o>0?e[o-1]:"",a=o<e.length-1?e[o+1]:"";if(n&&a&&oo(n)&&oo(a))continue;return o}}return -1},"q"),xg=r(e=>{let t=e.length;for(;t>0&&e[t-1]===`
220
+ `;)t-=1;if(t<e.length){let o=e.slice(0,t),n=e.slice(t);return `${o}_${n}`}return `${e}_`},"_n"),vg=r(e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ia(t)%2!==1)return null;let o=t.indexOf("**"),n=$s(t);return o!==-1&&n!==-1&&o<n?`${t}_**`:null},"Pn"),yg=r(e=>{if(!e.match(Qm))return e;let t=$s(e);if(t===-1)return e;let o=e.substring(t+1);if(!o||xo.test(o)||nt(e,t)||to(e,t))return e;if(dg(e)%2===1){let n=vg(e);return n!==null?n:xg(e)}return e},"J"),wg=r(e=>{let t=ia(e),o=Fs(e);return t%2===0&&o%2===0},"$n"),kg=r((e,t,o)=>!t||xo.test(t)||nt(e,o)||to(e,o)?true:aa(e,o,"*"),"On"),Sg=r(e=>{if(og.test(e))return e;let t=e.match(Xm);if(!t)return e;let o=t[2],n=e.lastIndexOf(t[1]);return kg(e,o,n)?e:ug(e)%2===1?wg(e)?e:`${e}***`:e},"V"),Cg=/<[a-zA-Z/][^>]*$/,Tg=r(e=>{let t=e.match(Cg);return !t||t.index===void 0||nt(e,t.index)?e:e.substring(0,t.index).trimEnd()},"x"),Rg=r(e=>!e.match(tg)||e.includes(`
221
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,"En"),Ng=r(e=>(e.match(/```/g)||[]).length%2===1,"Mn"),Pg=r(e=>{let t=Rg(e);if(t!==null)return t;let o=e.match(Zm);if(o&&!Ng(e)){let n=o[2];if(!n||xo.test(n))return e;if(Vm(e)%2===1)return `${e}\``}return e},"nn"),Hs=r((e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```","en"),Mg=r(e=>{let t=0,o=false;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!Hs(e,n)&&(o=!o),!o&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},"Nn"),Ig=r(e=>{let t=0,o=false;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!Hs(e,n)){o=!o;continue}!o&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1);}return t},"yn"),Ag=r(e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return `${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
222
+ `,t)!==-1&&!e.endsWith(`
223
+ `)?`${e}
224
+ $$`:`${e}$$`},"Rn"),Bg=r(e=>Mg(e)%2===0?e:Ag(e),"rn"),Lg=r(e=>Ig(e)%2===1?`${e}$`:e,"sn"),Eg=r((e,t,o)=>{if(e.substring(t+2).includes(")"))return null;let n=ag(e,t);if(n===-1||nt(e,n))return null;let a=n>0&&e[n-1]==="!",i=a?n-1:n,l=e.substring(0,i);if(a)return l;let s=e.substring(n+1,t);return o==="text-only"?`${l}${s}`:`${l}[${s}](streamdown:incomplete-link)`},"Un"),Es=r((e,t)=>{for(let o=0;o<t;o++)if(e[o]==="["&&!nt(e,o)){if(o>0&&e[o-1]==="!")continue;let n=_s(e,o);if(n===-1)return o;if(n+1<e.length&&e[n+1]==="("){let a=e.indexOf(")",n+2);a!==-1&&(o=a);}}return t},"on"),Dg=r((e,t,o)=>{let n=t>0&&e[t-1]==="!",a=n?t-1:t;if(!e.substring(t+1).includes("]")){let i=e.substring(0,a);if(n)return i;if(o==="text-only"){let l=Es(e,t);return e.substring(0,l)+e.substring(l+1)}return `${e}](streamdown:incomplete-link)`}if(_s(e,t)===-1){let i=e.substring(0,a);if(n)return i;if(o==="text-only"){let l=Es(e,t);return e.substring(0,l)+e.substring(l+1)}return `${e}](streamdown:incomplete-link)`}return null},"Wn"),Ws=r((e,t="protocol")=>{let o=e.lastIndexOf("](");if(o!==-1&&!nt(e,o)){let n=Eg(e,o,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!nt(e,n)){let a=Dg(e,n,t);if(a!==null)return a}return e},"B"),Ug=/^-{1,2}$/,zg=/^[\s]*-{1,2}[\s]+$/,_g=/^={1,2}$/,Og=/^[\s]*={1,2}[\s]+$/,Fg=r(e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
225
+ `);if(t===-1)return e;let o=e.substring(t+1),n=e.substring(0,t),a=o.trim();if(Ug.test(a)&&!o.match(zg)){let i=n.split(`
226
+ `).at(-1);if(i&&i.trim().length>0)return `${e}\u200B`}if(_g.test(a)&&!o.match(Og)){let i=n.split(`
227
+ `).at(-1);if(i&&i.trim().length>0)return `${e}\u200B`}return e},"ln"),$g=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Hg=r(e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace($g,(t,o)=>nt(e,o)?t:"\\~"),"tn"),Wg=r(e=>{var t,o;let n=e.match(Jm);if(n){let a=n[2];if(!a||xo.test(a))return e;let i=e.lastIndexOf(n[1]);if(nt(e,i)||to(e,i))return e;if(((t=e.match(Bs))==null?void 0:t.length)%2===1)return `${e}~~`}else {let a=e.match(rg);if(a){let i=e.lastIndexOf(a[0].slice(0,2));if(nt(e,i)||to(e,i))return e;if(((o=e.match(Bs))==null?void 0:o.length)%2===1)return `${e}~`}}return e},"an"),ra=r(e=>e!==false,"S"),Vg=r(e=>e===true,"Fn"),ot={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},jg=[{handler:{name:"singleTilde",handle:Hg,priority:ot.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Gm,priority:ot.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Tg,priority:ot.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Fg,priority:ot.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Ws,priority:ot.LINKS},optionKey:"links",earlyReturn:r(e=>e.endsWith("](streamdown:incomplete-link)"),"earlyReturn")},{handler:{name:"boldItalic",handle:Sg,priority:ot.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:mg,priority:ot.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:fg,priority:ot.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:hg,priority:ot.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:yg,priority:ot.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Pg,priority:ot.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Wg,priority:ot.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Bg,priority:ot.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Lg,priority:ot.INLINE_KATEX},optionKey:"inlineKatex"}],Gg=r(e=>{var t;let o=(t=e?.linkMode)!=null?t:"protocol";return jg.filter(({handler:n,optionKey:a})=>n.name==="links"?ra(e?.links)||ra(e?.images):n.name==="inlineKatex"?Vg(e?.inlineKatex):ra(e?.[a])).map(({handler:n,earlyReturn:a})=>n.name==="links"?{handler:Us(Ds({},n),{handle:r(i=>Ws(i,o),"handle")}),earlyReturn:o==="protocol"?a:void 0}:{handler:n,earlyReturn:a})},"zn"),qg=r((e,t)=>{var o;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,a=Gg(t),i=((o=t?.handlers)!=null?o:[]).map(s=>{var c;return {handler:Us(Ds({},s),{priority:(c=s.priority)!=null?c:ot.DEFAULT}),earlyReturn:void 0}}),l=[...a,...i].sort((s,c)=>{var u,g;return ((u=s.handler.priority)!=null?u:0)-((g=c.handler.priority)!=null?g:0)});for(let{handler:s,earlyReturn:c}of l)if(n=s.handle(n),c!=null&&c(n))return n;return n},"vn"),Vs=qg;function js(e){let t=eo(e,"link");if(!(!t||!/^https?:\/\//i.test(t)))try{let o=new URL(t);return o.hash="",`${o.protocol}//${o.host.toLowerCase()}${o.pathname.replace(/\/+$/,"")}${o.search}`}catch{return}}r(js,"citationKey");function Gs(e,t){let o=js(t);return o?e.find(n=>js(n.href)===o):void 0}r(Gs,"citedSource");function Qn({source:e,className:t}){let o=eo(e.image,"media");return o?jsx("img",{src:o,alt:"",className:`source-avatar ${t}`}):jsx("span",{"aria-hidden":true,className:`source-avatar inline-flex shrink-0 items-center justify-center bg-inset font-sans text-[8px] font-semibold uppercase leading-none text-ink-2 ${t}`,children:(e.domain||e.name).replace(/^www\./,"").charAt(0)})}r(Qn,"SourceAvatar");function Zn({source:e}){return e?jsxs("a",{href:eo(e.href,"link"),target:"_blank",rel:"noreferrer","data-bui-source-chip":true,className:`ml-0 mr-1 inline-flex h-4.5 translate-y-[-1px] items-center gap-1 rounded-[5px]
205
228
  bg-inset pr-[3px] pl-[3px] align-middle font-mono text-[10.5px] text-ink-2 no-underline shadow-hairline
206
- transition-colors duration-150 hover:bg-hover hover:text-ink`,style:{animation:"bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx(jn,{source:e,className:"size-3 rounded-[3px]"}),jsx("span",{children:e.domain})]}):null}r(Gn,"SourceChip");var Ss=Symbol.for("@inf-monkeys-tech/monkeys-design/popover-open@1"),Cs=globalThis,Ts=Cs[Ss]??(Cs[Ss]=Ee.createContext(false));function Rs({open:e,defaultOpen:t,onOpenChange:o,...n}){let[a,i]=Ee.useState(t??false),l=e??a;return jsx(Ts.Provider,{value:l,children:jsx(Ct.Root,{...n,open:l,onOpenChange:s=>{i(s),o?.(s);}})})}r(Rs,"Popover");var Ns=Ct.Trigger;var Zr=Ee.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,portalForceMount:a,unstyled:i=false,className:l,style:s,...c},u){let g=ct();Ee.useContext(Ts);let d=typeof document<"u"?(()=>{let b=document.activeElement?.closest('[data-monkeys-dialog-content][data-state="open"]');return b||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsx(Ct.Portal,{container:n??d,forceMount:a,children:jsx(Ct.Content,{...g,...c,ref:u,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:i?l:T("z-50 w-72 border p-4 outline-hidden",zt("menu"),"data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",l),style:i?s:{pointerEvents:"auto",...s}})})},"PopoverContent"));Zr.displayName=Ct.Content.displayName;function Is({children:e,actions:t}){let o=useRef(false),[n,a]=useState(false),[i,l]=useState(false);return jsxs("span",{className:"agent-markdown-image","data-markdown-image":true,children:[t?.open?jsx(Lo,{unstyled:true,type:"button",className:"agent-markdown-image-open","aria-label":t.labels.open,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.open?.();},children:e}):e,t&&jsxs("span",{className:"agent-markdown-image-actions",children:[t.collect&&jsx(Lo,{type:"button",variant:"outline",size:"icon",title:t.labels.collect,"aria-label":t.labels.collect,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.collect?.();},children:jsx(FolderPlus,{"aria-hidden":"true"})}),t.download&&jsx(Lo,{type:"button",variant:"outline",size:"icon",disabled:n,title:t.labels.download,"aria-label":t.labels.download,onClick:async s=>{if(s.preventDefault(),s.stopPropagation(),!o.current){o.current=true,a(true),l(false);try{await t.download?.();}catch{l(true);}finally{o.current=false,a(false);}}},children:n?jsx(LoaderCircle,{"aria-hidden":"true",className:"animate-spin"}):jsx(Download,{"aria-hidden":"true"})}),t.edit&&jsx(Lo,{type:"button",variant:"outline",size:"icon",title:t.labels.edit,"aria-label":t.labels.edit,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.edit?.();},children:jsx(SquarePen,{"aria-hidden":"true"})})]}),i&&jsx("span",{className:"agent-markdown-image-error",role:"alert",children:t?.labels.failed})]})}r(Is,"AgentImageCard");var Ds=[],Yn=createContext({text:"",sources:Ds}),Us=createContext(false),zs=r(e=>/^data:image\/(?:png|jpeg|gif|webp|avif);base64,[A-Za-z0-9+/]+={0,2}$/i.test(e),"embeddedImage"),km=r(e=>zs(e)?e:defaultUrlTransform(e),"imageUrl"),Kn=r((e,t,o)=>!/^(?:javascript|vbscript|data):/i.test(t.trim())&&e?.supports(t,o),"owns"),ea=r(e=>typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(ea).join(""):isValidElement(e)?ea(e.props.children):"","textOf"),Sm=r(({src:e,alt:t,title:o})=>{let{resources:n}=useContext(Yn),a=useContext(Us),i=e&&(Kn(n,e,"image")?e:km(e));return jsx(Is,{actions:i&&!a?n?.imageActions?.({src:i,alt:t,title:o}):void 0,children:i&&Kn(n,i,"image")?n.image({src:i,alt:t,title:o}):jsx("img",{src:i||void 0,alt:t,title:o})})},"MarkdownImage"),Cm=r(({children:e,node:t})=>{let{text:o}=useContext(Yn),n=t?.position?o.slice(t.position.start.offset,t.position.end.offset):void 0,a=typeof e=="string"&&n?.replace(/\s/g,"")===e.replace(/\s/g,"");return jsx("p",{children:a?n:e})},"MarkdownParagraph"),Tm=r(({href:e,children:t,title:o})=>{let{sources:n,resources:a}=useContext(Yn),i=typeof t=="string"?t:jsx(Us.Provider,{value:true,children:t});if(e&&Kn(a,e,"link"))return jsx(Fragment,{children:a.link({href:e,children:i,title:o})});let l=ks(n,e);if(!l)return jsx("a",{href:e,target:"_blank",rel:"noreferrer noopener",children:i});let s=ea(t).trim(),c=!s||s.replace(/\/+$/,"")===String(e??"").replace(/\/+$/,"");return jsxs(Fragment,{children:[c?null:jsxs(Fragment,{children:[i," "]}),jsx(Gn,{source:l})]})},"MarkdownLink");function _s({text:e,sources:t=Ds,resources:o}){return jsx(Yn.Provider,{value:{text:e,sources:t,resources:o},children:jsx("div",{className:"streaming-markdown",children:jsx(ym,{skipHtml:true,remarkPlugins:[wm],urlTransform:(n,a,i)=>a==="src"&&i.tagName==="img"&&zs(n)||Kn(o,n,a==="src"?"image":"link")?n:defaultUrlTransform(n),components:{img:Sm,p:Cm,a:Tm,table:r(({children:n})=>jsx("div",{className:"streaming-table",children:jsx("table",{children:n})}),"table"),pre:r(({children:n})=>{if(!isValidElement(n))return jsx("pre",{children:n});let a=String(n.props.children??"").replace(/\n$/,""),i=n.props.className?.replace(/^language-/,"")??"";return jsx(Br,{filename:i,code:a,lines:a.split(`
207
- `)})},"pre")},children:e})})})}r(_s,"StreamingMarkdown");var Pm=[],Mm=[],Im=[],Am=["copy","retry","up","down"],Bm={continue:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"18",r:"3"}),jsx("circle",{cx:"6",cy:"6",r:"3"}),jsx("circle",{cx:"18",cy:"6",r:"3"}),jsx("path",{d:"M18 9a6 6 0 0 1-6 6 6 6 0 0 1-6-6"})]},"continue"),copy:jsxs("g",{children:[jsx("rect",{x:"9",y:"9",width:"12",height:"12",rx:"2.5"}),jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]},"copy"),retry:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"},"retry"),up:jsx("path",{d:"M7 10v12M15 5.88L14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88z"},"up"),down:jsx("path",{d:"M17 14V2M9 18.12L10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88z"},"down")},Os={copy:"Copy",retry:"Retry",up:"Like",down:"Dislike",continue:"Continue in new conversation"},Lm={sources:"Sources",followUps:"Follow-ups"};function Em({text:e,format:t="text",content:o=Pm,sources:n=Im,followUps:a=Mm,labels:i,streaming:l=false,responseComplete:s,onAction:c,actions:u=Am,disabledActions:g=[],fill:d=false,onDone:m,onFollowUp:b,resources:v}){let S=q(),h=ye(Lm,i),f=o.length,[w,x]=useState(false),C=!l,I=C&&(s??true);useEffect(()=>{I||x(false);},[I]);let D=useRef(m);return D.current=m,useEffect(()=>{C&&D.current?.();},[C]),jsx(A,{children:jsxs("div",{"data-bui-streaming-text":true,"data-streaming":l,className:d?"min-w-0 w-full":"min-h-[15.5rem] w-full max-w-95",children:[t==="markdown"&&e!==void 0?jsxs(Fragment,{children:[jsx(_s,{text:e,sources:n,resources:v}),!C&&jsx("span",{"aria-hidden":true,className:"inline-block h-3 w-0.5 rounded-full bg-ink"})]}):jsxs("p",{className:"whitespace-pre-wrap [overflow-wrap:anywhere] text-[13px] leading-relaxed text-ink",children:[e??o.slice(0,f).map((P,E)=>P.cite?jsx(Gn,{source:n[P.sourceIndex??0]},E):jsxs("span",{className:"inline",children:[P.text," "]},E)),!C&&jsx("span",{className:"ml-0.5 inline-block h-3 w-0.5 translate-y-0.5 rounded-full bg-ink",style:{animation:"bui-fade-in 150ms ease-out both"}})]}),I&&(c&&u.length>0||n.length>0)&&jsxs("div",{"data-bui-response-controls":true,className:"mt-2 flex items-center gap-0.5 text-ink-2",children:[c&&u.map(P=>jsx("button",{type:"button",disabled:!C||g.includes(P),"aria-label":S(Os[P]),title:S(Os[P]),"data-bui-action":P,onClick:()=>c?.(P),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-2
208
- transition-colors duration-100 hover:bg-hover-2`,children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:Bm[P]})},P)),n.length>0&&jsxs("button",{"data-bui-response-sources":true,type:"button",disabled:!C,"aria-expanded":w,onClick:()=>x(P=>!P),className:"ml-1.5 flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1 py-0.5 text-left text-ink-2 transition-colors duration-150 hover:bg-hover",children:[jsx("span",{className:"flex -space-x-1",children:n.slice(0,3).map(P=>jsx(jn,{source:P,className:"size-3.5 rounded-full bg-surface shadow-[0_0_0_1.5px_var(--bui-canvas)]"},P.href))}),jsx("span",{className:"text-[12px] text-ink-2",children:i?.sources??S("sourceCount",{count:n.length})})]})]}),I&&n.length>0&&jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:C&&w?"1fr":"0fr",opacity:C&&w?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"mt-1.5 flex flex-col rounded-[10px] bg-inset p-1 shadow-hairline",children:n.map(P=>jsxs("a",{href:Zt(P.href,"link"),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 rounded-[6px] px-1.5 py-1 text-[12px] text-ink-2 transition-colors duration-150 hover:bg-hover",children:[jsx(jn,{source:P,className:"size-4 rounded-[4px]"}),jsx("span",{className:"animated-underline",children:P.name}),jsx("span",{className:"ml-auto font-mono text-[10.5px] text-ink-2",children:P.domain})]},P.href))})})}),a.length>0&&jsxs("div",{"data-bui-follow-ups":true,className:"mt-2.5 transition-opacity duration-400",style:{opacity:C?1:0,pointerEvents:C?"auto":"none"},children:[jsx("p",{className:"text-[12px] font-medium text-ink-2",children:h.followUps}),jsx("div",{className:"mt-0.5 flex flex-col",children:a.map((P,E)=>jsxs("button",{type:"button",disabled:!C||!b,onClick:()=>b?.(P,E),className:`-mx-1.5 flex items-center gap-2 rounded-[var(--bui-radius-scale-7)]
229
+ transition-colors duration-150 hover:bg-hover hover:text-ink`,style:{animation:"bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx(Qn,{source:e,className:"size-3 rounded-[3px]"}),jsx("span",{children:e.domain})]}):null}r(Zn,"SourceChip");var qs=Symbol.for("@inf-monkeys-tech/monkeys-design/popover-open@1"),Ks=globalThis,Xs=Ks[qs]??(Ks[qs]=Ee.createContext(false));function Ys({open:e,defaultOpen:t,onOpenChange:o,...n}){let[a,i]=Ee.useState(t??false),l=e??a;return jsx(Xs.Provider,{value:l,children:jsx(Rt.Root,{...n,open:l,onOpenChange:s=>{i(s),o?.(s);}})})}r(Ys,"Popover");var Qs=Rt.Trigger;var sa=Ee.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,portalForceMount:a,unstyled:i=false,className:l,style:s,...c},u){let g=ut();Ee.useContext(Xs);let d=typeof document<"u"?(()=>{let b=document.activeElement?.closest('[data-monkeys-dialog-content][data-state="open"]');return b||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsx(Rt.Portal,{container:n??d,forceMount:a,children:jsx(Rt.Content,{...g,...c,ref:u,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:i?l:T("z-50 w-72 border p-4 outline-hidden",Ot("menu"),"data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",l),style:i?s:{pointerEvents:"auto",...s}})})},"PopoverContent"));sa.displayName=Rt.Content.displayName;function el({children:e,actions:t}){let o=useRef(false),[n,a]=useState(false),[i,l]=useState(false);return jsxs("span",{className:"agent-markdown-image","data-markdown-image":true,children:[t?.open?jsx(_o,{unstyled:true,type:"button",className:"agent-markdown-image-open","aria-label":t.labels.open,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.open?.();},children:e}):e,t&&jsxs("span",{className:"agent-markdown-image-actions",children:[t.collect&&jsx(_o,{type:"button",variant:"outline",size:"icon",title:t.labels.collect,"aria-label":t.labels.collect,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.collect?.();},children:jsx(FolderPlus,{"aria-hidden":"true"})}),t.download&&jsx(_o,{type:"button",variant:"outline",size:"icon",disabled:n,title:t.labels.download,"aria-label":t.labels.download,onClick:async s=>{if(s.preventDefault(),s.stopPropagation(),!o.current){o.current=true,a(true),l(false);try{await t.download?.();}catch{l(true);}finally{o.current=false,a(false);}}},children:n?jsx(LoaderCircle,{"aria-hidden":"true",className:"animate-spin"}):jsx(Download,{"aria-hidden":"true"})}),t.edit&&jsx(_o,{type:"button",variant:"outline",size:"icon",title:t.labels.edit,"aria-label":t.labels.edit,onClick:s=>{s.preventDefault(),s.stopPropagation(),t.edit?.();},children:jsx(SquarePen,{"aria-hidden":"true"})})]}),i&&jsx("span",{className:"agent-markdown-image-error",role:"alert",children:t?.labels.failed})]})}r(el,"AgentImageCard");var al=[],or=createContext({text:"",sources:al}),il=createContext(false),sl=r(e=>/^data:image\/(?:png|jpeg|gif|webp|avif);base64,[A-Za-z0-9+/]+={0,2}$/i.test(e),"embeddedImage"),rf=r(e=>sl(e)?e:defaultUrlTransform(e),"imageUrl");function af(){return e=>{visit(e,"html",(t,o,n)=>{n&&o!==void 0&&/^<br\s*\/?\s*>$/i.test(t.value)&&n.children.splice(o,1,{type:"break",position:t.position});});}}r(af,"remarkLineBreaks");var tr=r((e,t,o)=>!/^(?:javascript|vbscript|data):/i.test(t.trim())&&e?.supports(t,o),"owns"),ca=r(e=>typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(ca).join(""):isValidElement(e)?ca(e.props.children):"","textOf"),sf=r(({src:e,alt:t,title:o})=>{let{resources:n}=useContext(or),a=useContext(il),i=e&&(tr(n,e,"image")?e:rf(e));return jsx(el,{actions:i&&!a?n?.imageActions?.({src:i,alt:t,title:o}):void 0,children:i&&tr(n,i,"image")?n.image({src:i,alt:t,title:o}):jsx("img",{src:i||void 0,alt:t,title:o})})},"MarkdownImage"),lf=r(({children:e,node:t})=>{let{text:o}=useContext(or),n=t?.position?o.slice(t.position.start.offset,t.position.end.offset):void 0,a=typeof e=="string"&&n?.replace(/\s/g,"")===e.replace(/\s/g,"");return jsx("p",{children:a?n:e})},"MarkdownParagraph"),cf=r(({href:e,children:t,title:o})=>{let{sources:n,resources:a}=useContext(or),i=typeof t=="string"?t:jsx(il.Provider,{value:true,children:t});if(e&&tr(a,e,"link"))return jsx(Fragment,{children:a.link({href:e,children:i,title:o})});let l=Gs(n,e);if(!l)return jsx("a",{href:e,target:"_blank",rel:"noreferrer noopener",children:i});let s=ca(t).trim(),c=!s||s.replace(/\/+$/,"")===String(e??"").replace(/\/+$/,"");return jsxs(Fragment,{children:[c?null:jsxs(Fragment,{children:[i," "]}),jsx(Zn,{source:l})]})},"MarkdownLink");function ll({text:e,sources:t=al,resources:o,streaming:n=false}){let a=n?Vs(e,{linkMode:"text-only",katex:false}):e;return jsx(or.Provider,{value:{text:a,sources:t,resources:o},children:jsx("div",{className:"streaming-markdown",children:jsx(ef,{skipHtml:true,remarkPlugins:[tf,of,af],urlTransform:(i,l,s)=>l==="src"&&s.tagName==="img"&&sl(i)||tr(o,i,l==="src"?"image":"link")?i:defaultUrlTransform(i),components:{img:sf,p:lf,a:cf,table:r(({children:i})=>jsx("div",{className:"streaming-table",children:jsx("table",{children:i})}),"table"),pre:r(({children:i})=>{if(!isValidElement(i))return jsx("pre",{children:i});let l=String(i.props.children??"").replace(/\n$/,""),s=i.props.className?.replace(/^language-/,"")??"";return jsx(_r,{filename:s,code:l,lines:l.split(`
230
+ `)})},"pre")},children:a})})})}r(ll,"StreamingMarkdown");var pf=[],mf=[],gf=[],ff=["copy","retry","up","down"],bf={continue:jsxs("g",{children:[jsx("circle",{cx:"12",cy:"18",r:"3"}),jsx("circle",{cx:"6",cy:"6",r:"3"}),jsx("circle",{cx:"18",cy:"6",r:"3"}),jsx("path",{d:"M18 9a6 6 0 0 1-6 6 6 6 0 0 1-6-6"})]},"continue"),copy:jsxs("g",{children:[jsx("rect",{x:"9",y:"9",width:"12",height:"12",rx:"2.5"}),jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]},"copy"),retry:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"},"retry"),up:jsx("path",{d:"M7 10v12M15 5.88L14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88z"},"up"),down:jsx("path",{d:"M17 14V2M9 18.12L10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88z"},"down")},dl={copy:"Copy",retry:"Retry",up:"Like",down:"Dislike",continue:"Continue in new conversation"},hf={sources:"Sources",followUps:"Follow-ups"};function xf({text:e,format:t="text",content:o=pf,sources:n=gf,followUps:a=mf,labels:i,streaming:l=false,responseComplete:s,onAction:c,actions:u=ff,disabledActions:g=[],fill:d=false,onDone:m,onFollowUp:b,resources:v}){let S=q(),h=ye(hf,i),f=o.length,[w,x]=useState(false),C=!l,I=C&&(s??true);useEffect(()=>{I||x(false);},[I]);let D=useRef(m);return D.current=m,useEffect(()=>{C&&D.current?.();},[C]),jsx(A,{children:jsxs("div",{"data-bui-streaming-text":true,"data-streaming":l,className:d?"min-w-0 w-full":"min-h-[15.5rem] w-full max-w-95",children:[t==="markdown"&&e!==void 0?jsxs(Fragment,{children:[jsx(ll,{text:e,sources:n,resources:v,streaming:l}),!C&&jsx("span",{"aria-hidden":true,className:"inline-block h-3 w-0.5 rounded-full bg-ink"})]}):jsxs("p",{className:"whitespace-pre-wrap [overflow-wrap:anywhere] text-[13px] leading-relaxed text-ink",children:[e??o.slice(0,f).map((P,E)=>P.cite?jsx(Zn,{source:n[P.sourceIndex??0]},E):jsxs("span",{className:"inline",children:[P.text," "]},E)),!C&&jsx("span",{className:"ml-0.5 inline-block h-3 w-0.5 translate-y-0.5 rounded-full bg-ink",style:{animation:"bui-fade-in 150ms ease-out both"}})]}),I&&(c&&u.length>0||n.length>0)&&jsxs("div",{"data-bui-response-controls":true,className:"mt-2 flex items-center gap-0.5 text-ink-2",children:[c&&u.map(P=>jsx("button",{type:"button",disabled:!C||g.includes(P),"aria-label":S(dl[P]),title:S(dl[P]),"data-bui-action":P,onClick:()=>c?.(P),className:`flex size-6 items-center justify-center rounded-[var(--bui-radius-chip)] text-ink-2
231
+ transition-colors duration-100 hover:bg-hover-2`,children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:bf[P]})},P)),n.length>0&&jsxs("button",{"data-bui-response-sources":true,type:"button",disabled:!C,"aria-expanded":w,onClick:()=>x(P=>!P),className:"ml-1.5 flex items-center gap-1.5 rounded-[var(--bui-radius-chip)] px-1 py-0.5 text-left text-ink-2 transition-colors duration-150 hover:bg-hover",children:[jsx("span",{className:"flex -space-x-1",children:n.slice(0,3).map(P=>jsx(Qn,{source:P,className:"size-3.5 rounded-full bg-surface shadow-[0_0_0_1.5px_var(--bui-canvas)]"},P.href))}),jsx("span",{className:"text-[12px] text-ink-2",children:i?.sources??S("sourceCount",{count:n.length})})]})]}),I&&n.length>0&&jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:C&&w?"1fr":"0fr",opacity:C&&w?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"mt-1.5 flex flex-col rounded-[10px] bg-inset p-1 shadow-hairline",children:n.map(P=>jsxs("a",{href:eo(P.href,"link"),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 rounded-[6px] px-1.5 py-1 text-[12px] text-ink-2 transition-colors duration-150 hover:bg-hover",children:[jsx(Qn,{source:P,className:"size-4 rounded-[4px]"}),jsx("span",{className:"animated-underline",children:P.name}),jsx("span",{className:"ml-auto font-mono text-[10.5px] text-ink-2",children:P.domain})]},P.href))})})}),a.length>0&&jsxs("div",{"data-bui-follow-ups":true,className:"mt-2.5 transition-opacity duration-400",style:{opacity:C?1:0,pointerEvents:C?"auto":"none"},children:[jsx("p",{className:"text-[12px] font-medium text-ink-2",children:h.followUps}),jsx("div",{className:"mt-0.5 flex flex-col",children:a.map((P,E)=>jsxs("button",{type:"button",disabled:!C||!b,onClick:()=>b?.(P,E),className:`-mx-1.5 flex items-center gap-2 rounded-[var(--bui-radius-scale-7)]
209
232
  px-1.5 py-1.5 text-left text-[12.5px] text-ink-2 transition-colors
210
- duration-100 hover:bg-hover-2`,style:C?{animation:`bui-fade-up 350ms cubic-bezier(0.23,1,0.32,1) ${E*90}ms both`}:{opacity:0},children:[jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:[jsx("path",{d:"M9 10l-5 5 5 5"}),jsx("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})]}),P]},P))})]})]})})}r(Em,"BUIStreamingText");function Hs({progress:e,capsule:t,children:o,className:n}){let[a,i]=useState(false),l=q(),s=si(),c=typeof s.container=="function"?s.container():s.container,u=typeof HTMLElement<"u"&&c instanceof HTMLElement?c:void 0;return jsx(A,{children:jsx("div",{className:`bui-task-progress${n?` ${n}`:""}`,"data-bui-task-progress":true,children:jsxs(Rs,{open:a,onOpenChange:i,children:[jsx(Ns,{asChild:true,children:jsxs(Ce,{variant:"quiet",className:"bui-task-progress-trigger","data-status":e.status,"aria-label":e.summary,title:e.summary,children:[t,jsx(ChevronUp,{"aria-hidden":"true",className:"bui-task-progress-chevron","data-open":a})]})}),jsx(Zr,{unstyled:true,container:u??(typeof document<"u"?document.fullscreenElement:null),side:"top",align:"center",avoidCollisions:false,style:{zIndex:50},"aria-label":l("taskProgressTitle"),onOpenAutoFocus:g=>g.preventDefault(),children:jsx(A,{portal:true,children:jsx("div",{className:"bui-task-progress-panel",children:o})})})]})})})}r(Hs,"TaskProgress");function ta({active:e,children:t}){let i=2*Math.PI*11;return jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",style:{width:24,height:24},children:[jsxs("svg",{width:24,height:24,className:"absolute inset-0",style:e?{animation:"bui-spin 1.1s linear infinite"}:void 0,children:[jsx("circle",{cx:24/2,cy:24/2,r:11,fill:"none",stroke:"var(--bui-line)",strokeWidth:2}),e&&jsx("circle",{cx:24/2,cy:24/2,r:11,fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:2,strokeLinecap:"round",strokeDasharray:`${i*.28} ${i*.72}`})]}),jsx("span",{className:"relative text-[10.5px] font-semibold tabular-nums text-ink",children:t})]})}r(ta,"SpinnerRing");function Ws({tone:e,children:t}){return jsx("span",{className:`flex size-5.5 shrink-0 items-center justify-center rounded-full text-white
211
- ${e==="red"?"bg-red":"bg-green"}`,style:{animation:"bui-pop-in 300ms cubic-bezier(0.23,1,0.32,1) both"},children:t})}r(Ws,"Badge");var Fm=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),Om=jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),$m=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"})}),Hm={completed:"Completed",failed:"Failed"},Wm=[];function oa({variant:e="Capsules",rows:t=Wm,labels:o,className:n,onToggleRow:a,progress:i}){let[l,s]=useState({}),c=ye(Hm,o),u=q();if(e==="Progress"&&i){let b=t[i.current-1];if(!b)return null;let v={...b,label:u("taskProgressCurrent",{current:i.current,total:t.length,title:b.label}),status:i.status==="completed"?"done":i.status,step:i.current,details:[]};return jsx(Hs,{progress:i,className:n,capsule:jsx(oa,{variant:"Capsules",rows:[v],labels:o}),children:jsx(oa,{variant:"List",rows:t.map((S,h)=>({...S,step:S.step??h+1})),labels:o})})}let g=r(b=>b.status==="done"?jsx(Ws,{tone:"green",children:Om}):b.status==="running"?jsx(ta,{active:true,children:b.step}):b.status==="pending"?jsx(ta,{children:b.step}):b.status==="failed"?jsx(Ws,{tone:"red",children:Fm}):jsx(ta,{children:b.step}),"badgeFor"),d=r(b=>b.status==="done"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-green-tint px-2 text-[11.5px] font-medium text-green",children:c.completed}):b.status==="stopped"||b.status==="skipped"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-inset px-2 text-[11.5px] font-medium text-ink-2",children:u(`taskProgressStatus.${b.status}`)}):b.status==="running"?null:b.status==="failed"?jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-chip bg-red-tint px-2 text-[11.5px] font-medium text-red",style:{animation:"bui-fade-in 200ms ease-out both"},children:[c.failed," ",jsx("span",{style:{animation:"bui-spin 1.2s linear infinite"},className:"flex",children:$m})]}):null,"pillFor"),m=e==="List";return jsx(A,{children:jsx("div",{"data-bui-task-rows":true,"data-variant":m?"List":"Capsules",role:"list",className:`flex w-full max-w-110 flex-col ${m?"gap-0 self-start overflow-hidden rounded-card bg-surface shadow-card":"min-h-[196px] gap-2"}${n?` ${n}`:""}`,children:t.map((b,v)=>{let S=b.details.length>0,h=S?"button":"div",f=S&&(l[b.key]??false);return jsxs("div",{role:"listitem","data-status":b.status,className:`self-stretch overflow-hidden transition-[border-radius,background-color] duration-300 hover:bg-inset ${m?"border-b border-line last:border-0":"bg-surface shadow-card"}`,style:{borderRadius:m?0:"var(--bui-token-radius-card, var(--bui-radius-card))",animation:`bui-fade-up 450ms cubic-bezier(0.23,1,0.32,1) ${v*80}ms both`},children:[jsxs(h,{type:S?"button":void 0,"aria-expanded":S?f:void 0,onClick:S?()=>{s(w=>({...w,[b.key]:!f})),a?.(b.key,!f);}:void 0,className:"flex min-h-11 w-full items-center gap-2.5 px-2.5 py-2 text-left",children:[jsx("span",{className:"flex size-6 shrink-0 items-center justify-center",children:g(b)}),jsx("span",{"data-bui-task-label":true,className:"min-w-0 flex-1 [overflow-wrap:anywhere] text-[13px] font-medium text-ink",children:b.label}),jsx("span",{className:"text-[12.5px] text-ink-2 tabular-nums",children:b.amount}),d(b),S&&jsx("span",{"aria-hidden":"true",className:"-ml-2 flex size-7 shrink-0 items-center justify-center rounded-full text-ink-3",children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:f?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:f?"1fr":"0fr",opacity:f?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"mb-2.5 grid grid-cols-[24px_1fr] gap-2.5 px-2.5",children:[jsx("span",{"aria-hidden":true,className:"mx-auto h-full w-px bg-line"}),jsx("div",{className:"flex flex-col gap-1.5",children:b.details.map((w,x)=>jsxs("div",{className:"flex items-center justify-between",style:f?{animation:`bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) ${120+x*100}ms both`}:void 0,children:[jsx("span",{className:"text-[12px] text-ink-2",children:w.label}),jsx("span",{className:"font-mono text-[11.5px] text-ink-3 tabular-nums",children:w.meta})]},w.label))})]})})})]},b.key)})})})}r(oa,"BUITaskRows");function Gm({tone:e}){return jsx("span",{className:`flex size-3.5 shrink-0 items-center justify-center rounded-full text-white ${e}`,children:jsxs("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M3.5 12h17M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"})]})})}r(Gm,"Dot");var qm=["bg-accent","bg-orange","bg-green"];function Xm({variant:e="Steps",onSettled:t,rows:o,active:n,done:a,icon:i,status:l="running",query:s}){let c=q(),u=l==="running"?2:4,[g,d]=useState(null),[m,b]=useState(null),v={rows:[],active:c("Thinking"),done:c("Thought complete"),query:s},S={...v,rows:o??v.rows,active:n??v.active,done:a??v.done},h=u>=1&&u<4,f=S.rows.length>0||!!S.query,w=f?"button":"div",x=f&&(g??h),C=u<3,I=u<2?0:S.rows.length,D=useRef(null),[P,E]=useState(0);useLayoutEffect(()=>{D.current&&E(D.current.offsetHeight);},[I,x,e,u]);let V=useRef(false);return useEffect(()=>{if(C){V.current=false;return}V.current||(V.current=true,t?.());},[C,t]),jsx(A,{children:jsxs("div",{"data-bui-thinking":true,className:"flex w-full max-w-95 flex-col",style:{minHeight:C||x?"var(--bui-activity-min-height, 176px)":void 0,transition:"min-height 400ms cubic-bezier(0.23,1,0.32,1)"},children:[jsxs(w,{type:f?"button":void 0,"aria-expanded":f?x:void 0,onClick:f?()=>d(j=>!(j??h)):void 0,className:`-mx-1.5 flex w-fit items-center gap-2 rounded-control px-1.5 py-1
212
- transition-colors duration-100 hover:bg-hover-2`,children:[i?jsx("span",{className:"flex shrink-0 transition-colors duration-200",style:{color:C?"var(--bui-ink-2)":"var(--bui-ink-3)"},children:i}):jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:C?"var(--bui-ink-2)":"var(--bui-ink-3)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})}),jsx("span",{role:"status",className:"contents",children:C?jsx("span",{className:"bg-clip-text text-[13px] font-medium whitespace-nowrap text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:S.active}):jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-ink-2",style:{animation:"bui-fade-in 350ms ease-out both"},children:S.done})}),f&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:x?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-400",style:{gridTemplateRows:x?"1fr":"0fr",opacity:x?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"relative mt-1 ml-[5px] pl-4",children:[jsx("span",{"aria-hidden":true,className:"absolute left-[3px] w-px bg-line",style:{top:-8,height:P?P-2:0,transition:"height 500ms cubic-bezier(0.23,1,0.32,1)"}}),jsxs("div",{ref:D,className:"flex flex-col gap-1 py-1",children:[S.query&&jsxs("div",{className:"flex h-6 items-center gap-2 px-1.5",style:{animation:x?"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both":void 0},children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("span",{className:"text-[12.5px] text-ink-2",children:S.query})]}),S.rows.slice(0,I).map((j,B)=>{let y=jsxs(Fragment,{children:[e==="Search"&&jsx(Gm,{tone:qm[B%3]}),e==="Steps"&&(B<I-1||!C?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}})),jsx("span",{className:`min-w-0 text-[12.5px] ${e==="Reasoning"?"whitespace-pre-wrap [overflow-wrap:anywhere] leading-relaxed text-ink-2":"font-medium text-ink"} ${e==="Search"?"animated-underline":""}`,children:j.primary}),j.secondary&&jsx("span",{className:`shrink-0 text-[11.5px] text-ink-3 ${j.mono?"font-mono":""}`,children:j.secondary}),j.add!==void 0&&jsxs("span",{className:"shrink-0 font-mono text-[11px] tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",j.add]})," ",jsxs("span",{className:"text-red",children:["\u2212",j.del]})]})]}),R="flex min-h-7 w-full items-center gap-2 rounded-[6px] px-1.5 py-0.5 text-left",W={animation:`bui-fade-up 320ms cubic-bezier(0.23,1,0.32,1) ${B*120}ms both`};if(e==="Search")return jsx("a",{href:Zt(j.href,"link"),target:"_blank",rel:"noreferrer",className:`${R} transition-colors duration-150 hover:bg-hover`,style:W,children:y},j.primary);if(e==="Coding"){let J=m===j.primary;return jsx("button",{type:"button","aria-pressed":J,onClick:()=>b(J?null:j.primary),className:`${R} transition-colors duration-150 ${J?"bg-inset":"hover:bg-hover"}`,style:W,children:y},j.primary)}return jsx("div",{className:R,style:W,children:y},j.primary)}),e==="Search"&&u>=3&&jsx("span",{className:"text-[12px] text-ink-3",style:{animation:"bui-fade-in 300ms ease-out both"},children:c("More")})]})]})})})]},e)})}r(Xm,"BUIThinkingState");var Ym={think:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"}),write:jsx("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M17 3a2.8 2.8 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z"})}),run:jsx("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M4 17l6-5-6-5M12 19h8"})}),read:jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]})},Qm={header:"Tool calls",more:"More"},Zm=[],Jm=[],eg={};function tg({steps:e=Zm,diffs:t=Jm,diffLines:o=eg,labels:n,className:a,onOpenChange:i,onToggleRow:l}){let s=ye(Qm,n),c=e.length+1,[u,g]=useState(true),[d,m]=useState(new Set),[b,v]=useState(null),S=r(x=>C=>{let I=C.currentTarget.closest("[data-diffchip]").getBoundingClientRect(),D=38+(o[x]?.length??0)*19,P=I.bottom+6+D<=window.innerHeight-12;v({file:x,x:Math.max(12,Math.min(I.left,window.innerWidth-300)),...P?{top:I.bottom+6}:{bottom:window.innerHeight-I.top+6}});},"openPreview"),h=r(x=>()=>v(C=>C?.file===x?null:C),"closePreview"),f=e.length+1,w=r(x=>m(C=>{let I=new Set(C);return I.has(x)?I.delete(x):I.add(x),l?.(x,I.has(x)),I}),"toggleRow");return jsx(A,{children:jsxs("div",{"data-bui-tool-chips":true,className:`min-h-[var(--bui-activity-min-height,220px)] w-full max-w-80 pb-1${a?` ${a}`:""}`,children:[jsxs("button",{type:"button","aria-expanded":u,onClick:()=>g(x=>(i?.(!x),!x)),className:"-mx-1.5 flex w-fit items-center gap-1.5 rounded-control px-1.5 py-1 text-[12.5px] text-ink-2 transition-colors duration-100 hover:bg-hover-2",children:[jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-200",style:{transform:u?"rotate(0deg)":"rotate(-90deg)"},children:jsx("path",{d:"M6 9l6 6 6-6"})}),jsx("span",{className:"tabular-nums",children:s.header})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:u?"1fr":"0fr",opacity:u?1:0},children:jsxs("div",{className:"-mx-1 overflow-hidden px-1.5 pb-1",children:[jsx("div",{className:"mt-1.5 flex flex-col gap-1",children:e.slice(0,c).map(x=>{let C=d.has(x.label);return jsxs("div",{style:{animation:"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("button",{type:"button","aria-expanded":C,onClick:()=>w(x.label),className:"group/row -mx-[3px] flex min-h-7 w-[calc(100%+6px)] min-w-0 items-start gap-2 rounded-control px-[3px] text-left transition-colors duration-100 hover:bg-hover-2",children:[jsxs("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-ink-3",children:[jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:x.icon==="think"?"currentColor":"none",stroke:"currentColor",className:`transition-opacity duration-100 group-hover/row:opacity-0 ${C?"opacity-0":""}`,children:Ym[x.icon]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:`absolute transition-[opacity,transform] duration-150 group-hover/row:opacity-100 ${C?"opacity-100":"opacity-0"}`,style:{transform:C?"rotate(0deg)":"rotate(-90deg)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere] text-[12.5px] font-medium text-ink",children:x.label}),jsx("span",{className:`inline-flex h-5.5 shrink-0 items-center whitespace-nowrap rounded-chip bg-field px-1.5
233
+ duration-100 hover:bg-hover-2`,style:C?{animation:`bui-fade-up 350ms cubic-bezier(0.23,1,0.32,1) ${E*90}ms both`}:{opacity:0},children:[jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:[jsx("path",{d:"M9 10l-5 5 5 5"}),jsx("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})]}),P]},P))})]})]})})}r(xf,"BUIStreamingText");function pl({progress:e,capsule:t,children:o,className:n}){let[a,i]=useState(false),l=q(),s=bi(),c=typeof s.container=="function"?s.container():s.container,u=typeof HTMLElement<"u"&&c instanceof HTMLElement?c:void 0;return jsx(A,{children:jsx("div",{className:`bui-task-progress${n?` ${n}`:""}`,"data-bui-task-progress":true,children:jsxs(Ys,{open:a,onOpenChange:i,children:[jsx(Qs,{asChild:true,children:jsxs(Ce,{variant:"quiet",className:"bui-task-progress-trigger","data-status":e.status,"aria-label":e.summary,title:e.summary,children:[t,jsx(ChevronUp,{"aria-hidden":"true",className:"bui-task-progress-chevron","data-open":a})]})}),jsx(sa,{unstyled:true,container:u??(typeof document<"u"?document.fullscreenElement:null),side:"top",align:"center",avoidCollisions:false,style:{zIndex:50},"aria-label":l("taskProgressTitle"),onOpenAutoFocus:g=>g.preventDefault(),children:jsx(A,{portal:true,children:jsx("div",{className:"bui-task-progress-panel",children:o})})})]})})})}r(pl,"TaskProgress");function da({active:e,children:t}){let i=2*Math.PI*11;return jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",style:{width:24,height:24},children:[jsxs("svg",{width:24,height:24,className:"absolute inset-0",style:e?{animation:"bui-spin 1.1s linear infinite"}:void 0,children:[jsx("circle",{cx:24/2,cy:24/2,r:11,fill:"none",stroke:"var(--bui-line)",strokeWidth:2}),e&&jsx("circle",{cx:24/2,cy:24/2,r:11,fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:2,strokeLinecap:"round",strokeDasharray:`${i*.28} ${i*.72}`})]}),jsx("span",{className:"relative text-[10.5px] font-semibold tabular-nums text-ink",children:t})]})}r(da,"SpinnerRing");function ml({tone:e,children:t}){return jsx("span",{className:`flex size-5.5 shrink-0 items-center justify-center rounded-full text-white
234
+ ${e==="red"?"bg-red":"bg-green"}`,style:{animation:"bui-pop-in 300ms cubic-bezier(0.23,1,0.32,1) both"},children:t})}r(ml,"Badge");var Sf=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),Cf=jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),Tf=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"})}),Rf={completed:"Completed",failed:"Failed"},Nf=[];function ua({variant:e="Capsules",rows:t=Nf,labels:o,className:n,onToggleRow:a,progress:i}){let[l,s]=useState({}),c=ye(Rf,o),u=q();if(e==="Progress"&&i){let b=t[i.current-1];if(!b)return null;let v={...b,label:u("taskProgressCurrent",{current:i.current,total:t.length,title:b.label}),status:i.status==="completed"?"done":i.status,step:i.current,details:[]};return jsx(pl,{progress:i,className:n,capsule:jsx(ua,{variant:"Capsules",rows:[v],labels:o}),children:jsx(ua,{variant:"List",rows:t.map((S,h)=>({...S,step:S.step??h+1})),labels:o})})}let g=r(b=>b.status==="done"?jsx(ml,{tone:"green",children:Cf}):b.status==="running"?jsx(da,{active:true,children:b.step}):b.status==="pending"?jsx(da,{children:b.step}):b.status==="failed"?jsx(ml,{tone:"red",children:Sf}):jsx(da,{children:b.step}),"badgeFor"),d=r(b=>b.status==="done"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-green-tint px-2 text-[11.5px] font-medium text-green",children:c.completed}):b.status==="stopped"||b.status==="skipped"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-inset px-2 text-[11.5px] font-medium text-ink-2",children:u(`taskProgressStatus.${b.status}`)}):b.status==="running"?null:b.status==="failed"?jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-chip bg-red-tint px-2 text-[11.5px] font-medium text-red",style:{animation:"bui-fade-in 200ms ease-out both"},children:[c.failed," ",jsx("span",{style:{animation:"bui-spin 1.2s linear infinite"},className:"flex",children:Tf})]}):null,"pillFor"),m=e==="List";return jsx(A,{children:jsx("div",{"data-bui-task-rows":true,"data-variant":m?"List":"Capsules",role:"list",className:`flex w-full max-w-110 flex-col ${m?"gap-0 self-start overflow-hidden rounded-card bg-surface shadow-card":"min-h-[196px] gap-2"}${n?` ${n}`:""}`,children:t.map((b,v)=>{let S=b.details.length>0,h=S?"button":"div",f=S&&(l[b.key]??false);return jsxs("div",{role:"listitem","data-status":b.status,className:`self-stretch overflow-hidden transition-[border-radius,background-color] duration-300 hover:bg-inset ${m?"border-b border-line last:border-0":"bg-surface shadow-card"}`,style:{borderRadius:m?0:"var(--bui-token-radius-card, var(--bui-radius-card))",animation:`bui-fade-up 450ms cubic-bezier(0.23,1,0.32,1) ${v*80}ms both`},children:[jsxs(h,{type:S?"button":void 0,"aria-expanded":S?f:void 0,onClick:S?()=>{s(w=>({...w,[b.key]:!f})),a?.(b.key,!f);}:void 0,className:"flex min-h-11 w-full items-center gap-2.5 px-2.5 py-2 text-left",children:[jsx("span",{className:"flex size-6 shrink-0 items-center justify-center",children:g(b)}),jsx("span",{"data-bui-task-label":true,className:"min-w-0 flex-1 [overflow-wrap:anywhere] text-[13px] font-medium text-ink",children:b.label}),jsx("span",{className:"text-[12.5px] text-ink-2 tabular-nums",children:b.amount}),d(b),S&&jsx("span",{"aria-hidden":"true",className:"-ml-2 flex size-7 shrink-0 items-center justify-center rounded-full text-ink-3",children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:f?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:f?"1fr":"0fr",opacity:f?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"mb-2.5 grid grid-cols-[24px_1fr] gap-2.5 px-2.5",children:[jsx("span",{"aria-hidden":true,className:"mx-auto h-full w-px bg-line"}),jsx("div",{className:"flex flex-col gap-1.5",children:b.details.map((w,x)=>jsxs("div",{className:"flex items-center justify-between",style:f?{animation:`bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) ${120+x*100}ms both`}:void 0,children:[jsx("span",{className:"text-[12px] text-ink-2",children:w.label}),jsx("span",{className:"font-mono text-[11.5px] text-ink-3 tabular-nums",children:w.meta})]},w.label))})]})})})]},b.key)})})})}r(ua,"BUITaskRows");function If({tone:e}){return jsx("span",{className:`flex size-3.5 shrink-0 items-center justify-center rounded-full text-white ${e}`,children:jsxs("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M3.5 12h17M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"})]})})}r(If,"Dot");var Af=["bg-accent","bg-orange","bg-green"];function Bf({variant:e="Steps",onSettled:t,rows:o,active:n,done:a,icon:i,status:l="running",query:s}){let c=q(),u=l==="running"?2:4,[g,d]=useState(null),[m,b]=useState(null),v={rows:[],active:c("Thinking"),done:c("Thought complete"),query:s},S={...v,rows:o??v.rows,active:n??v.active,done:a??v.done},h=u>=1&&u<4,f=S.rows.length>0||!!S.query,w=f?"button":"div",x=f&&(g??h),C=u<3,I=u<2?0:S.rows.length,D=useRef(null),[P,E]=useState(0);useLayoutEffect(()=>{D.current&&E(D.current.offsetHeight);},[I,x,e,u]);let V=useRef(false);return useEffect(()=>{if(C){V.current=false;return}V.current||(V.current=true,t?.());},[C,t]),jsx(A,{children:jsxs("div",{"data-bui-thinking":true,className:"flex w-full max-w-95 flex-col",style:{minHeight:C||x?"var(--bui-activity-min-height, 176px)":void 0,transition:"min-height 400ms cubic-bezier(0.23,1,0.32,1)"},children:[jsxs(w,{type:f?"button":void 0,"aria-expanded":f?x:void 0,onClick:f?()=>d(j=>!(j??h)):void 0,className:`-mx-1.5 flex w-fit items-center gap-2 rounded-control px-1.5 py-1
235
+ transition-colors duration-100 hover:bg-hover-2`,children:[i?jsx("span",{className:"flex shrink-0 transition-colors duration-200",style:{color:C?"var(--bui-ink-2)":"var(--bui-ink-3)"},children:i}):jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:C?"var(--bui-ink-2)":"var(--bui-ink-3)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})}),jsx("span",{role:"status",className:"contents",children:C?jsx("span",{className:"bg-clip-text text-[13px] font-medium whitespace-nowrap text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:S.active}):jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-ink-2",style:{animation:"bui-fade-in 350ms ease-out both"},children:S.done})}),f&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:x?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-400",style:{gridTemplateRows:x?"1fr":"0fr",opacity:x?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"relative mt-1 ml-[5px] pl-4",children:[jsx("span",{"aria-hidden":true,className:"absolute left-[3px] w-px bg-line",style:{top:-8,height:P?P-2:0,transition:"height 500ms cubic-bezier(0.23,1,0.32,1)"}}),jsxs("div",{ref:D,className:"flex flex-col gap-1 py-1",children:[S.query&&jsxs("div",{className:"flex h-6 items-center gap-2 px-1.5",style:{animation:x?"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both":void 0},children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("span",{className:"text-[12.5px] text-ink-2",children:S.query})]}),S.rows.slice(0,I).map((j,B)=>{let y=jsxs(Fragment,{children:[e==="Search"&&jsx(If,{tone:Af[B%3]}),e==="Steps"&&(B<I-1||!C?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}})),jsx("span",{className:`min-w-0 text-[12.5px] ${e==="Reasoning"?"whitespace-pre-wrap [overflow-wrap:anywhere] leading-relaxed text-ink-2":"font-medium text-ink"} ${e==="Search"?"animated-underline":""}`,children:j.primary}),j.secondary&&jsx("span",{className:`shrink-0 text-[11.5px] text-ink-3 ${j.mono?"font-mono":""}`,children:j.secondary}),j.add!==void 0&&jsxs("span",{className:"shrink-0 font-mono text-[11px] tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",j.add]})," ",jsxs("span",{className:"text-red",children:["\u2212",j.del]})]})]}),R="flex min-h-7 w-full items-center gap-2 rounded-[6px] px-1.5 py-0.5 text-left",W={animation:`bui-fade-up 320ms cubic-bezier(0.23,1,0.32,1) ${B*120}ms both`};if(e==="Search")return jsx("a",{href:eo(j.href,"link"),target:"_blank",rel:"noreferrer",className:`${R} transition-colors duration-150 hover:bg-hover`,style:W,children:y},j.primary);if(e==="Coding"){let J=m===j.primary;return jsx("button",{type:"button","aria-pressed":J,onClick:()=>b(J?null:j.primary),className:`${R} transition-colors duration-150 ${J?"bg-inset":"hover:bg-hover"}`,style:W,children:y},j.primary)}return jsx("div",{className:R,style:W,children:y},j.primary)}),e==="Search"&&u>=3&&jsx("span",{className:"text-[12px] text-ink-3",style:{animation:"bui-fade-in 300ms ease-out both"},children:c("More")})]})]})})})]},e)})}r(Bf,"BUIThinkingState");var Ef={think:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"}),write:jsx("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M17 3a2.8 2.8 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z"})}),run:jsx("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M4 17l6-5-6-5M12 19h8"})}),read:jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsx("path",{d:"M14 2v6h6"})]})},Df={header:"Tool calls",more:"More"},Uf=[],zf=[],_f={};function Of({steps:e=Uf,diffs:t=zf,diffLines:o=_f,labels:n,className:a,onOpenChange:i,onToggleRow:l}){let s=ye(Df,n),c=e.length+1,[u,g]=useState(true),[d,m]=useState(new Set),[b,v]=useState(null),S=r(x=>C=>{let I=C.currentTarget.closest("[data-diffchip]").getBoundingClientRect(),D=38+(o[x]?.length??0)*19,P=I.bottom+6+D<=window.innerHeight-12;v({file:x,x:Math.max(12,Math.min(I.left,window.innerWidth-300)),...P?{top:I.bottom+6}:{bottom:window.innerHeight-I.top+6}});},"openPreview"),h=r(x=>()=>v(C=>C?.file===x?null:C),"closePreview"),f=e.length+1,w=r(x=>m(C=>{let I=new Set(C);return I.has(x)?I.delete(x):I.add(x),l?.(x,I.has(x)),I}),"toggleRow");return jsx(A,{children:jsxs("div",{"data-bui-tool-chips":true,className:`min-h-[var(--bui-activity-min-height,220px)] w-full max-w-80 pb-1${a?` ${a}`:""}`,children:[jsxs("button",{type:"button","aria-expanded":u,onClick:()=>g(x=>(i?.(!x),!x)),className:"-mx-1.5 flex w-fit items-center gap-1.5 rounded-control px-1.5 py-1 text-[12.5px] text-ink-2 transition-colors duration-100 hover:bg-hover-2",children:[jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-200",style:{transform:u?"rotate(0deg)":"rotate(-90deg)"},children:jsx("path",{d:"M6 9l6 6 6-6"})}),jsx("span",{className:"tabular-nums",children:s.header})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:u?"1fr":"0fr",opacity:u?1:0},children:jsxs("div",{className:"-mx-1 overflow-hidden px-1.5 pb-1",children:[jsx("div",{className:"mt-1.5 flex flex-col gap-1",children:e.slice(0,c).map(x=>{let C=d.has(x.label);return jsxs("div",{style:{animation:"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("button",{type:"button","aria-expanded":C,onClick:()=>w(x.label),className:"group/row -mx-[3px] flex min-h-7 w-[calc(100%+6px)] min-w-0 items-start gap-2 rounded-control px-[3px] text-left transition-colors duration-100 hover:bg-hover-2",children:[jsxs("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-ink-3",children:[jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:x.icon==="think"?"currentColor":"none",stroke:"currentColor",className:`transition-opacity duration-100 group-hover/row:opacity-0 ${C?"opacity-0":""}`,children:Ef[x.icon]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:`absolute transition-[opacity,transform] duration-150 group-hover/row:opacity-100 ${C?"opacity-100":"opacity-0"}`,style:{transform:C?"rotate(0deg)":"rotate(-90deg)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere] text-[12.5px] font-medium text-ink",children:x.label}),jsx("span",{className:`inline-flex h-5.5 shrink-0 items-center whitespace-nowrap rounded-chip bg-field px-1.5
213
236
  text-[11.5px] text-ink-2 shadow-hairline transition-colors duration-100 hover:bg-hover-2
214
237
  ${x.mono?"font-mono":""}`,children:x.chip})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:C?"1fr":"0fr",opacity:C?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"min-h-0 overflow-hidden",children:jsx("div",{className:"mt-0.5 mb-1 ml-2 flex flex-col gap-0.5 border-l border-line py-0.5 pl-3.5",children:x.detail.map(I=>jsx("span",{className:`whitespace-pre-wrap [overflow-wrap:anywhere] text-[11.5px] leading-[1.6] ${x.detailMono?"font-mono":""} ${I.tone==="add"?"text-green":"text-ink-2"}`,children:I.text},I.text))})})})]},x.label)})}),t.length>0&&c>=f&&jsx("div",{className:"mt-2.5 flex max-w-full flex-wrap gap-1.5 border-t border-line pt-2.5",children:t.map((x,C)=>jsx("span",{"data-diffchip":true,className:"relative",onMouseEnter:S(x.file),onMouseLeave:h(x.file),children:jsxs("button",{type:"button","aria-expanded":b?.file===x.file,"aria-label":`Show diff for ${x.file}`,onFocus:S(x.file),onBlur:h(x.file),className:`inline-flex h-7 max-w-full items-center gap-2 rounded-chip
215
238
  bg-surface px-2 font-mono text-[11.5px] text-ink shadow-btn
216
- transition-colors duration-100 hover:bg-hover`,style:{animation:`bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) ${C*80}ms both`},children:[jsx("span",{className:"min-w-0 truncate",children:x.file}),jsxs("span",{className:"shrink-0 text-green tabular-nums",children:["+",x.add]}),x.del>0&&jsxs("span",{className:"shrink-0 text-red tabular-nums",children:["\u2212",x.del]})]})},x.file))})]})}),b&&typeof document<"u"&&vo(jsxs("div",{className:"fixed z-50 w-72 overflow-hidden rounded-[10px] bg-surface shadow-overlay",style:{left:b.x,top:b.top,bottom:b.bottom,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:b.top===void 0?"bottom left":"top left"},children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5 font-mono text-[11px]",children:[jsx("span",{className:"min-w-0 truncate text-ink-2",children:b.file}),jsxs("span",{className:"shrink-0 tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",t.find(x=>x.file===b.file)?.add]}),(t.find(x=>x.file===b.file)?.del??0)>0&&jsxs("span",{className:"text-red",children:[" \u2212",t.find(x=>x.file===b.file)?.del]})]})]}),jsx("div",{className:"py-1 font-mono text-[11px] leading-[1.8]",children:(o[b.file]??[]).map((x,C)=>jsxs("div",{className:`flex gap-2 px-2.5 whitespace-pre ${x.tone==="add"?"bg-green-tint text-green":x.tone==="del"?"bg-red-tint text-red":"text-ink-2"}`,children:[jsx("span",{className:"w-3 shrink-0 select-none",children:x.tone==="add"?"+":x.tone==="del"?"\u2212":" "}),jsx("span",{className:"min-w-0 truncate",children:x.text})]},C))})]}),document.body)]})})}r(tg,"BUIToolChips");var js={recommended:"Recommended",send:"Send answer",sending:"Sending",answerPlaceholder:"Your answer",autoSendIn:"Sending recommended answers in {seconds}s",sent:"Answer sent",error:"Answer could not be sent",pending:"Answer is being processed",cancel:"Cancel question",cancelling:"Cancelling",cancelled:"Question cancelled"};function ig({questions:e,mode:t="blocking",deadlineAt:o,submitted:n=false,cancelled:a=false,pending:i=false,externalError:l=false,locked:s=false,initialAnswers:c,labels:u,onSubmitted:g,onCancelled:d}){let m=q(),b=ye(js,u),[v,S]=useState(()=>c??{}),[h,f]=useState(0),[w,x]=useState(0),C=useRef(null),I=useRef(false),D=Math.min(w,Math.max(0,e.length-1)),P=e[D],[E,V]=useState(()=>a?"cancelled":n?"submitted":i?"submitting":l?"error":"idle"),j=useRef(v),B=useRef(false),y=useRef(g),R=useRef(d);j.current=v,y.current=g,R.current=d;let W=E==="submitted"||E==="cancelled",J=E==="submitting"||E==="cancelling",G=s||J||W,de=!!(t==="asynchronous"&&e.length>0&&e.every(N=>N.options?.length)&&o&&Number.isFinite(Date.parse(o))),le=e.length>0&&e.every(N=>!!v[N.id]?.trim()),_=D<e.length-1,ae=!G&&(_?!!v[P.id]?.trim():le),K=useCallback(async(N,L=false)=>{if(!(B.current||s||i||n||a||W)&&!(L&&!R.current)){B.current=true,V(L?"cancelling":"submitting");try{L?await R.current():await y.current(N),V(L?"cancelled":"submitted");}catch{V("error");}finally{B.current=false;}}},[s,i,n,a,W]),me=r((N=false)=>{ae&&(_?(I.current=N,x(D+1)):K(j.current));},"advanceOrSubmit");useEffect(()=>{if(!I.current)return;I.current=false;let N=C.current;(N?.querySelector("input:not(:disabled)")??N?.querySelector('[role="radio"]:not(:disabled)'))?.focus();},[D]),useEffect(()=>{if(!de||!o||W)return;let N=Date.parse(o),L=r(()=>{let X=Math.max(0,N-Date.now());f(Math.ceil(X/1e3));},"update"),Y=setInterval(L,250);return L(),()=>clearInterval(Y)},[de,o,W]),useEffect(()=>{c&&(j.current=c,S(c));},[c]),useEffect(()=>{V(a?"cancelled":n?"submitted":i?"submitting":l?"error":N=>["submitting","submitted","cancelling","cancelled"].includes(N)?"idle":N);},[n,a,i,l]);let Pe=r((N,L)=>{G||(S(Y=>{let X={...Y,[N]:L};return j.current=X,X}),E==="error"&&V("idle"));},"updateAnswer");return e.length?jsx(A,{children:jsxs("section",{className:"bui-question-card w-full max-w-95 overflow-hidden rounded-card shadow-card","aria-label":m("questionPanel"),children:[jsxs("header",{className:"bui-question-header flex items-center justify-between gap-2 px-4 pt-3",children:[jsxs("span",{className:"flex items-center gap-2 text-sm",children:[jsx(MessageCircleQuestion,{size:16,"aria-hidden":"true"}),m("questionPanel")]}),e.length>1&&jsxs("nav",{className:"flex items-center gap-2","aria-label":m("questionNavigation"),children:[jsx(Ce,{type:"button",variant:"quiet",size:"sm","aria-label":m("Previous question"),disabled:D===0||J,onClick:()=>x(D-1),children:jsx(ChevronLeft,{size:16,"aria-hidden":"true"})}),jsx("span",{className:"text-xs","aria-live":"polite",children:m("questionPosition",{current:D+1,total:e.length})}),jsx(Ce,{type:"button",variant:"quiet",size:"sm","aria-label":m("Next question"),disabled:D===e.length-1||J,onClick:()=>x(D+1),children:jsx(ChevronRight,{size:16,"aria-hidden":"true"})})]})]}),jsx("div",{className:"primitive-card-pad flex flex-col gap-4",children:[P].map(N=>{let L=N.options??[],Y=N.allowCustom!==false||L.length===0;return jsxs("fieldset",{ref:C,className:"min-w-0",children:[jsx("legend",{className:"bui-question-title mb-2 text-[14px] font-medium",children:N.title}),jsx("div",{className:"flex flex-col gap-1",role:"radiogroup","aria-label":N.title,children:L.map((X,Me)=>{let oe=v[N.id]===X;return jsxs(Ce,{type:"button",variant:"quiet",size:"sm",role:"radio","aria-checked":oe,disabled:G,onClick:()=>Pe(N.id,X),className:"bui-question-option flex h-auto min-h-9 w-full justify-start gap-2 rounded-control px-2 py-1 text-left text-sm transition-colors disabled:opacity-60",children:[jsx("span",{className:"bui-question-option-marker flex size-4 shrink-0 items-center justify-center rounded-full","data-selected":oe?"true":void 0,children:oe?jsx("span",{className:"bui-question-option-mark size-1.5 rounded-full"}):null}),jsx("span",{className:"bui-question-option-label min-w-0 flex-1 break-words",children:X}),t==="asynchronous"&&Me===0&&jsx("span",{className:"bui-question-recommended shrink-0 rounded-control px-1.5 py-0.5 text-[11px] font-medium",children:b.recommended})]},`${N.id}:${Me}`)})}),Y&&jsx(Jo,{unstyled:true,type:N.customInputType??"text","aria-label":N.title,placeholder:m(b.answerPlaceholder),disabled:G,value:L.includes(v[N.id])?"":v[N.id]??"",onChange:X=>Pe(N.id,X.target.value),onKeyDown:X=>{X.key!=="Enter"||X.nativeEvent.isComposing||X.keyCode===229||X.repeat||X.shiftKey||X.ctrlKey||X.metaKey||X.altKey||(X.preventDefault(),X.stopPropagation(),me(true));},className:"bui-question-custom-answer mt-2 min-h-9 w-full rounded-control px-2.5 text-sm outline-none focus-visible:ring-2"})]},N.id)})}),jsxs("div",{className:"primitive-card-footer flex flex-wrap items-center justify-between gap-2",children:[jsx("div",{className:"bui-question-status min-h-5 text-[12px]","data-error":E==="error"?"true":void 0,role:E==="error"?"alert":"status","aria-live":"polite",children:E==="cancelled"?b.cancelled:E==="cancelling"?b.cancelling:E==="submitted"?b.sent:E==="submitting"?b.pending:E==="error"?b.error:de?b.autoSendIn.replace("{seconds}",String(h)):""}),!W&&jsxs("div",{className:"flex items-center gap-2",children:[d&&jsx(Ce,{size:"sm",variant:"quiet",disabled:s||J,onClick:()=>{K(j.current,true);},children:b.cancel}),jsx(Ce,{type:"button",size:"sm",variant:"accent",disabled:!ae,onClick:()=>me(),children:E==="submitting"?b.sending:D<e.length-1?m("Next question"):b.send})]})]})]})}):null}r(ig,"BUIQuestionCard");
239
+ transition-colors duration-100 hover:bg-hover`,style:{animation:`bui-pop-in 250ms cubic-bezier(0.23,1,0.32,1) ${C*80}ms both`},children:[jsx("span",{className:"min-w-0 truncate",children:x.file}),jsxs("span",{className:"shrink-0 text-green tabular-nums",children:["+",x.add]}),x.del>0&&jsxs("span",{className:"shrink-0 text-red tabular-nums",children:["\u2212",x.del]})]})},x.file))})]})}),b&&typeof document<"u"&&Co(jsxs("div",{className:"fixed z-50 w-72 overflow-hidden rounded-[10px] bg-surface shadow-overlay",style:{left:b.x,top:b.top,bottom:b.bottom,animation:"bui-pop-in 160ms cubic-bezier(0.23,1,0.32,1) both",transformOrigin:b.top===void 0?"bottom left":"top left"},children:[jsxs("div",{className:"flex items-center justify-between border-b border-line px-2.5 py-1.5 font-mono text-[11px]",children:[jsx("span",{className:"min-w-0 truncate text-ink-2",children:b.file}),jsxs("span",{className:"shrink-0 tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",t.find(x=>x.file===b.file)?.add]}),(t.find(x=>x.file===b.file)?.del??0)>0&&jsxs("span",{className:"text-red",children:[" \u2212",t.find(x=>x.file===b.file)?.del]})]})]}),jsx("div",{className:"py-1 font-mono text-[11px] leading-[1.8]",children:(o[b.file]??[]).map((x,C)=>jsxs("div",{className:`flex gap-2 px-2.5 whitespace-pre ${x.tone==="add"?"bg-green-tint text-green":x.tone==="del"?"bg-red-tint text-red":"text-ink-2"}`,children:[jsx("span",{className:"w-3 shrink-0 select-none",children:x.tone==="add"?"+":x.tone==="del"?"\u2212":" "}),jsx("span",{className:"min-w-0 truncate",children:x.text})]},C))})]}),document.body)]})})}r(Of,"BUIToolChips");var fl={recommended:"Recommended",send:"Send answer",sending:"Sending",answerPlaceholder:"Your answer",autoSendIn:"Sending recommended answers in {seconds}s",sent:"Answer sent",error:"Answer could not be sent",pending:"Answer is being processed",cancel:"Cancel question",cancelling:"Cancelling",cancelled:"Question cancelled"};function Vf({questions:e,mode:t="blocking",deadlineAt:o,submitted:n=false,cancelled:a=false,pending:i=false,externalError:l=false,locked:s=false,initialAnswers:c,labels:u,onSubmitted:g,onCancelled:d}){let m=q(),b=ye(fl,u),[v,S]=useState(()=>c??{}),[h,f]=useState(0),[w,x]=useState(0),C=useRef(null),I=useRef(false),D=Math.min(w,Math.max(0,e.length-1)),P=e[D],[E,V]=useState(()=>a?"cancelled":n?"submitted":i?"submitting":l?"error":"idle"),j=useRef(v),B=useRef(false),y=useRef(g),R=useRef(d);j.current=v,y.current=g,R.current=d;let W=E==="submitted"||E==="cancelled",J=E==="submitting"||E==="cancelling",G=s||J||W,de=!!(t==="asynchronous"&&e.length>0&&e.every(N=>N.options?.length)&&o&&Number.isFinite(Date.parse(o))),le=e.length>0&&e.every(N=>!!v[N.id]?.trim()),_=D<e.length-1,ae=!G&&(_?!!v[P.id]?.trim():le),X=useCallback(async(N,L=false)=>{if(!(B.current||s||i||n||a||W)&&!(L&&!R.current)){B.current=true,V(L?"cancelling":"submitting");try{L?await R.current():await y.current(N),V(L?"cancelled":"submitted");}catch{V("error");}finally{B.current=false;}}},[s,i,n,a,W]),me=r((N=false)=>{ae&&(_?(I.current=N,x(D+1)):X(j.current));},"advanceOrSubmit");useEffect(()=>{if(!I.current)return;I.current=false;let N=C.current;(N?.querySelector("input:not(:disabled)")??N?.querySelector('[role="radio"]:not(:disabled)'))?.focus();},[D]),useEffect(()=>{if(!de||!o||W)return;let N=Date.parse(o),L=r(()=>{let K=Math.max(0,N-Date.now());f(Math.ceil(K/1e3));},"update"),Y=setInterval(L,250);return L(),()=>clearInterval(Y)},[de,o,W]),useEffect(()=>{c&&(j.current=c,S(c));},[c]),useEffect(()=>{V(a?"cancelled":n?"submitted":i?"submitting":l?"error":N=>["submitting","submitted","cancelling","cancelled"].includes(N)?"idle":N);},[n,a,i,l]);let Pe=r((N,L)=>{G||(S(Y=>{let K={...Y,[N]:L};return j.current=K,K}),E==="error"&&V("idle"));},"updateAnswer");return e.length?jsx(A,{children:jsxs("section",{className:"bui-question-card w-full max-w-95 overflow-hidden rounded-card shadow-card","aria-label":m("questionPanel"),children:[jsxs("header",{className:"bui-question-header flex items-center justify-between gap-2 px-4 pt-3",children:[jsxs("span",{className:"flex items-center gap-2 text-sm",children:[jsx(MessageCircleQuestion,{size:16,"aria-hidden":"true"}),m("questionPanel")]}),e.length>1&&jsxs("nav",{className:"flex items-center gap-2","aria-label":m("questionNavigation"),children:[jsx(Ce,{type:"button",variant:"quiet",size:"sm","aria-label":m("Previous question"),disabled:D===0||J,onClick:()=>x(D-1),children:jsx(ChevronLeft,{size:16,"aria-hidden":"true"})}),jsx("span",{className:"text-xs","aria-live":"polite",children:m("questionPosition",{current:D+1,total:e.length})}),jsx(Ce,{type:"button",variant:"quiet",size:"sm","aria-label":m("Next question"),disabled:D===e.length-1||J,onClick:()=>x(D+1),children:jsx(ChevronRight,{size:16,"aria-hidden":"true"})})]})]}),jsx("div",{className:"primitive-card-pad flex flex-col gap-4",children:[P].map(N=>{let L=N.options??[],Y=N.allowCustom!==false||L.length===0;return jsxs("fieldset",{ref:C,className:"min-w-0",children:[jsx("legend",{className:"bui-question-title mb-2 text-[14px] font-medium",children:N.title}),jsx("div",{className:"flex flex-col gap-1",role:"radiogroup","aria-label":N.title,children:L.map((K,Me)=>{let oe=v[N.id]===K;return jsxs(Ce,{type:"button",variant:"quiet",size:"sm",role:"radio","aria-checked":oe,disabled:G,onClick:()=>Pe(N.id,K),className:"bui-question-option flex h-auto min-h-9 w-full justify-start gap-2 rounded-control px-2 py-1 text-left text-sm transition-colors disabled:opacity-60",children:[jsx("span",{className:"bui-question-option-marker flex size-4 shrink-0 items-center justify-center rounded-full","data-selected":oe?"true":void 0,children:oe?jsx("span",{className:"bui-question-option-mark size-1.5 rounded-full"}):null}),jsx("span",{className:"bui-question-option-label min-w-0 flex-1 break-words",children:K}),t==="asynchronous"&&Me===0&&jsx("span",{className:"bui-question-recommended shrink-0 rounded-control px-1.5 py-0.5 text-[11px] font-medium",children:b.recommended})]},`${N.id}:${Me}`)})}),Y&&jsx(rn,{unstyled:true,type:N.customInputType??"text","aria-label":N.title,placeholder:m(b.answerPlaceholder),disabled:G,value:L.includes(v[N.id])?"":v[N.id]??"",onChange:K=>Pe(N.id,K.target.value),onKeyDown:K=>{K.key!=="Enter"||K.nativeEvent.isComposing||K.keyCode===229||K.repeat||K.shiftKey||K.ctrlKey||K.metaKey||K.altKey||(K.preventDefault(),K.stopPropagation(),me(true));},className:"bui-question-custom-answer mt-2 min-h-9 w-full rounded-control px-2.5 text-sm outline-none focus-visible:ring-2"})]},N.id)})}),jsxs("div",{className:"primitive-card-footer flex flex-wrap items-center justify-between gap-2",children:[jsx("div",{className:"bui-question-status min-h-5 text-[12px]","data-error":E==="error"?"true":void 0,role:E==="error"?"alert":"status","aria-live":"polite",children:E==="cancelled"?b.cancelled:E==="cancelling"?b.cancelling:E==="submitted"?b.sent:E==="submitting"?b.pending:E==="error"?b.error:de?b.autoSendIn.replace("{seconds}",String(h)):""}),!W&&jsxs("div",{className:"flex items-center gap-2",children:[d&&jsx(Ce,{size:"sm",variant:"quiet",disabled:s||J,onClick:()=>{X(j.current,true);},children:b.cancel}),jsx(Ce,{type:"button",size:"sm",variant:"accent",disabled:!ae,onClick:()=>me(),children:E==="submitting"?b.sending:D<e.length-1?m("Next question"):b.send})]})]})]})}):null}r(Vf,"BUIQuestionCard");
217
240
 
218
- export { Ol as BUIAgentScreen, Xl as BUIApprovalCard, Ce as BUIButton, Kc as BUIChatComposer, gl as BUIChip, Br as BUICodeBlock, md as BUIContextCards, xd as BUIDiffTable, fl as BUIEntityChip, Td as BUIFilterTable, Ed as BUIFineTuneCard, Lr as BUIFlowNode, Gd as BUIFlowchart, Xe as BUIGlideMenu, iu as BUIInsightCards, kr as BUILoadingState, Sa as BUIMonogram, hl as BUIProgressRing, yr as BUIPromptBar, ig as BUIQuestionCard, cu as BUIRecommendationCard, gu as BUIRecordsTable, xu as BUISearchList, xl as BUISegmentedControl, Eu as BUISelectionActions, lr as BUIShimmer, mm as BUISidebarNav, Sl as BUIStatusPill, dr as BUIStreamText, Em as BUIStreamingText, Pl as BUISwitch, oa as BUITaskRows, Ml as BUITextRow, Xm as BUIThinkingState, tg as BUIToolChips, Al as BUIValuePill, js as DEFAULT_QUESTION_CARD_LABELS, wa as buiButtonVariants, Er as getBUIFlowConnection };
241
+ export { dc as BUIAgentScreen, xc as BUIApprovalCard, Ce as BUIButton, vd as BUIChatComposer, _l as BUIChip, _r as BUICodeBlock, zd as BUIContextCards, Hd as BUIDiffTable, Ol as BUIEntityChip, Xd as BUIFilterTable, ru as BUIFineTuneCard, Or as BUIFlowNode, bu as BUIFlowchart, Ke as BUIGlideMenu, Iu as BUIInsightCards, Pr as BUILoadingState, Ba as BUIMonogram, $l as BUIProgressRing, Rr as BUIPromptBar, Vf as BUIQuestionCard, Lu as BUIRecommendationCard, _u as BUIRecordsTable, Hu as BUISearchList, Hl as BUISegmentedControl, rp as BUISelectionActions, gr as BUIShimmer, zm as BUISidebarNav, ql as BUIStatusPill, br as BUIStreamText, xf as BUIStreamingText, Zl as BUISwitch, ua as BUITaskRows, Jl as BUITextRow, Bf as BUIThinkingState, Of as BUIToolChips, tc as BUIValuePill, fl as DEFAULT_QUESTION_CARD_LABELS, Ia as buiButtonVariants, Fr as getBUIFlowConnection };
219
242
  //# sourceMappingURL=index.mjs.map
220
243
  //# sourceMappingURL=index.mjs.map