@customafk/lunas-ui 0.2.58 → 0.2.59

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.
Files changed (35) hide show
  1. package/dist/features/tables/index.cjs +1 -1
  2. package/dist/features/tables/index.d.cts +2 -2
  3. package/dist/features/tables/index.d.mts +2 -2
  4. package/dist/features/tables/index.mjs +1 -1
  5. package/dist/features/tanstack-form/index.cjs +1 -1
  6. package/dist/features/tanstack-form/index.mjs +1 -1
  7. package/dist/{index-aPuQLHfq.d.mts → index-Cbhv1_Xe.d.mts} +49 -19
  8. package/dist/{index-Cqe6rsMe.d.cts → index-nsk470g_.d.cts} +49 -19
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.d.cts +3 -3
  11. package/dist/index.d.mts +3 -3
  12. package/dist/index.mjs +1 -1
  13. package/dist/{resizable-CNIYTd7k.d.cts → resizable-CVpc0g5U.d.cts} +2 -2
  14. package/dist/{resizable-CNIYTd7k.d.mts → resizable-CVpc0g5U.d.mts} +2 -2
  15. package/dist/tables-CNJ10l7L.cjs +4 -0
  16. package/dist/tables-CNJ10l7L.cjs.map +1 -0
  17. package/dist/tables-UaA4qIaD.mjs +4 -0
  18. package/dist/tables-UaA4qIaD.mjs.map +1 -0
  19. package/dist/{tanstack-form-Bnfatlfx.cjs → tanstack-form-BMVn8ai_.cjs} +2 -2
  20. package/dist/tanstack-form-BMVn8ai_.cjs.map +1 -0
  21. package/dist/{tanstack-form-CRY_uHFd.mjs → tanstack-form-DTCgWGCA.mjs} +2 -2
  22. package/dist/tanstack-form-DTCgWGCA.mjs.map +1 -0
  23. package/dist/ui/resizable.d.cts +1 -1
  24. package/dist/ui/resizable.d.mts +1 -1
  25. package/dist/ui/switch.cjs +1 -1
  26. package/dist/ui/switch.cjs.map +1 -1
  27. package/dist/ui/switch.mjs +1 -1
  28. package/dist/ui/switch.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/tables-BHdeig0n.mjs +0 -4
  31. package/dist/tables-BHdeig0n.mjs.map +0 -1
  32. package/dist/tables-BfuoYxlt.cjs +0 -4
  33. package/dist/tables-BfuoYxlt.cjs.map +0 -1
  34. package/dist/tanstack-form-Bnfatlfx.cjs.map +0 -1
  35. package/dist/tanstack-form-CRY_uHFd.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{Button as e}from"./ui/button.mjs";import{Paragraph as t,paragraphVariants as n}from"./typography/paragraph.mjs";import{Card as r,CardAction as i,CardContent as a,CardDescription as o,CardFooter as s,CardHeader as c,CardTitle as l}from"./ui/card.mjs";import{Skeleton as u}from"./ui/skeleton.mjs";import{Image as d}from"./ui/image.mjs";import{GridProductCard as f}from"./cards/grid-product-card.mjs";import{ProductCard as p}from"./cards/product-card.mjs";import{SimpleCard as m}from"./cards/simple-card.mjs";import{Flex as h}from"./layouts/flex.mjs";import{CountryDisplay as g}from"./data-display/country.mjs";import{DataList as _,DataListItem as v}from"./data-display/data-list.mjs";import{t as y}from"./date-Nsz0Pewe.mjs";import{Badge as b,badgeVariants as x}from"./ui/badge.mjs";import{Tooltip as S,TooltipContent as C,TooltipProvider as w,TooltipTrigger as T}from"./ui/tooltip.mjs";import{DateTooltip as E}from"./data-display/date-tooltip.mjs";import{EmptyDisplay as D}from"./data-display/empty.mjs";import{NameDisplay as O}from"./data-display/name.mjs";import{PhoneNumberDisplay as k}from"./data-display/phone-number.mjs";import{RoleBadge as A}from"./data-display/role-badge.mjs";import{Statistic as j}from"./data-display/statistic.mjs";import{Avatar as M,AvatarFallback as N,AvatarImage as P}from"./ui/avatar.mjs";import{UserDataDisplay as F}from"./data-display/user.mjs";import{AlertDialog as I,AlertDialogAction as L,AlertDialogCancel as R,AlertDialogContent as z,AlertDialogDescription as B,AlertDialogFooter as V,AlertDialogHeader as H,AlertDialogOverlay as U,AlertDialogPortal as W,AlertDialogTitle as G,AlertDialogTrigger as K}from"./ui/alert-dialog.mjs";import{ConfirmDialog as q}from"./dialogs/confirm-dialog.mjs";import{Title as J}from"./typography/title.mjs";import{Separator as Y}from"./ui/separator.mjs";import{Sheet as X,SheetClose as Z,SheetContent as Q,SheetDescription as $,SheetFooter as ee,SheetHeader as te,SheetTitle as ne,SheetTrigger as re}from"./ui/sheet.mjs";import{DetailDialog as ie}from"./dialogs/detail-dialog/index.mjs";import{ErrorDialog as ae}from"./dialogs/error-dialog.mjs";import{Dialog as oe,DialogClose as se,DialogContent as ce,DialogDescription as le,DialogFooter as ue,DialogHeader as de,DialogOverlay as fe,DialogPortal as pe,DialogTitle as me,DialogTrigger as he}from"./ui/dialog.mjs";import{LoadingDialog as ge}from"./dialogs/loading-dialog.mjs";import{Description as _e,DescriptionBadge as ve,DescriptionBoolean as ye,DescriptionCopy as be,DescriptionDate as xe,DescriptionEmpty as Se,DescriptionHeader as Ce,DescriptionImages as we,DescriptionItem as Te,DescriptionLink as Ee,DescriptionLongText as De,DescriptionName as Oe,DescriptionNumberPhone as ke,DescriptionSection as Ae,DescriptionStatistic as je,DescriptionStatus as Me,DescriptionTagList as Ne,DescriptionUser as Pe}from"./features/descriptions/index.mjs";import{Command as Fe,CommandDialog as Ie,CommandEmpty as Le,CommandGroup as Re,CommandInput as ze,CommandItem as Be,CommandList as Ve,CommandSeparator as He,CommandShortcut as Ue}from"./ui/command.mjs";import{t as We}from"./search-modal-Cdmi2iyV.mjs";import{A as Ge,B as Ke,C as qe,D as Je,E as Ye,F as Xe,H as Ze,I as Qe,L as $e,M as et,N as tt,O as nt,P as rt,R as it,S as at,T as ot,V as st,_ as ct,a as lt,b as ut,c as dt,d as ft,f as pt,g as mt,h as ht,i as gt,j as _t,k as vt,l as yt,m as bt,n as xt,o as St,p as Ct,r as wt,s as Tt,t as Et,u as Dt,v as Ot,w as kt,x as At,y as jt,z as Mt}from"./tables-BHdeig0n.mjs";import{DropdownMenu as Nt,DropdownMenuCheckboxItem as Pt,DropdownMenuContent as Ft,DropdownMenuGroup as It,DropdownMenuItem as Lt,DropdownMenuLabel as Rt,DropdownMenuPortal as zt,DropdownMenuRadioGroup as Bt,DropdownMenuRadioItem as Vt,DropdownMenuSeparator as Ht,DropdownMenuShortcut as Ut,DropdownMenuSub as Wt,DropdownMenuSubContent as Gt,DropdownMenuSubTrigger as Kt,DropdownMenuTrigger as qt}from"./ui/dropdown-menu.mjs";import{Progress as Jt}from"./ui/progress.mjs";import{Checkbox as Yt}from"./ui/checkbox.mjs";import{Spinner as Xt}from"./ui/spinner.mjs";import{ResizableHandle as Zt,ResizablePanel as Qt,ResizablePanelGroup as $t}from"./ui/resizable.mjs";import{Input as en}from"./ui/input.mjs";import{Label as tn}from"./ui/label.mjs";import{Popover as nn,PopoverAnchor as rn,PopoverClose as an,PopoverContent as on,PopoverTrigger as sn}from"./ui/popover.mjs";import{Select as cn,SelectContent as ln,SelectGroup as un,SelectItem as dn,SelectLabel as fn,SelectSeparator as pn,SelectTrigger as mn,SelectValue as hn}from"./ui/select.mjs";import{A as gn,B as _n,C as vn,D as yn,E as bn,F as xn,G as Sn,H as Cn,I as wn,K as Tn,L as En,M as Dn,N as On,O as kn,P as An,R as jn,S as Mn,T as Nn,U as Pn,V as Fn,W as In,_ as Ln,a as Rn,b as zn,c as Bn,d as Vn,f as Hn,g as Un,h as Wn,i as Gn,j as Kn,k as qn,l as Jn,m as Yn,n as Xn,o as Zn,p as Qn,r as $n,s as er,t as tr,u as nr,v as rr,w as ir,x as ar,y as or,z as sr}from"./tanstack-form-CRY_uHFd.mjs";import{Switch as cr}from"./ui/switch.mjs";import{Drawer as lr,DrawerClose as ur,DrawerContent as dr,DrawerDescription as fr,DrawerFooter as pr,DrawerHeader as mr,DrawerOverlay as hr,DrawerPortal as gr,DrawerTitle as _r,DrawerTrigger as vr}from"./ui/drawer.mjs";import{Calendar as yr,CalendarDayButton as br}from"./ui/calendar.mjs";import{RadioGroup as xr,RadioGroupItem as Sr}from"./ui/radio-group.mjs";import{Textarea as Cr}from"./ui/textarea.mjs";import{n as wr,t as Tr}from"./text-editor-BQtIXOpM.mjs";import{t as Er}from"./cms-layout-IwpD0LvR.mjs";import{t as Dr}from"./payment-layout-CG_l7Es-.mjs";import{Grid as Or}from"./layouts/grid.mjs";import{FeatureDeveloping as kr}from"./pages/FeatureDeveloping.mjs";import{FeatureFixing as Ar}from"./pages/FeatureFixing.mjs";import{NotAuthorized as jr}from"./pages/NotAuthorized.mjs";import{NotFound as Mr}from"./pages/NotFound.mjs";import{n as Nr,r as Pr,t as Fr}from"./alert-OD1KJTEV.mjs";import{LoginPage as Ir}from"./pages/LoginPage.mjs";import{RegisterPage as Lr}from"./pages/RegisterPage.mjs";import{InputOTP as Rr,InputOTPGroup as zr,InputOTPSeparator as Br,InputOTPSlot as Vr}from"./ui/input-otp.mjs";import{VerifyEmailPage as Hr}from"./pages/VerifyEmailPage.mjs";import{Google as Ur}from"./systems/google.mjs";import{AddNewBtn as Wr}from"./ui/buttons/add-new.mjs";import{EditBtn as Gr}from"./ui/buttons/edit.mjs";import{RefreshBtn as Kr}from"./ui/buttons/refresh.mjs";import{TrashBtn as qr}from"./ui/buttons/trash.mjs";import{UploadImageBtn as Jr}from"./ui/buttons/upload-image.mjs";import{SearchInput as Yr}from"./ui/inputs/search-input.mjs";import{AspectRatio as Xr}from"./ui/aspect-ratio.mjs";import{Breadcrumb as Zr,BreadcrumbEllipsis as Qr,BreadcrumbItem as $r,BreadcrumbLink as ei,BreadcrumbList as ti,BreadcrumbPage as ni,BreadcrumbSeparator as ri}from"./ui/breadcrumb.mjs";import{ButtonGroup as ii,ButtonGroupSeparator as ai,ButtonGroupText as oi,buttonGroupVariants as si}from"./ui/button-group.mjs";import{Carousel as ci,CarouselContent as li,CarouselItem as ui,CarouselNext as di,CarouselPrevious as fi}from"./ui/carousel.mjs";import{Collapsible as pi,CollapsibleContent as mi,CollapsibleTrigger as hi}from"./ui/collapsible.mjs";import{ContextMenu as gi,ContextMenuCheckboxItem as _i,ContextMenuContent as vi,ContextMenuGroup as yi,ContextMenuItem as bi,ContextMenuLabel as xi,ContextMenuPortal as Si,ContextMenuRadioGroup as Ci,ContextMenuRadioItem as wi,ContextMenuSeparator as Ti,ContextMenuShortcut as Ei,ContextMenuSub as Di,ContextMenuSubContent as Oi,ContextMenuSubTrigger as ki,ContextMenuTrigger as Ai}from"./ui/context-menu.mjs";import{Empty as ji,EmptyContent as Mi,EmptyDescription as Ni,EmptyHeader as Pi,EmptyMedia as Fi,EmptyTitle as Ii}from"./ui/empty.mjs";import{FileUploader as Li}from"./ui/file-uploader.mjs";import{Form as Ri,FormControl as zi,FormDescription as Bi,FormField as Vi,FormItem as Hi,FormLabel as Ui,FormMessage as Wi,useFormField as Gi}from"./ui/form.mjs";import{HoverCard as Ki,HoverCardContent as qi,HoverCardTrigger as Ji}from"./ui/hover-card.mjs";import{Item as Yi,ItemActions as Xi,ItemContent as Zi,ItemDescription as Qi,ItemFooter as $i,ItemGroup as ea,ItemHeader as ta,ItemMedia as na,ItemSeparator as ra,ItemTitle as ia}from"./ui/item.mjs";import{Menubar as aa,MenubarCheckboxItem as oa,MenubarContent as sa,MenubarGroup as ca,MenubarItem as la,MenubarLabel as ua,MenubarMenu as da,MenubarPortal as fa,MenubarRadioGroup as pa,MenubarRadioItem as ma,MenubarSeparator as ha,MenubarShortcut as ga,MenubarSub as _a,MenubarSubContent as va,MenubarSubTrigger as ya,MenubarTrigger as ba}from"./ui/menubar.mjs";import{MultipleSelector as xa,useDebounce as Sa}from"./ui/multi-select.mjs";import{NavigationMenu as Ca,NavigationMenuContent as wa,NavigationMenuIndicator as Ta,NavigationMenuItem as Ea,NavigationMenuLink as Da,NavigationMenuList as Oa,NavigationMenuTrigger as ka,NavigationMenuViewport as Aa,navigationMenuTriggerStyle as ja}from"./ui/navigation-menu.mjs";import{Pagination as Ma,PaginationContent as Na,PaginationEllipsis as Pa,PaginationItem as Fa,PaginationLink as Ia,PaginationNext as La,PaginationPrevious as Ra}from"./ui/pagination.mjs";import{ScrollArea as za,ScrollBar as Ba}from"./ui/scroll-area.mjs";import{Slider as Va}from"./ui/slider.mjs";import{Toaster as Ha,toast as Ua}from"./ui/sonner.mjs";import{Table as Wa,TableBody as Ga,TableCaption as Ka,TableCell as qa,TableFooter as Ja,TableHead as Ya,TableHeader as Xa,TableRow as Za}from"./ui/table.mjs";import{Tabs as Qa,TabsContent as $a,TabsList as eo,TabsTrigger as to}from"./ui/tabs.mjs";import{Toggle as no,toggleVariants as ro}from"./ui/toggle.mjs";import{ToggleGroup as io,ToggleGroupItem as ao}from"./ui/toggle-group.mjs";export{Wr as AddNewBtn,Fr as Alert,Nr as AlertDescription,I as AlertDialog,L as AlertDialogAction,R as AlertDialogCancel,z as AlertDialogContent,B as AlertDialogDescription,V as AlertDialogFooter,H as AlertDialogHeader,U as AlertDialogOverlay,W as AlertDialogPortal,G as AlertDialogTitle,K as AlertDialogTrigger,Pr as AlertTitle,In as ArrayCol,Sn as ArrayHeaderRow,Xr as AspectRatio,M as Avatar,N as AvatarFallback,P as AvatarImage,b as Badge,Zr as Breadcrumb,Qr as BreadcrumbEllipsis,$r as BreadcrumbItem,ei as BreadcrumbLink,ti as BreadcrumbList,ni as BreadcrumbPage,ri as BreadcrumbSeparator,e as Button,ii as ButtonGroup,ai as ButtonGroupSeparator,oi as ButtonGroupText,Er as CMSLayout,yr as Calendar,br as CalendarDayButton,r as Card,i as CardAction,a as CardContent,o as CardDescription,s as CardFooter,c as CardHeader,l as CardTitle,ci as Carousel,li as CarouselContent,ui as CarouselItem,di as CarouselNext,fi as CarouselPrevious,Yt as Checkbox,bn as CheckboxField,pi as Collapsible,mi as CollapsibleContent,hi as CollapsibleTrigger,Nn as ComboboxField,Fe as Command,Ie as CommandDialog,Le as CommandEmpty,Re as CommandGroup,ze as CommandInput,Be as CommandItem,Ve as CommandList,He as CommandSeparator,Ue as CommandShortcut,q as ConfirmDialog,gi as ContextMenu,_i as ContextMenuCheckboxItem,vi as ContextMenuContent,yi as ContextMenuGroup,bi as ContextMenuItem,xi as ContextMenuLabel,Si as ContextMenuPortal,Ci as ContextMenuRadioGroup,wi as ContextMenuRadioItem,Ti as ContextMenuSeparator,Ei as ContextMenuShortcut,Di as ContextMenuSub,Oi as ContextMenuSubContent,ki as ContextMenuSubTrigger,Ai as ContextMenuTrigger,g as CountryDisplay,_ as DataList,v as DataListItem,y as DateDisplay,ir as DateField,E as DateTooltip,_e as Description,ve as DescriptionBadge,ye as DescriptionBoolean,be as DescriptionCopy,xe as DescriptionDate,Se as DescriptionEmpty,Ce as DescriptionHeader,we as DescriptionImages,Te as DescriptionItem,Ee as DescriptionLink,De as DescriptionLongText,Oe as DescriptionName,ke as DescriptionNumberPhone,Ae as DescriptionSection,je as DescriptionStatistic,Me as DescriptionStatus,Ne as DescriptionTagList,Pe as DescriptionUser,ie as DetailDialog,oe as Dialog,se as DialogClose,ce as DialogContent,le as DialogDescription,ue as DialogFooter,de as DialogHeader,fe as DialogOverlay,pe as DialogPortal,me as DialogTitle,he as DialogTrigger,lr as Drawer,ur as DrawerClose,dr as DrawerContent,fr as DrawerDescription,pr as DrawerFooter,mr as DrawerHeader,hr as DrawerOverlay,gr as DrawerPortal,_r as DrawerTitle,vr as DrawerTrigger,Nt as DropdownMenu,Pt as DropdownMenuCheckboxItem,Ft as DropdownMenuContent,It as DropdownMenuGroup,Lt as DropdownMenuItem,Rt as DropdownMenuLabel,zt as DropdownMenuPortal,Bt as DropdownMenuRadioGroup,Vt as DropdownMenuRadioItem,Ht as DropdownMenuSeparator,Ut as DropdownMenuShortcut,Wt as DropdownMenuSub,Gt as DropdownMenuSubContent,Kt as DropdownMenuSubTrigger,qt as DropdownMenuTrigger,Gr as EditBtn,vn as EmailField,ji as Empty,Mi as EmptyContent,Ni as EmptyDescription,D as EmptyDisplay,Pi as EmptyHeader,Fi as EmptyMedia,Ii as EmptyTitle,ae as ErrorDialog,kr as FeatureDeveloping,Ar as FeatureFixing,En as Field,jn as FieldContent,sr as FieldContentMain,_n as FieldError,Fn as FieldGroup,Cn as FieldLabel,Pn as FieldSeparator,Li as FileUploader,h as Flex,Ri as Form,zi as FormControl,Bi as FormDescription,Vi as FormField,Hi as FormItem,Ui as FormLabel,Wi as FormMessage,Ur as Google,Or as Grid,f as GridProductCard,Ki as HoverCard,qi as HoverCardContent,Ji as HoverCardTrigger,d as Image,en as Input,Rr as InputOTP,zr as InputOTPGroup,Br as InputOTPSeparator,Vr as InputOTPSlot,Yi as Item,Xi as ItemActions,Zi as ItemContent,Qi as ItemDescription,$i as ItemFooter,ea as ItemGroup,ta as ItemHeader,na as ItemMedia,ra as ItemSeparator,ia as ItemTitle,tn as Label,ge as LoadingDialog,Ir as LoginPage,aa as Menubar,oa as MenubarCheckboxItem,sa as MenubarContent,ca as MenubarGroup,la as MenubarItem,ua as MenubarLabel,da as MenubarMenu,fa as MenubarPortal,pa as MenubarRadioGroup,ma as MenubarRadioItem,ha as MenubarSeparator,ga as MenubarShortcut,_a as MenubarSub,va as MenubarSubContent,ya as MenubarSubTrigger,ba as MenubarTrigger,xa as MultipleSelector,O as NameDisplay,Ca as NavigationMenu,wa as NavigationMenuContent,Ta as NavigationMenuIndicator,Ea as NavigationMenuItem,Da as NavigationMenuLink,Oa as NavigationMenuList,ka as NavigationMenuTrigger,Aa as NavigationMenuViewport,jr as NotAuthorized,Mr as NotFound,Mn as NumberField,Ma as Pagination,Na as PaginationContent,Pa as PaginationEllipsis,Fa as PaginationItem,Ia as PaginationLink,La as PaginationNext,Ra as PaginationPrevious,t as Paragraph,ar as PasswordField,Dr as PaymentLayout,k as PhoneNumberDisplay,nn as Popover,rn as PopoverAnchor,an as PopoverClose,on as PopoverContent,sn as PopoverTrigger,p as ProductCard,Jt as Progress,xr as RadioGroup,zn as RadioGroupField,Sr as RadioGroupItem,Kr as RefreshBtn,Lr as RegisterPage,Zt as ResizableHandle,Qt as ResizablePanel,$t as ResizablePanelGroup,A as RoleBadge,za as ScrollArea,Ba as ScrollBar,Yr as SearchInput,We as SearchModal,cn as Select,ln as SelectContent,or as SelectField,un as SelectGroup,dn as SelectItem,fn as SelectLabel,pn as SelectSeparator,mn as SelectTrigger,hn as SelectValue,Y as Separator,X as Sheet,Z as SheetClose,Q as SheetContent,$ as SheetDescription,ee as SheetFooter,te as SheetHeader,ne as SheetTitle,re as SheetTrigger,Tn as SimpleArrayField,wn as SimpleBooleanField,m as SimpleCard,xn as SimpleComboboxField,An as SimpleDateField,Dn as SimpleEmailField,Kn as SimpleNumberField,gn as SimplePasswordField,On as SimpleRadioGroupField,qn as SimpleSelectField,yn as SimpleTextField,kn as SimpleTextareaField,u as Skeleton,Va as Slider,Xt as Spinner,j as Statistic,cr as Switch,rr as SwitchField,Wa as Table,Ga as TableBody,Ka as TableCaption,qa as TableCell,Ja as TableFooter,Ya as TableHead,Xa as TableHeader,Za as TableRow,Qa as Tabs,$a as TabsContent,eo as TabsList,to as TabsTrigger,Yn as TanStackActionSubmit,Qn as TanStackActionsForm,Hn as TanStackCardForm,Vn as TanStackContainerForm,nr as TanStackDialogForm,Jn as TanStackFieldGroup,Bn as TanStackPopoverForm,er as TanStackSectionForm,Zn as TanStackTitleField,Tr as TextEditor,Wn as TextEditorField,wr as TextEditorToolbar,Ln as TextField,Cr as Textarea,Un as TextareaField,J as Title,Ha as Toaster,no as Toggle,io as ToggleGroup,ao as ToggleGroupItem,S as Tooltip,C as TooltipContent,w as TooltipProvider,T as TooltipTrigger,qr as TrashBtn,Tt as UITableAnalysisPanel,Ze as UITableAvatarNameDisplay,st as UITableBadgeDisplay,ot as UITableBody,Ke as UITableBooleanDisplay,kt as UITableCell,qe as UITableCellActions,at as UITableCellSelect,dt as UITableContainer,Mt as UITableCurrencyDisplay,it as UITableDateDisplay,$e as UITableDescriptionDisplay,Qe as UITableEmailDisplay,At as UITableEmptyDisplay,St as UITableFilter,ut as UITableFooter,jt as UITableFooterRow,Ot as UITableHead,mt as UITableHeadCell,ct as UITableHeadCellOption,ht as UITableHeadCellSelect,bt as UITableHeadRow,Ct as UITableInnerTable,pt as UITableInnerWrapper,Xe as UITableListDisplay,ft as UITableLoadMore,rt as UITableMoreButton,tt as UITableNameDisplay,et as UITablePermalink,_t as UITablePhoneNumberDisplay,Ge as UITableProgressDisplay,lt as UITableProvider,vt as UITableRemoveButton,Dt as UITableRow,nt as UITableStatisticDisplay,Je as UITableStatusDisplay,gt as UITableSummaryBar,Et as UITableTooltip,xt as UITableTooltipActions,wt as UITableTooltipFilter,Ye as UITableUserDataDisplay,yt as UITableWrapper,Jr as UploadImageBtn,F as UserDataDisplay,Hr as VerifyEmailPage,x as badgeVariants,si as buttonGroupVariants,ja as navigationMenuTriggerStyle,n as paragraphVariants,Ua as toast,ro as toggleVariants,Sa as useDebounce,Gi as useFormField,tr as useTanStackFieldContext,Xn as useTanStackForm,$n as useTanStackFormContext,Gn as withTanStackFieldGroup,Rn as withTanStackForm};
1
+ import{Button as e}from"./ui/button.mjs";import{Paragraph as t,paragraphVariants as n}from"./typography/paragraph.mjs";import{Card as r,CardAction as i,CardContent as a,CardDescription as o,CardFooter as s,CardHeader as c,CardTitle as l}from"./ui/card.mjs";import{Skeleton as u}from"./ui/skeleton.mjs";import{Image as d}from"./ui/image.mjs";import{GridProductCard as f}from"./cards/grid-product-card.mjs";import{ProductCard as p}from"./cards/product-card.mjs";import{SimpleCard as m}from"./cards/simple-card.mjs";import{Flex as h}from"./layouts/flex.mjs";import{CountryDisplay as g}from"./data-display/country.mjs";import{DataList as _,DataListItem as v}from"./data-display/data-list.mjs";import{t as y}from"./date-Nsz0Pewe.mjs";import{Badge as b,badgeVariants as x}from"./ui/badge.mjs";import{Tooltip as S,TooltipContent as C,TooltipProvider as w,TooltipTrigger as T}from"./ui/tooltip.mjs";import{DateTooltip as E}from"./data-display/date-tooltip.mjs";import{EmptyDisplay as D}from"./data-display/empty.mjs";import{NameDisplay as O}from"./data-display/name.mjs";import{PhoneNumberDisplay as k}from"./data-display/phone-number.mjs";import{RoleBadge as A}from"./data-display/role-badge.mjs";import{Statistic as j}from"./data-display/statistic.mjs";import{Avatar as M,AvatarFallback as N,AvatarImage as P}from"./ui/avatar.mjs";import{UserDataDisplay as F}from"./data-display/user.mjs";import{AlertDialog as I,AlertDialogAction as L,AlertDialogCancel as R,AlertDialogContent as z,AlertDialogDescription as B,AlertDialogFooter as V,AlertDialogHeader as H,AlertDialogOverlay as U,AlertDialogPortal as W,AlertDialogTitle as G,AlertDialogTrigger as K}from"./ui/alert-dialog.mjs";import{ConfirmDialog as q}from"./dialogs/confirm-dialog.mjs";import{Title as J}from"./typography/title.mjs";import{Separator as Y}from"./ui/separator.mjs";import{Sheet as X,SheetClose as Z,SheetContent as Q,SheetDescription as $,SheetFooter as ee,SheetHeader as te,SheetTitle as ne,SheetTrigger as re}from"./ui/sheet.mjs";import{DetailDialog as ie}from"./dialogs/detail-dialog/index.mjs";import{ErrorDialog as ae}from"./dialogs/error-dialog.mjs";import{Dialog as oe,DialogClose as se,DialogContent as ce,DialogDescription as le,DialogFooter as ue,DialogHeader as de,DialogOverlay as fe,DialogPortal as pe,DialogTitle as me,DialogTrigger as he}from"./ui/dialog.mjs";import{LoadingDialog as ge}from"./dialogs/loading-dialog.mjs";import{Description as _e,DescriptionBadge as ve,DescriptionBoolean as ye,DescriptionCopy as be,DescriptionDate as xe,DescriptionEmpty as Se,DescriptionHeader as Ce,DescriptionImages as we,DescriptionItem as Te,DescriptionLink as Ee,DescriptionLongText as De,DescriptionName as Oe,DescriptionNumberPhone as ke,DescriptionSection as Ae,DescriptionStatistic as je,DescriptionStatus as Me,DescriptionTagList as Ne,DescriptionUser as Pe}from"./features/descriptions/index.mjs";import{Command as Fe,CommandDialog as Ie,CommandEmpty as Le,CommandGroup as Re,CommandInput as ze,CommandItem as Be,CommandList as Ve,CommandSeparator as He,CommandShortcut as Ue}from"./ui/command.mjs";import{t as We}from"./search-modal-Cdmi2iyV.mjs";import{A as Ge,B as Ke,C as qe,D as Je,E as Ye,F as Xe,H as Ze,I as Qe,L as $e,M as et,N as tt,O as nt,P as rt,R as it,S as at,T as ot,U as st,V as ct,W as lt,_ as ut,a as dt,b as ft,c as pt,d as mt,f as ht,g as gt,h as _t,i as vt,j as yt,k as bt,l as xt,m as St,n as Ct,o as wt,p as Tt,r as Et,s as Dt,t as Ot,u as kt,v as At,w as jt,x as Mt,y as Nt,z as Pt}from"./tables-UaA4qIaD.mjs";import{DropdownMenu as Ft,DropdownMenuCheckboxItem as It,DropdownMenuContent as Lt,DropdownMenuGroup as Rt,DropdownMenuItem as zt,DropdownMenuLabel as Bt,DropdownMenuPortal as Vt,DropdownMenuRadioGroup as Ht,DropdownMenuRadioItem as Ut,DropdownMenuSeparator as Wt,DropdownMenuShortcut as Gt,DropdownMenuSub as Kt,DropdownMenuSubContent as qt,DropdownMenuSubTrigger as Jt,DropdownMenuTrigger as Yt}from"./ui/dropdown-menu.mjs";import{Progress as Xt}from"./ui/progress.mjs";import{Switch as Zt}from"./ui/switch.mjs";import{Checkbox as Qt}from"./ui/checkbox.mjs";import{Spinner as $t}from"./ui/spinner.mjs";import{ResizableHandle as en,ResizablePanel as tn,ResizablePanelGroup as nn}from"./ui/resizable.mjs";import{Input as rn}from"./ui/input.mjs";import{Label as an}from"./ui/label.mjs";import{Popover as on,PopoverAnchor as sn,PopoverClose as cn,PopoverContent as ln,PopoverTrigger as un}from"./ui/popover.mjs";import{Select as dn,SelectContent as fn,SelectGroup as pn,SelectItem as mn,SelectLabel as hn,SelectSeparator as gn,SelectTrigger as _n,SelectValue as vn}from"./ui/select.mjs";import{A as yn,B as bn,C as xn,D as Sn,E as Cn,F as wn,G as Tn,H as En,I as Dn,K as On,L as kn,M as An,N as jn,O as Mn,P as Nn,R as Pn,S as Fn,T as In,U as Ln,V as Rn,W as zn,_ as Bn,a as Vn,b as Hn,c as Un,d as Wn,f as Gn,g as Kn,h as qn,i as Jn,j as Yn,k as Xn,l as Zn,m as Qn,n as $n,o as er,p as tr,r as nr,s as rr,t as ir,u as ar,v as or,w as sr,x as cr,y as lr,z as ur}from"./tanstack-form-DTCgWGCA.mjs";import{Drawer as dr,DrawerClose as fr,DrawerContent as pr,DrawerDescription as mr,DrawerFooter as hr,DrawerHeader as gr,DrawerOverlay as _r,DrawerPortal as vr,DrawerTitle as yr,DrawerTrigger as br}from"./ui/drawer.mjs";import{Calendar as xr,CalendarDayButton as Sr}from"./ui/calendar.mjs";import{RadioGroup as Cr,RadioGroupItem as wr}from"./ui/radio-group.mjs";import{Textarea as Tr}from"./ui/textarea.mjs";import{n as Er,t as Dr}from"./text-editor-BQtIXOpM.mjs";import{t as Or}from"./cms-layout-IwpD0LvR.mjs";import{t as kr}from"./payment-layout-CG_l7Es-.mjs";import{Grid as Ar}from"./layouts/grid.mjs";import{FeatureDeveloping as jr}from"./pages/FeatureDeveloping.mjs";import{FeatureFixing as Mr}from"./pages/FeatureFixing.mjs";import{NotAuthorized as Nr}from"./pages/NotAuthorized.mjs";import{NotFound as Pr}from"./pages/NotFound.mjs";import{n as Fr,r as Ir,t as Lr}from"./alert-OD1KJTEV.mjs";import{LoginPage as Rr}from"./pages/LoginPage.mjs";import{RegisterPage as zr}from"./pages/RegisterPage.mjs";import{InputOTP as Br,InputOTPGroup as Vr,InputOTPSeparator as Hr,InputOTPSlot as Ur}from"./ui/input-otp.mjs";import{VerifyEmailPage as Wr}from"./pages/VerifyEmailPage.mjs";import{Google as Gr}from"./systems/google.mjs";import{AddNewBtn as Kr}from"./ui/buttons/add-new.mjs";import{EditBtn as qr}from"./ui/buttons/edit.mjs";import{RefreshBtn as Jr}from"./ui/buttons/refresh.mjs";import{TrashBtn as Yr}from"./ui/buttons/trash.mjs";import{UploadImageBtn as Xr}from"./ui/buttons/upload-image.mjs";import{SearchInput as Zr}from"./ui/inputs/search-input.mjs";import{AspectRatio as Qr}from"./ui/aspect-ratio.mjs";import{Breadcrumb as $r,BreadcrumbEllipsis as ei,BreadcrumbItem as ti,BreadcrumbLink as ni,BreadcrumbList as ri,BreadcrumbPage as ii,BreadcrumbSeparator as ai}from"./ui/breadcrumb.mjs";import{ButtonGroup as oi,ButtonGroupSeparator as si,ButtonGroupText as ci,buttonGroupVariants as li}from"./ui/button-group.mjs";import{Carousel as ui,CarouselContent as di,CarouselItem as fi,CarouselNext as pi,CarouselPrevious as mi}from"./ui/carousel.mjs";import{Collapsible as hi,CollapsibleContent as gi,CollapsibleTrigger as _i}from"./ui/collapsible.mjs";import{ContextMenu as vi,ContextMenuCheckboxItem as yi,ContextMenuContent as bi,ContextMenuGroup as xi,ContextMenuItem as Si,ContextMenuLabel as Ci,ContextMenuPortal as wi,ContextMenuRadioGroup as Ti,ContextMenuRadioItem as Ei,ContextMenuSeparator as Di,ContextMenuShortcut as Oi,ContextMenuSub as ki,ContextMenuSubContent as Ai,ContextMenuSubTrigger as ji,ContextMenuTrigger as Mi}from"./ui/context-menu.mjs";import{Empty as Ni,EmptyContent as Pi,EmptyDescription as Fi,EmptyHeader as Ii,EmptyMedia as Li,EmptyTitle as Ri}from"./ui/empty.mjs";import{FileUploader as zi}from"./ui/file-uploader.mjs";import{Form as Bi,FormControl as Vi,FormDescription as Hi,FormField as Ui,FormItem as Wi,FormLabel as Gi,FormMessage as Ki,useFormField as qi}from"./ui/form.mjs";import{HoverCard as Ji,HoverCardContent as Yi,HoverCardTrigger as Xi}from"./ui/hover-card.mjs";import{Item as Zi,ItemActions as Qi,ItemContent as $i,ItemDescription as ea,ItemFooter as ta,ItemGroup as na,ItemHeader as ra,ItemMedia as ia,ItemSeparator as aa,ItemTitle as oa}from"./ui/item.mjs";import{Menubar as sa,MenubarCheckboxItem as ca,MenubarContent as la,MenubarGroup as ua,MenubarItem as da,MenubarLabel as fa,MenubarMenu as pa,MenubarPortal as ma,MenubarRadioGroup as ha,MenubarRadioItem as ga,MenubarSeparator as _a,MenubarShortcut as va,MenubarSub as ya,MenubarSubContent as ba,MenubarSubTrigger as xa,MenubarTrigger as Sa}from"./ui/menubar.mjs";import{MultipleSelector as Ca,useDebounce as wa}from"./ui/multi-select.mjs";import{NavigationMenu as Ta,NavigationMenuContent as Ea,NavigationMenuIndicator as Da,NavigationMenuItem as Oa,NavigationMenuLink as ka,NavigationMenuList as Aa,NavigationMenuTrigger as ja,NavigationMenuViewport as Ma,navigationMenuTriggerStyle as Na}from"./ui/navigation-menu.mjs";import{Pagination as Pa,PaginationContent as Fa,PaginationEllipsis as Ia,PaginationItem as La,PaginationLink as Ra,PaginationNext as za,PaginationPrevious as Ba}from"./ui/pagination.mjs";import{ScrollArea as Va,ScrollBar as Ha}from"./ui/scroll-area.mjs";import{Slider as Ua}from"./ui/slider.mjs";import{Toaster as Wa,toast as Ga}from"./ui/sonner.mjs";import{Table as Ka,TableBody as qa,TableCaption as Ja,TableCell as Ya,TableFooter as Xa,TableHead as Za,TableHeader as Qa,TableRow as $a}from"./ui/table.mjs";import{Tabs as eo,TabsContent as to,TabsList as no,TabsTrigger as ro}from"./ui/tabs.mjs";import{Toggle as io,toggleVariants as ao}from"./ui/toggle.mjs";import{ToggleGroup as oo,ToggleGroupItem as so}from"./ui/toggle-group.mjs";export{Kr as AddNewBtn,Lr as Alert,Fr as AlertDescription,I as AlertDialog,L as AlertDialogAction,R as AlertDialogCancel,z as AlertDialogContent,B as AlertDialogDescription,V as AlertDialogFooter,H as AlertDialogHeader,U as AlertDialogOverlay,W as AlertDialogPortal,G as AlertDialogTitle,K as AlertDialogTrigger,Ir as AlertTitle,zn as ArrayCol,Tn as ArrayHeaderRow,Qr as AspectRatio,M as Avatar,N as AvatarFallback,P as AvatarImage,b as Badge,$r as Breadcrumb,ei as BreadcrumbEllipsis,ti as BreadcrumbItem,ni as BreadcrumbLink,ri as BreadcrumbList,ii as BreadcrumbPage,ai as BreadcrumbSeparator,e as Button,oi as ButtonGroup,si as ButtonGroupSeparator,ci as ButtonGroupText,Or as CMSLayout,xr as Calendar,Sr as CalendarDayButton,r as Card,i as CardAction,a as CardContent,o as CardDescription,s as CardFooter,c as CardHeader,l as CardTitle,ui as Carousel,di as CarouselContent,fi as CarouselItem,pi as CarouselNext,mi as CarouselPrevious,Qt as Checkbox,Cn as CheckboxField,hi as Collapsible,gi as CollapsibleContent,_i as CollapsibleTrigger,In as ComboboxField,Fe as Command,Ie as CommandDialog,Le as CommandEmpty,Re as CommandGroup,ze as CommandInput,Be as CommandItem,Ve as CommandList,He as CommandSeparator,Ue as CommandShortcut,q as ConfirmDialog,vi as ContextMenu,yi as ContextMenuCheckboxItem,bi as ContextMenuContent,xi as ContextMenuGroup,Si as ContextMenuItem,Ci as ContextMenuLabel,wi as ContextMenuPortal,Ti as ContextMenuRadioGroup,Ei as ContextMenuRadioItem,Di as ContextMenuSeparator,Oi as ContextMenuShortcut,ki as ContextMenuSub,Ai as ContextMenuSubContent,ji as ContextMenuSubTrigger,Mi as ContextMenuTrigger,g as CountryDisplay,_ as DataList,v as DataListItem,y as DateDisplay,sr as DateField,E as DateTooltip,_e as Description,ve as DescriptionBadge,ye as DescriptionBoolean,be as DescriptionCopy,xe as DescriptionDate,Se as DescriptionEmpty,Ce as DescriptionHeader,we as DescriptionImages,Te as DescriptionItem,Ee as DescriptionLink,De as DescriptionLongText,Oe as DescriptionName,ke as DescriptionNumberPhone,Ae as DescriptionSection,je as DescriptionStatistic,Me as DescriptionStatus,Ne as DescriptionTagList,Pe as DescriptionUser,ie as DetailDialog,oe as Dialog,se as DialogClose,ce as DialogContent,le as DialogDescription,ue as DialogFooter,de as DialogHeader,fe as DialogOverlay,pe as DialogPortal,me as DialogTitle,he as DialogTrigger,dr as Drawer,fr as DrawerClose,pr as DrawerContent,mr as DrawerDescription,hr as DrawerFooter,gr as DrawerHeader,_r as DrawerOverlay,vr as DrawerPortal,yr as DrawerTitle,br as DrawerTrigger,Ft as DropdownMenu,It as DropdownMenuCheckboxItem,Lt as DropdownMenuContent,Rt as DropdownMenuGroup,zt as DropdownMenuItem,Bt as DropdownMenuLabel,Vt as DropdownMenuPortal,Ht as DropdownMenuRadioGroup,Ut as DropdownMenuRadioItem,Wt as DropdownMenuSeparator,Gt as DropdownMenuShortcut,Kt as DropdownMenuSub,qt as DropdownMenuSubContent,Jt as DropdownMenuSubTrigger,Yt as DropdownMenuTrigger,qr as EditBtn,xn as EmailField,Ni as Empty,Pi as EmptyContent,Fi as EmptyDescription,D as EmptyDisplay,Ii as EmptyHeader,Li as EmptyMedia,Ri as EmptyTitle,ae as ErrorDialog,jr as FeatureDeveloping,Mr as FeatureFixing,kn as Field,Pn as FieldContent,ur as FieldContentMain,bn as FieldError,Rn as FieldGroup,En as FieldLabel,Ln as FieldSeparator,zi as FileUploader,h as Flex,Bi as Form,Vi as FormControl,Hi as FormDescription,Ui as FormField,Wi as FormItem,Gi as FormLabel,Ki as FormMessage,Gr as Google,Ar as Grid,f as GridProductCard,Ji as HoverCard,Yi as HoverCardContent,Xi as HoverCardTrigger,d as Image,rn as Input,Br as InputOTP,Vr as InputOTPGroup,Hr as InputOTPSeparator,Ur as InputOTPSlot,Zi as Item,Qi as ItemActions,$i as ItemContent,ea as ItemDescription,ta as ItemFooter,na as ItemGroup,ra as ItemHeader,ia as ItemMedia,aa as ItemSeparator,oa as ItemTitle,an as Label,ge as LoadingDialog,Rr as LoginPage,sa as Menubar,ca as MenubarCheckboxItem,la as MenubarContent,ua as MenubarGroup,da as MenubarItem,fa as MenubarLabel,pa as MenubarMenu,ma as MenubarPortal,ha as MenubarRadioGroup,ga as MenubarRadioItem,_a as MenubarSeparator,va as MenubarShortcut,ya as MenubarSub,ba as MenubarSubContent,xa as MenubarSubTrigger,Sa as MenubarTrigger,Ca as MultipleSelector,O as NameDisplay,Ta as NavigationMenu,Ea as NavigationMenuContent,Da as NavigationMenuIndicator,Oa as NavigationMenuItem,ka as NavigationMenuLink,Aa as NavigationMenuList,ja as NavigationMenuTrigger,Ma as NavigationMenuViewport,Nr as NotAuthorized,Pr as NotFound,Fn as NumberField,Pa as Pagination,Fa as PaginationContent,Ia as PaginationEllipsis,La as PaginationItem,Ra as PaginationLink,za as PaginationNext,Ba as PaginationPrevious,t as Paragraph,cr as PasswordField,kr as PaymentLayout,k as PhoneNumberDisplay,on as Popover,sn as PopoverAnchor,cn as PopoverClose,ln as PopoverContent,un as PopoverTrigger,p as ProductCard,Xt as Progress,Cr as RadioGroup,Hn as RadioGroupField,wr as RadioGroupItem,Jr as RefreshBtn,zr as RegisterPage,en as ResizableHandle,tn as ResizablePanel,nn as ResizablePanelGroup,A as RoleBadge,Va as ScrollArea,Ha as ScrollBar,Zr as SearchInput,We as SearchModal,dn as Select,fn as SelectContent,lr as SelectField,pn as SelectGroup,mn as SelectItem,hn as SelectLabel,gn as SelectSeparator,_n as SelectTrigger,vn as SelectValue,Y as Separator,X as Sheet,Z as SheetClose,Q as SheetContent,$ as SheetDescription,ee as SheetFooter,te as SheetHeader,ne as SheetTitle,re as SheetTrigger,On as SimpleArrayField,Dn as SimpleBooleanField,m as SimpleCard,wn as SimpleComboboxField,Nn as SimpleDateField,An as SimpleEmailField,Yn as SimpleNumberField,yn as SimplePasswordField,jn as SimpleRadioGroupField,Xn as SimpleSelectField,Sn as SimpleTextField,Mn as SimpleTextareaField,u as Skeleton,Ua as Slider,$t as Spinner,j as Statistic,Zt as Switch,or as SwitchField,Ka as Table,qa as TableBody,Ja as TableCaption,Ya as TableCell,Xa as TableFooter,Za as TableHead,Qa as TableHeader,$a as TableRow,eo as Tabs,to as TabsContent,no as TabsList,ro as TabsTrigger,Qn as TanStackActionSubmit,tr as TanStackActionsForm,Gn as TanStackCardForm,Wn as TanStackContainerForm,ar as TanStackDialogForm,Zn as TanStackFieldGroup,Un as TanStackPopoverForm,rr as TanStackSectionForm,er as TanStackTitleField,Dr as TextEditor,qn as TextEditorField,Er as TextEditorToolbar,Bn as TextField,Tr as Textarea,Kn as TextareaField,J as Title,Wa as Toaster,io as Toggle,oo as ToggleGroup,so as ToggleGroupItem,S as Tooltip,C as TooltipContent,w as TooltipProvider,T as TooltipTrigger,Yr as TrashBtn,Dt as UITableAnalysisPanel,lt as UITableAvatarNameDisplay,st as UITableBadgeDisplay,ot as UITableBody,Ze as UITableBooleanDisplay,jt as UITableCell,qe as UITableCellActions,at as UITableCellSelect,pt as UITableContainer,ct as UITableCurrencyDisplay,Ke as UITableDateDisplay,Pt as UITableDescriptionDisplay,it as UITableEditButton,$e as UITableEmailDisplay,Mt as UITableEmptyDisplay,wt as UITableFilter,ft as UITableFooter,Nt as UITableFooterRow,At as UITableHead,gt as UITableHeadCell,ut as UITableHeadCellOption,_t as UITableHeadCellSelect,St as UITableHeadRow,Tt as UITableInnerTable,ht as UITableInnerWrapper,Qe as UITableListDisplay,mt as UITableLoadMore,Xe as UITableMoreButton,rt as UITableNameDisplay,tt as UITablePermalink,et as UITablePhoneNumberDisplay,yt as UITableProgressDisplay,dt as UITableProvider,Ge as UITableRemoveButton,kt as UITableRow,bt as UITableStatisticDisplay,nt as UITableStatusDisplay,vt as UITableSummaryBar,Je as UITableToggleButton,Ot as UITableTooltip,Ct as UITableTooltipActions,Et as UITableTooltipFilter,Ye as UITableUserDataDisplay,xt as UITableWrapper,Xr as UploadImageBtn,F as UserDataDisplay,Wr as VerifyEmailPage,x as badgeVariants,li as buttonGroupVariants,Na as navigationMenuTriggerStyle,n as paragraphVariants,Ga as toast,ao as toggleVariants,wa as useDebounce,qi as useFormField,ir as useTanStackFieldContext,$n as useTanStackForm,nr as useTanStackFormContext,Jn as withTanStackFieldGroup,Vn as withTanStackForm};
@@ -36,7 +36,7 @@ declare const ResizablePanelGroup: import("react").NamedExoticComponent<Omit<imp
36
36
  children?: import("react").ReactNode | undefined;
37
37
  } & import("react").RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
38
38
  /** An individual resizable panel within a ResizablePanelGroup. */
39
- declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLParagraphElement | HTMLElement | HTMLInputElement | HTMLButtonElement | HTMLFieldSetElement | HTMLLegendElement | HTMLDivElement | HTMLLabelElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
39
+ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLParagraphElement | HTMLElement | HTMLInputElement | HTMLDivElement | HTMLLabelElement | HTMLButtonElement | HTMLFieldSetElement | HTMLLegendElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
40
40
  className?: string;
41
41
  collapsedSize?: number | undefined;
42
42
  collapsible?: boolean | undefined;
@@ -61,4 +61,4 @@ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("
61
61
  declare const ResizableHandle: import("react").NamedExoticComponent<TResizableHandle>;
62
62
  //#endregion
63
63
  export { ResizablePanel as n, ResizablePanelGroup as r, ResizableHandle as t };
64
- //# sourceMappingURL=resizable-CNIYTd7k.d.cts.map
64
+ //# sourceMappingURL=resizable-CVpc0g5U.d.cts.map
@@ -36,7 +36,7 @@ declare const ResizablePanelGroup: import("react").NamedExoticComponent<Omit<imp
36
36
  children?: import("react").ReactNode | undefined;
37
37
  } & import("react").RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
38
38
  /** An individual resizable panel within a ResizablePanelGroup. */
39
- declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLParagraphElement | HTMLElement | HTMLInputElement | HTMLButtonElement | HTMLFieldSetElement | HTMLLegendElement | HTMLDivElement | HTMLLabelElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
39
+ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLParagraphElement | HTMLElement | HTMLInputElement | HTMLDivElement | HTMLLabelElement | HTMLButtonElement | HTMLFieldSetElement | HTMLLegendElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
40
40
  className?: string;
41
41
  collapsedSize?: number | undefined;
42
42
  collapsible?: boolean | undefined;
@@ -61,4 +61,4 @@ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("
61
61
  declare const ResizableHandle: import("react").NamedExoticComponent<TResizableHandle>;
62
62
  //#endregion
63
63
  export { ResizablePanel as n, ResizablePanelGroup as r, ResizableHandle as t };
64
- //# sourceMappingURL=resizable-CNIYTd7k.d.mts.map
64
+ //# sourceMappingURL=resizable-CVpc0g5U.d.mts.map
@@ -0,0 +1,4 @@
1
+ const e=require("./ui/button.cjs"),t=require("./typography/paragraph.cjs"),n=require("./layouts/flex.cjs"),r=require("./date-B3cozmfV.cjs"),i=require("./ui/badge.cjs"),a=require("./ui/tooltip.cjs"),o=require("./data-display/statistic.cjs"),s=require("./ui/avatar.cjs"),c=require("./ui/separator.cjs"),l=require("./ui/dropdown-menu.cjs"),u=require("./ui/progress.cjs"),d=require("./ui/switch.cjs"),f=require("./ui/checkbox.cjs"),p=require("./ui/spinner.cjs"),m=require("./ui/resizable.cjs"),h=require("./ui/input.cjs"),g=require("./ui/label.cjs"),_=require("./ui/popover.cjs"),v=require("./ui/select.cjs");let y=require("lucide-react"),b=require("react"),x=require("@customafk/react-toolkit/utils"),S=require("class-variance-authority"),C=require("react/jsx-runtime"),w=require("@customafk/react-toolkit/color-hash"),T=require("@tanstack/react-table"),E=require("@customafk/react-toolkit/hooks/useDebounceCallback");const ee=({name:e,avatarUrl:t,uuid:n})=>{let r=w.colorHashLight.hex(n??e);return(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,C.jsxs)(s.Avatar,{className:`size-8 shrink-0`,children:[(0,C.jsx)(s.AvatarImage,{src:t,alt:e}),(0,C.jsx)(s.AvatarFallback,{style:{backgroundColor:r},children:(0,C.jsx)(y.UserRoundIcon,{size:18,className:`text-white`})})]}),(0,C.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e})]})},D=()=>(0,C.jsxs)(`div`,{className:`flex gap-0 text-text-positive-weak`,children:[(0,C.jsx)(y.MinusIcon,{size:16}),(0,C.jsx)(y.MinusIcon,{size:16})]}),te=({label:e,onClick:t,onRemove:n})=>e?n?(0,C.jsxs)(`div`,{className:`flex w-fit gap-x-0.5 rounded-full border border-border py-1 pr-2 pl-3 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:[e,(0,C.jsx)(`button`,{className:`cursor-pointer text-text-positive-weak hover:text-text-positive-strong`,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,C.jsx)(y.XIcon,{size:12})})]}):(0,C.jsx)(`button`,{className:`w-fit rounded-full border border-border px-3 py-1 text-text-positive text-xs shadow-xs`,onClick:e=>{t?.(),e.stopPropagation(),e.preventDefault()},children:e}):(0,C.jsx)(D,{}),ne=({value:e})=>e==null?(0,C.jsx)(D,{}):e===!1?(0,C.jsx)(y.XIcon,{size:14,strokeWidth:2,className:`text-danger-strong`}):(0,C.jsx)(y.CheckIcon,{size:14,strokeWidth:2,className:`text-success-strong`}),re=(0,b.memo)(({value:e,currency:t=`USD`,locale:n=`en-US`,display:r=`symbol`,size:i=`md`,colorize:a=!1})=>{let o=(0,b.useMemo)(()=>{let i=typeof e==`string`?Number(e.trim()):e;return i==null||Number.isNaN(i)||!Number.isFinite(i)?null:new Intl.NumberFormat(n,{style:`currency`,currency:t,currencyDisplay:r,minimumFractionDigits:2,maximumFractionDigits:2}).format(i)},[e,t,n,r]),s=(0,b.useMemo)(()=>{let t=typeof e==`string`?Number(e.trim()):e;return typeof t==`number`&&t<0},[e]);return o?(0,C.jsx)(`p`,{className:(0,x.cn)(`font-number tabular-nums`,i===`xs`&&`text-xs`,i===`sm`&&`text-sm`,i===`md`&&`text-base`,i===`lg`&&`text-lg`,i===`xl`&&`text-xl`,!a&&`text-text-positive`,a&&s&&`text-danger-strong`,a&&!s&&`text-success-strong`),children:o}):(0,C.jsx)(D,{})});re.displayName=`UITableCurrencyDisplay`;const O=({date:e})=>e==null?(0,C.jsx)(D,{}):(0,C.jsx)(a.TooltipProvider,{children:(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{asChild:!0,children:(0,C.jsx)(i.Badge,{className:`h-fit`,children:(0,C.jsx)(r.t,{date:e,format:`medium`,className:`font-normal text-white`})})}),(0,C.jsx)(a.TooltipContent,{className:`rounded px-2`,children:(0,C.jsx)(r.t,{date:e,format:`full`,showTime:!0,className:`font-medium text-text-negative text-xs`})})]})}),ie=({content:e})=>e==null?(0,C.jsx)(D,{}):(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{children:(0,C.jsx)(t.Paragraph,{variant:`sm`,className:`line-clamp-2 whitespace-pre-line break-all`,children:e})}),(0,C.jsx)(a.TooltipContent,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,C.jsx)(t.Paragraph,{variant:`xs`,className:`whitespace-pre-line text-wrap break-keep text-text-negative-weak`,children:e}),(0,C.jsxs)(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),k=({title:t,onClick:n})=>(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{children:(0,C.jsx)(e.Button,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,onClick:(0,b.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,C.jsx)(y.PencilIcon,{})})}),(0,C.jsx)(a.TooltipContent,{children:(0,C.jsx)(`p`,{children:t||`Edit item`})})]}),ae=({email:e,linkable:t=!0})=>{let[n,r]=(0,b.useState)(!1);return e?(0,C.jsx)(a.TooltipProvider,{children:(0,C.jsxs)(`div`,{className:`group flex items-center gap-x-1.5`,children:[(0,C.jsx)(y.MailIcon,{size:13,className:`shrink-0 text-text-positive-weak`}),t?(0,C.jsx)(`a`,{href:`mailto:${e}`,className:`truncate text-primary text-sm underline-offset-2 hover:underline`,onClick:e=>e.stopPropagation(),children:e}):(0,C.jsx)(`span`,{className:`truncate text-text-positive text-sm`,children:e}),(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{asChild:!0,children:(0,C.jsx)(`button`,{onClick:t=>{t.stopPropagation(),t.preventDefault(),navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},className:`shrink-0 cursor-pointer text-text-positive-weak opacity-0 transition-opacity group-hover:opacity-100 hover:text-text-positive`,children:n?(0,C.jsx)(y.CheckIcon,{size:13,className:`text-success-strong`}):(0,C.jsx)(y.CopyIcon,{size:13})})}),(0,C.jsx)(a.TooltipContent,{children:n?`Copied!`:`Copy email`})]})]})}):(0,C.jsx)(D,{})},oe=({items:e,maxVisible:t=3})=>{if(!e||e.length===0)return(0,C.jsx)(D,{});let n=e.slice(0,t),r=e.slice(t);return(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[n.map((e,t)=>(0,C.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border bg-muted-weak px-2 py-0.5 text-text-positive text-xs`,children:e},t)),r.length>0&&(0,C.jsx)(a.TooltipProvider,{children:(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{asChild:!0,children:(0,C.jsxs)(`span`,{className:`inline-flex cursor-default items-center rounded-full bg-primary-bg-subtle px-2 py-0.5 text-primary-intense text-xs`,children:[`+`,r.length,` more`]})}),(0,C.jsx)(a.TooltipContent,{align:`start`,className:`flex max-w-64 flex-wrap gap-1 p-2`,children:r.map((e,t)=>(0,C.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border px-2 py-0.5 text-text-negative text-xs`,children:e},t))})]})})]})},se=({items:t=[]})=>(0,C.jsxs)(l.DropdownMenu,{children:[(0,C.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,C.jsx)(e.Button,{size:`sm`,variant:`ghost`,color:`secondary`,className:`size-9 rounded-full`,children:(0,C.jsx)(y.MoreVerticalIcon,{})})}),(0,C.jsx)(l.DropdownMenuContent,{children:(0,C.jsx)(l.DropdownMenuGroup,{children:t.map(e=>(0,C.jsx)(l.DropdownMenuItem,{className:`px-3`,onSelect:t=>{e.onClick(e.id),t.preventDefault(),t.stopPropagation()},children:e.label},e.id))})})]}),A=({name:e})=>e?(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{children:(0,C.jsx)(t.Paragraph,{variant:`sm`,className:`line-clamp-2 w-full truncate text-wrap pb-px text-start`,children:e})}),(0,C.jsx)(a.TooltipContent,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,C.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,C.jsxs)(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):(0,C.jsx)(D,{}),j=({href:e,label:t})=>(0,C.jsxs)(`a`,{href:e,target:`_blank`,className:`inline-flex items-center gap-1 truncate text-primary text-sm underline`,rel:`noopener noreferrer`,children:[(0,C.jsx)(`span`,{children:t||e}),(0,C.jsx)(y.ExternalLinkIcon,{size:14})]}),ce=({value:e})=>(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{asChild:!0,children:(0,C.jsx)(`p`,{className:`font-number text-text-positive text-sm tabular-nums`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,C.jsx)(a.TooltipContent,{align:`start`,children:(0,C.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),M=(0,b.memo)(({value:e,showLabel:t=!0,successThreshold:n=70,warningThreshold:r=40})=>{if(e==null)return(0,C.jsx)(D,{});let i=Math.min(100,Math.max(0,e));return(0,C.jsxs)(`div`,{className:`flex w-full min-w-24 items-center gap-x-2`,children:[(0,C.jsx)(u.Progress,{value:i,className:(0,x.cn)(`flex-1`,i>=n?`[&>[data-slot=progress-indicator]]:bg-success`:i>=r?`[&>[data-slot=progress-indicator]]:bg-warning`:`[&>[data-slot=progress-indicator]]:bg-danger`)}),t&&(0,C.jsxs)(`span`,{className:`w-9 shrink-0 text-right font-number text-text-positive-weak text-xs tabular-nums`,children:[i,`%`]})]})});M.displayName=`UITableProgressDisplay`;const N=({title:t,onClick:n})=>(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{children:(0,C.jsx)(e.Button,{type:`button`,variant:`ghost`,color:`danger`,size:`icon`,onClick:(0,b.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),await n?.()},[n]),children:(0,C.jsx)(y.Trash2Icon,{})})}),(0,C.jsx)(a.TooltipContent,{children:(0,C.jsx)(`p`,{children:t||`Remove item from list table`})})]}),P=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},F=(0,b.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:c=`lg`,value:l=0})=>{let u=(0,b.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),d=(0,b.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=P(e,a,o)),t.toLocaleString(`en-US`,u)},[o,u,a]),f=(0,b.useMemo)(()=>{if(typeof l==`number`)return Number.isNaN(l)||!Number.isFinite(l)?`N/A`:d(l);if(typeof l==`string`){let e=l.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:d(t)}return`N/A`},[l,d]),p=(0,b.useMemo)(()=>e===`.`&&t===`,`?f:f.replace(/,/g,t).replace(/\./g,e),[f,e,t]);return p===`0`||p===`N/A`||!p?(0,C.jsx)(D,{}):(0,C.jsxs)(n.Flex,{padding:`none`,className:(0,x.cn)(`font-number text-lg text-text-positive tabular-nums`,c===`xs`&&`text-xs`,c===`sm`&&`text-sm`,c===`md`&&`text-base`,c===`lg`&&`text-lg`,c===`xl`&&`text-xl`),children:[r,(0,C.jsx)(`p`,{children:p}),i]})});F.displayName=`UITableStatisticDisplay`;const le=({value:e,colorMap:t,defaultColor:n=`muted`,variant:r=`soft`})=>e==null||e===``?(0,C.jsx)(D,{}):(0,C.jsx)(i.Badge,{variant:r,color:(t&&t[e])??n,size:`sm`,className:`min-w-16 justify-center capitalize`,children:e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g,` `)}),I=({checked:e,titleOn:t,titleOff:n,disabled:r,onCheckedChange:i})=>{let o=(0,b.useCallback)(async e=>{await i?.(e)},[i]);return(0,C.jsxs)(a.Tooltip,{children:[(0,C.jsx)(a.TooltipTrigger,{asChild:!0,children:(0,C.jsx)(`span`,{onClick:(0,b.useCallback)(e=>{e.stopPropagation()},[]),children:(0,C.jsx)(d.Switch,{checked:e,disabled:r,onCheckedChange:o})})}),(0,C.jsx)(a.TooltipContent,{children:(0,C.jsx)(`p`,{children:e?t||`Turn off`:n||`Turn on`})})]})},L=({uuid:e,username:r,email:i})=>(0,C.jsxs)(n.Flex,{wrap:!1,gap:`sm`,padding:`none`,children:[!e&&(0,C.jsx)(s.Avatar,{className:`size-10 shadow-card`,children:(0,C.jsx)(s.AvatarFallback,{className:`bg-muted-weak`,children:(0,C.jsx)(y.UserRoundIcon,{size:28,className:`text-text-negative`})})}),e&&(0,C.jsx)(s.Avatar,{className:`size-10 shadow-card`,children:(0,C.jsx)(s.AvatarFallback,{style:{backgroundColor:w.colorHashLight.hex(e)},children:(0,C.jsx)(y.UserRoundIcon,{size:28,className:`text-white`})})}),(0,C.jsxs)(n.Flex,{vertical:!0,padding:`none`,gap:`none`,align:`start`,children:[(0,C.jsx)(t.Paragraph,{className:`font-medium text-sm text-text-positive-weak`,children:r??`Unknown User`}),(0,C.jsx)(t.Paragraph,{variant:`sm`,className:`mt-0! text-text-positive-weak text-xs`,children:i})]})]}),R=(0,b.createContext)(null),ue=()=>{let e=(0,b.use)(R);if(!e)throw Error(`useTableInnerWrapperContext must be used within a TableInnerWrapperProvider`);return e},z=(0,b.createContext)(null),B=()=>{let e=(0,b.use)(z);if(!e)throw Error(`useTableInnerTableContext must be used within a TableInnerTableProvider`);return e},V=(0,b.createContext)(null),H=()=>{let e=(0,b.use)(V);if(!e)throw Error(`useTableHeaderRowContext must be used within a TableHeaderRowProvider`);return e},U=(0,b.createContext)(null),W=()=>{let e=(0,b.use)(U);if(!e)throw Error(`useTableBodyContext must be used within a TableBodyProvider`);return e},G=(0,b.createContext)(null),K=()=>{let e=(0,b.use)(G);if(!e)throw Error(`useTableRowContext must be used within a TableRowProvider`);return e},de=(0,b.createContext)(null),q=()=>{let e=(0,b.use)(de);if(!e)throw Error(`useTableContext must be used within a TableProvider`);return e},fe=(0,b.createContext)(null),pe=()=>{let e=(0,b.use)(fe);if(!e)throw Error(`useUITableFilterContext must be used within a UITableProvider`);return e},me=(0,b.createContext)(null),he=()=>{let e=(0,b.use)(me);if(!e)throw Error(`useUITableAnalysisContext must be used within a UITableProvider`);return e},ge=(0,S.cva)([`absolute right-2 z-10 p-0.5 opacity-0 bg-card`,`cursor-pointer rounded-full transition-all`,`text-text-positive-weak`,`[&>svg]:size-4`,`group-hover:opacity-100`,`hover:bg-muted-muted hover:text-text-positive`]),_e=(0,S.cva)([`sticky left-0 flex flex-1 items-center justify-center bg-transparent text-text-positive-weak opacity-100`]),ve=(0,S.cva)([`relative m-0 flex size-full flex-col flex-nowrap items-start justify-start gap-2`]),ye=(0,S.cva)([`relative w-full flex-1 min-h-0 overflow-auto border-b border-b-border border-l border-l-border`]),be=(0,S.cva)([`grid w-full table-fixed caption-bottom border-collapse border-spacing-0 flex-col content-start`]),xe=(0,S.cva)([`sticky top-0 z-40 h-9 w-full`,`grid select-none bg-white`,`border-b border-b-border shadow`,`font-medium text-[13px] text-text-positive-weak`,`[&_tr:not(:last-child)_td]:border-b`,`[&_th]:inline-flex`,`[&_th]:bg-card`,`[&_th]:items-center`,`[&_th]:transition-all`,`[&_th]:duration-300`,`[&_th]:whitespace-nowrap`,`[&_th]:border-border`,`[&_th]:border-r`,`[&_th]:first:border-l-0`,`[&_tr_th:not([data-pinned=false])]:bg-card`]),Se=(0,S.cva)([`flex`]),Ce=(0,S.cva)([`group flex`],{variants:{isPinned:{left:`sticky`,right:`sticky`,false:`relative`},isActions:{true:`border-r-0!`,false:``},isLastCell:{true:``,false:``},isFirstCell:{true:``,false:``},position:{start:`justify-start`,center:`justify-center`,end:`justify-end`}},compoundVariants:[{isPinned:`left`,isLastCell:!0,className:`border-r border-r-border`},{isPinned:`right`,isFirstCell:!0,className:`border-l border-l-border`}]}),we=(0,S.cva)([`relative w-full`,`[&_tr]:flex`,`[&_tr]:flex-none`,`[&_tr]:w-full`,`[&_tr]:cursor-pointer [&_tr]:focus:outline-none`,`[&_tr]:border-b [&_tr]:border-b-border`,`[&_td]:z-10`,`[&_td]:transition-all`,`[&_td]:flex`,`[&_td]:flex-none`,`[&_td]:overflow-hidden`,`[&_td]:whitespace-nowrap`,`[&_td]:px-4`,`[&_td]:py-2.5`,`[&_td]:align-middle`,`[&_td]:border-border`,`[&_td]:data-[selected=true]:bg-muted-muted!`,`[&_td]:data-[selected=true]:hover:bg-muted-muted!`,`[&_td>div]:inline-flex`,`[&_td>div]:items-center`,`[&_td>div]:w-full`,`[&_td:not([data-pinned=false])]:z-20`,`[&_td:not([data-pinned=false])]:sticky`,`[&_td:not([data-pinned=false])]:bg-muted-bg-subtle`]),Te=(0,S.cva)([`group transition-colors hover:bg-muted-muted hover:[&_td]:bg-muted-muted! [&_td]:border-r [&_td]:border-r-border`]),J=(0,S.cva)([`group-hover:bg-muted-muted!`],{variants:{isPinned:{left:`sticky`,right:`sticky`,false:`relative`}},defaultVariants:{isPinned:void 0}}),Ee=(0,S.cva)([`sticky border-r-0! inset-y-0 right-0 z-30 flex items-center pr-4 group-hover:bg-muted-muted!`]),De=(0,S.cva)([`group-hover:bg-muted-muted!`],{variants:{isPinned:{left:``,right:``,false:``},isLastCell:{true:``,false:``},isFirstCell:{true:``,false:``}},compoundVariants:[{isPinned:`left`,isLastCell:!0,className:`border-r border-r-border`},{isPinned:`right`,isFirstCell:!0,className:`border-l border-l-border`}]}),Oe=(0,S.cva)([`overflow-x-hidden`],{variants:{position:{start:`justify-start`,center:`justify-center`,end:`justify-end`}},defaultVariants:{position:`start`}}),ke=(0,S.cva)([`shrink-0 flex w-full justify-center border-t border-border-weak font-medium`]),Ae=(0,S.cva)([`flex w-full`,`text-[13px] font-medium text-text-positive-weak`]),Y=(0,S.cva)([`flex flex-none items-center overflow-hidden whitespace-nowrap px-4 py-2`,`border-r border-r-border`],{variants:{isPinned:{left:`sticky z-20 bg-white`,right:`sticky z-20 bg-white`,false:`relative`},isFirstCell:{true:`border-l border-l-border`,false:``},isLastCell:{true:`border-r border-r-border`,false:``}}}),je=(0,S.cva)([`flex cursor-pointer gap-x-0.5`],{variants:{state:{idle:`text-text-positive-weak hover:text-text-positive`,fetching:`cursor-not-allowed`,error:`text-danger hover:text-danger-strong`}},defaultVariants:{state:`idle`}}),X=(0,b.memo)(({className:e,children:t,...n})=>{let{isFetching:r,isRefetching:i,isEmpty:a}=W();return a||r||i?null:(0,C.jsx)(`tbody`,{slot:`table-body`,className:(0,x.cn)(we(),e),...n,children:t})});X.displayName=`UITableBody`;const Me=(0,b.memo)(({isPinned:e=!1,isFirstCell:t=!1,isLastCell:n=!1,colId:r,position:i=`start`,column:a,getContext:o,...s})=>{let{innerTableId:c,table:l}=B(),u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=(0,b.useMemo)(()=>{let t=a?.getStart(`left`);return e===`left`&&typeof t==`number`?`${t}px`:void 0},[e,a]),p=(0,b.useMemo)(()=>{let t=a?.getAfter(`right`);return e===`right`&&typeof t==`number`?`${t}px`:void 0},[e,a]),m=(0,b.useMemo)(()=>`calc(var(--col-${r}-size) * 1px)`,[r]),h=(0,b.useMemo)(()=>a?.columnDef.minSize?`calc(var(--col-${r}-minSize) * 1px)`:void 0,[r,a]),g=(0,b.useMemo)(()=>a?.columnDef.maxSize?`calc(var(--col-${r}-maxSize) * 1px)`:void 0,[r,a]),_=(0,b.useMemo)(()=>(0,T.flexRender)(a?.columnDef.cell,o()),[a,o]);return(0,b.useEffect)(()=>{u.current=document.querySelector(`table[id="${c}"]`)},[c]),(0,b.useEffect)(()=>{if(!d.current)return;let e=d.current.scrollWidth,t=a?.getSize();t!=null&&e>t&&u.current instanceof HTMLTableElement&&typeof r==`string`&&a?.columnDef.meta?.fitContent&&l.setColumnSizing(t=>({...t,[r]:e+32}))},[r,a,l]),(0,C.jsx)(`td`,{slot:`table-body-cell`,"data-pinned":e,"data-lastcell":n||void 0,"data-firstcell":t||void 0,style:{left:f,right:p,width:m,minWidth:h,maxWidth:g},className:De({isPinned:e||void 0,isLastCell:n,isFirstCell:t}),...s,children:(0,C.jsx)(`div`,{ref:d,slot:`table-body-cell-inner`,className:Oe({position:i}),children:_})})});Me.displayName=`UITableCell`;const Ne=(0,b.memo)(({column:e,getContext:t,className:n,...r})=>{let i=(0,b.useMemo)(()=>(0,T.flexRender)(e?.columnDef.cell,t()),[e,t]);return(0,C.jsx)(`td`,{"data-col":`actions`,className:Ee(),...r,children:i})});Ne.displayName=`UITableCellActions`;const Pe=(0,b.memo)(({isPinned:e,isSelected:t=!1,className:n,onToggleRowSelected:r,...i})=>{let a=(0,b.useCallback)(e=>{r?.(!!e)},[r]);return(0,C.jsx)(`td`,{slot:`table-body-cell`,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:(0,x.cn)(J({isPinned:e}),n),...i,children:(0,C.jsx)(`div`,{"data-slot":`table-cell-inner`,className:`flex! w-full! items-center justify-center bg-transparent text-center align-middle`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,C.jsx)(f.Checkbox,{"aria-label":`Select Row`,checked:t,onCheckedChange:a})})})});Pe.displayName=`UITableCellSelect`;const Fe=(0,b.memo)(()=>{let{table:e,isFetching:t,isRefetching:n,loadingDisplayRow:r=3}=q();return!t&&!n?null:(0,C.jsx)(`tbody`,{className:(0,x.cn)(we(),`pointer-events-none`),children:Array.from({length:r}).map((t,n)=>(0,C.jsx)(`tr`,{"data-slot":`table-row`,"data-index":n,className:(0,x.cn)(Te(),`animate-pulse relative!`),children:e.getAllColumns().map((t,r)=>{let i=t.getIsPinned(),a=t.getStart(`left`),o=t.getAfter(`right`);return t.id===`actions`?(0,C.jsx)(`td`,{"data-slot":`table-body-cell`,"data-col":t.id,"data-cell":r,style:{width:60},className:Ee(),children:(0,C.jsx)(`div`,{className:`w-full h-4 bg-muted-muted rounded-full`})},`${t.id}-${r}`):t.id===`select`?(0,C.jsx)(`td`,{"data-slot":`table-body-cell`,"data-col":t.id,"data-cell":r,"data-pinned":!0,style:{left:0,zIndex:20,width:60,maxWidth:60},className:J({isPinned:`left`}),children:(0,C.jsx)(`div`,{className:`w-full flex justify-center`,children:(0,C.jsx)(`div`,{className:`size-4 bg-muted-muted rounded-full`})})},`${t.id}-${n}`):(0,C.jsx)(`td`,{"data-col":t.id,"data-cell":r,"data-selected":void 0,"data-lastcell":t.id===e.getAllColumns()[e.getAllColumns().length-1].id||void 0,"data-firstcell":t.id===e.getAllColumns()[0].id||void 0,style:{zIndex:i?20:0,left:i===`left`&&typeof a==`number`?`${a}px`:void 0,right:i===`right`&&typeof o==`number`?`${o}px`:void 0,width:`calc(var(--col-${t.id}-size) * 1px)`,minWidth:t.columnDef.minSize?`calc(var(--col-${t.id}-minSize) * 1px)`:void 0,maxWidth:t.columnDef.maxSize?`calc(var(--col-${t.id}-maxSize) * 1px)`:void 0},className:De({isPinned:t.getIsPinned(),isFirstCell:t.id===e.getRightHeaderGroups()[0]?.headers[0]?.id,isLastCell:t.id===e.getLeftHeaderGroups()[0]?.headers[e.getLeftHeaderGroups()[0].headers.length-1]?.id}),children:(0,C.jsx)(`div`,{className:Oe({position:t.columnDef.meta?.position??`start`}),children:(0,C.jsx)(`div`,{className:`w-full h-4 bg-muted-muted rounded-full`})})},`${t.id}-${r}`)})},n))})}),Ie=(0,b.memo)(()=>{let{isEmpty:e,emptyDisplayHeight:t}=q();return e?(0,C.jsx)(C.Fragment,{children:e&&(0,C.jsx)(`div`,{className:_e(),style:{minHeight:t??`24rem`},children:(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,C.jsx)(y.BoxIcon,{strokeWidth:1,size:48}),(0,C.jsx)(`p`,{children:`Không có dữ liệu`})]})})}):null});Ie.displayName=`UITableEmptyDisplay`;const Le=(0,b.memo)(({className:e,children:t,...n})=>(0,C.jsx)(`div`,{slot:`table-footer`,className:(0,x.cn)(ke(),e),...n,children:t}));Le.displayName=`UITableFooter`;function Re(e,t,n){switch(n){case`count`:return e;case`sum`:return t.reduce((e,t)=>e+t,0);case`avg`:return t.length===0?0:t.reduce((e,t)=>e+t,0)/t.length;case`min`:return t.length===0?0:Math.min(...t);case`max`:return t.length===0?0:Math.max(...t)}}function ze(e,t){return e.map(e=>{let n=e.getValue(t);return typeof n==`string`?Number(n):typeof n==`number`?n:NaN}).filter(e=>!Number.isNaN(e))}const Be=(0,b.memo)(()=>{let{table:e}=q(),{rowSelectionState:t}=W(),n=(0,b.useMemo)(()=>e.getHeaderGroups()[0]?.headers??[],[e.getHeaderGroups()]),r=(0,b.useMemo)(()=>n.some(e=>e.column.columnDef.meta?.aggregation),[n]),i=(0,b.useMemo)(()=>e.getSelectedRowModel().flatRows,[e,t]),a=(0,b.useMemo)(()=>e.getRowModel().rows,[e]),s=i.length>0?i:a,c=(0,b.useMemo)(()=>{let e={};for(let t of n){let n=t.column.columnDef.meta?.aggregation;if(!n)continue;let r=ze(s,t.id);e[t.id]=Re(s.length,r,n.type)}return e},[n,s]),l=e.getState().columnPinning,u=l.left??[],d=l.right??[],f=n.find(e=>d.includes(e.id))?.id,p=[...n].reverse().find(e=>u.includes(e.id))?.id;if(!r)return null;let m=i.length>0?`${i.length}`:`${a.length}`;return(0,C.jsx)(`div`,{slot:`table-footer-row`,className:Ae(),children:n.map(e=>{let t=e.id,n=u.includes(t)?`left`:d.includes(t)?`right`:!1,r=t===f,i=t===p,a=n===`left`?`${e.column.getStart(`left`)}px`:void 0,s=n===`right`?`${e.column.getAfter(`right`)}px`:void 0;if(t===`select`)return(0,C.jsx)(`div`,{slot:`table-footer-select`,"data-pinned":`left`,style:{left:`0px`,width:`60px`},className:(0,x.cn)(Y({isPinned:`left`,isFirstCell:!1,isLastCell:!1}),`justify-center`),children:(0,C.jsx)(`span`,{className:`truncate text-[11px] items-center text-text-positive-weak`,children:m})},t);if(t===`actions`)return(0,C.jsx)(`div`,{slot:`table-footer-actions`,style:{width:`calc(var(--col-${t}-size) * 1px)`,right:`0px`},className:Y({isPinned:!1,isFirstCell:!1,isLastCell:!1})},t);let l=e.column.columnDef.meta?.aggregation,h=c[t]??null;return(0,C.jsx)(`div`,{slot:`table-footer-cell`,"data-pinned":n,style:{left:a,right:s,width:`calc(var(--col-${t}-size) * 1px)`},className:Y({isPinned:n||`left`,isFirstCell:r,isLastCell:i}),children:l&&h!==null?(0,C.jsx)(o.Statistic,{value:h,prefix:l.prefix,suffix:l.suffix,precision:l.precision,size:`sm`}):(0,C.jsx)(`span`,{className:`text-text-positive-weak`,children:`—`})},t)})})});Be.displayName=`UITableFooterRow`;const Ve=(0,b.memo)(({className:e,children:t,...n})=>(0,C.jsx)(`thead`,{slot:`table-head`,className:(0,x.cn)(xe(),e),...n,children:t}));Ve.displayName=`UITableHead`;const He=(0,b.memo)(({isPinned:e,onLeftPin:t,onRightPin:n,onUnpin:r,className:i})=>{let a=(0,b.useCallback)(()=>{t?.(`left`)},[t]),o=(0,b.useCallback)(()=>{n?.(`right`)},[n]),s=(0,b.useCallback)(()=>{r?.(!1)},[r]);return(0,C.jsxs)(l.DropdownMenu,{children:[(0,C.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,C.jsx)(`button`,{type:`button`,className:(0,x.cn)(ge(),i),children:(0,C.jsx)(y.EllipsisVerticalIcon,{})})}),(0,C.jsx)(l.DropdownMenuContent,{align:`end`,className:`w-64 p-4`,children:(0,C.jsxs)(l.DropdownMenuGroup,{className:`*:data-[slot=dropdown-menu-item]:rounded-xs *:data-[slot=dropdown-menu-item]:p-2`,children:[(0,C.jsx)(b.Activity,{mode:e?`visible`:`hidden`,children:(0,C.jsxs)(l.DropdownMenuItem,{onClick:s,children:[!!e&&`Bỏ ghim`,(0,C.jsx)(l.DropdownMenuShortcut,{children:(0,C.jsx)(y.PinOffIcon,{className:`size-4`})})]})}),(0,C.jsxs)(b.Activity,{mode:e?`hidden`:`visible`,children:[(0,C.jsxs)(l.DropdownMenuItem,{onClick:a,children:[e?`Bỏ ghim`:`Ghim trái`,(0,C.jsx)(l.DropdownMenuShortcut,{children:(0,C.jsx)(y.MoveLeftIcon,{className:`size-4`})})]}),(0,C.jsxs)(l.DropdownMenuItem,{onClick:o,children:[e?`Bỏ ghim`:`Ghim phải`,(0,C.jsx)(l.DropdownMenuShortcut,{children:(0,C.jsx)(y.MoveRightIcon,{className:`size-4`})})]})]})]})})]})});He.displayName=`UITableHeadCellOption`;const Z=(0,b.memo)(({isVisible:e=!0,isPinned:t=!1,isFirstCell:n=!1,isLastCell:r=!1,isOptionsVisible:i=!0,headerId:a,headerColumn:o,className:s,children:c,onColumnPin:l,onToggleVisibility:u,...d})=>{let f=o?.columnDef.meta?.position;return(0,C.jsxs)(`th`,{slot:`table-head-cell`,"data-pinned":t,"data-header":a,style:{zIndex:(0,b.useMemo)(()=>t?20:void 0,[t]),left:(0,b.useMemo)(()=>{let e=o?.getStart?.(`left`);return t===`left`&&typeof e==`number`?`${e}px`:void 0},[t,o]),right:(0,b.useMemo)(()=>{let e=o?.getAfter?.(`right`);return t===`right`&&typeof e==`number`?`${e}px`:void 0},[t,o]),width:(0,b.useMemo)(()=>`calc(var(--header-${a}-size) * 1px)`,[a]),minWidth:(0,b.useMemo)(()=>o?.columnDef.minSize?`calc(var(--col-${a}-minSize) * 1px)`:void 0,[a,o]),maxWidth:(0,b.useMemo)(()=>o?.columnDef.maxSize?`calc(var(--col-${a}-maxSize) * 1px)`:void 0,[a,o])},className:(0,x.cn)(Ce({isPinned:t||`false`,isActions:a===`actions`,isLastCell:r,isFirstCell:n,position:f}),s),...d,children:[(0,C.jsx)(`div`,{className:`truncate px-4`,children:c}),i&&(0,C.jsx)(He,{isPinned:t,isVisible:e,onLeftPin:l,onRightPin:l,onUnpin:l})]})});Z.displayName=`UITableHeadCell`;const Ue=(0,b.memo)(({isPinned:e,isAllRowsSelected:t,style:n,onToggleAllRowsSelected:r,...i})=>{let a=(0,b.useCallback)(e=>{r?.(!!e)},[r]);return(0,C.jsx)(`th`,{slot:`table-header-cell`,"data-pinned":!0,style:{left:0,zIndex:40,width:60,maxWidth:60},className:J({isPinned:e}),...i,children:(0,C.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,C.jsx)(f.Checkbox,{"aria-label":`Select All Rows`,checked:t,onCheckedChange:a})})})});Ue.displayName=`UITableHeadCellSelect`;const We=(0,b.memo)(({headerGroup:e,className:t,...n})=>{let{isAllRowsSelected:r,columnPinningState:i,leftPinnedHeaders:a,rightPinnedHeaders:o,onToggleAllRowsSelected:s}=H(),c=o[0]?.id,l=a[a.length-1]?.id;return(0,C.jsx)(`tr`,{slot:`table-head-row`,className:(0,x.cn)(Se(),t),...n,children:e.headers.map((e,t)=>{let n=e.column.getIsVisible(),a=i.left?.includes(e.id)?`left`:i.right?.includes(e.id)?`right`:!1;return e.id===`select`?(0,C.jsx)(Ue,{isPinned:a,isAllRowsSelected:r,onToggleAllRowsSelected:s},e.id):(0,C.jsx)(Z,{isVisible:n,isPinned:a,isFirstCell:e.id===c,isLastCell:e.id===l,isOptionsVisible:![`select`,`actions`].includes(e.id),headerId:e.id,headerColumn:e.column,colSpan:e.colSpan,onColumnPin:e.column.pin,onToggleVisibility:e.column.toggleVisibility,children:(0,T.flexRender)(e.column.columnDef.header,e.getContext())},`${e.id}-${t}`)})})});We.displayName=`UITableHeadRow`;const Ge=(0,b.memo)(({children:e,...t})=>{let{table:n,innerTableId:r,totalSize:i}=B(),a=(0,b.useRef)(null);return(0,b.useEffect)(()=>{if(!a.current)return;let e=n.getFlatHeaders(),t,r=new ResizeObserver(r=>{t!==void 0&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=r[0];if(!t)return;let i=t.target;if(!(i instanceof HTMLTableElement))return;let a=t.contentRect.width,{left:o=[],right:s=[]}=n.getState().columnPinning,c=0,l=0,u=0,d=e.map(e=>{let{id:t}=e,n=t===`select`||t===`actions`,r=o.includes(t)||s.includes(t),i=e.getSize(),a=e.column.columnDef.maxSize;return n?(c+=60,{id:t,isFlex:!1,width:60}):r?(c+=i,{id:t,isFlex:!1,width:i}):e.column.columnDef.size||i!==150?(u+=i,{id:t,isFlex:!1,width:i}):(l++,{id:t,isFlex:!0,maxSize:a})}),f=a-c-u,p=l>0?Math.max(0,Math.floor(f/l)):0,m=i.closest(`[data-slot="table-scroll-host"]`);d.forEach(e=>{if(e.isFlex){let t=e.maxSize?Math.min(p,e.maxSize):p;i.style.setProperty(`--header-${e.id}-size`,`${t}`),i.style.setProperty(`--col-${e.id}-size`,`${t}`),m?.style.setProperty(`--col-${e.id}-size`,`${t}`),e.maxSize&&i.style.setProperty(`--col-${e.id}-maxSize`,`${e.maxSize}`)}else i.style.setProperty(`--header-${e.id}-size`,`${e.width}`),i.style.setProperty(`--col-${e.id}-size`,`${e.width}`),m?.style.setProperty(`--col-${e.id}-size`,`${e.width}`)})})});return r.observe(a.current),()=>{t!==void 0&&cancelAnimationFrame(t),r.disconnect()}},[n.getState().columnSizingInfo,n.getState().columnSizing,n.getState().columnPinning]),(0,C.jsx)(`table`,{id:r,ref:a,slot:`table-inner-table`,className:be(),style:{minWidth:i},...t,children:e})});Ge.displayName=`UITableInnerTable`;const Ke=(0,b.memo)(({children:e,...t})=>{let{innerWrapperId:n}=ue();return(0,C.jsx)(`div`,{id:n,slot:`table-inner-wrapper`,className:ye(),...t,children:e})});Ke.displayName=`UITableInnerWrapper`;const qe=(0,b.memo)(({fetchMoreData:e})=>{let{innerWrapperId:t}=ue(),[n,r]=(0,b.useState)(`idle`),[i,a]=(0,b.useState)(0),o=(0,b.useCallback)(async()=>{try{r(`fetching`),await e?.(),r(`idle`)}catch(e){console.error(`Error fetching more data:`,e),r(`error`)}},[e]);return(0,b.useEffect)(()=>{let e=document.querySelector(`div[id="${t}"]`);if(!e)return;let n=new ResizeObserver(e=>{a(e[0].contentRect.width)});return n.observe(e),()=>n.disconnect()},[t]),e?(0,C.jsx)(`tr`,{className:`sticky! left-0 h-10`,style:{width:i},children:(0,C.jsx)(`td`,{className:`absolute left-0 flex w-full items-center justify-center text-xs`,children:(0,C.jsxs)(`button`,{type:`button`,disabled:n===`fetching`,className:je({state:n}),onClick:o,children:[n===`idle`&&(0,C.jsx)(y.ChevronDown,{className:`size-4`}),n===`fetching`&&(0,C.jsx)(p.Spinner,{className:`size-4 animate-spin`}),n===`error`&&(0,C.jsx)(y.AlertTriangle,{className:`size-4 text-danger`}),n===`idle`&&`Tải thêm`,n===`fetching`&&`Đang tải...`,n===`error`&&`Lỗi! Thử lại?`]})})}):null});qe.displayName=`UITableLoadMore`;const Je=(0,b.memo)(({row:e,isSelected:t,rowIndex:n,children:r,...i})=>{let{keyOfClickRow:a,isAllRowsSelected:o,columnPinningState:s,leftPinnedHeaders:c,rightPinnedHeaders:l,onClickRow:u}=K(),d=(0,b.useMemo)(()=>s.left??[],[s]),f=(0,b.useMemo)(()=>s.right??[],[s]),p=(0,b.useMemo)(()=>l?.[0]?.id,[l]),m=(0,b.useMemo)(()=>c?.[c.length-1]?.id,[c]),h=(0,b.useMemo)(()=>e.getVisibleCells().some(e=>e.column.id===`select`),[e]),g=(0,b.useCallback)(t=>{if(u){let t=a?e.original?.[a]:void 0;u(n,typeof t==`string`||typeof t==`number`?t:void 0)}else h&&e.toggleSelected();t.preventDefault(),t.stopPropagation()},[a,u,e,n,h]);return(0,C.jsx)(`tr`,{slot:`table-row`,"data-index":n,className:Te(),onClick:g,...i,children:e.getVisibleCells().map((e,r)=>{let i=d.includes(e.column.id),a=f.includes(e.column.id),s=i?`left`:a?`right`:!1;return e.column.id===`actions`?(0,C.jsx)(Ne,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,column:e.column,getContext:e.getContext},`${e.id}-${r}`):e.column.id===`select`?(0,C.jsx)(Pe,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:s,isSelected:o||t,onToggleRowSelected:e.row.toggleSelected},`${e.id}-${r}`):(0,C.jsx)(Me,{"data-col":e.column.id,"data-cell":n,"data-selected":t||void 0,isPinned:s,isFirstCell:e.column.id===p,isLastCell:e.column.id===m,colId:e.column.id,position:e.column.columnDef.meta?.position??`start`,column:e.column,getContext:e.getContext},`${e.id}-${r}`)})})});Je.displayName=`UITableRow`;const Ye=(0,b.memo)(({className:e,children:t,...n})=>(0,C.jsx)(`div`,{slot:`table-wrapper`,className:(0,x.cn)(ve(),e),...n,children:t}));Ye.displayName=`UITableWrapper`;const Xe=({children:e})=>{let{table:t,fetchMoreData:n}=q(),{rowSelectionState:r}=W(),{rows:i}=t.getRowModel();return(0,C.jsxs)(m.ResizablePanelGroup,{direction:`horizontal`,style:{direction:t.options.columnResizeDirection},className:`relative flex w-full max-w-full flex-1 gap-1 overflow-auto border-t border-t-border border-r border-r-border p-0 text-sm`,children:[(0,C.jsx)(m.ResizablePanel,{"data-slot":`table-scroll-host`,className:`relative flex flex-col`,children:(0,C.jsxs)(Ke,{children:[(0,C.jsxs)(Ge,{children:[(0,C.jsx)(Ve,{children:t.getHeaderGroups().map(e=>(0,C.jsx)(We,{headerGroup:e},e.id))}),(0,C.jsxs)(X,{children:[i.map((e,t)=>(0,C.jsx)(Je,{row:e,isSelected:r[e.id]===!0,rowIndex:t},e.id)),n&&(0,C.jsx)(qe,{fetchMoreData:n})]}),(0,C.jsx)(Fe,{})]}),(0,C.jsx)(Ie,{})]})}),e&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(m.ResizableHandle,{}),e]})]})};function Ze(e,t,n){switch(n){case`count`:return e;case`sum`:return t.reduce((e,t)=>e+t,0);case`avg`:return t.length===0?0:t.reduce((e,t)=>e+t,0)/t.length;case`min`:return t.length===0?0:Math.min(...t);case`max`:return t.length===0?0:Math.max(...t)}}function Qe(e,t){return e.map(e=>{let n=e.getValue(t);return typeof n==`string`?Number(n):typeof n==`number`?n:NaN}).filter(e=>!Number.isNaN(e))}const $e={sum:`Tổng`,avg:`Trung bình`,count:`Đếm`,min:`Nhỏ nhất`,max:`Lớn nhất`},et=(0,b.memo)(()=>{let{table:e,totalRows:t}=q(),{rowSelectionState:n}=W(),{isOpen:r,toggle:i}=he(),a=(0,b.useMemo)(()=>e.getRowModel().rows,[e]),s=(0,b.useMemo)(()=>e.getSelectedRowModel().flatRows,[e,n]),c=(0,b.useMemo)(()=>e.getHeaderGroups()[0]?.headers??[],[e]),l=(0,b.useMemo)(()=>c.filter(e=>![`select`,`actions`].includes(e.id)).flatMap(e=>{let t=e.column.columnDef.meta?.aggregation;if(!t)return[];let n=t.label??(typeof e.column.columnDef.header==`string`?e.column.columnDef.header:e.id),r=Qe(a,e.id),i=s.length>0?Qe(s,e.id):null;return[{colId:e.id,header:n,aggregation:t,allValue:Ze(a.length,r,t.type),selectedValue:i===null?null:Ze(s.length,i,t.type)}]}),[c,a,s]);return(0,C.jsxs)(`div`,{"data-slot":`table-analysis-panel`,className:`w-full border-t border-border`,children:[(0,C.jsxs)(`button`,{type:`button`,className:(0,x.cn)(`flex w-full items-center justify-between px-4 py-2 text-sm font-medium text-text-positive`,`hover:bg-muted-bg-subtle transition-colors outline-none`,`focus-visible:ring-2 focus-visible:ring-primary-weak`),onClick:i,"aria-expanded":r,children:[(0,C.jsx)(`span`,{children:`Tổng quan dữ liệu`}),r?(0,C.jsx)(y.ChevronUpIcon,{size:14}):(0,C.jsx)(y.ChevronDownIcon,{size:14})]}),r&&(0,C.jsxs)(`div`,{className:`px-4 pb-4 pt-2 space-y-4`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-4`,children:[(0,C.jsx)(Q,{label:`Tổng bản ghi`,value:t??a.length}),(0,C.jsx)(Q,{label:`Hàng hiển thị`,value:a.length}),(0,C.jsx)(Q,{label:`Hàng đã chọn`,value:s.length,highlight:s.length>0})]}),l.length>0&&(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`mb-2 text-xs font-semibold uppercase tracking-wide text-text-positive-weak`,children:`Tóm tắt cột`}),(0,C.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-border`,children:(0,C.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{className:`border-b border-border bg-muted-bg-subtle text-xs text-text-positive-weak`,children:[(0,C.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Cột`}),(0,C.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Kiểu`}),(0,C.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Tất cả hàng`}),s.length>0&&(0,C.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Hàng đã chọn`})]})}),(0,C.jsx)(`tbody`,{children:l.map((e,t)=>(0,C.jsxs)(`tr`,{className:(0,x.cn)(`border-b border-border last:border-b-0`,t%2==1&&`bg-muted-bg-subtle/50`),children:[(0,C.jsx)(`td`,{className:`px-3 py-2 text-text-positive font-medium`,children:e.header}),(0,C.jsx)(`td`,{className:`px-3 py-2 text-text-positive-weak`,children:$e[e.aggregation.type]}),(0,C.jsx)(`td`,{className:`px-3 py-2 text-right`,children:(0,C.jsx)(o.Statistic,{value:e.allValue,prefix:e.aggregation.prefix,suffix:e.aggregation.suffix,precision:e.aggregation.precision,size:`sm`})}),s.length>0&&(0,C.jsx)(`td`,{className:`px-3 py-2 text-right`,children:e.selectedValue===null?(0,C.jsx)(`span`,{className:`text-text-positive-weak`,children:`—`}):(0,C.jsx)(o.Statistic,{value:e.selectedValue,prefix:e.aggregation.prefix,suffix:e.aggregation.suffix,precision:e.aggregation.precision,size:`sm`})})]},e.colId))})]})})]})]})]})});et.displayName=`UITableAnalysisPanel`;const Q=(0,b.memo)(({label:e,value:t,highlight:n})=>(0,C.jsxs)(`div`,{className:(0,x.cn)(`flex flex-col gap-0.5 rounded border px-3 py-2 min-w-25 bg-white`,n&&t>0?`border-primary bg-primary-bg-subtle`:`border-border bg-white`),children:[(0,C.jsx)(`span`,{className:`text-[11px] text-text-positive-weak`,children:e}),(0,C.jsx)(`span`,{className:`text-base font-semibold tabular-nums text-text-positive-strong`,children:t.toLocaleString()})]}));Q.displayName=`StatChip`;const tt={tag:(0,C.jsx)(y.TagIcon,{size:14}),"single-tag":(0,C.jsx)(y.TagIcon,{size:14}),"date-range":(0,C.jsx)(y.CalendarIcon,{size:14}),number:(0,C.jsx)(y.HashIcon,{size:14}),text:(0,C.jsx)(y.TypeIcon,{size:14}),boolean:(0,C.jsx)(y.ToggleLeftIcon,{size:14})},nt=[{value:`eq`,label:`Bằng (=)`},{value:`ne`,label:`Không bằng (≠)`},{value:`gt`,label:`Lớn hơn (>)`},{value:`gte`,label:`Ít nhất (≥)`},{value:`lt`,label:`Nhỏ hơn (<)`},{value:`lte`,label:`Nhiều nhất (≤)`},{value:`between`,label:`Trong khoảng`}],rt=[{value:`contains`,label:`Chứa`},{value:`equals`,label:`Bằng`},{value:`starts-with`,label:`Bắt đầu bằng`},{value:`ends-with`,label:`Kết thúc bằng`}];function it(e,t){switch(e.type){case`single-tag`:return e.value?t.options?.find(t=>t.value===e.value)?.label??e.value:`Chưa đặt`;case`tag`:return e.values.length?e.values.map(e=>t.options?.find(t=>t.value===e)?.label??e).join(`, `):`Chưa đặt`;case`date-range`:return!e.from&&!e.to?`Ngày không xác định`:e.from&&e.to?`${e.from} → ${e.to}`:e.from?`từ ${e.from}`:`đến ${e.to}`;case`number`:{let t={eq:`=`,ne:`≠`,gt:`>`,gte:`≥`,lt:`<`,lte:`≤`,between:`trong khoảng`}[e.operator];return e.value===void 0?t:e.operator===`between`?`${t} ${e.value} – ${e.valueTo??`?`}`:`${t} ${e.value}`}case`text`:{let t={contains:`chứa`,equals:`là`,"starts-with":`bắt đầu bằng`,"ends-with":`kết thúc bằng`}[e.operator];return e.value?`${t} "${e.value}"`:t}case`boolean`:return e.value===null?`Không xác định`:e.value?`Có`:`Không`}}const at=({value:e,definition:t,onChange:n})=>(0,C.jsx)(`div`,{className:`flex flex-col gap-1 p-3`,children:(t.options??[]).length===0?(0,C.jsx)(`p`,{className:`text-xs text-text-positive-muted`,children:`Không có tùy chọn`}):t.options.map(t=>(0,C.jsxs)(g.Label,{className:(0,x.cn)(`flex items-center gap-2 bg-secondary-bg-subtle hover:bg-secondary-muted px-4 py-2 rounded transition-colors`,e.values.includes(t.value)&&`bg-primary-muted hover:bg-primary-subtle`),children:[(0,C.jsx)(f.Checkbox,{checked:e.values.includes(t.value),onCheckedChange:r=>{n({type:`tag`,values:r?[...e.values,t.value]:e.values.filter(e=>e!==t.value)})}}),(0,C.jsx)(`span`,{className:`text-sm`,children:t.label})]},t.value))}),ot=({value:e,definition:t,onChange:n})=>(0,C.jsx)(`div`,{className:`flex flex-col gap-1 p-3`,children:(t.options??[]).length===0?(0,C.jsx)(`p`,{className:`text-xs text-text-positive-muted`,children:`Không có tùy chọn`}):t.options.map(t=>(0,C.jsxs)(g.Label,{className:(0,x.cn)(`flex items-center gap-2 bg-secondary-bg-subtle hover:bg-secondary-muted px-4 py-2 rounded transition-colors`,e.value===t.value&&`bg-primary-muted hover:bg-primary-subtle`),children:[(0,C.jsx)(f.Checkbox,{checked:e.value===t.value,onCheckedChange:e=>{n({type:`single-tag`,value:e?t.value:null})}}),(0,C.jsx)(`span`,{className:`text-sm`,children:t.label})]},t.value))}),st=({value:e,onChange:t})=>(0,C.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,C.jsx)(`span`,{className:`text-text-positive-muted text-xs`,children:`Từ ngày`}),(0,C.jsx)(h.Input,{type:`date`,size:`md`,value:e.from??``,onValueChange:n=>t({...e,from:n||void 0})})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,C.jsx)(`span`,{className:`text-text-positive-muted text-xs`,children:`Đến ngày`}),(0,C.jsx)(h.Input,{type:`date`,size:`md`,value:e.to??``,onValueChange:n=>t({...e,to:n||void 0})})]})]}),ct=({value:e,onChange:t})=>(0,C.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,C.jsxs)(v.Select,{value:e.operator,onValueChange:n=>t({...e,operator:n}),children:[(0,C.jsx)(v.SelectTrigger,{size:`sm`,children:(0,C.jsx)(v.SelectValue,{})}),(0,C.jsx)(v.SelectContent,{children:nt.map(e=>(0,C.jsx)(v.SelectItem,{value:e.value,children:e.label},e.value))})]}),(0,C.jsx)(h.Input,{type:`number`,size:`md`,placeholder:`Giá trị`,value:e.value??``,onValueChange:n=>t({...e,value:n?Number(n):void 0})}),e.operator===`between`&&(0,C.jsx)(h.Input,{type:`number`,size:`md`,placeholder:`Đến giá trị`,value:e.valueTo??``,onValueChange:n=>t({...e,valueTo:n?Number(n):void 0})})]}),lt=({value:e,onChange:t})=>(0,C.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,C.jsxs)(v.Select,{value:e.operator,onValueChange:n=>t({...e,operator:n}),children:[(0,C.jsx)(v.SelectTrigger,{size:`sm`,children:(0,C.jsx)(v.SelectValue,{})}),(0,C.jsx)(v.SelectContent,{children:rt.map(e=>(0,C.jsx)(v.SelectItem,{value:e.value,children:e.label},e.value))})]}),(0,C.jsx)(h.Input,{type:`text`,size:`md`,placeholder:`Nhập văn bản...`,value:e.value,onValueChange:n=>t({...e,value:n})})]}),ut=[{label:`Có`,value:!0},{label:`Không`,value:!1},{label:`Không xác định`,value:null}],dt=({value:t,onChange:n})=>(0,C.jsx)(`div`,{className:`flex flex-col gap-1 p-3`,children:ut.map(({label:r,value:i})=>(0,C.jsx)(e.Button,{type:`button`,tabIndex:-1,variant:`outline`,className:(0,x.cn)(`rounded px-3 py-1.5 text-left text-sm transition-colors`,t.value===i?`bg-primary-muted font-medium`:`hover:bg-muted-bg-subtle`),onClick:()=>n({type:`boolean`,value:i}),children:r},r))});function ft({value:e,definition:t,onChange:n}){switch(e.type){case`tag`:return(0,C.jsx)(at,{value:e,definition:t,onChange:n});case`single-tag`:return(0,C.jsx)(ot,{value:e,definition:t,onChange:n});case`date-range`:return(0,C.jsx)(st,{value:e,onChange:n});case`number`:return(0,C.jsx)(ct,{value:e,onChange:n});case`text`:return(0,C.jsx)(lt,{value:e,onChange:n});case`boolean`:return(0,C.jsx)(dt,{value:e,onChange:n})}}const pt=({filter:t,definition:n,onRemove:r,onUpdate:i})=>(0,C.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,C.jsxs)(_.Popover,{children:[(0,C.jsx)(_.PopoverTrigger,{asChild:!0,children:(0,C.jsxs)(e.Button,{type:`button`,variant:`outline`,color:`muted`,className:`flex-1 bg-white max-w-[calc(100%-32px)] justify-start`,innerClassName:`flex truncate gap-1.5`,children:[(0,C.jsx)(`span`,{className:`shrink-0 text-text-positive font-medium`,children:n.label}),(0,C.jsx)(`span`,{className:`truncate text-xs text-text-positive-weak`,children:it(t.value,n)})]})}),(0,C.jsxs)(_.PopoverContent,{className:`w-64 p-0`,align:`start`,side:`bottom`,children:[(0,C.jsx)(`div`,{className:`border-b border-border px-3 py-2`,children:(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`text-text-positive-muted`,children:tt[n.type]}),(0,C.jsx)(`p`,{className:`font-medium`,children:n.label})]})}),(0,C.jsx)(ft,{value:t.value,definition:n,onChange:i})]})]}),(0,C.jsx)(e.Button,{type:`button`,size:`icon`,variant:`soft`,color:`danger`,className:`shrink`,onClick:r,children:(0,C.jsx)(y.Trash2Icon,{size:13})})]}),mt=()=>{let{filterDefinitions:t,activeFilters:n,addFilter:r,removeFilter:i,updateFilter:a}=pe(),[o,s]=(0,b.useState)(null),u=t.filter(e=>!n.some(t=>t.definitionId===e.id));return(0,C.jsx)(m.ResizablePanel,{defaultSize:25,className:(0,x.cn)(`bg-card`,o===null?`max-w-8!`:`min-w-64`),children:(0,C.jsxs)(`div`,{className:`relative z-20 flex size-full bg-muted-bg-subtle`,children:[(0,C.jsx)(`div`,{className:`min-w-0 flex-1 overflow-hidden`,children:(0,C.jsx)(b.Activity,{mode:o===`filters`?`visible`:`hidden`,children:(0,C.jsxs)(`div`,{className:`flex size-full flex-col gap-2 p-4`,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,C.jsx)(`p`,{className:`font-medium`,children:`Bộ lọc`}),(0,C.jsxs)(l.DropdownMenu,{children:[(0,C.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,C.jsxs)(e.Button,{variant:`outline`,color:`muted`,disabled:u.length===0,children:[(0,C.jsx)(y.ListFilterPlus,{size:13}),`Thêm bộ lọc`]})}),(0,C.jsx)(l.DropdownMenuContent,{align:`end`,children:u.map(e=>(0,C.jsxs)(l.DropdownMenuItem,{className:`flex items-center gap-2`,onClick:()=>r(e.id),children:[tt[e.type],e.label]},e.id))})]})]}),(0,C.jsx)(c.Separator,{}),n.length===0?(0,C.jsx)(`p`,{className:`py-6 text-center text-xs text-text-positive-muted`,children:`Không có bộ lọc nào`}):(0,C.jsx)(`div`,{className:`flex flex-col gap-2 pt-1`,children:n.map(e=>{let n=t.find(t=>t.id===e.definitionId);return n?(0,C.jsx)(pt,{filter:e,definition:n,onRemove:()=>i(e.id),onUpdate:t=>a(e.id,t)},e.id):null})})]})})}),(0,C.jsxs)(`div`,{className:`flex h-full flex-col border-l border-border bg-muted-bg-subtle text-sm`,children:[(0,C.jsxs)(`button`,{type:`button`,className:(0,x.cn)(`relative flex h-32 cursor-pointer flex-col items-center gap-y-2 p-2 py-4`,o===`filters`&&`bg-card`),onClick:()=>s(o===`filters`?null:`filters`),children:[(0,C.jsx)(y.ListFilterIcon,{size:18}),n.length>0&&(0,C.jsx)(`span`,{className:`absolute top-2 right-1.5 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[10px] leading-none text-primary-foreground`,children:n.length}),(0,C.jsx)(`span`,{className:`text-nowrap [writing-mode:vertical-lr]`,children:`Bộ lọc`})]}),(0,C.jsx)(c.Separator,{})]})]})})};function ht(e){switch(e){case`tag`:return{type:`tag`,values:[]};case`single-tag`:return{type:`single-tag`,value:null};case`date-range`:return{type:`date-range`};case`number`:return{type:`number`,operator:`eq`};case`text`:return{type:`text`,operator:`contains`,value:``};case`boolean`:return{type:`boolean`,value:null}}}const gt=(0,b.memo)(({innerWrapperId:e,children:t})=>{let n=(0,b.useMemo)(()=>({innerWrapperId:e}),[e]);return(0,C.jsx)(R.Provider,{value:n,children:t})});gt.displayName=`UITableInnerWrapperProvider`;const _t=(0,b.memo)(({table:e,innerTableId:t,totalSize:n,children:r})=>{let i=(0,b.useMemo)(()=>({table:e,innerTableId:t,totalSize:n}),[e,t,n]);return(0,C.jsx)(z.Provider,{value:i,children:r})});_t.displayName=`UITableInnerTableProvider`;const vt=(0,b.memo)(({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i,children:a})=>{let o=(0,b.useMemo)(()=>({isAllRowsSelected:e,columnPinningState:t,leftPinnedHeaders:n,rightPinnedHeaders:r,onToggleAllRowsSelected:i}),[e,t,n,r,i]);return(0,C.jsx)(V.Provider,{value:o,children:a})});vt.displayName=`UITableHeadRowProvider`;const yt=(0,b.memo)(({isFetching:e,isRefetching:t,isEmpty:n,rowSelectionState:r,children:i})=>{let a=(0,b.useMemo)(()=>({isFetching:e,isRefetching:t,isEmpty:n,rowSelectionState:r}),[e,n,r]);return(0,C.jsx)(U.Provider,{value:a,children:i})});yt.displayName=`UITableBodyProvider`;const bt=(0,b.memo)(({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a,children:o})=>{let s=(0,b.useMemo)(()=>({keyOfClickRow:e,isAllRowsSelected:t,columnPinningState:n,leftPinnedHeaders:r,rightPinnedHeaders:i,onClickRow:a}),[e,t,n,r,i,a]);return(0,C.jsx)(G.Provider,{value:s,children:o})});bt.displayName=`UITableRowProvider`;const xt=({title:e,isFetching:t=!1,isRefetching:n=!1,isLoading:r=!1,loadingDisplayRow:i=3,data:a,columns:o,totalRows:s,leftPinnedColumns:c=[],rightPinnedColumns:l=[],keyOfClickRow:u,onClickRow:d,onRowSelection:f,onColumnPinning:p,fetchMoreData:m,emptyDisplayHeight:h,csvData:g,csvFileName:_,filterDefinitions:v=[],onFilterChange:y,summary:x=[],showAnalysisPanel:S=!1,description:w,headerActions:E,children:ee})=>{let D=(0,b.useId)(),te=(0,b.useId)(),[ne,re]=(0,b.useState)(!1),[O,ie]=(0,b.useState)({}),[k,ae]=(0,b.useState)({right:l,left:[`select`,...c]}),[oe,se]=(0,b.useState)({}),[A,j]=(0,b.useState)([]),ce=(0,b.useCallback)(e=>(ie(e),f?.(e instanceof Function?e(O):e),e),[O,f]),M=(0,b.useCallback)(e=>{ae(e),p?.(e instanceof Function?e(k):e)},[k,p]),N=(0,b.useCallback)(e=>{let t=v.find(t=>t.id===e);if(!t)return;let n={id:`${e}-${crypto.randomUUID()}`,definitionId:e,value:ht(t.type)};j(e=>{let t=[...e,n];return y?.(t),t})},[v,y]),P=(0,b.useCallback)(e=>{j(t=>{let n=t.filter(t=>t.id!==e);return y?.(n),n})},[y]),F=(0,b.useCallback)((e,t)=>{j(n=>{let r=n.map(n=>n.id===e?{...n,value:t}:n);return y?.(r),r})},[y]),le=(0,b.useMemo)(()=>({filterDefinitions:v,activeFilters:A,addFilter:N,removeFilter:P,updateFilter:F}),[v,A,N,P,F]),I=(0,T.useReactTable)({data:a,columns:o,state:{rowSelection:O,columnPinning:k,expanded:oe},defaultColumn:{enableResizing:!1,size:void 0,minSize:void 0,maxSize:void 0},columnResizeMode:`onChange`,columnResizeDirection:`ltr`,enableColumnPinning:!0,enableRowSelection:!0,enableColumnResizing:!0,enableMultiRowSelection:!0,autoResetAll:!1,autoResetExpanded:!1,autoResetPageIndex:!1,getSubRows:e=>e.subRows,getCoreRowModel:(0,T.getCoreRowModel)(),getGroupedRowModel:(0,T.getGroupedRowModel)(),getExpandedRowModel:(0,T.getExpandedRowModel)(),onRowSelectionChange:ce,onColumnPinningChange:M,onExpandedChange:se}),L=(0,b.useMemo)(()=>{let{rows:e}=I.getRowModel();return e},[I.getRowModel().rows,I.getState().columnPinning]),R=(0,b.useMemo)(()=>!t&&!n&&L.length===0,[L,t,n]),ue=(0,b.useMemo)(()=>({title:e,table:I,isEmpty:R,isFetching:t,isRefetching:n,isLoading:r,loadingDisplayRow:i,totalRows:s,fetchMoreData:m,emptyDisplayHeight:h,csvData:g,csvFileName:_,summary:x,showAnalysisPanel:S,description:w,headerActions:E}),[e,I,R,n,t,r,i,s,m,h,I.getState().columnPinning,I.getState().expanded,g,_,x,S,w,E]),z=(0,b.useMemo)(()=>I.getState(),[I.getState()]),B=(0,b.useMemo)(()=>I.getIsAllRowsSelected(),[I.getIsAllRowsSelected()]),V=(0,b.useMemo)(()=>z.rowSelection,[z.rowSelection]),H=(0,b.useMemo)(()=>z.columnPinning,[z.columnPinning]),U=(0,b.useMemo)(()=>I.getLeftHeaderGroups()[0]?.headers||[],[I.getState().columnPinning]),W=(0,b.useMemo)(()=>I.getRightHeaderGroups()[0]?.headers||[],[I.getState().columnPinning]),G=(0,b.useMemo)(()=>I.getTotalSize(),[I.getTotalSize()]),K=(0,b.useCallback)(()=>re(e=>!e),[]),q=(0,b.useMemo)(()=>({isOpen:ne,toggle:K}),[ne,K]);return(0,C.jsx)(me.Provider,{value:q,children:(0,C.jsx)(fe.Provider,{value:le,children:(0,C.jsx)(de.Provider,{value:ue,children:(0,C.jsx)(gt,{innerWrapperId:D,children:(0,C.jsx)(_t,{table:I,innerTableId:te,totalSize:G,children:(0,C.jsx)(vt,{isAllRowsSelected:B,columnPinningState:H,leftPinnedHeaders:U,rightPinnedHeaders:W,onToggleAllRowsSelected:I.toggleAllRowsSelected,children:(0,C.jsx)(yt,{isFetching:t,isRefetching:n,isEmpty:R,rowSelectionState:V,children:(0,C.jsx)(bt,{keyOfClickRow:u,isAllRowsSelected:B,columnPinningState:H,leftPinnedHeaders:U,rightPinnedHeaders:W,onClickRow:d,children:ee})})})})})})})})},St={up:`bg-success`,down:`bg-danger`,neutral:`bg-primary`},Ct=(0,b.memo)(()=>{let{summary:e}=q();return!e||e.length===0?null:(0,C.jsx)(`div`,{"data-slot":`table-summary-bar`,className:`grid w-full gap-3 px-2 pb-1`,style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 240px))`},children:e.map(e=>{let t=St[e.trend??`neutral`];return(0,C.jsxs)(`div`,{className:`flex flex-col overflow-hidden rounded border border-border bg-card shadow-card`,children:[(0,C.jsx)(`div`,{className:(0,x.cn)(`h-0.75 w-full shrink-0`,t)}),(0,C.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2 px-5 py-4`,children:[(0,C.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-widest text-text-positive-weak`,children:e.label}),e.value!==null&&e.value!==void 0?(0,C.jsx)(o.Statistic,{value:e.value,prefix:e.prefix,suffix:e.suffix,precision:e.precision,trend:e.trend,size:`xl`,className:`font-bold`}):(0,C.jsx)(`span`,{className:`text-xl font-bold tabular-nums text-text-positive-strong`,children:`—`}),e.description&&(0,C.jsx)(`span`,{className:`text-xs text-text-positive-weak`,children:e.description})]})]},e.label)})})});Ct.displayName=`UITableSummaryBar`;function wt(e){if(e==null)return``;if(typeof e==`number`)return String(e);if(typeof e==`boolean`)return e?`true`:`false`;let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
2
+ `)||t.includes(`\r`)?`"${t.replace(/"/g,`""`)}"`:t}function Tt(e){if(e.length===0)return``;let t=e[0].map(e=>wt(e.label)),n=e.map(e=>e.map(e=>wt(e.value)).join(`,`));return[t.join(`,`),...n].join(`
3
+ `)}function Et(e,t){let n=Tt(e);if(!n)return;let r=new Blob([n],{type:`text/csv;charset=utf-8;`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${t}.csv`,a.click(),URL.revokeObjectURL(i)}const Dt=({onSearch:e,onChange:t,...n})=>{let r=(0,E.useDebounceCallback)(t=>{e?.(t)},500);return(0,C.jsxs)(`div`,{className:`relative w-full max-w-80 flex-1`,children:[(0,C.jsx)(h.Input,{...n,size:`lg`,type:`search`,placeholder:`Tìm kiếm...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{t?.(e),r(e.target.value??``)}}),(0,C.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:(0,C.jsx)(y.SearchIcon,{size:16})}),(0,C.jsx)(`button`,{className:`absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:(0,C.jsx)(y.ArrowRightIcon,{size:16,"aria-hidden":`true`})})]})},$=({children:e,disabled:t,onClick:n,className:r,...i})=>(0,C.jsx)(`button`,{type:`button`,disabled:t,className:(0,x.cn)(`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,r),onClick:n,...i,children:e}),Ot=({onCreate:e,onDownload:t,onRefresh:n})=>{let{table:r,csvData:i,csvFileName:a,title:o,showAnalysisPanel:s}=q(),{isOpen:c,toggle:l}=he(),u=(0,b.useCallback)(()=>{if(t){t();return}if(!i||i.length===0)return;let e=r.getSelectedRowModel().flatRows;Et(e.length>0?e.map(e=>i[e.index]).filter(Boolean):i,a||o)},[t,i,a,r,o]),d=!!(t||i&&i.length>0);return(0,C.jsxs)(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[(0,C.jsx)($,{disabled:!e,onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:(0,C.jsx)(y.CirclePlus,{})}),(0,C.jsx)($,{disabled:!n,onClick:e=>{n?.(),e.stopPropagation(),e.preventDefault()},children:(0,C.jsx)(y.RefreshCwIcon,{})}),(0,C.jsx)($,{disabled:!d,onClick:e=>{u(),e.stopPropagation(),e.preventDefault()},children:(0,C.jsx)(y.DownloadIcon,{})}),s&&(0,C.jsx)($,{onClick:e=>{l(),e.stopPropagation(),e.preventDefault()},"aria-pressed":c,className:c?`bg-muted-muted text-text-positive`:void 0,children:(0,C.jsx)(y.BarChart2Icon,{})})]})},kt=({children:e})=>{let{title:t,description:n,headerActions:r}=q();return(0,C.jsxs)(`div`,{"data-slot":`table-tooltip`,className:`relative flex w-full flex-col gap-2 px-2 py-0 text-sm`,children:[(0,C.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`h3`,{className:`font-semibold text-base text-text-positive`,children:t}),n&&(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]}),r&&(0,C.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:r})]}),(0,C.jsx)(`div`,{className:`flex w-full flex-1 justify-between gap-x-2`,children:e})]})};kt.displayName=`TableTooltip`,Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return ie}});
4
+ //# sourceMappingURL=tables-CNJ10l7L.cjs.map