sodtrack-web-ui 0.105.0 → 0.106.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/chunk-AUUVWHY5.js +1 -0
  2. package/dist/chunk-C7TLKKPT.js +2 -0
  3. package/dist/chunk-CFVEWKYU.js +1 -0
  4. package/dist/chunk-CQI4KDR4.js +1 -0
  5. package/dist/chunk-D2FOOEGQ.js +1 -0
  6. package/dist/chunk-F5RB5MRP.js +1 -0
  7. package/dist/chunk-GEDHSFJW.js +1 -0
  8. package/dist/chunk-HRTEKJIW.js +1 -0
  9. package/dist/{chunk-VKJECB35.js → chunk-KNGBP4CU.js} +1 -1
  10. package/dist/chunk-KRWEO45V.js +1 -0
  11. package/dist/{chunk-FDNWX3CH.js → chunk-NWAULHLP.js} +1 -1
  12. package/dist/chunk-P6B33GL6.js +1 -0
  13. package/dist/chunk-PL3ZGCEK.js +2 -0
  14. package/dist/{chunk-MJH4OB5H.js → chunk-PN2XW2EC.js} +1 -1
  15. package/dist/chunk-QQXGDKV2.js +1 -0
  16. package/dist/chunk-UTHPBHWJ.js +1 -0
  17. package/dist/chunk-VRWKLHZZ.js +1 -0
  18. package/dist/chunk-VTBJ2VDU.js +1 -0
  19. package/dist/chunk-YXEJA55K.js +2 -0
  20. package/dist/{chunk-Z2LFW5XP.js → chunk-ZJIAFL3H.js} +1 -1
  21. package/dist/components/alert-dialog.d.ts +1 -0
  22. package/dist/components/alert-dialog.js +1 -1
  23. package/dist/components/alert-message.d.ts +1 -0
  24. package/dist/components/alert-message.js +1 -1
  25. package/dist/components/autocomplete-multiple.js +1 -1
  26. package/dist/components/badge-number.d.ts +1 -1
  27. package/dist/components/badge-number.js +1 -1
  28. package/dist/components/base-button-styles.d.ts +63 -17
  29. package/dist/components/base-button-styles.js +1 -1
  30. package/dist/components/button-active.d.ts +1 -1
  31. package/dist/components/button-active.js +1 -1
  32. package/dist/components/button-menu.js +1 -1
  33. package/dist/components/button.d.ts +93 -37
  34. package/dist/components/button.js +1 -1
  35. package/dist/components/card-expandable.d.ts +2 -0
  36. package/dist/components/card-expandable.js +1 -1
  37. package/dist/components/card-form.d.ts +1 -0
  38. package/dist/components/card-form.js +1 -1
  39. package/dist/components/data-table.d.ts +1 -0
  40. package/dist/components/data-table.js +1 -1
  41. package/dist/components/dialog.d.ts +1 -0
  42. package/dist/components/dialog.js +1 -1
  43. package/dist/components/drawer.d.ts +1 -0
  44. package/dist/components/drawer.js +1 -1
  45. package/dist/components/dropzone.js +1 -1
  46. package/dist/components/empty-state.d.ts +30 -0
  47. package/dist/components/empty-state.js +1 -0
  48. package/dist/components/icon-button.d.ts +89 -28
  49. package/dist/components/icon-button.js +1 -1
  50. package/dist/components/index.d.ts +5 -4
  51. package/dist/components/index.js +1 -1
  52. package/dist/components/list-item-arrow.js +1 -1
  53. package/dist/components/list-item-button.d.ts +1 -0
  54. package/dist/components/list-item-button.js +1 -1
  55. package/dist/components/list-item-checkbox-left.js +1 -1
  56. package/dist/components/list-item-checkbox.js +1 -1
  57. package/dist/components/{list-item.d.ts → list-item_old.d.ts} +3 -3
  58. package/dist/components/list-item_old.js +1 -0
  59. package/dist/components/sidebar.d.ts +1 -0
  60. package/dist/components/sidebar.js +1 -1
  61. package/dist/components/snackbar.js +1 -1
  62. package/dist/components/spinner.d.ts +48 -12
  63. package/dist/components/spinner.js +1 -1
  64. package/dist/components/table.d.ts +1 -0
  65. package/dist/components/table.js +1 -1
  66. package/dist/components/toast.js +1 -1
  67. package/dist/components/tracker-item.d.ts +1 -0
  68. package/dist/components/tracker-item.js +1 -1
  69. package/dist/styles/colors.css +628 -274
  70. package/dist/styles/index.css +1 -1
  71. package/dist/styles/spacing.css +0 -1
  72. package/package.json +18 -17
  73. package/dist/chunk-2OYWJQ3Y.js +0 -1
  74. package/dist/chunk-5EP3PIED.js +0 -1
  75. package/dist/chunk-7PTVBLU5.js +0 -1
  76. package/dist/chunk-A4ESBL7F.js +0 -1
  77. package/dist/chunk-A5Q6EUDK.js +0 -1
  78. package/dist/chunk-BUERLQR5.js +0 -1
  79. package/dist/chunk-CYR7W3WZ.js +0 -1
  80. package/dist/chunk-H33Z72GG.js +0 -1
  81. package/dist/chunk-JSLODVR6.js +0 -2
  82. package/dist/chunk-KWX4XPCO.js +0 -1
  83. package/dist/chunk-NJITT7GG.js +0 -1
  84. package/dist/chunk-SKMTTF6M.js +0 -1
  85. package/dist/chunk-UM4A7QZP.js +0 -1
  86. package/dist/chunk-WQPZV6HK.js +0 -1
  87. package/dist/chunk-XPR5NR6A.js +0 -2
  88. package/dist/components/list-item.js +0 -1
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-7EQ5IQED.js';import {c as c$1}from'./chunk-JYNJHAGL.js';import {a as a$2}from'./chunk-JW7HS6NX.js';import {d}from'./chunk-MP4CHZ2K.js';import {d as d$1}from'./chunk-KRWEO45V.js';import {a as a$1}from'./chunk-CM6ALMTT.js';import {e,s,t}from'./chunk-Z6FU5QVL.js';import {d as d$2}from'./chunk-CFVEWKYU.js';import {a as a$3}from'./chunk-P6B33GL6.js';import {a}from'./chunk-OBZIYJO7.js';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {getDefaultOptions}from'date-fns';import {jsxs,jsx}from'react/jsx-runtime';var c=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),G=(a,e)=>e?.startsWith("es")?a?"Contraer":"Expandir":e?.startsWith("pt")?a?"Recolher":"Expandir":a?"Collapse":"Expand",gt=({headerLabel:a$4,complementaryText:e$1,subtitle:o,headerTooltip:n,className:m,action:i,chipStatus:l,badgeExpandable:p,chipExpandable:h,badgeNumber:b$1,Icon:v,iconButtons:w,checkbox:x,...D})=>{let{header:M,headerLabel:O,complementaryText:F,subtitle:A}=c(),E=useCollapsibleContext(),{locale:R}=getDefaultOptions(),S=G(E.open,R?.code);return jsxs("div",{...D,className:a(M(),m),children:[x&&jsx(b,{...x,className:a("mt-0.25 mr-1",x.className)}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[v&&jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("b",{className:O(),children:a$4}),e$1&&jsx("span",{className:F(),children:e$1}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[l&&jsx(d,{...l,size:"xs",type:"light"}),h&&jsx(c$1,{...h,type:"light"}),p&&jsx(a$2,{...p,size:"md"}),b$1&&jsx(a$3,{text:b$1.text,affix:b$1.affix,size:"md",variant:"primary",type:"square"}),w?.map((d,C)=>{let{tooltipContent:N,...U}=d;return jsx(a$1,{content:N,disabled:!N,children:jsx(d$1,{...U,variant:"ghost",tone:"neutral",size:"sm"})},C)}),i&&(()=>{let{tooltipContent:d,...C}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(d$2,{...C,size:"sm",variant:"ghost",tone:"neutral"})})})(),jsx(a$1,{content:S,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(d$1,{Icon:E.open?s:t,variant:"ghost",size:"sm",tone:"neutral"})})})]})]}),o&&jsx("p",{className:A(),children:o})]})]})},ft=({className:a,...e})=>{let{contentInner:o,content:n}=c();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...e,className:o({className:a})})})},ht=({className:a,...e})=>{let{fixedContent:o}=c();return jsx("div",{...e,className:o({className:a})})},vt=({className:a,onOpenChange:e,children:o,background:n="white",...m})=>{let{root:i}=c({background:n}),l=useCallback(p=>{e?.(p);},[e]);return jsx(Collapsible.Root,{onOpenChange:l,className:i({className:a}),...m,children:o})};export{gt as a,ft as b,ht as c,vt as d};
@@ -0,0 +1,2 @@
1
+ import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var C=["xl","lg","md","sm"],g=["primary","white","neutral","danger","success","tertiary"],o=tv({base:"animate-spin",slots:{ring:"",rotateElement:""},variants:{tone:{primary:{ring:"fill-transparent-primary-400-30",rotateElement:"fill-primary-600"},white:{ring:"fill-transparent-neutral-50-30",rotateElement:"fill-neutral-50"},neutral:{ring:"fill-transparent-neutral-800-10",rotateElement:"fill-neutral-800"},danger:{ring:"fill-transparent-danger-800-10",rotateElement:"fill-danger-700"},success:{ring:"fill-transparent-success-800-10",rotateElement:"fill-success-700"},tertiary:{ring:"fill-transparent-tertiary-800-20",rotateElement:"fill-tertiary-700"}},size:{xl:{base:"h-16 w-16"},lg:{base:"h-10 w-10"},md:{base:"h-6 w-6"},sm:{base:"h-4 w-4"}}},defaultVariants:{tone:"primary"}}),u=({tone:t,className:r,size:n,...i})=>{let{base:s,ring:a,rotateElement:l}=o({tone:t,size:n});return jsxs("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s({className:r}),...i,children:[jsx("path",{d:"M64 32C64 49.6731 49.6731 64 32 64C14.3269 64 0 49.6731 0 32C0 14.3269 14.3269 0 32 0C49.6731 0 64 14.3269 64 32ZM9.97814 32C9.97814 44.1623 19.8377 54.0219 32 54.0219C44.1623 54.0219 54.0219 44.1623 54.0219 32C54.0219 19.8377 44.1623 9.97814 32 9.97814C19.8377 9.97814 9.97814 19.8377 9.97814 32Z",className:a()}),jsx("path",{d:"M59.0109 32.4839C61.7663 32.4839 64.0397 30.237 63.6119 27.515C63.2201 25.0227 62.5341 22.5797 61.5641 20.238C59.956 16.3556 57.5989 12.828 54.6274 9.85648C51.6559 6.885 48.1283 4.5279 44.2459 2.91975C41.9042 1.94982 39.4612 1.26379 36.9689 0.87203C34.247 0.44418 32 2.71758 32 5.47297C32 8.22836 34.2616 10.4059 36.9465 11.0248C38.1329 11.2983 39.2973 11.6703 40.4274 12.1384C43.0992 13.2451 45.5269 14.8672 47.5718 16.9121C49.6167 18.957 51.2388 21.3847 52.3455 24.0565C52.8136 25.1866 53.1857 26.351 53.4591 27.5374C54.078 30.2224 56.2555 32.4839 59.0109 32.4839Z",className:l()})]})};
2
+ export{C as a,g as b,u as c};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-C7TLKKPT.js';import {d,b,a as a$1,c as c$1}from'./chunk-CQI4KDR4.js';import {a}from'./chunk-P6B33GL6.js';import B,{forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var q=b,w=a$1,A=c$1,V=tv({extend:d,slots:{root:"relative gap-1.5 rounded-md ease-linear",icon:""},variants:{size:{lg:{root:"h-10 px-3 py-2 text-sm leading-[143%]",icon:"size-4.5"},md:{root:"h-8 px-3 py-1 text-sm leading-[143%]",icon:"size-3.5"},sm:{root:"h-6 rounded-sm px-2 py-1 text-xs leading-[133%]",icon:"size-3"}},variant:{primary:{},secondary:{},light:{},ghost:{}},tone:{primary:{},neutral:{},danger:{},success:{}}},defaultVariants:{variant:"primary",loading:false,disabled:false}}),k=forwardRef(({children:g,className:x,variant:N,tone:n="primary",size:o="lg",startIcon:a$1,endIcon:r,loading:s,disabled:i,type:R="button",StartIcon:m,EndIcon:c$1,badgeNumber:p,hasAlertBadge:z,...L},v)=>{let P=s||i,{root:S,icon:t}=V({variant:N,size:o,loading:s,disabled:i,tone:n,hasAlertBadge:z});return jsxs("button",{...L,ref:v,disabled:P,className:S({className:x}),type:R,children:[s&&jsx(c,{size:o==="lg"?"md":"sm",tone:n,className:"absolute inset-0 m-auto"}),a$1&&B.cloneElement(a$1,{className:t()}),m&&jsx(m,{className:t()}),g,p&&jsx(a,{...p,size:o,variant:"info",type:"square"}),r&&B.cloneElement(r,{className:t()}),c$1&&jsx(c$1,{className:t()})]})});export{q as a,w as b,A as c,k as d};
@@ -0,0 +1 @@
1
+ import {tv}from'tailwind-variants';var r=["primary","secondary","light","ghost"],t=["sm","md","lg"],s=["primary","neutral","danger","success"],n=tv({slots:{root:"font-inter flex shrink-0 items-center justify-center font-semibold transition-all ring-inset focus:ring-3"},variants:{variant:{primary:{},secondary:{},light:{},ghost:{}},tone:{primary:{},neutral:{},danger:{},success:{}},size:{lg:{},md:{},sm:{}},disabled:{true:{root:"cursor-not-allowed"},false:{}},loading:{true:{root:"cursor-progress text-transparent!"},false:{}},hasAlertBadge:{true:{root:"after:bg-danger-500 after:absolute after:top-0 after:right-0 after:h-3 after:w-3 after:rounded-full after:border-2 after:border-neutral-50 after:content-['']"},false:{}}},compoundVariants:[{tone:"neutral",size:["md","lg"],className:{root:"font-medium"}},{tone:"neutral",size:"sm",className:{root:"font-normal"}},{disabled:false,loading:false,variant:"primary",tone:"primary",className:{root:"bg-primary-600 hover:bg-primary-700 focus:ring-primary-800 active:bg-primary-800 text-neutral-50"}},{disabled:true,loading:false,variant:"primary",tone:["primary","neutral","danger","success"],className:{root:"bg-neutral-500 text-neutral-50 ring-0"}},{disabled:false,loading:true,variant:"primary",tone:"primary",className:{root:"bg-primary-200"}},{disabled:false,loading:false,variant:"primary",tone:"neutral",className:{root:"bg-neutral-800 text-neutral-50 hover:bg-neutral-900 focus:ring-neutral-900 active:bg-neutral-900"}},{disabled:false,loading:true,variant:"primary",tone:"neutral",className:{root:"bg-neutral-300"}},{disabled:false,loading:false,variant:"primary",tone:"danger",className:{root:"bg-danger-500 hover:bg-danger-600 focus:ring-danger-800 active:bg-danger-700 text-neutral-50"}},{disabled:false,loading:true,variant:["primary","light"],tone:"danger",className:{root:"bg-danger-20"}},{disabled:false,loading:false,variant:"primary",tone:"success",className:{root:"bg-success-600 hover:bg-success-700 focus:ring-success-800 active:bg-success-800 text-neutral-50"}},{disabled:false,loading:true,variant:["primary","light"],tone:"success",className:{root:"bg-success-20"}},{variant:"secondary",className:{root:"ring-1"}},{disabled:false,loading:false,variant:"secondary",tone:"primary",className:{root:"text-primary-600 ring-primary-600 hover:bg-primary-100 hover:text-primary-700 hover:ring-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-primary-800 bg-neutral-50"}},{disabled:true,loading:false,variant:"secondary",tone:["primary","neutral","danger","success"],className:{root:"bg-neutral-50 text-neutral-600 ring-neutral-600"}},{disabled:false,loading:true,variant:"secondary",tone:"primary",className:{root:"ring-primary-300 bg-neutral-50"}},{disabled:false,loading:false,variant:"secondary",tone:"neutral",className:{root:"hover:bg-primary-100 active:bg-primary-200 focus:ring-primary-800 bg-neutral-50 text-neutral-800 ring-neutral-800"}},{disabled:false,loading:true,variant:"secondary",tone:"neutral",className:{root:"bg-neutral-50 ring-neutral-600"}},{disabled:false,loading:false,variant:"secondary",tone:"danger",className:{root:"text-danger-700 ring-danger-700 hover:bg-danger-20 focus:ring-danger-800 active:bg-danger-50 bg-neutral-50"}},{disabled:false,loading:true,variant:"secondary",tone:"danger",className:{root:"ring-danger-200 bg-neutral-50"}},{disabled:false,loading:false,variant:"secondary",tone:"success",className:{root:"ring-success-700 text-success-700 hover:bg-success-20 focus:ring-success-800 active:bg-success-50 bg-neutral-50"}},{disabled:false,loading:true,variant:"secondary",tone:"success",className:{root:"ring-success-300 bg-neutral-50"}},{disabled:false,loading:false,variant:"light",tone:"primary",className:{root:"text-primary-600 bg-primary-100 active:bg-primary-300 hover:bg-primary-200 hover:text-primary-700 focus:ring-primary-800 active:text-primary-800"}},{disabled:true,loading:false,variant:"light",tone:["primary","neutral","danger","success"],className:{root:"bg-neutral-200 text-neutral-600"}},{disabled:false,loading:true,variant:"light",tone:"primary",className:{root:"bg-primary-50"}},{disabled:false,loading:false,variant:"light",tone:"neutral",className:{root:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 bg-neutral-50 text-neutral-800"}},{disabled:false,loading:true,variant:"light",tone:"neutral",className:{root:"bg-neutral-200"}},{disabled:false,loading:false,variant:"light",tone:"danger",className:{root:"bg-danger-20 text-danger-700 hover:bg-danger-50 focus:ring-danger-800 active:bg-danger-100"}},{disabled:false,loading:false,variant:"light",tone:"success",className:{root:"bg-success-20 text-success-800 hover:bg-success-50 focus:ring-success-800 active:bg-success-100"}},{disabled:false,loading:false,variant:"ghost",tone:"primary",className:{root:"text-primary-600 hover:bg-primary-100 hover:text-primary-700 focus:ring-primary-800 active:bg-primary-200 active:text-primary-800 active:ring-0"}},{disabled:false,loading:false,variant:"ghost",tone:"neutral",className:{root:"hover:bg-primary-100 focus:ring-primary-800 active:bg-primary-200 text-neutral-800"}},{disabled:false,loading:false,variant:"ghost",tone:"danger",className:{root:"text-danger-700 hover:bg-danger-20 focus:ring-danger-800 active:bg-danger-50"}},{disabled:false,loading:false,variant:"ghost",tone:"success",className:{root:"text-success-700 hover:bg-success-20 focus:ring-success-800 active:bg-success-50"}},{disabled:true,loading:false,variant:"ghost",tone:["primary","neutral","danger","success"],className:{root:"text-neutral-600"}},{disabled:false,loading:true,variant:"ghost",tone:["primary","neutral","danger","success"],className:{}},{hasAlertBadge:true,loading:true,className:{root:"after:hidden"}},{hasAlertBadge:true,disabled:true,className:{root:"after:hidden"}}],defaultVariants:{variant:"primary",tone:"primary",disabled:false,loading:false}});export{r as a,t as b,s as c,n as d};
@@ -0,0 +1 @@
1
+ import {d as d$1}from'./chunk-Z6FU5QVL.js';import {d}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import {useTransition}from'react';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var s=createToaster({placement:"top-end",overlap:false,gap:8,duration:8e3}),C=l=>{let[c,m]=useTransition();return jsx(Toaster,{toaster:s,...l,children:({closable:p=true,...t})=>jsxs(Toast.Root,{className:a("group z-(--z-index) flex w-86 translate-x-(--x) translate-y-(--y) rounded-lg bg-neutral-900 p-4 opacity-(--opacity) transition-all will-change-transform","data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down flex items-center gap-2"),children:[jsx(Toast.Title,{className:"font-inter line-clamp-3 flex-1 text-sm leading-[130%] text-neutral-50",children:t.title}),jsxs("div",{className:"flex items-center empty:hidden",children:[t.action&&jsx(d,{variant:"ghost",loading:c,size:"sm",onClick:()=>{m(async()=>{try{await t.action?.onClick();}catch{}finally{s.dismiss();}});},children:t.action.label}),p&&jsx(Toast.CloseTrigger,{children:jsx(d$1,{className:"h-6 w-6 text-neutral-50"})})]})]},t.id)})};export{s as a,C as b};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-KRWEO45V.js';import {d as d$1}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import {createContext,forwardRef,useState,useEffect,useContext,useCallback,useMemo}from'react';import {PanelRightCloseIcon,PanelRightOpenIcon,PanelLeftCloseIcon,PanelLeftOpenIcon}from'lucide-react';import {jsxs,jsx}from'react/jsx-runtime';var h=createContext(null),f=()=>{let t=useContext(h);if(!t)throw new Error("useSidebar must be used within a SidebarProvider");return t},E=({open:t,defaultOpen:i=false,onOpenChange:a,storageKey:r,children:s})=>{let e=t!==void 0,[l,d]=useState(()=>{if(!e&&r&&typeof window<"u"){let u=localStorage.getItem(r);if(u!==null)return u==="true"}return i}),o=e?t:l;useEffect(()=>{!r||typeof window>"u"||localStorage.setItem(r,String(o));},[o,r]);let p=useCallback(()=>{let u=!o;e||d(u),a?.(u);},[e,o,a]),m=useMemo(()=>({isOpen:o,toggle:p}),[o,p]);return jsx(h.Provider,{value:m,children:s})};E.displayName="SidebarProvider";var y={left:{open:PanelLeftOpenIcon,close:PanelLeftCloseIcon},right:{open:PanelRightOpenIcon,close:PanelRightCloseIcon}},M=forwardRef(({side:t="left",className:i,children:a$1,...r},s)=>{let{isOpen:e,toggle:l}=f(),[d$1,o]=useState(e);useEffect(()=>{e&&o(true);},[e]);let p=e?y[t].close:y[t].open;return jsxs("aside",{ref:s,className:a("flex min-h-0 shrink-0 flex-col overflow-hidden border-neutral-400 bg-neutral-100 transition-[width] duration-300 ease-[cubic-bezier(0.165,0.84,0.44,1)]",t==="left"?"order-first border-r":"order-last border-l",e?"w-75":"w-13",i),...r,children:[jsx("div",{className:a("flex shrink-0 pt-2 pb-1",e?t==="left"?"justify-end px-2":"justify-start px-2":"justify-center"),children:jsx(d,{variant:"ghost",size:"md",Icon:p,onClick:l,"aria-expanded":e,"aria-label":e?"Collapse sidebar":"Expand sidebar"})}),d$1&&a$1]})});M.displayName="Sidebar";var k=forwardRef(({title:t,subtitle:i,Icon:a$1,buttons:r=[],className:s,...e},l)=>{let{isOpen:d$1}=f();return jsxs("div",{ref:l,className:a("flex min-w-75 shrink-0 flex-col border-b border-neutral-200 px-4 pb-3 transition-opacity duration-200",d$1?"opacity-100 delay-100":"pointer-events-none opacity-0",s),...e,children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[a$1&&jsx(a$1,{className:"size-4.5 shrink-0 text-neutral-900"}),jsx("p",{className:"font-jakarta line-clamp-1 flex-1 leading-[130%] font-semibold break-all text-neutral-900",children:t}),r.length>0&&jsx("div",{className:"flex gap-2",children:r.map(({visible:o=true,...p},m)=>o?jsx(d,{variant:"ghost",tone:"neutral",size:"sm",...p},m):null)})]}),i&&jsx("p",{className:"font-inter mt-1 line-clamp-2 text-xs leading-[130%] text-neutral-800",children:i})]})});k.displayName="SidebarHeader";var B=forwardRef(({className:t,children:i,...a$1},r)=>{let{isOpen:s}=f();return jsx("div",{ref:r,className:a("min-h-0 min-w-75 flex-1 shrink-0 overflow-y-auto px-4 py-2 transition-opacity duration-200",s?"opacity-100 delay-100":"pointer-events-none opacity-0",t),...a$1,children:i})});B.displayName="SidebarBody";var D=forwardRef(({className:t,buttons:i=[],children:a$1,...r},s)=>{let{isOpen:e}=f();return jsx("div",{ref:s,className:a("min-w-75 shrink-0 border-t border-neutral-200 px-4.5 pt-3 pb-4.5 transition-opacity duration-200",e?"opacity-100 delay-100":"pointer-events-none opacity-0",t),...r,children:i.length>0?jsx("div",{className:"flex gap-3",children:i.map(({visible:l=true,...d},o)=>l?jsx("div",{className:"flex-1",children:jsx(d$1,{size:"lg",className:"w-full",...d})},o):null)}):a$1})});D.displayName="SidebarFooter";export{f as a,E as b,M as c,k as d,B as e,D as f};
@@ -0,0 +1 @@
1
+ import {d as d$2}from'./chunk-3HZUH4JJ.js';import {d as d$1}from'./chunk-KRWEO45V.js';import {i as i$1,h as h$1}from'./chunk-Z6FU5QVL.js';import {d}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import*as i from'react';import {Pagination}from'@ark-ui/react/pagination';import {getDefaultOptions}from'date-fns';import {jsx,jsxs}from'react/jsx-runtime';var H={es:{paginationSummary:(a,e,n)=>`${a}-${e} de ${n}`,rowsPerPage:"Filas por p\xE1gina"},pt:{paginationSummary:(a,e,n)=>`${a}-${e} de ${n}`,rowsPerPage:"Linhas por p\xE1gina"}},h={paginationSummary:(a,e,n)=>`${a}-${e} of ${n}`,rowsPerPage:"Rows per page"},L=a=>{let e=a?.slice(0,2);return e&&H[e]||h},S=i.forwardRef(({className:a$1,...e},n)=>jsx("div",{ref:n,className:a("ring-primary-200 flex flex-col overflow-hidden rounded-lg bg-neutral-50 ring-1",a$1),...e}));S.displayName="TableContainer";var M=i.forwardRef(({className:a$1,...e},n)=>jsx("div",{className:a("relative w-full overflow-x-auto",a$1),children:jsx("table",{ref:n,className:"w-full table-auto overflow-hidden text-neutral-900",...e})}));M.displayName="Table";var E=i.forwardRef(({className:a,...e},n)=>jsx("thead",{ref:n,className:a,...e}));E.displayName="TableHeader";var z=i.forwardRef(({className:a,...e},n)=>jsx("tbody",{ref:n,className:a,...e}));z.displayName="TableBody";var A=i.forwardRef(({className:a$1,...e},n)=>jsx("tr",{ref:n,className:a("text-sm leading-[130%] font-normal",a$1),...e}));A.displayName="TableBodyRow";var I=i.forwardRef(({Icon:a$1,icon:e,title:n,description:l,className:r,button:m,...b},T)=>jsxs("div",{ref:T,...b,className:a("flex flex-col items-center justify-center py-10 text-neutral-500",r),children:[e&&i.cloneElement(e,{className:"text-neutral-300 w-6 h-6"}),a$1&&jsx(a$1,{className:"h-6 w-6 text-neutral-300"}),jsx("span",{className:"mt-2 text-sm leading-[130%] font-semibold",children:n}),l&&jsx("span",{className:"mt-0.5 text-sm leading-[130%]",children:l}),m&&jsx(d,{size:"sm",...m,className:a("mt-3",m.className)})]}));I.displayName="TableNoResults";var $=i.forwardRef(({className:a$1,...e},n)=>jsx("tr",{ref:n,className:a("bg-primary-100",a$1),...e}));$.displayName="TableHeaderRow";var B=i.forwardRef(({className:a$1,...e},n)=>jsx("th",{ref:n,className:a("h-10 px-3 py-1.5",a$1),...e}));B.displayName="TableHead";var k=i.forwardRef(({className:a$1,...e},n)=>jsx("td",{ref:n,className:a("h-22 px-4 py-3.5",a$1),...e}));k.displayName="TableCell";var w=({pageSize:a,rowsPerPageOptions:e,onPageSizeChange:n,label:l})=>jsxs("div",{className:"flex items-center justify-end",children:[jsx("select",{className:"mr-4 text-sm leading-[130%]",value:a,id:"rows_per_page",onChange:r=>{n?.(Number(r.target.value));},children:e.map(r=>jsx("option",{children:r},r))}),jsx("span",{className:"mr-2 text-sm leading-[130%] text-neutral-700",children:l})]}),J=({isDisableNextPageButton:a,isDisablePreviousPageButton:e,onNextPageClick:n,onPreviousPageClick:l,pagination:r,rowsCount:m,onPageSizeChange:b,onPageChange:T,rowsPerPageOptions:N=[10,20,50]})=>{let{locale:x}=getDefaultOptions(),f=L(x?.code);return m==null?jsxs("div",{className:"border-t-primary-200 grid min-h-12 flex-1 grid-cols-3 items-center justify-between gap-6 border-t px-4.5",children:[jsx("div",{}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(d$1,{Icon:i$1,size:"md",variant:"ghost",onClick:l,disabled:e}),jsx(d$1,{Icon:h$1,size:"md",variant:"ghost",onClick:n,disabled:a})]}),jsx(w,{pageSize:r.pageSize,rowsPerPageOptions:N,onPageSizeChange:b,label:f.rowsPerPage})]}):jsx(Pagination.Root,{count:m,page:r.pageIndex+1,pageSize:r.pageSize,siblingCount:2,onPageSizeChange:s=>{b?.(s.pageSize);},onPageChange:s=>{T?.(s.page);},children:jsx(Pagination.Context,{children:s=>jsxs("div",{className:"border-t-primary-200 grid min-h-12 flex-1 grid-cols-3 items-center justify-between gap-6 border-t px-4.5",children:[jsx("span",{className:"text-sm leading-[130%] font-normal text-neutral-700",children:f.paginationSummary(s.pageRange.start+1,s.pageRange.end,s.count)}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(Pagination.PrevTrigger,{asChild:true,onClick:l,disabled:e,children:jsx(d$1,{Icon:i$1,size:"md",variant:"ghost"})}),s.pages.map((c,u)=>c.type==="page"?jsx(Pagination.Item,{...c,asChild:true,children:jsx(d$2,{variant:"standard",type:"ghost",size:"xs",selected:s.page===c.value,className:"cursor-pointer",children:c.value})},u):jsx(Pagination.Ellipsis,{index:u,children:"\u2026"},u)),jsx(Pagination.NextTrigger,{asChild:true,onClick:n,disabled:a,children:jsx(d$1,{Icon:h$1,size:"md",variant:"ghost"})})]}),jsx(w,{pageSize:r.pageSize,rowsPerPageOptions:N,onPageSizeChange:c=>{s.setPageSize(c);},label:f.rowsPerPage})]})})})};export{S as a,M as b,E as c,z as d,A as e,I as f,$ as g,B as h,k as i,J as j};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-4CM257A2.js';import {d}from'./chunk-Z6FU5QVL.js';import {d as d$1}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import*as r from'react';import {useCallback}from'react';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {jsxs,jsx}from'react/jsx-runtime';var H=({onOpenChange:t,...o})=>{let i=useCallback(m=>{t?.(m.open);},[t]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:i,...o})},F=Dialog.Trigger,f=r.forwardRef(({className:t,children:o,...i},m)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-900/50"}),jsx(Dialog.Positioner,{className:"fixed inset-0 z-50",children:jsx(Dialog.Content,{ref:m,className:a("elevation-9 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200",t),...i,children:o})})]}));f.displayName="DialogContent";var D=({className:t,...o})=>jsx("div",{className:a("mr-4 mb-4 ml-6 flex flex-col gap-4 text-left",t),...o});D.displayName="DialogHeader";var u=({className:t,...o})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",t),...o})]});u.displayName="DialogFooter";var M=({className:t,...o})=>jsx("div",{className:a("mx-6 mb-4.5",t),...o}),C=r.forwardRef(({className:t,...o},i)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(Dialog.Title,{ref:i,className:a("font-jakarta pr-2 text-lg leading-[160%] font-semibold",t),...o}),jsxs(Dialog.CloseTrigger,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));C.displayName="DialogTitle";var R=r.forwardRef(({className:t,...o},i)=>jsx(Dialog.Description,{ref:i,className:a("font-inter text-sm leading-[130%] font-normal",t),...o}));R.displayName="DialogDescription";var O=t=>jsx(d$1,{variant:"primary",...t}),z=t=>jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d$1,{variant:"secondary",...t})}),L=t=>jsx(d$1,{variant:"ghost",...t});export{H as a,F as b,f as c,D as d,u as e,M as f,C as g,R as h,O as i,z as j,L as k};
@@ -1 +1 @@
1
- import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-2OYWJQ3Y.js';import {a as a$5,b as b$2,c as c$1}from'./chunk-4RJVZ7FN.js';import {b as b$1}from'./chunk-7EQ5IQED.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {a as a$2}from'./chunk-CM6ALMTT.js';import {c as c$2}from'./chunk-KWX4XPCO.js';import {e as e$1,A,H,G as G$1,q as q$1,F,E,D,C,x,y,z,f as f$1,B}from'./chunk-Z6FU5QVL.js';import {a as a$4}from'./chunk-ICF6RQIW.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';var U={alert:{Icon:B,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},incident:{Icon:f$1,bgClassName:"bg-warning-100 hover:bg-warning-200",iconClassName:"text-warning-900"},"no-address":{Icon:z,bgClassName:"bg-coral-50 hover:bg-coral-100",iconClassName:"text-coral-700"},"email-alert":{Icon:y,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},superadmin:{Icon:x,bgClassName:"bg-orchid-100 hover:bg-orchid-200",iconClassName:"text-orchid-700"},bundle:{Icon:C,bgClassName:"bg-aqua-100 hover:bg-aqua-200",iconClassName:"text-aqua-800"},variants:{Icon:a$4,bgClassName:"bg-bubblegum-50 hover:bg-bubblegum-100",iconClassName:"text-bubblegum-700"},providers:{Icon:D,bgClassName:"bg-pink-50 hover:bg-pink-200",iconClassName:"text-pink-700"},"transaction-request":{Icon:E,bgClassName:"bg-green-100 hover:bg-green-200",iconClassName:"text-green-800"},design:{Icon:F,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},error:{Icon:q$1,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:G$1,bgClassName:"bg-new-50 hover:bg-new-200",iconClassName:"text-new-700 group-hover/preset:text-new-800"},products:{Icon:H,bgClassName:"bg-bubblegum-200 hover:bg-bubblegum-300",iconClassName:"text-bubblegum-700"},more:{Icon:A,bgClassName:"bg-primary-300 hover:bg-primary-400",iconClassName:"text-primary-700"},empty:{bgClassName:"bg-primary-50 border-b border-b-primary-200 hover:bg-primary-100 data-disabled:border-b-neutral-300"}},Ke=["alert","incident"],ht=o=>{let t=Ke.map(l=>o.find(i=>i.name===l)).filter(l=>l!==void 0),d=o.filter(l=>!Ke.includes(l.name));return [...t,...d]},St=o=>({id:q,size:54,enableResizing:false,header:({table:t})=>{let d=t.getRowModel().rows.some(i=>i.getCanSelect()),l=t.getIsAllPageRowsSelected()?true:t.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:l,disabled:!d,className:"ml-1",onCheckedChange:i=>t.toggleAllPageRowsSelected(i===true)})},cell:({row:t})=>{let d=t.getCanSelect(),l=d?t.getIsSelected():typeof o.setDisabledRowState=="function"?o.setDisabledRowState(t.original):o.setDisabledRowState??false,i=jsx(b$1,{checked:l,onCheckedChange:y=>t.toggleSelected(y===true),disabled:!d}),c=o.rowSelectionTooltip?.content(t.original);return c?jsx(a$2,{className:"w-fit",content:c,positioning:o.rowSelectionTooltip?.positioning??{placement:"right"},children:i}):i},enableSorting:false}),Q=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],Qe=({columns:o,rows:t,hasSelection:d$1,hasRowActions:l,hasPagination:i$1,className:c$1,...y})=>jsxs(a$1,{className:c$1,...y,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[l&&jsx(h,{className:a("p-0",K)}),d$1&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),Array.from({length:o},(p,D)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},D))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:Array.from({length:t},(p,D)=>jsxs(e,{children:[l&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",K),children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),d$1&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:o},(u,S)=>jsx(i,{children:jsx(a$3,{className:a("h-4",Q[(D+S)%Q.length])})},S))]},D))})]}),i$1&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});Qe.displayName="DataTableFullSkeleton";var wt={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},I="__row_actions__",q="__select__",K="w-7.5 min-w-7.5 max-w-7.5",Je="grid grid-cols-1 h-full w-full cursor-pointer overflow-hidden border-0 p-0 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-800 focus:rounded-xs disabled:cursor-not-allowed",G=(o,t)=>{let d=o.Icon;return jsx(a$2,{content:t?.tooltip??"",disabled:!t?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":t?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",o.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:d&&jsx(d,{className:a("size-3.5 shrink-0",o.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},t?.key)},re=(o,t)=>typeof o=="function"?o(t):o??false,Rt=({row:o,rowActions:t})=>{let[d,l]=useState(false),i=o.original,c=ht(t(i));if(c.length===0)return G(U.empty);let y=c.length>3,p=y?c.slice(0,2):c,D=y?3:p.length;if(c.length===1){let u=c[0],S=re(u.isDisabled,i);return jsx("button",{type:"button","aria-label":u.label,disabled:S,className:Je,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:P=>{P.stopPropagation(),u.onClick(i);},children:G(U[u.name],{disabled:S,tooltip:u.tooltip})})}return jsxs(a$5,{open:d,onOpenChange:l,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$2,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:Je,style:{gridTemplateRows:`repeat(${D}, minmax(0, 1fr))`},onClick:u=>{u.stopPropagation();},children:[p.map((u,S)=>G(U[u.name],{key:`${u.name}-${S}`,disabled:re(u.isDisabled,i),tooltip:u.tooltip})),y&&G(U.more)]})}),jsx(c$1,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:c.map((u,S)=>{let P=U[u.name];if(!P.Icon)return null;let r=re(u.isDisabled,i);return jsx(c$2,{variant:"ghost",size:"md",disabled:r,StartIcon:P.Icon,className:"h-auto! min-h-0! w-full justify-start gap-2! px-3! py-4! text-neutral-900! hover:text-neutral-900! disabled:text-neutral-900!",onClick:g=>{g.stopPropagation(),u.onClick(i),l(false);},type:"button",children:u.label},`${u.name}-${S}`)})})})]})},zt=({rowActions:o})=>({id:I,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:t})=>o?jsx(Rt,{row:t,rowActions:o}):null}),Ze=memo(({row:o,isSelected:t,resizable:d,type:l})=>jsx(e,{"data-state":t&&"selected",className:a(l&&l!=="default"&&wt[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:o.getVisibleCells().map(i$1=>jsx(i,{className:i$1.column.id===I?a("p-0 align-middle",K):void 0,style:i$1.column.id!==I&&d?{width:`calc(var(--col-${i$1.column.id}-size) * 1px)`,minWidth:`calc(var(--col-${i$1.column.id}-size) * 1px)`,maxWidth:`calc(var(--col-${i$1.column.id}-size) * 1px)`}:void 0,children:flexRender(i$1.column.columnDef.cell,i$1.getContext())},i$1.id))}),(o,t)=>o.isSelected===t.isSelected&&o.row.original===t.row.original&&o.resizable===t.resizable&&o.type===t.type);Ze.displayName="DataTableRow";var et="dt-col-ratios-",Nt=o=>{try{let t=localStorage.getItem(`${et}${o}`);return t?JSON.parse(t):{}}catch{return {}}},yt=(o,t)=>{try{localStorage.setItem(`${et}${o}`,JSON.stringify(t));}catch{}},Xe=(o,t,d)=>{let l={},i=t,c=[];for(let r of o)r.canResize?c.push(r):(l[r.id]=r.defaultSize,i-=r.defaultSize);if(c.length===0||i<=0)return l;let y=new Set(c.map(r=>r.id)),p={};for(let[r,g]of Object.entries(d))y.has(r)&&(p[r]=g);let D=c.filter(r=>!(r.id in p)),u={};if(Object.keys(p).length===0){let r=c.reduce((g,O)=>g+O.defaultSize,0);for(let g of c)u[g.id]=g.defaultSize/r;}else if(D.length===0){let r=Object.values(p).reduce((g,O)=>g+O,0);for(let g of c)u[g.id]=p[g.id]/r;}else {let r=c.reduce((w,k)=>w+k.defaultSize,0),O=D.reduce((w,k)=>w+k.defaultSize,0)/r,_=Object.values(p).reduce((w,k)=>w+k,0),J=(1-O)/_;for(let w of c)w.id in p?u[w.id]=p[w.id]*J:u[w.id]=w.defaultSize/r;}for(let r of c)l[r.id]=Math.max(Math.round(u[r.id]*i),r.defaultSize);let P=c.reduce((r,g)=>r+l[g.id],0)-i;if(P!==0&&c.length>0){let r=c[c.length-1];l[r.id]=Math.max(l[r.id]-P,r.defaultSize);}return l},Ye=(o,t)=>{let d=0;for(let i of t)d+=o[i]??0;if(d===0)return {};let l={};for(let i of t)o[i]!=null&&(l[i]=o[i]/d);return l};function Yt({columns:o,data:t,rowsCount:d$1,pagination:l,onPaginationChange:i$1,noResults:c$1,onNextPageClick:y,onPreviousPageClick:p,disableNextPage:D,disablePreviousPage:u,className:S,onRowsPerPageChange:P,columnOrder:r,columnVisibility:g$1,rowsPerPageOptions:O,enableRowSelection:_=false,rowSelection:J,onRowSelectionChange:w,getRowId:k,rowSelectionTooltip:de,setDisabledRowState:ue,tableId:T,isLoading:E,isInitialLoading:me,skeletonRowCount:tt,skeletonColumns:ot=6,getRowType:ge,rowActions:A,...be}){let $=typeof _=="function"||_,fe=useMemo(()=>{if(!r)return;let n=[A?I:null,$?q:null].filter(s=>s!=null),a=new Set(n);return [...n,...r.filter(s=>!a.has(s))]},[r,$,A]),nt=useMemo(()=>{let n=[...o];if($&&n.unshift(St({rowSelectionTooltip:de,setDisabledRowState:ue})),A){let a=zt({rowActions:A});n.unshift(a);}return n},[$,o,de,ue,A]),[X,at]=useState(null),it=useCallback(n=>at(n),[]),W=useRef({}),B=useRef(null),[j$1,Z]=useState({}),lt=n=>{Z(a=>{let s=typeof n=="function"?n(a):n,m=B.current;if(!m)return s;let C=m.getState().columnSizingInfo.isResizingColumn;if(!C)return s;let v=m.getVisibleLeafColumns(),R=v.findIndex(M=>M.id===C);if(R===-1)return s;let x=null;for(let M=R+1;M<v.length;M++)if(v[M].getCanResize()){x=v[M];break}if(!x)return s;let z=v[R].columnDef,rt=z.size??150,ct=z.minSize??80,ee=a[C]??rt,dt=s[C]??ee,he=Math.max(dt,ct),Se=he-ee;if(Se===0)return {...s,[C]:he};let we=x.id,ut=x.columnDef.size??150,mt=x.columnDef.minSize??80,Re=a[we]??ut,ze=Math.max(Re-Se,mt),gt=Re-ze,bt=ee+gt;return {...s,[C]:bt,[we]:ze}});},f$1=useReactTable({data:t,columns:nt,rowCount:d$1,state:{pagination:l,...fe!==void 0&&{columnOrder:fe},columnVisibility:g$1,...J!==void 0&&{rowSelection:J},...T&&{columnSizing:j$1}},onPaginationChange:i$1,onRowSelectionChange:w,...T&&{columnResizeMode:"onChange",onColumnSizingChange:lt,defaultColumn:{minSize:80}},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof _=="function"?n=>_(n.original):_,getRowId:k?n=>k(n):void 0});B.current=f$1;let st=f$1.getVisibleLeafColumns().map(n=>n.id).join(",");useEffect(()=>{if(!T||!X)return;(s=>{let m=B.current;if(!m)return;let C=Object.keys(W.current).length>0?W.current:Nt(T),v=m.getVisibleLeafColumns().map(z=>({id:z.id,defaultSize:z.columnDef.size??150,canResize:z.getCanResize()})),R=Xe(v,s,C),x=new Set(m.getVisibleLeafColumns().filter(z=>z.getCanResize()).map(z=>z.id));W.current=Ye(R,x),Z(R);})(X.clientWidth);let a=new ResizeObserver(([s])=>{if(!s)return;let m=B.current;if(!m||m.getState().columnSizingInfo.isResizingColumn)return;let C=m.getVisibleLeafColumns().map(R=>({id:R.id,defaultSize:R.columnDef.size??150,canResize:R.getCanResize()})),v=Xe(C,s.contentRect.width,W.current);Z(v);});return a.observe(X),()=>a.disconnect()},[T,st,X]);let F=useMemo(()=>{if(!T||Object.keys(j$1).length===0)return;let n=f$1.getFlatHeaders(),a={};for(let s of n)a[`--header-${s.id}-size`]=s.getSize(),a[`--col-${s.column.id}-size`]=s.column.getSize();return a},[T,f$1.getState().columnSizingInfo,f$1.getState().columnSizing]),pe=f$1.getState().columnSizingInfo.isResizingColumn;useEffect(()=>{if(T&&!pe&&Object.keys(j$1).length>0){let n=B.current;if(!n)return;let a=new Set(n.getVisibleLeafColumns().filter(m=>m.getCanResize()).map(m=>m.id)),s=Ye(j$1,a);W.current=s,yt(T,s);}},[T,pe,j$1]);let Ce=tt??l?.pageSize??10,Te=f$1.getTotalSize();return me?jsx(Qe,{columns:ot,rows:Ce,hasSelection:$,hasRowActions:!!A,hasPagination:!!l,className:S,...be}):!E&&!me&&!f$1.getRowModel().rows?.length?jsx(f,{...c$1}):jsxs(a$1,{ref:it,className:S,...be,children:[jsxs(b,{style:F?{...F,width:"100%",minWidth:Te,tableLayout:"fixed"}:{width:"100%",minWidth:Te,tableLayout:"fixed"},children:[!F&&jsx("colgroup",{children:f$1.getHeaderGroups()[0].headers.map(n=>{let a=!!T||!n.column.getCanResize();return jsx("col",{span:1,style:a?{width:n.column.getSize()}:void 0},n.id)})}),jsx(c,{children:f$1.getHeaderGroups().map(n=>jsx(g,{children:n.headers.map(a$1=>{if(a$1.isPlaceholder)return jsx(h,{style:F?{width:`calc(var(--header-${a$1.id}-size) * 1px)`,minWidth:`calc(var(--header-${a$1.id}-size) * 1px)`,maxWidth:`calc(var(--header-${a$1.id}-size) * 1px)`}:void 0},a$1.id);let s=a$1.column.columnDef,m=flexRender(s.header,a$1.getContext()),C=a$1.column.id!==q&&s.headerTooltip!==false,v=s.headerTooltip&&typeof s.headerTooltip!="boolean"?s.headerTooltip:m,R=jsx("span",{className:"font-inter line-clamp-1 text-xs leading-[133%] text-neutral-900 uppercase",children:m});return jsxs(h,{className:a$1.column.id===I?a("p-0",K):T?"group/resize relative overflow-clip":void 0,style:a$1.column.id!==I&&F?{width:`calc(var(--header-${a$1.id}-size) * 1px)`,minWidth:`calc(var(--header-${a$1.id}-size) * 1px)`,maxWidth:`calc(var(--header-${a$1.id}-size) * 1px)`}:void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:v,contentClassName:"font-normal normal-case",children:R}):R,s.headerInfoTooltip&&jsx(a$2,{content:s.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),T&&a$1.column.getCanResize()&&n.headers.some((x,z)=>z>n.headers.indexOf(a$1)&&x.column.getCanResize())&&jsx("div",{onMouseDown:a$1.getResizeHandler(),onTouchStart:a$1.getResizeHandler(),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",a$1.column.getIsResizing()&&"bg-primary-600 opacity-100")})]},a$1.id)})},n.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:E?Array.from({length:Ce},(n,a$1)=>jsx(e,{children:f$1.getVisibleLeafColumns().map((s,m)=>{let C=s.columnDef;return jsx(i,{className:s.id===q?"align-middle":s.id===I?a("bg-primary-50 p-0 align-middle",K):void 0,children:s.id===q?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===I?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):C.skeleton!=null?C.skeleton:jsx(a$3,{className:a("h-4",Q[(a$1+m)%Q.length])})},s.id)})},a$1)):f$1.getRowModel().rows.map(n=>jsx(Ze,{row:n,isSelected:n.getIsSelected(),resizable:!!T,type:ge?ge(n.original):"default"},n.id))})]}),l&&i$1&&(t.length>0||E)&&jsx(j,{rowsPerPageOptions:O,rowsCount:d$1,pagination:l,onPageSizeChange:n=>{f$1.setPagination({pageIndex:0,pageSize:n}),P?.(n);},onPreviousPageClick:p,onNextPageClick:y,isDisableNextPageButton:E||D||!!d$1&&!f$1.getCanNextPage(),isDisablePreviousPageButton:E||u||!!d$1&&!f$1.getCanPreviousPage(),onPageChange:n=>{f$1.setPageIndex(n-1);}})]})}export{Yt as a};
1
+ import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-GEDHSFJW.js';import {a as a$5,b as b$2,c as c$1}from'./chunk-4RJVZ7FN.js';import {b as b$1}from'./chunk-7EQ5IQED.js';import {a as a$3}from'./chunk-KTD2GEB6.js';import {a as a$2}from'./chunk-CM6ALMTT.js';import {e as e$1,A,H,G as G$1,q as q$1,F,E,D,C,x,y,z,f as f$1,B}from'./chunk-Z6FU5QVL.js';import {a as a$4}from'./chunk-ICF6RQIW.js';import {d as d$1}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import {memo,useMemo,useState,useCallback,useRef,useEffect}from'react';import {flexRender,useReactTable,getCoreRowModel}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';var U={alert:{Icon:B,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},incident:{Icon:f$1,bgClassName:"bg-warning-100 hover:bg-warning-200",iconClassName:"text-warning-900"},"no-address":{Icon:z,bgClassName:"bg-coral-50 hover:bg-coral-100",iconClassName:"text-coral-700"},"email-alert":{Icon:y,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},superadmin:{Icon:x,bgClassName:"bg-orchid-100 hover:bg-orchid-200",iconClassName:"text-orchid-700"},bundle:{Icon:C,bgClassName:"bg-aqua-100 hover:bg-aqua-200",iconClassName:"text-aqua-800"},variants:{Icon:a$4,bgClassName:"bg-bubblegum-50 hover:bg-bubblegum-100",iconClassName:"text-bubblegum-700"},providers:{Icon:D,bgClassName:"bg-pink-50 hover:bg-pink-200",iconClassName:"text-pink-700"},"transaction-request":{Icon:E,bgClassName:"bg-green-100 hover:bg-green-200",iconClassName:"text-green-800"},design:{Icon:F,bgClassName:"bg-orange-50 hover:bg-orange-100",iconClassName:"text-orange-700"},error:{Icon:q$1,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:G$1,bgClassName:"bg-new-50 hover:bg-new-200",iconClassName:"text-new-700 group-hover/preset:text-new-800"},products:{Icon:H,bgClassName:"bg-bubblegum-200 hover:bg-bubblegum-300",iconClassName:"text-bubblegum-700"},more:{Icon:A,bgClassName:"bg-primary-300 hover:bg-primary-400",iconClassName:"text-primary-700"},empty:{bgClassName:"bg-primary-50 border-b border-b-primary-200 hover:bg-primary-100 data-disabled:border-b-neutral-300"}},Ke=["alert","incident"],ht=o=>{let t=Ke.map(l=>o.find(i=>i.name===l)).filter(l=>l!==void 0),d=o.filter(l=>!Ke.includes(l.name));return [...t,...d]},St=o=>({id:q,size:54,enableResizing:false,header:({table:t})=>{let d=t.getRowModel().rows.some(i=>i.getCanSelect()),l=t.getIsAllPageRowsSelected()?true:t.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:l,disabled:!d,className:"ml-1",onCheckedChange:i=>t.toggleAllPageRowsSelected(i===true)})},cell:({row:t})=>{let d=t.getCanSelect(),l=d?t.getIsSelected():typeof o.setDisabledRowState=="function"?o.setDisabledRowState(t.original):o.setDisabledRowState??false,i=jsx(b$1,{checked:l,onCheckedChange:y=>t.toggleSelected(y===true),disabled:!d}),c=o.rowSelectionTooltip?.content(t.original);return c?jsx(a$2,{className:"w-fit",content:c,positioning:o.rowSelectionTooltip?.positioning??{placement:"right"},children:i}):i},enableSorting:false}),Q=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],Qe=({columns:o,rows:t,hasSelection:d$1,hasRowActions:l,hasPagination:i$1,className:c$1,...y})=>jsxs(a$1,{className:c$1,...y,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[l&&jsx(h,{className:a("p-0",K)}),d$1&&jsx(h,{className:"w-13.5",children:jsx(a$3,{className:"bg-primary-300 m-0.5 ml-1.5 size-4.5 rounded-sm"})}),Array.from({length:o},(p,D)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},D))]})}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:Array.from({length:t},(p,D)=>jsxs(e,{children:[l&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",K),children:jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]})}),d$1&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:o},(u,S)=>jsx(i,{children:jsx(a$3,{className:a("h-4",Q[(D+S)%Q.length])})},S))]},D))})]}),i$1&&jsxs("div",{className:"border-t-primary-200 grid min-h-12 grid-cols-3 items-center gap-6 border-t px-4.5",children:[jsx(a$3,{className:"h-3.5 w-20"}),jsxs("div",{className:"flex items-center justify-center gap-2",children:[jsx(a$3,{className:"size-8 rounded-lg"}),jsx(a$3,{className:"size-8 rounded-lg"})]}),jsx("div",{className:"flex justify-end",children:jsx(a$3,{className:"h-3.5 w-28"})})]})]});Qe.displayName="DataTableFullSkeleton";var wt={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},I="__row_actions__",q="__select__",K="w-7.5 min-w-7.5 max-w-7.5",Je="grid grid-cols-1 h-full w-full cursor-pointer overflow-hidden border-0 p-0 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-800 focus:rounded-xs disabled:cursor-not-allowed",G=(o,t)=>{let d=o.Icon;return jsx(a$2,{content:t?.tooltip??"",disabled:!t?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":t?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",o.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:d&&jsx(d,{className:a("size-3.5 shrink-0",o.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},t?.key)},re=(o,t)=>typeof o=="function"?o(t):o??false,Rt=({row:o,rowActions:t})=>{let[d,l]=useState(false),i=o.original,c=ht(t(i));if(c.length===0)return G(U.empty);let y=c.length>3,p=y?c.slice(0,2):c,D=y?3:p.length;if(c.length===1){let u=c[0],S=re(u.isDisabled,i);return jsx("button",{type:"button","aria-label":u.label,disabled:S,className:Je,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:P=>{P.stopPropagation(),u.onClick(i);},children:G(U[u.name],{disabled:S,tooltip:u.tooltip})})}return jsxs(a$5,{open:d,onOpenChange:l,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$2,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:Je,style:{gridTemplateRows:`repeat(${D}, minmax(0, 1fr))`},onClick:u=>{u.stopPropagation();},children:[p.map((u,S)=>G(U[u.name],{key:`${u.name}-${S}`,disabled:re(u.isDisabled,i),tooltip:u.tooltip})),y&&G(U.more)]})}),jsx(c$1,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:c.map((u,S)=>{let P=U[u.name];if(!P.Icon)return null;let r=re(u.isDisabled,i);return jsx(d$1,{variant:"ghost",size:"md",disabled:r,StartIcon:P.Icon,className:"h-auto! min-h-0! w-full justify-start gap-2! px-3! py-4! text-neutral-900! hover:text-neutral-900! disabled:text-neutral-900!",onClick:g=>{g.stopPropagation(),u.onClick(i),l(false);},type:"button",children:u.label},`${u.name}-${S}`)})})})]})},zt=({rowActions:o})=>({id:I,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:t})=>o?jsx(Rt,{row:t,rowActions:o}):null}),Ze=memo(({row:o,isSelected:t,resizable:d,type:l})=>jsx(e,{"data-state":t&&"selected",className:a(l&&l!=="default"&&wt[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:o.getVisibleCells().map(i$1=>jsx(i,{className:i$1.column.id===I?a("p-0 align-middle",K):void 0,style:i$1.column.id!==I&&d?{width:`calc(var(--col-${i$1.column.id}-size) * 1px)`,minWidth:`calc(var(--col-${i$1.column.id}-size) * 1px)`,maxWidth:`calc(var(--col-${i$1.column.id}-size) * 1px)`}:void 0,children:flexRender(i$1.column.columnDef.cell,i$1.getContext())},i$1.id))}),(o,t)=>o.isSelected===t.isSelected&&o.row.original===t.row.original&&o.resizable===t.resizable&&o.type===t.type);Ze.displayName="DataTableRow";var et="dt-col-ratios-",Nt=o=>{try{let t=localStorage.getItem(`${et}${o}`);return t?JSON.parse(t):{}}catch{return {}}},yt=(o,t)=>{try{localStorage.setItem(`${et}${o}`,JSON.stringify(t));}catch{}},Xe=(o,t,d)=>{let l={},i=t,c=[];for(let r of o)r.canResize?c.push(r):(l[r.id]=r.defaultSize,i-=r.defaultSize);if(c.length===0||i<=0)return l;let y=new Set(c.map(r=>r.id)),p={};for(let[r,g]of Object.entries(d))y.has(r)&&(p[r]=g);let D=c.filter(r=>!(r.id in p)),u={};if(Object.keys(p).length===0){let r=c.reduce((g,O)=>g+O.defaultSize,0);for(let g of c)u[g.id]=g.defaultSize/r;}else if(D.length===0){let r=Object.values(p).reduce((g,O)=>g+O,0);for(let g of c)u[g.id]=p[g.id]/r;}else {let r=c.reduce((w,k)=>w+k.defaultSize,0),O=D.reduce((w,k)=>w+k.defaultSize,0)/r,_=Object.values(p).reduce((w,k)=>w+k,0),J=(1-O)/_;for(let w of c)w.id in p?u[w.id]=p[w.id]*J:u[w.id]=w.defaultSize/r;}for(let r of c)l[r.id]=Math.max(Math.round(u[r.id]*i),r.defaultSize);let P=c.reduce((r,g)=>r+l[g.id],0)-i;if(P!==0&&c.length>0){let r=c[c.length-1];l[r.id]=Math.max(l[r.id]-P,r.defaultSize);}return l},Ye=(o,t)=>{let d=0;for(let i of t)d+=o[i]??0;if(d===0)return {};let l={};for(let i of t)o[i]!=null&&(l[i]=o[i]/d);return l};function Yt({columns:o,data:t,rowsCount:d$1,pagination:l,onPaginationChange:i$1,noResults:c$1,onNextPageClick:y,onPreviousPageClick:p,disableNextPage:D,disablePreviousPage:u,className:S,onRowsPerPageChange:P,columnOrder:r,columnVisibility:g$1,rowsPerPageOptions:O,enableRowSelection:_=false,rowSelection:J,onRowSelectionChange:w,getRowId:k,rowSelectionTooltip:de,setDisabledRowState:ue,tableId:T,isLoading:E,isInitialLoading:me,skeletonRowCount:tt,skeletonColumns:ot=6,getRowType:ge,rowActions:A,...be}){let $=typeof _=="function"||_,fe=useMemo(()=>{if(!r)return;let n=[A?I:null,$?q:null].filter(s=>s!=null),a=new Set(n);return [...n,...r.filter(s=>!a.has(s))]},[r,$,A]),nt=useMemo(()=>{let n=[...o];if($&&n.unshift(St({rowSelectionTooltip:de,setDisabledRowState:ue})),A){let a=zt({rowActions:A});n.unshift(a);}return n},[$,o,de,ue,A]),[X,at]=useState(null),it=useCallback(n=>at(n),[]),W=useRef({}),B=useRef(null),[j$1,Z]=useState({}),lt=n=>{Z(a=>{let s=typeof n=="function"?n(a):n,m=B.current;if(!m)return s;let C=m.getState().columnSizingInfo.isResizingColumn;if(!C)return s;let v=m.getVisibleLeafColumns(),R=v.findIndex(M=>M.id===C);if(R===-1)return s;let x=null;for(let M=R+1;M<v.length;M++)if(v[M].getCanResize()){x=v[M];break}if(!x)return s;let z=v[R].columnDef,rt=z.size??150,ct=z.minSize??80,ee=a[C]??rt,dt=s[C]??ee,he=Math.max(dt,ct),Se=he-ee;if(Se===0)return {...s,[C]:he};let we=x.id,ut=x.columnDef.size??150,mt=x.columnDef.minSize??80,Re=a[we]??ut,ze=Math.max(Re-Se,mt),gt=Re-ze,bt=ee+gt;return {...s,[C]:bt,[we]:ze}});},f$1=useReactTable({data:t,columns:nt,rowCount:d$1,state:{pagination:l,...fe!==void 0&&{columnOrder:fe},columnVisibility:g$1,...J!==void 0&&{rowSelection:J},...T&&{columnSizing:j$1}},onPaginationChange:i$1,onRowSelectionChange:w,...T&&{columnResizeMode:"onChange",onColumnSizingChange:lt,defaultColumn:{minSize:80}},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof _=="function"?n=>_(n.original):_,getRowId:k?n=>k(n):void 0});B.current=f$1;let st=f$1.getVisibleLeafColumns().map(n=>n.id).join(",");useEffect(()=>{if(!T||!X)return;(s=>{let m=B.current;if(!m)return;let C=Object.keys(W.current).length>0?W.current:Nt(T),v=m.getVisibleLeafColumns().map(z=>({id:z.id,defaultSize:z.columnDef.size??150,canResize:z.getCanResize()})),R=Xe(v,s,C),x=new Set(m.getVisibleLeafColumns().filter(z=>z.getCanResize()).map(z=>z.id));W.current=Ye(R,x),Z(R);})(X.clientWidth);let a=new ResizeObserver(([s])=>{if(!s)return;let m=B.current;if(!m||m.getState().columnSizingInfo.isResizingColumn)return;let C=m.getVisibleLeafColumns().map(R=>({id:R.id,defaultSize:R.columnDef.size??150,canResize:R.getCanResize()})),v=Xe(C,s.contentRect.width,W.current);Z(v);});return a.observe(X),()=>a.disconnect()},[T,st,X]);let F=useMemo(()=>{if(!T||Object.keys(j$1).length===0)return;let n=f$1.getFlatHeaders(),a={};for(let s of n)a[`--header-${s.id}-size`]=s.getSize(),a[`--col-${s.column.id}-size`]=s.column.getSize();return a},[T,f$1.getState().columnSizingInfo,f$1.getState().columnSizing]),pe=f$1.getState().columnSizingInfo.isResizingColumn;useEffect(()=>{if(T&&!pe&&Object.keys(j$1).length>0){let n=B.current;if(!n)return;let a=new Set(n.getVisibleLeafColumns().filter(m=>m.getCanResize()).map(m=>m.id)),s=Ye(j$1,a);W.current=s,yt(T,s);}},[T,pe,j$1]);let Ce=tt??l?.pageSize??10,Te=f$1.getTotalSize();return me?jsx(Qe,{columns:ot,rows:Ce,hasSelection:$,hasRowActions:!!A,hasPagination:!!l,className:S,...be}):!E&&!me&&!f$1.getRowModel().rows?.length?jsx(f,{...c$1}):jsxs(a$1,{ref:it,className:S,...be,children:[jsxs(b,{style:F?{...F,width:"100%",minWidth:Te,tableLayout:"fixed"}:{width:"100%",minWidth:Te,tableLayout:"fixed"},children:[!F&&jsx("colgroup",{children:f$1.getHeaderGroups()[0].headers.map(n=>{let a=!!T||!n.column.getCanResize();return jsx("col",{span:1,style:a?{width:n.column.getSize()}:void 0},n.id)})}),jsx(c,{children:f$1.getHeaderGroups().map(n=>jsx(g,{children:n.headers.map(a$1=>{if(a$1.isPlaceholder)return jsx(h,{style:F?{width:`calc(var(--header-${a$1.id}-size) * 1px)`,minWidth:`calc(var(--header-${a$1.id}-size) * 1px)`,maxWidth:`calc(var(--header-${a$1.id}-size) * 1px)`}:void 0},a$1.id);let s=a$1.column.columnDef,m=flexRender(s.header,a$1.getContext()),C=a$1.column.id!==q&&s.headerTooltip!==false,v=s.headerTooltip&&typeof s.headerTooltip!="boolean"?s.headerTooltip:m,R=jsx("span",{className:"font-inter line-clamp-1 text-xs leading-[133%] text-neutral-900 uppercase",children:m});return jsxs(h,{className:a$1.column.id===I?a("p-0",K):T?"group/resize relative overflow-clip":void 0,style:a$1.column.id!==I&&F?{width:`calc(var(--header-${a$1.id}-size) * 1px)`,minWidth:`calc(var(--header-${a$1.id}-size) * 1px)`,maxWidth:`calc(var(--header-${a$1.id}-size) * 1px)`}:void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:v,contentClassName:"font-normal normal-case",children:R}):R,s.headerInfoTooltip&&jsx(a$2,{content:s.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e$1,{className:"ml-1 w-[0.875rem] shrink-0"})})]}),T&&a$1.column.getCanResize()&&n.headers.some((x,z)=>z>n.headers.indexOf(a$1)&&x.column.getCanResize())&&jsx("div",{onMouseDown:a$1.getResizeHandler(),onTouchStart:a$1.getResizeHandler(),className:a("absolute top-0 right-0 h-full w-1 cursor-col-resize touch-none select-none","bg-primary-400 opacity-0 transition-opacity group-hover/resize:opacity-100",a$1.column.getIsResizing()&&"bg-primary-600 opacity-100")})]},a$1.id)})},n.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:E?Array.from({length:Ce},(n,a$1)=>jsx(e,{children:f$1.getVisibleLeafColumns().map((s,m)=>{let C=s.columnDef;return jsx(i,{className:s.id===q?"align-middle":s.id===I?a("bg-primary-50 p-0 align-middle",K):void 0,children:s.id===q?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===I?jsxs("div",{className:"grid h-full w-full grid-rows-3",children:[jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"}),jsx(a$3,{className:"h-full w-full rounded-none"})]}):C.skeleton!=null?C.skeleton:jsx(a$3,{className:a("h-4",Q[(a$1+m)%Q.length])})},s.id)})},a$1)):f$1.getRowModel().rows.map(n=>jsx(Ze,{row:n,isSelected:n.getIsSelected(),resizable:!!T,type:ge?ge(n.original):"default"},n.id))})]}),l&&i$1&&(t.length>0||E)&&jsx(j,{rowsPerPageOptions:O,rowsCount:d$1,pagination:l,onPageSizeChange:n=>{f$1.setPagination({pageIndex:0,pageSize:n}),P?.(n);},onPreviousPageClick:p,onNextPageClick:y,isDisableNextPageButton:E||D||!!d$1&&!f$1.getCanNextPage(),isDisablePreviousPageButton:E||u||!!d$1&&!f$1.getCanPreviousPage(),onPageChange:n=>{f$1.setPageIndex(n-1);}})]})}export{Yt as a};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-C7TLKKPT.js';import {d,b,a,c as c$1}from'./chunk-CQI4KDR4.js';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var C=b,E=a,g=c$1,M=tv({extend:d,slots:{root:"relative cursor-pointer",icon:""},variants:{size:{lg:{root:"size-10 rounded-md",icon:"size-6"},md:{root:"size-8 rounded-md",icon:"size-4.5"},sm:{root:"size-6 rounded-sm",icon:"size-3.5"}},tone:{primary:{},neutral:{},danger:{},success:{}}},defaultVariants:{variant:"primary",size:"md",disabled:false}}),D=forwardRef(({className:m,variant:p,disabled:o,Icon:d,size:e,type:l="button",iconClassName:B,hasAlertBadge:f,loading:t,tone:n,...b},I)=>{let z=t||o,{root:L,icon:y}=M({variant:p,size:e,disabled:o,hasAlertBadge:f,loading:t,tone:n});return jsxs("button",{ref:I,disabled:z,className:L({className:m}),type:l,...b,children:[jsx(d,{className:y({className:B})}),t&&jsx(c,{size:e==="lg"?"md":"sm",tone:n,className:"absolute inset-0 m-auto"})]})});export{C as a,E as b,g as c,D as d};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-4CM257A2.js';import {c}from'./chunk-KWX4XPCO.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx,jsxs}from'react/jsx-runtime';var v=({children:e,className:r,...o})=>jsx("div",{...o,className:a("bg-neutral-80 @container rounded-lg border border-neutral-200",r),children:e}),u=({title:e,buttons:r,...o})=>jsxs("div",{...o,children:[jsxs("div",{className:"flex items-center justify-between gap-2.5 px-3 py-2 empty:hidden",children:[!!e&&jsx("h2",{className:"text-lg font-medium",children:e}),!!r&&r?.length>0&&jsx("div",{className:"ml-auto flex gap-2",children:r?.map((i,p)=>jsx(c,{...i,size:"md"},p))})]}),jsx(a$1,{})]}),P=({children:e,className:r,...o})=>jsx("div",{...o,className:a("px-3 py-4",r),children:e}),y=({children:e,ignorePadding:r=false,innerClassName:o,...i})=>jsxs("div",{...i,children:[jsx(a$1,{}),jsx("div",{className:a(o,!r&&"px-3 py-4"),children:e})]});export{v as a,u as b,P as c,y as d};
1
+ import {a as a$1}from'./chunk-4CM257A2.js';import {d}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx,jsxs}from'react/jsx-runtime';var v=({children:e,className:r,...o})=>jsx("div",{...o,className:a("bg-neutral-80 @container rounded-lg border border-neutral-200",r),children:e}),u=({title:e,buttons:r,...o})=>jsxs("div",{...o,children:[jsxs("div",{className:"flex items-center justify-between gap-2.5 px-3 py-2 empty:hidden",children:[!!e&&jsx("h2",{className:"text-lg font-medium",children:e}),!!r&&r?.length>0&&jsx("div",{className:"ml-auto flex gap-2",children:r?.map((i,p)=>jsx(d,{...i,size:"md"},p))})]}),jsx(a$1,{})]}),P=({children:e,className:r,...o})=>jsx("div",{...o,className:a("px-3 py-4",r),children:e}),y=({children:e,ignorePadding:r=false,innerClassName:o,...i})=>jsxs("div",{...i,children:[jsx(a$1,{}),jsx("div",{className:a(o,!r&&"px-3 py-4"),children:e})]});export{v as a,u as b,P as c,y as d};
@@ -0,0 +1 @@
1
+ import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var o=tv({slots:{container:"flex items-center justify-center",text:"font-medium text-neutral-50"},variants:{type:{square:{container:"rounded-sm"},pill:{container:"rounded-full"}},variant:{primary:{container:"bg-primary-600"},info:{container:"bg-primary-800"},danger:{container:"bg-danger-500"}},size:{sm:{container:"py-0.375 px-1",text:"text-2xs leading-[130%]"},md:{container:"px-1.5 py-0.5",text:"text-xs leading-[134%]"},lg:{container:"px-1.5 py-0.5",text:"text-sm leading-[143%]"}}}}),u=({className:n,type:e,variant:t,size:r,text:i,affix:a})=>{let{container:s,text:p}=o();return jsx("div",{className:s({className:n,type:e,variant:t,size:r}),children:jsxs("span",{className:p({type:e,variant:t,size:r}),children:[a==="prefix"&&"+",i,a==="suffix"&&"+"]})})};export{u as a};
@@ -0,0 +1,2 @@
1
+ import {d}from'./chunk-CFVEWKYU.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="116" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.595 118.918c-28.848 0-52.234-23.533-52.234-52.564s23.386-52.563 52.234-52.563 52.234 23.533 52.234 52.563-23.386 52.564-52.234 52.564"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M106.662 24.929q.031-.368.031-.745c0-4.758-3.838-8.62-8.566-8.62-4.068 0-7.478 2.86-8.35 6.688a6.8 6.8 0 0 0-2.112-.333c-3.783 0-6.854 3.09-6.854 6.897s3.071 6.897 6.854 6.897h18.649c2.96 0 5.364-2.418 5.364-5.398 0-2.861-2.218-5.206-5.016-5.386" clip-rule="evenodd"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M115.385 99.846H10.792a.615.615 0 0 1-.613-.618c0-.34.275-.617.613-.617h104.593c.339 0 .614.276.614.617a.616.616 0 0 1-.614.618m-108.693 0H.614A.616.616 0 0 1 0 99.228c0-.34.275-.617.614-.617h6.078c.338 0 .613.276.613.617a.615.615 0 0 1-.613.618" clip-rule="evenodd"/><path fill="%23f3f6f5" fill-rule="evenodd" d="M12.48 12.2a6 6 0 0 1-.02-.475c0-3.035 2.448-5.499 5.464-5.499 2.595 0 4.77 1.824 5.326 4.266a4.4 4.4 0 0 1 1.347-.212c2.413 0 4.372 1.971 4.372 4.4 0 2.428-1.96 4.399-4.372 4.399H12.702c-1.889 0-3.422-1.543-3.422-3.444a3.436 3.436 0 0 1 3.2-3.435" clip-rule="evenodd"/><path fill="%23f3f6f5" d="m94.572 72.734-6.26 10.92-10.218 2.765-11.414 3.073-7.13 1.918-.045-.061a4.43 4.43 0 0 0 3.81-3.282l11.722-44.01-6.26-10.92-9.7-2.614 18.352-4.948c2.348-.638 4.798.787 5.418 3.152z"/><path fill="%23fff" d="m58.553 30.39 10.223 2.755 6.263 10.919-4.013 15.072-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.631 2.372-3.071 3.787-5.425 3.153l-33.04-8.91c-2.353-.632-3.762-3.09-3.132-5.458l5.89-22.116 1.18-4.437 5.795-21.764c.631-2.367 3.073-3.785 5.426-3.152l18.54 5.001Z"/><path fill="%23cfd9d7" d="m88.31 83.66-2.294-8.612 8.557-2.307-6.264 10.92ZM68.776 33.139l-2.295 8.618 8.558 2.307z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m35.057 60.641 23.056 6.217a.808.808 0 0 0 .415-1.56l-23.056-6.216a.808.808 0 0 0-.415 1.56Zm2.197-8.253 23.056 6.215a.8.8 0 0 0 .982-.57.81.81 0 0 0-.567-.99L37.669 50.83a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Zm5.349 19.13 1.666.45a.808.808 0 0 0 .415-1.56l-1.666-.45a.808.808 0 0 0-.415 1.56m-9.743-2.626 5.855 1.578a.808.808 0 0 0 .415-1.56l-5.855-1.577a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="M57.652 39.047a1 1 0 0 1-.234-.031c-3.279-.886-5.232-4.292-4.354-7.591l1.588-5.963.02-.064c.674-2.32 3.063-3.69 5.375-3.07a4.38 4.38 0 0 1 2.672 2.069 4.42 4.42 0 0 1 .443 3.36l-1.588 5.963a2.65 2.65 0 0 1-1.236 1.62 2.62 2.62 0 0 1-2.014.267 2.64 2.64 0 0 1-1.61-1.244 2.66 2.66 0 0 1-.264-2.024l1.587-5.963a.897.897 0 0 1 1.102-.64c.48.129.765.626.636 1.109l-1.587 5.962a.86.86 0 0 0 .602 1.051.855.855 0 0 0 1.046-.607l1.587-5.962a2.62 2.62 0 0 0-.263-1.987 2.6 2.6 0 0 0-1.58-1.224c-1.362-.366-2.828.498-3.199 1.89l-.014.047-1.565 5.879c-.622 2.335.76 4.745 3.082 5.372a.906.906 0 0 1-.232 1.781"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M93.71 72.62 82.07 28.934c-.506-1.936-2.512-3.1-4.432-2.579l-7.466 2.014a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.463-2.012c2.774-.754 5.67.93 6.402 3.722l11.724 44.007a.8.8 0 0 1-.08.613l-6.26 10.92a.8.8 0 0 1-.487.375L78.302 87.2l-11.415 3.073-7.13 1.918a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.13-1.918 11.413-3.072 9.897-2.68z" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m70.252 58.927-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.517 1.943-2.515 3.102-4.443 2.582l-33.04-8.91c-1.927-.518-3.08-2.53-2.564-4.469a.802.802 0 1 0-1.55-.418c-.744 2.797.92 5.7 3.7 6.446l33.039 8.91c2.78.75 5.662-.922 6.408-3.723l3.257-12.233 1.199-4.501.59-2.217 2.66-9.986a.802.802 0 1 0-1.55-.418M28.389 54.95l1.18-4.437 5.795-21.764c.517-1.938 2.516-3.1 4.444-2.58l10.029 2.705a.807.807 0 0 0 .416-1.56l-10.03-2.705c-2.78-.749-5.663.926-6.408 3.722L28.02 50.095l-1.181 4.438c-.114.43.14.873.567.988a.803.803 0 0 0 .983-.57Z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.595" x2="56.595" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116v100H0z"/></clipPath></defs></svg>';var r='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M57.084 118.918c-29.097 0-52.685-23.533-52.685-52.564s23.588-52.563 52.685-52.563 52.685 23.533 52.685 52.564-23.588 52.563-52.685 52.563"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M107.584 24.93q.031-.369.031-.745c0-4.758-3.871-8.62-8.64-8.62a8.644 8.644 0 0 0-8.421 6.688 7 7 0 0 0-2.13-.334c-3.816 0-6.913 3.09-6.913 6.898s3.097 6.897 6.913 6.897h18.809c2.986 0 5.411-2.419 5.411-5.398 0-2.862-2.237-5.207-5.06-5.387M116.38 99.846H10.886a.618.618 0 1 1 0-1.234H116.38c.342 0 .62.276.62.617a.62.62 0 0 1-.62.617M6.75 99.846H.62A.62.62 0 0 1 0 99.23c0-.34.278-.617.62-.617h6.13a.618.618 0 1 1 0 1.234" clip-rule="evenodd"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M12.587 12.2a6 6 0 0 1-.02-.475c0-3.035 2.47-5.499 5.511-5.499a5.51 5.51 0 0 1 5.373 4.266 4.4 4.4 0 0 1 1.358-.212 4.407 4.407 0 0 1 4.41 4.4c0 2.428-1.976 4.399-4.41 4.399H12.811a3.45 3.45 0 0 1-3.451-3.444 3.45 3.45 0 0 1 3.227-3.435" clip-rule="evenodd"/><path fill="%23fff" d="M50.685 25.551c-14.513 0-26.286 11.745-26.286 26.226s11.773 26.211 26.286 26.211c5.137 0 9.913-1.467 13.953-4.004a26.1 26.1 0 0 0 8.32-8.3c2.527-4.031 4-8.808 4-13.907 0-14.481-11.759-26.226-26.273-26.226m-.003 46.986c-11.471 0-20.808-9.314-20.808-20.762 0-11.447 9.336-20.761 20.808-20.761 11.476 0 20.811 9.314 20.811 20.761 0 11.448-9.335 20.762-20.81 20.762"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M50.682 71.627c-10.97 0-19.897-8.906-19.897-19.852s8.927-19.852 19.897-19.852c10.973 0 19.9 8.907 19.9 19.852a.911.911 0 0 0 1.823 0c0-11.949-9.745-21.671-21.723-21.671-11.975 0-21.72 9.722-21.72 21.67 0 11.95 9.746 21.672 21.72 21.672a.91.91 0 0 0 .912-.91.91.91 0 0 0-.912-.91" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M23.487 51.777c0 14.982 12.181 27.12 27.198 27.12a27.04 27.04 0 0 0 14.438-4.143 27.04 27.04 0 0 0 8.609-8.59 27.04 27.04 0 0 0 4.137-14.387c0-14.984-12.167-27.136-27.184-27.136a.91.91 0 0 0-.912.91c0 .502.408.91.911.91 14.011 0 25.362 11.337 25.362 25.316A25.23 25.23 0 0 1 72.185 65.2a25.2 25.2 0 0 1-8.031 8.012 25.23 25.23 0 0 1-13.47 3.865c-14.009 0-25.373-11.324-25.373-25.301a.911.911 0 0 0-1.824 0" clip-rule="evenodd"/><path fill="%23e1e7e6" d="M68.494 80.954 79.17 91.42c3.144 3.136 8.289 3.136 11.435 0 3.145-3.139 3.145-8.272 0-11.41L79.928 69.544z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m69.789 80.949 10.025 9.826c2.79 2.783 7.354 2.783 10.146 0a7.14 7.14 0 0 0 2.059-5.748.91.91 0 0 1 1.815-.172 8.96 8.96 0 0 1-2.585 7.207c-3.501 3.49-9.226 3.49-12.718.006L67.855 81.603a.906.906 0 0 1-.006-1.291L79.283 68.9a.914.914 0 0 1 1.285-.006l3.4 3.334c.359.352.364.928.01 1.286a.914.914 0 0 1-1.288.012l-2.756-2.701z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="m78.495 70.969-8.574 8.567-5.417-5.418.134-.134a26.1 26.1 0 0 0 8.32-8.3l.12-.12z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M73.204 66.977a27.1 27.1 0 0 1-8.084 7.779.91.91 0 1 1-.966-1.543 25.2 25.2 0 0 0 8.03-8.01 1 1 0 0 1 .13-.163l.12-.12a.913.913 0 0 1 1.288.001l5.416 5.404a.91.91 0 0 1 0 1.286l-8.573 8.568a.913.913 0 0 1-1.289.001.91.91 0 0 1-.001-1.287l7.93-7.924z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="57.084" x2="57.084" y1="115.671" y2="13.791" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h117v100H0z"/></clipPath></defs></svg>';var s='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%2396dcb4" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%234fa271" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23bfe9d1" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%236ecf96" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%234fa271" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" fill-rule="evenodd" d="m55.436 65.185 14.64-17.738a2.472 2.472 0 0 1 3.812 3.147L57.518 70.429a2.474 2.474 0 0 1-3.655.174L42.948 59.687a2.47 2.47 0 1 1 3.495-3.495z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23abe3c2"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%23f18585" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%23d34747" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23f6b4b4" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%23f18585" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%23d34747" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" d="M57.512 45.853a3.5 3.5 0 0 1 1.623.077q1.816.465 2.473 2.203.155.58-.077 2.396l-.889 5.758q-1.081 7.034-1.353 7.266-.27.116-1.855.039-.31 0-.347-.04-.194-.115-.348-.888-.116-.696-1.005-6.377-1.12-7.343-1.044-7.845 0-.077.078-.309.502-1.623 2.357-2.164.194-.078.387-.116m.038 20.25q.657-.154 1.508.078 1.7.425 2.357 2.087.116.193.155.425a3.3 3.3 0 0 1 0 1.739q-.465 1.778-2.165 2.396-.192.078-.347.116a3.3 3.3 0 0 1-1.74 0q-1.777-.464-2.396-2.164a3.318 3.318 0 0 1-.116-2.087q.31-1.16 1.16-1.817.657-.54 1.584-.772"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23f39d9d"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var D=e=>e?.startsWith("es")?{documentsTitle:"Nada por aqu\xED todav\xEDa",documentsDescription:"Agrega un nuevo elemento para comenzar",searchTitle:"No se encontraron resultados",searchDescription:"Ajusta los criterios e int\xE9ntalo nuevamente",doneTitle:"\xA1Est\xE1s al d\xEDa!",doneDescription:"No hay elementos que completar",contentEmptyAlt:"Contenido vac\xEDo"}:e?.startsWith("pt")?{documentsTitle:"Nada aqui ainda",documentsDescription:"Adicione um novo item para come\xE7ar",searchTitle:"N\xE3o foram encontrados resultados",searchDescription:"Ajuste os crit\xE9rios e tente novamente",doneTitle:"Voc\xEA est\xE1 em dia!",doneDescription:"N\xE3o h\xE1 itens para concluir",contentEmptyAlt:"Conte\xFAdo vazio"}:{documentsTitle:"Nothing here yet",documentsDescription:"Add a new item to get started",searchTitle:"No results were found",searchDescription:"Adjust the criteria and try again",doneTitle:"You're all caught up!",doneDescription:"Nothing left to complete",contentEmptyAlt:"Content empty"},H=e=>{switch(e){case "lg":return {width:233.46,height:200};case "md":return {width:175.09,height:150};case "sm":return {width:116,height:100}}},N=tv({slots:{root:"flex h-fit w-fit flex-col items-center p-6 pt-10 text-neutral-600",title:"font-jakarta mt-4.5 text-center font-semibold",description:"mt-0.5 text-center"},variants:{size:{lg:{title:"text-lg leading-[156%]",description:"text-base leading-[150%] font-medium"},md:{title:"text-base leading-[150%]",description:"text-sm leading-[143%]"},sm:{title:"text-sm leading-[143%]",description:"text-sm leading-[143%]"}},variant:{empty:{},"not-found":{},done:{title:"text-success-700",description:"text-success-700"},danger:{title:"text-danger-700",description:"text-danger-700"}}}}),P=(e,t)=>{switch(e.variant){case "danger":return {title:e.title,description:e.description,imgUrl:p};case "not-found":return {title:t.searchTitle,description:e.description??t.searchDescription,imgUrl:r};case "done":return {title:t.doneTitle,description:e.description??t.doneDescription,imgUrl:s};default:return {title:t.documentsTitle,description:e.description??t.documentsDescription,imgUrl:c}}},F=e=>{let{actions:t,areActionsHidden:m=false,size:l="sm",className:h}=e,u=e.variant??"empty",{locale:g}=getDefaultOptions(),{root:v,title:y,description:b}=N({size:l,variant:u}),o=D(g?.code),a=P(e,o),{width:M,height:S}=H(l),d$1=l==="sm"?"sm":"lg";return jsxs("div",{className:v({className:h}),children:[jsx("img",{alt:o.contentEmptyAlt,width:M,height:S,src:a.imgUrl}),jsx("p",{className:y(),children:a.title}),jsx("p",{className:b(),children:a.description}),t&&!m&&jsxs("div",{className:"mt-4.5 flex gap-3",children:[t.secondary&&jsx(d,{variant:"light",tone:"primary",size:d$1,onClick:t.secondary.onClick,children:t.secondary.label}),jsx(d,{variant:"secondary",tone:"primary",size:d$1,onClick:t.primary.onClick,children:t.primary.label})]})]})};
2
+ export{F as a};
@@ -1 +1 @@
1
- import {d}from'./chunk-AVJ4C64A.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$4}from'./chunk-ZZFG3AKL.js';import {a as a$3}from'./chunk-NSF2YRJD.js';import {a,b,c}from'./chunk-3AIWAHS6.js';import {a as a$1}from'./chunk-VOPVBJKL.js';import {a as a$6}from'./chunk-4CM257A2.js';import {c as c$1}from'./chunk-KWX4XPCO.js';import {j}from'./chunk-Z6FU5QVL.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {useListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useRef,useCallback,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function de(){let i=useComboboxContext(),c=useRef(false);return i.value.length&&i.collection.size&&!c.current&&(i.syncSelectedItems(),c.current=true),null}var be=i=>{let{label:c$2,error:v,required:W,tooltip:K,disabled:m,readOnly:u,options:A,onInputChange:N,onSelect:M,defaultSelectedOptions:s,value:d$1,helperText:J,noResultsLabel:Q,noResultsIcon:X,noResultsDescription:Y,noResultsDescriptionLines:Z,noResultsAsColumn:_,noResultsButtonOnClick:R,noResultsButtonLabel:$,optionDescriptionLines:S=1,loading:w,clearable:ee=true,growable:b$1=true,className:te,...oe}=i,L=Object.getOwnPropertyNames(i),{contains:le}=useFilter({sensitivity:"base"}),{collection:C,filter:g,set:ne}=useListCollection({initialItems:[],itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:le}),f=useRef(s??[]),h=useRef(void 0),V=useRef(false),re=useCallback(e=>{let l=e.items,p=f.current,se=l.length===0?null:l.find(I=>!p.some(y=>String(y.value)===String(I.value)))??p.find(I=>!l.some(y=>String(y.value)===String(I.value)))??null;f.current=[...l],M?.(se,l),h.current?.setInputValue(""),g("");},[M,g]),ie=useCallback(e=>{g(e.inputValue),e.reason!==void 0&&N?.(e.inputValue??"");},[g,N]),a$7=useCombobox({collection:C,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:ie,onValueChange:re,defaultValue:s?.map(e=>String(e.value)),value:L.includes("value")?d$1?.map(e=>String(e.value))??[]:void 0,readOnly:u,disabled:m,...oe});h.current=a$7,useEffect(()=>{L.includes("value")&&d$1!==void 0&&(f.current=[...d$1]);},[d$1]),useEffect(()=>{w||s?.length&&(V.current||(h.current?.setValue(s.map(e=>String(e.value))),f.current=[...s],V.current=true));},[s,w]),useEffect(()=>{ne(A);},[A]);let T=a({error:v,disabled:m,readOnly:u,multiline:b$1});return jsxs(Combobox.RootProvider,{value:a$7,"data-error":v||void 0,className:T.root({className:te}),children:[jsx(a$1,{as:Combobox.Label,label:c$2,required:W,tooltip:K}),jsx(de,{}),jsxs(Combobox.Control,{className:a$2(T.control(),"group/control",!b$1&&"overflow-hidden",m&&"cursor-not-allowed"),children:[jsxs("div",{className:a$2("flex flex-1 items-center gap-1 px-3 py-2",b$1?"flex-wrap py-1.5":"overflow-hidden"),children:[a$7.selectedItems.map(e=>jsx(d,{color:"neutral",variant:"fill",size:"md",disabled:u||m,onClose:()=>{a$7.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$2(T.input(),"h-auto px-0 py-0 disabled:cursor-not-allowed"),placeholder:a$7.selectedItems.length===0?i.placeholder:""})]}),jsxs("div",{className:a$2("flex shrink-0 items-center gap-2 pr-3",b$1&&"self-start pt-2.5"),children:[!u&&ee&&jsx(a$3,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:e=>e.stopPropagation()}),v&&jsx(b,{}),jsx(Combobox.Trigger,{className:a$2("group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",u&&"pointer-events-none"),children:jsx(a$4,{})})]})]}),jsx(c,{children:J}),jsx(Portal,{children:jsx(Combobox.Positioner,{className:"z-10000!",children:jsx(Combobox.Content,{className:"elevation-9 bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsx(Combobox.ItemGroup,{children:C.items.length>0?C.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:l,disabled:p})=>jsxs("div",{className:a$2("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",p?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:S?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:S,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$2("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",l?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",p&&(l?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:l&&jsx(j,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$5,{title:Q,description:Y,Icon:X,iconAsColumn:_,descriptionLines:Z}),R&&jsxs(Fragment,{children:[jsx(a$6,{}),jsx(c$1,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{a$7.setOpen(false),R();},children:$})]})]})})})})})]})};be.displayName="AutocompleteMultiple";export{be as a};
1
+ import {d}from'./chunk-AVJ4C64A.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$4}from'./chunk-ZZFG3AKL.js';import {a as a$3}from'./chunk-NSF2YRJD.js';import {a,b,c}from'./chunk-3AIWAHS6.js';import {a as a$1}from'./chunk-VOPVBJKL.js';import {a as a$6}from'./chunk-4CM257A2.js';import {j}from'./chunk-Z6FU5QVL.js';import {d as d$1}from'./chunk-CFVEWKYU.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {useListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useRef,useCallback,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function de(){let i=useComboboxContext(),c=useRef(false);return i.value.length&&i.collection.size&&!c.current&&(i.syncSelectedItems(),c.current=true),null}var be=i=>{let{label:c$1,error:v,required:W,tooltip:K,disabled:m,readOnly:u,options:A,onInputChange:N,onSelect:M,defaultSelectedOptions:s,value:d$2,helperText:J,noResultsLabel:Q,noResultsIcon:X,noResultsDescription:Y,noResultsDescriptionLines:Z,noResultsAsColumn:_,noResultsButtonOnClick:R,noResultsButtonLabel:$,optionDescriptionLines:S=1,loading:w,clearable:ee=true,growable:b$1=true,className:te,...oe}=i,L=Object.getOwnPropertyNames(i),{contains:le}=useFilter({sensitivity:"base"}),{collection:C,filter:g,set:ne}=useListCollection({initialItems:[],itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:le}),f=useRef(s??[]),h=useRef(void 0),V=useRef(false),re=useCallback(e=>{let l=e.items,p=f.current,se=l.length===0?null:l.find(I=>!p.some(y=>String(y.value)===String(I.value)))??p.find(I=>!l.some(y=>String(y.value)===String(I.value)))??null;f.current=[...l],M?.(se,l),h.current?.setInputValue(""),g("");},[M,g]),ie=useCallback(e=>{g(e.inputValue),e.reason!==void 0&&N?.(e.inputValue??"");},[g,N]),a$7=useCombobox({collection:C,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:ie,onValueChange:re,defaultValue:s?.map(e=>String(e.value)),value:L.includes("value")?d$2?.map(e=>String(e.value))??[]:void 0,readOnly:u,disabled:m,...oe});h.current=a$7,useEffect(()=>{L.includes("value")&&d$2!==void 0&&(f.current=[...d$2]);},[d$2]),useEffect(()=>{w||s?.length&&(V.current||(h.current?.setValue(s.map(e=>String(e.value))),f.current=[...s],V.current=true));},[s,w]),useEffect(()=>{ne(A);},[A]);let T=a({error:v,disabled:m,readOnly:u,multiline:b$1});return jsxs(Combobox.RootProvider,{value:a$7,"data-error":v||void 0,className:T.root({className:te}),children:[jsx(a$1,{as:Combobox.Label,label:c$1,required:W,tooltip:K}),jsx(de,{}),jsxs(Combobox.Control,{className:a$2(T.control(),"group/control",!b$1&&"overflow-hidden",m&&"cursor-not-allowed"),children:[jsxs("div",{className:a$2("flex flex-1 items-center gap-1 px-3 py-2",b$1?"flex-wrap py-1.5":"overflow-hidden"),children:[a$7.selectedItems.map(e=>jsx(d,{color:"neutral",variant:"fill",size:"md",disabled:u||m,onClose:()=>{a$7.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$2(T.input(),"h-auto px-0 py-0 disabled:cursor-not-allowed"),placeholder:a$7.selectedItems.length===0?i.placeholder:""})]}),jsxs("div",{className:a$2("flex shrink-0 items-center gap-2 pr-3",b$1&&"self-start pt-2.5"),children:[!u&&ee&&jsx(a$3,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:e=>e.stopPropagation()}),v&&jsx(b,{}),jsx(Combobox.Trigger,{className:a$2("group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",u&&"pointer-events-none"),children:jsx(a$4,{})})]})]}),jsx(c,{children:J}),jsx(Portal,{children:jsx(Combobox.Positioner,{className:"z-10000!",children:jsx(Combobox.Content,{className:"elevation-9 bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsx(Combobox.ItemGroup,{children:C.items.length>0?C.items.map(e=>jsx(Combobox.Item,{item:e,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:l,disabled:p})=>jsxs("div",{className:a$2("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",e.description&&"py-3",p?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100"),children:[jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[jsx(Combobox.ItemText,{className:"text-sm leading-[130%] font-medium",children:e.label}),e.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:S?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:S,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$2("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",l?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",p&&(l?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:l&&jsx(j,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$5,{title:Q,description:Y,Icon:X,iconAsColumn:_,descriptionLines:Z}),R&&jsxs(Fragment,{children:[jsx(a$6,{}),jsx(d$1,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{a$7.setOpen(false),R();},children:$})]})]})})})})})]})};be.displayName="AutocompleteMultiple";export{be as a};
@@ -0,0 +1 @@
1
+ import {a as a$8}from'./chunk-LU2N5UJD.js';import {b as b$3}from'./chunk-JKTBL7WC.js';import {c as c$1,j as j$1}from'./chunk-FRWCCOOJ.js';import {a as a$b,b as b$4,c as c$4}from'./chunk-4RJVZ7FN.js';import {a as a$d}from'./chunk-GFVJRSZI.js';import {a as a$4}from'./chunk-KFAARODU.js';import {b as b$1}from'./chunk-7EQ5IQED.js';import {c as c$5}from'./chunk-JYNJHAGL.js';import {a as a$9}from'./chunk-UIZFLYFP.js';import {a as a$6,b as b$2,c as c$2,d as d$3}from'./chunk-I6O2YZVS.js';import {d as d$6}from'./chunk-MP4CHZ2K.js';import {a as a$3}from'./chunk-R6NIURLZ.js';import {d as d$1}from'./chunk-KRWEO45V.js';import {d as d$2}from'./chunk-AVJ4C64A.js';import {a}from'./chunk-FHABUQAH.js';import {a as a$5}from'./chunk-NSF2YRJD.js';import {b,a as a$7,c as c$3}from'./chunk-3AIWAHS6.js';import {a as a$a}from'./chunk-VOPVBJKL.js';import {a as a$1}from'./chunk-4CM257A2.js';import {c,s,t,h,d as d$4,p,j,g}from'./chunk-Z6FU5QVL.js';import {d}from'./chunk-CFVEWKYU.js';import {c as c$6}from'./chunk-C7TLKKPT.js';import {d as d$5,a as a$c}from'./chunk-CQI4KDR4.js';import {a as a$e}from'./chunk-P6B33GL6.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import*as B from'react';import B__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as to from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useListCollection,useCombobox,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import Yn from'react-phone-number-input/flags';import {getDefaultOptions}from'date-fns';import or from'react-phone-number-input/locale/en.json';import nr from'react-phone-number-input/locale/es.json';import rr from'react-phone-number-input/locale/pt.json';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {AutoFocusPlugin}from'@lexical/react/LexicalAutoFocusPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HeadingNode,$isHeadingNode,$createHeadingNode}from'@lexical/rich-text';import {ListNode,ListItemNode,$isListNode,REMOVE_LIST_COMMAND,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {$generateHtmlFromNodes,$generateNodesFromDOM}from'@lexical/html';import {$getSelection,$isRangeSelection,$isElementNode,SELECTION_CHANGE_COMMAND,CAN_UNDO_COMMAND,CAN_REDO_COMMAND,UNDO_COMMAND,REDO_COMMAND,OUTDENT_CONTENT_COMMAND,INDENT_CONTENT_COMMAND,FORMAT_ELEMENT_COMMAND,$createParagraphNode,FORMAT_TEXT_COMMAND,$getRoot,$insertNodes}from'lexical';import {$setBlocksType}from'@lexical/selection';import {$findMatchingParent,mergeRegister}from'@lexical/utils';import {AlignJustifyIcon,AlignRightIcon,AlignCenterIcon,AlignLeftIcon,UnderlineIcon,ItalicIcon,BoldIcon,UndoIcon,RedoIcon,ListIcon,ListOrderedIcon,IndentDecreaseIcon,IndentIncreaseIcon}from'lucide-react';import {Collapsible}from'@ark-ui/react/collapsible';import {MenuRoot,MenuTrigger,MenuPositioner,MenuContent,MenuItem}from'@ark-ui/react/menu';import {Portal}from'@ark-ui/react/portal';import {tv,cn}from'tailwind-variants';import El,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import bl from'libphonenumber-js/mobile/examples';var mn=B__default.memo(({handleSelect:e,NoResultsIcon:o,noResultsLabel:t,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:i,noResultsButtonOnClick:l,optionDescriptionLines:s,noResultsButtonLabel:a$3,filteredOptions:m,inputRect:c,inputRef:g,popoverPosition:b,optionsListRef:f,selectedOption:C,options:L,setFilteredOptions:x})=>jsx(to.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c?{width:`${c.width}px`,left:c.left,top:b==="bottom"?`${c.bottom}px`:void 0,bottom:b==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[m.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:n,Icon:o,iconAsColumn:i,descriptionLines:r}),l&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(d,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{f.current.style.display="none",g.current.value="",x(L),l();},children:a$3})]})]}),m.map(I=>jsx(he,{title:I.label,disabled:I.disabled,description:I.description,descriptionLines:s,onClick:()=>e(I),className:a$2(C?.value===I.value&&"bg-primary-200")},I.key??I.value))]})})),oo=mn;var fn=336,Yl=({options:e,defaultSelectedOption:o,onSelect:t,onClick:n,onInputChange:r,error:i,helperText:l,label:s,placeholder:a,value:m,size:c="md",optionDescriptionLines:g=1,noResultsLabel:b,noResultsIcon:f,noResultsDescription:C,noResultsDescriptionLines:L,noResultsAsColumn:x,noResultsButtonOnClick:I,noResultsButtonLabel:E,className:v,disabled:N})=>{let[h,P]=useState(o??null),M=useRef(null),y=useRef(null),[A,k]=useState(),[V,F]=useState([]),[p,u]=useState("bottom"),[R,_]=useState(),S=fn,j=useCallback(w=>{M.current.style.display="none",y.current.value=w.label,P(w),t?.(w);},[t]),z=useCallback(()=>{if(!y?.current)return;let w=y.current.getBoundingClientRect();k(w);let X=R?R.height:S,Y=window.innerHeight-w.bottom>X,we=w.top>X;u(Y?"bottom":we?"top":"bottom");},[R?.height]),le=useCallback(()=>{let w=e.filter(X=>X.label.toLowerCase().includes(y?.current?.value.toLowerCase()??""));if(F(w),M?.current){let X=M.current.getBoundingClientRect();_(X);}},[e]);return useEffect(()=>{F(e);},[e]),useEffect(()=>{if(!m){P(null),y.current&&(y.current.value="");return}(!y.current?.value||h?.value!==m.value)&&(P(m),y.current.value=m.label);},[m]),a$d(M,()=>{M.current.style.display="none",h&&y.current&&(y.current.value=h.label);}),useEffect(()=>{if(y?.current)return z(),y.current.addEventListener("mousedown",z),y.current.addEventListener("input",le),window.addEventListener("scroll",z,true),window.addEventListener("resize",z),()=>{y.current?.removeEventListener("mousedown",z),y.current?.removeEventListener("input",le),window.removeEventListener("scroll",z,true),window.removeEventListener("resize",z);}},[z,le]),jsxs("div",{className:a$2("relative",v),children:[jsx(a$4,{ref:y,autoComplete:"off",list:"",selectMode:true,onChange:w=>{w.target.value||(P(null),t?.(null)),r?.(w);},onClean:()=>{P(null),F(e),t?.(null);},onClick:w=>{M.current.style.display="flex",n?.(w);},onBlur:()=>{h&&y.current&&(y.current.value=h.label);},label:s,helperText:l,placeholder:a,size:c,error:i,disabled:N}),jsx(oo,{handleSelect:j,noResultsLabel:b,NoResultsIcon:f,optionDescriptionLines:g,noResultsAsColumn:x,noResultsButtonLabel:E,noResultsButtonOnClick:I,noResultsDescription:C,noResultsDescriptionLines:L,filteredOptions:V,inputRect:A,inputRef:y,popoverPosition:p,optionsListRef:M,selectedOption:h,options:e,setFilteredOptions:F})]})};var gn=({children:e,title:o,titleLines:t,description:n="",descriptionLines:r,disabled:i=false,className:l,...s})=>jsxs("div",{className:a$2("flex w-full flex-col gap-1",l),...s,children:[jsx("p",{className:a$2("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:o}),n&&jsx("p",{className:a$2("text-xs leading-[130%]",i?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=gn;var he=({children:e,title:o,titleLines:t,description:n="",descriptionLines:r,startIcon:i,endIcon:l,hasDivider:s=false,disabled:a=false,isSelected:m=false,className:c,...g})=>jsxs(ee,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:m,...g,children:[i&&B__default.cloneElement(i,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:a}),l&&B__default.cloneElement(l,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});var ao=({children:e,title:o,titleLines:t=1,description:n="",descriptionLines:r,startIcon:i,hasDivider:l=false,disabled:s=false,checked:a,onCheckedChange:m,className:c,...g})=>jsxs(ee,{hasDescription:!!n,disabled:s,hasDivider:l,...g,className:a$2("pr-6",c),children:[i&&B__default.cloneElement(i,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:s}),jsx(b$1,{checked:a,onCheckedChange:m,className:"ml-4 self-center",disabled:s})]});var ne=336,po=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:ne,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),te=()=>{let e=useContext(po);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},uo=({children:e})=>{let o=useRef(null),t=useRef(null),n=useId(),[r,i]=useState(),[l,s]=useState(true),[a,m]=useState([]),[c,g]=useState(-1),[b,f]=useState("bottom"),[C,L]=useState(),[x,I]=useState(ne);return jsx(po.Provider,{value:{optionsListRef:o,inputRef:t,autocompleteId:n,inputRect:r,showChips:l,filteredOptions:a,currentFocus:c,popoverPosition:b,setFilteredOptions:m,setCurrentFocus:g,setShowChips:s,setPopoverPosition:f,setInputRect:i,optionsListHeight:x,optionsListRect:C,setOptionsListRect:L,setOptionsListHeight:I},children:e})};var Mn=({option:e,onMountWidth:o})=>{let t=useRef(null);return useEffect(()=>{t.current&&o?.(t.current.clientWidth);},[]),jsx(d$2,{variant:"fill",color:"neutral",ref:t,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},mo=Mn;var kn=150,Fn=B__default.memo(({selectedOptions:e,error:o,onCleanSelectedOptions:t,disabled:n,size:r})=>{let{autocompleteId:i,inputRect:l,inputRef:s,optionsListRef:a}=te(),m=B__default.useRef(null),[c$1,g]=B__default.useState(new Map),b=useMemo(()=>{if(!l?.width)return [];let C=0,L=l.width-kn,x=0;for(let I=0;I<e.length&&(x+=c$1.get(I)??0,!(x>L));I++)C++;return e.slice(0,C)},[l?.width,e,c$1]),f=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:f,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pr-12 pl-3",n&&"cursor-not-allowed"),style:{maxWidth:l?.width?l?.width:void 0,height:l?.height?l?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:m,children:b.map((C,L)=>jsx(mo,{option:C,onMountWidth:x=>g(I=>new Map(I).set(L,x))},`chip-input-${i}-${C.value}`))}),e.length>b.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!o&&jsx(a$3,{content:String(e.length),size:r}),o&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:C=>{C.stopPropagation(),t();}})]})}),fo=Fn;var Hn=B__default.memo(({option:e,index:o,onPressOption:t,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:i,inputRef:l}=te();return jsx(ao,{title:e.label,checked:n,disabled:e.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:s=>{e.disabled||(l?.current?.value&&s.preventDefault(),t?.(e,s));},description:e.description,descriptionLines:r})}),ut=Hn;var Vn=B__default.memo(({selectedOptions:e,handleSelect:o,NoResultsIcon:t,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:i,noResultsAsColumn:l,noResultsButtonOnClick:s,optionDescriptionLines:a$2,noResultsButtonLabel:m})=>{let{popoverPosition:c,optionsListRef:g,filteredOptions:b,inputRect:f,autocompleteId:C,inputRef:L,optionsListHeight:x}=te(),I=useCallback(v=>e.some(N=>N.value===v.value),[e]),E=useMemo(()=>e.filter(v=>v.label.toLowerCase().includes(L?.current?.value.toLowerCase()??"")),[e,L?.current?.value]);return jsx(to.Root,{asChild:true,children:jsxs("div",{ref:g,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:f?{width:`${f.width}px`,left:f.left,top:c==="bottom"?`${f.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-f.top}px`:void 0,maxHeight:x+"px"}:void 0,children:[b.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:n,description:r,Icon:t,iconAsColumn:l,descriptionLines:i}),s&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(d,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",L.current.value="",s();},children:m})]})]}),E.map((v,N)=>jsx(ut,{option:v,index:N,onPressOption:h=>o(h),isSelected:I(v),optionDescriptionLines:a$2},`autocomplete-option-${C}-${v.key??v.value}`)),b.map((v,N)=>!e.some(h=>h.value===v.value)&&jsx(ut,{option:v,index:N,onPressOption:h=>o(h),isSelected:I(v),optionDescriptionLines:a$2},`autocomplete-option-${C}-${v.key??v.value}`))]})})}),go=Vn;var qn=B__default.memo(({selectedOptions:e,onSelect:o,error:t,helperText:n,label:r,placeholder:i,options:l,onInputChange:s,size:a,disabled:m})=>{let{setCurrentFocus:c,setFilteredOptions:g,optionsListRef:b,inputRef:f}=te();return jsx(a$4,{ref:f,autoComplete:"off",list:"",disabled:m,selectMode:true,onChange:C=>{c(-1),s?.(C.target.value);},onClean:()=>{c(-1),g(l),o?.(null,e);},onClick:()=>{m||(b.current.style.display="flex");},error:t,helperText:n,label:r,placeholder:i,fixedTopLabel:e.length>0,size:a})}),ho=qn;var Co=({options:e,defaultSelectedOptions:o,onSelect:t,error:n,helperText:r,label:i,placeholder:l,noResultsLabel:s,noResultsIcon:a,noResultsDescription:m,noResultsDescriptionLines:c,noResultsAsColumn:g,noResultsButtonOnClick:b,noResultsButtonLabel:f,className:C,onInputChange:L,value:x,loading:I,size:E="md",optionDescriptionLines:v=1,disabled:N})=>{let{inputRef:h,optionsListRef:P,setFilteredOptions:M,setShowChips:y,setInputRect:A,setPopoverPosition:k,setCurrentFocus:V,showChips:F,setOptionsListRect:p,optionsListRect:u,setOptionsListHeight:R}=te(),_=useRef(false),[S,j]=useState(o??[]),z=useCallback(G=>{j(Z=>{let se,Re=Z.findIndex(pn=>pn.value===G.value);return Re===-1?(se=Z.concat(G),t?.(G,se),se):(se=Z.toSpliced(Re,1),t?.(G,se),se)});},[t]),le=useCallback(()=>{j([]),M(e),t?.(null,[]);},[]),w=useCallback(()=>{y(false);},[]),X=useCallback(()=>{y(true);},[]),Y=useCallback(()=>{if(!h?.current)return;let G=h.current.getBoundingClientRect();A(G);let Z=u?u.height>ne?ne:u.height:ne,se=window.innerHeight-G.bottom>Z,Re=G.top>Z;k(se?"bottom":Re?"top":"bottom"),R(Re?ne:window.innerHeight-G.bottom>ne?ne:window.innerHeight-G.bottom);},[u?.height]),we=useCallback(()=>{let G=e.filter(Z=>Z.label.toLowerCase().includes(h?.current?.value.toLowerCase()??""));if(M(G),P?.current){let Z=P.current.getBoundingClientRect();p(Z);}},[e,P?.current]);return useEffect(()=>{M(e);},[e]),a$d(P,()=>{P.current.style.display="none",V(-1);}),useEffect(()=>{if(h?.current)return Y(),h.current.addEventListener("mousedown",Y),h.current.addEventListener("input",we),h.current.addEventListener("focusin",w),h.current.addEventListener("focusout",X),window.addEventListener("scroll",Y,true),window.addEventListener("resize",Y),()=>{h.current?.removeEventListener("mousedown",Y),h.current?.removeEventListener("input",Y),h.current?.removeEventListener("focusout",X),h.current?.removeEventListener("focusin",w),window.removeEventListener("scroll",Y,true),window.removeEventListener("resize",Y);}},[Y,X,w,we]),useEffect(()=>{x&&(j(x),y(true));},[x]),useEffect(()=>{I||o&&o.length&&!_.current&&(j(o),_.current=true,y(true));},[o,I]),jsxs("div",{className:a$2("relative",C),children:[jsx(ho,{selectedOptions:S,onSelect:t,error:n,helperText:r,label:i,placeholder:l,handleSelect:z,options:e,onInputChange:L,size:E,disabled:N}),F&&jsx(fo,{selectedOptions:S,disabled:N,error:n,onCleanSelectedOptions:le,size:E}),jsx(go,{handleSelect:z,selectedOptions:S,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:v,noResultsAsColumn:g,noResultsButtonLabel:f,noResultsButtonOnClick:b,noResultsDescription:m,noResultsDescriptionLines:c})]})};var xa=e=>jsx(uo,{children:jsx(Co,{...e})});var Je=({children:e,className:o,disabled:t,error:n,helperText:r,htmlFor:i,label:l,readOnly:s,required:a,tooltip:m})=>{let{root:c}=a$7({error:n,disabled:t,readOnly:s});return jsxs("div",{className:c({className:o}),"data-error":n||void 0,"data-disabled":t||void 0,"data-readonly":s||void 0,children:[l&&jsx(a$a,{as:"label",htmlFor:i,label:l,required:a,tooltip:m}),e,jsx(c$3,{children:r})]})};var ft=({className:e,country:o,countryName:t})=>{let n=Yn[o];return jsx("span",{className:a$2("flex size-4.5 shrink-0 items-center justify-center overflow-hidden rounded-full border border-white [&_svg:not([class*='size-'])]:h-full [&_svg:not([class*='size-'])]:w-auto [&_svg:not([class*='size-'])]:max-w-none [&_svg:not([class*='size-'])]:shrink-0",e),children:n&&jsx(n,{title:t})})};var er=({code:e,codeClassName:o,label:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(ft,{country:e,countryName:t}),jsx("span",{className:a$2("text-sm leading-[143%] font-medium text-neutral-800",o),children:e})]}),Lo=({className:e,disabled:o,error:t,onChange:n,onOpenChange:r,options:i,readOnly:l,translations:s,value:a})=>{let m=B.useRef(null),[c,g]=B.useState(""),[b,f]=B.useState(false),{wrapper:C,input:L,clearIcon:x,searchIcon:I}=b$3({size:"md"}),{contains:E}=useFilter({sensitivity:"base"}),v=B.useMemo(()=>i.map(p=>({...p,key:p.code})),[i]),N=B.useMemo(()=>v.find(p=>p.key===a),[v,a]),{collection:h,filter:P,set:M}=useListCollection({initialItems:v,itemToString:p=>`${p.label} ${p.code}`,itemToValue:p=>p.key,filter:(p,u,R)=>E(p,u)||E(R.code,u.toUpperCase())});B.useEffect(()=>{M(v);},[v,M]);let y=B.useCallback(p=>{f(p),r?.(p);},[r]),A=B.useCallback(({inputValue:p})=>{let u=p??"";g(u),P(u),m.current?.scrollTo({top:0});},[P]),k=B.useCallback(p=>{y(p),p&&(g(""),P(""));},[P,y]),V=B.useCallback(({itemValue:p})=>{if(!p)return;let u=v.find(R=>R.key===p)?.code;u&&(n(u),y(false));},[v,y,n]),F=useCombobox({collection:h,inputBehavior:"autohighlight",inputValue:c,open:b,openOnChange:false,openOnClick:false,selectionBehavior:"preserve",value:N?[N.key]:[],onInputValueChange:A,onOpenChange:({open:p})=>{p||y(false);},onSelect:V});return jsx(Combobox.RootProvider,{value:F,children:jsxs(a$b,{open:b,onOpenChange:k,children:[jsx(b$4,{asChild:true,children:jsx("button",{type:"button",className:a$2("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",t?"bg-danger-20 after:bg-input-ring-error after:w-0.5":o||l?"after:bg-input-ring-disabled bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring bg-neutral-200 group-focus-within/id-field:after:w-0.5",!t&&b&&"after:bg-input-ring-focus after:w-0.5",e),disabled:o||l,children:N&&jsx(er,{code:N.code,label:N.label,codeClassName:a$2(t?"text-danger-600":void 0,o&&"text-input-text-disabled",l&&"text-input-text-disabled")})})}),jsx(c$4,{portalled:false,className:"w-75 p-0",children:jsxs(Combobox.Content,{children:[jsxs(Combobox.Control,{className:"pb-0",children:[jsxs("div",{className:C({className:"m-1 mb-0"}),children:[jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:s.searchCountryPlaceholder,className:L()}),!o&&c.length>0&&jsx("button",{type:"button",className:x(),onClick:()=>{F.setInputValue("","clear-trigger");},children:jsx(d$4,{className:"size-4.5"})}),jsx(p,{className:I()})]}),jsx(a$1,{className:"mt-2"})]}),jsx(Combobox.List,{ref:m,className:"h-72 overflow-auto outline-none",children:h.items.length===0?jsxs("div",{className:"flex h-full flex-1 flex-col items-center justify-center text-center text-sm",children:[jsx("p",{className:"text-neutral-700",children:s.noCountryFound}),jsx("p",{className:"text-neutral-600",children:s.noCountryFoundSubtitle})]}):jsx(Combobox.ItemGroup,{children:h.items.map(p=>jsxs(Combobox.Item,{item:p,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx(ft,{country:p.code,countryName:p.label}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:p.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:p.code}),jsx(j,{className:a$2("ml-auto size-4 shrink-0",p.key===a?"opacity-100":"opacity-0")})]},p.key))})})]})})]})})};var gt=B.forwardRef(({className:e,clearLabel:o,disabled:t,error:n,onChange:r,readOnly:i,type:l="text",value:s,...a},m)=>{let c=B.useRef(null),g=`${s??""}`.length>0,b$1=!t&&!i&&g,f=b$1||n;B.useImperativeHandle(m,()=>c.current,[]);let C=B.useCallback(x=>{r?.(x.target.value);},[r]),L=B.useCallback(()=>{r?.(""),c.current?.focus();},[r]);return jsxs("div",{className:a$2("bg-input-bg relative flex h-full min-w-0 flex-1 rounded-r",t&&"bg-input-bg-disabled"),children:[jsx("input",{type:l,"data-slot":"input",className:a$2("text-input-text placeholder:text-input-placeholder h-full min-w-0 flex-1 rounded-r bg-transparent px-3 text-sm leading-[143%] focus-visible:outline-0",f&&!n&&"pr-10.5",b$1&&n&&"pr-14",n&&!b$1&&"pr-10.5",t&&"text-input-text-disabled",e),...a,disabled:t,readOnly:i,value:s,onChange:C,ref:c}),(b$1||n)&&jsxs("div",{className:"absolute inset-y-0 right-3 z-10 flex items-center gap-1",children:[b$1&&jsx(a$5,{ariaLabel:o,onClick:L}),n&&jsx(b,{})]})]})});gt.displayName="IdInput";var ht={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Ro={en:or,es:nr,pt:rr},ir=ht.en,lr=Ro.en,sr={es:{clearIdLabel:ht.es,noCountryFound:"No se encontraron resultados.",noCountryFoundSubtitle:"Ajusta los criterios e int\xE9ntalo nuevamente.",searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:ht.pt,noCountryFound:"N\xE3o foram encontrados resultados.",noCountryFoundSubtitle:"Ajuste os crit\xE9rios e tente novamente.",searchCountryPlaceholder:"Pesquisar..."}},ar={clearIdLabel:ir,noCountryFound:"No results were found.",noCountryFoundSubtitle:"Adjust the criteria and try again.",searchCountryPlaceholder:"Search..."},To=()=>getDefaultOptions().locale?.code,Po=e=>sr[e]??ar,cr=(e,o)=>(Ro[o]??lr)[e]??e,No=({localeCode:e})=>c$1.map(o=>({code:o,label:cr(o,e)})).sort((o,t)=>o.label.localeCompare(t.label)),Mo=a$6,Eo=b$2,Ao=(e,o)=>{let t=o.trim();return !t||!c$2(e,t).isValid?t:d$3(e,t)};var Oo=()=>{},ko=B.forwardRef(({autoComplete:e,className:o,country:t,disabled:n,error:r,helperText:i,id:l,label:s,name:a,onBlur:m,onChange:c=Oo,onCountryChange:g=Oo,placeholder:b,readOnly:f,required:C,tooltip:L,value:x},I)=>{let[E,v]=B.useState(false),[N,h]=B.useState(x??""),P=B.useId(),M=l??P,y=To(),A=B.useRef(x??"");B.useEffect(()=>{(x??"")!==A.current&&h(x??"");},[x]);let k=B.useMemo(()=>Po(y),[y]),V=B.useMemo(()=>No({localeCode:y}),[y]),F=B.useMemo(()=>Eo(t??"")||b||Mo,[t,b]),p=a$7({error:r,disabled:n,readOnly:f}),u=B.useCallback((S,j)=>{let z=Ao(S,j);A.current=z,c(z);},[c]),R=B.useCallback(S=>{h(S),u(t??"",S);},[t,u]),_=B.useCallback(S=>{g(S),u(S,N);},[N,g,u]);return jsx(Je,{disabled:n,error:r,helperText:i,htmlFor:M,label:s,readOnly:f,required:C,tooltip:L,children:jsxs("div",{className:a$2(p.control(),"group/id-field",!r&&!n&&!f&&E&&"after:ring-input-ring-focus after:ring-2",o),children:[jsx(Lo,{disabled:n,error:r,onChange:_,onOpenChange:v,options:V,readOnly:f,translations:k,value:t}),jsx(gt,{autoComplete:e,clearLabel:k.clearIdLabel,disabled:n,error:r,id:M,name:a,onBlur:m,onChange:R,placeholder:F,readOnly:f,required:C,value:N,ref:I})]})})});ko.displayName="IdField";var bc=({children:e,title:o,titleLines:t=1,description:n,descriptionLines:r=1,StartIcon:i,hasDivider:l=false,disabled:s=false,actionButton:a,isSelected:m=false,className:c,...g})=>jsxs(ee,{hasDescription:!!n,disabled:s,hasDivider:l,isSelected:m,...g,className:c,children:[i&&jsx(i,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(d$1,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(d,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Pc=({title:e,description:o="",descriptionLines:t,hasDivider:n=false,disabled:r=false,checked:i,onCheckedChange:l,className:s,chipStatus:a,chipExpandable:m,...c})=>jsxs(ee,{hasDescription:!!o,disabled:r,hasDivider:n,...c,className:a$2("pr-6",s),children:[jsx(b$1,{checked:i,onCheckedChange:l,className:"mr-4 self-center",disabled:r}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!o&&"font-medium"),children:e}),m&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$5,{...m})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$6,{...a,size:"xs",className:"shrink-0"})})]}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:o})]})]});var yt={paragraph:"m-0",ltr:"text-left",rtl:"text-right",heading:{h1:"mb-2 text-2xl leading-[130%] font-semibold text-neutral-900",h2:"mb-2 text-xl leading-[130%] font-semibold text-neutral-900",h3:"mb-2 text-lg leading-[130%] font-semibold text-neutral-900",h4:"mb-2 text-base leading-[130%] font-semibold text-neutral-900",h5:"mb-2 text-sm leading-[130%] font-semibold text-neutral-900",h6:"mb-2 text-xs leading-[130%] font-semibold text-neutral-900"},list:{ul:"my-2 list-disc pl-5",ol:"my-2 list-decimal pl-5",listitem:"my-1",nested:{listitem:"my-1"}},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"rounded bg-neutral-100 px-1 py-0.5 font-mono text-xs"},code:"rounded bg-neutral-100 p-2 font-mono text-xs",quote:"border-l-2 border-neutral-300 pl-3 italic text-neutral-700",link:"text-primary-700 underline hover:text-primary-800"},vt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var Lt=({readOnly:e})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.setEditable(!e);},[o,e]),null};var It=({editorRef:e})=>{let[o]=useLexicalComposerContext();return useEffect(()=>(e.current=o,()=>{e.current===o&&(e.current=null);}),[o,e]),null};var hr={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Cr={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},xr=()=>typeof window<"u"&&typeof window.DOMParser<"u",Fo=e=>xr()?new DOMParser().parseFromString(e,"text/html"):null,yr=e=>(e??"").replace(/\s+/g," ").trim(),Tt=e=>{let o=0;for(let t of Array.from(e.classList)){let n=t.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(o=Math.max(o,r)),e.classList.remove(t);}return o},vr=e=>{let o=e.querySelectorAll("[class*='ql-align-']");for(let t of Array.from(o))for(let n of Array.from(t.classList)){let r=hr[n];r&&(r!=="left"&&(t.style.textAlign=r),t.classList.remove(n));}},Lr=e=>{let o=e.querySelectorAll("[class*='ql-indent-']");for(let t of Array.from(o)){if(t.tagName==="LI")continue;let n=Tt(t);n>0&&(t.style.paddingInlineStart=`${n*3}em`);}},Ir=(e,o)=>{let t=e.getAttribute("data-list");return t==="bullet"?"ul":t==="ordered"?"ol":o},Rr=e=>{let o=e.cloneNode(true);return o.removeAttribute("data-list"),o.removeAttribute("data-checked"),o.removeAttribute("data-indent"),Tt(o),o},Rt=(e,o)=>e.createElement(o),Tr=(e,o)=>{let t=Array.from(e.children).filter(a=>a.tagName==="LI");if(t.length===0||!t.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(m=>/^ql-indent-\d+$/.test(m))))return;let r=[],i=[],l=e.tagName==="UL"?"ul":"ol";for(let a of t){let m=Tt(a),c=Ir(a,l),g=Rr(a);for(;i.length>0&&i[i.length-1].level>m;)i.pop();if(i.length===0){let f=Rt(o,c);r.push(f),i.push({level:0,kind:c,listElement:f});}let b=i[i.length-1];for(;b.level<m;){let f=b.listElement.lastElementChild;if(!f||f.tagName!=="LI")break;let C=Rt(o,c);f.appendChild(C),b={level:b.level+1,kind:c,listElement:C},i.push(b);}if(b=i[i.length-1],b.kind!==c){let f=Rt(o,c);if(i.length===1)r.push(f),i[0]={level:0,kind:c,listElement:f};else {let L=i[i.length-2].listElement.lastElementChild;L&&L.tagName==="LI"?(L.appendChild(f),i[i.length-1]={level:b.level,kind:c,listElement:f}):(r.push(f),i.length=1,i[0]={level:0,kind:c,listElement:f});}b=i[i.length-1];}b.listElement.appendChild(g);}if(r.length===0)return;let s=o.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Pr=(e,o)=>{let t=Array.from(e.querySelectorAll("ol, ul"));for(let n of t)Tr(n,o);},So=(e,o)=>{let t=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",t);for(let l of Array.from(r.classList))/^ql-indent-\d+$/.test(l)&&r.classList.remove(l);o>0&&r.classList.add(`ql-indent-${o}`);let i=Array.from(r.children).filter(l=>l.tagName==="UL"||l.tagName==="OL");for(let l of i)So(l,o+1);}},Nr=e=>{let o=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let t of Array.from(o)){let n=t;for(let l of Array.from(n.classList))l.startsWith("ql-align-")&&n.classList.remove(l);let r=n.style.textAlign.trim().toLowerCase(),i=Cr[r];i&&n.classList.add(i);}},ye=e=>yr(e).replace(/>\s+</g,"><").replace(/&nbsp;/g," "),Pt=e=>{let o=e??"";if(!o.trim())return "";let t=Fo(o);if(!t)return o;let{body:n}=t;return vr(n),Lr(n),Pr(n,t),n.innerHTML},Nt=e=>{if(!e.trim())return "";let o=Fo(e);if(!o)return e;let{body:t}=o,n=Array.from(t.querySelectorAll("ul, ol"));for(let r of n)So(r,0);return Nr(t),t.innerHTML};var et=e=>{let o="";return e.getEditorState().read(()=>{o=$generateHtmlFromNodes(e,null);}),Nt(o)},wr=(e,o)=>{let t=Pt(o);e.update(()=>{let n=$getRoot();if(n.clear(),!t.trim()){n.append($createParagraphNode());return}let i=new DOMParser().parseFromString(t,"text/html"),l=$generateNodesFromDOM(e,i);if(l.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(l);});},Mt=({value:e,isSyncingRef:o})=>{let[t]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ye(r)===ye(n.current))return;let i=et(t);ye(i)!==ye(r)&&(o.current=true,wr(t,r),queueMicrotask(()=>{o.current=false;})),n.current=r;},[t,o,e]),null};var Ho=["left","center","right","justify"];var Do=["bold","italic","underline","strikethrough","code"];var hi={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Ci={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},xi={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Oe={bold:jsx(BoldIcon,{className:"size-4"}),italic:jsx(ItalicIcon,{className:"size-4"}),underline:jsx(UnderlineIcon,{className:"size-4"}),strikethrough:jsx("span",{className:"text-xs font-semibold",children:"S"}),code:jsx("span",{className:"font-mono text-xs",children:"</>"})},ke={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},yi=e=>{let o=e.textFormat;return o===false?[]:Array.isArray(o)?Do.filter(t=>o.includes(t)):["bold","italic","underline"]},vi=e=>{let o=e.alignment;return o===false?[]:Array.isArray(o)?Ho.filter(t=>o.includes(t)):["left","center","right","justify"]},Li=e=>{if(e.headings===false)return [];let o=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...o.map(t=>({value:t,label:t.toUpperCase()}))]},Fe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),K=({label:e,onClick:o,icon:t,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:o,className:a$2("inline-flex size-8 items-center justify-center rounded-md border border-transparent text-neutral-700 transition-colors","focus-visible:ring-primary-800 hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-40",n&&"border-neutral-300 bg-neutral-200 text-neutral-900"),children:t}),Ot=({config:e,className:o})=>{let[t]=useLexicalComposerContext(),n=useId(),[r,i]=useState(false),[l,s]=useState(false),[a,m]=useState(false),[c,g]=useState(false),[b,f]=useState(false),[C,L]=useState(false),[x,I]=useState(false),[E,v]=useState("paragraph"),[N,h]=useState("left"),P=useMemo(()=>yi(e),[e]),M=useMemo(()=>vi(e),[e]),y=useMemo(()=>Li(e),[e]),A=useCallback(()=>{let p=$getSelection();if(!$isRangeSelection(p))return;m(p.hasFormat("bold")),g(p.hasFormat("italic")),f(p.hasFormat("underline")),L(p.hasFormat("strikethrough")),I(p.hasFormat("code"));let u=p.anchor.getNode(),R=u.getKey()==="root"?u:u.getTopLevelElementOrThrow();if($isListNode(R))v(R.getListType()==="number"?"ol":"ul");else {let S=$findMatchingParent(R,j=>$isListNode(j));$isListNode(S)?v(S.getListType()==="number"?"ol":"ul"):v($isHeadingNode(R)?R.getTag():R.getType());}let _=$isElementNode(R)?R.getFormatType():"";h(_==="center"||_==="right"||_==="justify"?_:"left");},[]);useEffect(()=>mergeRegister(t.registerUpdateListener(({editorState:p})=>{p.read(()=>{A();});}),t.registerCommand(SELECTION_CHANGE_COMMAND,()=>(A(),false),1),t.registerCommand(CAN_UNDO_COMMAND,p=>(i(p),false),1),t.registerCommand(CAN_REDO_COMMAND,p=>(s(p),false),1)),[t,A]);let k=p=>{t.dispatchCommand(FORMAT_TEXT_COMMAND,hi[p]);},V=p=>{t.update(()=>{let u=$getSelection();if($isRangeSelection(u)){if(p==="paragraph"){$setBlocksType(u,()=>$createParagraphNode());return}$setBlocksType(u,()=>$createHeadingNode(p));}});},F=p=>{if(E===(p==="bullet"?"ul":"ol")){t.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}t.dispatchCommand(p==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$2("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",o),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(K,{label:"Undo",onClick:()=>t.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(K,{label:"Redo",onClick:()=>t.dispatchCommand(REDO_COMMAND,void 0),disabled:!l,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Fe,{})]}),y.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:E.startsWith("h")?E:"paragraph",onChange:p=>V(p.target.value),className:a$2("h-8 rounded-md border border-neutral-300 bg-white px-2 text-xs font-medium text-neutral-800","focus-visible:ring-primary-800 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none"),children:y.map(p=>jsx("option",{value:p.value,children:p.label},p.value))}),jsx(Fe,{})]}),P.length>0&&jsxs(Fragment,{children:[P.includes("bold")&&jsx(K,{label:ke.bold,onClick:()=>k("bold"),icon:Oe.bold,active:a}),P.includes("italic")&&jsx(K,{label:ke.italic,onClick:()=>k("italic"),icon:Oe.italic,active:c}),P.includes("underline")&&jsx(K,{label:ke.underline,onClick:()=>k("underline"),icon:Oe.underline,active:b}),P.includes("strikethrough")&&jsx(K,{label:ke.strikethrough,onClick:()=>k("strikethrough"),icon:Oe.strikethrough,active:C}),P.includes("code")&&jsx(K,{label:ke.code,onClick:()=>k("code"),icon:Oe.code,active:x}),jsx(Fe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(K,{label:"Bulleted list",onClick:()=>F("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:E==="ul"}),jsx(K,{label:"Numbered list",onClick:()=>F("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:E==="ol"}),jsx(Fe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(K,{label:"Decrease indent",onClick:()=>t.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(K,{label:"Increase indent",onClick:()=>t.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Fe,{})]}),M.length>0&&jsx(Fragment,{children:M.map(p=>jsx(K,{label:xi[p],onClick:()=>t.dispatchCommand(FORMAT_ELEMENT_COMMAND,p),icon:Ci[p],active:N===p},p))})]})};var Vo=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},Di=forwardRef(({value:e,onChange:o,onBlur:t,onError:n,placeholder:r="Write your content...",readOnly:i=false,showToolbar:l=true,toolbarConfig:s=vt,className:a,editorClassName:m,toolbarClassName:c,autoFocus:g=false,minHeight:b=160,maxHeight:f,error:C=false,errorMessage:L,editorRef:x},I)=>{let E=useRef(false),v=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:yt,onError:(h,P)=>{if(n){n(h,P);return}console.error("RichTextEditor error",h);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Vo(b),maxHeight:Vo(f),overflowY:f?"auto":void 0};return jsx(LexicalComposer,{initialConfig:v,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:I,className:a$2("group flex w-full flex-col overflow-hidden rounded-lg border bg-white transition-colors","focus-within:ring-primary-800 focus-within:ring-2 focus-within:ring-offset-0",C?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",i&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":C,"data-readonly":i,children:[l&&!i&&jsx(Ot,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$2("relative w-full px-4 py-3 text-sm leading-[142%] text-neutral-900 outline-none","[&_h1]:mt-2 [&_h1]:mb-2 [&_h2]:mt-2 [&_h2]:mb-2 [&_h3]:mt-2 [&_h3]:mb-2","[&_li]:my-1 [&_ol]:my-2 [&_ul]:my-2","[&_a]:text-primary-700 [&_a]:underline",i&&"cursor-default",m),style:N,onBlur:t,"aria-invalid":C}),placeholder:i?null:jsx("div",{className:"pointer-events-none absolute top-3 left-4 text-sm text-neutral-500",children:r}),ErrorBoundary:LexicalErrorBoundary}),jsx(HistoryPlugin,{}),jsx(ListPlugin,{}),jsx(Lt,{readOnly:i}),jsx(Mt,{value:e,isSyncingRef:E}),g&&!i&&jsx(AutoFocusPlugin,{}),x&&jsx(It,{editorRef:x}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(h,P)=>{!o||E.current||o(et(P),h);}})]}),C&&L&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:L})]})})});Di.displayName="RichTextEditor";var tt="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:duration-150 data-[state=closed]:duration-100 data-[state=open]:ease-out data-[state=closed]:ease-in data-[state=open]:data-[side=bottom]:slide-in-from-top-1 data-[state=closed]:data-[side=bottom]:slide-out-to-top-1 data-[state=open]:data-[side=top]:slide-in-from-bottom-1 data-[state=closed]:data-[side=top]:slide-out-to-bottom-1 data-[state=open]:data-[side=left]:slide-in-from-right-1 data-[state=closed]:data-[side=left]:slide-out-to-right-1 data-[state=open]:data-[side=right]:slide-in-from-left-1 data-[state=closed]:data-[side=right]:slide-out-to-left-1 motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none";var wp=["sm","md","lg"],Hp=a$c,Wi={lg:"h-10 gap-2 px-4 text-sm leading-[142%] rounded-md",md:"h-8 gap-1 px-3 text-sm leading-[142%] rounded-md",sm:"h-6 gap-1 px-3 text-xs leading-[142%] rounded-sm"},ji={lg:"size-4.5",md:"size-3.5",sm:"size-3"},qo=({label:e,options:o,onSelect:t,variant:n="primary",size:r="md",disabled:i=false,className:l,...s})=>{let a=useCallback(c=>{t?.(c.value);},[t]),{root:m}=d$5({variant:n,disabled:i});return jsxs(MenuRoot,{unmountOnExit:true,lazyMount:true,onSelect:a,positioning:{placement:"bottom-start",flip:["bottom-end"]},...s,children:[jsxs(MenuTrigger,{disabled:i,className:a$2(m(),"group data-[state=open]:ring-primary-800 ease-linear outline-none data-[state=open]:ring-3 data-[state=open]:ring-inset",Wi[r],l),children:[e,jsx(g,{className:a$2(ji[r],"transition-transform duration-150 group-data-[state=open]:rotate-180")})]}),jsx(Portal,{children:jsx(MenuPositioner,{className:"z-(--z-button-active-options)",children:jsx(MenuContent,{className:a$2("elevation-9 max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",tt),children:o.map(({label:c,value:g,description:b,startIcon:f,endIcon:C,hasDivider:L,disabled:x,onClick:I})=>jsx(MenuItem,{value:g,disabled:x,onSelect:I,asChild:true,children:jsx(he,{title:c,description:b,startIcon:f,endIcon:C,disabled:x,hasDivider:L,className:"data-highlighted:bg-primary-100 outline-none [&_p]:break-normal"})},g))})})})]})};var jo=createContext(null),Xi=()=>{let e=useContext(jo);if(!e)throw new Error("TrackerItem components must be used within TrackerItem");return e},Zi=({state:e,children:o})=>jsxs("div",{className:"relative",children:[jsx("div",{className:a$2("absolute top-1/2 z-10 h-[70%] w-0.5 -translate-y-1/2 rounded-sm",e==="active"&&"bg-primary-400",e==="success"&&"bg-success-500",e==="wait"&&"bg-neutral-400")}),o]}),Ji=forwardRef(({label:e,badgeStatus:o,details:t$1,className:n,...r},i)=>{let{state:l,stepNumber:s$1,expandable:a,onHeaderButtonClick:m}=Xi();return jsxs("div",{ref:i,className:a$2("flex min-h-10 items-center gap-3 py-2 pr-1 pl-3",n),...r,children:[jsxs("div",{className:a$2("flex flex-1 gap-2",!o&&(!t$1||t$1.length===0)&&"self-center"),children:[jsx(a$8,{state:l,stepNumber:s$1}),jsxs("div",{className:"mt-0.5 flex min-w-0 flex-1 flex-col gap-1",children:[jsx("span",{className:a$2("font-jakarta text-xs leading-snug font-medium",l==="wait"?"text-neutral-500":"text-neutral-900"),children:e}),o&&o.visible!==false&&(()=>{let{visible:c,...g}=o;return jsx(a$9,{...g})})(),t$1&&jsx("div",{className:"text-2xs flex flex-col gap-1.5 text-neutral-700",children:t$1.map(({Icon:c,text:g},b)=>jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(c,{className:"size-3 shrink-0"}),jsx("span",{className:"font-inter",children:g})]},b))})]})]}),a&&jsx(Collapsible.Context,{children:({open:c})=>jsx(Collapsible.Trigger,{asChild:true,children:jsx(d$1,{Icon:c?s:t,size:"sm",variant:"ghost",tone:"neutral"})})}),!a&&m&&jsx(d$1,{Icon:h,size:"sm",variant:"ghost",tone:"neutral",onClick:m})]})});Ji.displayName="TrackerItemHeader";var el=forwardRef(({children:e,className:o,...t},n)=>jsx(Collapsible.Content,{className:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up overflow-hidden",children:jsx("div",{ref:n,className:a$2("border-t border-neutral-300 px-3 py-2",o),...t,children:e})}));el.displayName="TrackerItemExpandableContent";var tl=forwardRef(({buttons:e=[],className:o,...t},n)=>jsx("div",{ref:n,className:a$2("flex justify-end gap-2 border-t border-neutral-300 px-3 py-2",o),...t,children:e.map((r,i)=>{if(r.visible===false)return null;let{visible:l,...s}=r;return "options"in s?jsx(qo,{...s,size:"sm"},i):jsx(d,{...s,size:"sm"},i)})}));tl.displayName="TrackerItemFooter";var Wo="overflow-hidden rounded-sm border border-neutral-300 bg-neutral-50",ol=forwardRef(({state:e,stepNumber:o,expandable:t=false,defaultExpanded:n,onExpandedChange:r,onHeaderButtonClick:i,className:l,children:s,...a},m)=>{let c=useMemo(()=>({state:e,stepNumber:o,expandable:t,onHeaderButtonClick:i}),[e,o,t,i]),g=useCallback(b=>{r?.(b.open);},[r]);return jsx(jo.Provider,{value:c,children:jsx(Zi,{state:e,children:t?jsx(Collapsible.Root,{ref:m,defaultOpen:n??false,onOpenChange:g,className:a$2(Wo,l),...a,children:s}):jsx("div",{ref:m,className:a$2(Wo,l),...a,children:s})})})});ol.displayName="TrackerItem";var fu=["sm","md","lg"],bu=["semibold","medium"],gu=["primary","neutral"],ul=tv({slots:{root:"group relative inline-flex cursor-pointer items-center justify-center overflow-clip border border-solid bg-transparent transition-colors outline-none",label:"font-inter relative overflow-hidden text-center leading-[0] text-ellipsis whitespace-nowrap",icon:"mr-1.5 shrink-0",chevron:"ml-1.5 shrink-0 transition-transform duration-150 group-data-[state=open]:rotate-180",trailing:"ml-2 flex shrink-0 items-center justify-center"},variants:{size:{lg:{root:"h-10 min-h-10 rounded-md px-2 py-2",label:"text-sm leading-[142%]",icon:"size-4",chevron:"size-4"},md:{root:"h-8 min-h-8 rounded-md px-2 py-1",label:"text-sm leading-[142%]",icon:"size-4",chevron:"size-4"},sm:{root:"h-6 max-h-6 rounded-sm px-2 py-1",label:"text-xs leading-[134%]",icon:"size-3",chevron:"size-3"}},weight:{semibold:{label:"font-semibold"},medium:{label:"font-medium"}},tone:{primary:{root:"border-primary-600 text-primary-600 hover:bg-primary-100 focus-visible:ring-primary-800 aria-[pressed=true]:border-primary-700 aria-[pressed=true]:bg-primary-200 aria-[pressed=true]:text-primary-700 data-[state=open]:border-primary-700 data-[state=open]:bg-primary-200 data-[state=open]:text-primary-700 focus-visible:ring-3 focus-visible:ring-inset disabled:cursor-not-allowed disabled:border-neutral-600 disabled:bg-transparent disabled:text-neutral-600"},neutral:{root:"hover:bg-primary-100 aria-[pressed=true]:border-primary-700 aria-[pressed=true]:bg-primary-200 data-[state=open]:border-primary-700 data-[state=open]:bg-primary-200 border-neutral-800 text-neutral-800 focus-visible:ring-3 focus-visible:ring-neutral-800 focus-visible:ring-inset disabled:cursor-not-allowed disabled:border-neutral-500 disabled:bg-transparent disabled:text-neutral-500"}},loading:{true:{root:"!cursor-wait !border-neutral-600 !text-neutral-600"},false:{}}},defaultVariants:{size:"lg",weight:"semibold",tone:"primary",loading:false}}),hu=({className:e,label:o,badgeText:t="00",StartIcon:n,options:r,onSelect:i,isSelected:l=false,isLoading:s=false,isDisabled:a=false,hasTrailingBadge:m=false,size:c="lg",weight:g$1="semibold",tone:b="primary",type:f="button",...C})=>{let L=a||s,x=r.filter(({isHidden:R})=>!R),I=x.length>0,E=s,v=!!n&&!s,N=!s&&m,h=I&&!L,P=useCallback(R=>{i?.(R.value);},[i]),M=useCallback(R=>{R?.();},[]),{root:y,label:A,icon:k,chevron:V,trailing:F}=ul({size:c,weight:g$1,tone:b,loading:E}),p=c,u=jsxs(Fragment,{children:[E&&jsx(c$6,{size:"sm",tone:"neutral",className:k()}),v&&n&&jsx(n,{className:k()}),jsx("span",{className:A(),children:o}),N&&jsx(a$e,{type:"square",variant:"primary",size:p,text:t,className:F()}),h&&jsx(g,{className:V()})]});return I?jsxs(MenuRoot,{onSelect:P,lazyMount:true,positioning:{placement:"bottom-start",flip:["bottom-end"]},children:[jsx(MenuTrigger,{...C,type:f,disabled:L,"aria-pressed":l,className:y({className:e}),children:u}),jsx(Portal,{children:jsx(MenuPositioner,{className:"z-(--z-button-active-options)",children:jsx(MenuContent,{className:cn("elevation-9 max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",tt),children:x.map(({label:R,description:_,startIcon:S,endIcon:j,hasDivider:z,isDisabled:le,onClick:w})=>jsx(MenuItem,{value:R,disabled:le,onSelect:()=>M(w),asChild:true,className:"flex items-center",children:jsx(he,{title:R,description:_,startIcon:S,endIcon:j,disabled:le,hasDivider:z,className:"data-highlighted:bg-primary-100 outline-none [&_p]:break-normal"})},R))})})})]}):jsx("button",{...C,type:f,disabled:L,"aria-pressed":l,className:y({className:e}),children:u})};var Qo={en:or,es:nr,pt:rr},yl={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",noCountryFound:"No se encontraron resultados.",noCountryFoundSubtitle:"Ajusta los criterios e int\xE9ntalo nuevamente.",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",noCountryFound:"N\xE3o foram encontrados resultados.",noCountryFoundSubtitle:"Ajuste os crit\xE9rios e tente novamente.",searchCountryPlaceholder:"Pesquisar..."}},vl={clearPhoneNumberLabel:"Clear phone number",noCountryFound:"No results were found.",noCountryFoundSubtitle:"Adjust the criteria and try again.",searchCountryPlaceholder:"Search..."},Ll=Qo.en,Yo="9 1234 5678",kt="ZZ",Xo=()=>{},rt=e=>yl[e]??vl,Zo=e=>Qo[e]??Ll,Jo=e=>{if(e)try{let o=parsePhoneNumber(e)?.country;return !o||!j$1(o)?void 0:o}catch{return}},en=e=>{if(e)return getExampleNumber(e,bl)?.formatNational()},it=e=>e??kt,lt=()=>getDefaultOptions().locale?.code;var Nl=({Icon:e,callingCode:o,country:t,countryName:n,callingCodeClassName:r})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(e,{"aria-hidden":true,country:t,label:n})}),o&&jsx("span",{className:a$2("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${o}`})]}),tn=({className:e,disabled:o,error:t,iconComponent:n,onChange:r,onOpenChange:i,options:l,readOnly:s,translations:a,value:m})=>{let c=B.useRef(null),[g,b]=B.useState(""),[f,C]=B.useState(false),{wrapper:L,input:x,clearIcon:I,searchIcon:E}=b$3({size:"md"}),{contains:v}=useFilter({sensitivity:"base"}),N=B.useMemo(()=>l.filter(u=>u.value!==void 0&&j$1(u.value)).map(u=>({callingCode:u.value?getCountryCallingCode(u.value):void 0,country:u.value,key:it(u.value),label:u.label})),[l]),h=B.useMemo(()=>N.find(u=>u.key===it(m)),[N,m]),{collection:P,filter:M,set:y}=useListCollection({initialItems:N,itemToString:u=>u.callingCode?`${u.label} +${u.callingCode}`:u.label,itemToValue:u=>u.key,filter:(u,R,_)=>{let S=R.trim().replace(/^\+/,"");return v(u,R)||(_.country?v(_.country,R.toUpperCase()):false)||(_.callingCode?v(_.callingCode,S)||v(`+${_.callingCode}`,R):false)}});B.useEffect(()=>{y(N);},[N,y]);let A=B.useCallback(u=>{C(u),i?.(u);},[i]),k=B.useCallback(({inputValue:u})=>{let R=u??"";b(R),M(R),c.current?.scrollTo({top:0});},[M]),V=B.useCallback(u=>{A(u),u&&(b(""),M(""));},[M,A]),F=B.useCallback(({itemValue:u})=>{if(!u||u===kt){r(void 0),A(false);return}j$1(u)&&(r(u),A(false));},[A,r]),p$1=useCombobox({collection:P,inputBehavior:"autohighlight",inputValue:g,open:f,openOnChange:false,openOnClick:false,selectionBehavior:"preserve",value:h?[h.key]:[],onInputValueChange:k,onOpenChange:({open:u})=>{u||A(false);},onSelect:F});return jsx(Combobox.RootProvider,{value:p$1,children:jsxs(a$b,{open:f,onOpenChange:V,children:[jsx(b$4,{asChild:true,children:jsx("button",{type:"button",className:a$2("relative flex h-full w-19.5 shrink-0 items-center justify-center rounded-l after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-full after:w-px after:content-['']",t?"bg-danger-20 after:bg-input-ring-error after:w-0.5":o||s?"after:bg-input-ring-disabled bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring bg-neutral-200 group-focus-within/phone:after:w-0.5",!t&&f&&"after:bg-input-ring-focus after:w-0.5",e),disabled:o||s,children:h&&jsx(Nl,{Icon:n,callingCode:h.callingCode,country:h.country,countryName:h.label,callingCodeClassName:a$2(t?"text-danger-600":void 0,o&&"text-input-text-disabled",s&&"text-input-text-disabled")})})}),jsx(c$4,{portalled:false,className:"w-75 p-0",children:jsxs(Combobox.Content,{children:[jsxs(Combobox.Control,{className:"pb-0",children:[jsxs("div",{className:L({className:"m-1 mb-0"}),children:[jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:a.searchCountryPlaceholder,className:x()}),!o&&g.length>0&&jsx("button",{type:"button",className:I(),onClick:()=>{p$1.setInputValue("","clear-trigger");},children:jsx(d$4,{className:"size-4.5"})}),jsx(p,{className:E()})]}),jsx(a$1,{className:"mt-2"})]}),jsx(Combobox.List,{ref:c,className:"h-72 overflow-auto outline-none",children:P.items.length===0?jsxs("div",{className:"flex h-full flex-1 flex-col items-center justify-center text-center text-sm",children:[jsx("p",{className:"text-neutral-700",children:a.noCountryFound}),jsx("p",{className:"text-neutral-600",children:a.noCountryFoundSubtitle})]}):jsx(Combobox.ItemGroup,{children:P.items.map(u=>jsxs(Combobox.Item,{item:u,className:"data-highlighted:bg-primary-100 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-neutral-900 outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",children:[jsx("span",{className:"flex size-4.5 shrink-0 items-center justify-center",children:jsx(n,{"aria-hidden":true,country:u.country,label:u.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:u.label}),u.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${u.callingCode}`}),jsx(j,{className:a$2("ml-auto size-4 shrink-0",u.key===it(m)?"opacity-100":"opacity-0")})]},u.key))})})]})})]})})};var nn=({className:e,country:o,countryName:t})=>{let n=Yn[o];return jsx("span",{className:a$2("flex size-4.5 shrink-0 items-center justify-center overflow-hidden rounded-full border border-white [&_svg:not([class*='size-'])]:h-full [&_svg:not([class*='size-'])]:w-auto [&_svg:not([class*='size-'])]:max-w-none [&_svg:not([class*='size-'])]:shrink-0",e),children:n&&jsx(n,{title:t})})};var St=B.forwardRef(({className:e,disabled:o,error:t,onChange:n,readOnly:r,type:i,value:l,...s},a)=>{let m=lt(),c=B.useMemo(()=>rt(m),[m]),g=B.useRef(null),f=!o&&!r&&!!l,C=f||t;B.useImperativeHandle(a,()=>g.current,[]);let L=B.useCallback(()=>{let x=g.current;if(!x){n?.({target:{value:""}});return}x.value="",n?.({target:x}),x.focus();},[n]);return jsxs("div",{className:a$2("bg-input-bg relative flex h-full min-w-0 flex-1 rounded-r",o&&"bg-input-bg-disabled"),children:[jsx("input",{type:i,"data-slot":"input",className:a$2("text-input-text placeholder:text-input-placeholder h-full min-w-0 flex-1 rounded-r bg-transparent px-3 text-sm leading-[143%] focus-visible:outline-0",C&&!t&&"pr-10.5",f&&t&&"pr-14",t&&!f&&"pr-10.5",o&&"text-input-text-disabled",e),...s,disabled:o,readOnly:r,value:l,onChange:n,ref:g}),(f||t)&&jsxs("div",{className:"absolute inset-y-0 right-3 z-10 flex items-center gap-1",children:[f&&jsx(a$5,{ariaLabel:c.clearPhoneNumberLabel,onClick:L}),t&&jsx(b,{})]})]})});St.displayName="PhoneNumberInputComponent";var Al=El,sn=B.forwardRef(({className:e,defaultCountry:o,disabled:t,error:n,helperText:r,id:i,label:l,onChange:s=Xo,placeholder:a,readOnly:m,required:c,tooltip:g,value:b,...f},C)=>{let[L,x]=B.useState(false),[I,E]=B.useState(()=>Jo(b)??o),v=B.useId(),N=i??v,h=lt(),P=B.useMemo(()=>rt(h),[h]),M=B.useMemo(()=>Zo(h),[h]),y=B.useMemo(()=>en(I)??a??Yo,[a,I]),A=a$7({error:n,disabled:t,readOnly:m}),k=a$2(A.control(),"group/phone",!n&&!t&&!m&&L&&"after:ring-input-ring-focus after:ring-2",e),V=B.useCallback(F=>{E(F);},[]);return jsx(Je,{disabled:t,error:n,helperText:r,htmlFor:N,label:l,readOnly:m,required:c,tooltip:g,children:jsx(Al,{...f,className:k,ref:C,countrySelectComponent:tn,countrySelectProps:{error:n,onOpenChange:x,translations:P},defaultCountry:o,disabled:t,flagComponent:nn,id:N,initialValueFormat:"national",inputComponent:St,labels:M,numberInputProps:{error:n,placeholder:y},readOnly:m,required:c,value:b,onChange:s,onCountryChange:V})})});sn.displayName="PhoneInput";var Ol=({children:e,hasDescription:o=false,disabled:t=false,hasDivider:n=false,className:r,isSelected:i,onClick:l,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",o?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":a$2("hover:bg-primary-100 focus:bg-primary-200",!!l?"cursor-pointer":"cursor-default"),i&&"bg-primary-200",r),onClick:m=>{t||l?.(m);},...s,children:e}),n&&jsx(a$1,{})]}),ee=Ol;var Wd=({children:e,title:o,titleLines:t,description:n="",descriptionLines:r,startIcon:i,badgeContent:l,hasDivider:s=false,disabled:a=false,onSelect:m,className:c,...g})=>jsxs(ee,{hasDescription:!!n,disabled:a,onClick:m,hasDivider:s,className:a$2(!a&&"cursor-pointer",c),...g,children:[i&&B__default.cloneElement(i,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[l&&jsx(a$3,{content:l,size:"lg",variant:"alert",className:a$2("self-center",a&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});export{qo as A,Yl as a,Wd as b,ao as c,xa as d,ko as e,bc as f,Pc as g,yt as h,vt as i,ye as j,Pt as k,Nt as l,Di as m,Xi as n,Ji as o,el as p,tl as q,ol as r,fu as s,bu as t,gu as u,hu as v,sn as w,he as x,wp as y,Hp as z};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-4CM257A2.js';import {d}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import*as r from'react';import*as t from'@radix-ui/react-alert-dialog';import {jsx,jsxs}from'react/jsx-runtime';var N=t.Root,x=t.Trigger,p=t.Portal,f=t.Cancel,m=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Overlay,{ref:l,className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...a$1}));m.displayName=t.Overlay.displayName;var g=r.forwardRef(({className:e,children:a$1,...l},c)=>jsxs(p,{children:[jsx(m,{className:"bg-neutral-900/50"}),jsx(t.Content,{ref:c,className:a("elevation-9 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-10000 grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 py-3 duration-200",e),...l,children:a$1})]}));g.displayName=t.Content.displayName;var T=e=>jsx(d,{variant:"primary",...e}),b=e=>jsx(f,{asChild:true,children:jsx(d,{variant:"secondary",...e})}),B=e=>jsx(d,{variant:"ghost",...e}),D=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4 flex flex-col gap-4 text-left",e),...a$1});D.displayName="AlertDialogHeader";var A=({className:e,...a$2})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mt-3 flex justify-end gap-2 px-6",e),...a$2})]});A.displayName="AlertDialogFooter";var v=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Title,{ref:l,className:a("font-jakarta text-lg leading-[160%] font-semibold",e),...a$1}));v.displayName=t.Title.displayName;var P=r.forwardRef(({className:e,...a$1},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm leading-[130%] font-normal",e),...a$1}));P.displayName=t.Description.displayName;var E=({className:e,...a$1})=>jsx("div",{className:a("mx-6 mb-4.5",e),...a$1});export{N as a,x as b,p as c,m as d,g as e,T as f,b as g,B as h,D as i,A as j,v as k,P as l,E as m};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-SY5G3KQF.js';import {d as d$2}from'./chunk-KRWEO45V.js';import {d}from'./chunk-Z6FU5QVL.js';import {d as d$1}from'./chunk-CFVEWKYU.js';import {a}from'./chunk-OBZIYJO7.js';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var _=({onOpenChange:a,...o})=>{let t=useCallback(r=>{a?.(r.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:t,...o})},X=Dialog.Trigger,q=["sm","md","lg","xl"],P=forwardRef(({children:a$1,className:o,size:t="sm",...r},l)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"fixed top-0 left-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:l,className:a("elevation-10 data-[state=closed]:animate-swipe-out data-[state=open]:animate-slide-in h-full bg-neutral-50",t==="sm"&&"w-117.5",t==="md"&&"w-187",t==="lg"&&"w-235",t==="xl"&&"w-312",o),...r,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));P.displayName="DrawerContent";var T=forwardRef(({children:a$2,className:o,title:t,buttons:r=[],Icon:l,description:p,...w},v)=>jsxs("div",{className:a("border-b border-neutral-200 pt-2 pb-2.75 pl-4",o),ref:v,...w,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"mr-2 ml-auto size-4.5 cursor-pointer"})}),jsxs("div",{className:"mt-1 mr-4 flex items-center justify-between gap-3",children:[l&&jsx(a$1,{isIconOnly:true,icon:l,size:"md",variant:"light",color:"primary"}),jsx(Dialog.Title,{className:"font-jakarta line-clamp-1 flex-1 text-xl leading-[140%] font-semibold break-all text-neutral-900",children:t}),!Array.isArray(r)&&r.visible!==false&&jsx(d$1,{size:"md",variant:"ghost",...(({visible:c,...m})=>m)(r)}),Array.isArray(r)&&jsx("div",{className:"flex gap-1",children:r.map(({visible:c=true,...m},y)=>c?jsx(d$2,{variant:"ghost",size:"md",...m},y):null)})]}),p&&jsx(Dialog.Description,{className:"font-inter mt-1 mr-4 line-clamp-2 text-sm leading-[143%] text-neutral-800",children:p})]}));T.displayName="DrawerHeader";var x=forwardRef(({children:a$1,className:o,...t},r)=>jsx("div",{className:a("flex justify-end gap-3 border-t border-neutral-200 p-4.5",o),ref:r,...t,children:a$1}));x.displayName="DrawerFooter";var H=forwardRef(({children:a$1,className:o,...t},r)=>jsx("div",{className:a("h-full overflow-y-auto p-4",o),ref:r,...t,children:a$1}));H.displayName="DrawerBody";var G=Dialog.CloseTrigger;export{_ as a,X as b,q as c,P as d,T as e,x as f,H as g,G as h};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-KRWEO45V.js';import {b,e,f,c as c$1,d as d$1}from'./chunk-Z6FU5QVL.js';import {c}from'./chunk-C7TLKKPT.js';import {a}from'./chunk-OBZIYJO7.js';import {createToaster,Toaster,Toast}from'@ark-ui/react/toast';import {jsx,jsxs}from'react/jsx-runtime';var w=["success","warning","error","info","loading"],y=createToaster({placement:"top",overlap:false,gap:8,duration:5e3}),o="hidden size-6 animate-in shrink-0 fade-in-0 zoom-in duration-300",N=g=>jsx(Toaster,{toaster:y,...g,children:r=>jsxs(Toast.Root,{className:a("group z-(--z-index) flex h-auto max-w-175 min-w-70 translate-x-(--x) translate-y-(--y) items-center rounded-lg opacity-(--opacity) transition-all will-change-transform","data-[state=close]:animate-slide-up data-[state=open]:animate-slide-down p-3 pr-2","data-[type=success]:bg-success-300","data-[type=info]:bg-info-300","data-[type=warning]:bg-warning-300","data-[type=error]:bg-danger-300","data-[type=loading]:bg-primary-500"),children:[jsx(c,{size:"md",tone:"white",className:"hidden group-data-[type=loading]:block"}),jsx(b,{className:a(o,"text-success-800 group-data-[type=success]:block")}),jsx(e,{className:a(o,"text-info-800 group-data-[type=info]:block")}),jsx(f,{className:a(o,"text-warning-800 group-data-[type=warning]:block")}),jsx(c$1,{className:a(o,"text-danger-800 group-data-[type=error]:block")}),jsxs("div",{className:"mr-4.5 ml-3",children:[jsx(Toast.Title,{className:"font-inter truncate text-sm leading-[143%] font-medium text-neutral-900 group-data-[type=loading]:text-neutral-50",children:r.title}),jsx(Toast.Description,{className:"font-inter mt-1 line-clamp-3 text-xs leading-[133%] text-neutral-900 group-data-[type=loading]:hidden empty:hidden",children:r.description})]}),jsx(Toast.CloseTrigger,{asChild:true,children:jsx(d,{Icon:d$1,size:"md",variant:"ghost",tone:"neutral",className:"ml-auto group-data-[type=loading]:text-neutral-50"})})]},r.id)});export{w as a,y as b,N as c};