@conscia-labs/design-system 1.2.2 → 1.3.0

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.
@@ -0,0 +1,2 @@
1
+ import{a as Re,b as Ne,c as je,d as qe,e as Ue,f as Ye}from"./chunk-QXDSBJYQ.js";import{$a as st,$b as Ot,Ac as Ut,Bb as ht,Bc as Yt,Cb as xt,Db as Rt,Eb as Nt,K as we,Kb as yt,L as Qe,Lb as wt,M as Xe,Mb as St,N as Je,Nb as Ct,Ob as Pt,P as Se,Pb as kt,Q as Ze,R as et,S as tt,Sb as Tt,Tb as Dt,Ub as It,Vb as At,Wa as at,Wb as Et,Xb as Mt,Ya as ot,Yb as Lt,Za as rt,Zb as Bt,_a as nt,ac as zt,bc as Ht,cc as Vt,eb as se,g as ye,gb as it,hb as lt,hc as _t,i as G,j as ee,lb as dt,mb as ct,nb as pt,nc as ie,ob as ut,oc as Wt,pb as mt,pc as $t,qc as Gt,rb as bt,sb as gt,sc as Kt,tb as ft,tc as Ft,wb as vt,xc as jt,yc as qt}from"./chunk-W4C7FZYO.js";import{a as n}from"./chunk-RFPKBIDP.js";import{ChevronLeft as Ra,ChevronRight as Na}from"lucide-react";import{jsx as O,jsxs as te}from"react/jsx-runtime";function Qt({currentPage:e,pageCount:t,totalLabel:a,onPrevious:o,onNext:r,onPageChange:s,pageSize:i,pageSizeOptions:d=[10,25,50],onPageSizeChange:p,className:m,...v}){return te("div",{"data-slot":"pagination-controls",className:n("flex flex-col gap-2 border-t border-border-subtle px-5 py-3 text-sm text-text-supporting sm:flex-row sm:items-center sm:justify-between",m),...v,children:[te("div",{className:"flex flex-wrap items-center gap-3",children:[O("span",{children:a}),i&&p?te("div",{className:"flex items-center gap-2",children:[O("span",{className:"text-[var(--ds-metadata)]",children:"Rows"}),te(at,{value:String(i),onValueChange:c=>p(Number(c)),children:[O(rt,{size:"sm",className:"w-[4.5rem]","aria-label":"Rows per page",children:O(ot,{})}),O(nt,{children:d.map(c=>O(st,{value:String(c),children:c},c))})]})]}):null]}),te("div",{className:"flex items-center gap-1",children:[O(ee,{type:"button",variant:"outline",size:"sm",className:"size-8","aria-label":"Previous page",onClick:o??(()=>s?.(e-1)),disabled:e<=1,children:O(Ra,{})}),s?ya(e,t).map((c,h)=>c==="ellipsis"?O("span",{className:"flex size-8 items-center justify-center text-text-supporting","aria-hidden":"true",children:"\u2026"},`ellipsis-${h}`):O(ee,{type:"button",variant:c===e?"secondary":"ghost",size:"sm",className:"size-8","aria-label":`Page ${c}`,"aria-current":c===e?"page":void 0,onClick:()=>s(c),children:c},c)):te("span",{className:"px-2 text-[var(--ds-metadata)]",children:["Page ",e," of ",t]}),O(ee,{type:"button",variant:"outline",size:"sm",className:"size-8","aria-label":"Next page",onClick:r??(()=>s?.(e+1)),disabled:e>=t,children:O(Na,{})})]})]})}function ya(e,t){if(t<=7)return Array.from({length:t},(s,i)=>i+1);let a=new Set([1,t,e-1,e,e+1]),o=Array.from(a).filter(s=>s>0&&s<=t).sort((s,i)=>s-i),r=[];return o.forEach((s,i)=>{i&&s-o[i-1]>1&&r.push("ellipsis"),r.push(s)}),r}import*as ke from"react";import{flexRender as Ce,getCoreRowModel as wa,getPaginationRowModel as Sa,getSortedRowModel as Ca,useReactTable as Pa}from"@tanstack/react-table";import{ArrowDown as ka,ArrowUp as Ta,ChevronsUpDown as Da}from"lucide-react";import{Fragment as Ia,jsx as I,jsxs as Pe}from"react/jsx-runtime";function Xt({data:e,columns:t,getRowId:a,getRowLabel:o,onRowClick:r,isRowClickable:s,rowActions:i,selectedIds:d,onSelectionChange:p,sorting:m,onSortingChange:v,manualSorting:c=!1,pagination:h,onPaginationChange:l,manualPagination:w=!1,pageCount:P,rowCount:k,pageSizeOptions:C,totalLabel:R,mobileRow:x,caption:A,empty:V,className:b}){let D=ke.useMemo(()=>{let g={};return d?.forEach(u=>{g[u]=!0}),g},[d]),$=ke.useMemo(()=>{let g=[];return p&&g.push({id:"select",enableSorting:!1,header:({table:u})=>I(we,{"aria-label":"Select all rows on this page",checked:u.getIsAllPageRowsSelected(),indeterminate:u.getIsSomePageRowsSelected()&&!u.getIsAllPageRowsSelected(),onCheckedChange:S=>u.toggleAllPageRowsSelected(!!S)}),cell:({row:u})=>I(we,{"aria-label":`Select ${o?.(u.original)??u.id}`,checked:u.getIsSelected(),onCheckedChange:S=>u.toggleSelected(!!S),onClick:S=>S.stopPropagation()}),meta:{className:"w-10"}}),g.push(...t.map(u=>({id:u.id,...u.accessor?{accessorFn:u.accessor}:{},enableSorting:u.sortable??!1,header:()=>u.header,cell:({row:S})=>u.cell(S.original),meta:{className:u.className,label:typeof u.header=="string"?u.header:u.id}}))),i&&g.push({id:"actions",enableSorting:!1,header:"Actions",cell:({row:u})=>I("div",{onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),children:i(u.original)}),meta:{className:"w-12 text-right"}}),g},[t,o,p,i]),ne=Pa({data:e,columns:$,getRowId:g=>a(g),state:{rowSelection:D,...m?{sorting:m}:{},...h?{pagination:h}:{}},enableRowSelection:!!p,onRowSelectionChange:g=>{if(!p)return;let u=typeof g=="function"?g(D):g;p(new Set(Object.keys(u).filter(S=>u[S])))},onSortingChange:g=>{v&&v(typeof g=="function"?g(m??[]):g)},onPaginationChange:g=>{!l||!h||l(typeof g=="function"?g(h):g)},manualSorting:c,manualPagination:w,pageCount:P,rowCount:k,getCoreRowModel:wa(),getSortedRowModel:c?void 0:Ca(),getPaginationRowModel:h&&!w?Sa():void 0});if(!e.length&&V)return I(Ia,{children:V});let Fe=ne.getRowModel().rows,xa=!!(h&&l);return Pe("div",{"data-slot":"data-table",className:n("bg-canvas",b),children:[I("div",{className:x?"hidden md:block":void 0,children:Pe(Qe,{children:[A?I(tt,{children:A}):null,I(Xe,{children:ne.getHeaderGroups().map(g=>I(Se,{children:g.headers.map(u=>{let S=u.column.columnDef.meta,be=u.column.getCanSort(),ge=u.column.getIsSorted();return I(Ze,{className:S?.className,"aria-sort":be?ge==="asc"?"ascending":ge==="desc"?"descending":"none":void 0,children:u.isPlaceholder?null:be?Pe(G,{type:"button",variant:"ghost",size:"sm",className:"-ml-2 h-8 gap-1.5 px-2 text-[var(--ds-metadata)] font-semibold uppercase text-text-supporting hover:text-text-primary",onClick:u.column.getToggleSortingHandler(),"aria-label":`Sort by ${S?.label??u.column.id}`,children:[Ce(u.column.columnDef.header,u.getContext()),ge==="asc"?I(Ta,{className:"size-3.5"}):ge==="desc"?I(ka,{className:"size-3.5"}):I(Da,{className:"size-3.5 opacity-60"})]}):Ce(u.column.columnDef.header,u.getContext())},u.id)})},g.id))}),I(Je,{children:Fe.map(g=>{let u=!!(r&&(s?.(g.original)??!0));return I(Se,{"data-selected":g.getIsSelected()?"true":void 0,"aria-selected":g.getIsSelected()?"true":void 0,tabIndex:u?0:void 0,"aria-label":u?o?.(g.original)??g.id:void 0,className:n(u&&"cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-focus/45"),onClick:()=>{u&&r?.(g.original)},onKeyDown:S=>{!u||S.key!=="Enter"&&S.key!==" "||(S.preventDefault(),r?.(g.original))},children:g.getVisibleCells().map(S=>{let be=S.column.columnDef.meta;return I(et,{className:be?.className,children:Ce(S.column.columnDef.cell,S.getContext())},S.id)})},g.id)})})]})}),x?I("div",{className:"divide-y divide-border-subtle md:hidden",role:"list",children:Fe.map(g=>I("div",{role:"listitem",children:x(g.original)},g.id))}):null,xa?I(Qt,{currentPage:h.pageIndex+1,pageCount:Math.max(1,ne.getPageCount()),pageSize:h.pageSize,pageSizeOptions:C,totalLabel:R,onPageChange:g=>ne.setPageIndex(g-1),onPageSizeChange:g=>ne.setPageSize(g)}):null]})}import{jsx as Aa}from"react/jsx-runtime";function Io({items:e,columns:t,getRowId:a,selectedIds:o,onSelectionChange:r,onRowClick:s,getRowLabel:i,rowActions:d,caption:p,className:m}){return Aa(Xt,{data:e,columns:t.map(v=>({...v,id:v.key})),getRowId:a,selectedIds:o,onSelectionChange:r,onRowClick:s,getRowLabel:i,rowActions:d,caption:p,className:m})}import*as _ from"react";import{SearchIcon as Ea}from"lucide-react";import{jsx as E,jsxs as j}from"react/jsx-runtime";function zo({className:e,closeOnSelect:t=!0,defaultOpen:a=!1,description:o,emptyMessage:r="No commands found.",items:s,onOpenChange:i,onSelect:d,open:p,placeholder:m="Search commands...",title:v="Command menu",trigger:c,...h}){let[l,w]=_.useState(""),[P,k]=_.useState(a),C=p!==void 0,R=p??P,x=_.useMemo(()=>{let b=l.trim().toLocaleLowerCase();return b?s.filter(D=>[D.label,...D.keywords??[]].some($=>$.toLocaleLowerCase().includes(b))):s},[s,l]),A=_.useCallback(b=>{C||k(b),w(""),i?.(b)},[C,i]),V=_.useCallback(b=>{d(b),t&&A(!1)},[t,A,d]);return E("div",{"data-slot":"command-palette",className:n("contents",e),...h,children:j(it,{open:R,onOpenChange:A,children:[c?E(lt,{render:c}):null,j(dt,{showCloseButton:!1,size:"small","aria-label":typeof v=="string"?void 0:"Command menu",className:"max-w-xl gap-0 p-0",children:[j(ct,{className:"sr-only",children:[E(pt,{children:v}),o?E(ut,{children:o}):null]}),E(mt,{className:"overflow-hidden",children:j(se.Root,{items:x,filter:()=>!0,open:!0,autoHighlight:!0,inputValue:l,onInputValueChange:w,onValueChange:b=>{b&&V(b)},itemToStringLabel:b=>[b.label,...b.keywords??[]].join(" "),itemToStringValue:b=>b.id,children:[j("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4",children:[E(Ea,{"aria-hidden":"true",className:"size-4 shrink-0 text-text-supporting"}),E(se.Input,{"aria-label":"Search commands",autoFocus:!0,className:"ds-type-control h-12 min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-supporting",onKeyDown:b=>{b.key==="Escape"&&(b.preventDefault(),A(!1))},placeholder:m})]}),x.length===0?E("div",{role:"status",className:"px-3 py-8 text-center text-sm text-text-supporting",children:r}):null,E(se.List,{"aria-label":"Commands",className:"max-h-[min(24rem,calc(100vh-10rem))] overflow-y-auto p-2 outline-none",children:x.map((b,D)=>j(_.Fragment,{children:[b.group&&(D===0||x[D-1]?.group!==b.group)?E("div",{role:"presentation",className:"px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-text-supporting first:pt-1",children:b.group}):null,j(se.Item,{index:D,value:b,disabled:b.disabled,className:"data-highlighted:bg-surface-muted data-highlighted:text-text-primary relative flex min-w-0 items-start gap-3 rounded-md px-3 py-2.5 text-left outline-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[b.icon?E("span",{className:"mt-0.5 flex size-4 shrink-0 items-center justify-center text-text-supporting",children:b.icon}):null,j("span",{className:"min-w-0 flex-1",children:[E("span",{className:"block truncate text-sm font-medium",children:b.label}),b.description?E("span",{className:"mt-0.5 block truncate text-xs text-text-supporting",children:b.description}):null]}),b.shortcut?E("span",{className:"shrink-0 text-xs text-text-supporting",children:b.shortcut}):null]})]},b.id))})]})})]})]})})}import{jsx as ae,jsxs as Te}from"react/jsx-runtime";function Wo({className:e,...t}){return ae("section",{"data-slot":"data-panel",className:n("min-w-0 overflow-hidden rounded-[var(--ds-radius-surface)] border border-border-default bg-surface text-text-primary shadow-[var(--ds-shadow-raised)]",e),...t})}function $o({title:e,description:t,status:a,actions:o,className:r,...s}){return Te("header",{"data-slot":"data-panel-header",className:n("flex min-w-0 items-start justify-between gap-4 border-b border-border-subtle px-[var(--ds-surface-padding)] py-3",r),...s,children:[Te("div",{className:"min-w-0",children:[Te("div",{className:"flex flex-wrap items-center gap-2",children:[ae("h2",{className:"ds-type-card-title",children:e}),a]}),t?ae("p",{className:"ds-type-metadata mt-0.5 text-text-supporting",children:t}):null]}),o?ae("div",{className:"shrink-0",children:o}):null]})}function Go({padded:e=!1,className:t,...a}){return ae("div",{"data-slot":"data-panel-content","data-padded":e?"true":void 0,className:n(e&&"p-[var(--ds-surface-padding)]",t),...a})}function Ko({className:e,...t}){return ae("footer",{"data-slot":"data-panel-footer",className:n("border-t border-border-subtle px-[var(--ds-surface-padding)] py-3 ds-type-metadata text-text-supporting",e),...t})}import{ArrowLeft as Ma}from"lucide-react";import{jsx as La,jsxs as Ba}from"react/jsx-runtime";function Yo({label:e,className:t,...a}){return Ba("a",{"data-slot":"detail-back-link",className:n("inline-flex h-8 w-fit items-center gap-2 rounded-md px-2 text-sm font-medium text-text-supporting outline-none transition-colors hover:bg-surface-muted hover:text-text-primary focus-visible:ring-[3px] focus-visible:ring-focus/45",t),...a,children:[La(Ma,{className:"size-4","aria-hidden":"true"}),e]})}import{jsx as Jt,jsxs as Oa}from"react/jsx-runtime";function er({children:e,clearAllLabel:t="Clear all",className:a,onClearAll:o,...r}){return Oa("div",{"data-slot":"filter-bar",className:n("flex min-w-0 flex-wrap items-center gap-2 rounded-[var(--ds-radius-control)] border border-border-subtle bg-surface-muted/60 px-2 py-1.5",a),role:"group","aria-label":r["aria-label"]??"Active filters",...r,children:[Jt("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:e}),o?Jt(G,{type:"button",variant:"ghost",size:"sm",onClick:o,className:"shrink-0",children:t}):null]})}import*as N from"react";import{PanelLeftIcon as za,Search as Zt,X as Ha}from"lucide-react";import{Fragment as ja,jsx as f,jsxs as z}from"react/jsx-runtime";var De="conscia_sidebar_state",Va=3600*24*30,_a="b",Ae="conscia-sidebar-open:v1",Ie="conscia-sidebar-state-change";function ea(e){return e==="true"?!0:e==="false"?!1:null}function Wa(){if(typeof document>"u")return null;try{let a=window.localStorage.getItem(Ae),o=ea(a);if(o!==null)return o}catch{}let e=document.cookie.split("; ").find(a=>a.startsWith(`${De}=`));if(!e)return null;let t=e.slice(De.length+1);return ea(t)}function ta(e){try{window.localStorage.setItem(Ae,String(e))}catch{}document.cookie=`${De}=${e}; path=/; max-age=${Va}`,window.dispatchEvent(new Event(Ie))}function $a(e){function t(a){a.key===Ae&&e()}return window.addEventListener(Ie,e),window.addEventListener("storage",t),()=>{window.removeEventListener(Ie,e),window.removeEventListener("storage",t)}}var aa=N.createContext(null);function le(){let e=N.useContext(aa);if(!e)throw new Error("useAppShell must be used within AppShell.");return e}function Ga(e){let[t,a]=N.useState(!1);return N.useEffect(()=>{let o=window.matchMedia(e),r=()=>a(o.matches);return r(),o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[e]),t}function Ka(){let e=N.useRef(null),t=N.useCallback(r=>{let s=e.current;if(!s)return()=>{};let i=()=>r();s.addEventListener("scroll",i,{passive:!0});let d=typeof ResizeObserver>"u"?null:new ResizeObserver(r);return d?.observe(s),window.addEventListener("resize",r),()=>{s.removeEventListener("scroll",i),d?.disconnect(),window.removeEventListener("resize",r)}},[]),a=N.useCallback(()=>{let r=e.current;if(!r)return 0;let s=r.scrollTop>1,i=r.scrollHeight-r.clientHeight-r.scrollTop>1;return(s?1:0)|(i?2:0)},[]),o=N.useSyncExternalStore(t,a,()=>0);return{contentRef:e,hasScrollBefore:!!(o&1),hasScrollAfter:!!(o&2)}}function mr({defaultSidebarOpen:e=!0,headerLayout:t="split",children:a,className:o,style:r,...s}){let i=Ga("(max-width: 1023px)"),[d,p]=N.useState(e),[m,v]=N.useState("left"),[c,h]=N.useState(!1);N.useEffect(()=>{function k(){p(Wa()??e)}let C=$a(k);return queueMicrotask(k),C},[e]);let l=N.useCallback(k=>{ta(k)},[]),w=N.useCallback(()=>{if(i){h(k=>!k);return}ta(!d)},[i,d]);N.useEffect(()=>{let k=C=>{C.key.toLowerCase()===_a&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),w())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[w]);let P=N.useMemo(()=>({sidebarState:d?"expanded":"collapsed",sidebarSide:m,setSidebarSide:v,sidebarOpen:d,setSidebarOpen:l,mobileOpen:c,setMobileOpen:h,isMobile:i,toggleSidebar:w}),[i,c,l,d,m,w]);return f(aa.Provider,{value:P,children:f(yt,{delayDuration:120,children:f("div",{"data-slot":"app-shell","data-sidebar-state":d?"expanded":"collapsed","data-sidebar-side":m,"data-header-layout":t,suppressHydrationWarning:!0,className:n("group/shell min-h-svh bg-canvas text-text-primary","[--ds-app-sidebar-width:var(--ds-sidebar-width)] [--ds-app-sidebar-width-mobile:var(--ds-sidebar-width-mobile)] data-[sidebar-state=collapsed]:[--ds-app-sidebar-width:3.5rem]",o),style:r,...s,children:a})})})}function br({side:e="left",variant:t="auto",treatment:a,className:o,children:r,title:s="Application navigation",description:i="Primary product navigation.","aria-label":d,"aria-labelledby":p,...m}){let{mobileOpen:v,setMobileOpen:c,setSidebarSide:h}=le();return N.useEffect(()=>{h(e)},[h,e]),z(ja,{children:[f(vt,{side:e,open:v,onOpenChange:c,children:z(ht,{side:e,"data-sidebar-variant":t,"data-sidebar-treatment":a,className:"w-[var(--ds-sidebar-width-mobile)] border-sidebar-border bg-sidebar-canvas p-0 text-sidebar-primary-text [&>[data-slot=sheet-close]]:right-3 [&>[data-slot=sheet-close]]:top-3 [&>[data-slot=sheet-close]]:text-sidebar-secondary-text [&>[data-slot=sheet-close]]:hover:text-sidebar-primary-text",children:[z(xt,{className:"sr-only",children:[f(Rt,{children:s}),f(Nt,{children:i})]}),f("div",{className:"flex h-full min-h-0 flex-col",children:r})]})}),f("aside",{"data-slot":"app-sidebar","data-side":e,"data-sidebar-variant":t,"data-sidebar-treatment":a,"aria-label":p?void 0:d??s,"aria-labelledby":p,className:n("fixed inset-y-0 z-20 hidden w-[var(--ds-app-sidebar-width)] shrink-0 flex-col border-sidebar-border bg-sidebar-canvas text-sidebar-primary-text transition-[width] duration-200 ease-linear lg:flex",e==="left"?"left-0 border-r":"right-0 border-l","group-data-[sidebar-state=collapsed]/shell:w-[var(--ds-app-sidebar-width)]","group-data-[header-layout=integrated]/shell:top-[var(--ds-topbar-height)]",o),...m,children:r})]})}function gr({className:e,...t}){return f("div",{"data-slot":"app-sidebar-header",className:n("flex min-h-[var(--ds-topbar-height)] min-w-0 shrink-0 items-center overflow-hidden border-b border-sidebar-border bg-sidebar-header px-3",e),...t})}function fr({className:e,...t}){let{contentRef:a,hasScrollBefore:o,hasScrollAfter:r}=Ka();return f("div",{"data-slot":"app-sidebar-content","data-scroll-before":o?"true":void 0,"data-scroll-after":r?"true":void 0,ref:a,className:n("relative flex min-h-0 min-w-0 flex-1 flex-col gap-[var(--ds-sidebar-group-gap)] overflow-x-clip overflow-y-auto bg-sidebar-content px-[var(--ds-sidebar-content-padding-x)] py-[var(--ds-sidebar-content-padding-y)]",e),...t})}function vr({className:e,...t}){return f("div",{"data-slot":"app-sidebar-footer",className:n("mt-auto flex min-w-0 shrink-0 flex-col gap-2 overflow-hidden border-t border-sidebar-border bg-sidebar-footer p-[var(--ds-sidebar-footer-padding)]",e),...t})}function hr({label:e,description:t,icon:a,collapsedLabel:o,className:r}){return z("div",{"data-slot":"product-identity",className:n("flex min-w-0 items-center gap-2",r),children:[a?f("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-[var(--ds-radius-control)] bg-sidebar-hover text-sidebar-icon",children:a}):null,o&&!a?f("div",{className:"hidden shrink-0 items-center justify-center rounded-[var(--ds-radius-control)] bg-sidebar-hover px-2 py-1 text-xs font-semibold text-sidebar-primary-text group-data-[sidebar-state=collapsed]/shell:flex",children:o}):null,z("div",{className:"min-w-0 group-data-[sidebar-state=collapsed]/shell:hidden",children:[f("div",{className:"ds-type-navigation truncate font-semibold text-sidebar-primary-text",children:e}),t?f("div",{className:"ds-type-metadata truncate text-sidebar-metadata-text",children:t}):null]})]})}function xr({className:e,...t}){return f(ft,{"data-slot":"app-sidebar-separator",className:n("bg-sidebar-border",e),...t})}function de({label:e,count:t,children:a,className:o}){let r=N.useId();return z("section",{"data-slot":"navigation-group","aria-labelledby":e?r:void 0,className:n("flex min-w-0 flex-col gap-[var(--ds-sidebar-label-gap)]",o),children:[e?z("div",{"data-slot":"navigation-group-label",id:r,className:"flex min-h-6 items-center gap-2 px-2 pb-0 pt-2 text-[length:var(--ds-sidebar-group-label-size)] font-semibold uppercase leading-[var(--ds-sidebar-group-label-line-height)] tracking-[0.04em] text-sidebar-group-label group-data-[sidebar-state=collapsed]/shell:hidden",children:[e,t!==void 0?f("span",{className:"ds-type-metadata ml-auto shrink-0 font-medium normal-case tracking-normal text-sidebar-group-count",children:t}):null]}):null,f("div",{className:"flex min-w-0 flex-col gap-[var(--ds-sidebar-item-gap)]",children:a})]})}function Fa(e){return n("ds-type-navigation flex min-h-[var(--ds-sidebar-item-height-touch)] min-w-0 cursor-pointer items-center gap-2 rounded-[var(--ds-radius-control)] px-2 font-medium text-sidebar-secondary-text outline-none transition-colors duration-150 lg:h-[var(--ds-sidebar-item-height)] lg:min-h-0","hover:bg-sidebar-hover hover:text-sidebar-primary-text","focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50","group-data-[sidebar-state=collapsed]/shell:justify-center group-data-[sidebar-state=collapsed]/shell:px-0","[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",e&&"bg-sidebar-active-background font-semibold text-sidebar-active-foreground hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground")}var ce=N.forwardRef(function({active:t=!1,tooltip:a,render:o,type:r,"aria-expanded":s,className:i,children:d,...p},m){let{sidebarState:v,sidebarSide:c,isMobile:h}=le(),l=ye({defaultTagName:"button",render:o,ref:m,props:{"data-slot":"navigation-item","data-active":t?"true":void 0,"aria-expanded":s,type:o?void 0:r??"button",className:n(Fa(t),i),...p,...o?{}:{children:d}}});return a?z(wt,{children:[f(St,{render:l}),f(Ct,{side:c==="left"?"right":"left",align:"center",hidden:v!=="collapsed"||h,children:a})]}):l}),oa=N.forwardRef(function({active:t=!1,render:a,className:o,...r},s){return ye({defaultTagName:"a",render:a,ref:s,props:{"data-slot":"navigation-sub-item","data-active":t?"true":void 0,className:n("ds-type-navigation flex min-h-[var(--ds-sidebar-item-height-touch)] min-w-0 cursor-pointer items-center gap-2 rounded-[var(--ds-radius-control)] px-2 text-sidebar-secondary-text outline-none transition-colors duration-150 lg:h-[calc(var(--ds-sidebar-item-height)-0.25rem)] lg:min-h-0","hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring","group-data-[sidebar-state=collapsed]/shell:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75] [&>svg]:text-sidebar-icon",t&&"bg-sidebar-active-background font-semibold text-sidebar-active-foreground hover:bg-sidebar-active-background hover:text-sidebar-active-foreground [&>svg]:text-sidebar-active-foreground",o),...r}})});function ra({className:e,...t}){return f("div",{"data-slot":"navigation-sub-list",className:n("ml-4 flex min-w-0 flex-col gap-[var(--ds-sidebar-item-gap)] border-l border-sidebar-border pl-2 group-data-[sidebar-state=collapsed]/shell:hidden",e),...t})}function Rr({className:e,"aria-label":t,onClick:a,...o}){let{isMobile:r,mobileOpen:s,sidebarOpen:i,toggleSidebar:d}=le(),p={...o,"data-slot":"sidebar-trigger",type:"button",variant:"ghost",className:n("shrink-0 cursor-pointer text-text-supporting hover:bg-surface-muted hover:text-text-primary focus-visible:ring-focus",e),"aria-label":t??"Toggle navigation","aria-expanded":r?s:i,onClick:m=>{a?.(m),d()}};return z(ee,{...p,children:[f(za,{}),f("span",{className:"sr-only",children:"Toggle navigation"})]})}function Nr({expanded:e,defaultExpanded:t=!1,onExpandedChange:a,triggerLabel:o="Search navigation",shortcut:r,className:s,onKeyDown:i,...d}){let[p,m]=N.useState(t),v=e??p,c=N.useRef(null),h=N.useRef(null),l=N.useRef(!1),w=N.useCallback(P=>{e===void 0&&m(P),a?.(P)},[e,a]);return N.useEffect(()=>{v?queueMicrotask(()=>c.current?.focus()):l.current&&queueMicrotask(()=>h.current?.focus()),l.current=!0},[v]),v?z("div",{"data-slot":"sidebar-search","data-expanded":"true",className:n("flex min-h-[var(--ds-sidebar-item-height-touch)] items-center gap-2 rounded-[var(--ds-radius-control)] border border-sidebar-border bg-sidebar-search px-2 text-sidebar-primary-text shadow-[var(--ds-shadow-raised)] lg:min-h-[var(--ds-sidebar-item-height)]",s),children:[f(Zt,{className:"size-4 shrink-0 text-sidebar-icon"}),f(bt,{ref:c,type:"search",className:"ds-type-control h-auto min-w-0 flex-1 border-0 bg-transparent px-0 py-1 shadow-none focus-visible:border-0 focus-visible:ring-0",onKeyDown:P=>{P.key==="Escape"&&(P.preventDefault(),w(!1)),i?.(P)},...d}),f("button",{type:"button","data-slot":"sidebar-search-close",className:"grid size-7 shrink-0 cursor-pointer place-items-center rounded-[var(--ds-radius-control)] text-sidebar-secondary-text outline-none transition-colors hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-2 focus-visible:ring-sidebar-focus-ring",onClick:()=>{w(!1)},"aria-label":"Close search",children:f(Ha,{className:"size-4"})})]}):z("button",{ref:h,type:"button","data-slot":"sidebar-search-trigger",className:n("ds-type-navigation flex min-h-[var(--ds-sidebar-item-height-touch)] w-full cursor-pointer items-center gap-2 rounded-[var(--ds-radius-control)] px-2 text-left font-medium text-sidebar-secondary-text outline-none transition-colors hover:bg-sidebar-hover hover:text-sidebar-primary-text focus-visible:ring-[3px] focus-visible:ring-sidebar-focus-ring lg:min-h-[var(--ds-sidebar-item-height)]","group-data-[sidebar-state=collapsed]/shell:justify-center group-data-[sidebar-state=collapsed]/shell:px-0",s),onClick:()=>w(!0),"aria-label":o,children:[f(Zt,{className:"size-4 shrink-0 text-sidebar-icon"}),f("span",{className:"truncate group-data-[sidebar-state=collapsed]/shell:hidden",children:o}),r?f(gt,{className:"ds-type-metadata ml-auto border-sidebar-border bg-transparent text-sidebar-metadata-text group-data-[sidebar-state=collapsed]/shell:hidden",children:r}):null]})}function yr({className:e,...t}){return f("div",{"data-slot":"main-region",className:n("flex min-h-svh min-w-0 w-full flex-1 flex-col transition-[padding] duration-200 ease-linear","group-data-[sidebar-side=left]/shell:lg:pl-[var(--ds-app-sidebar-width)] group-data-[sidebar-side=right]/shell:lg:pr-[var(--ds-app-sidebar-width)]","group-data-[header-layout=integrated]/shell:pt-[var(--ds-topbar-height)]",e),...t})}function wr({className:e,...t}){return f("header",{"data-slot":"app-header",className:n("fixed inset-x-0 top-0 z-30 flex h-[var(--ds-topbar-height)] min-h-[var(--ds-topbar-height)] items-center gap-2 border-b border-border-subtle bg-canvas/96 px-[var(--ds-topbar-padding-x)] backdrop-blur supports-[backdrop-filter]:bg-canvas/88 md:gap-3 md:px-[var(--ds-topbar-padding-x-wide)]",e),...t})}function Sr({className:e,...t}){return f("div",{"data-slot":"app-header-start",className:n("flex min-w-0 flex-1 items-center gap-2",e),...t})}function Cr({mobileTrigger:e,children:t,className:a,...o}){return z("div",{"data-slot":"app-header-search",className:n("ml-auto flex shrink-0 items-center",a),...o,children:[f("div",{className:"hidden w-[min(22rem,32vw)] md:block",children:t}),f("div",{className:"md:hidden",children:e})]})}function Pr({className:e,...t}){return f("div",{"data-slot":"app-header-actions",className:n("flex shrink-0 items-center gap-1",e),...t})}function kr({className:e,...t}){return f("header",{"data-slot":"top-bar",className:n("sticky top-0 z-10 flex h-[var(--ds-topbar-height)] min-h-[var(--ds-topbar-height)] shrink-0 items-center justify-between gap-3 border-b border-border-subtle bg-canvas/96 px-[var(--ds-topbar-padding-x)] backdrop-blur md:px-[var(--ds-topbar-padding-x-wide)]","supports-[backdrop-filter]:bg-canvas/88",e),...t})}function Tr({width:e="full",className:t,...a}){return f("main",{"data-slot":"page-frame","data-width":e,className:n("min-w-0 w-full flex-1 px-3 py-[var(--ds-space-section)] md:px-[var(--ds-space-page)]",e==="wide"&&"mx-auto w-full max-w-[86rem]",e==="focused"&&"mx-auto w-full max-w-[64rem]",e==="reading"&&"mx-auto w-full max-w-[48rem]",t),...a})}function Dr({className:e,...t}){return f("div",{"data-slot":"page-content",className:n("flex min-w-0 flex-col gap-[var(--ds-space-section)]",e),...t})}function Ir({className:e,...t}){return f("div",{"data-slot":"page-boundary",className:n("rounded-[var(--ds-radius-surface)] border border-border-subtle bg-surface p-[var(--ds-surface-padding)]",e),...t})}function Ar({className:e,...t}){return f("aside",{"data-slot":"inspector-region",className:n("w-full border-l border-border-subtle bg-surface md:w-[20rem] xl:w-[24rem]",e),...t})}import{jsx as X,jsxs as na}from"react/jsx-runtime";function Br({className:e,...t}){return X("div",{"data-slot":"activity-list",className:n("divide-y divide-border-subtle",e),...t})}function Or({leading:e,icon:t,title:a,description:o,metadata:r,trailing:s,status:i,layout:d="standard",className:p,...m}){let v=e!==void 0||t!==void 0,c=s??i;return na("div",{"data-slot":"activity-item","data-layout":d,className:n("grid gap-3 py-3",v&&c&&"grid-cols-[auto_minmax(0,1fr)_auto]",v&&!c&&"grid-cols-[auto_minmax(0,1fr)]",!v&&c&&"grid-cols-[minmax(0,1fr)_auto]",!v&&!c&&"grid-cols-1",d==="compact"&&"py-2",p),...m,children:[e!==void 0?X("div",{"data-slot":"activity-item-leading",className:"shrink-0",children:e}):t!==void 0?X("div",{"data-slot":"activity-item-leading",className:"flex size-8 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-4",children:t}):null,na("div",{className:"min-w-0",children:[X("div",{className:"ds-type-ui font-medium text-text-primary",children:a}),o?X("div",{className:"ds-type-ui mt-0.5 text-text-supporting",children:o}):null,r?X("div",{className:"ds-type-metadata mt-1 text-text-supporting",children:r}):null]}),c?X("div",{"data-slot":"activity-item-trailing",className:"shrink-0",children:c}):null]})}import{CheckCircle2 as qa,CircleAlert as Ua,CircleX as Ya,Info as Qa}from"lucide-react";import{jsx as J,jsxs as Ee}from"react/jsx-runtime";function Wr({className:e,...t}){return J("ul",{"data-slot":"attention-list",className:n("grid gap-2",e),...t})}var Xa={neutral:"border-neutral-border bg-neutral-background text-neutral-foreground",information:"border-information-border bg-information-background text-information-foreground",success:"border-success-border bg-success-background text-success-foreground",warning:"border-warning-border bg-warning-background text-warning-foreground",danger:"border-danger-border bg-danger-background text-danger-foreground"};function $r({title:e,description:t,metadata:a,action:o,tone:r="neutral",severityLabel:s=`${r[0].toUpperCase()}${r.slice(1)}`,icon:i,className:d,...p}){let m=r==="danger"?Ya:r==="warning"?Ua:r==="success"?qa:Qa;return Ee("li",{"data-slot":"attention-item","data-tone":r,className:n("grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-3 rounded-[var(--ds-radius-control)] border px-3 py-2.5",Xa[r],d),...p,children:[J("span",{className:"mt-0.5 [&>svg]:size-4","aria-hidden":"true",children:i??J(m,{})}),Ee("div",{className:"min-w-0",children:[Ee("span",{className:"sr-only",children:[s,": "]}),J("div",{className:"ds-type-ui font-medium",children:e}),t?J("div",{className:"ds-type-metadata mt-0.5 opacity-85",children:t}):null,a?J("div",{className:"ds-type-metadata mt-1 opacity-85",children:a}):null]}),o?J("div",{className:"shrink-0",children:o}):null]})}import*as Me from"react";import{jsx as q,jsxs as fe}from"react/jsx-runtime";function qr({trigger:e,title:t,description:a,children:o,confirmLabel:r="Confirm",cancelLabel:s="Cancel",confirmVariant:i="destructive",pending:d=!1,onConfirm:p,onError:m}){let[v,c]=Me.useState(!1),[h,l]=Me.useState(!1),w=d||h;async function P(){if(!w){l(!0);try{await p(),c(!1)}catch(k){m?.(k)}finally{l(!1)}}}return fe(Pt,{open:v,onOpenChange:c,children:[q(kt,{render:e,children:e}),fe(Tt,{children:[fe(Dt,{children:[q(It,{children:t}),q(At,{children:a})]}),q(Et,{children:o}),fe(Mt,{children:[q(Lt,{render:q(G,{type:"button",variant:"outline",disabled:w}),children:s}),q(Bt,{render:q(G,{type:"button",variant:i,disabled:w,onClick:P}),children:w?"Working...":r})]})]})]})}import*as M from"react";import{Check as Ja,Copy as Za}from"lucide-react";import{jsx as W,jsxs as Le}from"react/jsx-runtime";function en({snippets:e,defaultValue:t,selectorLabel:a="Code language",copyLabel:o="Copy code",className:r,...s}){let i=t??e[0]?.value??"",[d,p]=M.useState(i),[m,v]=M.useState(null),[c,h]=M.useState(!1),[l,w]=M.useState(!0),P=M.useRef(null),k=M.useId(),C=e.find(x=>x.value===d)??e[0],R=C?.value;return M.useEffect(()=>{let x=P.current,A=x?.querySelector('[data-active="true"]');if(!x||!A)return;let V=x.getBoundingClientRect(),b=A.getBoundingClientRect(),D=V.left+x.clientLeft,$=D+x.clientWidth;b.left<D?x.scrollLeft-=D-b.left:b.right>$&&(x.scrollLeft+=b.right-$)},[R]),M.useLayoutEffect(()=>{let x=P.current;if(!x)return;let A=()=>{let D=x.scrollWidth>x.clientWidth||x.scrollHeight>x.clientHeight;w($=>$===D?$:D)};A();let V=typeof ResizeObserver>"u"?null:new ResizeObserver(A);V?.observe(x);for(let D of x.children)V?.observe(D);let b=typeof MutationObserver>"u"?null:new MutationObserver(A);return b?.observe(x,{characterData:!0,childList:!0,subtree:!0}),()=>{V?.disconnect(),b?.disconnect()}},[e]),C?W("div",{"data-slot":"code-block",className:n("@container/code-block min-w-0 overflow-hidden rounded-lg border border-border-subtle bg-surface",r),...s,children:Le(Ot,{value:C.value,onValueChange:p,variant:"segmented",className:"gap-0",children:[Le("div",{"data-slot":"code-block-toolbar",className:"flex flex-wrap items-center justify-between gap-3 border-b border-border-subtle bg-surface-muted px-3 py-2 @max-[28rem]/code-block:flex-col @max-[28rem]/code-block:items-stretch @max-[28rem]/code-block:gap-2",children:[W(zt,{ref:P,variant:"segmented",size:"compact","aria-label":a,tabIndex:l?0:void 0,className:"min-w-0 max-w-full overflow-x-auto overscroll-x-contain @max-[28rem]/code-block:w-full @max-[28rem]/code-block:self-stretch",children:e.map(x=>W(Ht,{value:x.value,children:x.label},x.value))}),Le(G,{type:"button",variant:"ghost",size:"sm",className:"min-w-0 max-w-full shrink-0 @max-[28rem]/code-block:h-auto @max-[28rem]/code-block:min-h-[var(--ds-control-height-sm)] @max-[28rem]/code-block:w-full @max-[28rem]/code-block:justify-center @max-[28rem]/code-block:py-1.5",onClick:async()=>{try{await navigator.clipboard.writeText(C.code),v(C.value),h(!1)}catch{v(null),h(!0)}},"aria-describedby":k,children:[m===C.value?W(Ja,{}):W(Za,{}),W("span",{className:"min-w-0 whitespace-normal [overflow-wrap:anywhere]",children:m===C.value?"Copied":o})]}),W("span",{id:k,className:"sr-only",role:"status","aria-live":"polite",children:c?"Code could not be copied. Select the code and copy it manually.":m===C.value?"Code copied to clipboard.":""})]}),e.map(x=>W(Vt,{value:x.value,className:"m-0 min-w-0",children:W("pre",{"aria-label":`${x.label} code example`,tabIndex:0,className:"max-h-[32rem] overflow-auto p-4 text-sm leading-6 outline-none focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-focus/50",children:W("code",{children:x.code})})},x.value))]})}):null}import{jsx as Be}from"react/jsx-runtime";function nn({className:e,...t}){return Be(_t,{"data-slot":"inventory-surface",className:n("gap-0 overflow-hidden py-0",e),...t})}function sn({className:e,...t}){return Be("div",{"data-slot":"inventory-desktop",className:n("hidden lg:block",e),...t})}function ln({className:e,...t}){return Be("div",{"data-slot":"inventory-mobile",className:n("divide-y divide-border-subtle lg:hidden",e),...t})}import*as ve from"react";import{jsx as L,jsxs as pe}from"react/jsx-runtime";var sa=ve.createContext("default");function mn({columns:e=4,presentation:t="default",className:a,children:o,...r}){let s=n(e===2&&"lg:grid-cols-2",e===3&&"lg:grid-cols-3",e===4&&"lg:grid-cols-4",e===5&&"lg:grid-cols-5");return L(sa.Provider,{value:t,children:L("div",{"data-slot":"metric-band","data-columns":e,"data-presentation":t==="compact"?"compact":void 0,className:n(t==="compact"?n("grid grid-cols-1 border-b border-border-subtle",s):n("grid grid-cols-2 border-b border-border-subtle",s),a),...r,children:o})})}function bn({label:e,value:t,detail:a,icon:o,iconClassName:r,loading:s=!1,className:i,...d}){return ve.useContext(sa)==="compact"?pe("div",{"data-slot":"metric-band-item","data-presentation":"compact",className:n("grid min-w-0 grid-cols-[minmax(0,1fr)_minmax(0,0.85fr)] items-center gap-x-3 gap-y-1 border-b border-border-subtle px-4 py-3 last:border-b-0","lg:flex lg:min-h-32 lg:flex-col lg:items-start lg:justify-center lg:gap-1 lg:border-b-0 lg:border-r lg:px-5 lg:py-4 lg:last:border-r-0",i),...d,children:[pe("div",{className:"flex min-w-0 items-center gap-2 lg:items-start",children:[o?L("span",{className:n("flex size-4 shrink-0 items-center justify-center text-text-supporting [&_svg]:size-4",r),children:o}):null,pe("div",{className:"min-w-0",children:[L("div",{className:"ds-type-ui break-words text-text-supporting",children:e}),a?L("div",{className:"ds-type-metadata mt-0.5 break-words text-text-supporting",children:a}):null]})]}),s?L(ie,{className:"h-6 w-14 justify-self-end lg:justify-self-start"}):L("div",{className:"min-w-0 max-w-full break-words text-right text-xl font-semibold leading-tight tracking-tight text-text-primary lg:text-left",children:t??L("span",{"aria-label":"Unavailable",children:"\u2014"})})]}):pe("div",{"data-slot":"metric-band-item",className:n("flex min-h-28 flex-col items-start gap-3 border-r border-border-subtle p-4 last:border-r-0 sm:flex-row sm:items-center sm:gap-4 sm:p-5","[&:nth-child(-n+2)]:border-b lg:[&:nth-child(-n+2)]:border-b-0",i),...d,children:[o?L("div",{className:n("flex size-10 shrink-0 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-5",r),children:o}):null,pe("div",{className:"grid min-w-0 gap-1",children:[L("div",{className:"ds-type-ui text-text-supporting",children:e}),s?L(ie,{className:"h-7 w-14"}):L("div",{className:"text-2xl font-semibold tracking-tight",children:t??0}),a?L("div",{className:"ds-type-metadata text-text-supporting",children:a}):null]})]})}import*as ia from"react";import{ArrowDown as eo,ArrowUp as to,Minus as ao}from"lucide-react";import{Fragment as oo,jsx as H,jsxs as Z}from"react/jsx-runtime";function Rn({direction:e,sentiment:t="neutral",value:a,accessibleLabel:o,className:r,...s}){let i=e==="up"?to:e==="down"?eo:ao;return Z("span",{"data-slot":"metric-trend","data-direction":e,"data-sentiment":t,role:"img","aria-label":o,className:n("inline-flex items-center gap-1 ds-type-metadata font-medium text-trend-neutral",t==="positive"&&"text-trend-positive",t==="negative"&&"text-trend-negative",r),...s,children:[H(i,{"aria-hidden":"true",className:"size-3.5 stroke-[2]"}),H("span",{"aria-hidden":"true",children:a})]})}function Nn({label:e,description:t,value:a,unit:o,trend:r,status:s,emphasis:i="supporting",loading:d=!1,visualization:p,visualizationSummary:m,className:v,...c}){let h=ia.useId();return Z("section",{"data-slot":"metric-card","data-emphasis":i,"aria-labelledby":h,className:n("flex min-w-0 flex-col overflow-hidden rounded-[var(--ds-radius-surface)] border border-border-default bg-surface text-text-primary shadow-[var(--ds-shadow-raised)]",i==="primary"?"min-h-80":"min-h-40",v),...c,children:[Z("div",{className:"flex items-start justify-between gap-4 px-[var(--ds-surface-padding)] pt-[var(--ds-surface-padding)]",children:[Z("div",{className:"min-w-0",children:[H("h2",{id:h,className:"ds-type-card-title",children:e}),t?H("p",{className:"ds-type-metadata mt-0.5 text-text-supporting",children:t}):null]}),s?H("div",{className:"shrink-0",children:s}):null]}),Z("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1 px-[var(--ds-surface-padding)] pt-3",children:[d?H(ie,{className:n("h-8",i==="primary"?"w-24":"w-16")}):Z(oo,{children:[H("span",{className:n("font-semibold tabular-nums tracking-tight",i==="primary"?"text-4xl":"text-2xl"),children:a??0}),o?H("span",{className:"ds-type-ui text-text-supporting",children:o}):null]}),r?H("div",{className:"ml-1",children:r}):null]}),p?Z("figure",{className:"mt-auto min-h-0 flex-1 pt-4",children:[H("div",{"data-slot":"metric-card-visualization",className:"h-full min-h-20 w-full",children:p}),H("figcaption",{className:"sr-only",children:m})]}):null]})}import{jsx as ue,jsxs as Oe}from"react/jsx-runtime";function Cn({title:e,description:t,status:a,metadata:o,actions:r,action:s,actionNode:i,className:d,...p}){let m=r??i??(s?ue("a",{className:"ds-type-button inline-flex h-[var(--ds-control-height)] items-center justify-center gap-2 whitespace-nowrap rounded-md bg-action px-3 py-2 text-action-foreground shadow-xs outline-none transition-colors hover:bg-action-hover focus-visible:border-focus focus-visible:ring-3 focus-visible:ring-focus/50",href:s.href,children:s.label}):null);return Oe("header",{"data-slot":"page-header",className:n("flex flex-col gap-3 border-b border-border-subtle bg-canvas px-5 py-4 lg:flex-row lg:items-start lg:justify-between",d),...p,children:[Oe("div",{className:"min-w-0",children:[Oe("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[ue("h1",{className:"ds-type-page-title truncate",children:e}),a]}),t?ue("p",{className:"ds-type-ui mt-1 max-w-3xl text-text-supporting",children:t}):null,o?ue("div",{className:"ds-type-metadata mt-2 text-text-supporting",children:o}):null]}),m?ue("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:m}):null]})}import{jsx as ze,jsxs as He}from"react/jsx-runtime";function Dn({search:e,filters:t,viewControls:a,bulkActions:o,className:r,children:s,...i}){return He("div",{"data-slot":"page-toolbar",className:n("grid gap-2 border-b border-border-subtle bg-canvas px-5 py-3 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",r),...i,children:[He("div",{className:"flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center",children:[e?ze("div",{className:"min-w-0 flex-1 sm:min-w-48 sm:max-w-sm",children:e}):null,t?ze("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:flex-wrap sm:items-center",children:t}):null]}),He("div",{className:"flex min-h-[var(--ds-control-height)] flex-wrap items-center gap-2 lg:justify-end",children:[o?ze("div",{"data-slot":"page-toolbar-bulk-actions",className:"contents",children:o}):null,a,s]})]})}import*as he from"react";import{jsx as U,jsxs as ma}from"react/jsx-runtime";var da=je,ca=qe,Ve="conscia-preferences",_e=new Map;function ro(e,t,a){if(typeof window>"u")return t;try{let o=e.endsWith(":v1")?e.slice(0,-3):e,r=window.localStorage.getItem(e)??window.localStorage.getItem(o)??_e.get(e);return r&&a.includes(r)?r:t}catch{let o=_e.get(e);return o&&a.includes(o)?o:t}}function pa(e,t){_e.set(e,t);try{window.localStorage.setItem(e,t)}catch{}window.dispatchEvent(new Event(Ve))}function la(e,t,a){return he.useSyncExternalStore(o=>(window.addEventListener("storage",o),window.addEventListener(Ve,o),()=>{window.removeEventListener("storage",o),window.removeEventListener(Ve,o)}),()=>ro(e,t,a),()=>t)}function We(){let e=la(da,"system",Re),t=la(ca,"comfortable",Ne);return{appearance:e,density:t}}function Ln(){let{appearance:e,density:t}=We();return he.useEffect(()=>{let a=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>Ue(document.documentElement,e,t,a.matches);return o(),a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[e,t]),null}function Bn({nonce:e}){return U("script",{nonce:e,dangerouslySetInnerHTML:{__html:Ye()}})}function no({className:e}){let{appearance:t}=We();return U(ua,{className:e,label:"Appearance",value:t,values:Re,onChange:a=>pa(da,a)})}function so({className:e}){let{density:t}=We();return U(ua,{className:e,label:"Density",value:t,values:Ne,onChange:a=>pa(ca,a)})}function On({className:e}){return ma("div",{className:n("flex flex-col gap-3 text-sm",e),children:[U(no,{}),U(so,{})]})}function ua({className:e,label:t,value:a,values:o,onChange:r}){return ma("fieldset",{className:n("flex flex-col gap-2",e),children:[U("legend",{className:"text-[var(--ds-metadata)] font-medium text-text-supporting",children:t}),U("div",{className:"grid w-full grid-cols-3 rounded-[var(--ds-radius-control)] bg-surface-muted p-1",children:o.map(s=>U("button",{type:"button","aria-pressed":a===s,suppressHydrationWarning:!0,onClick:()=>r(s),className:"min-w-0 h-7 rounded-[calc(var(--ds-radius-control)-2px)] px-1.5 text-[var(--ds-metadata)] font-medium capitalize text-text-supporting outline-none transition-colors hover:text-text-primary focus-visible:ring-[3px] focus-visible:ring-focus/50 aria-pressed:bg-canvas aria-pressed:text-text-primary aria-pressed:shadow-xs",children:s},s))})]})}import{jsx as $e,jsxs as ba}from"react/jsx-runtime";function _n({name:e,shortName:t,description:a,size:o="default",className:r,...s}){return ba("div",{"data-slot":"provider-mark",className:n("flex min-w-0 items-center gap-3",r),...s,children:[$e("div",{"aria-hidden":"true",className:n("flex shrink-0 items-center justify-center rounded-md border border-border-subtle bg-surface-muted font-semibold tracking-tight text-text-primary",o==="sm"?"size-8 text-[10px]":"size-10 text-xs"),children:t}),ba("div",{className:"min-w-0",children:[$e("div",{className:"ds-type-ui truncate font-medium text-text-primary",children:e}),a?$e("div",{className:"ds-type-metadata mt-0.5 truncate text-text-supporting",children:a}):null]})]})}import{jsx as B,jsxs as Y}from"react/jsx-runtime";function Kn({variant:e="plain",title:t,description:a,status:o,metadata:r,actions:s,className:i,children:d,...p}){return Y("section",{"data-slot":"resource-summary",className:n("px-5 py-4",e==="plain"&&"border-b border-border-subtle bg-canvas",e==="surface"&&"rounded-[var(--ds-radius-surface)] border border-border-subtle bg-surface",i),...p,children:[Y("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[Y("div",{className:"min-w-0",children:[t||o?Y("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t?B("h2",{className:"ds-type-section-title truncate",children:t}):null,o]}):null,a?B("p",{className:"ds-type-ui mt-1 max-w-3xl text-text-supporting",children:a}):null,r?B("div",{className:"ds-type-metadata mt-2 text-text-supporting",children:r}):null]}),s?B("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:s}):null]}),d?B("div",{className:"mt-4",children:d}):null]})}function Fn({className:e,...t}){return B("div",{"data-slot":"detail-sections",className:n("flex flex-col gap-[var(--ds-space-section)]",e),...t})}function jn({variant:e="surface",title:t,description:a,actions:o,className:r,children:s,...i}){return Y("section",{"data-slot":"detail-section",className:n(e==="surface"&&"rounded-[var(--ds-radius-surface)] border border-border-subtle bg-surface p-[var(--ds-surface-padding)]",e==="open"&&"border-b border-border-subtle pb-[var(--ds-space-section)]",r),...i,children:[Y("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[Y("div",{className:"min-w-0",children:[B("h2",{className:"ds-type-section-title",children:t}),a?B("p",{className:"ds-type-ui mt-1 max-w-3xl text-text-supporting",children:a}):null]}),o?B("div",{className:"flex shrink-0 items-center gap-2",children:o}):null]}),s?B("div",{className:"mt-4",children:s}):null]})}function qn({className:e,...t}){return B("dl",{"data-slot":"key-value-list",className:n("ds-type-ui grid gap-3",e),...t})}function Un({label:e,value:t,breakValue:a=!1}){return Y("div",{"data-slot":"key-value-item",className:"flex min-w-0 items-start justify-between gap-4",children:[B("dt",{className:"min-w-0 max-w-[40%] text-text-supporting",children:e}),B("dd",{className:n("min-w-0 flex-1 break-words text-right font-medium",a&&"break-all"),children:t})]})}import*as F from"react";import{ChevronRight as io}from"lucide-react";import{Fragment as Ge,jsx as y,jsxs as K}from"react/jsx-runtime";function Ke(e){return"items"in e}function lo(e){return Ke(e)&&e.type==="group"}function co(e){return Ke(e)&&e.type!=="group"}function oe(e){let t=[e.badgeLabel,e.countLabel].filter(Boolean);return t.length>0?`${e.label}, ${t.join(", ")}`:e.label}function xe({badge:e,count:t}){return e===void 0&&t===void 0?null:K("span",{"aria-hidden":"true",className:"ml-auto flex min-w-0 shrink-0 items-center gap-1.5 text-sidebar-metadata-text",children:[e!==void 0?y("span",{className:"max-w-28 truncate rounded-full bg-sidebar-hover px-1.5 py-0.5 text-[length:var(--ds-metadata)] font-semibold leading-none",children:e}):null,t!==void 0?y("span",{className:"ds-type-metadata tabular-nums",children:t}):null]})}function ga({item:e}){return K(Ge,{children:[e.icon,!e.icon&&e.collapsedLabel?y("span",{className:"hidden shrink-0 font-semibold group-data-[sidebar-state=collapsed]/shell:inline",children:e.collapsedLabel}):null,y("span",{className:"truncate group-data-[sidebar-state=collapsed]/shell:hidden",children:e.label}),y(xe,{badge:e.badge,count:e.count})]})}function po(e){if(!e||typeof window>"u")return{};try{let t=window.localStorage.getItem(e);if(!t)return{};let a=JSON.parse(t);return typeof a=="object"&&a!==null?a:{}}catch{return{}}}function as({entries:e,renderLink:t,onNavigate:a,storageKey:o,className:r}){let{isMobile:s,setMobileOpen:i,sidebarSide:d,sidebarState:p}=le(),[m,v]=F.useState({}),c=F.useRef(!1);F.useEffect(()=>{c.current=!1;let l=po(o);queueMicrotask(()=>{c.current=!0,v(l)})},[o]),F.useEffect(()=>{if(!(!c.current||!o||!e.some(co)))try{window.localStorage.setItem(o,JSON.stringify(m))}catch{}},[e,m,o]);let h=F.useCallback(()=>{s&&i(!1),a?.()},[s,a,i]);return y("nav",{"data-slot":"sidebar-navigation","aria-label":"Primary navigation",className:n("flex flex-col gap-[var(--ds-sidebar-group-gap)]",r),children:e.map(l=>{if(lo(l))return y(de,{label:l.label,count:l.count,children:l.items.map(R=>y(ce,{active:R.active,tooltip:R.label,render:t(R,{"aria-current":R.active?"page":void 0,"aria-label":oe(R),onClick:h,children:y(ga,{item:R})})},R.id))},l.id);if(!Ke(l))return y(de,{className:l.startsSection?"mt-[var(--ds-sidebar-group-gap)]":void 0,children:y(ce,{active:l.active,tooltip:l.label,render:t(l,{"aria-current":l.active?"page":void 0,"aria-label":oe(l),onClick:h,children:y(ga,{item:l})})})},l.id);let w=l.items.some(R=>R.active),P=l.type==="submenu"?l.defaultOpen:!1,k=l.type===void 0?l.active:!1,C=(m[l.id]??P)||w||k;return p==="collapsed"&&!s?K(Kt,{children:[y(de,{className:l.startsSection?"mt-[var(--ds-sidebar-group-gap)]":void 0,children:y(jt,{render:K(ce,{"aria-label":`${oe(l)} menu`,className:w?"text-sidebar-primary-text":void 0,children:[l.icon,y("span",{className:"sr-only",children:l.label})]})})}),K(qt,{side:d==="left"?"right":"left",align:"start",sideOffset:8,className:"min-w-56 rounded-[var(--ds-radius-surface)] p-1.5",children:[y(Yt,{className:"px-2 py-1.5 font-semibold text-text-supporting",children:l.label}),y(Ft,{children:l.items.map(R=>y(Ut,{closeOnClick:!0,render:t(R,{"aria-current":R.active?"page":void 0,"aria-label":oe(R),onClick:h,children:K(Ge,{children:[R.icon,y("span",{className:"truncate",children:R.label}),y(xe,{badge:R.badge,count:R.count})]})}),className:n("min-h-9 cursor-pointer rounded-[var(--ds-radius-control)] [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:stroke-[1.75]",R.active&&"bg-selection-background font-semibold text-selection-foreground focus:bg-selection-background focus:text-selection-foreground")},R.id))})]})]},l.id):y(Wt,{open:C,onOpenChange:R=>v(x=>({...x,[l.id]:R})),className:n("group/collapsible",l.startsSection&&"mt-2"),children:K(de,{children:[y($t,{render:K(ce,{tooltip:l.label,"aria-label":oe(l),className:w?"text-sidebar-primary-text":void 0,children:[l.icon,y("span",{className:"truncate group-data-[sidebar-state=collapsed]/shell:hidden",children:l.label}),y(xe,{badge:l.badge,count:l.count}),y(io,{className:"ml-auto transition-transform duration-150 ease-out group-data-[sidebar-state=collapsed]/shell:hidden group-data-[open]/collapsible:rotate-90"})]})}),y(Gt,{"data-slot":"sidebar-collapsible-content",className:"overflow-hidden",children:y(ra,{children:l.items.map(R=>y(oa,{active:R.active,render:t(R,{"aria-current":R.active?"page":void 0,"aria-label":oe(R),onClick:h,children:K(Ge,{children:[R.icon,y("span",{className:"truncate",children:R.label}),y(xe,{badge:R.badge,count:R.count})]})})},R.id))})})]})},l.id)})})}import{jsx as Q,jsxs as mo}from"react/jsx-runtime";function uo({title:e,description:t,action:a,icon:o,className:r,...s}){return mo("div",{"data-slot":"state-view",className:n("flex min-h-72 flex-col items-center justify-center gap-3 border-b px-6 py-12 text-center",r),...s,children:[o?Q("div",{className:"flex size-10 items-center justify-center rounded-md bg-neutral-background text-neutral-foreground [&_svg]:size-5",children:o}):null,Q("h2",{className:"ds-type-section-title",children:e}),t?Q("p",{className:"ds-type-ui max-w-md text-text-supporting",children:t}):null,a?Q("div",{className:"mt-1",children:a}):null]})}function ss({rows:e=6,columns:t=5}){return Q("div",{"data-slot":"loading-rows",className:"border-b",children:Array.from({length:e}).map((a,o)=>Q("div",{className:"grid h-[var(--ds-row-height)] items-center gap-4 border-b px-5 last:border-b-0",style:{gridTemplateColumns:`2fr repeat(${Math.max(t-1,1)}, minmax(5rem, 1fr))`},children:Array.from({length:t}).map((r,s)=>Q("div",{className:n("h-3 rounded bg-surface-muted",s===0?"w-44":"w-24")},s))},o))})}function is({title:e,description:t,action:a,className:o,...r}){return Q(uo,{title:e,description:t,action:a,className:n("bg-danger-background/60",o),role:"alert","aria-live":"assertive",...r})}import*as va from"react";import{jsx as me,jsxs as fa}from"react/jsx-runtime";function ps({label:e,value:t,maximum:a,valueLabel:o,detail:r,tone:s="neutral",className:i,...d}){let p=va.useId(),m=typeof a=="number"&&a>0,v=m?Math.min(a,Math.max(0,t)):t,c=m?v/a*100:null,h=o??(m?`${v} of ${a}`:String(v));return fa("div",{"data-slot":"value-meter",className:n("grid gap-2",i),...d,children:[fa("div",{className:"flex items-baseline justify-between gap-4 text-sm",children:[me("span",{id:p,className:"font-medium text-text-primary",children:e}),me("span",{className:"text-text-supporting",children:h})]}),c===null?null:me("div",{role:"progressbar","aria-labelledby":p,"aria-valuemin":0,"aria-valuemax":a??void 0,"aria-valuenow":v,className:"h-2 overflow-hidden rounded-full bg-surface-muted",children:me("div",{className:n("h-full rounded-full bg-neutral-foreground transition-[width]",s==="success"&&"bg-success-foreground",s==="warning"&&"bg-warning-foreground",s==="danger"&&"bg-danger-foreground"),style:{width:`${c}%`}})}),r?me("div",{className:"text-xs text-text-supporting",children:r}):null]})}import*as ha from"react";import{jsx as T,jsxs as re}from"react/jsx-runtime";function gs({className:e,...t}){return T("div",{"data-slot":"workbench-shell",className:n("min-w-0",e),...t})}function fs({variant:e="secondary",open:t=!0,className:a,...o}){return T("aside",{"data-slot":"workbench-rail","data-variant":e,"data-open":t?"true":"false",className:n("min-w-0",a),...o})}function vs({className:e,...t}){return T("main",{"data-slot":"workbench-main",className:n("min-w-0",e),...t})}function hs({className:e,...t}){return T("aside",{"data-slot":"workbench-inspector",className:n("min-w-0",e),...t})}function xs({className:e,...t}){return T("div",{"data-slot":"workbench-mobile-toolbar",className:n(e),...t})}function Rs({open:e=!0,className:t,...a}){return T("button",{type:"button","data-slot":"workbench-backdrop","data-open":e?"true":"false",className:n(t),...a})}function Ns({className:e,...t}){return T("section",{"data-slot":"workbench-section",className:n(e),...t})}function ys({title:e,metadata:t,action:a,className:o,...r}){return re("div",{"data-slot":"workbench-section-header",className:n(o),...r,children:[re("div",{"data-slot":"workbench-section-heading",children:[T("h2",{children:e}),t?T("span",{children:t}):null]}),a?T("div",{"data-slot":"workbench-section-action",children:a}):null]})}function ws({as:e="div",href:t,selected:a=!1,className:o,children:r,...s}){return ha.createElement(e,{...s,...e==="a"&&t?{href:t}:{},...e==="button"?{type:"button"}:{},"data-slot":"resource-row","data-selected":a?"true":"false",className:n(o)},r)}function Ss({className:e,...t}){return T("span",{"data-slot":"resource-row-icon",className:n(e),...t})}function Cs({className:e,...t}){return T("span",{"data-slot":"resource-row-content",className:n(e),...t})}function Ps({className:e,...t}){return T("strong",{"data-slot":"resource-row-title",className:n(e),...t})}function ks({className:e,...t}){return T("span",{"data-slot":"resource-row-description",className:n(e),...t})}function Ts({className:e,...t}){return T("span",{"data-slot":"resource-row-meta",className:n(e),...t})}function Ds({label:e,action:t,className:a,children:o,...r}){return re("section",{"data-slot":"workbench-inspector-section",className:n(a),...r,children:[re("div",{"data-slot":"workbench-inspector-label",children:[T("h3",{children:e}),t?T("div",{children:t}):null]}),o]})}function Is({initials:e,name:t,detail:a,compact:o=!1,className:r,...s}){return re("div",{"data-slot":"identity-row","data-compact":o?"true":"false",className:n(r),...s,children:[T("span",{"data-slot":"identity-avatar",children:e}),re("span",{"data-slot":"identity-copy",children:[T("strong",{children:t}),a?T("small",{children:a}):null]})]})}export{Qt as a,Xt as b,Io as c,zo as d,Wo as e,$o as f,Go as g,Ko as h,Yo as i,er as j,le as k,mr as l,br as m,gr as n,fr as o,vr as p,hr as q,xr as r,de as s,ce as t,oa as u,ra as v,Rr as w,Nr as x,yr as y,wr as z,Sr as A,Cr as B,Pr as C,kr as D,Tr as E,Dr as F,Ir as G,Ar as H,Br as I,Or as J,Wr as K,$r as L,qr as M,en as N,nn as O,sn as P,ln as Q,mn as R,bn as S,Rn as T,Nn as U,Cn as V,Dn as W,We as X,Ln as Y,Bn as Z,no as _,so as $,On as aa,_n as ba,Kn as ca,Fn as da,jn as ea,qn as fa,Un as ga,as as ha,uo as ia,ss as ja,is as ka,ps as la,gs as ma,fs as na,vs as oa,hs as pa,xs as qa,Rs as ra,Ns as sa,ys as ta,ws as ua,Ss as va,Cs as wa,Ps as xa,ks as ya,Ts as za,Ds as Aa,Is as Ba};
2
+ //# sourceMappingURL=chunk-PRYMDZ7N.js.map