@zhama/tego-ui 0.0.0-stage → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +172 -0
- package/assets/styles/tokens.css +1 -0
- package/dist/animations-FAPO43TO.css +1 -0
- package/dist/chunk-4MXE2PSC.js +1 -0
- package/dist/chunk-6HRT65AA.cjs +1 -0
- package/dist/chunk-6Z2BWV6F.js +1 -0
- package/dist/chunk-CRTE56HI.js +1 -0
- package/dist/chunk-ERURJLNK.cjs +1 -0
- package/dist/chunk-GZXKQ2K6.cjs +1 -0
- package/dist/chunk-H7AHFBEU.js +1 -0
- package/dist/chunk-M2GCF4FZ.cjs +1 -0
- package/dist/chunk-MTA2XHQG.cjs +1 -0
- package/dist/chunk-MVPRTW7Z.js +1 -0
- package/dist/chunk-NA5M3B4G.js +1 -0
- package/dist/chunk-ON32SVTM.cjs +1 -0
- package/dist/chunk-OS64HXLJ.js +1 -0
- package/dist/chunk-QPXIAUJD.js +1 -0
- package/dist/chunk-RWEJPTVG.cjs +1 -0
- package/dist/chunk-SHFR7LZH.js +1 -0
- package/dist/chunk-SLTTRXOU.cjs +1 -0
- package/dist/chunk-ULCTAAJ2.js +1 -0
- package/dist/chunk-UQZZ6WIZ.cjs +1 -0
- package/dist/chunk-YWPIPAUQ.cjs +1 -0
- package/dist/command-palette.cjs +1 -0
- package/dist/command-palette.d.cts +44 -0
- package/dist/command-palette.d.ts +44 -0
- package/dist/command-palette.js +1 -0
- package/dist/config-form/index.cjs +1 -0
- package/dist/config-form/index.d.cts +99 -0
- package/dist/config-form/index.d.ts +99 -0
- package/dist/config-form/index.js +1 -0
- package/dist/design-system/index.cjs +1 -0
- package/dist/design-system/index.d.cts +629 -0
- package/dist/design-system/index.d.ts +629 -0
- package/dist/design-system/index.js +1 -0
- package/dist/editors.cjs +1 -0
- package/dist/editors.d.cts +68 -0
- package/dist/editors.d.ts +68 -0
- package/dist/editors.js +1 -0
- package/dist/highlight-IORKDKTB.css +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +3157 -0
- package/dist/index.d.ts +3157 -0
- package/dist/index.js +2 -0
- package/dist/styles-447PVICJ.css +1 -0
- package/dist/styles-FZ7XXKJP.css +1 -0
- package/dist/summary-charts.cjs +1 -0
- package/dist/summary-charts.d.cts +45 -0
- package/dist/summary-charts.d.ts +45 -0
- package/dist/summary-charts.js +1 -0
- package/dist/tag-input.cjs +1 -0
- package/dist/tag-input.d.cts +15 -0
- package/dist/tag-input.d.ts +15 -0
- package/dist/tag-input.js +1 -0
- package/package.json +122 -4
- package/tailwind-preset.cjs +1 -0
- package/README.md +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var V=Object.defineProperty;var a=(e,r)=>V(e,"name",{value:r,configurable:!0});var chunkUQZZ6WIZ_cjs=require("./chunk-UQZZ6WIZ.cjs"),chunkGZXKQ2K6_cjs=require("./chunk-GZXKQ2K6.cjs"),chunkMTA2XHQG_cjs=require("./chunk-MTA2XHQG.cjs"),chunkM2GCF4FZ_cjs=require("./chunk-M2GCF4FZ.cjs"),chunkSLTTRXOU_cjs=require("./chunk-SLTTRXOU.cjs"),chunkERURJLNK_cjs=require("./chunk-ERURJLNK.cjs"),chunkON32SVTM_cjs=require("./chunk-ON32SVTM.cjs"),chunkRWEJPTVG_cjs=require("./chunk-RWEJPTVG.cjs"),chunkYWPIPAUQ_cjs=require("./chunk-YWPIPAUQ.cjs"),chunk6HRT65AA_cjs=require("./chunk-6HRT65AA.cjs");require("./styles-447PVICJ.css"),require("./animations-FAPO43TO.css"),require("./highlight-IORKDKTB.css");var React40=require("react"),jsxRuntime=require("react/jsx-runtime"),useEmblaCarousel=require("embla-carousel-react"),lucideReact=require("lucide-react"),CheckboxPrimitive=require("@radix-ui/react-checkbox"),CollapsiblePrimitive=require("@radix-ui/react-collapsible"),PopoverPrimitive=require("@radix-ui/react-popover"),DropdownMenuPrimitive=require("@radix-ui/react-dropdown-menu"),classVarianceAuthority=require("class-variance-authority"),AvatarPrimitive=require("@radix-ui/react-avatar"),SliderPrimitive=require("@radix-ui/react-slider"),TabsPrimitive=require("@radix-ui/react-tabs"),ToggleGroupPrimitive=require("@radix-ui/react-toggle-group"),locale=require("react-day-picker/locale"),reactDayPicker=require("react-day-picker"),ContextMenuPrimitive=require("@radix-ui/react-context-menu"),DialogPrimitive=require("@radix-ui/react-dialog"),reactDom=require("react-dom"),SeparatorPrimitive=require("@radix-ui/react-separator"),ScrollAreaPrimitive=require("@radix-ui/react-scroll-area"),HoverCardPrimitive=require("@radix-ui/react-hover-card"),ProgressPrimitive=require("@radix-ui/react-progress"),ToastPrimitives=require("@radix-ui/react-toast"),marked=require("marked"),ReactMarkdown=require("react-markdown"),remarkBreaks=require("remark-breaks"),DOMPurify=require("dompurify");function _interopDefault(e){return e&&e.__esModule?e:{default:e}}a(_interopDefault,"_interopDefault");function _interopNamespace(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:a(function(){return e[t]},"get")})}}),r.default=e,Object.freeze(r)}a(_interopNamespace,"_interopNamespace");var React40__namespace=_interopNamespace(React40),useEmblaCarousel__default=_interopDefault(useEmblaCarousel),CheckboxPrimitive__namespace=_interopNamespace(CheckboxPrimitive),CollapsiblePrimitive__namespace=_interopNamespace(CollapsiblePrimitive),PopoverPrimitive__namespace=_interopNamespace(PopoverPrimitive),DropdownMenuPrimitive__namespace=_interopNamespace(DropdownMenuPrimitive),AvatarPrimitive__namespace=_interopNamespace(AvatarPrimitive),SliderPrimitive__namespace=_interopNamespace(SliderPrimitive),TabsPrimitive__namespace=_interopNamespace(TabsPrimitive),ToggleGroupPrimitive__namespace=_interopNamespace(ToggleGroupPrimitive),ContextMenuPrimitive__namespace=_interopNamespace(ContextMenuPrimitive),DialogPrimitive__namespace=_interopNamespace(DialogPrimitive),SeparatorPrimitive__namespace=_interopNamespace(SeparatorPrimitive),ScrollAreaPrimitive__namespace=_interopNamespace(ScrollAreaPrimitive),HoverCardPrimitive__namespace=_interopNamespace(HoverCardPrimitive),ProgressPrimitive__namespace=_interopNamespace(ProgressPrimitive),ToastPrimitives__namespace=_interopNamespace(ToastPrimitives),ReactMarkdown__default=_interopDefault(ReactMarkdown),remarkBreaks__default=_interopDefault(remarkBreaks),DOMPurify__default=_interopDefault(DOMPurify),CARD_SURFACE={default:"border border-border/70 bg-card shadow-subtle",raised:"bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)] rounded-[var(--radius-card)]",sunken:"bg-[hsl(var(--surface-sunken))] rounded-[var(--radius-card)]"},CARD_INTERACTIVE={default:"hover:border-border-strong hover:shadow-card-hover active:bg-accent/30",raised:"hover:-translate-y-0.5 hover:shadow-[var(--shadow-lift)] motion-reduce:transform-none",sunken:"hover:bg-[hsl(var(--surface-sunken))]/70"},Card=React40__namespace.forwardRef(({className:e,interactive:r,surface:t="default",...s},n)=>jsxRuntime.jsx("div",{ref:n,className:chunkYWPIPAUQ_cjs.cn("group relative rounded-lg text-card-foreground transition-all duration-150",CARD_SURFACE[t],r&&chunkYWPIPAUQ_cjs.cn("cursor-pointer",CARD_INTERACTIVE[t]),e),...s}));Card.displayName="Card";var CardHeader=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex flex-col space-y-1.5 p-4 pb-2",e),...r}));CardHeader.displayName="CardHeader";var CardTitle=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("h3",{ref:t,className:chunkYWPIPAUQ_cjs.cn("text-sm font-medium leading-tight text-foreground",e),...r}));CardTitle.displayName="CardTitle";var CardDescription=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("p",{ref:t,className:chunkYWPIPAUQ_cjs.cn("text-sm text-muted-foreground",e),...r}));CardDescription.displayName="CardDescription";var CardContent=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,className:chunkYWPIPAUQ_cjs.cn("px-4 pb-4 pt-0",e),...r}));CardContent.displayName="CardContent";var CardFooter=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex items-center px-4 pb-4 pt-0",e),...r}));CardFooter.displayName="CardFooter";var CarouselContext=React40__namespace.createContext(null);function useCarousel(){const e=React40__namespace.useContext(CarouselContext);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}a(useCarousel,"useCarousel");var Carousel=React40__namespace.forwardRef(({orientation:e="horizontal",opts:r,setApi:t,plugins:s,className:n,children:o,...i},c)=>{const[u,d]=useEmblaCarousel__default.default({...r,axis:e==="horizontal"?"x":"y"},s),[l,x]=React40__namespace.useState(!1),[m,f]=React40__namespace.useState(!1),p=React40__namespace.useCallback(j=>{j&&(x(j.canScrollPrev()),f(j.canScrollNext()))},[]),g=React40__namespace.useCallback(()=>d?.scrollPrev(),[d]),v=React40__namespace.useCallback(()=>d?.scrollNext(),[d]),y=React40__namespace.useCallback(j=>{j.key==="ArrowLeft"?(j.preventDefault(),g()):j.key==="ArrowRight"&&(j.preventDefault(),v())},[g,v]);return React40__namespace.useEffect(()=>{!d||!t||t(d)},[d,t]),React40__namespace.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d.off("reInit",p),d.off("select",p)}},[d,p]),jsxRuntime.jsx(CarouselContext.Provider,{value:{carouselRef:u,api:d,opts:r,orientation:e||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:v,canScrollPrev:l,canScrollNext:m},children:jsxRuntime.jsx("div",{ref:c,onKeyDownCapture:y,className:chunkYWPIPAUQ_cjs.cn("relative",n),role:"region","aria-roledescription":"carousel",...i,children:o})})});Carousel.displayName="Carousel";var CarouselContent=React40__namespace.forwardRef(({className:e,...r},t)=>{const{carouselRef:s,orientation:n}=useCarousel();return jsxRuntime.jsx("div",{ref:s,className:"overflow-hidden",children:jsxRuntime.jsx("div",{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...r})})});CarouselContent.displayName="CarouselContent";var CarouselItem=React40__namespace.forwardRef(({className:e,...r},t)=>{const{orientation:s}=useCarousel();return jsxRuntime.jsx("div",{ref:t,role:"group","aria-roledescription":"slide",className:chunkYWPIPAUQ_cjs.cn("min-w-0 shrink-0 grow-0 basis-full",s==="horizontal"?"pl-4":"pt-4",e),...r})});CarouselItem.displayName="CarouselItem";var CarouselPrevious=React40__namespace.forwardRef(({className:e,...r},t)=>{const{orientation:s,scrollPrev:n,canScrollPrev:o}=useCarousel();return jsxRuntime.jsx("button",{ref:t,type:"button",disabled:!o,onClick:n,"aria-label":"Previous slide",className:chunkYWPIPAUQ_cjs.cn("absolute z-10 flex h-8 w-8 items-center justify-center rounded-full","border border-border/60 bg-background/80 text-foreground shadow-sm backdrop-blur","transition-opacity hover:bg-background disabled:pointer-events-none disabled:opacity-0",s==="horizontal"?"left-2 top-1/2 -translate-y-1/2":"left-1/2 top-2 -translate-x-1/2 rotate-90",e),...r,children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-4 w-4"})})});CarouselPrevious.displayName="CarouselPrevious";var CarouselNext=React40__namespace.forwardRef(({className:e,...r},t)=>{const{orientation:s,scrollNext:n,canScrollNext:o}=useCarousel();return jsxRuntime.jsx("button",{ref:t,type:"button",disabled:!o,onClick:n,"aria-label":"Next slide",className:chunkYWPIPAUQ_cjs.cn("absolute z-10 flex h-8 w-8 items-center justify-center rounded-full","border border-border/60 bg-background/80 text-foreground shadow-sm backdrop-blur","transition-opacity hover:bg-background disabled:pointer-events-none disabled:opacity-0",s==="horizontal"?"right-2 top-1/2 -translate-y-1/2":"bottom-2 left-1/2 -translate-x-1/2 rotate-90",e),...r,children:jsxRuntime.jsx(lucideReact.ArrowRight,{className:"h-4 w-4"})})});CarouselNext.displayName="CarouselNext";var Checkbox=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(CheckboxPrimitive__namespace.Root,{ref:t,className:chunkYWPIPAUQ_cjs.cn("peer h-3.5 w-3.5 shrink-0 rounded border border-primary ring-offset-background transition-colors duration-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=indeterminate]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",e),...r,children:jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator,{className:chunkYWPIPAUQ_cjs.cn("flex items-center justify-center text-current"),children:r.checked==="indeterminate"?jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3"}):jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})}));Checkbox.displayName=CheckboxPrimitive__namespace.Root.displayName;var RadioGroupContext=React40__namespace.createContext(null);function RadioGroup({value:e,onValueChange:r,disabled:t=!1,className:s,children:n,...o}){const i=React40__namespace.useId(),c=React40__namespace.useMemo(()=>({name:i,value:e,disabled:t,onValueChange:r}),[i,e,t,r]);return jsxRuntime.jsx(RadioGroupContext.Provider,{value:c,children:jsxRuntime.jsx("div",{role:"radiogroup","aria-disabled":t||void 0,className:chunkYWPIPAUQ_cjs.cn("grid gap-2",s),...o,children:n})})}a(RadioGroup,"RadioGroup");function RadioGroupItem({value:e,disabled:r,className:t,children:s}){const n=React40__namespace.useContext(RadioGroupContext);if(!n)throw new Error("RadioGroupItem must be inside a RadioGroup");const o=n.disabled||r;return jsxRuntime.jsxs("label",{className:chunkYWPIPAUQ_cjs.cn("flex cursor-pointer items-start gap-2 text-sm",o&&"cursor-not-allowed opacity-50",t),children:[jsxRuntime.jsx("input",{type:"radio",name:n.name,value:e,checked:n.value===e,disabled:o,onChange:a(()=>n.onValueChange(e),"onChange"),className:"mt-0.5 size-3.5 shrink-0 accent-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"}),jsxRuntime.jsx("span",{children:s})]})}a(RadioGroupItem,"RadioGroupItem");function createIndexes(e){const r=new Map,t=new Map,s=a((n,o)=>{o!==void 0&&r.set(n.id,o);const i=[];for(const c of n.children??[])i.push(c.id,...s(c,n.id));return t.set(n.id,i),i},"visit2");for(const n of e)s(n);return{parentById:r,descendantsById:t}}a(createIndexes,"createIndexes");function normalizeCascadingSelection(e,r){const{parentById:t}=createIndexes(e),s=new Set(r);return[...s].filter(n=>{const o=new Set;let i=t.get(n);for(;i!==void 0&&!o.has(i);){if(s.has(i))return!1;o.add(i),i=t.get(i)}return!0})}a(normalizeCascadingSelection,"normalizeCascadingSelection");function getCascadingSelectionState(e,r,t){const s=normalizeCascadingSelection(e,r),n=new Set(s),{parentById:o,descendantsById:i}=createIndexes(e),c=n.has(t);let u=!1;const d=new Set;let l=o.get(t);for(;l!==void 0&&!d.has(l);){if(n.has(l)){u=!0;break}d.add(l),l=o.get(l)}const x=!c&&!u&&(i.get(t)??[]).some(m=>n.has(m));return{checked:c||u,explicit:c,inherited:u,indeterminate:x}}a(getCascadingSelectionState,"getCascadingSelectionState");function toggleCascadingSelection(e,r,t){const s=normalizeCascadingSelection(e,r),n=getCascadingSelectionState(e,s,t);if(n.inherited)return s;if(n.explicit)return s.filter(c=>c!==t);const{descendantsById:o}=createIndexes(e),i=new Set(o.get(t)??[]);return normalizeCascadingSelection(e,[...s.filter(c=>!i.has(c)),t])}a(toggleCascadingSelection,"toggleCascadingSelection");function filterTree(e,r){return r?e.flatMap(t=>{const s=filterTree(t.children??[],r);return(typeof t.label=="string"?t.label:"").toLocaleLowerCase().includes(r)||s.length>0?[{...t,defaultExpanded:!0,children:s}]:[]}):e}a(filterTree,"filterTree");function CascadingTreeSelect({nodes:e,value:r,onValueChange:t,searchable:s=!1,disabledKeys:n=[],placeholder:o="Search",emptyText:i="No options",inheritedText:c="Inherited",selectedText:u=a((x,m)=>`${x} explicit \xB7 ${m} covered`,"selectedText"),className:d,renderNode:l}){const[x,m]=React40.useState(""),[f,p]=React40.useState(new Set),g=React40.useMemo(()=>normalizeCascadingSelection(e,r),[e,r]),v=React40.useMemo(()=>new Set(n),[n]),y=React40.useMemo(()=>filterTree(e,x.trim().toLocaleLowerCase()),[e,x]),j=React40.useMemo(()=>{let w=0;const C=a(E=>{for(const A of E)getCascadingSelectionState(e,g,A.id).checked&&(w+=1),C(A.children??[])},"visit2");return C(e),w},[e,g]);React40.useEffect(()=>{if(!x.trim())return;const w=new Set,C=a(E=>{for(const A of E)A.children?.length&&w.add(A.id),C(A.children??[])},"visit2");C(y),p(w)},[y,x]);const h=a((w,C=0)=>w.map(E=>{const A=!!E.children?.length,R=f.has(E.id)||E.defaultExpanded===!0,N=getCascadingSelectionState(e,g,E.id),k=E.disabled===!0||v.has(E.id)||N.inherited;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex min-h-9 items-center rounded-sm px-2 hover:bg-accent/50",N.checked&&"bg-primary/5"),style:{paddingLeft:`${C*20+8}px`},children:[A?jsxRuntime.jsx("button",{type:"button",className:"mr-1 flex h-5 w-5 items-center justify-center rounded hover:bg-muted",onClick:a(()=>p(M=>{const S=new Set(M);return S.has(E.id)?S.delete(E.id):S.add(E.id),S}),"onClick"),children:R?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-3.5 w-3.5"})}):jsxRuntime.jsx("span",{className:"mr-1 h-5 w-5"}),jsxRuntime.jsx(Checkbox,{checked:N.indeterminate?"indeterminate":N.checked,disabled:k,onCheckedChange:a(()=>t(toggleCascadingSelection(e,g,E.id)),"onCheckedChange")}),jsxRuntime.jsx("div",{className:"ml-2 min-w-0 flex-1 text-sm",children:l?l(E):E.label}),N.inherited&&jsxRuntime.jsx("span",{className:"ml-2 text-[10px] text-muted-foreground",children:c})]}),A&&R&&h(E.children??[],C+1)]},E.id)}),"renderItems");return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-2",d),children:[s&&jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.Input,{value:x,onChange:a(w=>m(w.target.value),"onChange"),placeholder:o,className:"h-8 pl-8 text-xs"})]}),jsxRuntime.jsx("div",{className:"max-h-64 overflow-y-auto rounded-md border bg-background p-1",children:y.length?h(y):jsxRuntime.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:i})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:u(g.length,j)})]})}a(CascadingTreeSelect,"CascadingTreeSelect");var TAG_TONES={50:"identity-surface [--identity-hue:50]",150:"identity-surface [--identity-hue:150]",190:"identity-surface [--identity-hue:190]",226:"identity-surface [--identity-hue:226]",262:"identity-surface [--identity-hue:262]",298:"identity-surface [--identity-hue:298]",336:"identity-surface [--identity-hue:336]"};function tagTone(e){return chunkYWPIPAUQ_cjs.cn(TAG_TONES[e],"bg-[var(--identity-soft)] text-[var(--identity-text)] ring-[color:var(--identity-soft)]")}a(tagTone,"tagTone");function getCapabilityTagTone(e){const r=e.trim().toLowerCase(),t=["\u95EE\u7B54","\u54A8\u8BE2","\u5BA2\u670D","support","qa","answer","assistant"],s=["\u5206\u6790","\u6D1E\u5BDF","\u62A5\u8868","\u6570\u636E","\u8BCA\u65AD","analysis","insight","report","data"],n=["\u68C0\u7D22","\u641C\u7D22","\u67E5\u8BE2","\u8D44\u6599","knowledge","search","retrieve","query","rag"],o=["\u6D41\u7A0B","\u6267\u884C","\u81EA\u52A8","\u534F\u4F5C","\u8C03\u5EA6","workflow","execute","automation","task","agent"],i=["\u5199\u4F5C","\u5185\u5BB9","\u6C9F\u901A","\u8425\u9500","\u8FD0\u8425","\u6587\u6848","writing","content","marketing","communication"],c=["\u8BBE\u5907","\u8FD0\u7EF4","\u76D1\u63A7","\u63A7\u5236","\u90E8\u7F72","\u5B89\u5168","\u4EE3\u7801","device","ops","monitor","control","deploy","security","code"],u=["\u77E5\u8BC6","\u7814\u7A76","research","\u89C4\u5212","\u7B56\u7565","plan","strategy"];return t.some(d=>r.includes(d))?tagTone(150):s.some(d=>r.includes(d))?tagTone(50):n.some(d=>r.includes(d))?tagTone(190):o.some(d=>r.includes(d))?"bg-primary/[0.08] text-primary ring-primary/12":i.some(d=>r.includes(d))?tagTone(262):c.some(d=>r.includes(d))?tagTone(336):u.some(d=>r.includes(d))?tagTone(298):tagTone(226)}a(getCapabilityTagTone,"getCapabilityTagTone");function CapabilityTag({label:e,size:r="sm",tone:t="auto",className:s,...n}){return jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("inline-flex max-w-full items-center truncate rounded-full font-medium ring-1",r==="sm"?"px-2 py-0.5 text-[10px]":"px-2.5 py-1 text-[11px]",t==="neutral"?"text-foreground/44 bg-foreground/[0.035] ring-border/35":getCapabilityTagTone(e),s),...n,children:e})}a(CapabilityTag,"CapabilityTag");var Collapsible=CollapsiblePrimitive__namespace.Root,CollapsibleTrigger=CollapsiblePrimitive__namespace.Trigger,CollapsibleContent=CollapsiblePrimitive__namespace.Content,Popover=PopoverPrimitive__namespace.Root,PopoverTrigger=PopoverPrimitive__namespace.Trigger,PopoverAnchor=PopoverPrimitive__namespace.Anchor,PopoverContent=React40__namespace.forwardRef(({className:e,align:r="center",sideOffset:t=4,portalContainer:s,...n},o)=>jsxRuntime.jsx(PopoverPrimitive__namespace.Portal,{container:s,children:jsxRuntime.jsx(PopoverPrimitive__namespace.Content,{ref:o,align:r,sideOffset:t,className:chunkYWPIPAUQ_cjs.cn("z-50 w-64 rounded-md border bg-popover p-3 text-popover-foreground shadow-elevation-2 outline-none 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",e),...n})}));PopoverContent.displayName=PopoverPrimitive__namespace.Content.displayName;var SEARCH_DEBOUNCE_MS=250;function Combobox({options:e,value:r,onChange:t,onSearch:s,searching:n=!1,selectedLabel:o,placeholder:i,searchPlaceholder:c,emptyText:u,clearLabel:d,allowClear:l=!0,disabled:x,defaultOpen:m=!1,onOpenChange:f,className:p,align:g="start",...v}){const[y,j]=React40__namespace.useState(m),[h,w]=React40__namespace.useState("");React40__namespace.useEffect(()=>{if(!s)return;const N=window.setTimeout(()=>s(h.trim()),SEARCH_DEBOUNCE_MS);return()=>window.clearTimeout(N)},[s,h]);const C=React40__namespace.useMemo(()=>{if(s)return e;const N=h.trim().toLowerCase();return N?e.filter(k=>`${k.label} ${k.description??""}`.toLowerCase().includes(N)):e},[s,e,h]),A=e.find(N=>N.value===r)?.label??o??r,R=a(N=>{j(N),N||w(""),f?.(N)},"change");return jsxRuntime.jsxs(Popover,{open:y,onOpenChange:R,children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",role:"combobox","aria-expanded":y,disabled:x,className:chunkYWPIPAUQ_cjs.cn("h-9 w-full justify-between gap-2 px-3 font-normal",p),...v,children:[jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("min-w-0 flex-1 truncate text-left",!A&&"text-muted-foreground"),children:A||i}),jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]})}),jsxRuntime.jsxs(PopoverContent,{align:g,className:chunkYWPIPAUQ_cjs.cn("w-[var(--radix-popover-trigger-width)] p-0",e.some(N=>N.depth!==void 0)&&"min-w-72 max-w-[calc(100vw-2rem)]"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),jsxRuntime.jsx("input",{type:"text",autoFocus:!0,value:h,placeholder:c,"aria-label":c,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60",onChange:a(N=>w(N.target.value),"onChange")}),h&&jsxRuntime.jsx("button",{type:"button","aria-label":d,className:"rounded-sm text-muted-foreground transition-colors hover:text-foreground",onClick:a(()=>w(""),"onClick"),children:jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})})]}),l&&r!==null&&jsxRuntime.jsxs("button",{type:"button",className:"flex w-full items-center justify-between border-b px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:a(()=>{t(null),R(!1)},"onClick"),children:[jsxRuntime.jsx("span",{children:d}),jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})]}),jsxRuntime.jsx("div",{className:"max-h-72 overflow-y-auto py-1",children:n?jsxRuntime.jsx("div",{className:"flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground",children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-3.5 w-3.5 animate-spin"})}):C.length===0?jsxRuntime.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:u}):C.map(N=>{const k=N.value===r;return jsxRuntime.jsxs("button",{type:"button",className:chunkYWPIPAUQ_cjs.cn("flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-muted",k&&"bg-muted/50"),style:N.depth===void 0?void 0:{paddingLeft:12+N.depth*16},onClick:a(()=>{t(N.value),R(!1)},"onClick"),children:[N.depth!==void 0&&N.depth>0&&jsxRuntime.jsx(lucideReact.CornerDownRight,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),jsxRuntime.jsxs("span",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("span",{className:"block truncate",children:N.label}),N.description&&jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:N.description})]}),jsxRuntime.jsx(lucideReact.Check,{className:chunkYWPIPAUQ_cjs.cn("h-4 w-4 shrink-0 text-primary",!k&&"text-transparent")})]},N.value)})})]})]})}a(Combobox,"Combobox");var DropdownMenu=DropdownMenuPrimitive__namespace.Root,DropdownMenuTrigger=DropdownMenuPrimitive__namespace.Trigger,DropdownMenuGroup=DropdownMenuPrimitive__namespace.Group,DropdownMenuPortal=DropdownMenuPrimitive__namespace.Portal,DropdownMenuSub=DropdownMenuPrimitive__namespace.Sub,DropdownMenuRadioGroup=DropdownMenuPrimitive__namespace.RadioGroup,DropdownMenuSubTrigger=React40__namespace.forwardRef(({className:e,inset:r,children:t,...s},n)=>jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger,{ref:n,className:chunkYWPIPAUQ_cjs.cn("flex cursor-default select-none items-center gap-2 rounded-md px-3 py-2 text-sm outline-none transition-colors duration-150","focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",e),...s,children:[t,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]}));DropdownMenuSubTrigger.displayName=DropdownMenuPrimitive__namespace.SubTrigger.displayName;var DropdownMenuSubContent=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubContent,{ref:t,className:chunkYWPIPAUQ_cjs.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-elevation-2","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",e),...r}));DropdownMenuSubContent.displayName=DropdownMenuPrimitive__namespace.SubContent.displayName;var DropdownMenuContent=React40__namespace.forwardRef(({className:e,sideOffset:r=4,...t},s)=>jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal,{children:jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Content,{ref:s,sideOffset:r,className:chunkYWPIPAUQ_cjs.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-elevation-2","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",e),...t})}));DropdownMenuContent.displayName=DropdownMenuPrimitive__namespace.Content.displayName;var DropdownMenuItem=React40__namespace.forwardRef(({className:e,inset:r,...t},s)=>jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item,{ref:s,className:chunkYWPIPAUQ_cjs.cn("relative flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-[13px] outline-none transition-colors duration-100","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-7",e),...t}));DropdownMenuItem.displayName=DropdownMenuPrimitive__namespace.Item.displayName;var DropdownMenuCheckboxItem=React40__namespace.forwardRef(({className:e,children:r,checked:t,...s},n)=>jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem,{ref:n,className:chunkYWPIPAUQ_cjs.cn("relative flex cursor-default select-none items-center rounded-md py-2 pl-8 pr-3 text-sm outline-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t??!1,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator,{children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})})}),r]}));DropdownMenuCheckboxItem.displayName=DropdownMenuPrimitive__namespace.CheckboxItem.displayName;var DropdownMenuRadioItem=React40__namespace.forwardRef(({className:e,children:r,...t},s)=>jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem,{ref:s,className:chunkYWPIPAUQ_cjs.cn("relative flex cursor-default select-none items-center rounded-md py-2 pl-8 pr-3 text-sm outline-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator,{children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})})}),r]}));DropdownMenuRadioItem.displayName=DropdownMenuPrimitive__namespace.RadioItem.displayName;var DropdownMenuLabel=React40__namespace.forwardRef(({className:e,inset:r,...t},s)=>jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Label,{ref:s,className:chunkYWPIPAUQ_cjs.cn("px-2 py-1.5 text-xs font-medium text-muted-foreground",r&&"pl-7",e),...t}));DropdownMenuLabel.displayName=DropdownMenuPrimitive__namespace.Label.displayName;var DropdownMenuSeparator=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator,{ref:t,className:chunkYWPIPAUQ_cjs.cn("-mx-1 my-1 h-px bg-muted",e),...r}));DropdownMenuSeparator.displayName=DropdownMenuPrimitive__namespace.Separator.displayName;var DropdownMenuShortcut=a(({className:e,...r})=>jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("ml-auto text-xs tracking-widest opacity-60",e),...r}),"DropdownMenuShortcut");DropdownMenuShortcut.displayName="DropdownMenuShortcut";function FilterChipRail({chips:e,value:r,onValueChange:t,className:s,"aria-label":n}){const o=React40__namespace.useRef(null),i=React40__namespace.useRef(new Map),[c,u]=React40__namespace.useState({start:!1,end:!1}),d=React40__namespace.useCallback(()=>{const f=o.current;if(!f)return;const p=f.scrollWidth-f.clientWidth;u({start:f.scrollLeft>1,end:p>1&&f.scrollLeft<p-1})},[]);React40__namespace.useEffect(()=>{const f=o.current;if(!f)return;d();const p=new ResizeObserver(d);return p.observe(f),()=>p.disconnect()},[d,e]);const l=a(f=>{const p=o.current;p&&p.scrollBy({left:f*p.clientWidth*.8,behavior:"smooth"})},"scrollBy"),x=a(f=>{if(e.length===0)return;const p=e.findIndex(j=>j.value===r),v=e[((p===-1?0:p)+f+e.length)%e.length];if(!v)return;t(v.value);const y=i.current.get(v.value);y?.focus(),y?.scrollIntoView({block:"nearest",inline:"nearest"})},"move"),m=a(f=>{f.key==="ArrowRight"?(f.preventDefault(),x(1)):f.key==="ArrowLeft"&&(f.preventDefault(),x(-1))},"handleKeyDown");return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("relative",s),children:[jsxRuntime.jsx("div",{ref:o,role:"radiogroup","aria-label":n,onScroll:d,onKeyDown:m,className:"flex gap-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:e.map(f=>{const p=f.value===r;return jsxRuntime.jsxs("button",{ref:a(g=>{g?i.current.set(f.value,g):i.current.delete(f.value)},"ref"),type:"button",role:"radio","aria-checked":p,tabIndex:p?0:-1,onClick:a(()=>t(f.value),"onClick"),className:chunkYWPIPAUQ_cjs.cn("inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1 text-xs font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",p?"border-primary/30 bg-primary/10 text-primary":"border-border bg-background text-muted-foreground hover:border-foreground/20 hover:text-foreground"),children:[f.label,f.count!==void 0&&jsxRuntime.jsx("span",{className:"tabular-nums opacity-60",children:f.count})]},f.value)})}),c.start&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-0 w-10 bg-gradient-to-r from-background to-transparent"}),jsxRuntime.jsx(EdgeButton,{side:"start",onClick:a(()=>l(-1),"onClick")})]}),c.end&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 right-0 w-10 bg-gradient-to-l from-background to-transparent"}),jsxRuntime.jsx(EdgeButton,{side:"end",onClick:a(()=>l(1),"onClick")})]})]})}a(FilterChipRail,"FilterChipRail");function EdgeButton({side:e,onClick:r}){return jsxRuntime.jsx("button",{type:"button","aria-hidden":!0,tabIndex:-1,onClick:r,className:chunkYWPIPAUQ_cjs.cn("absolute top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full","border border-border bg-background text-muted-foreground shadow-sm","transition-colors hover:text-foreground",e==="start"?"left-0":"right-0"),children:e==="start"?jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-3.5 w-3.5"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-3.5 w-3.5"})})}a(EdgeButton,"EdgeButton");var HeroSearch=React40__namespace.forwardRef(({value:e,onValueChange:r,trailing:t,hint:s,clearLabel:n="Clear",className:o,...i},c)=>jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-2.5",o),children:[jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex min-h-11 items-center gap-2.5 rounded-xl border border-border/70 bg-card px-3.5 py-1.5 text-foreground shadow-sm","transition-[border-color,box-shadow] duration-150 hover:border-foreground/20","focus-within:border-primary/40 focus-within:ring-2 focus-within:ring-primary/[0.08]"),children:[jsxRuntime.jsx(lucideReact.Search,{"aria-hidden":!0,className:"h-[18px] w-[18px] shrink-0 text-muted-foreground"}),jsxRuntime.jsx("input",{ref:c,type:"search",value:e,onChange:a(u=>r(u.target.value),"onChange"),className:chunkYWPIPAUQ_cjs.cn("min-w-0 flex-1 bg-transparent text-[15px] leading-6 outline-none","placeholder:text-muted-foreground","[&::-webkit-search-cancel-button]:appearance-none"),...i}),e&&jsxRuntime.jsx("button",{type:"button",onClick:a(()=>r(""),"onClick"),"aria-label":n,className:"shrink-0 rounded-full p-1 text-muted-foreground transition-colors duration-hover hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})}),t&&jsxRuntime.jsx("div",{className:"flex shrink-0 items-center gap-2 border-l border-border/70 pl-2",children:t})]}),s&&jsxRuntime.jsx("div",{className:"flex flex-wrap items-center gap-2 px-1 text-xs text-muted-foreground",children:s})]}));HeroSearch.displayName="HeroSearch";var IDENTITY_HUES=[226,262,298,336,14,50,150,190];function fnv1a(e){let r=2166136261;for(let t=0;t<e.length;t+=1)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}a(fnv1a,"fnv1a");function identityHue(e){return IDENTITY_HUES[fnv1a(e)%IDENTITY_HUES.length]}a(identityHue,"identityHue");function identityStyle(e){return{"--identity-hue":String(identityHue(e))}}a(identityStyle,"identityStyle");var ALPHANUMERIC=/[\p{L}\p{N}]/u;function identityInitial(e){const r=[...e.trim()];return(r.find(s=>ALPHANUMERIC.test(s))??r[0]??"?").toUpperCase()}a(identityInitial,"identityInitial");var SIZES={sm:{box:"h-9 w-9",text:"text-xs",ring:2},md:{box:"h-12 w-12",text:"text-sm",ring:2},lg:{box:"h-16 w-16",text:"text-lg",ring:3},xl:{box:"h-20 w-20",text:"text-2xl",ring:3}},IdentityAvatar=React40__namespace.forwardRef(({seed:e,name:r,src:t,size:s="md",ring:n=!0,className:o,style:i,...c},u)=>{const[d,l]=React40__namespace.useState(!1),x=SIZES[s],m=!!t&&!d;return jsxRuntime.jsxs("div",{ref:u,role:"img","aria-label":r,className:chunkYWPIPAUQ_cjs.cn("identity-surface relative shrink-0 overflow-hidden rounded-full",x.box,o),style:{...identityStyle(e),...i},...c,children:[m?jsxRuntime.jsx("img",{src:t??void 0,alt:"",className:"h-full w-full object-cover",onError:a(()=>l(!0),"onError")}):jsxRuntime.jsx("span",{"aria-hidden":!0,className:chunkYWPIPAUQ_cjs.cn("flex h-full w-full items-center justify-center font-semibold",x.text),style:{backgroundColor:"var(--identity-soft)",color:"var(--identity-text)"},children:identityInitial(r)}),n&&jsxRuntime.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{boxShadow:`inset 0 0 0 ${x.ring}px var(--identity-band)`}})]})});IdentityAvatar.displayName="IdentityAvatar";function parseHslTriplet(e){const r=/^\s*(-?[\d.]+)(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*(?:\/.*)?$/.exec(e);return r?[Number(r[1]),Number(r[2]),Number(r[3])]:null}a(parseHslTriplet,"parseHslTriplet");function hslToRgb(e,r,t){const s=r/100,n=t/100,o=a(u=>(u+e/30)%12,"k"),i=s*Math.min(n,1-n),c=a(u=>n-i*Math.max(-1,Math.min(o(u)-3,Math.min(9-o(u),1))),"f");return[Math.round(c(0)*255),Math.round(c(8)*255),Math.round(c(4)*255)]}a(hslToRgb,"hslToRgb");function hslTripletToRgb(e){const r=parseHslTriplet(e);return r?hslToRgb(...r):null}a(hslTripletToRgb,"hslTripletToRgb");function relativeLuminance([e,r,t]){const s=a(n=>{const o=n/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4},"channel");return .2126*s(e)+.7152*s(r)+.0722*s(t)}a(relativeLuminance,"relativeLuminance");function contrastRatio(e,r){const[t,s]=[relativeLuminance(e),relativeLuminance(r)].sort((n,o)=>o-n);return(t+.05)/(s+.05)}a(contrastRatio,"contrastRatio");function tokenColor(e,r){const t=getComputedStyle(document.documentElement).getPropertyValue(`--${e}`).trim();return t?r===void 0?`hsl(${t})`:`hsl(${t} / ${r})`:""}a(tokenColor,"tokenColor");var CHART_SERIES_TOKENS=["chart-1","chart-2","chart-3","chart-4","chart-5","chart-6","chart-7","chart-8"];function buildChartTheme(e,r){const t=a((c,u=1)=>{const d=hslTripletToRgb(e(c));return d?`rgba(${d.join(", ")}, ${u})`:void 0},"color"),s=t("muted-foreground"),n={lineStyle:{color:t("border-strong")}},o={lineStyle:{color:t("border")}},i={axisLine:n,axisTick:n,axisLabel:{color:s},splitLine:o,nameTextStyle:{color:s}};return{color:CHART_SERIES_TOKENS.map(c=>t(c)).filter(Boolean),backgroundColor:"transparent",textStyle:{color:t("foreground"),fontFamily:r},title:{textStyle:{color:t("foreground")},subtextStyle:{color:s}},legend:{textStyle:{color:s}},tooltip:{backgroundColor:t("popover"),borderColor:t("border"),textStyle:{color:t("popover-foreground")},axisPointer:{lineStyle:{color:t("border-strong")},shadowStyle:{color:t("foreground",.06)}}},categoryAxis:i,valueAxis:i,logAxis:i,timeAxis:i,radar:{axisName:{color:s},axisLine:o,splitLine:o,splitArea:{show:!1}}}}a(buildChartTheme,"buildChartTheme");function documentTokenReader(){const e=getComputedStyle(document.documentElement);return r=>e.getPropertyValue(`--${r}`)}a(documentTokenReader,"documentTokenReader");function buildMermaidThemeVariables(e,r){const t=a(n=>{const o=hslTripletToRgb(e(n));return o?`#${o.map(i=>i.toString(16).padStart(2,"0")).join("")}`:""},"hex"),s=[["background",t("card")],["mainBkg",t("surface-sunken")],["primaryColor",t("surface-sunken")],["primaryTextColor",t("foreground")],["primaryBorderColor",t("border-strong")],["secondaryColor",t("primary-soft")],["tertiaryColor",t("surface-inset")],["lineColor",t("muted-foreground")],["textColor",t("foreground")],["noteBkgColor",t("warning-soft")],["noteTextColor",t("foreground")],["noteBorderColor",t("border-strong")]];return{darkMode:r,...Object.fromEntries(s.filter(([,n])=>n))}}a(buildMermaidThemeVariables,"buildMermaidThemeVariables");var themeKey=a(()=>String(document.documentElement.classList.contains("dark")),"themeKey");function useThemeKey(){const[e,r]=React40.useState(themeKey);return React40.useEffect(()=>{const t=new MutationObserver(()=>r(themeKey()));return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[]),e}a(useThemeKey,"useThemeKey");function useChartTheme(){const e=useThemeKey();return React40.useMemo(()=>{const r=documentTokenReader();return buildChartTheme(r,r("font-sans").trim()||void 0)},[e])}a(useChartTheme,"useChartTheme");var loadingVariants=classVarianceAuthority.cva("flex items-center justify-center",{variants:{size:{sm:"text-sm",default:"text-base",lg:"text-lg",xl:"text-xl"},variant:{spinner:"",dots:"",pulse:"",bars:""}},defaultVariants:{size:"default",variant:"spinner"}}),spinnerVariants=classVarianceAuthority.cva("rounded-full border-2 border-solid animate-spin",{variants:{size:{sm:"w-4 h-4",default:"w-6 h-6",lg:"w-8 h-8",xl:"w-10 h-10"}},defaultVariants:{size:"default"}}),Loading=React40__namespace.forwardRef(({className:e,variant:r,size:t,text:s,showText:n=!0,...o},i)=>{const c=a(()=>jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(spinnerVariants({size:t}),"border-muted-foreground/20 border-t-primary")}),"renderSpinner"),u=a(()=>{const m=t==="sm"?"w-1.5 h-1.5":t==="lg"?"w-2.5 h-2.5":t==="xl"?"w-3 h-3":"w-2 h-2";return jsxRuntime.jsxs("div",{className:"flex space-x-1",children:[jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(m,"animate-bounce rounded-full bg-primary"),style:{animationDelay:"0ms"}}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(m,"animate-bounce rounded-full bg-primary"),style:{animationDelay:"150ms"}}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(m,"animate-bounce rounded-full bg-primary"),style:{animationDelay:"300ms"}})]})},"renderDots"),d=a(()=>{const m=t==="sm"?"w-4 h-4":t==="lg"?"w-8 h-8":t==="xl"?"w-10 h-10":"w-6 h-6";return jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(m,"animate-pulse rounded-full bg-primary")})},"renderPulse"),l=a(()=>{const m=t==="sm"?"h-3":t==="lg"?"h-6":t==="xl"?"h-8":"h-4",f=t==="sm"?"w-0.5":t==="lg"?"w-1":t==="xl"?"w-1.5":"w-0.5";return jsxRuntime.jsxs("div",{className:"flex items-end space-x-1",children:[jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(f,m,"animate-pulse bg-primary"),style:{animationDelay:"0ms"}}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(f,m,"animate-pulse bg-primary"),style:{animationDelay:"100ms"}}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(f,m,"animate-pulse bg-primary"),style:{animationDelay:"200ms"}}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(f,m,"animate-pulse bg-primary"),style:{animationDelay:"300ms"}})]})},"renderBars"),x=a(()=>{switch(r){case"dots":return u();case"pulse":return d();case"bars":return l();case"spinner":default:return c()}},"renderLoader");return jsxRuntime.jsx("div",{ref:i,className:chunkYWPIPAUQ_cjs.cn(loadingVariants({size:t,variant:r,className:e})),...o,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[x(),n&&s&&jsxRuntime.jsx("div",{className:"space-y-1 text-center",children:jsxRuntime.jsx("p",{className:chunkYWPIPAUQ_cjs.cn("font-medium text-foreground",t==="sm"?"text-xs":t==="lg"?"text-sm":t==="xl"?"text-base":"text-sm"),children:s})})]})})});Loading.displayName="Loading";var LOGO_SIZES={SMALL:64,MEDIUM:128,LARGE:256};function Logo({variant:e="primary",size:r="MEDIUM",className:t,priority:s=!1}){const n=typeof r=="number"?r:LOGO_SIZES[r],i=a(c=>c==="default"||c==="primary"?"/images/logos/logo.png":`/images/logos/logo-${c}.png`,"getLogoSrc")(e);return jsxRuntime.jsx("img",{src:i,alt:"Logo",width:n,height:n,className:chunkYWPIPAUQ_cjs.cn("object-contain",t),loading:s?"eager":"lazy"})}a(Logo,"Logo");function OptimizedImage({src:e,alt:r,fallbackSrc:t="/images/illustrations/placeholder.svg",className:s,showLoader:n=!0,showError:o=!0,...i}){const[c,u]=React40.useState(!0),[d,l]=React40.useState(!1),[x,m]=React40.useState(e),f=a(()=>{u(!1),l(!1)},"handleLoad"),p=a(()=>{u(!1),l(!0),x!==t&&(m(t),u(!0))},"handleError");return React40__namespace.default.useEffect(()=>{m(e),u(!0),l(!1)},[e]),jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("relative",s),children:[jsxRuntime.jsx("img",{...i,src:x,alt:r,className:chunkYWPIPAUQ_cjs.cn("transition-opacity duration-200",c?"opacity-0":"opacity-100"),onLoad:f,onError:p}),c&&n&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex animate-pulse items-center justify-center bg-muted",children:jsxRuntime.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-border-strong border-t-muted-foreground"})}),d&&o&&x===t&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load image"})})]})}a(OptimizedImage,"OptimizedImage");var TITLE_CLASS={default:"truncate text-lg font-semibold text-foreground",display:"text-[2rem] font-semibold leading-[1.15] tracking-[-0.02em] text-foreground"};function PageHeader({title:e,description:r,titleVisuallyHidden:t=!1,actions:s,actionsClassName:n,leading:o,toolbar:i,as:c="h1",size:u="default",className:d,...l}){return jsxRuntime.jsxs("header",{className:chunkYWPIPAUQ_cjs.cn("flex flex-col gap-4",d),...l,children:[jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex flex-col items-start justify-between gap-4 sm:flex-row",t&&!s&&"sr-only"),children:[jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex min-w-0 items-start gap-3",t&&"sr-only"),children:[o,jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx(c,{className:TITLE_CLASS[u],children:e}),r&&jsxRuntime.jsx("p",{className:chunkYWPIPAUQ_cjs.cn("mt-1 text-sm text-muted-foreground",u==="display"&&"mt-2 max-w-2xl text-[15px]"),children:r})]})]}),s&&jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("flex items-center gap-2",t&&"ml-auto",n??"shrink-0"),children:s})]}),i]})}a(PageHeader,"PageHeader");var CONTAINER="mx-auto w-full max-w-7xl px-4 md:px-8",CONTAINER_FULL="w-full px-4 md:px-8",GUTTER="pr-[calc(1rem+var(--shell-scrollbar,0px))] md:pr-[calc(2rem+var(--shell-scrollbar,0px))]";function PageShell({header:e,divided:r=!1,contentLayout:t="scroll",footer:s,contentClassName:n,fullWidth:o=!1,className:i,children:c,...u}){const d=o?CONTAINER_FULL:CONTAINER;return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex h-full min-h-0 flex-col bg-background",i),...u,children:[e&&jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("flex-shrink-0",r&&"border-b border-border/60"),children:jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(d,GUTTER,"pb-4 pt-6 md:pt-8"),children:e})}),t==="fill"?jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(d,"flex min-h-0 flex-1 flex-col overflow-hidden pb-6 pt-5",n),children:c}):jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("min-h-0 flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",n),children:jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(d,s?"pb-6 pt-5":"pb-10 pt-5"),children:c})}),s&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border/60",children:jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn(d,GUTTER,"py-2"),children:s})})]})}a(PageShell,"PageShell");var SCROLLBAR_GUTTER="pr-[var(--shell-scrollbar,0px)]";function Segmented({options:e,value:r,onValueChange:t,size:s="md",variant:n="default",fullWidth:o=!1,className:i,"aria-label":c}){const u=React40__namespace.useRef(new Map),d=e.filter(m=>!m.disabled),l=a(m=>{if(d.length===0)return;const f=d.findIndex(v=>v.value===r),g=d[((f===-1?0:f)+m+d.length)%d.length];g&&(t(g.value),u.current.get(g.value)?.focus())},"move"),x=a(m=>{m.key==="ArrowRight"||m.key==="ArrowDown"?(m.preventDefault(),l(1)):(m.key==="ArrowLeft"||m.key==="ArrowUp")&&(m.preventDefault(),l(-1))},"handleKeyDown");return jsxRuntime.jsx("div",{role:"radiogroup","aria-label":c,onKeyDown:x,className:chunkYWPIPAUQ_cjs.cn("inline-flex items-center gap-1",n==="underline"?"border-b border-border/70":"rounded-lg border border-border bg-muted/50 p-1",o&&"w-full",i),children:e.map(m=>{const f=m.value===r,p=jsxRuntime.jsxs("button",{ref:a(g=>{g?u.current.set(m.value,g):u.current.delete(m.value)},"ref"),type:"button",role:"radio","aria-checked":f,disabled:m.disabled,tabIndex:f?0:-1,onClick:a(()=>t(m.value),"onClick"),className:chunkYWPIPAUQ_cjs.cn("inline-flex items-center justify-center gap-1.5 whitespace-nowrap font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50",n==="underline"?'relative rounded-none after:absolute after:inset-x-2 after:-bottom-px after:h-0.5 after:rounded-full after:bg-transparent after:content-[""]':"rounded-md",s==="sm"?n==="underline"?"px-3 py-2 text-sm":"px-2.5 py-1 text-xs":"px-3 py-1.5 text-sm",o&&"flex-1",f?n==="accent"?"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90":n==="underline"?"text-primary after:bg-primary":"bg-background text-foreground shadow-sm":n==="underline"?"text-muted-foreground hover:text-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[m.label,m.count!==void 0&&jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("rounded-full px-1.5 text-[10px] tabular-nums leading-4",f?"bg-primary/10 text-primary":"bg-foreground/[0.06] text-muted-foreground"),children:m.count})]});return!m.disabled||!m.disabledReason?jsxRuntime.jsx(React40__namespace.Fragment,{children:p},m.value):jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("inline-flex",o&&"flex-1"),children:p})}),jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipContent,{side:"top",children:m.disabledReason})]},m.value)})})}a(Segmented,"Segmented");var Avatar=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(AvatarPrimitive__namespace.Root,{ref:t,className:chunkYWPIPAUQ_cjs.cn("relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",e),...r}));Avatar.displayName=AvatarPrimitive__namespace.Root.displayName;var AvatarImage=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(AvatarPrimitive__namespace.Image,{ref:t,className:chunkYWPIPAUQ_cjs.cn("aspect-square h-full w-full",e),...r}));AvatarImage.displayName=AvatarPrimitive__namespace.Image.displayName;var AvatarFallback=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback,{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...r}));AvatarFallback.displayName=AvatarPrimitive__namespace.Fallback.displayName;var AVATAR_SIZES={SMALL:32,MEDIUM:48,LARGE:96,XLARGE:128},DEFAULT_AVATAR="/images/avatars/default-avatar.png";function AvatarImage2({src:e,alt:r,size:t="MEDIUM",className:s,fallback:n}){const o=typeof t=="number"?t:AVATAR_SIZES[t],i=e??DEFAULT_AVATAR,[c,u]=React40__namespace.default.useState(!1),[d,l]=React40__namespace.default.useState(!0),x=a(()=>{l(!1),u(!1)},"handleLoad"),m=a(()=>{l(!1),u(!0)},"handleError");return c&&n?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("relative overflow-hidden rounded-full",s),style:{width:o,height:o},children:[jsxRuntime.jsx("img",{src:c?DEFAULT_AVATAR:i,alt:r,className:"h-full w-full object-cover",onLoad:x,onError:m}),d&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex animate-pulse items-center justify-center bg-skeleton",children:jsxRuntime.jsx("div",{className:"bg-skeleton-highlight h-4 w-4 rounded-full"})})]})}a(AvatarImage2,"AvatarImage2");var Slider=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsxs(SliderPrimitive__namespace.Root,{ref:t,className:chunkYWPIPAUQ_cjs.cn("relative flex w-full touch-none select-none items-center",e),...r,children:[jsxRuntime.jsx(SliderPrimitive__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsxRuntime.jsx(SliderPrimitive__namespace.Range,{className:"absolute h-full bg-primary"})}),jsxRuntime.jsx(SliderPrimitive__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Slider.displayName=SliderPrimitive__namespace.Root.displayName;var TreeItem=a(({node:e,level:r,onSelect:t,onExpand:s,selectedValue:n,renderNode:o,showConnectors:i=!0,collapsible:c=!0,defaultExpandAll:u=!1,expandOnSelect:d=!1,checkable:l=!1,checkedKeys:x=[],onCheck:m,checkStrictly:f=!1,allNodes:p,i18n:g})=>{const[v,y]=React40.useState(e.defaultExpanded??u??!1),j=e.children&&e.children.length>0,h=n===e.value||n===e.id,w=l&&e.checkable!==!1,C=React40.useMemo(()=>{if(!w)return{checked:!1,indeterminate:!1};const N=x.includes(e.id);if(!j||f)return{checked:N,indeterminate:!1};const k=a(T=>{let F=[];return T.forEach(b=>{F.push(b.id),b.children&&(F=F.concat(k(b.children)))}),F},"getAllChildrenIds"),M=k(e.children??[]),S=M.filter(T=>x.includes(T));return S.length===0?{checked:N,indeterminate:!1}:S.length===M.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},[w,x,e.id,e.children,j,f]),E=a(N=>{N.stopPropagation(),j&&c&&(y(!v),s?.(e,!v))},"handleToggle"),A=a(()=>{e.disabled||(d&&j&&c&&(y(!v),s?.(e,!v)),t?.(e))},"handleSelect"),R=a(N=>{if(!m)return;let k=[...x];if(f)N?k.includes(e.id)||k.push(e.id):k=k.filter(T=>T!==e.id);else{const T=a(F=>{let b=[];return F.forEach(D=>{b.push(D.id),D.children&&D.children.length>0&&(b=b.concat(T(D.children)))}),b},"getAllChildrenIds");if(N)k.includes(e.id)||k.push(e.id),j&&e.children&&T(e.children).forEach(b=>{k.includes(b)||k.push(b)});else if(k=k.filter(F=>F!==e.id),j&&e.children){const F=T(e.children);k=k.filter(b=>!F.includes(b))}}const M=k.map(T=>p.get(T)).filter(Boolean);m(k,{checked:N,checkedNodes:M,node:e,halfCheckedKeys:[]})},"handleCheck");return jsxRuntime.jsxs("div",{className:"tree-item",children:[jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("relative flex items-center rounded-sm px-2 py-1 transition-colors hover:bg-accent/50",h&&"bg-accent text-accent-foreground",e.disabled&&"cursor-not-allowed opacity-50"),style:{paddingLeft:`${r*24}px`},children:[i&&r>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 w-px bg-border/60",style:{left:`${r*24-12}px`}}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-px w-3 bg-border/60",style:{left:`${r*24-12}px`}})]}),j&&c?jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"ghost",size:"icon",className:"mr-1 size-11 shrink-0 md:size-8",onClick:E,"aria-label":v?`${g?.collapse??"Collapse"} ${typeof e.label=="string"?e.label:""}`:`${g?.expand??"Expand"} ${typeof e.label=="string"?e.label:""}`,children:v?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-3 w-3 text-muted-foreground"})}):jsxRuntime.jsx("div",{className:"mr-1 size-11 shrink-0 md:size-8"}),w&&jsxRuntime.jsx(Checkbox,{id:e.checkboxId,checked:C.indeterminate?"indeterminate":C.checked,onCheckedChange:R,className:"mr-2 h-4 w-4","aria-label":typeof e.label=="string"?e.label:void 0,disabled:e.disabled}),e.icon&&jsxRuntime.jsx("span",{className:"mr-2 flex items-center",children:e.icon}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("min-w-0 flex-1",!w&&"cursor-pointer"),onClick:w?void 0:A,children:o?o(e,h,v,C):e.label})]}),j&&v&&jsxRuntime.jsx("div",{className:"tree-children",children:e.children?.map(N=>jsxRuntime.jsx(TreeItem,{node:N,level:r+1,...t&&{onSelect:t},...s&&{onExpand:s},selectedValue:n,...o&&{renderNode:o},showConnectors:i,collapsible:c,defaultExpandAll:u,expandOnSelect:d,checkable:l,checkedKeys:x,...m&&{onCheck:m},checkStrictly:f,allNodes:p,i18n:g},N.id))})]})},"TreeItem"),Tree=React40__namespace.default.forwardRef(({data:e,className:r,onSelect:t,onExpand:s,selectedValue:n,renderNode:o,showConnectors:i=!0,collapsible:c=!0,defaultExpandAll:u=!1,expandOnSelect:d=!1,checkable:l=!1,defaultCheckedKeys:x=[],checkedKeys:m,onCheckedChange:f,checkStrictly:p=!1,showSelectAll:g=!1,i18n:v},y)=>{const j=React40.useMemo(()=>{const T=new Map,F=a(b=>{b.forEach(D=>{T.set(D.id,D),D.children&&F(D.children)})},"addNodes");return F(e),T},[e]),[h,w]=React40.useState(x),C=m??h,[E,A]=React40.useState(!1);React40.useEffect(()=>{E||(w(x),A(!0))},[x,E]);const R=React40.useCallback(()=>{const T=[],F=a(b=>{b.forEach(D=>{D.checkable!==!1&&T.push(D.id),D.children&&F(D.children)})},"traverse");return F(e),T},[e]),N=React40.useCallback(()=>{const T=R();w(T),f&&f(T)},[R,f]),k=React40.useCallback(()=>{w([]),f&&f([])},[f]),M=React40.useCallback((T,F)=>{w(T),f&&f(T)},[f]);React40.useImperativeHandle(y,()=>({getCheckedKeys:a(()=>C,"getCheckedKeys"),setCheckedKeys:a(T=>{w(T),f&&f(T)},"setCheckedKeys"),selectAll:N,deselectAll:k}),[C,f,N,k]);const S={selectAll:v?.selectAll??"Select All",deselectAll:v?.deselectAll??"Deselect All",permissionSelection:v?.permissionSelection??"Selection"};return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("tree-container",r),children:[l&&g&&jsxRuntime.jsxs("div",{className:"tree-select-all-bar mb-2 flex items-center justify-between border-b p-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:S.permissionSelection}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2 text-xs",children:[jsxRuntime.jsx("button",{onClick:N,className:"text-primary hover:text-primary/80 hover:underline",children:S.selectAll}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"|"}),jsxRuntime.jsx("button",{onClick:k,className:"text-primary hover:text-primary/80 hover:underline",children:S.deselectAll})]})]}),e.map(T=>jsxRuntime.jsx(TreeItem,{node:T,level:0,...t&&{onSelect:t},...s&&{onExpand:s},selectedValue:n,...o&&{renderNode:o},showConnectors:i,collapsible:c,defaultExpandAll:u,expandOnSelect:d,checkable:l,checkedKeys:C,onCheck:M,checkStrictly:p,allNodes:j,i18n:v},T.id))]})}),statusBadgeVariants=classVarianceAuthority.cva("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-all duration-200",{variants:{variant:{success:"bg-success-soft text-success border border-success/20 shadow-subtle",warning:"bg-warning-soft text-warning border border-warning/20 shadow-subtle",destructive:"bg-destructive-soft text-destructive border border-destructive/20 shadow-subtle",info:"bg-info-soft text-info border border-info/20 shadow-subtle",default:"bg-muted text-foreground border border-border shadow-subtle",outline:"border border-input bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"},size:{default:"px-2.5 py-1 text-xs",sm:"px-2 py-0.5 text-xs",lg:"px-3 py-1.5 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),StatusBadge=React40__namespace.forwardRef(({className:e,variant:r,size:t,icon:s,pulse:n=!1,children:o,...i},c)=>jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn(statusBadgeVariants({variant:r,size:t}),e),ref:c,...i,children:[s&&jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("flex-shrink-0",n&&"animate-pulse"),children:s}),o]}));StatusBadge.displayName="StatusBadge";var TONE_CLASS={active:"bg-success",live:"bg-signal",idle:"bg-muted-foreground/50",pending:"bg-warning",paused:"bg-muted-foreground/70",error:"bg-destructive"},SIZE_CLASS={sm:"h-1.5 w-1.5",md:"h-2 w-2"},StatusDot=React40__namespace.forwardRef(({tone:e,size:r="md",pulse:t=!1,label:s,className:n,...o},i)=>{const c=jsxRuntime.jsxs("span",{className:chunkYWPIPAUQ_cjs.cn("relative flex",SIZE_CLASS[r]),children:[t&&(e==="active"||e==="live")&&jsxRuntime.jsx("span",{"aria-hidden":!0,className:chunkYWPIPAUQ_cjs.cn("absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:animate-none",TONE_CLASS[e])}),jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("relative h-full w-full rounded-full",TONE_CLASS[e])})]});return s?jsxRuntime.jsxs("span",{ref:i,className:chunkYWPIPAUQ_cjs.cn("inline-flex items-center gap-1.5 text-xs text-muted-foreground",n),...o,children:[c,s]}):jsxRuntime.jsx("span",{ref:i,role:"status","aria-label":e,className:chunkYWPIPAUQ_cjs.cn("inline-flex",n),...o,children:c})});StatusDot.displayName="StatusDot";var TaskEntryTile=React40__namespace.forwardRef(({label:e,caption:r,icon:t,meta:s,className:n,...o},i)=>jsxRuntime.jsxs("button",{ref:i,type:"button",className:chunkYWPIPAUQ_cjs.cn("group flex flex-col items-start gap-2 rounded-[var(--radius-card)] p-4 text-left","bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)]","transition-[transform,box-shadow] duration-hover","hover:-translate-y-0.5 hover:shadow-[var(--shadow-lift)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40","disabled:pointer-events-none disabled:opacity-50","motion-reduce:transform-none motion-reduce:transition-none",n),...o,children:[t&&jsxRuntime.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-[var(--radius-control)] bg-accent text-accent-foreground",children:t}),jsxRuntime.jsx("span",{className:"text-sm font-medium leading-snug text-foreground",children:e}),r&&jsxRuntime.jsx("span",{className:"text-xs leading-relaxed text-muted-foreground",children:r}),s&&jsxRuntime.jsx("span",{className:"mt-auto pt-1 text-xs text-muted-foreground/80",children:s})]}));TaskEntryTile.displayName="TaskEntryTile";var FormWizard=React40__namespace.forwardRef(({steps:e,currentStep:r,onStepChange:t,children:s,className:n,showStepIndicator:o=!0,allowStepNavigation:i=!0,...c},u)=>jsxRuntime.jsxs("div",{ref:u,className:chunkYWPIPAUQ_cjs.cn("w-full",n),...c,children:[o&&jsxRuntime.jsx("div",{className:"mb-8",children:jsxRuntime.jsx("div",{className:"flex items-center justify-between",children:e.map((d,l)=>jsxRuntime.jsxs("div",{className:"flex flex-1 items-center",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("button",{type:"button",onClick:a(()=>i&&!d.isDisabled&&t(l),"onClick"),disabled:d.isDisabled||!i,className:chunkYWPIPAUQ_cjs.cn("flex h-10 w-10 items-center justify-center rounded-full border-2 transition-all duration-200",l===r&&"scale-110 border-primary bg-primary text-primary-foreground shadow-lg",l<r&&"border-success bg-success text-success-foreground",l>r&&"border-border-strong bg-card text-muted-foreground",i&&!d.isDisabled&&"cursor-pointer hover:scale-105",d.isDisabled&&"cursor-not-allowed opacity-50"),children:d.isCompleted||l<r?jsxRuntime.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):d.icon?d.icon:jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:l+1})}),jsxRuntime.jsxs("div",{className:"ml-3 min-w-0",children:[jsxRuntime.jsx("p",{className:chunkYWPIPAUQ_cjs.cn("text-sm font-medium transition-colors",l===r&&"text-primary",l<r&&"text-success",l>r&&"text-muted-foreground"),children:d.title}),d.description&&jsxRuntime.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:d.description})]})]}),l<e.length-1&&jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("mx-4 h-0.5 flex-1 transition-colors duration-300",l<r?"bg-success":"bg-border")})]},d.id))})}),jsxRuntime.jsx("div",{className:"min-h-[400px]",children:s})]}));FormWizard.displayName="FormWizard";var FormWizardStep=React40__namespace.forwardRef(({children:e,className:r,...t},s)=>jsxRuntime.jsx("div",{ref:s,className:chunkYWPIPAUQ_cjs.cn("duration-300 animate-in slide-in-from-right-4",r),...t,children:e}));FormWizardStep.displayName="FormWizardStep";var FormWizardNavigation=React40__namespace.forwardRef(({onPrevious:e,onNext:r,onSubmit:t,isFirstStep:s=!1,isLastStep:n=!1,isPreviousDisabled:o=!1,isNextDisabled:i=!1,isSubmitDisabled:c=!1,previousLabel:u="Previous",nextLabel:d="Next",submitLabel:l="Submit",className:x,...m},f)=>jsxRuntime.jsxs("div",{ref:f,className:chunkYWPIPAUQ_cjs.cn("flex items-center justify-between border-t border-border pt-6",x),...m,children:[jsxRuntime.jsx("div",{children:!s&&jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",onClick:e,disabled:o,children:u})}),jsxRuntime.jsx("div",{className:"flex gap-3",children:n?jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"submit",onClick:t,disabled:c,variant:"gradient",children:l}):jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",onClick:r,disabled:i,children:d})})]}));FormWizardNavigation.displayName="FormWizardNavigation";var EnhancedInput=React40__namespace.forwardRef(({label:e,description:r,error:t,success:s,leftIcon:n,rightIcon:o,isLoading:i=!1,showCharacterCount:c=!1,maxCharacters:u,onValueChange:d,containerClassName:l,labelClassName:x,descriptionClassName:m,errorClassName:f,successClassName:p,className:g,id:v,value:y="",onChange:j,...h},w)=>{const C=React40__namespace.useId(),E=v??C,A=r?`${E}-description`:void 0,R=t?`${E}-error`:void 0,N=s?`${E}-success`:void 0,k=typeof y=="string"?y.length:0,M=u?k>u:!1,S=a(b=>{j?.(b),d?.(b.target.value)},"handleChange"),T=!!t,F=!!(s&&!t);return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-2",l),children:[e&&jsxRuntime.jsxs(chunkMTA2XHQG_cjs.Label,{htmlFor:E,className:chunkYWPIPAUQ_cjs.cn("text-sm font-medium text-foreground",T&&"text-destructive",F&&"text-success",x),children:[e,h.required&&jsxRuntime.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[n&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 transform text-muted-foreground",children:n}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.Input,{ref:w,id:E,value:y,onChange:S,className:chunkYWPIPAUQ_cjs.cn("transition-all duration-200",n&&"pl-10",(o||i||c)&&"pr-10",T&&"border-destructive/50 focus:border-destructive focus:ring-destructive",F&&"border-success/50 focus:border-success focus:ring-success",M&&"border-destructive/50 focus:border-destructive focus:ring-destructive",g),"aria-describedby":chunkYWPIPAUQ_cjs.cn(A,R,N).trim()||void 0,"aria-invalid":T,...h}),jsxRuntime.jsxs("div",{className:"absolute right-3 top-1/2 flex -translate-y-1/2 transform items-center gap-2",children:[i&&jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-border-strong border-t-primary"}),c&&u&&jsxRuntime.jsxs("span",{className:chunkYWPIPAUQ_cjs.cn("text-xs font-medium",M?"text-destructive":"text-muted-foreground"),children:[k,"/",u]}),o&&!i&&jsxRuntime.jsx("div",{className:"text-muted-foreground",children:o}),T&&!i&&!o&&jsxRuntime.jsx("svg",{className:"h-4 w-4 text-destructive",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),F&&!i&&!o&&jsxRuntime.jsx("svg",{className:"h-4 w-4 text-success",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})]})]}),r&&!t&&!s&&jsxRuntime.jsx("p",{id:A,className:chunkYWPIPAUQ_cjs.cn("text-xs text-muted-foreground",m),children:r}),t&&jsxRuntime.jsxs("p",{id:R,className:chunkYWPIPAUQ_cjs.cn("flex items-center gap-1 text-xs text-destructive",f),children:[jsxRuntime.jsx("svg",{className:"h-3 w-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),t]}),s&&!t&&jsxRuntime.jsxs("p",{id:N,className:chunkYWPIPAUQ_cjs.cn("flex items-center gap-1 text-xs text-success",p),children:[jsxRuntime.jsx("svg",{className:"h-3 w-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),s]})]})});EnhancedInput.displayName="EnhancedInput";var Skeleton=React40__namespace.forwardRef(({className:e,variant:r="default",width:t,height:s,count:n=1,style:o,...i},c)=>{const u=chunkYWPIPAUQ_cjs.cn("animate-shimmer",r==="default"&&"rounded-md",r==="circular"&&"rounded-full",r==="text"&&"rounded h-4",r==="card"&&"rounded-lg",e),d={width:typeof t=="number"?`${t}px`:t,height:typeof s=="number"?`${s}px`:s,...o};return n>1?jsxRuntime.jsx("div",{className:"space-y-2",children:Array.from({length:n},(l,x)=>jsxRuntime.jsx("div",{ref:x===0?c:void 0,className:u,style:d,...i},x))}):jsxRuntime.jsx("div",{ref:c,className:u,style:d,...i})});Skeleton.displayName="Skeleton";var SkeletonCard=a(({className:e,...r})=>jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-4 p-6",e),...r,children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntime.jsx(Skeleton,{variant:"circular",width:40,height:40}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(Skeleton,{variant:"text",width:"60%"}),jsxRuntime.jsx(Skeleton,{variant:"text",width:"40%"})]})]}),jsxRuntime.jsx(Skeleton,{variant:"default",height:100}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx(Skeleton,{variant:"default",width:80,height:32}),jsxRuntime.jsx(Skeleton,{variant:"default",width:80,height:32})]})]}),"SkeletonCard"),SkeletonList=a(({count:e=3,className:r,...t})=>jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-4",r),...t,children:Array.from({length:e},(s,n)=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-4 rounded-lg border p-4",children:[jsxRuntime.jsx(Skeleton,{variant:"circular",width:48,height:48}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(Skeleton,{variant:"text",width:"70%"}),jsxRuntime.jsx(Skeleton,{variant:"text",width:"50%"}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx(Skeleton,{variant:"default",width:60,height:20}),jsxRuntime.jsx(Skeleton,{variant:"default",width:60,height:20})]})]}),jsxRuntime.jsxs("div",{className:"space-x-2",children:[jsxRuntime.jsx(Skeleton,{variant:"default",width:80,height:32}),jsxRuntime.jsx(Skeleton,{variant:"default",width:32,height:32})]})]},n))}),"SkeletonList"),SkeletonTable=a(({rows:e=5,columns:r=4,className:t,...s})=>jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-3",t),...s,children:[jsxRuntime.jsx("div",{className:"flex space-x-4 border-b p-4",children:Array.from({length:r},(n,o)=>jsxRuntime.jsx(Skeleton,{variant:"text",width:"100%",height:16},o))}),Array.from({length:e},(n,o)=>jsxRuntime.jsx("div",{className:"flex space-x-4 p-4",children:Array.from({length:r},(i,c)=>jsxRuntime.jsx(Skeleton,{variant:"text",width:"100%",height:20},c))},o))]}),"SkeletonTable");function StatCardSkeleton(){return jsxRuntime.jsxs("div",{className:"space-y-3 rounded-lg border bg-card p-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-20"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-4 rounded-full"})]}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-24"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-3"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-32"})]})]})}a(StatCardSkeleton,"StatCardSkeleton");function StatsGridSkeleton({count:e=4}){return jsxRuntime.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:e}).map((r,t)=>jsxRuntime.jsx(StatCardSkeleton,{},t))})}a(StatsGridSkeleton,"StatsGridSkeleton");function TableSkeleton({rows:e=5,columns:r=4}){return jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx("div",{className:"flex space-x-4 border-b pb-3",children:Array.from({length:r}).map((t,s)=>jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1"},s))}),Array.from({length:e}).map((t,s)=>jsxRuntime.jsx("div",{className:"flex space-x-4 py-3",children:Array.from({length:r}).map((n,o)=>jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1"},o))},s))]})}a(TableSkeleton,"TableSkeleton");function CardListSkeleton({count:e=3}){return jsxRuntime.jsx("div",{className:"space-y-4",children:Array.from({length:e}).map((r,t)=>jsxRuntime.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-6",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex flex-1 items-center space-x-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-12 w-12 rounded-lg"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-24"})]})]}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-20"})]}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-3/4"})]},t))})}a(CardListSkeleton,"CardListSkeleton");function EmployeeCardSkeleton(){return jsxRuntime.jsxs("div",{className:"overflow-hidden rounded-[var(--radius-card)] bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)]",children:[jsxRuntime.jsx(Skeleton,{className:"h-1.5 w-full rounded-none"}),jsxRuntime.jsxs("div",{className:"space-y-4 p-5",children:[jsxRuntime.jsx(Skeleton,{className:"h-16 w-16 rounded-full"}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-20"})]}),jsxRuntime.jsxs("div",{className:"flex gap-1.5",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-16 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-20 rounded-full"})]}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-full rounded-[var(--radius-control)]"})]})]})}a(EmployeeCardSkeleton,"EmployeeCardSkeleton");function CandidateCardSkeleton(){return jsxRuntime.jsxs("div",{className:"rounded-[var(--radius-card)] bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)]",children:[jsxRuntime.jsxs("div",{className:"space-y-3 p-5 pb-3",children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3.5",children:[jsxRuntime.jsx(Skeleton,{className:"h-16 w-16 shrink-0 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2 pt-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-[0.9375rem] w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-20"})]})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-4/5"})]}),jsxRuntime.jsxs("div",{className:"flex h-6 gap-1.5 pt-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-16 rounded-full"})]})]}),jsxRuntime.jsxs("div",{className:"mx-5 flex items-center justify-between border-t border-border/50 py-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-12"})]})]})}a(CandidateCardSkeleton,"CandidateCardSkeleton");function SkillCardSkeleton(){return jsxRuntime.jsxs("div",{className:"rounded-card bg-raised shadow-card",children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3 p-5 pb-3",children:[jsxRuntime.jsx(Skeleton,{className:"mt-px h-5 w-5 shrink-0 rounded"}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-[0.875rem] w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-[0.875rem] w-4/5"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-28"})]})]}),jsxRuntime.jsxs("div",{className:"mx-5 flex items-center justify-between border-t border-border/50 py-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-10"})]})]})}a(SkillCardSkeleton,"SkillCardSkeleton");function BoardColumnsSkeleton({count:e=4}){return jsxRuntime.jsx("div",{className:"flex h-full min-h-0 gap-2.5",children:Array.from({length:e},(r,t)=>jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded-xl border border-border/60 bg-muted/25",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-1.5 w-1.5 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-3.5 w-14"})]}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-4"})]}),jsxRuntime.jsx("div",{className:"space-y-2.5 p-2.5",children:Array.from({length:2},(s,n)=>jsxRuntime.jsx(Skeleton,{className:"h-20 rounded-lg"},n))})]},t))})}a(BoardColumnsSkeleton,"BoardColumnsSkeleton");function ListRowsSkeleton({count:e=4}){return jsxRuntime.jsx("div",{className:"space-y-1",children:Array.from({length:e},(r,t)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[jsxRuntime.jsx(Skeleton,{className:"h-3.5 w-2/5"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-24"})]}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-14 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-12"})]},t))})}a(ListRowsSkeleton,"ListRowsSkeleton");function LibraryCardSkeleton(){return jsxRuntime.jsxs("div",{className:"rounded-[var(--radius-card)] bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)]",children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3 p-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-9 rounded-[var(--radius-control)]"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2 py-0.5",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-40"})]})]}),jsxRuntime.jsx("div",{className:"space-y-3 border-t border-border/50 px-4 py-3",children:Array.from({length:3},(e,r)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 flex-1"}),jsxRuntime.jsx(Skeleton,{className:"h-3 w-12 shrink-0"})]},r))})]})}a(LibraryCardSkeleton,"LibraryCardSkeleton");function PageHeaderSkeleton(){return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-48"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-64"})]})}a(PageHeaderSkeleton,"PageHeaderSkeleton");var Tabs=TabsPrimitive__namespace.Root,TabsList=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(TabsPrimitive__namespace.List,{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex border-b border-border",e),...r}));TabsList.displayName=TabsPrimitive__namespace.List.displayName;var TabsTrigger=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(TabsPrimitive__namespace.Trigger,{ref:t,className:chunkYWPIPAUQ_cjs.cn("relative inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50","text-muted-foreground hover:text-foreground",'after:absolute after:inset-x-0 after:-bottom-px after:h-[2px] after:content-[""]',"data-[state=active]:text-primary data-[state=active]:after:bg-primary",e),...r}));TabsTrigger.displayName=TabsPrimitive__namespace.Trigger.displayName;var TabsContent=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(TabsPrimitive__namespace.Content,{ref:t,className:chunkYWPIPAUQ_cjs.cn("mt-4 ring-offset-background focus-visible:outline-none",e),...r}));TabsContent.displayName=TabsPrimitive__namespace.Content.displayName;var ToggleGroup=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root,{ref:t,className:chunkYWPIPAUQ_cjs.cn("inline-flex items-center gap-0.5",e),...r}));ToggleGroup.displayName=ToggleGroupPrimitive__namespace.Root.displayName;var ToggleGroupItem=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Item,{ref:t,className:chunkYWPIPAUQ_cjs.cn("inline-flex h-8 min-w-8 items-center justify-center gap-1.5 rounded-md px-2 text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","text-muted-foreground hover:bg-muted hover:text-foreground","data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",e),...r}));ToggleGroupItem.displayName=ToggleGroupPrimitive__namespace.Item.displayName;var percent=a(e=>`${e>0?"+":""}${(e*100).toFixed(Math.abs(e)<.1?1:0)}%`,"percent");function DeltaIndicator({value:e,direction:r="up",emptyLabel:t="\u2014",comparisonLabel:s,className:n}){if(e===null||!Number.isFinite(e))return jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("text-xs text-muted-foreground",n),children:t});const o=Math.abs(e)<5e-4,i=o?null:e>0==(r==="up"),c=o?lucideReact.ArrowRight:e>0?lucideReact.ArrowUpRight:lucideReact.ArrowDownRight,u=o?"0%":percent(e);return jsxRuntime.jsxs("span",{className:chunkYWPIPAUQ_cjs.cn("inline-flex items-center gap-0.5 text-xs font-medium tabular-nums",i===null?"text-muted-foreground":i?"text-success":"text-destructive",n),"aria-label":s?`${u} ${s}`:u,children:[jsxRuntime.jsx(c,{"aria-hidden":!0,className:"size-3.5"}),u,s&&jsxRuntime.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:s})]})}a(DeltaIndicator,"DeltaIndicator");var SIZE_CLASS2={sm:"text-base",md:"text-xl",lg:"text-3xl"};function MetricValue({value:e,label:r,unit:t,delta:s,size:n="md",className:o,...i}){return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("min-w-0",o),...i,children:[r&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:r}),jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex items-baseline gap-1",r&&"mt-1"),children:[jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("font-mono font-semibold tabular-nums tracking-tight text-foreground",SIZE_CLASS2[n]),children:e??"\u2014"}),t&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:t}),s&&jsxRuntime.jsx(DeltaIndicator,{className:"ml-1 font-mono",...s})]})]})}a(MetricValue,"MetricValue");var PanelHeader=React40__namespace.forwardRef(({title:e,icon:r,actions:t,className:s,...n},o)=>jsxRuntime.jsxs("header",{ref:o,className:chunkYWPIPAUQ_cjs.cn("flex min-h-9 items-center gap-2 border-b border-hairline bg-[var(--panel-head-bg)] px-3.5 text-xs font-semibold text-muted-foreground",s),...n,children:[r&&jsxRuntime.jsx("span",{className:"flex shrink-0 [&>svg]:size-3.5","aria-hidden":!0,children:r}),jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",children:e}),t&&jsxRuntime.jsx("div",{className:"flex shrink-0 items-center gap-1",children:t})]}));PanelHeader.displayName="PanelHeader";var contentTabsListClassName="inline-flex h-11 w-fit max-w-full items-center gap-6 overflow-x-auto border-b border-border/60 bg-transparent [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",contentTabsTriggerClassName='relative inline-flex !h-11 flex-shrink-0 items-center gap-2 !rounded-none !px-0 !py-0 text-sm font-semibold !text-muted-foreground transition-colors after:absolute after:inset-x-0 after:-bottom-px after:!h-0.5 after:rounded-full after:!bg-transparent after:content-[""] hover:!bg-transparent hover:!text-foreground data-[state=active]:!bg-transparent data-[state=active]:!text-primary data-[state=active]:shadow-none data-[state=active]:after:!bg-primary',contentTabsButtonClassName='relative inline-flex h-11 flex-shrink-0 items-center gap-2 rounded-none bg-transparent px-0 py-0 text-sm font-semibold transition-colors after:absolute after:inset-x-0 after:-bottom-px after:h-0.5 after:rounded-full after:content-[""]',contentTabsButtonActiveClassName="text-primary after:bg-primary hover:bg-transparent hover:text-primary",contentTabsButtonInactiveClassName="text-muted-foreground after:bg-transparent hover:bg-transparent hover:text-foreground";function firstNonEmpty(e){for(const r of e){const t=r?.trim();if(t)return t}return null}a(firstNonEmpty,"firstNonEmpty");function getUserPrimaryLabel(e){return firstNonEmpty([e.displayName,e.fullName,e.username,e.email])??e.id}a(getUserPrimaryLabel,"getUserPrimaryLabel");function getUserSecondaryLabel(e){const r=getUserPrimaryLabel(e),t=e.username?.trim(),s=e.email?.trim(),n=[t&&t!==r?`@${t}`:null,s&&s!==r?s:null,e.description].filter(o=>!!o);return n.length>0?n.join(" \xB7 "):null}a(getUserSecondaryLabel,"getUserSecondaryLabel");function getUserInitial(e){return getUserPrimaryLabel(e).slice(0,1).toUpperCase()}a(getUserInitial,"getUserInitial");function matchesUser(e,r){const t=r.trim().toLowerCase();return t?[e.displayName,e.fullName,e.username,e.email,e.description,e.id].some(s=>s?.toLowerCase().includes(t)):!0}a(matchesUser,"matchesUser");function updateKnownUsers(e,r){const t=new Map(e);for(const s of r)t.set(s.id,s);return t}a(updateKnownUsers,"updateKnownUsers");function UserPicker(e){const{users:r,onSearch:t,placeholder:s=e.multiple?"Select users":"Select a user",searchPlaceholder:n="Search users...",emptyText:o="No users found",loadingText:i="Loading...",loading:c=!1,errorText:u="Could not load users",retryLabel:d="Retry",clearLabel:l="Clear",disabled:x,className:m,triggerClassName:f,align:p="start"}=e,[g,v]=React40__namespace.useState(!1),[y,j]=React40__namespace.useState(""),[h,w]=React40__namespace.useState(r),[C,E]=React40__namespace.useState(!1),[A,R]=React40__namespace.useState(!1),[N,k]=React40__namespace.useState(0),[M,S]=React40__namespace.useState(()=>updateKnownUsers(new Map,r));React40__namespace.useEffect(()=>{S(I=>updateKnownUsers(I,r)),(!g||y.trim().length===0)&&w(r)},[g,y,r]),React40__namespace.useEffect(()=>{S(I=>updateKnownUsers(I,h))},[h]),React40__namespace.useEffect(()=>{if(!g)return;const I=y.trim();if(R(!1),!t){w(r.filter(U=>matchesUser(U,I))),E(!1);return}if(!I){w(r),E(!1);return}let _=!1;E(!0);const L=window.setTimeout(async()=>{try{const U=await t(I);_||w(U)}catch{_||(w([]),R(!0))}finally{_||E(!1)}},250);return()=>{_=!0,window.clearTimeout(L)}},[g,t,y,r,N]);const T=React40__namespace.useMemo(()=>e.multiple?e.value:e.value?[e.value]:[],[e.multiple,e.value]),F=React40__namespace.useMemo(()=>new Set(T),[T]),b=T.map(I=>M.get(I)??{id:I,username:I}),D=a(I=>{v(I),I||(j(""),w(r),E(!1))},"handleOpenChange"),P=a(I=>{if(e.multiple){const _=F.has(I)?e.value.filter(L=>L!==I):[...e.value,I];e.onChange(_);return}e.onChange(I),D(!1)},"toggleUser"),O=a(()=>{e.multiple?e.onChange([]):e.onChange("")},"clearSelection"),$=e.multiple?e.value.length>0:!!(e.allowClear&&e.value),z=e.multiple?e.maxVisibleUsers??2:1;return jsxRuntime.jsxs(Popover,{open:g,onOpenChange:D,children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",role:"combobox","aria-expanded":g,"aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],disabled:x,className:chunkYWPIPAUQ_cjs.cn("h-9 w-full justify-between gap-2 px-3 font-normal",m,f),children:[jsxRuntime.jsx("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden",children:b.length===0?jsxRuntime.jsx("span",{className:"truncate text-muted-foreground",children:s}):e.multiple?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[b.slice(0,z).map(I=>jsxRuntime.jsx(chunkMTA2XHQG_cjs.Badge,{variant:"secondary",className:"min-w-0 max-w-28 rounded-md px-1.5 py-0 text-xs font-medium",children:jsxRuntime.jsx("span",{className:"truncate",children:getUserPrimaryLabel(I)})},I.id)),b.length>z&&jsxRuntime.jsxs(chunkMTA2XHQG_cjs.Badge,{variant:"secondary",className:"rounded-md px-1.5 py-0 text-xs font-medium",children:["+",b.length-z]})]}):jsxRuntime.jsx("span",{className:"truncate",children:getUserPrimaryLabel(b[0])})}),jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]})}),jsxRuntime.jsxs(PopoverContent,{align:p,className:"w-[var(--radix-popover-trigger-width)] p-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),jsxRuntime.jsx("input",{type:"text",autoFocus:!0,value:y,disabled:x,onChange:a(I=>j(I.target.value),"onChange"),placeholder:n,"aria-label":n,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),y?jsxRuntime.jsx("button",{type:"button",onClick:a(()=>j(""),"onClick"),className:"rounded-sm text-muted-foreground transition-colors hover:text-foreground","aria-label":l,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})}):null]}),$?jsxRuntime.jsxs("button",{type:"button",onClick:O,className:"flex w-full items-center justify-between border-b px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[jsxRuntime.jsx("span",{children:l}),jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})]}):null,jsxRuntime.jsx("div",{className:"max-h-72 overflow-y-auto py-1",children:C||c?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),i]}):A?jsxRuntime.jsxs("div",{role:"alert",className:"space-y-2 px-3 py-3 text-xs text-destructive",children:[jsxRuntime.jsx("p",{children:u}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",size:"sm",onClick:a(()=>k(I=>I+1),"onClick"),children:d})]}):h.length===0?jsxRuntime.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:o}):h.map(I=>{const _=F.has(I.id),L=getUserSecondaryLabel(I);return jsxRuntime.jsxs("button",{type:"button",onClick:a(()=>P(I.id),"onClick"),className:chunkYWPIPAUQ_cjs.cn("flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-muted",_&&"bg-muted/50"),children:[jsxRuntime.jsxs(Avatar,{className:"h-7 w-7 shrink-0",children:[I.avatar?jsxRuntime.jsx(AvatarImage,{src:I.avatar}):null,jsxRuntime.jsx(AvatarFallback,{className:"text-[11px]",children:getUserInitial(I)||jsxRuntime.jsx(lucideReact.UserRound,{className:"h-3.5 w-3.5"})})]}),jsxRuntime.jsxs("span",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("span",{className:"block truncate font-medium",children:getUserPrimaryLabel(I)}),L?jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:L}):null]}),jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("flex h-5 w-5 shrink-0 items-center justify-center rounded border border-border text-transparent",_&&"border-primary bg-primary text-primary-foreground"),children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"})})]},I.id)})})]})]})}a(UserPicker,"UserPicker");function Calendar({className:e,classNames:r,captionLayout:t="dropdown",locale:s=locale.zhCN,navLayout:n="around",showOutsideDays:o=!0,fixedWeeks:i=!0,labels:c,...u}){return jsxRuntime.jsx(reactDayPicker.DayPicker,{fixedWeeks:i,labels:{labelNav:a(()=>"\u65E5\u5386\u5BFC\u822A","labelNav"),labelNext:a(()=>"\u4E0B\u4E2A\u6708","labelNext"),labelPrevious:a(()=>"\u4E0A\u4E2A\u6708","labelPrevious"),...c},locale:s,navLayout:n,captionLayout:t,showOutsideDays:o,className:chunkYWPIPAUQ_cjs.cn("w-[18rem] p-3",e),classNames:{months:"flex flex-col gap-4",month:"relative w-full",month_caption:"flex h-8 items-center justify-center px-12",nav:"flex h-8 items-center",caption_label:"inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-2.5 text-sm font-medium",dropdowns:"flex items-center justify-center gap-2",dropdown_root:"relative inline-flex h-8 items-center",dropdown:"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0",months_dropdown:"min-w-[5.25rem]",years_dropdown:"min-w-[5rem]",chevron:"h-4 w-4 opacity-60",button_previous:chunkYWPIPAUQ_cjs.cn(chunkM2GCF4FZ_cjs.buttonVariants({variant:"outline"}),"absolute left-0 top-0 h-8 w-8 bg-transparent p-0 opacity-70 hover:opacity-100"),button_next:chunkYWPIPAUQ_cjs.cn(chunkM2GCF4FZ_cjs.buttonVariants({variant:"outline"}),"absolute right-0 top-0 h-8 w-8 bg-transparent p-0 opacity-70 hover:opacity-100"),month_grid:"mt-3 w-full table-fixed border-collapse",weekdays:"grid grid-cols-7",weekday:"flex h-8 items-center justify-center text-xs font-normal text-muted-foreground",weeks:"block",week:"grid grid-cols-7",day:"relative flex h-9 w-9 items-center justify-center p-0 text-center text-sm",day_button:chunkYWPIPAUQ_cjs.cn(chunkM2GCF4FZ_cjs.buttonVariants({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...r},components:{Chevron:a(({...d})=>d.orientation==="left"?jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}):d.orientation==="down"?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),"Chevron")},...u})}a(Calendar,"Calendar"),Calendar.displayName="Calendar";var datePickerLocales={enUS:locale.enUS,zhCN:locale.zhCN};function formatDateValue(e){const r=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${r}-${t}-${s}`}a(formatDateValue,"formatDateValue");function parseDateValue(e){const r=e?.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!r)return;const[,t,s,n]=r;return new Date(Number(t),Number(s)-1,Number(n))}a(parseDateValue,"parseDateValue");function formatDateDisplay(e){return e?e.replaceAll("-","/"):""}a(formatDateDisplay,"formatDateDisplay");function DatePicker({value:e,onChange:r,placeholder:t="\u5E74 / \u6708 / \u65E5",locale:s=locale.zhCN,labels:n,weekStartsOn:o,startMonth:i,endMonth:c,formatDisplay:u=formatDateDisplay,disabled:d,defaultOpen:l=!1,onOpenChange:x,className:m,calendarClassName:f,...p}){const[g,v]=React40__namespace.useState(l),y=a(C=>{v(C),x?.(C)},"change"),j=new Date().getFullYear(),h=React40__namespace.useMemo(()=>new Date(j-10,0),[j]),w=React40__namespace.useMemo(()=>new Date(j+20,11),[j]);return jsxRuntime.jsxs(Popover,{open:g,onOpenChange:y,children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",disabled:d,...p,className:chunkYWPIPAUQ_cjs.cn("h-9 w-full justify-between px-3 text-left text-sm font-normal",!e&&"text-muted-foreground",m),children:[jsxRuntime.jsx("span",{children:e?u(e):t}),jsxRuntime.jsx(lucideReact.CalendarDays,{className:"h-4 w-4 opacity-70"})]})}),jsxRuntime.jsx(PopoverContent,{align:"end",className:"w-auto p-0",children:jsxRuntime.jsx(Calendar,{locale:s,mode:"single",selected:parseDateValue(e),startMonth:i??h,endMonth:c??w,onSelect:a(C=>{C&&(r(formatDateValue(C)),y(!1))},"onSelect"),...f?{className:f}:{},...n?{labels:n}:{},...o!==void 0?{weekStartsOn:o}:{}})})]})}a(DatePicker,"DatePicker"),DatePicker.displayName="DatePicker";var Table=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:t,className:chunkYWPIPAUQ_cjs.cn("w-full caption-bottom text-sm",e),...r})}));Table.displayName="Table";var TableHeader=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("thead",{ref:t,className:chunkYWPIPAUQ_cjs.cn("bg-[var(--table-head-bg)] [&_tr]:border-b",e),...r}));TableHeader.displayName="TableHeader";var TableBody=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("tbody",{ref:t,className:chunkYWPIPAUQ_cjs.cn("[&_tr:last-child]:border-0",e),...r}));TableBody.displayName="TableBody";var TableFooter=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("tfoot",{ref:t,className:chunkYWPIPAUQ_cjs.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...r}));TableFooter.displayName="TableFooter";var TableRow=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("tr",{ref:t,className:chunkYWPIPAUQ_cjs.cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...r}));TableRow.displayName="TableRow";var TableHead=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("th",{ref:t,className:chunkYWPIPAUQ_cjs.cn("h-9 px-3 text-left align-middle text-xs font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...r}));TableHead.displayName="TableHead";var SortableTableHead=React40__namespace.forwardRef(({className:e,children:r,direction:t,onSort:s,...n},o)=>{const i=t==="asc"?lucideReact.ArrowUp:t==="desc"?lucideReact.ArrowDown:null;return jsxRuntime.jsx(TableHead,{ref:o,className:chunkYWPIPAUQ_cjs.cn("p-0",e),"aria-sort":t==="asc"?"ascending":t==="desc"?"descending":"none",...n,children:jsxRuntime.jsxs("button",{type:"button",onClick:a(()=>s(t==="desc"?"asc":"desc"),"onClick"),className:"group flex h-9 w-full items-center gap-1 px-3 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[r,i?jsxRuntime.jsx(i,{className:"h-3 w-3 shrink-0",strokeWidth:2.5}):jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-50"})]})})});SortableTableHead.displayName="SortableTableHead";var TableCell=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("td",{ref:t,className:chunkYWPIPAUQ_cjs.cn("px-3 py-2 align-middle text-[13px] [&:has([role=checkbox])]:pr-0",e),...r}));TableCell.displayName="TableCell";var TableCaption=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("caption",{ref:t,className:chunkYWPIPAUQ_cjs.cn("mt-4 text-sm text-muted-foreground",e),...r}));TableCaption.displayName="TableCaption";var ContextMenu=ContextMenuPrimitive__namespace.Root,ContextMenuTrigger=ContextMenuPrimitive__namespace.Trigger,ContextMenuGroup=ContextMenuPrimitive__namespace.Group,ContextMenuPortal=ContextMenuPrimitive__namespace.Portal,ContextMenuSub=ContextMenuPrimitive__namespace.Sub,ContextMenuSubTrigger=React40__namespace.forwardRef(({className:e,children:r,...t},s)=>jsxRuntime.jsxs(ContextMenuPrimitive__namespace.SubTrigger,{ref:s,className:chunkYWPIPAUQ_cjs.cn("flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-[13px] outline-none transition-colors duration-100","focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ContextMenuSubTrigger.displayName=ContextMenuPrimitive__namespace.SubTrigger.displayName;var ContextMenuSubContent=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ContextMenuPrimitive__namespace.SubContent,{ref:t,className:chunkYWPIPAUQ_cjs.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-elevation-2","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",e),...r}));ContextMenuSubContent.displayName=ContextMenuPrimitive__namespace.SubContent.displayName;var ContextMenuContent=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal,{children:jsxRuntime.jsx(ContextMenuPrimitive__namespace.Content,{ref:t,className:chunkYWPIPAUQ_cjs.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-elevation-2","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",e),...r})}));ContextMenuContent.displayName=ContextMenuPrimitive__namespace.Content.displayName;var ContextMenuItem=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ContextMenuPrimitive__namespace.Item,{ref:t,className:chunkYWPIPAUQ_cjs.cn("relative flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-[13px] outline-none transition-colors duration-100","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r}));ContextMenuItem.displayName=ContextMenuPrimitive__namespace.Item.displayName;var ContextMenuCheckboxItem=React40__namespace.forwardRef(({className:e,children:r,checked:t,...s},n)=>jsxRuntime.jsxs(ContextMenuPrimitive__namespace.CheckboxItem,{ref:n,className:chunkYWPIPAUQ_cjs.cn("relative flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-[13px] outline-none transition-colors duration-100","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t??!1,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator,{children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})})}),r]}));ContextMenuCheckboxItem.displayName=ContextMenuPrimitive__namespace.CheckboxItem.displayName;var ContextMenuLabel=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ContextMenuPrimitive__namespace.Label,{ref:t,className:chunkYWPIPAUQ_cjs.cn("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...r}));ContextMenuLabel.displayName=ContextMenuPrimitive__namespace.Label.displayName;var ContextMenuSeparator=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ContextMenuPrimitive__namespace.Separator,{ref:t,className:chunkYWPIPAUQ_cjs.cn("-mx-1 my-1 h-px bg-muted",e),...r}));ContextMenuSeparator.displayName=ContextMenuPrimitive__namespace.Separator.displayName;var FileListRow=React40__namespace.forwardRef(({icon:e,name:r,meta:t,actions:s,trailing:n,selected:o,busy:i,onOpen:c,className:u,...d},l)=>jsxRuntime.jsxs("div",{ref:l,role:c?"button":void 0,tabIndex:c?0:void 0,onClick:c,onKeyDown:c?x=>{x.target===x.currentTarget&&(x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),c()))}:void 0,"data-state":o?"selected":void 0,className:chunkYWPIPAUQ_cjs.cn("group/file flex min-w-0 items-center gap-3 rounded-md px-3 py-2 transition-colors",c&&"cursor-pointer",o?"bg-accent text-accent-foreground":"hover:bg-muted/60",i&&"opacity-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",u),...d,children:[e&&jsxRuntime.jsx("span",{className:"flex shrink-0 items-center",children:e}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{className:"truncate text-[13px]",children:r}),t&&jsxRuntime.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:t})]}),n&&jsxRuntime.jsx("div",{className:"shrink-0",children:n}),s&&jsxRuntime.jsx("div",{onClick:a(x=>x.stopPropagation(),"onClick"),className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover/file:opacity-100 data-[state=selected]:opacity-100",children:s})]}));FileListRow.displayName="FileListRow";var Dialog=DialogPrimitive__namespace.Root,DialogTrigger=DialogPrimitive__namespace.Trigger,DialogPortal=DialogPrimitive__namespace.Portal,DialogClose=DialogPrimitive__namespace.Close,DialogOverlay=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(DialogPrimitive__namespace.Overlay,{ref:t,className:chunkYWPIPAUQ_cjs.cn("fixed inset-0 z-50 bg-overlay/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));DialogOverlay.displayName=DialogPrimitive__namespace.Overlay.displayName;var DialogContent=React40__namespace.forwardRef(({className:e,children:r,hideCloseButton:t,overlayClassName:s,closeOnOutsideClick:n=!1,onPointerDownOutside:o,onInteractOutside:i,...c},u)=>jsxRuntime.jsxs(DialogPortal,{children:[jsxRuntime.jsx(DialogOverlay,{className:s}),jsxRuntime.jsxs(DialogPrimitive__namespace.Content,{ref:u,className:chunkYWPIPAUQ_cjs.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-3 border bg-card p-4 shadow-elevation-3 duration-150 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),onPointerDownOutside:a(d=>{o?.(d),n||d.preventDefault()},"onPointerDownOutside"),onInteractOutside:a(d=>{i?.(d),n||d.preventDefault()},"onInteractOutside"),...c,children:[r,!t&&jsxRuntime.jsxs(DialogPrimitive__namespace.Close,{className:"absolute right-3 top-3 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=DialogPrimitive__namespace.Content.displayName;var DialogHeader=a(({className:e,...r})=>jsxRuntime.jsx("div",{"data-ai-launcher-avoid":"true",className:chunkYWPIPAUQ_cjs.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...r}),"DialogHeader");DialogHeader.displayName="DialogHeader";var DialogFooter=a(({className:e,...r})=>jsxRuntime.jsx("div",{"data-ai-launcher-avoid":"true",className:chunkYWPIPAUQ_cjs.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r}),"DialogFooter");DialogFooter.displayName="DialogFooter";var DialogTitle=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(DialogPrimitive__namespace.Title,{ref:t,className:chunkYWPIPAUQ_cjs.cn("text-[15px] font-medium leading-none tracking-tight",e),...r}));DialogTitle.displayName=DialogPrimitive__namespace.Title.displayName;var DialogDescription=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(DialogPrimitive__namespace.Description,{ref:t,className:chunkYWPIPAUQ_cjs.cn("text-[13px] text-muted-foreground",e),...r}));DialogDescription.displayName=DialogPrimitive__namespace.Description.displayName;var DrawerContext=React40__namespace.createContext(void 0),escapeLayers=[];function useDrawer(){const e=React40__namespace.useContext(DrawerContext);if(!e)throw new Error("useDrawer must be used within a Drawer");return e}a(useDrawer,"useDrawer");var DrawerLabelContext=React40__namespace.createContext(void 0),FOCUSABLE_SELECTOR=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function useFocusTrap(e,r){React40__namespace.useEffect(()=>{if(!r)return;const t=e.current;if(!t)return;const s=document.activeElement,n=a(()=>Array.from(t.querySelectorAll(FOCUSABLE_SELECTOR)).filter(i=>i.getAttribute("aria-hidden")!=="true"&&!i.hasAttribute("inert")),"focusable");(n()[0]??t).focus();const o=a(i=>{if(i.key!=="Tab")return;const c=n();if(c.length===0){i.preventDefault(),t.focus();return}const u=c[0],d=c[c.length-1],l=document.activeElement;i.shiftKey&&(l===u||l===t)?(i.preventDefault(),d.focus()):(!i.shiftKey&&l===d||l instanceof Node&&!t.contains(l))&&(i.preventDefault(),u.focus())},"handleKeyDown");return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o),s?.focus?.()}},[r,e])}a(useFocusTrap,"useFocusTrap");var Drawer=React40__namespace.forwardRef(({children:e,open:r,onOpenChange:t},s)=>{const[n,o]=React40__namespace.useState(!1),i=r??n,c=React40__namespace.useCallback(d=>{r===void 0&&o(d),t?.(d)},[r,t]),u=React40__namespace.useMemo(()=>({open:i,setOpen:c}),[i,c]);return jsxRuntime.jsx(DrawerContext.Provider,{value:u,children:jsxRuntime.jsx("div",{ref:s,children:e})})});Drawer.displayName="Drawer";var DrawerTrigger=React40__namespace.forwardRef(({children:e,asChild:r=!1,onClick:t,onPointerDown:s,...n},o)=>{const{setOpen:i}=useDrawer(),c=React40__namespace.useCallback(d=>{i(!0),t?.(d)},[i,t]),u=React40__namespace.useCallback(d=>{i(!0),s?.(d)},[i,s]);return r&&React40__namespace.isValidElement(e)?React40__namespace.cloneElement(e,{...n,onClick:c,onPointerDown:u,ref:o}):jsxRuntime.jsx("button",{ref:o,onPointerDown:u,onClick:c,...n,children:e})});DrawerTrigger.displayName="DrawerTrigger";var DrawerPortal=a(({children:e})=>typeof document>"u"?null:reactDom.createPortal(e,document.body),"DrawerPortal");DrawerPortal.displayName="DrawerPortal";var DrawerOverlay=React40__namespace.forwardRef(({className:e,onClick:r,...t},s)=>{const{setOpen:n}=useDrawer(),o=React40__namespace.useCallback(i=>{n(!1),r?.(i)},[n,r]);return jsxRuntime.jsx("div",{ref:s,className:chunkYWPIPAUQ_cjs.cn("fixed inset-0 z-40 animate-fade-in bg-overlay/50 transition-opacity",e),onClick:o,...t})});DrawerOverlay.displayName="DrawerOverlay";var DrawerContent=React40__namespace.forwardRef(({children:e,className:r,side:t="right",modal:s=!0,closeOnOverlayClick:n=!0,closeOnEscape:o=!0,overlayClassName:i,...c},u)=>{const{open:d,setOpen:l}=useDrawer(),x=React40__namespace.useRef(null),m=React40__namespace.useId(),f=`${m}-title`,p=`${m}-description`,[g,v]=React40__namespace.useState(!1),[y,j]=React40__namespace.useState(!1),h=React40__namespace.useMemo(()=>({titleId:f,descriptionId:p,registerTitle:a(()=>v(!0),"registerTitle"),registerDescription:a(()=>j(!0),"registerDescription")}),[p,f]);useFocusTrap(x,d&&s);const w=React40__namespace.useCallback(M=>{M.stopPropagation()},[]),C=React40__namespace.useCallback(()=>{n&&l(!1)},[l,n]);if(React40__namespace.useEffect(()=>{const M=Symbol("drawer"),S=a(F=>{F.key!=="Escape"||!d||F.defaultPrevented||escapeLayers[escapeLayers.length-1]===M&&o&&l(!1)},"handleKeyDown"),T=document.body.style.overflow;return d&&(escapeLayers.push(M),document.addEventListener("keydown",S),s&&(document.body.style.overflow="hidden")),()=>{const F=escapeLayers.indexOf(M);F!==-1&&escapeLayers.splice(F,1),document.removeEventListener("keydown",S),s&&(document.body.style.overflow=T)}},[d,l,o,s]),!d)return null;const E={right:"h-full max-w-md w-full border-l border-border animate-slide-in-right",left:"h-full max-w-md w-full border-r border-border animate-slide-in-left",top:"w-full max-h-[80vh] border-b border-border animate-fade-in",bottom:"w-full max-h-[80vh] border-t border-border animate-fade-in"},A=t==="left"||t==="right",R=chunkYWPIPAUQ_cjs.cn("fixed inset-0 z-50",A?"flex":"flex flex-col",!s&&"pointer-events-none",!s&&t==="right"&&"justify-end",!s&&t==="bottom"&&"justify-end"),N=jsxRuntime.jsx("div",{ref:a(M=>{x.current=M,typeof u=="function"?u(M):u&&(u.current=M)},"ref"),role:"dialog","aria-modal":s,tabIndex:-1,...g?{"aria-labelledby":f}:{},...y?{"aria-describedby":p}:{},className:chunkYWPIPAUQ_cjs.cn("pointer-events-auto flex flex-col bg-background shadow-elevation-3 outline-none",E[t],r),onClick:w,...c,children:jsxRuntime.jsx(DrawerLabelContext.Provider,{value:h,children:e})}),k=jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("animate-fade-in bg-overlay/50 transition-opacity","flex-1",i),onClick:C});return jsxRuntime.jsx(DrawerPortal,{children:jsxRuntime.jsx("div",{className:R,children:s?t==="left"||t==="top"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[N,k]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[k,N]}):N})})});DrawerContent.displayName="DrawerContent";var DrawerHeader=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,"data-ai-launcher-avoid":"true",className:chunkYWPIPAUQ_cjs.cn("flex items-center justify-between space-y-1 border-b border-border/60 p-3",e),...r}));DrawerHeader.displayName="DrawerHeader";var DrawerFooter=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,"data-ai-launcher-avoid":"true",className:chunkYWPIPAUQ_cjs.cn("flex items-center justify-end space-x-2 border-t border-border/60 p-3",e),...r}));DrawerFooter.displayName="DrawerFooter";var DrawerTitle=React40__namespace.forwardRef(({className:e,id:r,...t},s)=>{const n=React40__namespace.useContext(DrawerLabelContext);return React40__namespace.useEffect(()=>n?.registerTitle(),[n]),jsxRuntime.jsx("h2",{ref:s,id:r??n?.titleId,className:chunkYWPIPAUQ_cjs.cn("text-[15px] font-medium leading-none tracking-tight",e),...t})});DrawerTitle.displayName="DrawerTitle";var DrawerDescription=React40__namespace.forwardRef(({className:e,id:r,...t},s)=>{const n=React40__namespace.useContext(DrawerLabelContext);return React40__namespace.useEffect(()=>n?.registerDescription(),[n]),jsxRuntime.jsx("p",{ref:s,id:r??n?.descriptionId,className:chunkYWPIPAUQ_cjs.cn("text-[13px] text-muted-foreground",e),...t})});DrawerDescription.displayName="DrawerDescription";var DrawerBody=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx("div",{ref:t,className:chunkYWPIPAUQ_cjs.cn("flex-1 overflow-y-auto p-3",e),...r}));DrawerBody.displayName="DrawerBody";var DrawerClose=React40__namespace.forwardRef(({children:e,asChild:r=!1,onClick:t,...s},n)=>{const{setOpen:o}=useDrawer(),i=React40__namespace.useCallback(c=>{o(!1),t?.(c)},[o,t]);return r&&React40__namespace.isValidElement(e)?React40__namespace.cloneElement(e,{...s,onClick:i,ref:n}):jsxRuntime.jsx("button",{ref:n,onClick:i,...s,children:e})});DrawerClose.displayName="DrawerClose";var Separator3=React40__namespace.forwardRef(({className:e,orientation:r="horizontal",decorative:t=!0,...s},n)=>jsxRuntime.jsx(SeparatorPrimitive__namespace.Root,{ref:n,decorative:t,orientation:r,className:chunkYWPIPAUQ_cjs.cn("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));Separator3.displayName=SeparatorPrimitive__namespace.Root.displayName;var ScrollArea=React40__namespace.forwardRef(({className:e,children:r,viewportRef:t,viewportClassName:s,horizontalScroll:n=!1,type:o="scroll",...i},c)=>jsxRuntime.jsxs(ScrollAreaPrimitive__namespace.Root,{ref:c,type:o,className:chunkYWPIPAUQ_cjs.cn("relative overflow-hidden",e),...i,children:[jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport,{ref:t,className:chunkYWPIPAUQ_cjs.cn("h-full w-full rounded-[inherit]",s),children:r}),jsxRuntime.jsx(ScrollBar,{}),n&&jsxRuntime.jsx(ScrollBar,{orientation:"horizontal"}),jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner,{})]}));ScrollArea.displayName=ScrollAreaPrimitive__namespace.Root.displayName;var ScrollBar=React40__namespace.forwardRef(({className:e,orientation:r="vertical",...t},s)=>jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,{ref:s,orientation:r,className:chunkYWPIPAUQ_cjs.cn("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...t,children:jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ScrollBar.displayName=ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;var HoverCard=HoverCardPrimitive__namespace.Root,HoverCardTrigger=HoverCardPrimitive__namespace.Trigger,HoverCardContent=React40__namespace.forwardRef(({className:e,align:r="center",sideOffset:t=4,...s},n)=>jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal,{children:jsxRuntime.jsx(HoverCardPrimitive__namespace.Content,{ref:n,align:r,sideOffset:t,className:chunkYWPIPAUQ_cjs.cn("z-50 w-64 rounded-md border bg-popover p-0 text-popover-foreground shadow-elevation-2 outline-none 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",e),...s})}));HoverCardContent.displayName=HoverCardPrimitive__namespace.Content.displayName;function InfoTip({label:e,children:r,className:t,contentClassName:s}){return jsxRuntime.jsxs(Popover,{children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"ghost",size:"icon",className:chunkYWPIPAUQ_cjs.cn("h-6 w-6 shrink-0 text-muted-foreground",t),"aria-label":e,children:jsxRuntime.jsx(lucideReact.CircleHelp,{className:"h-3.5 w-3.5"})})}),jsxRuntime.jsx(PopoverContent,{className:chunkYWPIPAUQ_cjs.cn("w-80 max-w-[calc(100vw-2rem)] text-sm leading-6",s),align:"start",children:r})]})}a(InfoTip,"InfoTip");var SIZES2={compact:{root:"min-h-8 items-start px-2 py-1.5 text-left",iconWrap:"mb-1 p-1",icon:"h-4 w-4",title:"text-xs font-normal text-muted-foreground",description:"mt-1 text-xs"},sm:{root:"py-10",iconWrap:"mb-3 p-3",icon:"h-6 w-6",title:"mb-1 text-sm font-medium",description:"mb-4 text-xs"},md:{root:"py-12",iconWrap:"mb-4 p-6",icon:"h-12 w-12",title:"mb-2 text-lg font-semibold",description:"mb-6 text-sm"}};function EmptyState({icon:e,title:r,description:t,action:s,secondaryAction:n,size:o="md",className:i}){const c=SIZES2[o];return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex flex-col items-center justify-center px-4 text-center",c.root,i),children:[e&&jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("rounded-full bg-muted/50",c.iconWrap),children:jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("text-muted-foreground",c.icon),children:e})}),jsxRuntime.jsx("h3",{className:chunkYWPIPAUQ_cjs.cn("text-foreground",c.title),children:r}),t&&jsxRuntime.jsx("p",{className:chunkYWPIPAUQ_cjs.cn("max-w-md text-muted-foreground",c.description),children:t}),(s||n)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row",children:[s&&jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{size:o==="md"?"default":"sm",onClick:s.onClick,children:[s.icon&&jsxRuntime.jsx("span",{className:"mr-2",children:s.icon}),s.label]}),n&&jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{size:o==="md"?"default":"sm",variant:"outline",onClick:n.onClick,children:n.label})]})]})}a(EmptyState,"EmptyState");function Breadcrumb({items:e,homeHref:r="/",onHomeClick:t,showHome:s=!0,className:n}){const o=r||t?"a":"span";return jsxRuntime.jsxs("nav",{"aria-label":"Breadcrumb",className:chunkYWPIPAUQ_cjs.cn("flex items-center space-x-1 text-sm text-muted-foreground",n),children:[s&&jsxRuntime.jsx(o,{...r?{href:r}:{},...t?{onClick:t}:{},className:chunkYWPIPAUQ_cjs.cn("flex items-center transition-colors",(r||t)&&"cursor-pointer hover:text-foreground"),"aria-label":"\u9996\u9875",children:jsxRuntime.jsx(lucideReact.Home,{className:"h-4 w-4"})}),e.map((i,c)=>{const u=c===e.length-1,d=!u&&(!!i.href||!!i.onClick),l=d?"a":"span";return jsxRuntime.jsxs(React40.Fragment,{children:[(s||c>0)&&jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsxs(l,{...i.href&&!u?{href:i.href}:{},...i.onClick&&!u?{onClick:i.onClick}:{},className:chunkYWPIPAUQ_cjs.cn("flex items-center",d&&"cursor-pointer transition-colors hover:text-foreground",u&&"font-medium text-foreground"),children:[i.icon&&jsxRuntime.jsx("span",{className:"mr-1.5",children:i.icon}),i.label]})]},c)})]})}a(Breadcrumb,"Breadcrumb");var Progress=React40__namespace.forwardRef(({className:e,value:r,...t},s)=>jsxRuntime.jsx(ProgressPrimitive__namespace.Root,{ref:s,value:r,className:chunkYWPIPAUQ_cjs.cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...t,children:jsxRuntime.jsx(ProgressPrimitive__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(r??0)}%)`}})}));Progress.displayName=ProgressPrimitive__namespace.Root.displayName;var colorClasses={primary:"bg-primary",secondary:"bg-secondary-foreground",destructive:"bg-destructive",warning:"bg-warning"};function TopProgressBar({loading:e,color:r="primary",height:t=2,speed:s=200,minDisplayTime:n=300,className:o}){const[i,c]=React40.useState(0),[u,d]=React40.useState(!1),l=React40.useRef(null);return React40.useEffect(()=>{let x,m,f;if(e)d(!0),l.current=Date.now(),c(0),x=setInterval(()=>{c(p=>p>=90?p+Math.random()*2:p>=70?p+Math.random()*5:p+Math.random()*10+5)},s);else{x&&clearInterval(x),c(100);const p=l.current?Math.max(0,n-(Date.now()-l.current)):0;m=setTimeout(()=>{f=setTimeout(()=>{d(!1),c(0),l.current=null},s)},p)}return()=>{x&&clearInterval(x),m&&clearTimeout(m),f&&clearTimeout(f)}},[e,s,n]),u?jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("fixed left-0 top-0 z-50 w-full bg-background/20 backdrop-blur-sm",o),style:{height:t},children:jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("h-full transition-all duration-300 ease-out",colorClasses[r],i===100?"opacity-0":"opacity-100"),style:{width:`${Math.min(i,100)}%`,transitionDuration:i===100?`${s}ms`:"300ms"}})}):null}a(TopProgressBar,"TopProgressBar");function FileUpload({value:e,onChange:r,multiple:t=!1,files:s=[],onFilesChange:n,accept:o,maxSize:i=50*1024*1024,disabled:c=!1,showFileInfo:u=!0,className:d,hint:l="\u62D6\u62FD\u60A8\u7684\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u6D4F\u89C8",supportedFormats:x="\u652F\u6301\u683C\u5F0F\uFF1APDF\u3001Word\u3001Excel\u3001PowerPoint\u3001TXT\u3001Markdown",maxSizeText:m="\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF1A50MB"}){const f=React40__namespace.useRef(null),[p,g]=React40__namespace.useState(!1),[v,y]=React40__namespace.useState(""),j=a(S=>{if(S.size>i)return`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF08\u6700\u5927 ${M(i)}\uFF09`;if(o){const T=o.split(",").map(D=>D.trim()),F="."+S.name.split(".").pop()?.toLowerCase();if(!T.some(D=>D===F||D.includes("*")&&S.type.startsWith(D.split("/")[0]+"/")))return"\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F"}return null},"validateFile"),h=a(S=>{const T=j(S);if(T){y(T);return}if(y(""),r?.(S),f.current){const F=new DataTransfer;F.items.add(S),f.current.files=F.files}},"handleFileSelect"),w=a(S=>{if(!t){S[0]&&h(S[0]);return}const T=S.map(j).find(Boolean);if(T){y(T);return}y(""),n?.([...s,...S.filter(F=>!s.some(b=>b.name===F.name&&b.size===F.size&&b.lastModified===F.lastModified))])},"handleFiles"),C=a(S=>{w(Array.from(S.target.files??[])),t&&(S.target.value="")},"handleFileChange"),E=a(S=>{S.preventDefault(),c||g(!0)},"handleDragOver"),A=a(S=>{S.preventDefault(),g(!1)},"handleDragLeave"),R=a(S=>{S.preventDefault(),g(!1),!c&&w(Array.from(S.dataTransfer.files??[]))},"handleDrop"),N=a(()=>{c||f.current?.click()},"handleBrowseClick"),k=a(S=>{S.stopPropagation(),y(""),r?.(null),f.current&&(f.current.value="")},"handleRemoveFile"),M=a(S=>{if(S===0)return"0 Bytes";const T=1024,F=["Bytes","KB","MB","GB"],b=Math.floor(Math.log(S)/Math.log(T));return Math.round(S/Math.pow(T,b)*100)/100+" "+F[b]},"formatFileSize2");return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-4",d),children:[jsxRuntime.jsxs("div",{"data-file-drop-zone":"",className:chunkYWPIPAUQ_cjs.cn("relative cursor-pointer rounded-lg border-2 border-dashed p-8 transition-all",p&&"scale-[1.02] border-primary bg-primary/5",!p&&!c&&"border-border hover:border-primary/50",c&&"cursor-not-allowed opacity-50",v&&"border-destructive bg-destructive/5"),onDragOver:E,onDragLeave:A,onDrop:R,onClick:N,children:[jsxRuntime.jsx("input",{ref:f,type:"file",className:"hidden",onChange:C,disabled:c,accept:o,multiple:t}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 text-center",children:[jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("rounded-full p-4 transition-colors",v?"bg-destructive/10":"bg-muted"),children:jsxRuntime.jsx(lucideReact.Upload,{className:chunkYWPIPAUQ_cjs.cn("h-8 w-8",v?"text-destructive":"text-muted-foreground")})}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("p",{className:"text-base font-medium text-foreground",children:l}),x&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:x}),m&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:m})]}),v&&jsxRuntime.jsx("p",{className:"text-sm font-medium text-destructive",children:v})]})]}),u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[(t?s:e?[e]:[]).map((S,T)=>jsxRuntime.jsx("div",{className:"rounded-lg border border-border bg-muted/40 p-4",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:jsxRuntime.jsx(lucideReact.File,{className:"h-5 w-5 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("p",{className:"truncate font-medium text-foreground",children:S.name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:M(S.size)})]})]}),!c&&jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"ghost",size:"sm",onClick:t?()=>n?.(s.filter((F,b)=>b!==T)):k,className:"h-8 w-8 p-0",title:"\u79FB\u9664\u6587\u4EF6",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})},`${S.name}-${T}`)),(t?s.length===0:!e)&&jsxRuntime.jsx("div",{className:"text-center text-sm text-muted-foreground",children:"\u672A\u9009\u62E9\u6587\u4EF6"})]})]})}a(FileUpload,"FileUpload");var ToastProvider=ToastPrimitives__namespace.Provider,ToastViewport=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ToastPrimitives__namespace.Viewport,{ref:t,className:chunkYWPIPAUQ_cjs.cn("fixed bottom-0 right-0 top-auto z-[100] flex max-h-screen w-full flex-col p-4 md:max-w-[420px]",e),...r}));ToastViewport.displayName=ToastPrimitives__namespace.Viewport.displayName;var toastVariants=classVarianceAuthority.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-elevation-3 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive border-destructive bg-destructive text-destructive-foreground",success:"border-success/25 bg-success-soft text-foreground",warning:"border-warning/25 bg-warning-soft text-foreground",info:"border-info/25 bg-info-soft text-foreground"}},defaultVariants:{variant:"default"}}),Toast=React40__namespace.forwardRef(({className:e,variant:r,...t},s)=>{const{errorId:n,severity:o,retryable:i,retryAction:c,helpUrl:u,duration:d,priority:l,deduplicationKey:x,timestamp:m,count:f,...p}=t;return jsxRuntime.jsx(ToastPrimitives__namespace.Root,{ref:s,className:chunkYWPIPAUQ_cjs.cn(toastVariants({variant:r}),e),duration:d,...p})});Toast.displayName=ToastPrimitives__namespace.Root.displayName;var ToastAction=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ToastPrimitives__namespace.Action,{ref:t,className:chunkYWPIPAUQ_cjs.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...r}));ToastAction.displayName=ToastPrimitives__namespace.Action.displayName;var ToastClose=React40__namespace.forwardRef(({className:e,...r},t)=>jsxRuntime.jsx(ToastPrimitives__namespace.Close,{ref:t,className:chunkYWPIPAUQ_cjs.cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive-foreground/60 group-[.destructive]:focus:ring-offset-destructive",e),"toast-close":"",...r,children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})}));ToastClose.displayName=ToastPrimitives__namespace.Close.displayName;function allowTextSelection(e){return r=>{r.stopPropagation(),e?.(r)}}a(allowTextSelection,"allowTextSelection");var ToastTitle=React40__namespace.forwardRef(({className:e,onPointerDown:r,...t},s)=>jsxRuntime.jsx(ToastPrimitives__namespace.Title,{ref:s,className:chunkYWPIPAUQ_cjs.cn("select-text text-sm font-semibold",e),onPointerDown:allowTextSelection(r),...t}));ToastTitle.displayName=ToastPrimitives__namespace.Title.displayName;var ToastDescription=React40__namespace.forwardRef(({className:e,onPointerDown:r,...t},s)=>jsxRuntime.jsx(ToastPrimitives__namespace.Description,{ref:s,className:chunkYWPIPAUQ_cjs.cn("select-text text-sm opacity-90",e),onPointerDown:allowTextSelection(r),...t}));ToastDescription.displayName=ToastPrimitives__namespace.Description.displayName;var nextOverrideId=0,overrides=[],listeners=new Set;function emitChange(){listeners.forEach(e=>e())}a(emitChange,"emitChange");function setOverride(e){overrides=overrides.findIndex(t=>t.id===e.id)===-1?[...overrides,e]:overrides.map(t=>t.id===e.id?e:t),emitChange()}a(setOverride,"setOverride");function removeOverride(e){overrides=overrides.filter(r=>r.id!==e),emitChange()}a(removeOverride,"removeOverride");function subscribe(e){return listeners.add(e),()=>listeners.delete(e)}a(subscribe,"subscribe");function getSnapshot(){return overrides.at(-1)??null}a(getSnapshot,"getSnapshot");function ToastViewportOverride({bottomOffset:e}){const r=React40__namespace.useRef(0);return r.current===0&&(r.current=++nextOverrideId),React40__namespace.useLayoutEffect(()=>{const t=r.current;return()=>removeOverride(t)},[]),React40__namespace.useLayoutEffect(()=>{setOverride({id:r.current,bottomOffset:Math.max(0,e)})},[e]),null}a(ToastViewportOverride,"ToastViewportOverride");function useToastViewportOverride(){return React40__namespace.useSyncExternalStore(subscribe,getSnapshot,()=>null)}a(useToastViewportOverride,"useToastViewportOverride");var TOAST_LIMIT=3,TOAST_REMOVE_DELAY=300,DEFAULT_TOAST_DURATION=3e3,CRITICAL_TOAST_DURATION=0,DEDUPLICATION_WINDOW=5e3,count=0;function genId(){return count=(count+1)%Number.MAX_SAFE_INTEGER,count.toString()}a(genId,"genId");var toastTimeouts=new Map;function calculateToastPriority(e){if(e.priority!==void 0)return e.priority;let t={critical:1e3,error:500,warning:300,success:200,info:100}[e.severity]??100;return e.retryable&&(t+=50),e.helpUrl&&(t+=25),t}a(calculateToastPriority,"calculateToastPriority");function generateDeduplicationKey(e){const r=typeof e.title=="string"?e.title:"",t=typeof e.description=="string"?e.description:"";return`${e.severity??"info"}:${r}:${t}`.toLowerCase()}a(generateDeduplicationKey,"generateDeduplicationKey");function findDuplicateToast(e,r){const t=e.deduplicationKey||generateDeduplicationKey(e),s=Date.now();return r.find(n=>!n.deduplicationKey||n.deduplicationKey!==t?!1:s-(n.timestamp??0)<DEDUPLICATION_WINDOW)??null}a(findDuplicateToast,"findDuplicateToast");function updateDuplicateToast(e){const r=(e.count??1)+1,t=typeof e.description=="string"?`${e.description}${r>2?` (${r}\u6B21)`:" (\u91CD\u590D)"}`:e.description;return{...e,count:r,description:t,timestamp:Date.now()}}a(updateDuplicateToast,"updateDuplicateToast");var addToRemoveQueue=a(e=>{if(toastTimeouts.has(e))return;const r=setTimeout(()=>{toastTimeouts.delete(e),dispatch({type:"REMOVE_TOAST",toastId:e})},TOAST_REMOVE_DELAY);toastTimeouts.set(e,r)},"addToRemoveQueue"),reducer=a((e,r)=>{switch(r.type){case"ADD_TOAST":{const t=findDuplicateToast(r.toast,e.toasts);if(t){const o=updateDuplicateToast(t);return{...e,toasts:e.toasts.map(i=>i.id===t.id?o:i)}}const n=[{...r.toast,priority:calculateToastPriority(r.toast),deduplicationKey:r.toast.deduplicationKey??generateDeduplicationKey(r.toast),timestamp:Date.now(),count:1},...e.toasts].sort((o,i)=>(i.priority??0)-(o.priority??0)).slice(0,TOAST_LIMIT);return{...e,toasts:n}}case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(t=>t.id===r.toast.id?{...t,...r.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=r;return t?addToRemoveQueue(t):e.toasts.forEach(s=>{addToRemoveQueue(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===t||t===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return r.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(t=>t.id!==r.toastId)}}},"reducer"),listeners2=[],memoryState={toasts:[]};function dispatch(e){memoryState=reducer(memoryState,e),listeners2.forEach(r=>{r(memoryState)})}a(dispatch,"dispatch");function toast({...e}){const r=genId(),t=a(n=>dispatch({type:"UPDATE_TOAST",toast:{...n,id:r}}),"update"),s=a(()=>dispatch({type:"DISMISS_TOAST",toastId:r}),"dismiss");return dispatch({type:"ADD_TOAST",toast:{...e,duration:e.duration??DEFAULT_TOAST_DURATION,id:r,open:!0,onOpenChange:a(n=>{n||s()},"onOpenChange")}}),{id:r,dismiss:s,update:t}}a(toast,"toast");function useToast(){const[e,r]=React40__namespace.useState(memoryState);return React40__namespace.useEffect(()=>(listeners2.push(r),()=>{const t=listeners2.indexOf(r);t>-1&&listeners2.splice(t,1)}),[e]),{...e,toast,dismiss:a(t=>dispatch({type:"DISMISS_TOAST",...t!==void 0&&{toastId:t}}),"dismiss")}}a(useToast,"useToast");function showErrorToast(e){const r=e.severity??"error",t=r==="critical",s={variant:"destructive",title:e.title??(t?"\u4E25\u91CD\u9519\u8BEF":"\u9519\u8BEF"),description:e.description,severity:r,duration:t?CRITICAL_TOAST_DURATION:e.duration??8e3};return e.errorId&&(s.errorId=e.errorId),e.retryable!==void 0&&(s.retryable=e.retryable),e.retryAction&&(s.retryAction=e.retryAction),e.helpUrl&&(s.helpUrl=e.helpUrl),e.deduplicationKey&&(s.deduplicationKey=e.deduplicationKey),toast(s)}a(showErrorToast,"showErrorToast");function showWarningToast(e){const r={variant:"warning",title:e.title??"\u8B66\u544A",description:e.description,severity:"warning",duration:e.duration??6e3};return e.helpUrl&&(r.helpUrl=e.helpUrl),e.deduplicationKey&&(r.deduplicationKey=e.deduplicationKey),toast(r)}a(showWarningToast,"showWarningToast");function showInfoToast(e){const r={variant:"default",title:e.title??"\u4FE1\u606F",description:e.description,severity:"info",duration:e.duration??4e3};return e.deduplicationKey&&(r.deduplicationKey=e.deduplicationKey),toast(r)}a(showInfoToast,"showInfoToast");function showSuccessToast(e){const r={variant:"success",title:e.title??"\u6210\u529F",description:e.description,severity:"success",duration:e.duration??4e3};return e.deduplicationKey&&(r.deduplicationKey=e.deduplicationKey),toast(r)}a(showSuccessToast,"showSuccessToast");function ManagedToast({id:e,title:r,description:t,action:s,duration:n=0,timestamp:o,dismiss:i,onMouseEnter:c,onMouseLeave:u,...d}){const l=React40.useRef(null),x=React40.useRef(0),m=React40.useRef(n),f=React40.useRef(!1),p=React40.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),g=React40.useCallback(()=>{p(),!(m.current<=0||m.current===1/0)&&(x.current=Date.now(),l.current=setTimeout(()=>{l.current=null,i(e)},m.current))},[p,i,e]);React40.useEffect(()=>(m.current=n,f.current||g(),p),[p,n,g,o]);const v=a(j=>{f.current=!0,l.current&&(m.current=Math.max(0,m.current-(Date.now()-x.current)),p()),c?.(j)},"handleMouseEnter"),y=a(j=>{f.current=!1,g(),u?.(j)},"handleMouseLeave");return jsxRuntime.jsxs(Toast,{...d,duration:1/0,onMouseEnter:v,onMouseLeave:y,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[r&&jsxRuntime.jsx(ToastTitle,{children:r}),t&&jsxRuntime.jsx(ToastDescription,{children:t})]}),s,jsxRuntime.jsx(ToastClose,{})]})}a(ManagedToast,"ManagedToast");function Toaster(){const{toasts:e,dismiss:r}=useToast(),t=React40.useRef(r),s=useToastViewportOverride();t.current=r;const n=React40.useCallback(i=>{t.current(i)},[]),o=React40.useCallback(({id:i,title:c,description:u,action:d,...l})=>jsxRuntime.jsx(ManagedToast,{id:i,title:c,description:u,action:d,dismiss:n,...l},i),[n]);return jsxRuntime.jsxs(ToastProvider,{children:[e.map(o),jsxRuntime.jsx(ToastViewport,{style:{bottom:s?.bottomOffset??0}})]})}a(Toaster,"Toaster");function createToastHelpers(){return{success:a((e,r)=>toast({title:e,description:r,variant:"success",severity:"success",duration:4e3}),"success"),error:a((e,r)=>toast({title:e,description:r,variant:"destructive",severity:"error",duration:6e3}),"error"),warning:a((e,r)=>toast({title:e,description:r,variant:"warning",severity:"warning",duration:5e3}),"warning"),info:a((e,r)=>toast({title:e,description:r,variant:"info",severity:"info",duration:4e3}),"info"),promise:a(async(e,r)=>{const t=toast({title:r.loading,duration:0});try{const s=await e;t.dismiss();const n=typeof r.success=="function"?r.success(s):r.success;return toast({title:n,variant:"success",severity:"success"}),s}catch(s){t.dismiss();const n=typeof r.error=="function"?r.error(s):r.error;throw toast({title:n,description:s instanceof Error?s.message:void 0,variant:"destructive",severity:"error"}),s}},"promise")}}a(createToastHelpers,"createToastHelpers");var toasts=createToastHelpers(),KEYBOARD_STEP_PX=16;function clamp(e,r,t){return Math.min(t,Math.max(r,e))}a(clamp,"clamp");function readStored(e){try{const r=Number(localStorage.getItem(e));return Number.isFinite(r)&&r>0?r:null}catch{return null}}a(readStored,"readStored");function writeStored(e,r){try{localStorage.setItem(e,String(Math.round(r)))}catch{}}a(writeStored,"writeStored");function useResizableWidth({min:e,max:r,initial:t,storageKey:s,edge:n="right"}){const o=n==="right"?1:-1,[i,c]=React40.useState(()=>clamp(readStored(s)??t,e,r)),[u,d]=React40.useState(!1),l=React40.useRef({x:0,width:i});React40.useEffect(()=>{if(!u)return;const f=a(g=>{c(clamp(l.current.width+o*(g.clientX-l.current.x),e,r))},"move"),p=a(()=>{d(!1),c(g=>(writeStored(s,g),g))},"end");return document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",f),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p),window.addEventListener("blur",p),()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),window.removeEventListener("blur",p)}},[u,e,r,s,o]);const x=React40.useCallback(f=>{f.button===0&&(f.preventDefault(),f.currentTarget.setPointerCapture?.(f.pointerId),l.current={x:f.clientX,width:i},d(!0))},[i]),m=React40.useCallback(f=>{if(f.key!=="ArrowLeft"&&f.key!=="ArrowRight")return;f.preventDefault();const p=KEYBOARD_STEP_PX*(f.shiftKey?5:1)*o;c(g=>{const v=clamp(g+(f.key==="ArrowRight"?p:-p),e,r);return writeStored(s,v),v})},[e,r,s,o]);return{width:i,resizing:u,separatorProps:{role:"separator","aria-orientation":"vertical","aria-valuemin":e,"aria-valuemax":r,"aria-valuenow":Math.round(i),tabIndex:0,onPointerDown:x,onKeyDown:m}}}a(useResizableWidth,"useResizableWidth");function ResizeHandle({separator:e,edge:r,resizing:t,label:s,className:n}){return jsxRuntime.jsx("div",{...e,"aria-label":s,title:s,className:chunkYWPIPAUQ_cjs.cn("absolute top-0 z-30 hidden h-full w-3 cursor-col-resize focus-visible:outline-none md:block","after:absolute after:top-0 after:h-full after:w-px after:bg-transparent","hover:after:bg-primary/30 focus-visible:after:bg-primary/50",r==="right"?"-right-1.5 after:right-1.5":"-left-1.5 after:left-1.5",t&&"after:bg-primary/50",n)})}a(ResizeHandle,"ResizeHandle");var variantConfig={default:{icon:lucideReact.Info,iconClassName:"h-5 w-5 text-info",confirmVariant:"default"},destructive:{icon:lucideReact.AlertTriangle,iconClassName:"h-5 w-5 text-destructive",confirmVariant:"destructive"},warning:{icon:lucideReact.AlertCircle,iconClassName:"h-5 w-5 text-warning",confirmVariant:"default"},info:{icon:lucideReact.CheckCircle,iconClassName:"h-5 w-5 text-success",confirmVariant:"success"}};function ConfirmDialog({open:e,onOpenChange:r,title:t,description:s,confirmText:n,cancelText:o,hideCancel:i=!1,alternateText:c,variant:u="default",onConfirm:d,onAlternate:l,onCancel:x,loading:m=!1,texts:f={}}){const p=variantConfig[u],g=p.icon,y={...{title:"Confirm Action",confirm:"Confirm",cancel:"Cancel",processing:"Processing..."},...f},j=a(async()=>{d&&await d(),r(!1)},"handleConfirm"),h=a(()=>{l&&l(),r(!1)},"handleAlternate"),w=a(()=>{x&&x(),r(!1)},"handleCancel");return jsxRuntime.jsx(Dialog,{open:e,onOpenChange:r,children:jsxRuntime.jsxs(DialogContent,{className:"sm:max-w-md",children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsxs(DialogTitle,{className:"flex items-center gap-3",children:[jsxRuntime.jsx(g,{className:chunkYWPIPAUQ_cjs.cn(p.iconClassName)}),t||y.title]}),s&&jsxRuntime.jsx(DialogDescription,{className:"pt-2 text-left",children:s})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex-row justify-end gap-2 pt-4",children:[!i&&jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",onClick:w,disabled:m,children:o||y.cancel}),c&&jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",onClick:h,disabled:m,children:c}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:p.confirmVariant,onClick:j,disabled:m,className:"min-w-20",children:m?jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),y.processing]}):n||y.confirm})]})]})})}a(ConfirmDialog,"ConfirmDialog");function useConfirm(){const[e,r]=React40__namespace.useState({open:!1,props:{}}),t=React40__namespace.useCallback(i=>new Promise(c=>{const{onConfirm:u,onAlternate:d,onCancel:l,...x}=i;r({open:!0,props:{...x,onConfirm:a(async()=>{u&&await u(),c("confirm")},"onConfirm"),onAlternate:a(()=>{d&&d(),c("alternate")},"onAlternate"),onCancel:a(()=>{l&&l(),c("cancel")},"onCancel")},resolve:c})}),[]),s=React40__namespace.useCallback(async i=>await t(i)==="confirm",[t]),n=React40__namespace.useCallback(i=>{!i&&e.resolve&&e.resolve("cancel"),r(c=>({...c,open:i}))},[e.resolve]),o=React40__namespace.useCallback(()=>jsxRuntime.jsx(ConfirmDialog,{...e.props,open:e.open,onOpenChange:n}),[e,n]);return{confirm:s,choose:t,ConfirmDialog:o}}a(useConfirm,"useConfirm");function PromptDialog({open:e,onOpenChange:r,title:t,description:s,label:n,placeholder:o,defaultValue:i="",confirmText:c="OK",cancelText:u="Cancel",allowEmpty:d=!1,onConfirm:l,onCancel:x}){const[m,f]=React40__namespace.useState(i);React40__namespace.useEffect(()=>{e&&f(i)},[e,i]);const p=m.trim(),g=a(()=>{!p&&!d||(l?.(p),r(!1))},"submit"),v=a(()=>{x?.(),r(!1)},"cancel");return jsxRuntime.jsx(Dialog,{open:e,onOpenChange:a(y=>y?void 0:v(),"onOpenChange"),children:jsxRuntime.jsxs(DialogContent,{className:"sm:max-w-md",children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:t}),s&&jsxRuntime.jsx(DialogDescription,{className:"pt-1 text-left",children:s})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[n&&jsxRuntime.jsx(chunkMTA2XHQG_cjs.Label,{htmlFor:"prompt-dialog-value",children:n}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.Input,{id:"prompt-dialog-value",autoFocus:!0,value:m,placeholder:o,onChange:a(y=>f(y.target.value),"onChange"),onKeyDown:a(y=>{y.key==="Enter"&&(y.preventDefault(),g())},"onKeyDown")})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex-row justify-end gap-2 pt-4",children:[jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",onClick:v,children:u}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{onClick:g,disabled:!p&&!d,className:"min-w-20",children:c})]})]})})}a(PromptDialog,"PromptDialog");function usePrompt(){const[e,r]=React40__namespace.useState({open:!1,request:{}}),t=React40__namespace.useRef(null),s=React40__namespace.useCallback(i=>new Promise(c=>{t.current=c,r({open:!0,request:i})}),[]),n=React40__namespace.useCallback(i=>{t.current?.(i),t.current=null,r(c=>({...c,open:!1}))},[]),o=React40__namespace.useCallback(()=>jsxRuntime.jsx(PromptDialog,{...e.request,open:e.open,onOpenChange:a(i=>{i||n(null)},"onOpenChange"),onConfirm:n,onCancel:a(()=>n(null),"onCancel")}),[e,n]);return{prompt:s,PromptDialog:o}}a(usePrompt,"usePrompt");var sandboxedSrcDocPolicy;function ensureDomPurify(){if(!DOMPurify__default.default.isSupported)throw new Error("Trusted HTML sanitization requires a DOM")}a(ensureDomPurify,"ensureDomPurify");function sanitizeTrustedHtml(e){return ensureDomPurify(),DOMPurify__default.default.sanitize(e,{RETURN_TRUSTED_TYPE:!0,USE_PROFILES:{html:!0,mathMl:!0},FORBID_TAGS:["script","iframe","object","embed","form","base"],FORBID_ATTR:["srcdoc","formaction"]})}a(sanitizeTrustedHtml,"sanitizeTrustedHtml");function sanitizeTrustedSvg(e){return ensureDomPurify(),DOMPurify__default.default.sanitize(e,{RETURN_TRUSTED_TYPE:!0,USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","foreignObject"],FORBID_ATTR:["srcdoc","formaction"]})}a(sanitizeTrustedSvg,"sanitizeTrustedSvg");function sanitizeTrustedMermaidSvg(e){return ensureDomPurify(),DOMPurify__default.default.sanitize(e,{RETURN_TRUSTED_TYPE:!0,USE_PROFILES:{svg:!0,svgFilters:!0,html:!0},ADD_TAGS:["foreignObject"],HTML_INTEGRATION_POINTS:{foreignobject:!0},FORBID_TAGS:["script","iframe","object","embed","form","base"],FORBID_ATTR:["srcdoc","formaction"]})}a(sanitizeTrustedMermaidSvg,"sanitizeTrustedMermaidSvg");function assertScriptlessSandbox(e){if(!e.hasAttribute("sandbox"))throw new Error("srcdoc requires a sandboxed iframe");const r=new Set(e.sandbox.value.split(/\s+/).filter(Boolean));if(r.has("allow-scripts")&&r.has("allow-same-origin"))throw new Error("sandboxed srcdoc cannot combine scripts with same-origin")}a(assertScriptlessSandbox,"assertScriptlessSandbox");function sandboxedHtml(e){const r=globalThis.trustedTypes;return r?(sandboxedSrcDocPolicy??(sandboxedSrcDocPolicy=r.createPolicy("tego-sandboxed-srcdoc",{createHTML:a(t=>t,"createHTML")})),sandboxedSrcDocPolicy.createHTML(e)):e}a(sandboxedHtml,"sandboxedHtml");function setSandboxedFrameSrcDoc(e,r){assertScriptlessSandbox(e),e.srcdoc=sandboxedHtml(r)}a(setSandboxedFrameSrcDoc,"setSandboxedFrameSrcDoc");function sandboxedFrameHtml(e,r){const t=e.defaultView?.frameElement;if(!t||t.tagName!=="IFRAME")throw new Error("sandboxed HTML requires an iframe document");return assertScriptlessSandbox(t),sandboxedHtml(r)}a(sandboxedFrameHtml,"sandboxedFrameHtml");var STRONG=/\*\*([^\s*](?:[^*\n]*?[^\s*])?)\*\*/g,PUNCTUATION=/\p{P}/u,WORD=/[\p{L}\p{N}]/u;function isCjkFlankingFailure(e,r,t,s){const n=e[r-1]??"",o=e[t]??"",i=PUNCTUATION.test(s[0]??"")&&WORD.test(n),c=PUNCTUATION.test(s.at(-1)??"")&&WORD.test(o);return i||c}a(isCjkFlankingFailure,"isCjkFlankingFailure");function isRunNode(e){return e.type==="text"?!0:e.type==="strong"&&(e.children??[]).every(r=>r.type==="text")}a(isRunNode,"isRunNode");function repairRun(e){let r="";const t=new Set;for(const i of e)if(i.type==="text")r+=i.value??"";else{const c=(i.children??[]).map(u=>u.value??"").join("");t.add(`${r.length}:${r.length+c.length+4}`),r+=`**${c}**`}const s=[];let n=0,o=!1;for(const i of r.matchAll(STRONG)){const c=i.index,u=c+i[0].length,d=i[1],l=t.has(`${c}:${u}`);!l&&!isCjkFlankingFailure(r,c,u,d)||(l||(o=!0),c>n&&s.push({type:"text",value:r.slice(n,c)}),s.push({type:"strong",children:[{type:"text",value:d}]}),n=u)}return o?(n<r.length&&s.push({type:"text",value:r.slice(n)}),s):null}a(repairRun,"repairRun");function visit(e){if(!e.children)return;const r=[];let t=[];const s=a(()=>{const o=t.some(i=>i.type==="text"&&i.value?.includes("**"))?repairRun(t):null;r.push(...o??t),t=[]},"flush");for(const n of e.children){if(isRunNode(n)){t.push(n);continue}s(),visit(n),r.push(n)}s(),e.children=r}a(visit,"visit");function remarkCjkEmphasis(){return e=>{visit(e)}}a(remarkCjkEmphasis,"remarkCjkEmphasis");var remarkGfmPluginPromise=null,remarkMathPluginPromise=null,rehypeKatexPluginPromise=null,mermaidPromise=null;function loadRemarkMathPlugin(){return remarkMathPluginPromise??(remarkMathPluginPromise=import("remark-math").then(e=>e.default).catch(e=>(console.warn("[MarkdownRenderer] remark-math disabled:",e),null))),remarkMathPluginPromise}a(loadRemarkMathPlugin,"loadRemarkMathPlugin");function loadRehypeKatexPlugin(){return rehypeKatexPluginPromise??(rehypeKatexPluginPromise=Promise.all([import("rehype-katex"),import("katex/dist/katex.min.css")]).then(([e])=>e.default).catch(e=>(console.warn("[MarkdownRenderer] rehype-katex disabled:",e),null))),rehypeKatexPluginPromise}a(loadRehypeKatexPlugin,"loadRehypeKatexPlugin");var MERMAID_CONFIG={startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"inherit"};function loadMermaid(){return mermaidPromise??(mermaidPromise=import("mermaid").then(e=>(e.default.initialize(MERMAID_CONFIG),e.default)).catch(e=>(console.warn("[MarkdownRenderer] mermaid disabled:",e),null))),mermaidPromise}a(loadMermaid,"loadMermaid");function supportsRegexLookbehind(){try{return new RegExp("(?<=a)b"),!0}catch{return!1}}a(supportsRegexLookbehind,"supportsRegexLookbehind");function loadRemarkGfmPlugin(){return supportsRegexLookbehind()?(remarkGfmPluginPromise??(remarkGfmPluginPromise=import("remark-gfm").then(e=>e.default).catch(e=>(console.warn("[MarkdownRenderer] remark-gfm disabled:",e),null))),remarkGfmPluginPromise):Promise.resolve(null)}a(loadRemarkGfmPlugin,"loadRemarkGfmPlugin");async function writeTextToClipboard(e){const r=globalThis.navigator?.clipboard;if(r?.writeText)try{return await r.writeText(e),!0}catch{}return copyTextWithSelectionFallback(e)}a(writeTextToClipboard,"writeTextToClipboard");function copyTextWithSelectionFallback(e){const r=globalThis.document;if(!r?.body||typeof r.execCommand!="function")return!1;const t=r.createElement("textarea"),s=r.activeElement,n=r.getSelection?.(),o=n&&n.rangeCount>0?n.getRangeAt(0):null;t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",t.style.opacity="0",r.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);try{return r.execCommand("copy")}catch{return!1}finally{t.remove(),o&&n&&(n.removeAllRanges(),n.addRange(o)),s?.focus?.()}}a(copyTextWithSelectionFallback,"copyTextWithSelectionFallback");function isEscaped(e,r){return r>0&&e[r-1]==="\\"}a(isEscaped,"isEscaped");function isSingleDollarDelimiter(e,r){return e[r]==="$"&&e[r-1]!=="$"&&e[r+1]!=="$"&&!isEscaped(e,r)}a(isSingleDollarDelimiter,"isSingleDollarDelimiter");function findSingleDollarDelimiter(e,r){for(let t=r;t<e.length;t+=1)if(isSingleDollarDelimiter(e,t))return t;return-1}a(findSingleDollarDelimiter,"findSingleDollarDelimiter");function replaceSingleDollarDelimited(e,r,t={}){const{allowNewlines:s=!1,allowInnerDollars:n=!1}=t;let o="",i=0;for(;i<e.length;){const c=findSingleDollarDelimiter(e,i);if(c===-1)return o+e.slice(i);const u=findSingleDollarDelimiter(e,c+1);if(u===-1)return o+e.slice(i);const d=e.slice(c+1,u);if(!s&&d.includes(`
|
|
2
|
+
`)||!n&&d.includes("$")){o+=e.slice(i,c+1),i=c+1;continue}const l=e.slice(c,u+1);o+=e.slice(i,c),o+=r(l,d),i=u+1}return o}a(replaceSingleDollarDelimited,"replaceSingleDollarDelimited");function protectPattern(e,r,t){return e.replace(r,s=>(t.push(s),`<<PROTECTED_${t.length-1}>>`))}a(protectPattern,"protectPattern");function convertLatexDelimiters(e){const r=/(```[\S\s]*?```|`.*?`)|\\\[([\S\s]*?[^\\])\\]|\\\((.*?)\\\)/g;return e.replace(r,(t,s,n,o)=>s!==void 0?s:n!==void 0?`$$${n}$$`:o!==void 0?`$${o}$`:t)}a(convertLatexDelimiters,"convertLatexDelimiters");function escapeLatexPipes(e){const r=a(n=>{let o="";for(let i=0;i<n.length;i+=1)o+=n[i]==="|"&&!isEscaped(n,i)?"\\vert{}":n[i];return o},"replaceUnescapedPipes"),t=[];let s=e.replace(/(```[\S\s]*?```|`[^\n`]*`)/g,n=>(t.push(n),`<<CODE_${t.length-1}>>`));return s=s.replace(/\$\$([\S\s]*?)\$\$/g,(n,o)=>`$$${r(o)}$$`),s=replaceSingleDollarDelimited(s,(n,o)=>`$${r(o)}$`),s=s.replace(/<<CODE_(\d+)>>/g,(n,o)=>t[Number.parseInt(o)]||""),s}a(escapeLatexPipes,"escapeLatexPipes");function escapeCurrencyDollars(e){const r=[];let t=protectPattern(e,/(```[\S\s]*?```|`[^\n`]*`)/g,r);t=protectPattern(t,/\$\$[\S\s]*?\$\$/g,r),t=replaceSingleDollarDelimited(t,(i,c)=>c.includes("\\")?(r.push(i),`<<PROTECTED_${r.length-1}>>`):i,{allowNewlines:!0,allowInnerDollars:!0}),t=protectPattern(t,/\$\d+\$/g,r),t=protectPattern(t,/\$-?\d+(?:,-?\d+)+\$/g,r),t=protectPattern(t,/\\\[[\S\s]*?\\]|\\\(.*?\\\)/g,r);const s=/^(\d{1,3}(?:,\d{3})*(?:\.\d+)?(?:-\d{1,3}(?:,\d{3})*(?:\.\d+)?)?\+?)/;let n="",o=0;for(;o<t.length;){if(t[o]!=="$"||t[o-1]==="$"){n+=t[o],o+=1;continue}const c=s.exec(t.slice(o+1))?.[1];if(!c||t[o+1+c.length]==="$"){n+=t[o],o+=1;continue}n+=`\\$${c}`,o+=1+c.length}return t=n,t=t.replace(/<<PROTECTED_(\d+)>>/g,(i,c)=>r[Number.parseInt(c)]||""),t}a(escapeCurrencyDollars,"escapeCurrencyDollars");function preprocessLaTeX(e){let r=e;return r=escapeCurrencyDollars(r),r=convertLatexDelimiters(r),r=escapeLatexPipes(r),r}a(preprocessLaTeX,"preprocessLaTeX");function preprocessMarkdownContent(e,r){return e?r?preprocessLaTeX(e):e:""}a(preprocessMarkdownContent,"preprocessMarkdownContent");var MarkdownContext=React40.createContext({}),useMarkdownContext=a(()=>React40.useContext(MarkdownContext),"useMarkdownContext"),mermaidIdCounter=0,MermaidDiagram=React40.memo(({code:e})=>{const r=React40.useRef(null),[t,s]=React40.useState(""),[n,o]=React40.useState(null),i=useThemeKey(),c=i.startsWith("next:")?i:"";return React40.useEffect(()=>{let u=!1;return a(async()=>{if(!e.trim())return;const l=`mermaid-${Date.now().toString(36)}-${(mermaidIdCounter++).toString(36)}`;try{const x=await loadMermaid();if(u)return;if(!x){o("Mermaid failed to load");return}if(x.initialize({...MERMAID_CONFIG,theme:"base",themeVariables:buildMermaidThemeVariables(documentTokenReader(),document.documentElement.classList.contains("dark"))}),!await x.parse(e)){u||o("Invalid Mermaid syntax");return}const{svg:f}=await x.render(l,e);if(u)return;s(f),o(null)}catch(x){if(u)return;console.error("[Mermaid] Render error:",x),o(x instanceof Error?x.message:"Failed to render diagram")}},"renderDiagram")(),()=>{u=!0}},[e,c]),n?jsxRuntime.jsxs("div",{className:"my-3 rounded-lg border border-destructive/30 bg-destructive/10 p-4",children:[jsxRuntime.jsxs("p",{className:"text-sm text-destructive",children:["Mermaid \u6E32\u67D3\u9519\u8BEF: ",n]}),jsxRuntime.jsx("pre",{className:"mt-2 overflow-x-auto text-xs text-muted-foreground",children:e})]}):jsxRuntime.jsx("div",{ref:r,className:"my-4 flex justify-center overflow-x-auto rounded-lg border border-border bg-card p-4",dangerouslySetInnerHTML:{__html:sanitizeTrustedMermaidSvg(t)}})});MermaidDiagram.displayName="MermaidDiagram";var CodeBlock=React40.memo(({children:e,className:r,language:t,showCopyButton:s=!0})=>{const[n,o]=React40.useState(!1),{enableMermaid:i}=useMarkdownContext(),c=React40.useCallback(()=>{const u=String(e).replace(/\n$/,"");writeTextToClipboard(u).then(d=>{d&&(o(!0),setTimeout(()=>o(!1),2e3))})},[e]);return t==="mermaid"&&i?jsxRuntime.jsx(MermaidDiagram,{code:String(e).replace(/\n$/,"")}):jsxRuntime.jsxs("div",{className:"group relative my-3 rounded-lg border border-border bg-muted",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-border/60 px-4 py-2",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t||"code"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:c,className:"flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-background/70 hover:text-foreground",children:n?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"}),jsxRuntime.jsx("span",{children:"\u5DF2\u590D\u5236"})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),jsxRuntime.jsx("span",{children:"\u590D\u5236"})]})})]}),jsxRuntime.jsx("pre",{className:"overflow-x-auto p-4",children:jsxRuntime.jsx("code",{className:chunkYWPIPAUQ_cjs.cn("text-sm leading-relaxed text-foreground",r),children:e})})]})});CodeBlock.displayName="CodeBlock";var Typography=React40.memo(({children:e,className:r,fontSize:t=14,headerMultiple:s=.25,marginMultiple:n=1,lineHeight:o=1.6,borderRadius:i=8})=>jsxRuntime.jsx("article",{className:chunkYWPIPAUQ_cjs.cn("markdown-typography w-full max-w-none",r),style:{"--md-font-size":`${t}px`,"--md-header-multiple":s,"--md-margin-multiple":n,"--md-line-height":o,"--md-border-radius":`${i}px`},children:e}));Typography.displayName="Typography";var useMarkdownComponents=a(({showCopyButton:e,transformImageSrc:r})=>React40.useMemo(()=>({h1:a(({children:t})=>jsxRuntime.jsx("h1",{className:"mb-4 mt-6 border-b border-border pb-2 text-2xl font-bold text-foreground first:mt-0",children:t}),"h1"),h2:a(({children:t})=>jsxRuntime.jsx("h2",{className:"mb-3 mt-5 border-b border-border/60 pb-1.5 text-xl font-semibold text-foreground first:mt-0",children:t}),"h2"),h3:a(({children:t})=>jsxRuntime.jsx("h3",{className:"mb-2 mt-4 text-lg font-semibold text-foreground first:mt-0",children:t}),"h3"),h4:a(({children:t})=>jsxRuntime.jsx("h4",{className:"mb-2 mt-3 text-base font-semibold text-foreground first:mt-0",children:t}),"h4"),h5:a(({children:t})=>jsxRuntime.jsx("h5",{className:"mb-1.5 mt-2.5 text-sm font-semibold text-foreground first:mt-0",children:t}),"h5"),h6:a(({children:t})=>jsxRuntime.jsx("h6",{className:"mb-1 mt-2 text-sm font-medium text-foreground first:mt-0",children:t}),"h6"),p:a(({children:t,...s})=>React40__namespace.default.isValidElement(t)&&(t.type==="img"||t.type==="video")?t:jsxRuntime.jsx("p",{className:"mb-3 leading-7 text-foreground last:mb-0",...s,children:t}),"p"),ul:a(({children:t})=>jsxRuntime.jsx("ul",{className:"mb-3 ml-6 list-disc space-y-1.5 text-foreground last:mb-0",children:t}),"ul"),ol:a(({children:t})=>jsxRuntime.jsx("ol",{className:"mb-3 ml-6 list-decimal space-y-1.5 text-foreground last:mb-0",children:t}),"ol"),li:a(({children:t})=>jsxRuntime.jsx("li",{className:"leading-7",children:t}),"li"),blockquote:a(({children:t})=>jsxRuntime.jsx("blockquote",{className:"my-4 border-l-[3px] border-border py-1 pl-4 pr-3 text-muted-foreground",children:t}),"blockquote"),code:a(({children:t,className:s,...n})=>jsxRuntime.jsx("code",{className:chunkYWPIPAUQ_cjs.cn("rounded bg-muted px-1.5 py-0.5 font-mono text-[0.9em] text-foreground",s),...n,children:t}),"code"),pre:a(({children:t})=>{const s=React40__namespace.default.Children.only(t);if(!React40__namespace.default.isValidElement(s))return jsxRuntime.jsx("pre",{children:t});const n=s.props,o=/language-(\w+)/.exec(n.className||"");return jsxRuntime.jsx(CodeBlock,{className:n.className,language:o?.[1],showCopyButton:e,children:n.children})},"pre"),table:a(({children:t})=>jsxRuntime.jsx("div",{className:"my-4 overflow-x-auto rounded-lg border border-border",children:jsxRuntime.jsx("table",{className:"min-w-full divide-y divide-border",children:t})}),"table"),thead:a(({children:t})=>jsxRuntime.jsx("thead",{className:"bg-muted",children:t}),"thead"),tbody:a(({children:t})=>jsxRuntime.jsx("tbody",{className:"divide-y divide-border",children:t}),"tbody"),tr:a(({children:t})=>jsxRuntime.jsx("tr",{className:"transition-colors hover:bg-muted/50",children:t}),"tr"),th:a(({children:t})=>jsxRuntime.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:t}),"th"),td:a(({children:t})=>jsxRuntime.jsx("td",{className:"px-4 py-3 text-sm text-foreground",children:t}),"td"),a:a(({href:t,children:s})=>jsxRuntime.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline decoration-primary/40 underline-offset-2 transition-colors hover:decoration-primary",children:s}),"a"),strong:a(({children:t})=>jsxRuntime.jsx("strong",{className:"font-semibold text-foreground",children:t}),"strong"),em:a(({children:t})=>jsxRuntime.jsx("em",{className:"italic",children:t}),"em"),del:a(({children:t})=>jsxRuntime.jsx("del",{className:"text-muted-foreground line-through",children:t}),"del"),hr:a(()=>jsxRuntime.jsx("hr",{className:"my-6 border-border"}),"hr"),img:a(({src:t,alt:s})=>jsxRuntime.jsx("img",{src:typeof t=="string"&&r?r(t):t,alt:s,className:"my-4 max-w-full rounded-lg shadow-sm",loading:"lazy"}),"img")}),[e,r]),"useMarkdownComponents"),useLazyPlugin=a(e=>{const[r,t]=React40.useState(null);return React40.useEffect(()=>{if(!e)return;let s=!1;return e().then(n=>{s||t(n?()=>n:null)}),()=>{s=!0}},[e]),r},"useLazyPlugin"),useRemarkPlugins=a((e,r,t=[])=>{const s=useLazyPlugin(loadRemarkGfmPlugin),n=useLazyPlugin(e?loadRemarkMathPlugin:null);return React40.useMemo(()=>{const o=[];return s&&o.push(s),n&&o.push(n),o.push(remarkCjkEmphasis),r==="chat"&&o.push(remarkBreaks__default.default),[...o,...t]},[r,t,s,n])},"useRemarkPlugins"),useRehypePlugins=a((e,r=[])=>{const t=useLazyPlugin(e?loadRehypeKatexPlugin:null);return React40.useMemo(()=>{const s=[];return t&&s.push(t),[...s,...r]},[t,r])},"useRehypePlugins"),parseMarkdownIntoBlocks=a(e=>marked.marked.lexer(e).map(t=>t.raw),"parseMarkdownIntoBlocks"),StreamdownBlock=React40.memo(({children:e,components:r,remarkPlugins:t,rehypePlugins:s})=>jsxRuntime.jsx(ReactMarkdown__default.default,{components:r,remarkPlugins:t,rehypePlugins:s,children:e}),(e,r)=>e.children===r.children);StreamdownBlock.displayName="StreamdownBlock";var StreamdownRender=React40.memo(({children:e,components:r,remarkPlugins:t,rehypePlugins:s})=>{const n=React40.useId(),o=React40.useMemo(()=>parseMarkdownIntoBlocks(e||""),[e]);return jsxRuntime.jsx("div",{className:"markdown-stream",children:o.map((i,c)=>jsxRuntime.jsx(StreamdownBlock,{components:r,remarkPlugins:t,rehypePlugins:s,children:i},`${n}-block_${c}`))})});StreamdownRender.displayName="StreamdownRender";var Markdown=React40.memo(({children:e="",className:r,animated:t=!1,enableLatex:s=!0,enableMermaid:n=!0,enableStream:o=!0,showCopyButton:i=!0,variant:c="chat",fontSize:u=c==="chat"?14:16,headerMultiple:d=c==="chat"?.25:1,marginMultiple:l=c==="chat"?1:2,lineHeight:x=c==="chat"?1.6:1.8,borderRadius:m=8,components:f,remarkPlugins:p=[],rehypePlugins:g=[],transformImageSrc:v})=>{const y=React40.useMemo(()=>({animated:t,enableLatex:s,enableMermaid:n,showCopyButton:i,variant:c,transformImageSrc:v}),[t,s,n,i,c,v]),j=useMarkdownComponents(y),h=React40.useMemo(()=>({...j,...f}),[j,f]),w=useRemarkPlugins(s,c,p),C=useRehypePlugins(s,g),E=React40.useMemo(()=>preprocessMarkdownContent(e,s),[e,s]),A=o&&t;return jsxRuntime.jsx(MarkdownContext.Provider,{value:y,children:jsxRuntime.jsx(Typography,{className:chunkYWPIPAUQ_cjs.cn("markdown-content",c==="chat"&&"chat-markdown",r),fontSize:u,headerMultiple:d,marginMultiple:l,lineHeight:x,borderRadius:m,children:A?jsxRuntime.jsx(StreamdownRender,{components:h,remarkPlugins:w,rehypePlugins:C,children:E}):jsxRuntime.jsx(ReactMarkdown__default.default,{components:h,remarkPlugins:w,rehypePlugins:C,children:E})})})});Markdown.displayName="Markdown";var MarkdownRenderer=Markdown,ErrorSeverity=(e=>(e.INFO="info",e.WARNING="warning",e.ERROR="error",e.CRITICAL="critical",e))(ErrorSeverity||{}),ErrorCategory=(e=>(e.NETWORK="network",e.AUTH="auth",e.BUSINESS="business",e.VALIDATION="validation",e.SYSTEM="system",e.USER="user",e.EXTERNAL="external",e.UNKNOWN="unknown",e))(ErrorCategory||{}),ErrorRecoveryStrategy=(e=>(e.NONE="none",e.RETRY="retry",e.REFRESH="refresh",e.REAUTH="reauth",e.CONTACT_SUPPORT="contact_support",e.AUTO_RECOVER="auto_recover",e))(ErrorRecoveryStrategy||{}),ErrorDisplayMode=(e=>(e.TOAST="toast",e.MODAL="modal",e.INLINE="inline",e.PAGE="page",e.SILENT="silent",e))(ErrorDisplayMode||{}),AppError=class B extends Error{static{a(this,"_AppError")}constructor(r){super(r.message),chunk6HRT65AA_cjs.__publicField(this,"id"),chunk6HRT65AA_cjs.__publicField(this,"code"),chunk6HRT65AA_cjs.__publicField(this,"category"),chunk6HRT65AA_cjs.__publicField(this,"severity"),chunk6HRT65AA_cjs.__publicField(this,"timestamp"),chunk6HRT65AA_cjs.__publicField(this,"source"),chunk6HRT65AA_cjs.__publicField(this,"context"),chunk6HRT65AA_cjs.__publicField(this,"originalError"),chunk6HRT65AA_cjs.__publicField(this,"userMessage"),chunk6HRT65AA_cjs.__publicField(this,"technicalDetails"),chunk6HRT65AA_cjs.__publicField(this,"recoveryStrategy"),chunk6HRT65AA_cjs.__publicField(this,"displayMode"),chunk6HRT65AA_cjs.__publicField(this,"retryable"),chunk6HRT65AA_cjs.__publicField(this,"retryCount"),chunk6HRT65AA_cjs.__publicField(this,"maxRetries"),chunk6HRT65AA_cjs.__publicField(this,"requiresUserAction"),chunk6HRT65AA_cjs.__publicField(this,"helpUrl"),chunk6HRT65AA_cjs.__publicField(this,"tags"),this.name="AppError",this.id=this.generateErrorId(),this.code=r.code,this.message=r.message,this.category=r.category,this.severity=r.severity??"error",this.timestamp=new Date,r.source!==void 0&&(this.source=r.source),r.context!==void 0&&(this.context=r.context),r.originalError!==void 0&&(this.originalError=r.originalError),r.userMessage!==void 0&&(this.userMessage=r.userMessage),r.technicalDetails!==void 0&&(this.technicalDetails=r.technicalDetails),r.recoveryStrategy!==void 0&&(this.recoveryStrategy=r.recoveryStrategy),r.displayMode!==void 0&&(this.displayMode=r.displayMode),r.retryable!==void 0&&(this.retryable=r.retryable),this.retryCount=0,this.maxRetries=r.maxRetries??(r.retryable?3:0),r.requiresUserAction!==void 0&&(this.requiresUserAction=r.requiresUserAction),r.helpUrl!==void 0&&(this.helpUrl=r.helpUrl),r.tags!==void 0&&(this.tags=r.tags),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,B)}generateErrorId(){return`err_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}static createNetworkError(r){return new B({code:r.code,message:r.message,category:"network",severity:"error",originalError:r.originalError,context:{url:r.url,method:r.method,timeout:r.timeout},recoveryStrategy:"retry",displayMode:"toast",retryable:!0,maxRetries:3,tags:["network","api"]})}static createAuthError(r){return new B({code:r.code,message:r.message,category:"auth",severity:"warning",originalError:r.originalError,recoveryStrategy:"reauth",displayMode:"modal",retryable:!1,requiresUserAction:!0,tags:["auth","security"]})}static createBusinessError(r){return new B({code:r.code,message:r.message,category:"business",severity:r.severity??"warning",...r.userMessage&&{userMessage:r.userMessage},...r.context&&{context:r.context},recoveryStrategy:"none",displayMode:"toast",retryable:!1,tags:["business","logic"]})}static createValidationError(r){return new B({code:r.code,message:r.message,category:"validation",severity:"warning",context:{field:r.field,rule:r.rule,expectedValue:r.expectedValue,actualValue:r.actualValue},recoveryStrategy:"none",displayMode:"inline",retryable:!1,requiresUserAction:!0,tags:["validation","input"]})}static createSystemError(r){return new B({code:r.code,message:r.message,category:"system",severity:"critical",originalError:r.originalError,...r.technicalDetails&&{technicalDetails:r.technicalDetails},recoveryStrategy:"contact_support",displayMode:"modal",retryable:!1,requiresUserAction:!0,tags:["system","critical"]})}static createUserError(r){return new B({code:r.code,message:r.message,category:"user",severity:"info",userMessage:r.userMessage,...r.context&&{context:r.context},recoveryStrategy:"none",displayMode:"toast",retryable:!1,tags:["user","operation"]})}static fromError(r,t){return new B({code:t?.code??"UNKNOWN_ERROR",message:r.message,category:t?.category??"unknown",severity:t?.severity??"error",originalError:r,...t?.context&&{context:t.context},...r.stack&&{technicalDetails:r.stack},recoveryStrategy:"retry",displayMode:"toast",retryable:!0,tags:["unknown","system"]})}static fromUnknown(r,t){if(r instanceof Error)return B.fromError(r,t);const s=typeof r=="string"?r:"Unknown error occurred";return new B({code:t?.code??"UNKNOWN_ERROR",message:s,category:t?.category??"unknown",severity:t?.severity??"error",originalError:r,...t?.context&&{context:t.context},recoveryStrategy:"retry",displayMode:"toast",retryable:!1,tags:["unknown"]})}static isAppError(r){return r instanceof B}withRetry(){const r=Object.create(B.prototype);return Object.assign(r,this),r.retryCount=(this.retryCount??0)+1,r}getUserMessage(){return this.userMessage??this.message}getTechnicalDetails(){return this.technicalDetails??this.stack}canRetry(){return this.retryable?(this.retryCount??0)<(this.maxRetries??0):!1}toJSON(){return{id:this.id,code:this.code,message:this.message,category:this.category,severity:this.severity,timestamp:this.timestamp.toISOString(),source:this.source,context:this.context,userMessage:this.userMessage,technicalDetails:this.getTechnicalDetails(),recoveryStrategy:this.recoveryStrategy,displayMode:this.displayMode,retryable:this.retryable,retryCount:this.retryCount,maxRetries:this.maxRetries,requiresUserAction:this.requiresUserAction,helpUrl:this.helpUrl,tags:this.tags}}toString(){return`${this.name} [${this.code}]: ${this.message}`}},ErrorBoundary=class extends React40__namespace.default.Component{static{a(this,"ErrorBoundary")}constructor(e){super(e),chunk6HRT65AA_cjs.__publicField(this,"resetError",()=>{this.setState({hasError:!1,error:null,errorInfo:null,errorId:null})}),this.state={hasError:!1,error:null,errorInfo:null,errorId:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e,errorId:`boundary_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}componentDidCatch(e,r){this.setState({error:e,errorInfo:r}),this.props.onError&&this.props.onError(e,r);const t={code:"REACT_ERROR_BOUNDARY",message:e.message,category:"system",severity:this.getErrorSeverity(),source:this.props.name??"ErrorBoundary",context:{componentStack:r.componentStack,errorBoundaryLevel:this.props.level??"component",errorBoundaryName:this.props.name},originalError:e};e.stack&&(t.technicalDetails=e.stack);const s=new AppError(t);this.props.level==="component"&&showErrorToast({title:"\u7EC4\u4EF6\u9519\u8BEF",description:`${this.props.name??"\u7EC4\u4EF6"}\u6E32\u67D3\u5931\u8D25: ${e.message}`,errorId:s.id,duration:8e3}),console.group("\u{1F6A8} React Error Boundary"),console.error("Error:",e),console.error("Component Stack:",r.componentStack),console.error("Error Boundary Props:",this.props),console.groupEnd()}getErrorSeverity(){switch(this.props.level){case"page":return"critical";case"section":return"error";case"component":default:return"warning"}}render(){if(this.state.hasError){if(this.props.fallback){const r=this.props.fallback,t={error:this.state.error,errorInfo:this.state.errorInfo,resetError:this.resetError,level:this.props.level??"component",...this.props.name&&{name:this.props.name},...this.props.texts&&{texts:this.props.texts}};return jsxRuntime.jsx(r,{...t})}const e={error:this.state.error,errorInfo:this.state.errorInfo,resetError:this.resetError,level:this.props.level??"component",showDetails:this.props.showDetails??!1,...this.props.name&&{name:this.props.name},...this.props.texts&&{texts:this.props.texts}};return jsxRuntime.jsx(DefaultErrorFallback,{...e})}return this.props.children}};function DefaultErrorFallback({error:e,errorInfo:r,resetError:t,level:s,name:n,showDetails:o=!1,texts:i={}}){const u={...{title:"Something went wrong",message:"An error occurred while rendering this component",retry:"Retry",refreshPage:"Refresh Page",backToHome:"Back to Home",errorDetails:"Error Details",pageLoadFailed:"Page Load Failed",blockRenderFailed:"Block Render Failed",componentRenderFailed:"Component Render Failed"},...i},d=a(()=>{switch(s){case"page":return u.pageLoadFailed;case"section":return u.blockRenderFailed;case"component":default:return u.componentRenderFailed}},"getErrorTitle"),l=a(()=>u.message,"getErrorDescription"),x=React40.useCallback(()=>{s==="page"?window.location.reload():t()},[s,t]),m=React40.useCallback(()=>{window.location.href="/"},[]);return jsxRuntime.jsx(Card,{className:"m-4 border-destructive/20 bg-destructive-soft",children:jsxRuntime.jsx(CardContent,{className:"p-6",children:jsxRuntime.jsxs("div",{className:"flex items-start space-x-4",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-8 w-8 text-destructive"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h3",{className:"mb-2 text-lg font-semibold text-foreground",children:d()}),jsxRuntime.jsx("p",{className:"mb-4 text-foreground/80",children:l()}),o&&jsxRuntime.jsxs("details",{className:"mb-4",children:[jsxRuntime.jsx("summary",{className:"cursor-pointer text-sm font-medium text-destructive hover:text-foreground",children:u.errorDetails}),jsxRuntime.jsxs("div",{className:"mt-2 rounded border border-destructive/20 bg-card p-3",children:[jsxRuntime.jsxs("p",{className:"mb-2 font-mono text-xs text-foreground",children:[jsxRuntime.jsx("strong",{children:"Error Message:"})," ",e.message]}),e.stack&&jsxRuntime.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:e.stack}),r.componentStack&&jsxRuntime.jsxs("details",{className:"mt-2",children:[jsxRuntime.jsx("summary",{className:"cursor-pointer text-xs font-medium text-destructive",children:"Component Stack"}),jsxRuntime.jsx("pre",{className:"mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:r.componentStack})]})]})]}),jsxRuntime.jsxs("div",{className:"flex space-x-3",children:[jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{onClick:x,size:"sm",variant:"outline",className:"border-destructive/30 text-destructive hover:bg-destructive/10",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"mr-2 h-4 w-4"}),s==="page"?u.refreshPage:u.retry]}),s==="page"&&jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{onClick:m,size:"sm",variant:"outline",className:"border-destructive/30 text-destructive hover:bg-destructive/10",children:[jsxRuntime.jsx(lucideReact.Home,{className:"mr-2 h-4 w-4"}),u.backToHome]})]})]})]})})})}a(DefaultErrorFallback,"DefaultErrorFallback");function withErrorBoundary(e,r){const t=a(s=>jsxRuntime.jsx(ErrorBoundary,{...r,children:jsxRuntime.jsx(e,{...s})}),"WrappedComponent");return t.displayName=`withErrorBoundary(${e.displayName??e.name})`,t}a(withErrorBoundary,"withErrorBoundary");function useErrorHandler(e){const[r,t]=React40__namespace.default.useState(null),n={...{operationFailed:"Operation Failed"},...e},o=React40__namespace.default.useCallback(()=>{t(null)},[]),i=React40__namespace.default.useCallback(c=>{t(c);const u=new AppError({code:"COMPONENT_ERROR",message:c.message,category:"system",severity:"error",originalError:c});showErrorToast({title:n.operationFailed,description:c.message,errorId:u.id,duration:6e3})},[n.operationFailed]);if(r)throw r;return{captureError:i,resetError:o}}a(useErrorHandler,"useErrorHandler");function DefaultLoadingFallback({text:e,size:r="md",showText:t=!0}){const s="Loading...",n={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},o={sm:"p-2",md:"p-4",lg:"p-6"};return jsxRuntime.jsxs("div",{className:`flex flex-col items-center justify-center ${o[r]}`,children:[jsxRuntime.jsx(lucideReact.Loader,{className:`animate-spin text-primary ${n[r]}`}),t&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e??s})]})}a(DefaultLoadingFallback,"DefaultLoadingFallback");function SuspenseErrorBoundary({children:e,fallback:r,errorBoundaryProps:t={},loadingText:s,name:n="SuspenseComponent",enableErrorBoundary:o=!0}){const i=r??jsxRuntime.jsx(DefaultLoadingFallback,{...s?{text:s}:{}}),c=jsxRuntime.jsx(React40.Suspense,{fallback:i,children:e});return o?jsxRuntime.jsx(ErrorBoundary,{level:"section",name:n,...t,children:c}):c}a(SuspenseErrorBoundary,"SuspenseErrorBoundary");function PageSuspenseErrorBoundary({children:e,fallback:r,name:t="Page",texts:s}){const n=r??jsxRuntime.jsx("div",{className:"flex min-h-screen items-center justify-center",children:jsxRuntime.jsx(DefaultLoadingFallback,{text:"Loading page...",size:"lg"})});return jsxRuntime.jsx(SuspenseErrorBoundary,{fallback:n,errorBoundaryProps:{level:"page",showDetails:!1,...s&&{texts:s}},name:t,children:e})}a(PageSuspenseErrorBoundary,"PageSuspenseErrorBoundary");function SectionSuspenseErrorBoundary({children:e,fallback:r,name:t="Section",className:s="",texts:n}){const o=r??jsxRuntime.jsx("div",{className:`flex items-center justify-center p-8 ${s}`,children:jsxRuntime.jsx(DefaultLoadingFallback,{text:"Loading content..."})});return jsxRuntime.jsx(SuspenseErrorBoundary,{fallback:o,errorBoundaryProps:{level:"section",showDetails:!1,...n&&{texts:n}},name:t,children:e})}a(SectionSuspenseErrorBoundary,"SectionSuspenseErrorBoundary");function ComponentSuspenseErrorBoundary({children:e,fallback:r,name:t="Component",size:s="md"}){const n=r??jsxRuntime.jsx(DefaultLoadingFallback,{size:s,showText:!1});return jsxRuntime.jsx(SuspenseErrorBoundary,{fallback:n,errorBoundaryProps:{level:"component",showDetails:!1},name:t,children:e})}a(ComponentSuspenseErrorBoundary,"ComponentSuspenseErrorBoundary");function withSuspenseErrorBoundary(e,r={}){const t=a(s=>jsxRuntime.jsx(SuspenseErrorBoundary,{fallback:r.fallback,errorBoundaryProps:r.errorBoundaryProps??{},...r.loadingText&&{loadingText:r.loadingText},name:r.name??e.displayName??e.name,children:jsxRuntime.jsx(e,{...s})}),"WrappedComponent");return t.displayName=`withSuspenseErrorBoundary(${e.displayName??e.name})`,t}a(withSuspenseErrorBoundary,"withSuspenseErrorBoundary");function useSuspenseErrorHandler(e){const{captureError:r}=useErrorHandler();return{handleSuspenseError:React40__namespace.default.useCallback(s=>{const n=new AppError({code:"SUSPENSE_ERROR",message:s.message,category:"system",severity:"warning",source:e??"SuspenseComponent",context:{suspenseError:!0,componentName:e},originalError:s});r(n)},[r,e])}}a(useSuspenseErrorHandler,"useSuspenseErrorHandler");var ToastErrorNotificationHandler=class{static{a(this,"ToastErrorNotificationHandler")}async showError(e){if(e.context?.isSuccess===!0){showSuccessToast({title:"\u6210\u529F",description:e.userMessage??e.message,duration:4e3});return}const t={title:this.getErrorTitle(e),description:e.userMessage??e.message,errorId:e.id,duration:this.getErrorDuration(e),severity:e.severity==="critical"?"critical":"error"};if(e.retryable){t.retryable=e.retryable;const s=this.createRetryAction(e);s&&(t.retryAction=s)}e.helpUrl&&(t.helpUrl=e.helpUrl),showErrorToast(t)}async showWarning(e){if(e.context?.isSuccess===!0){showSuccessToast({title:"\u6210\u529F",description:e.userMessage??e.message,duration:4e3});return}const t={title:this.getErrorTitle(e),description:e.userMessage??e.message,duration:this.getErrorDuration(e)};e.helpUrl&&(t.helpUrl=e.helpUrl),showWarningToast(t)}async showInfo(e){if(e.context?.isSuccess===!0){showSuccessToast({title:"\u6210\u529F",description:e.userMessage??e.message,duration:4e3});return}showInfoToast({title:this.getErrorTitle(e),description:e.userMessage??e.message,duration:this.getErrorDuration(e)})}async dismiss(e){}getErrorTitle(e){switch(e.severity){case"critical":return"\u4E25\u91CD\u9519\u8BEF";case"error":return"\u9519\u8BEF";case"warning":return"\u8B66\u544A";case"info":return"\u63D0\u793A";default:return"\u901A\u77E5"}}getErrorDuration(e){switch(e.severity){case"critical":return 0;case"error":return 8e3;case"warning":return 6e3;case"info":return 4e3;default:return 5e3}}createRetryAction(e){}};function createToastErrorNotificationHandler(){return new ToastErrorNotificationHandler}a(createToastErrorNotificationHandler,"createToastErrorNotificationHandler");var ERROR_MESSAGE_KEYS={NETWORK_ERROR:"errors.network.general",CONNECTION_TIMEOUT:"errors.network.timeout",CONNECTION_FAILED:"errors.network.failed",NETWORK_UNAVAILABLE:"errors.network.unavailable",REQUEST_FAILED:"errors.network.requestFailed",CORS_ERROR:"errors.network.cors",DNS_ERROR:"errors.network.dns",UNAUTHORIZED:"errors.auth.unauthorized",FORBIDDEN:"errors.auth.forbidden",TOKEN_EXPIRED:"errors.auth.tokenExpired",TOKEN_INVALID:"errors.auth.tokenInvalid",LOGIN_REQUIRED:"errors.auth.loginRequired",PERMISSION_DENIED:"errors.auth.permissionDenied",BAD_REQUEST:"errors.http.badRequest",NOT_FOUND:"errors.http.notFound",VALIDATION_ERROR:"errors.http.validationError",RATE_LIMITED:"errors.http.rateLimited",INTERNAL_SERVER_ERROR:"errors.http.internalServerError",BAD_GATEWAY:"errors.http.badGateway",SERVICE_UNAVAILABLE:"errors.http.serviceUnavailable",GATEWAY_TIMEOUT:"errors.http.gatewayTimeout",BUSINESS_RULE_VIOLATION:"errors.business.ruleViolation",OPERATION_NOT_ALLOWED:"errors.business.operationNotAllowed",RESOURCE_CONFLICT:"errors.business.resourceConflict",RESOURCE_NOT_FOUND:"errors.business.resourceNotFound",RESOURCE_ALREADY_EXISTS:"errors.business.resourceAlreadyExists",QUOTA_EXCEEDED:"errors.business.quotaExceeded",REQUIRED_FIELD_MISSING:"errors.validation.requiredFieldMissing",INVALID_FORMAT:"errors.validation.invalidFormat",VALUE_OUT_OF_RANGE:"errors.validation.valueOutOfRange",INVALID_EMAIL:"errors.validation.invalidEmail",INVALID_PASSWORD:"errors.validation.invalidPassword",PASSWORD_TOO_WEAK:"errors.validation.passwordTooWeak",DATABASE_ERROR:"errors.system.database",FILE_SYSTEM_ERROR:"errors.system.fileSystem",MEMORY_ERROR:"errors.system.memory",CONFIGURATION_ERROR:"errors.system.configuration",OPERATION_CANCELLED:"errors.user.operationCancelled",OPERATION_TIMEOUT:"errors.user.operationTimeout",INVALID_OPERATION:"errors.user.invalidOperation",OPERATION_FAILED:"errors.user.operationFailed",EXTERNAL_SERVICE_ERROR:"errors.external.serviceError",EXTERNAL_API_ERROR:"errors.external.apiError",PAYMENT_ERROR:"errors.external.paymentError",EMAIL_SERVICE_ERROR:"errors.external.emailServiceError",FILE_NOT_FOUND:"errors.file.notFound",FILE_TOO_LARGE:"errors.file.tooLarge",FILE_TYPE_NOT_SUPPORTED:"errors.file.typeNotSupported",FILE_UPLOAD_FAILED:"errors.file.uploadFailed",FILE_DOWNLOAD_FAILED:"errors.file.downloadFailed",STORAGE_ERROR:"errors.storage.general",STORAGE_QUOTA_EXCEEDED:"errors.storage.quotaExceeded",STORAGE_UNAVAILABLE:"errors.storage.unavailable",CACHE_ERROR:"errors.storage.cache",REACT_ERROR_BOUNDARY:"errors.react.boundary",COMPONENT_ERROR:"errors.react.component",SUSPENSE_ERROR:"errors.react.suspense",NEXTJS_PAGE_ERROR:"errors.nextjs.page",UNKNOWN_ERROR:"errors.unknown.general",UNEXPECTED_ERROR:"errors.unknown.unexpected"},FALLBACK_ERROR_MESSAGES={zh:{"errors.network.general":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8BBE\u7F6E","errors.network.timeout":"\u7F51\u7EDC\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5","errors.network.failed":"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25","errors.network.unavailable":"\u7F51\u7EDC\u4E0D\u53EF\u7528","errors.network.requestFailed":"\u8BF7\u6C42\u5931\u8D25","errors.network.cors":"\u8DE8\u57DF\u8BF7\u6C42\u88AB\u963B\u6B62","errors.network.dns":"DNS\u89E3\u6790\u5931\u8D25","errors.auth.unauthorized":"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","errors.auth.forbidden":"\u6743\u9650\u4E0D\u8DB3\uFF0C\u65E0\u6CD5\u6267\u884C\u6B64\u64CD\u4F5C","errors.auth.tokenExpired":"\u767B\u5F55\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","errors.auth.tokenInvalid":"\u767B\u5F55\u72B6\u6001\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","errors.auth.loginRequired":"\u8BF7\u5148\u767B\u5F55","errors.auth.permissionDenied":"\u6743\u9650\u4E0D\u8DB3","errors.http.badRequest":"\u8BF7\u6C42\u53C2\u6570\u6709\u8BEF","errors.http.notFound":"\u8D44\u6E90\u4E0D\u5B58\u5728","errors.http.validationError":"\u6570\u636E\u9A8C\u8BC1\u5931\u8D25","errors.http.rateLimited":"\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5","errors.http.internalServerError":"\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF","errors.http.badGateway":"\u7F51\u5173\u9519\u8BEF","errors.http.serviceUnavailable":"\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528","errors.http.gatewayTimeout":"\u7F51\u5173\u8D85\u65F6","errors.business.ruleViolation":"\u8FDD\u53CD\u4E1A\u52A1\u89C4\u5219","errors.business.operationNotAllowed":"\u64CD\u4F5C\u4E0D\u88AB\u5141\u8BB8","errors.business.resourceConflict":"\u8D44\u6E90\u51B2\u7A81","errors.business.resourceNotFound":"\u8D44\u6E90\u4E0D\u5B58\u5728","errors.business.resourceAlreadyExists":"\u8D44\u6E90\u5DF2\u5B58\u5728","errors.business.quotaExceeded":"\u8D85\u51FA\u914D\u989D\u9650\u5236","errors.validation.requiredFieldMissing":"\u5FC5\u586B\u5B57\u6BB5\u7F3A\u5931","errors.validation.invalidFormat":"\u683C\u5F0F\u4E0D\u6B63\u786E","errors.validation.valueOutOfRange":"\u503C\u8D85\u51FA\u8303\u56F4","errors.validation.invalidEmail":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E","errors.validation.invalidPassword":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","errors.validation.passwordTooWeak":"\u5BC6\u7801\u5F3A\u5EA6\u4E0D\u591F","errors.system.database":"\u6570\u636E\u5E93\u9519\u8BEF","errors.system.fileSystem":"\u6587\u4EF6\u7CFB\u7EDF\u9519\u8BEF","errors.system.memory":"\u5185\u5B58\u4E0D\u8DB3","errors.system.configuration":"\u914D\u7F6E\u9519\u8BEF","errors.user.operationCancelled":"\u64CD\u4F5C\u5DF2\u53D6\u6D88","errors.user.operationTimeout":"\u64CD\u4F5C\u8D85\u65F6","errors.user.invalidOperation":"\u65E0\u6548\u64CD\u4F5C","errors.user.operationFailed":"\u64CD\u4F5C\u5931\u8D25","errors.external.serviceError":"\u7B2C\u4E09\u65B9\u670D\u52A1\u9519\u8BEF","errors.external.apiError":"\u5916\u90E8API\u9519\u8BEF","errors.external.paymentError":"\u652F\u4ED8\u670D\u52A1\u9519\u8BEF","errors.external.emailServiceError":"\u90AE\u4EF6\u670D\u52A1\u9519\u8BEF","errors.file.notFound":"\u6587\u4EF6\u4E0D\u5B58\u5728","errors.file.tooLarge":"\u6587\u4EF6\u8FC7\u5927","errors.file.typeNotSupported":"\u6587\u4EF6\u7C7B\u578B\u4E0D\u652F\u6301","errors.file.uploadFailed":"\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25","errors.file.downloadFailed":"\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25","errors.storage.general":"\u5B58\u50A8\u9519\u8BEF","errors.storage.quotaExceeded":"\u5B58\u50A8\u7A7A\u95F4\u4E0D\u8DB3","errors.storage.unavailable":"\u5B58\u50A8\u670D\u52A1\u4E0D\u53EF\u7528","errors.storage.cache":"\u7F13\u5B58\u9519\u8BEF","errors.react.boundary":"\u7EC4\u4EF6\u6E32\u67D3\u9519\u8BEF","errors.react.component":"\u7EC4\u4EF6\u9519\u8BEF","errors.react.suspense":"\u7EC4\u4EF6\u52A0\u8F7D\u9519\u8BEF","errors.nextjs.page":"\u9875\u9762\u9519\u8BEF","errors.unknown.general":"\u53D1\u751F\u672A\u77E5\u9519\u8BEF","errors.unknown.unexpected":"\u53D1\u751F\u610F\u5916\u9519\u8BEF"},en:{"errors.network.general":"Network connection failed, please check your network settings","errors.network.timeout":"Network request timeout, please try again later","errors.network.failed":"Network request failed","errors.network.unavailable":"Network unavailable","errors.network.requestFailed":"Request failed","errors.network.cors":"Cross-origin request blocked","errors.network.dns":"DNS resolution failed","errors.auth.unauthorized":"Unauthorized access, please login again","errors.auth.forbidden":"Insufficient permissions to perform this operation","errors.auth.tokenExpired":"Login expired, please login again","errors.auth.tokenInvalid":"Invalid login status, please login again","errors.auth.loginRequired":"Please login first","errors.auth.permissionDenied":"Permission denied","errors.http.badRequest":"Invalid request parameters","errors.http.notFound":"Resource not found","errors.http.validationError":"Data validation failed","errors.http.rateLimited":"Too many requests, please try again later","errors.http.internalServerError":"Internal server error","errors.http.badGateway":"Bad gateway","errors.http.serviceUnavailable":"Service temporarily unavailable","errors.http.gatewayTimeout":"Gateway timeout","errors.business.ruleViolation":"Business rule violation","errors.business.operationNotAllowed":"Operation not allowed","errors.business.resourceConflict":"Resource conflict","errors.business.resourceNotFound":"Resource not found","errors.business.resourceAlreadyExists":"Resource already exists","errors.business.quotaExceeded":"Quota exceeded","errors.validation.requiredFieldMissing":"Required field missing","errors.validation.invalidFormat":"Invalid format","errors.validation.valueOutOfRange":"Value out of range","errors.validation.invalidEmail":"Invalid email format","errors.validation.invalidPassword":"Invalid password format","errors.validation.passwordTooWeak":"Password too weak","errors.system.database":"Database error","errors.system.fileSystem":"File system error","errors.system.memory":"Out of memory","errors.system.configuration":"Configuration error","errors.user.operationCancelled":"Operation cancelled","errors.user.operationTimeout":"Operation timeout","errors.user.invalidOperation":"Invalid operation","errors.user.operationFailed":"Operation failed","errors.external.serviceError":"External service error","errors.external.apiError":"External API error","errors.external.paymentError":"Payment service error","errors.external.emailServiceError":"Email service error","errors.file.notFound":"File not found","errors.file.tooLarge":"File too large","errors.file.typeNotSupported":"File type not supported","errors.file.uploadFailed":"File upload failed","errors.file.downloadFailed":"File download failed","errors.storage.general":"Storage error","errors.storage.quotaExceeded":"Storage quota exceeded","errors.storage.unavailable":"Storage service unavailable","errors.storage.cache":"Cache error","errors.react.boundary":"Component rendering error","errors.react.component":"Component error","errors.react.suspense":"Component loading error","errors.nextjs.page":"Page error","errors.unknown.general":"Unknown error occurred","errors.unknown.unexpected":"Unexpected error occurred"}};function useErrorMessages(e={}){const{defaultLocale:r="zh",translate:t,texts:s={}}=e,n=React40.useCallback(d=>ERROR_MESSAGE_KEYS[d]||"errors.unknown.general",[]),o=React40.useCallback((d,l=r)=>{const x=FALLBACK_ERROR_MESSAGES[l];return x[d]||x["errors.unknown.general"]},[r]),i=React40.useCallback((d,l)=>{const x=typeof d=="string"?d:d.code,m=n(x);if(t)try{const p=t(m,l);return p===m?o(m):p}catch{return o(m)}const f=s[m];return f||o(m)},[n,o,t,s]),c=React40.useCallback(d=>{const l=`errors.titles.${d.severity}`;if(t)try{const g=t(l);if(g!==l)return g}catch{}const x=`error.${d.severity}`,m={zh:{critical:"\u4E25\u91CD\u9519\u8BEF",error:"\u9519\u8BEF",warning:"\u8B66\u544A",info:"\u63D0\u793A"},en:{critical:"Critical Error",error:"Error",warning:"Warning",info:"Information"}},f=m[r][d.severity]||m[r].error,p=s[x];return p||f},[r,t,s]),u=React40.useCallback((d,l)=>d.userMessage?d.userMessage:i(d,l),[i]);return{getErrorMessage:i,getErrorTitle:c,getErrorDescription:u,getErrorMessageKey:n}}a(useErrorMessages,"useErrorMessages");function createErrorMessagesHook(e,r="zh"){return a(function(){return useErrorMessages({translate:e,defaultLocale:r})},"useErrorMessagesWithTranslation")}a(createErrorMessagesHook,"createErrorMessagesHook");function FileBadge({className:e,label:r}){return jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:e,children:[jsxRuntime.jsx("path",{d:"M5 1.5h9L20 7.5V21a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 21V3a1.5 1.5 0 0 1 1-1.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14 1.5 20 7.5h-4.5A1.5 1.5 0 0 1 14 6Z",fill:"hsl(var(--card))",fillOpacity:"0.35"}),jsxRuntime.jsx("text",{x:"11.5",y:"18.5",textAnchor:"middle",fontFamily:"ui-sans-serif, system-ui, -apple-system, sans-serif",fontSize:"7",fontWeight:"800",letterSpacing:"-0.4",fill:"hsl(var(--card))",children:r})]})}a(FileBadge,"FileBadge");function PdfFileIcon({className:e}){return jsxRuntime.jsx(FileBadge,{label:"PDF",className:e})}a(PdfFileIcon,"PdfFileIcon");function DocFileIcon({className:e}){return jsxRuntime.jsx(FileBadge,{label:"DOC",className:e})}a(DocFileIcon,"DocFileIcon");var FILE_KIND_CLASSES={pdf:{color:"text-file-pdf",bgColor:"bg-file-pdf/10"},doc:{color:"text-file-doc",bgColor:"bg-file-doc/10"},sheet:{color:"text-file-sheet",bgColor:"bg-file-sheet/10"},slide:{color:"text-file-slide",bgColor:"bg-file-slide/10"},text:{color:"text-file-text",bgColor:"bg-file-text/10"},code:{color:"text-file-code",bgColor:"bg-file-code/10"},image:{color:"text-file-image",bgColor:"bg-file-image/10"},audio:{color:"text-file-audio",bgColor:"bg-file-audio/10"},video:{color:"text-file-video",bgColor:"bg-file-video/10"},archive:{color:"text-file-archive",bgColor:"bg-file-archive/10"}},kind=a(e=>FILE_KIND_CLASSES[e],"kind"),FILE_EXTENSION_MAP={pdf:{icon:PdfFileIcon,...kind("pdf")},doc:{icon:DocFileIcon,...kind("doc")},docx:{icon:DocFileIcon,...kind("doc")},odt:{icon:DocFileIcon,...kind("doc")},rtf:{icon:DocFileIcon,...kind("doc")},xls:{icon:lucideReact.FileSpreadsheet,...kind("sheet")},xlsx:{icon:lucideReact.FileSpreadsheet,...kind("sheet")},csv:{icon:lucideReact.FileSpreadsheet,...kind("sheet")},tsv:{icon:lucideReact.FileSpreadsheet,...kind("sheet")},ods:{icon:lucideReact.FileSpreadsheet,...kind("sheet")},ppt:{icon:lucideReact.Presentation,...kind("slide")},pptx:{icon:lucideReact.Presentation,...kind("slide")},odp:{icon:lucideReact.Presentation,...kind("slide")},key:{icon:lucideReact.Presentation,...kind("slide")},txt:{icon:lucideReact.FileType,...kind("text")},md:{icon:lucideReact.FileText,...kind("text")},js:{icon:lucideReact.FileCode,...kind("code")},ts:{icon:lucideReact.FileCode,...kind("code")},jsx:{icon:lucideReact.FileCode,...kind("code")},tsx:{icon:lucideReact.FileCode,...kind("code")},py:{icon:lucideReact.FileCode,...kind("code")},java:{icon:lucideReact.FileCode,...kind("code")},c:{icon:lucideReact.FileCode,...kind("code")},cpp:{icon:lucideReact.FileCode,...kind("code")},h:{icon:lucideReact.FileCode,...kind("code")},go:{icon:lucideReact.FileCode,...kind("code")},rs:{icon:lucideReact.FileCode,...kind("code")},rb:{icon:lucideReact.FileCode,...kind("code")},php:{icon:lucideReact.FileCode,...kind("code")},html:{icon:lucideReact.FileCode,...kind("code")},css:{icon:lucideReact.FileCode,...kind("code")},json:{icon:lucideReact.FileCode,...kind("code")},xml:{icon:lucideReact.FileCode,...kind("code")},yml:{icon:lucideReact.FileCode,...kind("code")},yaml:{icon:lucideReact.FileCode,...kind("code")},sql:{icon:lucideReact.FileCode,...kind("code")},sh:{icon:lucideReact.Code,...kind("code")},jpg:{icon:lucideReact.FileImage,...kind("image")},jpeg:{icon:lucideReact.FileImage,...kind("image")},png:{icon:lucideReact.FileImage,...kind("image")},gif:{icon:lucideReact.FileImage,...kind("image")},webp:{icon:lucideReact.FileImage,...kind("image")},svg:{icon:lucideReact.FileImage,...kind("image")},bmp:{icon:lucideReact.FileImage,...kind("image")},avif:{icon:lucideReact.FileImage,...kind("image")},heic:{icon:lucideReact.FileImage,...kind("image")},mp3:{icon:lucideReact.FileAudio,...kind("audio")},wav:{icon:lucideReact.FileAudio,...kind("audio")},ogg:{icon:lucideReact.FileAudio,...kind("audio")},m4a:{icon:lucideReact.FileAudio,...kind("audio")},aac:{icon:lucideReact.FileAudio,...kind("audio")},flac:{icon:lucideReact.FileAudio,...kind("audio")},opus:{icon:lucideReact.FileAudio,...kind("audio")},mp4:{icon:lucideReact.FileVideo,...kind("video")},mov:{icon:lucideReact.FileVideo,...kind("video")},webm:{icon:lucideReact.FileVideo,...kind("video")},mkv:{icon:lucideReact.FileVideo,...kind("video")},avi:{icon:lucideReact.FileVideo,...kind("video")},m4v:{icon:lucideReact.FileVideo,...kind("video")},zip:{icon:lucideReact.FileArchive,...kind("archive")},rar:{icon:lucideReact.FileArchive,...kind("archive")},"7z":{icon:lucideReact.FileArchive,...kind("archive")},tar:{icon:lucideReact.FileArchive,...kind("archive")},gz:{icon:lucideReact.FileArchive,...kind("archive")},bz2:{icon:lucideReact.FileArchive,...kind("archive")}},DEFAULT_FILE_CONFIG={icon:lucideReact.File,color:"text-muted-foreground",bgColor:"bg-muted"},CATEGORY_MAP={document:{icon:lucideReact.FileText,...kind("doc")},text:{icon:lucideReact.FileType,...kind("text")},code:{icon:lucideReact.Code,...kind("code")},image:{icon:lucideReact.Image,...kind("image")},audio:{icon:lucideReact.FileAudio,...kind("audio")},video:{icon:lucideReact.FileVideo,...kind("video")},archive:{icon:lucideReact.Archive,...kind("archive")}};function mimeCategory(e){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e.startsWith("text/"))return"text"}a(mimeCategory,"mimeCategory");function getFileExtension(e){const t=((e??"").toLowerCase().split(/[?#]/,1)[0]??"").trim();return t.includes(".")?t.split(".").at(-1)??"":""}a(getFileExtension,"getFileExtension");function getFileIconConfig(e,r){const t=getFileExtension(e);if(t&&FILE_EXTENSION_MAP[t])return FILE_EXTENSION_MAP[t];if(r?.category){const s=CATEGORY_MAP[r.category];if(s)return s}if(r?.mimeType){const s=mimeCategory(r.mimeType);if(s){const n=CATEGORY_MAP[s];if(n)return n}}return DEFAULT_FILE_CONFIG}a(getFileIconConfig,"getFileIconConfig");function formatFileSize(e){if(e===0)return"0 B";const r=1024,t=["B","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(r));return`${(e/Math.pow(r,s)).toFixed(1)} ${t[s]}`}a(formatFileSize,"formatFileSize");var Pagination=React40__namespace.forwardRef(({pagination:e,onPageChange:r,onPageSizeChange:t,pageSizeOptions:s=[10,20,50,100],showPageSizeSelector:n=!0,showPageInfo:o=!0,className:i,texts:c={}},u)=>{const l={...{showing:"Showing {start} to {end} of {total} items",itemsPerPage:"Items per page",firstPage:"First",previous:"Previous",next:"Next",lastPage:"Last"},...c},{page:x,limit:m,total:f,totalPages:p,hasNext:g,hasPrev:v,offset:y=(x-1)*m}=e,j=y+1,h=Math.min(y+m,f),w=a(()=>r(0),"handleFirstPage"),C=a(()=>r(Math.max(0,y-m)),"handlePrevPage"),E=a(()=>r(y+m),"handleNextPage"),A=a(()=>{const R=Math.floor((f-1)/m)*m;r(R)},"handleLastPage");return f===0?null:jsxRuntime.jsxs("div",{ref:u,className:chunkYWPIPAUQ_cjs.cn("flex flex-col items-center justify-between gap-3 pt-3 sm:flex-row",i),children:[o&&jsxRuntime.jsx("div",{className:"text-[13px] text-muted-foreground",children:l.showing.replace("{start}",j.toString()).replace("{end}",h.toString()).replace("{total}",f.toString())}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[n&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-[13px]",children:[jsxRuntime.jsx("span",{children:l.itemsPerPage}),jsxRuntime.jsxs(chunkMTA2XHQG_cjs.Select,{value:m.toString(),onValueChange:a(R=>t(Number(R)),"onValueChange"),children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectTrigger,{className:"w-16",children:jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectValue,{})}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectContent,{children:[...new Set([...s,e.limit])].sort((R,N)=>R-N).map(R=>jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectItem,{value:R.toString(),children:R},R))})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",size:"sm",onClick:w,disabled:y===0||v!==void 0&&!v,children:l.firstPage}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",size:"sm",onClick:C,disabled:y===0||v!==void 0&&!v,children:l.previous}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",size:"sm",onClick:E,disabled:y+m>=f||g!==void 0&&!g,children:l.next}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{variant:"outline",size:"sm",onClick:A,disabled:y+m>=f||g!==void 0&&!g,children:l.lastPage})]})]})]})});Pagination.displayName="Pagination";function DataTable({data:e,columns:r,loading:t=!1,pagination:s,onPageChange:n,onPageSizeChange:o,searchable:i=!1,searchValue:c="",onSearchChange:u,searchPlaceholder:d,filters:l=[],sort:x,onSortChange:m,actions:f,toolbar:p,rowSelection:g,className:v,tableClassName:y,emptyText:j,emptyIcon:h,emptyActions:w,rowKey:C="id",onRowClick:E,rowClassName:A,texts:R={}}){const k={...{search:"Search",refresh:"Refresh",noData:"No data available",loading:"Loading data...",itemsPerPage:"Items per page",page:"Page",of:"of",items:"items",previous:"Previous",next:"Next",firstPage:"First",lastPage:"Last",showing:"Showing {start} to {end} of {total} items"},...R},M=a((b,D)=>typeof C=="function"?C(b):String(b[C]||D),"getRowKey"),S=a((b,D)=>{let P="hover:bg-muted/50 transition-colors";return E&&(P+=" cursor-pointer"),A&&(typeof A=="function"?P+=` ${A(b,D)}`:P+=` ${A}`),P},"getRowClassName"),T=React40.useCallback((b,D,P)=>b.render?b.render(D[b.dataIndex],D,P):b.dataIndex?String(D[b.dataIndex]??""):"",[]),F=React40.useCallback((b,D)=>()=>E?.(b,D),[E]);return t?jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-4",v),children:[p??jsxRuntime.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[i&&jsxRuntime.jsxs("div",{className:"relative w-full sm:w-64",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.Input,{placeholder:d||k.search,value:c,onChange:a(b=>u?.(b.target.value),"onChange"),className:"pl-10",disabled:!0})]}),l.map(b=>jsxRuntime.jsxs("div",{className:"w-full sm:w-48",children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.Label,{children:b.label}),jsxRuntime.jsxs(chunkMTA2XHQG_cjs.Select,{value:b.value,onValueChange:b.onChange,disabled:!0,children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectTrigger,{children:jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectValue,{})}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectContent,{children:b.options.map(D=>jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectItem,{value:D.value,children:D.label},D.value))})]})]},b.key))]}),f]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-center py-8",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-6 w-6 animate-spin text-muted-foreground"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:k.loading})]})]}):jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("space-y-4",v),children:[p??jsxRuntime.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[i&&jsxRuntime.jsxs("div",{className:"w-full sm:w-64",children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.Label,{children:k.search}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.Input,{placeholder:d||k.search,value:c,onChange:a(b=>u?.(b.target.value),"onChange"),className:"pl-10"})]})]}),l.map(b=>jsxRuntime.jsxs("div",{className:"w-full sm:w-48",children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.Label,{children:b.label}),jsxRuntime.jsxs(chunkMTA2XHQG_cjs.Select,{value:b.value,onValueChange:b.onChange,children:[jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectTrigger,{children:jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectValue,{})}),jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectContent,{children:b.options.map(D=>jsxRuntime.jsx(chunkMTA2XHQG_cjs.SelectItem,{value:D.value,children:D.label},D.value))})]})]},b.key))]}),f]}),jsxRuntime.jsx("div",{className:"rounded-md border",children:jsxRuntime.jsxs(Table,{className:y,children:[jsxRuntime.jsx(TableHeader,{children:jsxRuntime.jsxs(TableRow,{children:[g&&jsxRuntime.jsx(TableHead,{className:"w-10",children:jsxRuntime.jsx(Checkbox,{"aria-label":g.label??"Select current page",checked:e.length>0&&e.every((b,D)=>g.selectedKeys.includes(M(b,D))),onCheckedChange:a(b=>g.onChange(b?e.map(M):[]),"onCheckedChange")})}),r.map(b=>{const D=chunkYWPIPAUQ_cjs.cn(b.align==="center"&&"text-center",b.align==="right"&&"text-right",b.className);return b.sortable&&m?jsxRuntime.jsx(SortableTableHead,{className:D,style:{width:b.width},direction:x?.key===b.key?x.direction:null,onSort:a(P=>m({key:b.key,direction:P}),"onSort"),children:b.title},b.key):jsxRuntime.jsx(TableHead,{className:D,style:{width:b.width},children:b.title},b.key)})]})}),jsxRuntime.jsx(TableBody,{children:e.length===0?jsxRuntime.jsx(TableRow,{children:jsxRuntime.jsx(TableCell,{colSpan:r.length+(g?1:0),className:"py-8 text-center",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[h,jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium",children:j||k.noData}),w]})]})})}):e.map((b,D)=>jsxRuntime.jsxs(TableRow,{className:S(b,D),onClick:E?F(b,D):void 0,children:[g&&jsxRuntime.jsx(TableCell,{onClick:a(P=>P.stopPropagation(),"onClick"),children:jsxRuntime.jsx(Checkbox,{"aria-label":g.label??"Select record",checked:g.selectedKeys.includes(M(b,D)),onCheckedChange:a(P=>g.onChange(P?[...g.selectedKeys,M(b,D)]:g.selectedKeys.filter(O=>O!==M(b,D))),"onCheckedChange")})}),r.map(P=>jsxRuntime.jsx(TableCell,{className:chunkYWPIPAUQ_cjs.cn(P.align==="center"&&"text-center",P.align==="right"&&"text-right",P.className),children:T(P,b,D)},P.key))]},M(b,D)))})]})}),s&&n&&o&&jsxRuntime.jsx(Pagination,{pagination:s,onPageChange:n,onPageSizeChange:o,texts:{showing:k.showing,itemsPerPage:k.itemsPerPage,firstPage:k.firstPage,previous:k.previous,next:k.next,lastPage:k.lastPage}})]})}a(DataTable,"DataTable");function formatMediaDuration(e){if(!Number.isFinite(e)||e==null||e<0)return"0:00";const r=Math.max(0,Math.floor(e)),t=Math.floor(r/60),s=r%60;if(t>=60){const n=Math.floor(t/60),o=t%60;return`${n}:${String(o).padStart(2,"0")}:${String(s).padStart(2,"0")}`}return`${t}:${String(s).padStart(2,"0")}`}a(formatMediaDuration,"formatMediaDuration");var KIND_LABEL={audio:"\u97F3\u9891",video:"\u89C6\u9891"};function MediaErrorBanner({kind:e,url:r,filename:t,className:s}){const n=KIND_LABEL[e];return jsxRuntime.jsxs("div",{role:"alert",className:chunkYWPIPAUQ_cjs.cn("flex items-center gap-2 rounded-xl border border-destructive/30","bg-destructive/5 px-3 py-2 text-sm text-destructive",s),children:[jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-4 w-4 shrink-0"}),jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",title:t??r,children:t?`${n}\u52A0\u8F7D\u5931\u8D25 \xB7 ${t}`:`${n}\u52A0\u8F7D\u5931\u8D25`}),jsxRuntime.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",download:t??!0,className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-destructive/30 px-2 py-0.5 text-[11px] font-medium text-destructive hover:bg-destructive/10",children:[jsxRuntime.jsx(lucideReact.Download,{className:"h-3 w-3"}),"\u4E0B\u8F7D"]})]})}a(MediaErrorBanner,"MediaErrorBanner");var HAVE_METADATA=1;function AudioPlayer({src:e,title:r,size:t,mimeType:s,durationSeconds:n,className:o,compact:i=!1,downloadable:c,onDownload:u,seekTo:d}){const l=React40.useRef(null),x=React40.useRef(null),[m,f]=React40.useState(!1),[p,g]=React40.useState(!1),[v,y]=React40.useState(0),[j,h]=React40.useState(n),[w,C]=React40.useState(!1),[E,A]=React40.useState(!1);React40.useEffect(()=>{C(!1),y(0),f(!1),h(n),x.current=null},[e]),React40.useEffect(()=>{n!=null&&Number.isFinite(n)&&h(P=>P??n)},[n]);const R=d?.requestId,N=d?.seconds;React40.useEffect(()=>{if(R==null||N==null)return;const P=l.current;if(!P||P.readyState<HAVE_METADATA){x.current=N;return}P.currentTime=N,y(N)},[R,N]);const k=React40.useCallback(()=>{const P=l.current;P&&Number.isFinite(P.duration)&&h(P.duration);const O=x.current;P&&O!=null&&(x.current=null,P.currentTime=O,y(O))},[]),M=React40.useCallback(()=>{const P=l.current;P&&y(P.currentTime)},[]),S=React40.useCallback(()=>{const P=l.current;P&&(P.paused?P.play().then(()=>f(!0)).catch(()=>C(!0)):(P.pause(),f(!1)))},[]),T=React40.useCallback(()=>g(P=>!P),[]),F=React40.useCallback(P=>{const O=l.current;if(!O||!j)return;const $=Number(P.target.value);O.currentTime=$,y($)},[j]),b=React40.useMemo(()=>!j||j<=0?0:Math.min(1,v/j),[v,j]),D=c??!i;return w?jsxRuntime.jsx(MediaErrorBanner,{kind:"audio",url:e,filename:r,className:o}):i?jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("inline-flex max-w-[320px] items-center gap-2 rounded-full border border-border/60","bg-background/70 px-2 py-1 text-sm shadow-sm backdrop-blur",o),children:[jsxRuntime.jsx(PlayPauseButton,{isPlaying:m,onClick:S,size:"sm"}),jsxRuntime.jsx(SeekBar,{progress:b,duration:j,currentTime:v,onChange:F,onHover:A,accent:"primary"}),jsxRuntime.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:formatMediaDuration(m||E?v:j)}),jsxRuntime.jsx(NativeAudio,{ref:l,src:e,muted:p,onLoaded:k,onTimeUpdate:M,onEnded:a(()=>{f(!1),y(0)},"onEnded"),onError:a(()=>C(!0),"onError")})]}):jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("group/audio flex w-full items-center gap-2.5 rounded-xl border border-border/60","bg-card/60 px-2.5 py-1.5 transition-colors","focus-within:border-primary/40 hover:border-border",o),children:[jsxRuntime.jsx(PlayPauseButton,{isPlaying:m,onClick:S,size:"md"}),jsxRuntime.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:jsxRuntime.jsx(SeekBar,{progress:b,duration:j,currentTime:v,onChange:F,onHover:A,accent:"primary"})}),jsxRuntime.jsxs("span",{className:"shrink-0 text-[11px] tabular-nums leading-none text-muted-foreground",children:[formatMediaDuration(v),jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground/40",children:"/"}),formatMediaDuration(j)]}),jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[jsxRuntime.jsx("button",{type:"button",onClick:T,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground","aria-label":p?"Unmute":"Mute",children:p?jsxRuntime.jsx(lucideReact.VolumeX,{className:"h-3.5 w-3.5"}):jsxRuntime.jsx(lucideReact.Volume2,{className:"h-3.5 w-3.5"})}),D&&(u?jsxRuntime.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground","aria-label":r?`Download ${r}`:"Download audio",title:r?`Download ${r}`:"Download audio",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-3.5 w-3.5"})}):jsxRuntime.jsx("a",{href:e,download:r??!0,target:"_blank",rel:"noopener noreferrer",className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground","aria-label":r?`Download ${r}`:"Download audio",title:r?`Download ${r}`:"Download audio",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-3.5 w-3.5"})}))]}),jsxRuntime.jsx(NativeAudio,{ref:l,src:e,muted:p,onLoaded:k,onTimeUpdate:M,onEnded:a(()=>{f(!1),y(0)},"onEnded"),onError:a(()=>C(!0),"onError")})]})}a(AudioPlayer,"AudioPlayer");function PlayPauseButton({isPlaying:e,onClick:r,size:t}){return jsxRuntime.jsx("button",{type:"button",onClick:r,className:chunkYWPIPAUQ_cjs.cn("flex shrink-0 items-center justify-center rounded-full","bg-primary text-primary-foreground","transition-all duration-150 ease-out","hover:bg-primary/90 active:scale-95","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",t==="sm"?"h-7 w-7":"h-8 w-8"),"aria-label":e?"Pause":"Play",children:e?jsxRuntime.jsx(lucideReact.Pause,{className:t==="sm"?"h-3 w-3":"h-3.5 w-3.5",fill:"currentColor"}):jsxRuntime.jsx(lucideReact.Play,{className:chunkYWPIPAUQ_cjs.cn(t==="sm"?"h-3 w-3":"h-3.5 w-3.5","translate-x-[1px]"),fill:"currentColor"})})}a(PlayPauseButton,"PlayPauseButton");function SeekBar({progress:e,duration:r,currentTime:t,onChange:s,onHover:n}){const o=Math.round(e*1e3)/10;return jsxRuntime.jsxs("div",{className:"relative flex-1",onMouseEnter:a(()=>n?.(!0),"onMouseEnter"),onMouseLeave:a(()=>n?.(!1),"onMouseLeave"),children:[jsxRuntime.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-1/2 left-0 right-0 h-1 -translate-y-1/2 overflow-hidden rounded-full bg-muted",children:jsxRuntime.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-75",style:{width:`${o}%`}})}),jsxRuntime.jsx("input",{type:"range",min:0,max:r??0,step:.05,value:t,onChange:s,disabled:!r,className:chunkYWPIPAUQ_cjs.cn("relative h-3 w-full cursor-pointer appearance-none bg-transparent","[&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3","[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:shadow","[&::-webkit-slider-thumb]:opacity-0","hover:[&::-webkit-slider-thumb]:opacity-100","focus:[&::-webkit-slider-thumb]:opacity-100","[&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:w-3","[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0","[&::-moz-range-thumb]:bg-primary","[&::-moz-range-thumb]:opacity-0","hover:[&::-moz-range-thumb]:opacity-100","focus:[&::-moz-range-thumb]:opacity-100"),"aria-label":"Seek"})]})}a(SeekBar,"SeekBar");var NativeAudio=React40__namespace.default.forwardRef(a(function({src:r,muted:t,onLoaded:s,onTimeUpdate:n,onEnded:o,onError:i},c){return jsxRuntime.jsx("audio",{ref:c,src:r,muted:t,preload:"metadata",onLoadedMetadata:s,onTimeUpdate:n,onEnded:o,onError:i,className:"hidden"})},"NativeAudio2"));function formatBytes(e){if(!e||e<=0)return;const r=["B","KB","MB","GB"],t=Math.min(r.length-1,Math.floor(Math.log(e)/Math.log(1024)));return`${(e/Math.pow(1024,t)).toFixed(t===0?0:1)} ${r[t]}`}a(formatBytes,"formatBytes");function inferTypeLabel(e,r){if(e){const t=e.lastIndexOf(".");if(t>0&&t<e.length-1)return e.slice(t+1).toUpperCase()}if(r){const t=r.indexOf("/");if(t>0)return r.slice(t+1).toUpperCase()}return"VIDEO"}a(inferTypeLabel,"inferTypeLabel");function VideoPlayer({src:e,poster:r,title:t,size:s,mimeType:n,className:o,maxHeight:i=420,loop:c=!1,muted:u=!1,autoPlay:d=!1,controls:l=!0,showMeta:x,downloadable:m,onDownload:f}){const[p,g]=React40.useState(!1);if(React40.useEffect(()=>{g(!1)},[e]),p)return jsxRuntime.jsx(MediaErrorBanner,{kind:"video",url:e,filename:t,className:o});const v=d&&c&&!l,y=x??(l&&!v),j=m??y,h=formatBytes(s),w=inferTypeLabel(t,n);return v?jsxRuntime.jsx("video",{src:e,poster:r,controls:!1,loop:!0,muted:!0,autoPlay:!0,playsInline:!0,onError:a(()=>g(!0),"onError"),className:chunkYWPIPAUQ_cjs.cn("rounded-xl bg-black object-contain",o),style:{maxHeight:i,maxWidth:"100%"}}):jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex w-full flex-col overflow-hidden rounded-xl border border-border/70","bg-gradient-to-b from-background to-muted/30 shadow-sm","transition-colors hover:border-border",o),children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-black",children:jsxRuntime.jsx("video",{src:e,poster:r,controls:l,loop:c,muted:u||d,autoPlay:d,playsInline:!0,preload:"metadata",onError:a(()=>g(!0),"onError"),className:"block w-full",style:{maxHeight:i,maxWidth:"100%"}})}),y&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/50 px-3 py-1.5 text-[11px] leading-none text-muted-foreground",children:[t&&jsxRuntime.jsx("span",{className:"truncate font-medium text-foreground/80",title:t,children:t}),t&&jsxRuntime.jsx("span",{className:"shrink-0 text-muted-foreground/60",children:"\xB7"}),jsxRuntime.jsx("span",{className:"shrink-0 font-medium uppercase tracking-wide",children:w}),h&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{"aria-hidden":!0,className:"inline-block h-[3px] w-[3px] shrink-0 rounded-full bg-muted-foreground/40"}),jsxRuntime.jsx("span",{className:"shrink-0 tabular-nums",children:h})]}),jsxRuntime.jsx("span",{className:"flex-1"}),j&&(f?jsxRuntime.jsx("button",{type:"button",onClick:f,className:"inline-flex shrink-0 items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":t?`Download ${t}`:"Download video",title:t?`Download ${t}`:"Download video",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-3.5 w-3.5"})}):jsxRuntime.jsx("a",{href:e,download:t??!0,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":t?`Download ${t}`:"Download video",title:t?`Download ${t}`:"Download video",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-3.5 w-3.5"})}))]})]})}a(VideoPlayer,"VideoPlayer");var WAVE_BARS=24;function VoiceBubble({src:e,durationSeconds:r,className:t,isOwn:s=!1}){const n=React40.useRef(null),[o,i]=React40.useState(!1),[c,u]=React40.useState(0),[d,l]=React40.useState(r),[x,m]=React40.useState(!1);React40.useEffect(()=>{u(0),i(!1),m(!1),l(r)},[e]),React40.useEffect(()=>{r!=null&&Number.isFinite(r)&&l(h=>h??r)},[r]);const f=React40.useCallback(()=>{const h=n.current;h&&Number.isFinite(h.duration)&&l(h.duration)},[]),p=React40.useCallback(()=>{const h=n.current;h&&u(h.currentTime)},[]),g=React40.useCallback(()=>{const h=n.current;h&&(h.paused?h.play().then(()=>i(!0)).catch(()=>m(!0)):(h.pause(),i(!1)))},[]),v=React40.useMemo(()=>!d||d<=0?0:Math.min(1,c/d),[c,d]),y=React40.useMemo(()=>{const h=[];let w=0;for(let C=0;C<e.length;C++)w=w*31+e.charCodeAt(C)&4294967295;for(let C=0;C<WAVE_BARS;C++){w=w*1664525+1013904223&4294967295;const E=(w>>>0)%70+20;h.push(E)}return h},[e]),j=Math.floor(v*WAVE_BARS);return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("inline-flex max-w-[280px] items-center gap-2.5 rounded-full px-2.5 py-1.5",s?"bg-primary text-primary-foreground":"bg-muted text-foreground",t),children:[jsxRuntime.jsx("button",{type:"button",onClick:g,disabled:x,className:chunkYWPIPAUQ_cjs.cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",s?"bg-primary-foreground/20 hover:bg-primary-foreground/30":"bg-background text-foreground hover:bg-background/80","disabled:opacity-50"),"aria-label":o?"Pause voice message":"Play voice message",children:x?jsxRuntime.jsx(lucideReact.Mic,{className:"h-3.5 w-3.5"}):o?jsxRuntime.jsx(lucideReact.Pause,{className:"h-3.5 w-3.5"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"flex h-6 flex-1 items-center gap-[2px]",children:y.map((h,w)=>{const C=w<j;return jsxRuntime.jsx("span",{className:chunkYWPIPAUQ_cjs.cn("w-[2px] rounded-full transition-colors",C?s?"bg-primary-foreground":"bg-primary":s?"bg-primary-foreground/40":"bg-foreground/30"),style:{height:`${h/100*24}px`}},w)})}),jsxRuntime.jsx("span",{className:"shrink-0 text-[11px] tabular-nums opacity-80",children:formatMediaDuration(o?c:d)}),jsxRuntime.jsx("audio",{ref:n,src:e,preload:"metadata",onLoadedMetadata:f,onTimeUpdate:p,onEnded:a(()=>{i(!1),u(0)},"onEnded"),onError:a(()=>m(!0),"onError"),className:"hidden"})]})}a(VoiceBubble,"VoiceBubble");function AnimatedImagePreview({src:e,alt:r,className:t,maxHeight:s=320}){const[n,o]=React40.useState(!1);return React40.useEffect(()=>{o(!1)},[e]),n?jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex items-center gap-2 rounded-md border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",t),children:[jsxRuntime.jsx(lucideReact.ImageOff,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:"\u52A8\u56FE\u52A0\u8F7D\u5931\u8D25"})]}):jsxRuntime.jsx("img",{src:e,alt:r??"Animated image",loading:"lazy",decoding:"async",onError:a(()=>o(!0),"onError"),className:chunkYWPIPAUQ_cjs.cn("rounded-md object-contain",t),style:{maxHeight:s,maxWidth:"100%"}})}a(AnimatedImagePreview,"AnimatedImagePreview");function FunnelChart({data:e,label:r,onSelect:t,className:s,shape:n="funnel",resultLabel:o}){const[i,c]=React40__namespace.useState(null),u=Math.max(1,...e.map(l=>Math.max(0,l.value))),d=a(l=>Math.max(0,l)/u,"share");return n==="stages"?jsxRuntime.jsx(StageFunnel,{data:e,label:r,resultLabel:o,active:i,setActive:c,onSelect:t,className:s}):jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipProvider,{delayDuration:80,children:jsxRuntime.jsxs("figure",{"aria-label":r,className:chunkYWPIPAUQ_cjs.cn("w-full overflow-x-auto",s),children:[jsxRuntime.jsx("figcaption",{className:"sr-only",children:r}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("mx-auto grid min-w-[42rem] max-w-5xl items-stretch","grid-cols-[minmax(8rem,1fr)_minmax(20rem,3fr)_minmax(10rem,1fr)]",n==="bars"&&"gap-y-1"),children:e.map((l,x)=>{const m=i===l.id,f={onMouseEnter:a(()=>c(l.id),"onMouseEnter"),onMouseLeave:a(()=>c(v=>v===l.id?null:v),"onMouseLeave")},p=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"block font-medium tabular-nums",children:l.value.toLocaleString()}),l.detail&&jsxRuntime.jsx("span",{className:"block text-xs text-muted-foreground",children:l.detail})]}),g=n==="bars"?jsxRuntime.jsx(StageBar,{share:d(l.value),empty:l.value<=0,fade:x/Math.max(1,e.length),hot:m}):jsxRuntime.jsx(StageTaper,{top:d(l.value),bottom:d(x+1<e.length?e[x+1].value:l.value),fade:x/Math.max(1,e.length),hot:m});return jsxRuntime.jsxs("div",{className:"contents text-sm",children:[jsxRuntime.jsx("div",{...f,className:chunkYWPIPAUQ_cjs.cn("flex items-center justify-end rounded-l py-1 pr-3 text-right transition-colors",m?"bg-muted/50 text-foreground":"text-muted-foreground"),children:jsxRuntime.jsx("span",{className:"truncate",children:l.label})}),jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{open:m,children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:t?jsxRuntime.jsx("button",{...f,type:"button","aria-label":`${l.label} ${l.value.toLocaleString()}${l.detail?` ${l.detail}`:""}`,className:chunkYWPIPAUQ_cjs.cn("flex w-full items-center rounded-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",m&&"bg-muted/50"),onFocus:a(()=>c(l.id),"onFocus"),onBlur:a(()=>c(null),"onBlur"),onClick:a(()=>t(l.id),"onClick"),children:g}):jsxRuntime.jsx("div",{...f,className:chunkYWPIPAUQ_cjs.cn("flex w-full items-center transition-colors",m&&"bg-muted/50"),children:g})}),jsxRuntime.jsxs(chunkERURJLNK_cjs.TooltipContent,{side:"top",className:"text-xs",children:[jsxRuntime.jsx("span",{className:"block font-medium",children:l.label}),p]})]}),jsxRuntime.jsx("div",{...f,className:chunkYWPIPAUQ_cjs.cn("flex flex-col justify-center rounded-r py-1 pl-3 transition-colors",m&&"bg-muted/50"),children:p})]},l.id)})})]})})}a(FunnelChart,"FunnelChart");var stageTone={default:{fill:"from-primary/80 via-primary to-primary/80 text-primary-foreground",result:"border-primary/20 bg-primary/5 text-primary"},success:{fill:"from-success/80 via-success to-success/80 text-success-foreground",result:"border-success/20 bg-success/5 text-success"},warning:{fill:"from-warning/80 via-warning to-warning/80 text-warning-foreground",result:"border-warning/25 bg-warning/5 text-warning"},destructive:{fill:"from-destructive/80 via-destructive to-destructive/80 text-destructive-foreground",result:"border-destructive/20 bg-destructive/5 text-destructive"}};function StageFunnel({data:e,label:r,resultLabel:t,active:s,setActive:n,onSelect:o,className:i}){const c=e.filter(l=>l.tone!=="warning"&&l.tone!=="destructive"),u=e.filter(l=>l.tone==="warning"||l.tone==="destructive"),d=a(l=>({onMouseEnter:a(()=>n(l),"onMouseEnter"),onMouseLeave:a(()=>n(x=>x===l?null:x),"onMouseLeave"),onFocus:a(()=>n(l),"onFocus"),onBlur:a(()=>n(null),"onBlur")}),"interaction");return jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipProvider,{delayDuration:80,children:jsxRuntime.jsxs("figure",{"aria-label":r,className:chunkYWPIPAUQ_cjs.cn("w-full",i),children:[jsxRuntime.jsx("figcaption",{className:"sr-only",children:r}),jsxRuntime.jsxs("div",{className:"mx-auto max-w-5xl",children:[jsxRuntime.jsx("div",{className:"flex flex-col items-center gap-1.5",children:c.map((l,x)=>{const m=s===l.id,f=l.value<=0,p=stageTone[l.tone??"default"],g=c.length<=1?1:1-x/(c.length-1)*.5,v=`${l.label} ${l.value.toLocaleString()}${l.detail?` ${l.detail}`:""}`,y=jsxRuntime.jsxs("span",{className:"relative z-10 flex w-full min-w-0 items-center justify-between gap-3 px-[9%]",children:[jsxRuntime.jsx("span",{className:"truncate text-sm font-medium sm:text-base",children:l.label}),jsxRuntime.jsxs("span",{className:"flex shrink-0 items-baseline gap-2",children:[jsxRuntime.jsx("span",{className:"text-lg font-semibold tabular-nums sm:text-xl",children:l.value.toLocaleString()}),l.detail&&jsxRuntime.jsx("span",{className:"hidden max-w-48 truncate text-xs opacity-80 sm:block",children:l.detail})]})]});return jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{open:m,children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:o?jsxRuntime.jsx("button",{...d(l.id),type:"button","aria-label":v,className:chunkYWPIPAUQ_cjs.cn("relative flex min-h-14 items-center overflow-hidden bg-gradient-to-r text-left shadow-sm transition-[filter,box-shadow] duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",p.fill,f&&"bg-muted bg-none text-muted-foreground shadow-none",m&&"shadow-md brightness-105"),style:{width:`${g*100}%`,clipPath:"polygon(3% 0, 97% 0, 93% 100%, 7% 100%)"},onClick:a(()=>o(l.id),"onClick"),children:y}):jsxRuntime.jsx("div",{...d(l.id),tabIndex:0,role:"img","aria-label":v,className:chunkYWPIPAUQ_cjs.cn("relative flex min-h-14 items-center overflow-hidden bg-gradient-to-r shadow-sm transition-[filter,box-shadow] duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",p.fill,f&&"bg-muted bg-none text-muted-foreground shadow-none",m&&"shadow-md brightness-105"),style:{width:`${g*100}%`,clipPath:"polygon(3% 0, 97% 0, 93% 100%, 7% 100%)"},children:y})}),jsxRuntime.jsxs(chunkERURJLNK_cjs.TooltipContent,{side:"top",className:"text-xs",children:[jsxRuntime.jsx("span",{className:"block font-medium",children:l.label}),jsxRuntime.jsx("span",{className:"block tabular-nums",children:l.value.toLocaleString()}),l.detail&&jsxRuntime.jsx("span",{className:"block",children:l.detail})]})]},l.id)})}),u.length>0&&jsxRuntime.jsxs("div",{className:"mt-6 border-t pt-4",children:[t&&jsxRuntime.jsx("p",{className:"mb-3 text-sm font-medium text-muted-foreground",children:t}),jsxRuntime.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:u.map(l=>{const x=s===l.id,m=stageTone[l.tone??"default"],f=`${l.label} ${l.value.toLocaleString()}${l.detail?` ${l.detail}`:""}`,p=jsxRuntime.jsxs("span",{className:"min-w-0 flex-1",children:[jsxRuntime.jsxs("span",{className:"flex items-baseline justify-between gap-3",children:[jsxRuntime.jsx("span",{className:"truncate font-medium",children:l.label}),jsxRuntime.jsx("span",{className:"shrink-0 text-lg font-semibold tabular-nums",children:l.value.toLocaleString()})]}),l.detail&&jsxRuntime.jsx("span",{className:"mt-1 block truncate text-sm text-muted-foreground",children:l.detail})]}),g=chunkYWPIPAUQ_cjs.cn("flex min-h-20 w-full items-center rounded-xl border px-4 py-3 text-left transition-[box-shadow,filter]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",m.result,x&&"brightness-105 shadow-md");return jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{open:x,children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:o?jsxRuntime.jsx("button",{...d(l.id),type:"button","aria-label":f,className:g,onClick:a(()=>o(l.id),"onClick"),children:p}):jsxRuntime.jsx("div",{...d(l.id),tabIndex:0,role:"img","aria-label":f,className:g,children:p})}),jsxRuntime.jsxs(chunkERURJLNK_cjs.TooltipContent,{side:"top",className:"text-xs",children:[jsxRuntime.jsx("span",{className:"block font-medium",children:l.label}),jsxRuntime.jsx("span",{className:"block tabular-nums",children:l.value.toLocaleString()}),l.detail&&jsxRuntime.jsx("span",{className:"block",children:l.detail})]})]},l.id)})})]})]})]})})}a(StageFunnel,"StageFunnel");function StageBar({share:e,empty:r,fade:t,hot:s}){return jsxRuntime.jsx("div",{className:"h-7 w-full rounded bg-muted/40",children:!r&&jsxRuntime.jsx("div",{className:"h-full min-w-[0.375rem] rounded bg-primary transition-[opacity]",style:{width:`${Math.max(e,0)*100}%`,opacity:s?1:.85-t*.35}})})}a(StageBar,"StageBar");function StageTaper({top:e,bottom:r,fade:t,hot:s}){const[i,c]=[e*560,r*560],u=i<1&&c<1,d=.85-t*.35;return jsxRuntime.jsx("svg",{viewBox:"0 0 600 56","aria-hidden":"true",className:"h-14 w-full text-primary",children:u?jsxRuntime.jsx("line",{x1:300-560/2,x2:300+560/2,y1:56/2,y2:56/2,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 6",opacity:s?.5:.25}):jsxRuntime.jsx("path",{d:`M ${300-i/2} 1 H ${300+i/2} L ${300+c/2} 55 H ${300-c/2} Z`,fill:"currentColor",className:"transition-[opacity]",opacity:s?1:d})})}a(StageTaper,"StageTaper");var STEPS=[1,2,2.5,5,10];function niceStep(e,r){const t=e/Math.max(1,r),s=10**Math.floor(Math.log10(t));return(STEPS.find(o=>o*s>=t)??10)*s}a(niceStep,"niceStep");function chartScale(e,r=4){const t=e.filter(c=>typeof c=="number"&&Number.isFinite(c));let s=Math.min(0,...t),n=Math.max(0,...t);s===n&&(n=s+1);const o=niceStep(n-s,r);s=Math.floor(s/o)*o,n=Math.ceil(n/o)*o;const i=[];for(let c=s;c<=n+o/2;c+=o)i.push(Number(c.toPrecision(12)));return{min:s,max:n,ticks:i}}a(chartScale,"chartScale");function scaleFraction(e,r){return(r-e.min)/(e.max-e.min)}a(scaleFraction,"scaleFraction");function waterfallBars(e){let r=0;return e.map(t=>{if(t.kind==="total")return r=t.value,{...t,from:0,to:t.value};const s=r;return r+=t.kind==="increase"?t.value:-t.value,{...t,from:s,to:r}})}a(waterfallBars,"waterfallBars");var fills={primary:"fill-primary",success:"fill-success",warning:"fill-warning",destructive:"fill-destructive",accent:"fill-chart-6",muted:"fill-muted-foreground/40"},strokes={primary:"stroke-primary",success:"stroke-success",warning:"stroke-warning",destructive:"stroke-destructive",accent:"stroke-chart-6",muted:"stroke-muted-foreground/60"},swatches={primary:"bg-primary",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive",accent:"bg-chart-6",muted:"bg-muted-foreground/40"},LEFT=64,RIGHT_EDGE=640,TOP=12,BOTTOM=210;function ComboChart({data:e,series:r,label:t,missingLabel:s,formatValue:n=a(u=>u.toLocaleString(),"formatValue"),formatAxis:o=a(u=>u.toLocaleString(),"formatAxis"),onSelect:i,className:c}){const u=r.some(h=>h.axis==="right"),d=u?RIGHT_EDGE-56:RIGHT_EDGE-8,l=a(h=>r.flatMap((w,C)=>(w.axis??"left")===h?e.map(E=>E.values[C]??null):[]),"valuesOn"),x={left:chartScale(l("left")),right:chartScale(l("right"))},m=a((h,w)=>BOTTOM-scaleFraction(x[w],h)*(BOTTOM-TOP),"y"),f=(d-LEFT)/Math.max(1,e.length),p=a(h=>LEFT+f*(h+.5),"center"),g=r.map((h,w)=>({s:h,column:w})).filter(({s:h})=>h.kind==="bar"),v=Math.min(36,f*.7/Math.max(1,g.length)),y=Math.ceil(e.length/12),j=a((h,w,C)=>`${h.detail??h.label} \xB7 ${w.label}: ${n(C,w)}`,"tip");return jsxRuntime.jsxs("figure",{"aria-label":t,className:chunkYWPIPAUQ_cjs.cn("space-y-3",c),children:[jsxRuntime.jsx("figcaption",{className:"sr-only",children:t}),jsxRuntime.jsx("ul",{className:"flex flex-wrap gap-4 text-xs text-muted-foreground",children:r.map(h=>jsxRuntime.jsxs("li",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("span",{"aria-hidden":!0,className:chunkYWPIPAUQ_cjs.cn(h.kind==="bar"?"size-2.5 rounded-sm":"h-0.5 w-3",swatches[h.tone])}),h.label]},h.key))}),jsxRuntime.jsxs("svg",{viewBox:"0 0 640 240",role:"img","aria-label":t,className:"h-auto w-full",children:[x.left.ticks.map(h=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:LEFT,x2:d,y1:m(h,"left"),y2:m(h,"left"),className:h===0?"stroke-muted-foreground/50":"stroke-border"}),jsxRuntime.jsx("text",{x:LEFT-8,y:m(h,"left")+4,textAnchor:"end",fontSize:"12",className:"fill-muted-foreground",children:o(h,"left")})]},`l${h}`)),u&&x.right.ticks.map(h=>jsxRuntime.jsx("text",{x:d+8,y:m(h,"right")+4,fontSize:"12",className:"fill-muted-foreground",children:o(h,"right")},`r${h}`)),e.map((h,w)=>g.map(({s:C,column:E},A)=>{const R=h.values[E]??null;if(R===null)return null;const N=C.axis??"left",k=m(Math.max(0,R),N),M=Math.abs(m(R,N)-m(0,N)),S=p(w)-v*g.length/2+A*v;return jsxRuntime.jsx("rect",{x:S+1,y:k,width:Math.max(1,v-2),height:Math.max(M,R===0?0:1),rx:"2",className:chunkYWPIPAUQ_cjs.cn(fills[C.tone],C.dashed&&"opacity-50",i&&"cursor-pointer hover:opacity-80"),onClick:i?()=>i(h,C):void 0,children:jsxRuntime.jsx("title",{children:j(h,C,R)})},`${h.key}-${C.key}`)})),r.map((h,w)=>{if(h.kind!=="line")return null;const C=h.axis??"left";let E="",A=!1;return e.forEach((R,N)=>{const k=R.values[w]??null;if(k===null){A=!1;return}E+=`${A?"L":"M"}${p(N)},${m(k,C)}`,A=!0}),jsxRuntime.jsxs("g",{className:strokes[h.tone],children:[jsxRuntime.jsx("path",{d:E,fill:"none",strokeWidth:"2.5",strokeLinejoin:"round",strokeDasharray:h.dashed?"6 4":void 0}),e.map((R,N)=>{const k=R.values[w]??null;return k===null?null:jsxRuntime.jsx("circle",{cx:p(N),cy:m(k,C),r:"3.5",strokeWidth:"2",className:chunkYWPIPAUQ_cjs.cn("fill-background",i&&"cursor-pointer"),onClick:i?()=>i(R,h):void 0,children:jsxRuntime.jsx("title",{children:j(R,h,k)})},R.key)})]},h.key)}),e.map((h,w)=>w%y===0?jsxRuntime.jsx("text",{x:p(w),y:"230",textAnchor:"middle",fontSize:"12",className:"fill-muted-foreground",children:h.label},h.key):null)]}),jsxRuntime.jsxs("table",{className:"sr-only",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{children:t}),r.map(h=>jsxRuntime.jsx("th",{children:h.label},h.key))]})}),jsxRuntime.jsx("tbody",{children:e.map(h=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{children:h.detail??h.label}),r.map((w,C)=>{const E=h.values[C]??null;return jsxRuntime.jsx("td",{children:E===null?s:n(E,w)},w.key)})]},h.key))})]})]})}a(ComboChart,"ComboChart");var tones={total:"fill-primary",increase:"fill-success",decrease:"fill-destructive"},LEFT2=64,RIGHT=632,TOP2=24,BOTTOM2=200;function WaterfallChart({steps:e,label:r,formatValue:t=a(o=>o.toLocaleString(),"formatValue"),onSelect:s,className:n}){const o=waterfallBars(e),i=chartScale(o.flatMap(l=>[l.from,l.to])),c=a(l=>BOTTOM2-scaleFraction(i,l)*(BOTTOM2-TOP2),"y"),u=(RIGHT-LEFT2)/Math.max(1,o.length),d=Math.min(56,u*.6);return jsxRuntime.jsxs("figure",{"aria-label":r,className:chunkYWPIPAUQ_cjs.cn("space-y-2",n),children:[jsxRuntime.jsx("figcaption",{className:"sr-only",children:r}),jsxRuntime.jsxs("svg",{viewBox:"0 0 640 240",role:"img","aria-label":r,className:"h-auto w-full",children:[i.ticks.map(l=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:LEFT2,x2:RIGHT,y1:c(l),y2:c(l),className:l===0?"stroke-muted-foreground/50":"stroke-border"}),jsxRuntime.jsx("text",{x:LEFT2-8,y:c(l)+4,textAnchor:"end",fontSize:"12",className:"fill-muted-foreground",children:t(l)})]},l)),o.map((l,x)=>{const m=LEFT2+u*(x+.5),f=c(Math.max(l.from,l.to)),p=Math.abs(c(l.from)-c(l.to)),g=o[x+1],v=l.kind==="decrease"?-l.value:l.value;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:m-d/2,y:f,width:d,height:Math.max(p,l.value===0?0:1),rx:"2",className:chunkYWPIPAUQ_cjs.cn(tones[l.kind],s&&"cursor-pointer hover:opacity-80"),onClick:s?()=>s(l):void 0,children:jsxRuntime.jsx("title",{children:`${l.label}: ${t(v)}`})}),g&&g.kind!=="total"&&jsxRuntime.jsx("line",{x1:m+d/2,x2:m+u-d/2,y1:c(l.to),y2:c(l.to),strokeDasharray:"3 3",className:"stroke-muted-foreground/60"}),jsxRuntime.jsxs("text",{x:m,y:f-6,textAnchor:"middle",fontSize:"12",className:"fill-foreground",children:[l.kind==="total"?"":v>0?"+":"",t(v)]}),jsxRuntime.jsx("text",{x:m,y:"222",textAnchor:"middle",fontSize:"12",className:"fill-muted-foreground",children:l.label})]},l.key)})]}),jsxRuntime.jsx("ul",{className:"sr-only",children:o.map(l=>jsxRuntime.jsxs("li",{children:[l.label,":"," ",t(l.kind==="decrease"?-l.value:l.value)]},l.key))})]})}a(WaterfallChart,"WaterfallChart");var WIDTH=120,HEIGHT=32;function path(e,r,t){const s=a(c=>t<=1?WIDTH/2:c*WIDTH/(t-1),"x"),n=a(c=>HEIGHT-2-scaleFraction(r,c)*(HEIGHT-4),"y");let o="",i=!1;return e.forEach((c,u)=>{if(c===null){i=!1;return}o+=`${i?"L":"M"}${s(u).toFixed(1)},${n(c).toFixed(1)}`,i=!0}),o}a(path,"path");function Sparkline({values:e,previous:r,label:t,className:s}){const n=Math.max(e.length,r?.length??0),o=chartScale([...e,...r??[]],2);return jsxRuntime.jsxs("svg",{viewBox:`0 0 ${WIDTH} ${HEIGHT}`,preserveAspectRatio:"none",role:"img","aria-label":t,className:chunkYWPIPAUQ_cjs.cn("h-8 w-full overflow-visible",s),children:[r&&jsxRuntime.jsx("path",{d:path(r,o,n),className:"fill-none stroke-muted-foreground/40",strokeWidth:"1.5",strokeDasharray:"3 2",vectorEffect:"non-scaling-stroke"}),jsxRuntime.jsx("path",{d:path(e,o,n),className:"fill-none stroke-primary",strokeWidth:"2",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}a(Sparkline,"Sparkline");var pad=a(e=>String(e).padStart(2,"0"),"pad"),toValue=a(e=>`${e.getFullYear()}-${pad(e.getMonth()+1)}-${pad(e.getDate())}`,"toValue");function toDate(e){const r=e?.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(r)return new Date(Number(r[1]),Number(r[2])-1,Number(r[3]))}a(toDate,"toDate");var defaultDisplay=a(({start:e,end:r})=>`${e.replaceAll("-","/")} \u2013 ${r.replaceAll("-","/")}`,"defaultDisplay");function DateRangePicker({value:e,onChange:r,placeholder:t="\u5F00\u59CB\u65E5\u671F \u2013 \u7ED3\u675F\u65E5\u671F",locale:s=locale.zhCN,labels:n,weekStartsOn:o,formatDisplay:i=defaultDisplay,disabled:c,className:u,...d}){const[l,x]=React40__namespace.useState(!1),[m,f]=React40__namespace.useState(),p=m??(e?{from:toDate(e.start),to:toDate(e.end)}:void 0),g=a(v=>{x(v),v||f(void 0)},"change");return jsxRuntime.jsxs(Popover,{open:l,onOpenChange:g,children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"outline",disabled:c,...d,className:chunkYWPIPAUQ_cjs.cn("h-9 justify-between gap-2 px-3 text-left text-sm font-normal",!e&&"text-muted-foreground",u),children:[jsxRuntime.jsx("span",{className:"truncate",children:e?i(e):t}),jsxRuntime.jsx(lucideReact.CalendarRange,{className:"h-4 w-4 shrink-0 opacity-70"})]})}),jsxRuntime.jsx(PopoverContent,{align:"end",className:"w-auto p-0",children:jsxRuntime.jsx(Calendar,{locale:s,mode:"range",numberOfMonths:2,selected:p,...p?.from?{defaultMonth:p.from}:{},onSelect:a((v,y)=>{const j=m===void 0&&e?{from:y,to:void 0}:v;f(j),j?.from&&j.to&&m!==void 0&&(r({start:toValue(j.from),end:toValue(j.to)}),g(!1))},"onSelect"),...n?{labels:n}:{},...o!==void 0?{weekStartsOn:o}:{}})})]})}a(DateRangePicker,"DateRangePicker");function StageStepper({items:e,currentId:r,outcome:t="open",onSelect:s,disabled:n=!1,className:o,...i}){const c=e.findIndex(u=>u.id===r);return jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipProvider,{delayDuration:200,children:jsxRuntime.jsx("div",{role:"list",className:chunkYWPIPAUQ_cjs.cn("flex w-full items-stretch gap-1 overflow-x-auto",o),...i,children:e.map((u,d)=>{const l=c>=0&&d<c,x=d===c,m=!!(s&&u.reachable&&!n),f=x?t==="won"?"bg-success text-success-foreground":t==="lost"?"bg-destructive text-destructive-foreground":"bg-primary text-primary-foreground":l?"bg-primary/15 text-primary":"bg-muted text-muted-foreground",p=jsxRuntime.jsxs("button",{type:"button",role:"listitem","aria-current":x?"step":void 0,disabled:!m,onClick:a(()=>m&&s?.(u.id),"onClick"),className:chunkYWPIPAUQ_cjs.cn("relative flex min-w-0 flex-1 items-center justify-center gap-1.5 truncate px-3 py-1.5 text-xs font-medium transition-colors","first:rounded-l-md last:rounded-r-md",f,m&&"cursor-pointer hover:bg-primary/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",!m&&!x&&"cursor-default",u.reachable&&!x&&"ring-1 ring-inset ring-primary/40"),children:[l&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3 shrink-0","aria-hidden":!0}),jsxRuntime.jsx("span",{className:"truncate",children:u.label})]});return u.hint?jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:p}),jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipContent,{className:"max-w-xs whitespace-pre-wrap text-xs",children:u.hint})]},u.id):jsxRuntime.jsx(React40__namespace.Fragment,{children:p},u.id)})})})}a(StageStepper,"StageStepper");function KeyMetricBar({items:e,size:r="sm",className:t,...s}){const n=r==="lg",o=chunkYWPIPAUQ_cjs.cn("min-w-0 border-b border-r border-border bg-background",n?"px-4 py-3":"px-3 py-2");return jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("grid grid-cols-2 overflow-hidden rounded-lg border-l border-t border-border bg-background sm:grid-cols-3",n?"xl:grid-cols-5":"md:grid-cols-5",t),...s,children:e.map(i=>{const c=i.value===null||i.value===void 0||i.value===""?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"\u2014"}):i.value,u=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:i.label}),jsxRuntime.jsx("div",{className:chunkYWPIPAUQ_cjs.cn("truncate font-medium",n?"py-1 text-2xl font-semibold":"text-sm"),children:c}),i.hint&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:i.hint}),i.footer]});return i.onClick?jsxRuntime.jsx("button",{type:"button",onClick:i.onClick,className:chunkYWPIPAUQ_cjs.cn("text-left hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o),children:u},i.label):jsxRuntime.jsx("div",{className:o,children:u},i.label)})})}a(KeyMetricBar,"KeyMetricBar");function FilterToolbar({children:e,className:r,onReset:t,resetLabel:s,...n}){return jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("flex min-w-0 flex-col gap-3 rounded-xl border bg-card p-3 sm:flex-row sm:flex-wrap sm:items-center",r),...n,children:[e,t&&s&&jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{type:"button",variant:"ghost",size:"sm",className:"self-start sm:ml-auto",onClick:t,children:[jsxRuntime.jsx(lucideReact.X,{className:"mr-1.5 size-4","aria-hidden":!0}),s]})]})}a(FilterToolbar,"FilterToolbar");var KANBAN_DRAG_MIME="application/x-tego-kanban",MIME=KANBAN_DRAG_MIME;function KanbanBoard({children:e,label:r,navigation:t,fillHeight:s=!1}){const n=React40.useRef(null),o=React40.useRef(null),[i,c]=React40.useState({previous:!1,next:!1}),u=a(()=>{const l=n.current;if(!l)return;const x=l.scrollLeft>1,m=l.scrollLeft+l.clientWidth<l.scrollWidth-1;c(f=>f.previous===x&&f.next===m?f:{previous:x,next:m})},"measure");React40.useEffect(()=>{if(!t||!n.current||!o.current)return;const l=new ResizeObserver(u);return l.observe(n.current),l.observe(o.current),u(),()=>l.disconnect()},[e,t]);const d=a(l=>{const x=n.current;x&&x.scrollBy({left:l*Math.max(1,x.clientWidth-64),behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})},"move");return t?jsxRuntime.jsxs("div",{className:chunkYWPIPAUQ_cjs.cn("group relative min-w-0",s&&"min-h-40 flex-1"),children:[jsxRuntime.jsx("div",{ref:n,role:"region",tabIndex:0,"aria-label":r,onScroll:u,className:chunkYWPIPAUQ_cjs.cn("min-w-0 overflow-x-auto overflow-y-hidden rounded-xl [scrollbar-width:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-scrollbar]:hidden",s&&"absolute inset-0"),onKeyDown:a(l=>{l.target===l.currentTarget&&(l.key==="ArrowLeft"||l.key==="ArrowRight")&&(l.preventDefault(),d(l.key==="ArrowLeft"?-1:1))},"onKeyDown"),children:jsxRuntime.jsx("div",{ref:o,className:chunkYWPIPAUQ_cjs.cn("flex items-stretch gap-4 [&>*]:w-72 [&>*]:min-w-0 [&>*]:max-w-full [&>*]:shrink-0",s?"h-full [&>*]:h-full":"[&>*]:min-h-56"),children:e})}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",size:"icon",variant:"outline",className:"absolute left-2 top-1/2 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/95 shadow-md disabled:invisible md:opacity-0 md:group-focus-within:opacity-100 md:group-hover:opacity-100",disabled:!i.previous,"aria-label":t.previous,title:t.previous,onClick:a(()=>d(-1),"onClick"),children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{type:"button",size:"icon",variant:"outline",className:"absolute right-2 top-1/2 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/95 shadow-md disabled:invisible md:opacity-0 md:group-focus-within:opacity-100 md:group-hover:opacity-100",disabled:!i.next,"aria-label":t.next,title:t.next,onClick:a(()=>d(1),"onClick"),children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}):jsxRuntime.jsx("div",{role:"region","aria-label":r,className:"flex items-start gap-4 overflow-x-auto pb-4",children:e})}a(KanbanBoard,"KanbanBoard");function KanbanColumn({id:e,title:r,summary:t,children:s,onMove:n,disabled:o}){return jsxRuntime.jsxs(Card,{className:"w-72 shrink-0 bg-muted/30",onDragOver:a(i=>{!o&&i.dataTransfer.types.includes(MIME)&&(i.preventDefault(),i.dataTransfer.dropEffect="move")},"onDragOver"),onDrop:a(i=>{if(o)return;const c=i.dataTransfer.getData(MIME);if(c){i.preventDefault();try{const u=JSON.parse(c);typeof u.id=="string"&&typeof u.column=="string"&&u.column!==e&&n(u.id,u.column,e)}catch{}}},"onDrop"),children:[jsxRuntime.jsxs(CardHeader,{className:"space-y-2 p-3",children:[jsxRuntime.jsx(CardTitle,{className:"text-sm",children:r}),t]}),jsxRuntime.jsx(CardContent,{className:"min-h-32 space-y-3 p-3 pt-0",children:s})]})}a(KanbanColumn,"KanbanColumn");function KanbanItem({id:e,column:r,children:t,disabled:s,label:n}){return jsxRuntime.jsx(Card,{draggable:!s,"aria-label":n,className:chunkYWPIPAUQ_cjs.cn("p-3",!s&&"cursor-grab active:cursor-grabbing"),onDragStart:a(o=>{o.dataTransfer.setData(MIME,JSON.stringify({id:e,column:r})),o.dataTransfer.effectAllowed="move"},"onDragStart"),children:t})}a(KanbanItem,"KanbanItem");function ViewportLayer({children:e}){const[r,t]=React40.useState(null);return React40.useLayoutEffect(()=>{if(r)return r.showPopover(),()=>r.hidePopover()},[r]),jsxRuntime.jsx("div",{ref:t,popover:"manual",className:"pointer-events-none fixed inset-0 m-0 h-auto w-auto overflow-visible border-0 bg-transparent p-0 text-foreground",children:r&&e(r)})}a(ViewportLayer,"ViewportLayer");function ModuleNavigation({label:e,icon:r,items:t,utilityItems:s=[],current:n,onNavigate:o}){const[i,c]=React40.useState(!1),u=[...t,...s].find(d=>d.id===n);return jsxRuntime.jsx("header",{className:"shrink-0 border-b bg-background @container",children:jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipProvider,{delayDuration:300,children:jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 px-4 @[860px]:px-6",children:[jsxRuntime.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2",children:[r&&jsxRuntime.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 text-primary","aria-hidden":"true",children:r}),jsxRuntime.jsx("span",{className:"text-sm font-semibold tracking-wide",children:e})]}),jsxRuntime.jsx("nav",{"aria-label":e,className:"order-3 hidden w-full min-w-0 items-center gap-1 overflow-x-auto @[640px]:flex @[860px]:order-none @[860px]:w-auto @[860px]:flex-1",children:t.map(({id:d,label:l,href:x,icon:m})=>jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{asChild:!0,variant:"ghost",className:chunkYWPIPAUQ_cjs.cn("relative h-10 shrink-0 gap-2 rounded-none px-3 text-[13px] text-muted-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset @[860px]:h-12",n===d&&"bg-primary/5 font-semibold text-primary after:bg-primary hover:bg-primary/10 hover:text-primary"),children:jsxRuntime.jsxs("a",{href:x,"aria-current":n===d?"page":void 0,onClick:a(f=>o?.(f,d),"onClick"),children:[m,l]})},d))}),jsxRuntime.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1 border-l pl-3",children:s.map(({id:d,label:l,href:x,icon:m})=>jsxRuntime.jsxs(chunkERURJLNK_cjs.Tooltip,{children:[jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(chunkM2GCF4FZ_cjs.Button,{asChild:!0,variant:"ghost",size:"icon",className:chunkYWPIPAUQ_cjs.cn("h-8 w-8 rounded-lg text-muted-foreground",n===d&&"bg-primary/10 text-primary"),children:jsxRuntime.jsx("a",{href:x,"aria-label":l,"aria-current":n===d?"page":void 0,onClick:a(f=>o?.(f,d),"onClick"),children:m})})}),jsxRuntime.jsx(chunkERURJLNK_cjs.TooltipContent,{side:"bottom",children:l})]},d))}),jsxRuntime.jsx("div",{className:"order-3 w-full pb-2 @[640px]:hidden",children:jsxRuntime.jsxs(DropdownMenu,{open:i,onOpenChange:c,children:[jsxRuntime.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntime.jsxs(chunkM2GCF4FZ_cjs.Button,{variant:"outline",className:"h-9 w-full justify-start gap-2 rounded-lg",children:[u?.icon,u?.label??e,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"ml-auto h-4 w-4 text-muted-foreground","aria-hidden":"true"})]})}),jsxRuntime.jsx(DropdownMenuContent,{align:"start",className:"w-[var(--radix-dropdown-menu-trigger-width)]",children:t.map(({id:d,label:l,href:x,icon:m})=>jsxRuntime.jsx(DropdownMenuItem,{asChild:!0,className:chunkYWPIPAUQ_cjs.cn("gap-3 py-2.5",n===d&&"bg-primary/5 text-primary"),children:jsxRuntime.jsxs("a",{href:x,"aria-current":n===d?"page":void 0,onClick:a(f=>{o?.(f,d),c(!1)},"onClick"),children:[m,l,n===d&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-auto h-4 w-4","aria-hidden":"true"})]})},d))})]})})]})})})}a(ModuleNavigation,"ModuleNavigation"),Object.defineProperty(exports,"animations",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.animations},"get")}),Object.defineProperty(exports,"breakpoints",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.breakpoints},"get")}),Object.defineProperty(exports,"buildBadgeClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildBadgeClass},"get")}),Object.defineProperty(exports,"buildButtonClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildButtonClass},"get")}),Object.defineProperty(exports,"buildCardClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildCardClass},"get")}),Object.defineProperty(exports,"buildFocusableClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildFocusableClass},"get")}),Object.defineProperty(exports,"buildGridClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildGridClass},"get")}),Object.defineProperty(exports,"buildInputClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildInputClass},"get")}),Object.defineProperty(exports,"buildSkeletonClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildSkeletonClass},"get")}),Object.defineProperty(exports,"buildTableClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.buildTableClass},"get")}),Object.defineProperty(exports,"chatBubbles",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.chatBubbles},"get")}),Object.defineProperty(exports,"colors",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.colors},"get")}),Object.defineProperty(exports,"combineTokens",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.combineTokens},"get")}),Object.defineProperty(exports,"designTokens",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.designTokens},"get")}),Object.defineProperty(exports,"focusRing",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.focusRing},"get")}),Object.defineProperty(exports,"getAnimation",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getAnimation},"get")}),Object.defineProperty(exports,"getContainerClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getContainerClass},"get")}),Object.defineProperty(exports,"getIconSize",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getIconSize},"get")}),Object.defineProperty(exports,"getSpacing",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getSpacing},"get")}),Object.defineProperty(exports,"getStateStyle",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getStateStyle},"get")}),Object.defineProperty(exports,"getStatusBadgeVariant",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getStatusBadgeVariant},"get")}),Object.defineProperty(exports,"getStatusColor",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getStatusColor},"get")}),Object.defineProperty(exports,"getTruncateClass",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getTruncateClass},"get")}),Object.defineProperty(exports,"getTypography",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.getTypography},"get")}),Object.defineProperty(exports,"iconSizes",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.iconSizes},"get")}),Object.defineProperty(exports,"interactions",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.interactions},"get")}),Object.defineProperty(exports,"layout",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.layout},"get")}),Object.defineProperty(exports,"presets",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.presets},"get")}),Object.defineProperty(exports,"radius",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.radius},"get")}),Object.defineProperty(exports,"shadows",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.shadows},"get")}),Object.defineProperty(exports,"spacing",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.spacing},"get")}),Object.defineProperty(exports,"states",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.states},"get")}),Object.defineProperty(exports,"surfaces",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.surfaces},"get")}),Object.defineProperty(exports,"transitions",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.transitions},"get")}),Object.defineProperty(exports,"truncate",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.truncate},"get")}),Object.defineProperty(exports,"typography",{enumerable:!0,get:a(function(){return chunkUQZZ6WIZ_cjs.typography},"get")}),Object.defineProperty(exports,"Alert",{enumerable:!0,get:a(function(){return chunkGZXKQ2K6_cjs.Alert},"get")}),Object.defineProperty(exports,"AlertDescription",{enumerable:!0,get:a(function(){return chunkGZXKQ2K6_cjs.AlertDescription},"get")}),Object.defineProperty(exports,"AlertTitle",{enumerable:!0,get:a(function(){return chunkGZXKQ2K6_cjs.AlertTitle},"get")}),Object.defineProperty(exports,"Badge",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Badge},"get")}),Object.defineProperty(exports,"Input",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Input},"get")}),Object.defineProperty(exports,"Label",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Label},"get")}),Object.defineProperty(exports,"Select",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Select},"get")}),Object.defineProperty(exports,"SelectContent",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectContent},"get")}),Object.defineProperty(exports,"SelectGroup",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectGroup},"get")}),Object.defineProperty(exports,"SelectItem",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectItem},"get")}),Object.defineProperty(exports,"SelectLabel",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectLabel},"get")}),Object.defineProperty(exports,"SelectTrigger",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectTrigger},"get")}),Object.defineProperty(exports,"SelectValue",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.SelectValue},"get")}),Object.defineProperty(exports,"Switch",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Switch},"get")}),Object.defineProperty(exports,"Textarea",{enumerable:!0,get:a(function(){return chunkMTA2XHQG_cjs.Textarea},"get")}),Object.defineProperty(exports,"Button",{enumerable:!0,get:a(function(){return chunkM2GCF4FZ_cjs.Button},"get")}),Object.defineProperty(exports,"SummaryBarChart",{enumerable:!0,get:a(function(){return chunkSLTTRXOU_cjs.SummaryBarChart},"get")}),Object.defineProperty(exports,"SummaryDistributionChart",{enumerable:!0,get:a(function(){return chunkSLTTRXOU_cjs.SummaryDistributionChart},"get")}),Object.defineProperty(exports,"SummaryLineChart",{enumerable:!0,get:a(function(){return chunkSLTTRXOU_cjs.SummaryLineChart},"get")}),Object.defineProperty(exports,"SummaryPieChart",{enumerable:!0,get:a(function(){return chunkSLTTRXOU_cjs.SummaryPieChart},"get")}),Object.defineProperty(exports,"SummaryTrendChart",{enumerable:!0,get:a(function(){return chunkSLTTRXOU_cjs.SummaryTrendChart},"get")}),Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:a(function(){return chunkERURJLNK_cjs.Tooltip},"get")}),Object.defineProperty(exports,"TooltipContent",{enumerable:!0,get:a(function(){return chunkERURJLNK_cjs.TooltipContent},"get")}),Object.defineProperty(exports,"TooltipProvider",{enumerable:!0,get:a(function(){return chunkERURJLNK_cjs.TooltipProvider},"get")}),Object.defineProperty(exports,"TooltipTrigger",{enumerable:!0,get:a(function(){return chunkERURJLNK_cjs.TooltipTrigger},"get")}),Object.defineProperty(exports,"TagInput",{enumerable:!0,get:a(function(){return chunkON32SVTM_cjs.TagPickerInput},"get")}),Object.defineProperty(exports,"Kbd",{enumerable:!0,get:a(function(){return chunkRWEJPTVG_cjs.Kbd},"get")}),Object.defineProperty(exports,"cn",{enumerable:!0,get:a(function(){return chunkYWPIPAUQ_cjs.cn},"get")}),exports.AnimatedImagePreview=AnimatedImagePreview,exports.AppError=AppError,exports.AudioPlayer=AudioPlayer,exports.Avatar=Avatar,exports.AvatarFallback=AvatarFallback,exports.AvatarImage=AvatarImage,exports.BaseAvatarImage=AvatarImage2,exports.BoardColumnsSkeleton=BoardColumnsSkeleton,exports.Breadcrumb=Breadcrumb,exports.CHART_SERIES_TOKENS=CHART_SERIES_TOKENS,exports.Calendar=Calendar,exports.CandidateCardSkeleton=CandidateCardSkeleton,exports.CapabilityTag=CapabilityTag,exports.Card=Card,exports.CardContent=CardContent,exports.CardDescription=CardDescription,exports.CardFooter=CardFooter,exports.CardHeader=CardHeader,exports.CardListSkeleton=CardListSkeleton,exports.CardTitle=CardTitle,exports.Carousel=Carousel,exports.CarouselContent=CarouselContent,exports.CarouselItem=CarouselItem,exports.CarouselNext=CarouselNext,exports.CarouselPrevious=CarouselPrevious,exports.CascadingTreeSelect=CascadingTreeSelect,exports.Checkbox=Checkbox,exports.Collapsible=Collapsible,exports.CollapsibleContent=CollapsibleContent,exports.CollapsibleTrigger=CollapsibleTrigger,exports.ComboChart=ComboChart,exports.Combobox=Combobox,exports.ComponentSuspenseErrorBoundary=ComponentSuspenseErrorBoundary,exports.ConfirmDialog=ConfirmDialog,exports.ContextMenu=ContextMenu,exports.ContextMenuCheckboxItem=ContextMenuCheckboxItem,exports.ContextMenuContent=ContextMenuContent,exports.ContextMenuGroup=ContextMenuGroup,exports.ContextMenuItem=ContextMenuItem,exports.ContextMenuLabel=ContextMenuLabel,exports.ContextMenuPortal=ContextMenuPortal,exports.ContextMenuSeparator=ContextMenuSeparator,exports.ContextMenuSub=ContextMenuSub,exports.ContextMenuSubContent=ContextMenuSubContent,exports.ContextMenuSubTrigger=ContextMenuSubTrigger,exports.ContextMenuTrigger=ContextMenuTrigger,exports.DataTable=DataTable,exports.DatePicker=DatePicker,exports.DateRangePicker=DateRangePicker,exports.DeltaIndicator=DeltaIndicator,exports.Dialog=Dialog,exports.DialogClose=DialogClose,exports.DialogContent=DialogContent,exports.DialogDescription=DialogDescription,exports.DialogFooter=DialogFooter,exports.DialogHeader=DialogHeader,exports.DialogOverlay=DialogOverlay,exports.DialogPortal=DialogPortal,exports.DialogTitle=DialogTitle,exports.DialogTrigger=DialogTrigger,exports.DocFileIcon=DocFileIcon,exports.Drawer=Drawer,exports.DrawerBody=DrawerBody,exports.DrawerClose=DrawerClose,exports.DrawerContent=DrawerContent,exports.DrawerDescription=DrawerDescription,exports.DrawerFooter=DrawerFooter,exports.DrawerHeader=DrawerHeader,exports.DrawerOverlay=DrawerOverlay,exports.DrawerPortal=DrawerPortal,exports.DrawerTitle=DrawerTitle,exports.DrawerTrigger=DrawerTrigger,exports.DropdownMenu=DropdownMenu,exports.DropdownMenuCheckboxItem=DropdownMenuCheckboxItem,exports.DropdownMenuContent=DropdownMenuContent,exports.DropdownMenuGroup=DropdownMenuGroup,exports.DropdownMenuItem=DropdownMenuItem,exports.DropdownMenuLabel=DropdownMenuLabel,exports.DropdownMenuPortal=DropdownMenuPortal,exports.DropdownMenuRadioGroup=DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=DropdownMenuRadioItem,exports.DropdownMenuSeparator=DropdownMenuSeparator,exports.DropdownMenuShortcut=DropdownMenuShortcut,exports.DropdownMenuSub=DropdownMenuSub,exports.DropdownMenuSubContent=DropdownMenuSubContent,exports.DropdownMenuSubTrigger=DropdownMenuSubTrigger,exports.DropdownMenuTrigger=DropdownMenuTrigger,exports.ERROR_MESSAGE_KEYS=ERROR_MESSAGE_KEYS,exports.EmployeeCardSkeleton=EmployeeCardSkeleton,exports.EmptyState=EmptyState,exports.EnhancedInput=EnhancedInput,exports.ErrorBoundary=ErrorBoundary,exports.ErrorCategory=ErrorCategory,exports.ErrorDisplayMode=ErrorDisplayMode,exports.ErrorRecoveryStrategy=ErrorRecoveryStrategy,exports.ErrorSeverity=ErrorSeverity,exports.FALLBACK_ERROR_MESSAGES=FALLBACK_ERROR_MESSAGES,exports.FileListRow=FileListRow,exports.FileUpload=FileUpload,exports.FilterChipRail=FilterChipRail,exports.FilterToolbar=FilterToolbar,exports.FormWizard=FormWizard,exports.FormWizardNavigation=FormWizardNavigation,exports.FormWizardStep=FormWizardStep,exports.FunnelChart=FunnelChart,exports.HeroSearch=HeroSearch,exports.HoverCard=HoverCard,exports.HoverCardContent=HoverCardContent,exports.HoverCardTrigger=HoverCardTrigger,exports.IDENTITY_HUES=IDENTITY_HUES,exports.IdentityAvatar=IdentityAvatar,exports.InfoTip=InfoTip,exports.KANBAN_DRAG_MIME=KANBAN_DRAG_MIME,exports.KanbanBoard=KanbanBoard,exports.KanbanColumn=KanbanColumn,exports.KanbanItem=KanbanItem,exports.KeyMetricBar=KeyMetricBar,exports.LibraryCardSkeleton=LibraryCardSkeleton,exports.ListRowsSkeleton=ListRowsSkeleton,exports.Loading=Loading,exports.Logo=Logo,exports.MarkdownRenderer=MarkdownRenderer,exports.MetricValue=MetricValue,exports.ModuleNavigation=ModuleNavigation,exports.OptimizedImage=OptimizedImage,exports.PageHeader=PageHeader,exports.PageHeaderSkeleton=PageHeaderSkeleton,exports.PageShell=PageShell,exports.PageSuspenseErrorBoundary=PageSuspenseErrorBoundary,exports.Pagination=Pagination,exports.PanelHeader=PanelHeader,exports.PdfFileIcon=PdfFileIcon,exports.Popover=Popover,exports.PopoverAnchor=PopoverAnchor,exports.PopoverContent=PopoverContent,exports.PopoverTrigger=PopoverTrigger,exports.Progress=Progress,exports.PromptDialog=PromptDialog,exports.RadioGroup=RadioGroup,exports.RadioGroupItem=RadioGroupItem,exports.ResizeHandle=ResizeHandle,exports.SCROLLBAR_GUTTER=SCROLLBAR_GUTTER,exports.ScrollArea=ScrollArea,exports.ScrollBar=ScrollBar,exports.SectionSuspenseErrorBoundary=SectionSuspenseErrorBoundary,exports.Segmented=Segmented,exports.Separator=Separator3,exports.Skeleton=Skeleton,exports.SkeletonCard=SkeletonCard,exports.SkeletonList=SkeletonList,exports.SkeletonTable=SkeletonTable,exports.SkillCardSkeleton=SkillCardSkeleton,exports.Slider=Slider,exports.SortableTableHead=SortableTableHead,exports.Sparkline=Sparkline,exports.StageStepper=StageStepper,exports.StatCardSkeleton=StatCardSkeleton,exports.StatsGridSkeleton=StatsGridSkeleton,exports.StatusBadge=StatusBadge,exports.StatusDot=StatusDot,exports.SuspenseErrorBoundary=SuspenseErrorBoundary,exports.Table=Table,exports.TableBody=TableBody,exports.TableCaption=TableCaption,exports.TableCell=TableCell,exports.TableFooter=TableFooter,exports.TableHead=TableHead,exports.TableHeader=TableHeader,exports.TableRow=TableRow,exports.TableSkeleton=TableSkeleton,exports.Tabs=Tabs,exports.TabsContent=TabsContent,exports.TabsList=TabsList,exports.TabsTrigger=TabsTrigger,exports.TaskEntryTile=TaskEntryTile,exports.Toast=Toast,exports.ToastAction=ToastAction,exports.ToastClose=ToastClose,exports.ToastDescription=ToastDescription,exports.ToastErrorNotificationHandler=ToastErrorNotificationHandler,exports.ToastProvider=ToastProvider,exports.ToastTitle=ToastTitle,exports.ToastViewport=ToastViewport,exports.ToastViewportOverride=ToastViewportOverride,exports.Toaster=Toaster,exports.ToggleGroup=ToggleGroup,exports.ToggleGroupItem=ToggleGroupItem,exports.TopProgressBar=TopProgressBar,exports.Tree=Tree,exports.UserPicker=UserPicker,exports.VideoPlayer=VideoPlayer,exports.ViewportLayer=ViewportLayer,exports.VoiceBubble=VoiceBubble,exports.WaterfallChart=WaterfallChart,exports.buildChartTheme=buildChartTheme,exports.chartScale=chartScale,exports.contentTabsButtonActiveClassName=contentTabsButtonActiveClassName,exports.contentTabsButtonClassName=contentTabsButtonClassName,exports.contentTabsButtonInactiveClassName=contentTabsButtonInactiveClassName,exports.contentTabsListClassName=contentTabsListClassName,exports.contentTabsTriggerClassName=contentTabsTriggerClassName,exports.contrastRatio=contrastRatio,exports.createErrorMessagesHook=createErrorMessagesHook,exports.createToastErrorNotificationHandler=createToastErrorNotificationHandler,exports.createToastHelpers=createToastHelpers,exports.datePickerLocales=datePickerLocales,exports.formatFileSize=formatFileSize,exports.formatMediaDuration=formatMediaDuration,exports.getCapabilityTagTone=getCapabilityTagTone,exports.getCascadingSelectionState=getCascadingSelectionState,exports.getFileExtension=getFileExtension,exports.getFileIconConfig=getFileIconConfig,exports.hslToRgb=hslToRgb,exports.hslTripletToRgb=hslTripletToRgb,exports.identityHue=identityHue,exports.identityStyle=identityStyle,exports.normalizeCascadingSelection=normalizeCascadingSelection,exports.parseHslTriplet=parseHslTriplet,exports.relativeLuminance=relativeLuminance,exports.sandboxedFrameHtml=sandboxedFrameHtml,exports.sanitizeTrustedHtml=sanitizeTrustedHtml,exports.sanitizeTrustedSvg=sanitizeTrustedSvg,exports.scaleFraction=scaleFraction,exports.setSandboxedFrameSrcDoc=setSandboxedFrameSrcDoc,exports.showErrorToast=showErrorToast,exports.showInfoToast=showInfoToast,exports.showSuccessToast=showSuccessToast,exports.showWarningToast=showWarningToast,exports.toast=toast,exports.toasts=toasts,exports.toggleCascadingSelection=toggleCascadingSelection,exports.tokenColor=tokenColor,exports.useCarousel=useCarousel,exports.useChartTheme=useChartTheme,exports.useConfirm=useConfirm,exports.useErrorHandler=useErrorHandler,exports.useErrorMessages=useErrorMessages,exports.usePrompt=usePrompt,exports.useResizableWidth=useResizableWidth,exports.useSuspenseErrorHandler=useSuspenseErrorHandler,exports.useToast=useToast,exports.waterfallBars=waterfallBars,exports.withErrorBoundary=withErrorBoundary,exports.withSuspenseErrorBoundary=withSuspenseErrorBoundary;
|