sodtrack-web-ui 0.109.4 → 0.109.6

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 (105) hide show
  1. package/dist/{chunk-ZZFG3AKL.js → chunk-24L2VSWG.js} +1 -1
  2. package/dist/{chunk-OBO3JEBX.js → chunk-2ACXDJSE.js} +1 -1
  3. package/dist/{chunk-FAWSP26S.js → chunk-2C2AKMJ2.js} +1 -1
  4. package/dist/{chunk-H7WXFURI.js → chunk-3AMZEC2R.js} +1 -1
  5. package/dist/{chunk-JCFW6XDL.js → chunk-3X2MEX7P.js} +1 -1
  6. package/dist/{chunk-7SMKN4NT.js → chunk-3YSQPXNK.js} +1 -1
  7. package/dist/{chunk-AVJ4C64A.js → chunk-44FJVOTD.js} +1 -1
  8. package/dist/{chunk-46D7K2YU.js → chunk-5BU2PJB5.js} +1 -1
  9. package/dist/{chunk-7EQ5IQED.js → chunk-5RKO7FZ7.js} +1 -1
  10. package/dist/{chunk-TECBAVUS.js → chunk-5ROE6BPZ.js} +1 -1
  11. package/dist/{chunk-EMRXOENR.js → chunk-BFOGZRXP.js} +1 -1
  12. package/dist/{chunk-37DN7NT2.js → chunk-BTNV7IKI.js} +1 -1
  13. package/dist/{chunk-AIZJZNOR.js → chunk-C35EAYXN.js} +1 -1
  14. package/dist/{chunk-LNMCO4JI.js → chunk-CLGNIZFZ.js} +1 -1
  15. package/dist/chunk-D2XCASHL.js +1 -0
  16. package/dist/{chunk-NSF2YRJD.js → chunk-DESMZNRN.js} +1 -1
  17. package/dist/{chunk-ZWCNQTTS.js → chunk-FFJQVKM6.js} +1 -1
  18. package/dist/{chunk-LV5JZ2AA.js → chunk-FKW2YKFZ.js} +1 -1
  19. package/dist/{chunk-2IFCTN77.js → chunk-FRHYY6ZQ.js} +1 -1
  20. package/dist/{chunk-MRAORURS.js → chunk-GBK2AJ2O.js} +1 -1
  21. package/dist/{chunk-JOGHDTZB.js → chunk-GJQRQC2R.js} +1 -1
  22. package/dist/{chunk-NFHSJ4O6.js → chunk-GL7UB65W.js} +1 -1
  23. package/dist/{chunk-6MPATUAQ.js → chunk-I4727M54.js} +1 -1
  24. package/dist/{chunk-THL6GYT6.js → chunk-K7YUM4ZN.js} +1 -1
  25. package/dist/{chunk-ZJYTJYHK.js → chunk-NBVRYDFS.js} +1 -1
  26. package/dist/{chunk-G32MOZFP.js → chunk-NC6RO3YF.js} +1 -1
  27. package/dist/{chunk-3JRO6GMU.js → chunk-OI2QU3S3.js} +1 -1
  28. package/dist/{chunk-YCAUNU3X.js → chunk-P2SYYWF3.js} +1 -1
  29. package/dist/{chunk-KRDROWBJ.js → chunk-R6HCHUYY.js} +1 -1
  30. package/dist/{chunk-SD7BX4UU.js → chunk-RNA2OUHJ.js} +1 -1
  31. package/dist/{chunk-O4V6WJIM.js → chunk-SCBJQNKR.js} +1 -1
  32. package/dist/{chunk-HC47FSC4.js → chunk-SXK4QICM.js} +1 -1
  33. package/dist/{chunk-JKTBL7WC.js → chunk-T3FB2JLM.js} +1 -1
  34. package/dist/chunk-TPE6CVKA.js +1 -0
  35. package/dist/chunk-U4NJK7JM.js +1 -0
  36. package/dist/chunk-UMYKFNLR.js +1 -0
  37. package/dist/{chunk-QDSBR67A.js → chunk-UXA4LNOV.js} +1 -1
  38. package/dist/{chunk-4MOVG3L6.js → chunk-VAPHEFRD.js} +1 -1
  39. package/dist/{chunk-KFAARODU.js → chunk-WIITAOD5.js} +1 -1
  40. package/dist/{chunk-VOPVBJKL.js → chunk-XKMQ2LPV.js} +1 -1
  41. package/dist/{chunk-AY7M5GEB.js → chunk-XZALFC6K.js} +1 -1
  42. package/dist/{chunk-JD43K4LQ.js → chunk-YC6ECYQ6.js} +1 -1
  43. package/dist/{chunk-TAB2HFL4.js → chunk-YFRMZVE4.js} +1 -1
  44. package/dist/{chunk-EZ4WR6QU.js → chunk-YY4EZ4C5.js} +1 -1
  45. package/dist/{chunk-YWWEUQOI.js → chunk-ZB4KJVYD.js} +1 -1
  46. package/dist/components/accordion-form.js +1 -1
  47. package/dist/components/accordion.js +1 -1
  48. package/dist/components/alert-message.js +1 -1
  49. package/dist/components/autocomplete-multiple.js +1 -1
  50. package/dist/components/autocomplete-skeleton.js +1 -1
  51. package/dist/components/autocomplete.js +1 -1
  52. package/dist/components/button-active.js +1 -1
  53. package/dist/components/button-menu.js +1 -1
  54. package/dist/components/calendar.js +1 -1
  55. package/dist/components/calendar_old.js +1 -1
  56. package/dist/components/card-basic.js +1 -1
  57. package/dist/components/card-expandable.js +1 -1
  58. package/dist/components/carousel.js +1 -1
  59. package/dist/components/checkbox.js +1 -1
  60. package/dist/components/chip-input.js +1 -1
  61. package/dist/components/choice-chips.js +1 -1
  62. package/dist/components/country-code.d.ts +11 -1
  63. package/dist/components/country-code.js +1 -1
  64. package/dist/components/data-table.js +1 -1
  65. package/dist/components/date-picker.js +1 -1
  66. package/dist/components/date-picker_old.js +1 -1
  67. package/dist/components/dialog.js +1 -1
  68. package/dist/components/drawer.js +1 -1
  69. package/dist/components/dropzone.js +1 -1
  70. package/dist/components/icons.d.ts +3 -1
  71. package/dist/components/icons.js +1 -1
  72. package/dist/components/index.d.ts +1 -1
  73. package/dist/components/index.js +1 -1
  74. package/dist/components/list-item-arrow.js +1 -1
  75. package/dist/components/list-item-button.js +1 -1
  76. package/dist/components/list-item-checkbox-left.js +1 -1
  77. package/dist/components/list-item-checkbox.js +1 -1
  78. package/dist/components/list-item_old.js +1 -1
  79. package/dist/components/radio.js +1 -1
  80. package/dist/components/rating.js +1 -1
  81. package/dist/components/search-bar.js +1 -1
  82. package/dist/components/select-skeleton.js +1 -1
  83. package/dist/components/select.js +1 -1
  84. package/dist/components/select_old.js +1 -1
  85. package/dist/components/signature-pad.js +1 -1
  86. package/dist/components/snackbar.js +1 -1
  87. package/dist/components/step-item.d.ts +8 -1
  88. package/dist/components/step-item.js +1 -1
  89. package/dist/components/tab.js +1 -1
  90. package/dist/components/table.js +1 -1
  91. package/dist/components/text-field.js +1 -1
  92. package/dist/components/text-field_old.js +1 -1
  93. package/dist/components/textarea.js +1 -1
  94. package/dist/components/time-picker.js +1 -1
  95. package/dist/components/time-picker_old.js +1 -1
  96. package/dist/components/toast.js +1 -1
  97. package/dist/components/tracker-item.d.ts +18 -2
  98. package/dist/components/tracker-item.js +1 -1
  99. package/dist/identification-number.js +1 -1
  100. package/dist/styles/index.css +1 -1
  101. package/package.json +19 -18
  102. package/dist/chunk-ES7L2PIL.js +0 -1
  103. package/dist/chunk-LU2N5UJD.js +0 -1
  104. package/dist/chunk-RSYSUM3Q.js +0 -1
  105. package/dist/chunk-Z6FU5QVL.js +0 -1
@@ -1 +1 @@
1
- import {g}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx}from'react/jsx-runtime';var p=({className:r})=>jsx(g,{"aria-hidden":true,className:a("size-4.5 text-neutral-900 transition-transform will-change-transform","group-data-disabled/control:text-neutral-600","group-data-readonly/control:text-neutral-600","group-data-[state=open]/chevron-host:rotate-180",r)});export{p as a};
1
+ import {g}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx}from'react/jsx-runtime';var p=({className:r})=>jsx(g,{"aria-hidden":true,className:a("size-4.5 text-neutral-900 transition-transform will-change-transform","group-data-disabled/control:text-neutral-600","group-data-readonly/control:text-neutral-600","group-data-[state=open]/chevron-host:rotate-180",r)});export{p as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-GFVJRSZI.js';import {a as a$1}from'./chunk-KFAARODU.js';import {a as a$2}from'./chunk-AIZJZNOR.js';import {n}from'./chunk-Z6FU5QVL.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as g from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var S=({value:a$4,onChange:m,locale:x,disabledDates:w,disabled:D,...E})=>{let[c,f]=useState(false),[s,u]=useState(a$4),[n$1,P]=useState(),[L,R]=useState("bottom"),[F,k]=useState(0),r=useRef(null),o=useRef(null);a(r,()=>{f(false);});let y=t=>{u(t),m?.(t);},H=useMemo(()=>s?format(s,"P"):"",[s]),z=()=>{u(void 0),m?.(void 0);},e=useCallback(()=>{if(!o.current)return;let t=o.current.getBoundingClientRect();if(!r.current)return;let l=r.current.getBoundingClientRect().height;k(l),P(t);let I=window.innerHeight-t.bottom>l,N=t.top+t.height>l;R(I?"bottom":N?"top":"bottom");},[o.current,r.current]);return useEffect(()=>{u(a$4);},[a$4]),useEffect(()=>{if(o?.current)return e(),o.current.addEventListener("mousedown",e),o.current.addEventListener("input",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),o.current?.removeEventListener("input",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[o.current,e]),useEffect(()=>{if(c&&r.current){let t=setTimeout(()=>{e();},0);return ()=>clearTimeout(t)}},[c,e]),jsxs(Fragment,{children:[jsx(a$1,{disabled:D,ref:o,startIcon:jsx(n,{}),onClean:z,readOnly:true,value:H,onClick:t=>{P(t.currentTarget.getBoundingClientRect()),f(l=>!l);},...E}),jsx(g.Root,{asChild:true,children:jsx("div",{ref:r,className:a$3("pointer-events-auto fixed z-50 hidden",c&&"block"),style:n$1?{top:L==="bottom"?`${n$1.height+n$1.y}px`:n$1.top-F,left:n$1?.left}:void 0,children:jsx(a$2,{className:"w-[20rem] max-w-full",mode:"single",selected:s,onSelect:y,locale:x,disabled:w})})})]})};S.displayName="DatePicker_old";export{S as a};
1
+ import {a}from'./chunk-GFVJRSZI.js';import {a as a$1}from'./chunk-WIITAOD5.js';import {a as a$2}from'./chunk-C35EAYXN.js';import {n}from'./chunk-TPE6CVKA.js';import {a as a$3}from'./chunk-OBZIYJO7.js';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as g from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var S=({value:a$4,onChange:m,locale:x,disabledDates:w,disabled:D,...E})=>{let[c,f]=useState(false),[s,u]=useState(a$4),[n$1,P]=useState(),[L,R]=useState("bottom"),[F,k]=useState(0),r=useRef(null),o=useRef(null);a(r,()=>{f(false);});let y=t=>{u(t),m?.(t);},H=useMemo(()=>s?format(s,"P"):"",[s]),z=()=>{u(void 0),m?.(void 0);},e=useCallback(()=>{if(!o.current)return;let t=o.current.getBoundingClientRect();if(!r.current)return;let l=r.current.getBoundingClientRect().height;k(l),P(t);let I=window.innerHeight-t.bottom>l,N=t.top+t.height>l;R(I?"bottom":N?"top":"bottom");},[o.current,r.current]);return useEffect(()=>{u(a$4);},[a$4]),useEffect(()=>{if(o?.current)return e(),o.current.addEventListener("mousedown",e),o.current.addEventListener("input",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),o.current?.removeEventListener("input",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[o.current,e]),useEffect(()=>{if(c&&r.current){let t=setTimeout(()=>{e();},0);return ()=>clearTimeout(t)}},[c,e]),jsxs(Fragment,{children:[jsx(a$1,{disabled:D,ref:o,startIcon:jsx(n,{}),onClean:z,readOnly:true,value:H,onClick:t=>{P(t.currentTarget.getBoundingClientRect()),f(l=>!l);},...E}),jsx(g.Root,{asChild:true,children:jsx("div",{ref:r,className:a$3("pointer-events-auto fixed z-50 hidden",c&&"block"),style:n$1?{top:L==="bottom"?`${n$1.height+n$1.y}px`:n$1.top-F,left:n$1?.left}:void 0,children:jsx(a$2,{className:"w-[20rem] max-w-full",mode:"single",selected:s,onSelect:y,locale:x,disabled:w})})})]})};S.displayName="DatePicker_old";export{S as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-R6NIURLZ.js';import {d}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import*as e from'@radix-ui/react-tabs';import o from'react';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var k=["ghost","fill","fillWithCloseButton"],D=["sm","md"],y=tv({base:"group relative shrink-0 px-4 leading-[130%] text-neutral-900 transition-all disabled:text-neutral-500",variants:{variant:{ghost:"not-disabled:hover:bg-primary-100 rounded-sm font-semibold",fill:"[&:not(:disabled)]:aria-selected:elevation-10 not-disabled:hover:border-primary-300 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:bg-neutral-50 aria-selected:font-semibold",fillWithCloseButton:"[&:not(:disabled)]:aria-selected:elevation-10 bg-primary-100 not-disabled:hover:border-primary-300 not-disabled:hover:bg-primary-100 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:font-semibold not-disabled:not-[&:hover]:aria-selected:bg-neutral-50 not-disabled:hover:aria-selected:border-transparent not-disabled:hover:aria-selected:bg-neutral-50"},size:{sm:"h-10 text-sm",md:"h-12 text-base"}}}),P=tv({base:"mr-2 flex shrink-0 transition-all ease-linear group-aria-selected:not-disabled:text-neutral-900",variants:{size:{sm:"",md:""}}}),C=tv({base:"group-aria-selected:bg-primary-500 absolute bottom-0 h-0 w-full rounded-sm transition-all group-disabled:bg-neutral-500 group-aria-selected:h-1 group-disabled:group-aria-selected:h-0",variants:{variant:{ghost:"flex",fill:"hidden",fillWithCloseButton:"hidden"}}}),R=tv({variants:{variant:{ghost:"",fill:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']",fillWithCloseButton:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']"},size:{sm:"",md:""}},compoundVariants:[{variant:"fill",size:"sm",className:"before:top-10"},{variant:"fill",size:"md",className:"before:top-12"},{variant:"fillWithCloseButton",size:"sm",className:"before:top-10"},{variant:"fillWithCloseButton",size:"md",className:"before:top-12"}]}),f=o.createContext({}),I=o.forwardRef(({className:i,size:a$1="sm",variant:t="ghost",...s},l)=>jsx(f.Provider,{value:{size:a$1,variant:t},children:jsx(e.Root,{"data-tab-variant":t,ref:l,...s,className:a(i,"relative")})})),N=o.forwardRef(({className:i,...a$1},t)=>{let{variant:s}=o.useContext(f);return jsx(e.List,{ref:t,...a$1,className:a("no-scrollbar flex max-w-full space-x-2 overflow-x-scroll",s!=="ghost"&&"px-6",i)})});N.displayName=e.List.displayName;var z=o.forwardRef(({className:i,badgeNumber:a$2,disabled:t,variant:s,StartIcon:l,onClose:T,...v},h)=>{let{size:d$1,variant:x}=o.useContext(f),n=s??x;return jsx(e.Trigger,{"data-tab-variant":n,ref:h,disabled:t,className:y({size:d$1,variant:n,className:i}),...v,children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxs("div",{className:"flex items-center justify-center",children:[l&&jsx(l,{className:P({size:d$1}),size:d$1==="sm"?12:14}),v.children,jsxs("div",{className:a("flex items-center gap-1 empty:hidden",n==="ghost"&&"ml-1",n==="fill"&&"ml-3",n==="fillWithCloseButton"&&"ml-3"),children:[!t&&a$2&&jsx(a$1,{variant:"alert",size:d$1==="sm"?"sm":"md",content:String(a$2)}),n==="fillWithCloseButton"&&jsx(d,{onPointerDown:p=>{p.preventDefault(),p.stopPropagation(),T?.(p);},className:"transition-colors group-aria-selected:not-disabled:text-neutral-900",size:14})]})]}),jsx("div",{className:C({variant:n})})]})})});z.displayName=e.Trigger.displayName;var W=o.forwardRef(({className:i,...a},t)=>{let{variant:s,size:l}=o.useContext(f);return jsx(e.Content,{ref:t,className:R({variant:s,size:l,className:i}),...a})});W.displayName=e.Content.displayName;export{k as a,D as b,I as c,N as d,z as e,W as f};
1
+ import {a as a$1}from'./chunk-R6NIURLZ.js';import {d}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import*as e from'@radix-ui/react-tabs';import o from'react';import {tv}from'tailwind-variants';import {jsx,jsxs}from'react/jsx-runtime';var k=["ghost","fill","fillWithCloseButton"],D=["sm","md"],y=tv({base:"group relative shrink-0 px-4 leading-[130%] text-neutral-900 transition-all disabled:text-neutral-500",variants:{variant:{ghost:"not-disabled:hover:bg-primary-100 rounded-sm font-semibold",fill:"[&:not(:disabled)]:aria-selected:elevation-10 not-disabled:hover:border-primary-300 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:bg-neutral-50 aria-selected:font-semibold",fillWithCloseButton:"[&:not(:disabled)]:aria-selected:elevation-10 bg-primary-100 not-disabled:hover:border-primary-300 not-disabled:hover:bg-primary-100 not-disabled:hover:text-primary-700 not-disabled:aria-selected:text-primary-500 rounded-lg rounded-b-none! border-1 border-b-0! border-transparent aria-selected:font-semibold not-disabled:not-[&:hover]:aria-selected:bg-neutral-50 not-disabled:hover:aria-selected:border-transparent not-disabled:hover:aria-selected:bg-neutral-50"},size:{sm:"h-10 text-sm",md:"h-12 text-base"}}}),P=tv({base:"mr-2 flex shrink-0 transition-all ease-linear group-aria-selected:not-disabled:text-neutral-900",variants:{size:{sm:"",md:""}}}),C=tv({base:"group-aria-selected:bg-primary-500 absolute bottom-0 h-0 w-full rounded-sm transition-all group-disabled:bg-neutral-500 group-aria-selected:h-1 group-disabled:group-aria-selected:h-0",variants:{variant:{ghost:"flex",fill:"hidden",fillWithCloseButton:"hidden"}}}),R=tv({variants:{variant:{ghost:"",fill:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']",fillWithCloseButton:"elevation-10 rounded-lg bg-neutral-50 pt-6 before:absolute before:right-0 before:left-0 before:h-5 before:rounded-lg before:rounded-b-none before:bg-neutral-50 before:content-['']"},size:{sm:"",md:""}},compoundVariants:[{variant:"fill",size:"sm",className:"before:top-10"},{variant:"fill",size:"md",className:"before:top-12"},{variant:"fillWithCloseButton",size:"sm",className:"before:top-10"},{variant:"fillWithCloseButton",size:"md",className:"before:top-12"}]}),f=o.createContext({}),I=o.forwardRef(({className:i,size:a$1="sm",variant:t="ghost",...s},l)=>jsx(f.Provider,{value:{size:a$1,variant:t},children:jsx(e.Root,{"data-tab-variant":t,ref:l,...s,className:a(i,"relative")})})),N=o.forwardRef(({className:i,...a$1},t)=>{let{variant:s}=o.useContext(f);return jsx(e.List,{ref:t,...a$1,className:a("no-scrollbar flex max-w-full space-x-2 overflow-x-scroll",s!=="ghost"&&"px-6",i)})});N.displayName=e.List.displayName;var z=o.forwardRef(({className:i,badgeNumber:a$2,disabled:t,variant:s,StartIcon:l,onClose:T,...v},h)=>{let{size:d$1,variant:x}=o.useContext(f),n=s??x;return jsx(e.Trigger,{"data-tab-variant":n,ref:h,disabled:t,className:y({size:d$1,variant:n,className:i}),...v,children:jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxs("div",{className:"flex items-center justify-center",children:[l&&jsx(l,{className:P({size:d$1}),size:d$1==="sm"?12:14}),v.children,jsxs("div",{className:a("flex items-center gap-1 empty:hidden",n==="ghost"&&"ml-1",n==="fill"&&"ml-3",n==="fillWithCloseButton"&&"ml-3"),children:[!t&&a$2&&jsx(a$1,{variant:"alert",size:d$1==="sm"?"sm":"md",content:String(a$2)}),n==="fillWithCloseButton"&&jsx(d,{onPointerDown:p=>{p.preventDefault(),p.stopPropagation(),T?.(p);},className:"transition-colors group-aria-selected:not-disabled:text-neutral-900",size:14})]})]}),jsx("div",{className:C({variant:n})})]})})});z.displayName=e.Trigger.displayName;var W=o.forwardRef(({className:i,...a},t)=>{let{variant:s,size:l}=o.useContext(f);return jsx(e.Content,{ref:t,className:R({variant:s,size:l,className:i}),...a})});W.displayName=e.Content.displayName;export{k as a,D as b,I as c,N as d,z as e,W as f};
@@ -1 +1 @@
1
- import {a}from'./chunk-VOPVBJKL.js';import {d}from'./chunk-Z6FU5QVL.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {SignaturePad}from'@ark-ui/react/signature-pad';import {forwardRef,useState,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=forwardRef((N,D)=>{let{rootClassName:v,className:V,label:m,required:k,tooltip:A,helperText:f,error:u,hasValue:b,onChange:h,readOnly:n,disabled:e,...E}=N,[F,T]=useState(false),d$1=b!==void 0,H=d$1?b:F,P=useCallback(async a=>{let[l,g]=a.split(","),w=l.match(/:(.*?);/),q=w?w[1]:"image/png",c=atob(g),S=new Uint8Array(c.length);for(let i=0;i<c.length;i++)S[i]=c.charCodeAt(i);return new File([S],"signature.png",{type:q})},[]),o=useCallback(a=>{d$1||T(!!a),h?.(a);},[d$1,h]),R=useCallback(async a=>{if(n||e)return;let l=await a.getDataUrl("image/png");if(!l){o(null);return}let g=await P(l);o(g);},[o,P,n,e]),U=H&&!n&&!e;return jsxs(SignaturePad.Root,{ref:D,"data-error":u,className:a$1("group flex flex-col",v),onDrawEnd:R,readOnly:n,disabled:e,...E,children:[m&&jsx(a,{as:SignaturePad.Label,label:m,required:k,tooltip:A}),jsxs(SignaturePad.Control,{className:a$1("group/control","relative h-40 w-full overflow-hidden","rounded-lg bg-white p-4","border border-dashed border-neutral-300",u&&"border-error-500",n&&"pointer-events-none border-neutral-300 bg-neutral-100",e&&"pointer-events-none opacity-60",V),children:[jsx(SignaturePad.Segment,{className:"h-full w-full"}),jsx(SignaturePad.Guide,{className:"absolute inset-0 opacity-20"}),U&&jsx(SignaturePad.ClearTrigger,{className:"absolute top-2 right-2 z-20 cursor-pointer rounded-lg bg-neutral-100 p-1 ring-1 ring-neutral-500",onClick:()=>o(null),children:jsx(d,{className:"size-4 text-neutral-700"})})]}),f&&jsx("p",{className:a$1("font-inter text-2xs mt-1 leading-[133.33%] font-normal",u?"text-error-500":"text-neutral-700",e&&"text-neutral-400"),children:f})]})});z.displayName="SignaturePad";export{z as a};
1
+ import {a}from'./chunk-XKMQ2LPV.js';import {d}from'./chunk-TPE6CVKA.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {SignaturePad}from'@ark-ui/react/signature-pad';import {forwardRef,useState,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var z=forwardRef((N,D)=>{let{rootClassName:v,className:V,label:m,required:k,tooltip:A,helperText:f,error:u,hasValue:b,onChange:h,readOnly:n,disabled:e,...E}=N,[F,T]=useState(false),d$1=b!==void 0,H=d$1?b:F,P=useCallback(async a=>{let[l,g]=a.split(","),w=l.match(/:(.*?);/),q=w?w[1]:"image/png",c=atob(g),S=new Uint8Array(c.length);for(let i=0;i<c.length;i++)S[i]=c.charCodeAt(i);return new File([S],"signature.png",{type:q})},[]),o=useCallback(a=>{d$1||T(!!a),h?.(a);},[d$1,h]),R=useCallback(async a=>{if(n||e)return;let l=await a.getDataUrl("image/png");if(!l){o(null);return}let g=await P(l);o(g);},[o,P,n,e]),U=H&&!n&&!e;return jsxs(SignaturePad.Root,{ref:D,"data-error":u,className:a$1("group flex flex-col",v),onDrawEnd:R,readOnly:n,disabled:e,...E,children:[m&&jsx(a,{as:SignaturePad.Label,label:m,required:k,tooltip:A}),jsxs(SignaturePad.Control,{className:a$1("group/control","relative h-40 w-full overflow-hidden","rounded-lg bg-white p-4","border border-dashed border-neutral-300",u&&"border-error-500",n&&"pointer-events-none border-neutral-300 bg-neutral-100",e&&"pointer-events-none opacity-60",V),children:[jsx(SignaturePad.Segment,{className:"h-full w-full"}),jsx(SignaturePad.Guide,{className:"absolute inset-0 opacity-20"}),U&&jsx(SignaturePad.ClearTrigger,{className:"absolute top-2 right-2 z-20 cursor-pointer rounded-lg bg-neutral-100 p-1 ring-1 ring-neutral-500",onClick:()=>o(null),children:jsx(d,{className:"size-4 text-neutral-700"})})]}),f&&jsx("p",{className:a$1("font-inter text-2xs mt-1 leading-[133.33%] font-normal",u?"text-error-500":"text-neutral-700",e&&"text-neutral-400"),children:f})]})});z.displayName="SignaturePad";export{z as a};
@@ -1 +1 @@
1
- var o=C=>Object.freeze(Object.fromEntries(C.map(n=>[n,n]))),t=C=>new Set(C),e=["AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],s=e,r=["AD","AI","AL","AR","AT","AU","AZ","BA","BE","BG","BR","BY","BZ","CA","CH","CL","CN","CO","CR","CU","CY","CZ","DE","DK","DO","EC","EE","ES","FI","FR","GB","GH","GR","GT","HK","HR","HU","ID","IE","IL","IN","IS","IT","JP","KR","LI","LT","LU","LV","MA","MC","MD","ME","MK","MT","MU","MX","MY","NI","NL","NO","NZ","PE","PK","PL","PT","PY","RO","RS","RU","SE","SG","SI","SK","SM","SV","TH","TR","TW","UA","US","UY","VN","ZA"],S=["CL","AR","CO","GT","MX","PE","BR","UY","US"],I=o(s),M=o(e),N=o(r),R=o(S),T=t(s),E=t(e),u=t(r),O=t(S),y=C=>T.has(C),A=C=>E.has(C),U=C=>u.has(C),B=C=>O.has(C);export{e as a,s as b,r as c,S as d,I as e,M as f,N as g,R as h,y as i,A as j,U as k,B as l};
1
+ var o=C=>Object.freeze(Object.fromEntries(C.map(n=>[n,n]))),t=C=>new Set(C),e=["AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],s=e,r=["AD","AI","AL","AO","AR","AT","AU","AZ","BA","BE","BG","BO","BR","BY","BZ","CA","CH","CL","CN","CO","CR","CU","CY","CZ","DE","DK","DO","EC","EE","ES","FI","FR","GB","GH","GR","GT","HK","HN","HR","HT","HU","ID","IE","IL","IN","IS","IT","JM","JP","KR","LI","LT","LU","LV","MA","MC","MD","ME","MK","MT","MU","MX","MY","MZ","NI","NL","NO","NZ","PA","PE","PK","PL","PR","PT","PY","RO","RS","RU","SE","SG","SI","SK","SM","SV","TH","TR","TT","TW","UA","US","UY","VE","VN","ZA"],S=["CL","AR","CO","GT","MX","PE","BR","UY","US"],I=o(s),M=o(e),N=o(r),R=o(S),T=t(s),E=t(e),O=t(r),u=t(S),A=C=>T.has(C),y=C=>E.has(C),U=C=>O.has(C),B=C=>u.has(C);export{e as a,s as b,r as c,S as d,I as e,M as f,N as g,R as h,A as i,y as j,U as k,B as l};
@@ -1 +1 @@
1
- import {d as d$1}from'./chunk-YFDUDY6Y.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {d}from'./chunk-Z6FU5QVL.js';import {e}from'./chunk-5D64Y4FM.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 z-layer fixed inset-0 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"z-layer fixed top-0 left-0 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:l,className:a("elevation-10 z-layer 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$1,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(d$1,{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(e,{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(e$1,{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};
1
+ import {d as d$1}from'./chunk-YFDUDY6Y.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {d}from'./chunk-TPE6CVKA.js';import {e}from'./chunk-5D64Y4FM.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 z-layer fixed inset-0 bg-neutral-900/60"}),jsx(Dialog.Positioner,{className:"z-layer fixed top-0 left-0 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:l,className:a("elevation-10 z-layer 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$1,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(d$1,{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(e,{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(e$1,{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};
@@ -1 +1 @@
1
- import {d}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=["lg","md"],H=["neutral","primary"],M=["fill","outlined"],x=tv({slots:{container:"flex cursor-default items-center rounded px-2 py-1 ring transition-all ring-inset focus-within:ring-3",startIcon:"mr-1.5",closeButton:"ml-2 cursor-pointer focus-visible:outline-none",closeIcon:""},variants:{color:{neutral:{},primary:{}},variant:{fill:{},outlined:{}},size:{lg:{container:"min-h-7 text-sm leading-[142%] font-medium",startIcon:"size-3.5",closeIcon:"size-3.5"},md:{container:"min-h-6 text-xs leading-[133%] font-medium",startIcon:"size-3",closeIcon:"size-3"}},disabled:{true:{container:"cursor-not-allowed"},false:{container:"focus-within:ring-primary-800"}}},compoundVariants:[{disabled:false,color:"neutral",variant:"fill",className:{container:"bg-neutral-200 text-neutral-800 ring-neutral-500 hover:bg-neutral-300"}},{disabled:true,color:"neutral",variant:"fill",className:{container:"bg-neutral-200 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"primary",variant:"fill",className:{container:"bg-primary-100 text-primary-600 ring-primary-400 hover:bg-primary-200"}},{disabled:true,color:"primary",variant:"fill",className:{container:"bg-neutral-200 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"neutral",variant:"outlined",className:{container:"hover:bg-primary-100 bg-neutral-50 text-neutral-800 ring-neutral-800"}},{disabled:true,color:"neutral",variant:"outlined",className:{container:"bg-neutral-50 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"primary",variant:"outlined",className:{container:"text-primary-600 ring-primary-600 hover:bg-primary-100 bg-neutral-50"}},{disabled:true,color:"primary",variant:"outlined",className:{container:"bg-neutral-50 text-neutral-600 ring-neutral-400"}}],defaultVariants:{disabled:false,size:"md"}}),N=forwardRef(({children:i,onClose:o,StartIcon:r,className:l,hasCloseIcon:s=true,disabled:a$1,color:c,variant:u,size:p,...m},d$1)=>{let{container:f,startIcon:g,closeButton:b,closeIcon:y}=x({color:c,variant:u,size:p,disabled:a$1});return jsxs("span",{ref:d$1,className:a(f(),l),...m,children:[r&&jsx(r,{"aria-hidden":true,className:g()}),i,s&&!a$1&&jsx("button",{type:"button","aria-label":"Remove",onClick:I=>{I.stopPropagation(),o?.();},className:b(),children:jsx(d,{"aria-hidden":true,className:y()})})]})});N.displayName="ChipInput";export{w as a,H as b,M as c,N as d};
1
+ import {d}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import {forwardRef}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=["lg","md"],H=["neutral","primary"],M=["fill","outlined"],x=tv({slots:{container:"flex cursor-default items-center rounded px-2 py-1 ring transition-all ring-inset focus-within:ring-3",startIcon:"mr-1.5",closeButton:"ml-2 cursor-pointer focus-visible:outline-none",closeIcon:""},variants:{color:{neutral:{},primary:{}},variant:{fill:{},outlined:{}},size:{lg:{container:"min-h-7 text-sm leading-[142%] font-medium",startIcon:"size-3.5",closeIcon:"size-3.5"},md:{container:"min-h-6 text-xs leading-[133%] font-medium",startIcon:"size-3",closeIcon:"size-3"}},disabled:{true:{container:"cursor-not-allowed"},false:{container:"focus-within:ring-primary-800"}}},compoundVariants:[{disabled:false,color:"neutral",variant:"fill",className:{container:"bg-neutral-200 text-neutral-800 ring-neutral-500 hover:bg-neutral-300"}},{disabled:true,color:"neutral",variant:"fill",className:{container:"bg-neutral-200 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"primary",variant:"fill",className:{container:"bg-primary-100 text-primary-600 ring-primary-400 hover:bg-primary-200"}},{disabled:true,color:"primary",variant:"fill",className:{container:"bg-neutral-200 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"neutral",variant:"outlined",className:{container:"hover:bg-primary-100 bg-neutral-50 text-neutral-800 ring-neutral-800"}},{disabled:true,color:"neutral",variant:"outlined",className:{container:"bg-neutral-50 text-neutral-600 ring-neutral-400"}},{disabled:false,color:"primary",variant:"outlined",className:{container:"text-primary-600 ring-primary-600 hover:bg-primary-100 bg-neutral-50"}},{disabled:true,color:"primary",variant:"outlined",className:{container:"bg-neutral-50 text-neutral-600 ring-neutral-400"}}],defaultVariants:{disabled:false,size:"md"}}),N=forwardRef(({children:i,onClose:o,StartIcon:r,className:l,hasCloseIcon:s=true,disabled:a$1,color:c,variant:u,size:p,...m},d$1)=>{let{container:f,startIcon:g,closeButton:b,closeIcon:y}=x({color:c,variant:u,size:p,disabled:a$1});return jsxs("span",{ref:d$1,className:a(f(),l),...m,children:[r&&jsx(r,{"aria-hidden":true,className:g()}),i,s&&!a$1&&jsx("button",{type:"button","aria-label":"Remove",onClick:I=>{I.stopPropagation(),o?.();},className:b(),children:jsx(d,{"aria-hidden":true,className:y()})})]})});N.displayName="ChipInput";export{w as a,H as b,M as c,N as d};
@@ -1 +1 @@
1
- import {c,d}from'./chunk-AY7M5GEB.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-VOPVBJKL.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsxs,jsx}from'react/jsx-runtime';var g=forwardRef(({className:T,disabled:l,error:r,helperText:c$1,label:f,placeholder:b,readOnly:i,required:p,tooltip:u,...F},v)=>{let t=c({error:r,disabled:l,readOnly:i,multiline:true});return jsxs(Field.Root,{"data-error":r,disabled:l,readOnly:i,className:t.root({className:T}),children:[jsx(a,{as:Field.Label,label:f,required:p,tooltip:u}),jsxs("div",{className:t.control(),children:[jsx(Field.Textarea,{ref:v,required:p,placeholder:b,"aria-invalid":r,className:a$1(t.input(),"no-scrollbar h-20"),...F}),r&&jsx("div",{className:a$1(t.trailing(),"cursor-text"),children:jsx(d,{})})]}),jsx(a$2,{as:Field.HelperText,children:c$1})]})});g.displayName="Textarea";export{g as a};
1
+ import {c,d}from'./chunk-XZALFC6K.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-XKMQ2LPV.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef}from'react';import {jsxs,jsx}from'react/jsx-runtime';var g=forwardRef(({className:T,disabled:l,error:r,helperText:c$1,label:f,placeholder:b,readOnly:i,required:p,tooltip:u,...F},v)=>{let t=c({error:r,disabled:l,readOnly:i,multiline:true});return jsxs(Field.Root,{"data-error":r,disabled:l,readOnly:i,className:t.root({className:T}),children:[jsx(a,{as:Field.Label,label:f,required:p,tooltip:u}),jsxs("div",{className:t.control(),children:[jsx(Field.Textarea,{ref:v,required:p,placeholder:b,"aria-invalid":r,className:a$1(t.input(),"no-scrollbar h-20"),...F}),r&&jsx("div",{className:a$1(t.trailing(),"cursor-text"),children:jsx(d,{})})]}),jsx(a$2,{as:Field.HelperText,children:c$1})]})});g.displayName="Textarea";export{g as a};
@@ -1 +1 @@
1
- import {j,k}from'./chunk-Z6FU5QVL.js';import {CheckboxRoot,CheckboxControl,CheckboxIndicator,CheckboxLabel,CheckboxHiddenInput}from'@ark-ui/react';import {useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var F=[true,"indeterminate",false],S=tv({slots:{root:"group relative flex h-fit w-fit items-center gap-2 transition-all data-disabled:cursor-not-allowed",control:["m-0.5 flex size-4.5 items-center justify-center rounded-sm transition-all ring-inset [&:not([data-disabled])]:cursor-pointer","focus:ring-primary-800 focus:ring-2","data-[state=unchecked]:bg-neutral-50 data-[state=unchecked]:ring-1 data-[state=unchecked]:ring-neutral-600","group-data-[state=unchecked]:group-hover:bg-primary-100 group-data-[state=unchecked]:group-hover:ring-primary-700","data-[state=unchecked]:data-disabled:bg-neutral-100 data-[state=unchecked]:data-disabled:ring-neutral-300","data-[state=checked]:bg-primary-600 data-[state=checked]:data-disabled:bg-neutral-400","data-[state=indeterminate]:bg-primary-600 data-[state=indeterminate]:data-disabled:bg-neutral-400"],icon:"size-3.5 text-neutral-50",label:"font-inter text-sm leading-[142%] text-neutral-900 transition-colors group-data-disabled:text-neutral-500"}}),L=({className:i,label:t,disabled:s=false,onCheckedChange:a,...h})=>{let{root:l,control:k$1,icon:o,label:C}=S(),b=useCallback(x=>{a?.(x.checked);},[a]);return jsxs(CheckboxRoot,{className:l({className:i}),disabled:s,onCheckedChange:b,...h,children:[jsxs(CheckboxControl,{className:k$1(),children:[jsx(CheckboxIndicator,{children:jsx(j,{className:o()})}),jsx(CheckboxIndicator,{indeterminate:true,children:jsx(k,{className:o()})})]}),t&&jsx(CheckboxLabel,{className:C(),children:t}),jsx(CheckboxHiddenInput,{})]})};export{F as a,L as b};
1
+ import {j,k}from'./chunk-TPE6CVKA.js';import {CheckboxRoot,CheckboxControl,CheckboxIndicator,CheckboxLabel,CheckboxHiddenInput}from'@ark-ui/react';import {useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var F=[true,"indeterminate",false],S=tv({slots:{root:"group relative flex h-fit w-fit items-center gap-2 transition-all data-disabled:cursor-not-allowed",control:["m-0.5 flex size-4.5 items-center justify-center rounded-sm transition-all ring-inset [&:not([data-disabled])]:cursor-pointer","focus:ring-primary-800 focus:ring-2","data-[state=unchecked]:bg-neutral-50 data-[state=unchecked]:ring-1 data-[state=unchecked]:ring-neutral-600","group-data-[state=unchecked]:group-hover:bg-primary-100 group-data-[state=unchecked]:group-hover:ring-primary-700","data-[state=unchecked]:data-disabled:bg-neutral-100 data-[state=unchecked]:data-disabled:ring-neutral-300","data-[state=checked]:bg-primary-600 data-[state=checked]:data-disabled:bg-neutral-400","data-[state=indeterminate]:bg-primary-600 data-[state=indeterminate]:data-disabled:bg-neutral-400"],icon:"size-3.5 text-neutral-50",label:"font-inter text-sm leading-[142%] text-neutral-900 transition-colors group-data-disabled:text-neutral-500"}}),L=({className:i,label:t,disabled:s=false,onCheckedChange:a,...h})=>{let{root:l,control:k$1,icon:o,label:C}=S(),b=useCallback(x=>{a?.(x.checked);},[a]);return jsxs(CheckboxRoot,{className:l({className:i}),disabled:s,onCheckedChange:b,...h,children:[jsxs(CheckboxControl,{className:k$1(),children:[jsx(CheckboxIndicator,{children:jsx(j,{className:o()})}),jsx(CheckboxIndicator,{indeterminate:true,children:jsx(k,{className:o()})})]}),t&&jsx(CheckboxLabel,{className:C(),children:t}),jsx(CheckboxHiddenInput,{})]})};export{F as a,L as b};
@@ -1 +1 @@
1
- import {d}from'./chunk-AVJ4C64A.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$3}from'./chunk-ZZFG3AKL.js';import {a as a$2}from'./chunk-NSF2YRJD.js';import {c,d as d$1}from'./chunk-AY7M5GEB.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {a}from'./chunk-VOPVBJKL.js';import {a as a$6}from'./chunk-AWRP67K4.js';import {j}from'./chunk-Z6FU5QVL.js';import {e}from'./chunk-5D64Y4FM.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {createListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useState,useCallback,useRef,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function ve(){let s=useComboboxContext(),c=useRef(false);return s.value.length&&s.collection.size&&!c.current&&(s.syncSelectedItems(),c.current=true),null}var Ce=s=>{let{label:c$1,error:C,required:Q,tooltip:X,disabled:m,readOnly:p,options:S,onInputChange:w,onSelect:L,defaultSelectedOptions:a$7,value:d$2,helperText:Y,noResultsLabel:Z,noResultsIcon:$,noResultsDescription:ee,noResultsDescriptionLines:te,noResultsAsColumn:oe,noResultsButtonOnClick:V,noResultsButtonLabel:ne,optionDescriptionLines:k=1,loading:P,clearable:le=true,growable:b=true,className:re,...ie}=s,D=Object.getOwnPropertyNames(s),se=useMemo(()=>({sensitivity:"base"}),[]),{contains:h}=useFilter(se),[g,ae]=useState(""),T=useMemo(()=>createListCollection({items:S,itemToString:e=>e.label,itemToValue:e=>String(e.value)}),[S]),y=useMemo(()=>g?T.filter((e,n,l)=>h(e,g)||!!l.description&&h(l.description,g)):T,[T,g,h]),f=useCallback(e=>{ae(e??"");},[]),x=useRef(a$7??[]),I=useRef(void 0),B=useRef(false),ue=useCallback(e=>{let n=e.items,l=x.current,ce=n.length===0?null:n.find(A=>!l.some(M=>String(M.value)===String(A.value)))??l.find(A=>!n.some(M=>String(M.value)===String(A.value)))??null;x.current=[...n],L?.(ce,n),I.current?.setInputValue(""),f("");},[L,f]),pe=useCallback(e=>{f(e.inputValue),e.reason!==void 0&&w?.(e.inputValue??"");},[f,w]),u=useCombobox({collection:y,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:pe,onValueChange:ue,defaultValue:a$7?.map(e=>String(e.value)),value:D.includes("value")?d$2?.map(e=>String(e.value))??[]:void 0,readOnly:p,disabled:m,...ie});I.current=u,useEffect(()=>{D.includes("value")&&d$2!==void 0&&(x.current=[...d$2]);},[d$2]),useEffect(()=>{P||a$7?.length&&(B.current||(I.current?.setValue(a$7.map(e=>String(e.value))),x.current=[...a$7],B.current=true));},[a$7,P]);let O=c({error:C,disabled:m,readOnly:p,multiline:b});return jsxs(Combobox.RootProvider,{value:u,"data-error":C||void 0,className:O.root({className:re}),children:[jsx(a,{as:Combobox.Label,label:c$1,required:Q,tooltip:X}),jsx(ve,{}),jsxs(Combobox.Control,{className:a$1(O.control(),"group/control",!b&&"overflow-hidden",m&&"cursor-not-allowed"),children:[jsxs("div",{className:a$1("flex flex-1 items-center gap-1 px-3 py-2",b?"flex-wrap py-1.5":"overflow-hidden"),children:[u.selectedItems.map(e=>jsx(d,{color:"neutral",variant:"fill",size:"md",disabled:p||m,onClose:()=>{u.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$1(O.input(),"h-auto px-0 py-0 disabled:cursor-not-allowed"),placeholder:u.selectedItems.length===0?s.placeholder:""})]}),jsxs("div",{className:a$1("flex shrink-0 items-center gap-2 pr-3",b&&"self-start pt-2.5"),children:[!p&&le&&jsx(a$2,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:e=>e.stopPropagation()}),C&&jsx(d$1,{}),jsx(Combobox.Trigger,{className:a$1("group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",p&&"pointer-events-none"),children:jsx(a$3,{})})]})]}),jsx(a$4,{children:Y}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsx(Combobox.ItemGroup,{children:y.items.length>0?y.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:n,disabled:l})=>jsxs("div",{className:a$1("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",l?"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:k?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:k,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$1("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",n?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",l&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(j,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$5,{title:Z,description:ee,Icon:$,iconAsColumn:oe,descriptionLines:te}),V&&jsxs(Fragment,{children:[jsx(a$6,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{u.setOpen(false),V();},children:ne})]})]})})})})})]})};Ce.displayName="AutocompleteMultiple";export{Ce as a};
1
+ import {d}from'./chunk-44FJVOTD.js';import {a as a$5}from'./chunk-FHABUQAH.js';import {a as a$3}from'./chunk-24L2VSWG.js';import {a as a$2}from'./chunk-DESMZNRN.js';import {c,d as d$1}from'./chunk-XZALFC6K.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {a}from'./chunk-XKMQ2LPV.js';import {a as a$6}from'./chunk-AWRP67K4.js';import {j}from'./chunk-TPE6CVKA.js';import {e}from'./chunk-5D64Y4FM.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {createListCollection,useCombobox,Combobox,useComboboxContext}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {useMemo,useState,useCallback,useRef,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function ve(){let s=useComboboxContext(),c=useRef(false);return s.value.length&&s.collection.size&&!c.current&&(s.syncSelectedItems(),c.current=true),null}var Ce=s=>{let{label:c$1,error:C,required:Q,tooltip:X,disabled:m,readOnly:p,options:S,onInputChange:w,onSelect:L,defaultSelectedOptions:a$7,value:d$2,helperText:Y,noResultsLabel:Z,noResultsIcon:$,noResultsDescription:ee,noResultsDescriptionLines:te,noResultsAsColumn:oe,noResultsButtonOnClick:V,noResultsButtonLabel:ne,optionDescriptionLines:k=1,loading:P,clearable:le=true,growable:b=true,className:re,...ie}=s,D=Object.getOwnPropertyNames(s),se=useMemo(()=>({sensitivity:"base"}),[]),{contains:h}=useFilter(se),[g,ae]=useState(""),T=useMemo(()=>createListCollection({items:S,itemToString:e=>e.label,itemToValue:e=>String(e.value)}),[S]),y=useMemo(()=>g?T.filter((e,n,l)=>h(e,g)||!!l.description&&h(l.description,g)):T,[T,g,h]),f=useCallback(e=>{ae(e??"");},[]),x=useRef(a$7??[]),I=useRef(void 0),B=useRef(false),ue=useCallback(e=>{let n=e.items,l=x.current,ce=n.length===0?null:n.find(A=>!l.some(M=>String(M.value)===String(A.value)))??l.find(A=>!n.some(M=>String(M.value)===String(A.value)))??null;x.current=[...n],L?.(ce,n),I.current?.setInputValue(""),f("");},[L,f]),pe=useCallback(e=>{f(e.inputValue),e.reason!==void 0&&w?.(e.inputValue??"");},[f,w]),u=useCombobox({collection:y,multiple:true,inputBehavior:"none",openOnClick:true,onInputValueChange:pe,onValueChange:ue,defaultValue:a$7?.map(e=>String(e.value)),value:D.includes("value")?d$2?.map(e=>String(e.value))??[]:void 0,readOnly:p,disabled:m,...ie});I.current=u,useEffect(()=>{D.includes("value")&&d$2!==void 0&&(x.current=[...d$2]);},[d$2]),useEffect(()=>{P||a$7?.length&&(B.current||(I.current?.setValue(a$7.map(e=>String(e.value))),x.current=[...a$7],B.current=true));},[a$7,P]);let O=c({error:C,disabled:m,readOnly:p,multiline:b});return jsxs(Combobox.RootProvider,{value:u,"data-error":C||void 0,className:O.root({className:re}),children:[jsx(a,{as:Combobox.Label,label:c$1,required:Q,tooltip:X}),jsx(ve,{}),jsxs(Combobox.Control,{className:a$1(O.control(),"group/control",!b&&"overflow-hidden",m&&"cursor-not-allowed"),children:[jsxs("div",{className:a$1("flex flex-1 items-center gap-1 px-3 py-2",b?"flex-wrap py-1.5":"overflow-hidden"),children:[u.selectedItems.map(e=>jsx(d,{color:"neutral",variant:"fill",size:"md",disabled:p||m,onClose:()=>{u.clearValue(String(e.value));},children:e.label},String(e.value))),jsx(Combobox.Input,{className:a$1(O.input(),"h-auto px-0 py-0 disabled:cursor-not-allowed"),placeholder:u.selectedItems.length===0?s.placeholder:""})]}),jsxs("div",{className:a$1("flex shrink-0 items-center gap-2 pr-3",b&&"self-start pt-2.5"),children:[!p&&le&&jsx(a$2,{as:Combobox.ClearTrigger,className:"group-data-disabled/control:hidden",onClick:e=>e.stopPropagation()}),C&&jsx(d$1,{}),jsx(Combobox.Trigger,{className:a$1("group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",p&&"pointer-events-none"),children:jsx(a$3,{})})]})]}),jsx(a$4,{children:Y}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsx(Combobox.Content,{className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:jsx(Combobox.ItemGroup,{children:y.items.length>0?y.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:n,disabled:l})=>jsxs("div",{className:a$1("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",l?"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:k?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:k,WebkitBoxOrient:"vertical"}:void 0,children:e.description})]}),jsx("div",{className:a$1("ml-4 flex size-4.5 shrink-0 items-center justify-center rounded-sm transition-colors ring-inset",n?"bg-primary-600":"bg-neutral-50 ring-1 ring-neutral-600",l&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(j,{className:"size-3.5 text-neutral-50"})})]})})},String(e.value))):jsxs("div",{className:"flex flex-col",children:[jsx(a$5,{title:Z,description:ee,Icon:$,iconAsColumn:oe,descriptionLines:te}),V&&jsxs(Fragment,{children:[jsx(a$6,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{u.setOpen(false),V();},children:ne})]})]})})})})})]})};Ce.displayName="AutocompleteMultiple";export{Ce as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-SD7BX4UU.js';import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var s={md:"h-(--height-input-md)",lg:"h-(--height-input)"},p=({size:i=b,className:r})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",r),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(s[i],"w-full rounded-lg")})]});export{p as a};
1
+ import {b}from'./chunk-RNA2OUHJ.js';import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var s={md:"h-(--height-input-md)",lg:"h-(--height-input)"},p=({size:i=b,className:r})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",r),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(s[i],"w-full rounded-lg")})]});export{p as a};
@@ -1 +1 @@
1
- import {d}from'./chunk-MP4CHZ2K.js';import {a as a$1}from'./chunk-R6NIURLZ.js';import {g}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import*as s from'react';import {Accordion}from'@ark-ui/react/accordion';import*as reactAccordion from'@radix-ui/react-accordion';export{reactAccordion as a };import {jsx,jsxs}from'react/jsx-runtime';var W=["sm","md"],x=s.forwardRef(({className:o,children:r,size:t="md",hasBorder:a$1=false,...c},d)=>jsx(Accordion.Root,{"data-border":a$1,"data-size":t,className:a("group/root space-y-2",o),...c,ref:d,children:r}));x.displayName="Accordion";var h=s.forwardRef(({className:o,...r},t)=>jsx(Accordion.Item,{ref:t,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",o),...r}));h.displayName="AccordionItem";var A=s.forwardRef(({className:o,children:r,...t},a$1)=>jsxs(Accordion.ItemTrigger,{ref:a$1,className:a("group flex w-full flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",o),...t,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]}));A.displayName=Accordion.ItemTrigger.displayName;var I=s.forwardRef(({className:o,title:r,description:t,onEndButtonClick:a$2,StartIcon:c,EndIcon:d$1,children:P,badgeNumber:g$1,chipStatus:p,...v},y)=>jsxs(Accordion.ItemTrigger,{ref:y,className:a("group hover:not-disabled:bg-primary-100 flex w-full flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",!t&&"min-h-12",t&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12",o),...v,children:[jsxs("div",{className:"flex",children:[c&&jsx(c,{className:"mr-2 size-4.5 shrink-0 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:size-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:t})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),d$1&&jsx(d$1,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]}));I.displayName=Accordion.ItemTrigger.displayName;var N=s.forwardRef(({className:o,children:r,...t},a$1)=>jsx(Accordion.ItemContent,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...t,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",o),children:r})}));N.displayName=Accordion.ItemContent.displayName;export{W as b,x as c,h as d,A as e,I as f,N as g};
1
+ import {d}from'./chunk-MP4CHZ2K.js';import {a as a$1}from'./chunk-R6NIURLZ.js';import {g}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import*as s from'react';import {Accordion}from'@ark-ui/react/accordion';import*as reactAccordion from'@radix-ui/react-accordion';export{reactAccordion as a };import {jsx,jsxs}from'react/jsx-runtime';var W=["sm","md"],x=s.forwardRef(({className:o,children:r,size:t="md",hasBorder:a$1=false,...c},d)=>jsx(Accordion.Root,{"data-border":a$1,"data-size":t,className:a("group/root space-y-2",o),...c,ref:d,children:r}));x.displayName="Accordion";var h=s.forwardRef(({className:o,...r},t)=>jsx(Accordion.Item,{ref:t,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",o),...r}));h.displayName="AccordionItem";var A=s.forwardRef(({className:o,children:r,...t},a$1)=>jsxs(Accordion.ItemTrigger,{ref:a$1,className:a("group flex w-full flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",o),...t,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]}));A.displayName=Accordion.ItemTrigger.displayName;var I=s.forwardRef(({className:o,title:r,description:t,onEndButtonClick:a$2,StartIcon:c,EndIcon:d$1,children:P,badgeNumber:g$1,chipStatus:p,...v},y)=>jsxs(Accordion.ItemTrigger,{ref:y,className:a("group hover:not-disabled:bg-primary-100 flex w-full flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",!t&&"min-h-12",t&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12",o),...v,children:[jsxs("div",{className:"flex",children:[c&&jsx(c,{className:"mr-2 size-4.5 shrink-0 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:size-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:t})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),d$1&&jsx(d$1,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]}));I.displayName=Accordion.ItemTrigger.displayName;var N=s.forwardRef(({className:o,children:r,...t},a$1)=>jsx(Accordion.ItemContent,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...t,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",o),children:r})}));N.displayName=Accordion.ItemContent.displayName;export{W as b,x as c,h as d,A as e,I as f,N as g};
@@ -1 +1 @@
1
- import {i,h}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import {DayPicker,UI}from'react-day-picker';import {jsx}from'react/jsx-runtime';var p=({classNames:t,...d})=>jsx(DayPicker,{classNames:{[UI.Dropdowns]:a("flex",t?.dropdowns),[UI.Months]:a("flex flex-col relative",t?.months),[UI.Month]:a("overflow-hidden w-full rounded-[1.75rem] px-3 pb-7 bg-neutral-100",t?.month),[UI.MonthGrid]:a("w-full",t?.month_grid),[UI.MonthCaption]:a("flex ml-4 h-8 justify-between items-center my-1.5",t?.month_caption),[UI.Nav]:a("flex absolute right-0 top-1.5",t?.nav),[UI.PreviousMonthButton]:a("m-1.75",t?.button_previous),[UI.NextMonthButton]:a("m-1.75",t?.button_next),caption_label:a("capitalize text-sm font-semibold text-neutral-700",t?.caption_label),[UI.Weekdays]:a("flex",t?.weekdays),[UI.Weekday]:a("capitalize text-neutral-700 w-[14.3%] aspect-square font-normal flex justify-center items-center",t?.weekday),[UI.Week]:a("flex w-full text-neutral-700",t?.week),[UI.Day]:a(" w-[14.3%] aspect-square data-[outside=true]:text-neutral-500 hover:bg-neutral-200 h-full ring-inset rounded-full hover:cursor-pointer flex justify-center items-center text-small",t?.day),[UI.DayButton]:a("w-full h-full",t?.day_button),range_end:"day-range-end",today:a("ring-1 ring-primary-500 hover:bg-primary-100 hover:ring-0 text-primary-500",t?.today),selected:a("bg-primary-500 text-neutral-50! hover:text-primary-500! hover:bg-primary-200",t?.selected),disabled:a("text-neutral-500 hover:bg-opacity-0",t?.disabled),hidden:a("hidden",t?.hidden)},formatters:{formatWeekdayName:(r,a)=>a?.locale?.localize.day(r.getDay(),{width:"narrow"})??""},components:{Chevron:r=>r.orientation==="left"?jsx(i,{size:18,...r}):jsx(h,{size:18,...r})},showOutsideDays:true,mode:"single",...d});p.displayName="Calendar_old";export{p as a};
1
+ import {i,h}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import {DayPicker,UI}from'react-day-picker';import {jsx}from'react/jsx-runtime';var p=({classNames:t,...d})=>jsx(DayPicker,{classNames:{[UI.Dropdowns]:a("flex",t?.dropdowns),[UI.Months]:a("flex flex-col relative",t?.months),[UI.Month]:a("overflow-hidden w-full rounded-[1.75rem] px-3 pb-7 bg-neutral-100",t?.month),[UI.MonthGrid]:a("w-full",t?.month_grid),[UI.MonthCaption]:a("flex ml-4 h-8 justify-between items-center my-1.5",t?.month_caption),[UI.Nav]:a("flex absolute right-0 top-1.5",t?.nav),[UI.PreviousMonthButton]:a("m-1.75",t?.button_previous),[UI.NextMonthButton]:a("m-1.75",t?.button_next),caption_label:a("capitalize text-sm font-semibold text-neutral-700",t?.caption_label),[UI.Weekdays]:a("flex",t?.weekdays),[UI.Weekday]:a("capitalize text-neutral-700 w-[14.3%] aspect-square font-normal flex justify-center items-center",t?.weekday),[UI.Week]:a("flex w-full text-neutral-700",t?.week),[UI.Day]:a(" w-[14.3%] aspect-square data-[outside=true]:text-neutral-500 hover:bg-neutral-200 h-full ring-inset rounded-full hover:cursor-pointer flex justify-center items-center text-small",t?.day),[UI.DayButton]:a("w-full h-full",t?.day_button),range_end:"day-range-end",today:a("ring-1 ring-primary-500 hover:bg-primary-100 hover:ring-0 text-primary-500",t?.today),selected:a("bg-primary-500 text-neutral-50! hover:text-primary-500! hover:bg-primary-200",t?.selected),disabled:a("text-neutral-500 hover:bg-opacity-0",t?.disabled),hidden:a("hidden",t?.hidden)},formatters:{formatWeekdayName:(r,a)=>a?.locale?.localize.day(r.getDay(),{width:"narrow"})??""},components:{Chevron:r=>r.orientation==="left"?jsx(i,{size:18,...r}):jsx(h,{size:18,...r})},showOutsideDays:true,mode:"single",...d});p.displayName="Calendar_old";export{p as a};
@@ -1 +1 @@
1
- import {e as e$2}from'./chunk-PI7DECIN.js';import {e,c,b,f,d}from'./chunk-Z6FU5QVL.js';import {e as e$1}from'./chunk-5D64Y4FM.js';import {a}from'./chunk-OBZIYJO7.js';import {useState,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),S={warning:f,success:b,error:c,info:e},O=({variant:r="info",className:p,description:t,title:d$1,hasCloseButton:a$1=true,actionButton:n})=>{let[x,N]=useState(true),{container:v,icon:h,closeIcon:C,title:I,description:y}=w({variant:r,hasCloseButton:a$1}),b=useCallback(()=>{N(false);},[]),M=S[r||"info"];return jsxs("div",{role:"alert",className:a(v(),p,!x&&"hidden"),children:[jsxs("div",{className:"flex flex-1",children:[jsx(M,{className:h({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxs("div",{className:"flex flex-col",children:[jsx("h6",{className:I({className:t&&"font-semibold"}),children:d$1}),t&&jsx("p",{className:y(),children:t})]})]}),n&&jsx(e$1,{...n,variant:"secondary",tone:"neutral",className:a("my-auto ml-4.5",n.className),size:"lg"}),a$1&&jsx(e$2,{Icon:d,className:C(),size:"sm",variant:"ghost",tone:"neutral",onClick:b,"aria-label":"Close alert"})]})};export{O as a};
1
+ import {e as e$2}from'./chunk-PI7DECIN.js';import {e,c,b,f,d}from'./chunk-TPE6CVKA.js';import {e as e$1}from'./chunk-5D64Y4FM.js';import {a}from'./chunk-OBZIYJO7.js';import {useState,useCallback}from'react';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var w=tv({slots:{container:"flex shrink-0 rounded-lg p-3 pr-2 ring ring-inset",icon:"mr-3 size-6 shrink-0",closeIcon:"ml-3 shrink-0",title:"font-inter my-auto text-sm leading-[143%] text-neutral-900",description:"font-inter mt-1 line-clamp-3 text-xs leading-[130%] text-neutral-900"},variants:{hasCloseButton:{true:{}},variant:{warning:{container:"bg-warning-100 ring-warning-600",icon:"text-warning-800"},success:{container:"bg-success-100 ring-success-600",icon:"text-success-800"},error:{container:"bg-danger-100 ring-danger-600",icon:"text-danger-800"},info:{container:"bg-info-100 ring-info-600",icon:"text-info-800"}}},defaultVariants:{variant:"info",size:"md",hasCloseButton:true}}),S={warning:f,success:b,error:c,info:e},O=({variant:r="info",className:p,description:t,title:d$1,hasCloseButton:a$1=true,actionButton:n})=>{let[x,N]=useState(true),{container:v,icon:h,closeIcon:C,title:I,description:y}=w({variant:r,hasCloseButton:a$1}),b=useCallback(()=>{N(false);},[]),M=S[r||"info"];return jsxs("div",{role:"alert",className:a(v(),p,!x&&"hidden"),children:[jsxs("div",{className:"flex flex-1",children:[jsx(M,{className:h({className:!t&&"my-auto"}),"aria-hidden":"true"}),jsxs("div",{className:"flex flex-col",children:[jsx("h6",{className:I({className:t&&"font-semibold"}),children:d$1}),t&&jsx("p",{className:y(),children:t})]})]}),n&&jsx(e$1,{...n,variant:"secondary",tone:"neutral",className:a("my-auto ml-4.5",n.className),size:"lg"}),a$1&&jsx(e$2,{Icon:d,className:C(),size:"sm",variant:"ghost",tone:"neutral",onClick:b,"aria-label":"Close alert"})]})};export{O as a};
@@ -0,0 +1 @@
1
+ import {a as a$b}from'./chunk-UMYKFNLR.js';import {b as b$2}from'./chunk-T3FB2JLM.js';import {c as c$2,j as j$1}from'./chunk-3X2MEX7P.js';import {a as a$9,b as b$3,c as c$4}from'./chunk-GTVHYHF4.js';import {a as a$d}from'./chunk-GFVJRSZI.js';import {a as a$4}from'./chunk-WIITAOD5.js';import {b}from'./chunk-5RKO7FZ7.js';import {c as c$5}from'./chunk-JYNJHAGL.js';import {a as a$c}from'./chunk-UIZFLYFP.js';import {a as a$a}from'./chunk-UB5XJQF2.js';import {a as a$6,b as b$1,c as c$3,d as d$3}from'./chunk-U4NJK7JM.js';import {d as d$5}from'./chunk-MP4CHZ2K.js';import {a as a$3}from'./chunk-R6NIURLZ.js';import {e as e$1}from'./chunk-PI7DECIN.js';import {d as d$2}from'./chunk-44FJVOTD.js';import {a}from'./chunk-FHABUQAH.js';import {a as a$5}from'./chunk-DESMZNRN.js';import {d,c as c$1}from'./chunk-XZALFC6K.js';import {a as a$8}from'./chunk-VIMWKUML.js';import {a as a$7}from'./chunk-XKMQ2LPV.js';import {a as a$1}from'./chunk-AWRP67K4.js';import {c,d as d$4,p,j,I,s,t,h,g}from'./chunk-TPE6CVKA.js';import {e,d as d$1}from'./chunk-5D64Y4FM.js';import {c as c$6}from'./chunk-C7TLKKPT.js';import {a as a$e}from'./chunk-P6B33GL6.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import*as _ from'react';import ___default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as oo 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 Zn from'react-phone-number-input/flags';import {getDefaultOptions}from'date-fns';import rr from'react-phone-number-input/locale/en.json';import ir from'react-phone-number-input/locale/es.json';import lr 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 as cn$1}from'tailwind-variants';import Bl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import Rl from'libphonenumber-js/mobile/examples';var fn=___default.memo(({handleSelect:e$1,NoResultsIcon:o,noResultsLabel:t,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:i,noResultsButtonOnClick:l,optionDescriptionLines:s,noResultsButtonLabel:p,filteredOptions:m,inputRect:a$3,inputRef:C,popoverPosition:b,optionsListRef:d,selectedOption:h,options:x,setFilteredOptions:v})=>jsx(oo.Root,{asChild:true,children:jsxs("div",{ref:d,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:a$3?{width:`${a$3.width}px`,left:a$3.left,top:b==="bottom"?`${a$3.bottom}px`:void 0,bottom:b==="top"?`${window.innerHeight-a$3.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(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{d.current.style.display="none",C.current.value="",v(x),l();},children:p})]})]}),m.map(I=>jsx(ce,{title:I.label,disabled:I.disabled,description:I.description,descriptionLines:s,onClick:()=>e$1(I),className:a$2(h?.value===I.value&&"bg-primary-200")},I.key??I.value))]})})),no=fn;var hn=336,is=({options:e,defaultSelectedOption:o,onSelect:t,onClick:n,onInputChange:r,error:i,helperText:l,label:s,placeholder:p,value:m,size:a="md",optionDescriptionLines:C=1,noResultsLabel:b,noResultsIcon:d,noResultsDescription:h,noResultsDescriptionLines:x,noResultsAsColumn:v,noResultsButtonOnClick:I,noResultsButtonLabel:M,className:y,disabled:R})=>{let[g,T]=useState(o??null),E=useRef(null),L=useRef(null),[O,k]=useState(),[V,S]=useState([]),[c,u]=useState("bottom"),[P,D]=useState(),H=hn,G=useCallback(F=>{E.current.style.display="none",L.current.value=F.label,T(F),t?.(F);},[t]),z=useCallback(()=>{if(!L?.current)return;let F=L.current.getBoundingClientRect();k(F);let X=P?P.height:H,Y=window.innerHeight-F.bottom>X,Fe=F.top>X;u(Y?"bottom":Fe?"top":"bottom");},[P?.height]),le=useCallback(()=>{let F=e.filter(X=>X.label.toLowerCase().includes(L?.current?.value.toLowerCase()??""));if(S(F),E?.current){let X=E.current.getBoundingClientRect();D(X);}},[e]);return useEffect(()=>{S(e);},[e]),useEffect(()=>{if(!m){T(null),L.current&&(L.current.value="");return}(!L.current?.value||g?.value!==m.value)&&(T(m),L.current.value=m.label);},[m]),a$d(E,()=>{E.current.style.display="none",g&&L.current&&(L.current.value=g.label);}),useEffect(()=>{if(L?.current)return z(),L.current.addEventListener("mousedown",z),L.current.addEventListener("input",le),window.addEventListener("scroll",z,true),window.addEventListener("resize",z),()=>{L.current?.removeEventListener("mousedown",z),L.current?.removeEventListener("input",le),window.removeEventListener("scroll",z,true),window.removeEventListener("resize",z);}},[z,le]),jsxs("div",{className:a$2("relative",y),children:[jsx(a$4,{ref:L,autoComplete:"off",list:"",selectMode:true,onChange:F=>{F.target.value||(T(null),t?.(null)),r?.(F);},onClean:()=>{T(null),S(e),t?.(null);},onClick:F=>{E.current.style.display="flex",n?.(F);},onBlur:()=>{g&&L.current&&(L.current.value=g.label);},label:s,helperText:l,placeholder:p,size:a,error:i,disabled:R}),jsx(no,{handleSelect:G,noResultsLabel:b,NoResultsIcon:d,optionDescriptionLines:C,noResultsAsColumn:v,noResultsButtonLabel:M,noResultsButtonOnClick:I,noResultsDescription:h,noResultsDescriptionLines:x,filteredOptions:V,inputRect:O,inputRef:L,popoverPosition:c,optionsListRef:E,selectedOption:g,options:e,setFilteredOptions:S})]})};var Cn=({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})]}),pe=Cn;var ce=({children:e,title:o,titleLines:t,description:n="",descriptionLines:r,startIcon:i,endIcon:l,hasDivider:s=false,disabled:p=false,isSelected:m=false,className:a,...C})=>jsxs(ee,{hasDescription:!!n,disabled:p,hasDivider:s,className:a,isSelected:m,...C,children:[i&&___default.cloneElement(i,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(pe,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:p}),l&&___default.cloneElement(l,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});var co=({children:e,title:o,titleLines:t=1,description:n="",descriptionLines:r,startIcon:i,hasDivider:l=false,disabled:s=false,checked:p,onCheckedChange:m,className:a,...C})=>jsxs(ee,{hasDescription:!!n,disabled:s,hasDivider:l,...C,className:a$2("pr-6",a),children:[i&&___default.cloneElement(i,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(pe,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:s}),jsx(b,{checked:p,onCheckedChange:m,className:"ml-4 self-center",disabled:s})]});var ne=336,uo=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(uo);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},mo=({children:e})=>{let o=useRef(null),t=useRef(null),n=useId(),[r,i]=useState(),[l,s]=useState(true),[p,m]=useState([]),[a,C]=useState(-1),[b,d]=useState("bottom"),[h,x]=useState(),[v,I]=useState(ne);return jsx(uo.Provider,{value:{optionsListRef:o,inputRef:t,autocompleteId:n,inputRect:r,showChips:l,filteredOptions:p,currentFocus:a,popoverPosition:b,setFilteredOptions:m,setCurrentFocus:C,setShowChips:s,setPopoverPosition:d,setInputRect:i,optionsListHeight:v,optionsListRect:h,setOptionsListRect:x,setOptionsListHeight:I},children:e})};var An=({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})},fo=An;var Sn=150,Hn=___default.memo(({selectedOptions:e,error:o,onCleanSelectedOptions:t,disabled:n,size:r})=>{let{autocompleteId:i,inputRect:l,inputRef:s,optionsListRef:p}=te(),m=___default.useRef(null),[a,C]=___default.useState(new Map),b=useMemo(()=>{if(!l?.width)return [];let h=0,x=l.width-Sn,v=0;for(let I=0;I<e.length&&(v+=a.get(I)??0,!(v>x));I++)h++;return e.slice(0,h)},[l?.width,e,a]),d=useCallback(()=>{n||(s?.current?.focus(),p.current.style.display="flex");},[n]);return jsxs("div",{onClick:d,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((h,x)=>jsx(fo,{option:h,onMountWidth:v=>C(I=>new Map(I).set(x,v))},`chip-input-${i}-${h.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:h=>{h.stopPropagation(),t();}})]})}),bo=Hn;var Bn=___default.memo(({option:e,index:o,onPressOption:t,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:i,inputRef:l}=te();return jsx(co,{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})}),mt=Bn;var $n=___default.memo(({selectedOptions:e$1,handleSelect:o,NoResultsIcon:t,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:i,noResultsAsColumn:l,noResultsButtonOnClick:s,optionDescriptionLines:p,noResultsButtonLabel:m})=>{let{popoverPosition:a$2,optionsListRef:C,filteredOptions:b,inputRect:d,autocompleteId:h,inputRef:x,optionsListHeight:v}=te(),I=useCallback(y=>e$1.some(R=>R.value===y.value),[e$1]),M=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(x?.current?.value.toLowerCase()??"")),[e$1,x?.current?.value]);return jsx(oo.Root,{asChild:true,children:jsxs("div",{ref:C,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:d?{width:`${d.width}px`,left:d.left,top:a$2==="bottom"?`${d.bottom}px`:void 0,bottom:a$2==="top"?`${window.innerHeight-d.top}px`:void 0,maxHeight:v+"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(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{C.current.style.display="none",x.current.value="",s();},children:m})]})]}),M.map((y,R)=>jsx(mt,{option:y,index:R,onPressOption:g=>o(g),isSelected:I(y),optionDescriptionLines:p},`autocomplete-option-${h}-${y.key??y.value}`)),b.map((y,R)=>!e$1.some(g=>g.value===y.value)&&jsx(mt,{option:y,index:R,onPressOption:g=>o(g),isSelected:I(y),optionDescriptionLines:p},`autocomplete-option-${h}-${y.key??y.value}`))]})})}),go=$n;var Gn=___default.memo(({selectedOptions:e,onSelect:o,error:t,helperText:n,label:r,placeholder:i,options:l,onInputChange:s,size:p,disabled:m})=>{let{setCurrentFocus:a,setFilteredOptions:C,optionsListRef:b,inputRef:d}=te();return jsx(a$4,{ref:d,autoComplete:"off",list:"",disabled:m,selectMode:true,onChange:h=>{a(-1),s?.(h.target.value);},onClean:()=>{a(-1),C(l),o?.(null,e);},onClick:()=>{m||(b.current.style.display="flex");},error:t,helperText:n,label:r,placeholder:i,fixedTopLabel:e.length>0,size:p})}),Co=Gn;var xo=({options:e,defaultSelectedOptions:o,onSelect:t,error:n,helperText:r,label:i,placeholder:l,noResultsLabel:s,noResultsIcon:p,noResultsDescription:m,noResultsDescriptionLines:a,noResultsAsColumn:C,noResultsButtonOnClick:b,noResultsButtonLabel:d,className:h,onInputChange:x,value:v,loading:I,size:M="md",optionDescriptionLines:y=1,disabled:R})=>{let{inputRef:g,optionsListRef:T,setFilteredOptions:E,setShowChips:L,setInputRect:O,setPopoverPosition:k,setCurrentFocus:V,showChips:S,setOptionsListRect:c,optionsListRect:u,setOptionsListHeight:P}=te(),D=useRef(false),[H,G]=useState(o??[]),z=useCallback(K=>{G(Z=>{let se,Pe=Z.findIndex(mn=>mn.value===K.value);return Pe===-1?(se=Z.concat(K),t?.(K,se),se):(se=Z.toSpliced(Pe,1),t?.(K,se),se)});},[t]),le=useCallback(()=>{G([]),E(e),t?.(null,[]);},[]),F=useCallback(()=>{L(false);},[]),X=useCallback(()=>{L(true);},[]),Y=useCallback(()=>{if(!g?.current)return;let K=g.current.getBoundingClientRect();O(K);let Z=u?u.height>ne?ne:u.height:ne,se=window.innerHeight-K.bottom>Z,Pe=K.top>Z;k(se?"bottom":Pe?"top":"bottom"),P(Pe?ne:window.innerHeight-K.bottom>ne?ne:window.innerHeight-K.bottom);},[u?.height]),Fe=useCallback(()=>{let K=e.filter(Z=>Z.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(E(K),T?.current){let Z=T.current.getBoundingClientRect();c(Z);}},[e,T?.current]);return useEffect(()=>{E(e);},[e]),a$d(T,()=>{T.current.style.display="none",V(-1);}),useEffect(()=>{if(g?.current)return Y(),g.current.addEventListener("mousedown",Y),g.current.addEventListener("input",Fe),g.current.addEventListener("focusin",F),g.current.addEventListener("focusout",X),window.addEventListener("scroll",Y,true),window.addEventListener("resize",Y),()=>{g.current?.removeEventListener("mousedown",Y),g.current?.removeEventListener("input",Y),g.current?.removeEventListener("focusout",X),g.current?.removeEventListener("focusin",F),window.removeEventListener("scroll",Y,true),window.removeEventListener("resize",Y);}},[Y,X,F,Fe]),useEffect(()=>{v&&(G(v),L(true));},[v]),useEffect(()=>{I||o&&o.length&&!D.current&&(G(o),D.current=true,L(true));},[o,I]),jsxs("div",{className:a$2("relative",h),children:[jsx(Co,{selectedOptions:H,onSelect:t,error:n,helperText:r,label:i,placeholder:l,handleSelect:z,options:e,onInputChange:x,size:M,disabled:R}),S&&jsx(bo,{selectedOptions:H,disabled:R,error:n,onCleanSelectedOptions:le,size:M}),jsx(go,{handleSelect:z,selectedOptions:H,noResultsLabel:s,NoResultsIcon:p,optionDescriptionLines:y,noResultsAsColumn:C,noResultsButtonLabel:d,noResultsButtonOnClick:b,noResultsDescription:m,noResultsDescriptionLines:a})]})};var Ma=e=>jsx(mo,{children:jsx(xo,{...e})});var tt=({children:e,className:o,disabled:t,error:n,helperText:r,htmlFor:i,label:l,readOnly:s,required:p,tooltip:m})=>{let{root:a}=c$1({error:n,disabled:t,readOnly:s});return jsxs("div",{className:a({className:o}),"data-error":n||void 0,"data-disabled":t||void 0,"data-readonly":s||void 0,children:[l&&jsx(a$7,{as:"label",htmlFor:i,label:l,required:p,tooltip:m}),e,jsx(a$8,{children:r})]})};var bt=({className:e,country:o,countryName:t})=>{let n=Zn[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 or=({code:e,codeClassName:o,label:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(bt,{country:e,countryName:t}),jsx("span",{className:a$2("text-sm leading-[143%] font-medium text-neutral-800",o),children:e})]}),Io=({className:e,disabled:o,error:t,onChange:n,onOpenChange:r,options:i,readOnly:l,translations:s,value:p$1})=>{let m=_.useRef(null),[a,C]=_.useState(""),[b,d]=_.useState(false),{wrapper:h,input:x,clearIcon:v,searchIcon:I}=b$2({size:"md"}),{contains:M}=useFilter({sensitivity:"base"}),y=_.useMemo(()=>i.map(c=>({...c,key:c.code})),[i]),R=_.useMemo(()=>y.find(c=>c.key===p$1),[y,p$1]),{collection:g,filter:T,set:E}=useListCollection({initialItems:y,itemToString:c=>`${c.label} ${c.code}`,itemToValue:c=>c.key,filter:(c,u,P)=>M(c,u)||M(P.code,u.toUpperCase())});_.useEffect(()=>{E(y);},[y,E]);let L=_.useCallback(c=>{d(c),r?.(c);},[r]),O=_.useCallback(({inputValue:c})=>{let u=c??"";C(u),T(u),m.current?.scrollTo({top:0});},[T]),k=_.useCallback(c=>{L(c),c&&(C(""),T(""));},[T,L]),V=_.useCallback(({itemValue:c})=>{if(!c)return;let u=y.find(P=>P.key===c)?.code;u&&(n(u),L(false));},[y,L,n]),S=useCombobox({collection:g,inputBehavior:"autohighlight",inputValue:a,open:b,openOnChange:false,openOnClick:false,selectionBehavior:"preserve",value:R?[R.key]:[],onInputValueChange:O,onOpenChange:({open:c})=>{c||L(false);},onSelect:V});return jsx(Combobox.RootProvider,{value:S,children:jsxs(a$9,{open:b,onOpenChange:k,children:[jsx(b$3,{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:R&&jsx(or,{code:R.code,label:R.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:h({className:"m-1 mb-0"}),children:[jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:s.searchCountryPlaceholder,className:x()}),!o&&a.length>0&&jsx("button",{type:"button",className:v(),onClick:()=>{S.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:a$2("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":g.items.length===0}),children:g.items.length===0?jsx(a$a,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:g.items.map(c=>jsxs(Combobox.Item,{item:c,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(bt,{country:c.code,countryName:c.label}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:c.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:c.code}),jsx(j,{className:a$2("ml-auto size-4 shrink-0",c.key===p$1?"opacity-100":"opacity-0")})]},c.key))})})]})})]})})};var gt=_.forwardRef(({className:e,clearLabel:o,disabled:t,error:n,onChange:r,readOnly:i,type:l="text",value:s,...p},m)=>{let a=_.useRef(null),C=`${s??""}`.length>0,b=!t&&!i&&C,d$1=b||n;_.useImperativeHandle(m,()=>a.current,[]);let h=_.useCallback(v=>{r?.(v.target.value);},[r]),x=_.useCallback(()=>{r?.(""),a.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",d$1&&!n&&"pr-10.5",b&&n&&"pr-14",n&&!b&&"pr-10.5",t&&"text-input-text-disabled",e),...p,disabled:t,readOnly:i,value:s,onChange:h,ref:a}),(b||n)&&jsxs("div",{className:"absolute inset-y-0 right-3 z-10 flex items-center gap-1",children:[b&&jsx(a$5,{ariaLabel:o,onClick:x}),n&&jsx(d,{})]})]})});gt.displayName="IdInput";var Ct={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},To={en:rr,es:ir,pt:lr},sr=Ct.en,ar=To.en,cr={es:{clearIdLabel:Ct.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:Ct.pt,searchCountryPlaceholder:"Pesquisar..."}},pr={clearIdLabel:sr,searchCountryPlaceholder:"Search..."},Po=()=>getDefaultOptions().locale?.code,No=e=>cr[e]??pr,ur=(e,o)=>(To[o]??ar)[e]??e,Mo=({localeCode:e})=>c$2.map(o=>({code:o,label:ur(o,e)})).sort((o,t)=>o.label.localeCompare(t.label)),Eo=a$6,Ao=b$1,Oo=(e,o)=>{let t=o.trim();return !t||!c$3(e,t).isValid?t:d$3(e,t)};var ko=()=>{},wo=_.forwardRef(({autoComplete:e,className:o,country:t,disabled:n,error:r,helperText:i,id:l,label:s,name:p,onBlur:m,onChange:a=ko,onCountryChange:C=ko,placeholder:b,readOnly:d,required:h,tooltip:x,value:v},I)=>{let[M,y]=_.useState(false),[R,g]=_.useState(v??""),T=_.useId(),E=l??T,L=Po(),O=_.useRef(v??"");_.useEffect(()=>{(v??"")!==O.current&&g(v??"");},[v]);let k=_.useMemo(()=>No(L),[L]),V=_.useMemo(()=>Mo({localeCode:L}),[L]),S=_.useMemo(()=>Ao(t??"")||b||Eo,[t,b]),c=c$1({error:r,disabled:n,readOnly:d}),u=_.useCallback((H,G)=>{let z=Oo(H,G);O.current=z,a(z);},[a]),P=_.useCallback(H=>{g(H),u(t??"",H);},[t,u]),D=_.useCallback(H=>{C(H),u(H,R);},[R,C,u]);return jsx(tt,{disabled:n,error:r,helperText:i,htmlFor:E,label:s,readOnly:d,required:h,tooltip:x,children:jsxs("div",{className:a$2(c.control(),"group/id-field",!r&&!n&&!d&&M&&"after:ring-input-ring-focus after:ring-2",o),children:[jsx(Io,{disabled:n,error:r,onChange:D,onOpenChange:y,options:V,readOnly:d,translations:k,value:t}),jsx(gt,{autoComplete:e,clearLabel:k.clearIdLabel,disabled:n,error:r,id:E,name:p,onBlur:m,onChange:P,placeholder:S,readOnly:d,required:h,value:R,ref:I})]})})});wo.displayName="IdField";var Tc=({children:e$2,title:o,titleLines:t=1,description:n,descriptionLines:r=1,StartIcon:i,hasDivider:l=false,disabled:s=false,actionButton:p,isSelected:m=false,className:a,...C})=>jsxs(ee,{hasDescription:!!n,disabled:s,hasDivider:l,isSelected:m,...C,className:a,children:[i&&jsx(i,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(pe,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:s}),p&&jsx(Fragment,{children:p.isIcon?jsx(e$1,{...p,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??p.disabled}):jsx(e,{...p,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??p.disabled})})]});var Fc=({title:e,description:o="",descriptionLines:t,hasDivider:n=false,disabled:r=false,checked:i,onCheckedChange:l,className:s,chipStatus:p,chipExpandable:m,...a})=>jsxs(ee,{hasDescription:!!o,disabled:r,hasDivider:n,...a,className:a$2("pr-6",s),children:[jsx(b,{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})}),p&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$5,{...p,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"},Lt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var It=({readOnly:e})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.setEditable(!e);},[o,e]),null};var Rt=({editorRef:e})=>{let[o]=useLexicalComposerContext();return useEffect(()=>(e.current=o,()=>{e.current===o&&(e.current=null);}),[o,e]),null};var xr={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},vr={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},yr=()=>typeof window<"u"&&typeof window.DOMParser<"u",So=e=>yr()?new DOMParser().parseFromString(e,"text/html"):null,Lr=e=>(e??"").replace(/\s+/g," ").trim(),Pt=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},Ir=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=xr[n];r&&(r!=="left"&&(t.style.textAlign=r),t.classList.remove(n));}},Rr=e=>{let o=e.querySelectorAll("[class*='ql-indent-']");for(let t of Array.from(o)){if(t.tagName==="LI")continue;let n=Pt(t);n>0&&(t.style.paddingInlineStart=`${n*3}em`);}},Tr=(e,o)=>{let t=e.getAttribute("data-list");return t==="bullet"?"ul":t==="ordered"?"ol":o},Pr=e=>{let o=e.cloneNode(true);return o.removeAttribute("data-list"),o.removeAttribute("data-checked"),o.removeAttribute("data-indent"),Pt(o),o},Tt=(e,o)=>e.createElement(o),Nr=(e,o)=>{let t=Array.from(e.children).filter(p=>p.tagName==="LI");if(t.length===0||!t.some(p=>p.hasAttribute("data-list")?true:Array.from(p.classList).some(m=>/^ql-indent-\d+$/.test(m))))return;let r=[],i=[],l=e.tagName==="UL"?"ul":"ol";for(let p of t){let m=Pt(p),a=Tr(p,l),C=Pr(p);for(;i.length>0&&i[i.length-1].level>m;)i.pop();if(i.length===0){let d=Tt(o,a);r.push(d),i.push({level:0,kind:a,listElement:d});}let b=i[i.length-1];for(;b.level<m;){let d=b.listElement.lastElementChild;if(!d||d.tagName!=="LI")break;let h=Tt(o,a);d.appendChild(h),b={level:b.level+1,kind:a,listElement:h},i.push(b);}if(b=i[i.length-1],b.kind!==a){let d=Tt(o,a);if(i.length===1)r.push(d),i[0]={level:0,kind:a,listElement:d};else {let x=i[i.length-2].listElement.lastElementChild;x&&x.tagName==="LI"?(x.appendChild(d),i[i.length-1]={level:b.level,kind:a,listElement:d}):(r.push(d),i.length=1,i[0]={level:0,kind:a,listElement:d});}b=i[i.length-1];}b.listElement.appendChild(C);}if(r.length===0)return;let s=o.createDocumentFragment();for(let p of r)s.appendChild(p);e.replaceWith(s);},Mr=(e,o)=>{let t=Array.from(e.querySelectorAll("ol, ul"));for(let n of t)Nr(n,o);},Ho=(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)Ho(l,o+1);}},Er=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=vr[r];i&&n.classList.add(i);}},xe=e=>Lr(e).replace(/>\s+</g,"><").replace(/&nbsp;/g," "),Nt=e=>{let o=e??"";if(!o.trim())return "";let t=So(o);if(!t)return o;let{body:n}=t;return Ir(n),Rr(n),Mr(n,t),n.innerHTML},Mt=e=>{if(!e.trim())return "";let o=So(e);if(!o)return e;let{body:t}=o,n=Array.from(t.querySelectorAll("ul, ol"));for(let r of n)Ho(r,0);return Er(t),t.innerHTML};var ot=e=>{let o="";return e.getEditorState().read(()=>{o=$generateHtmlFromNodes(e,null);}),Mt(o)},Dr=(e,o)=>{let t=Nt(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);});},Et=({value:e,isSyncingRef:o})=>{let[t]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&xe(r)===xe(n.current))return;let i=ot(t);xe(i)!==xe(r)&&(o.current=true,Dr(t,r),queueMicrotask(()=>{o.current=false;})),n.current=r;},[t,o,e]),null};var Do=["left","center","right","justify"];var Bo=["bold","italic","underline","strikethrough","code"];var xi={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},vi={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},yi={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},we={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:"</>"})},Se={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Li=e=>{let o=e.textFormat;return o===false?[]:Array.isArray(o)?Bo.filter(t=>o.includes(t)):["bold","italic","underline"]},Ii=e=>{let o=e.alignment;return o===false?[]:Array.isArray(o)?Do.filter(t=>o.includes(t)):["left","center","right","justify"]},Ri=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()}))]},He=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),Q=({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}),kt=({config:e,className:o})=>{let[t]=useLexicalComposerContext(),n=useId(),[r,i]=useState(false),[l,s]=useState(false),[p,m]=useState(false),[a,C]=useState(false),[b,d]=useState(false),[h,x]=useState(false),[v,I]=useState(false),[M,y]=useState("paragraph"),[R,g]=useState("left"),T=useMemo(()=>Li(e),[e]),E=useMemo(()=>Ii(e),[e]),L=useMemo(()=>Ri(e),[e]),O=useCallback(()=>{let c=$getSelection();if(!$isRangeSelection(c))return;m(c.hasFormat("bold")),C(c.hasFormat("italic")),d(c.hasFormat("underline")),x(c.hasFormat("strikethrough")),I(c.hasFormat("code"));let u=c.anchor.getNode(),P=u.getKey()==="root"?u:u.getTopLevelElementOrThrow();if($isListNode(P))y(P.getListType()==="number"?"ol":"ul");else {let H=$findMatchingParent(P,G=>$isListNode(G));$isListNode(H)?y(H.getListType()==="number"?"ol":"ul"):y($isHeadingNode(P)?P.getTag():P.getType());}let D=$isElementNode(P)?P.getFormatType():"";g(D==="center"||D==="right"||D==="justify"?D:"left");},[]);useEffect(()=>mergeRegister(t.registerUpdateListener(({editorState:c})=>{c.read(()=>{O();});}),t.registerCommand(SELECTION_CHANGE_COMMAND,()=>(O(),false),1),t.registerCommand(CAN_UNDO_COMMAND,c=>(i(c),false),1),t.registerCommand(CAN_REDO_COMMAND,c=>(s(c),false),1)),[t,O]);let k=c=>{t.dispatchCommand(FORMAT_TEXT_COMMAND,xi[c]);},V=c=>{t.update(()=>{let u=$getSelection();if($isRangeSelection(u)){if(c==="paragraph"){$setBlocksType(u,()=>$createParagraphNode());return}$setBlocksType(u,()=>$createHeadingNode(c));}});},S=c=>{if(M===(c==="bullet"?"ul":"ol")){t.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}t.dispatchCommand(c==="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(Q,{label:"Undo",onClick:()=>t.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(Q,{label:"Redo",onClick:()=>t.dispatchCommand(REDO_COMMAND,void 0),disabled:!l,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(He,{})]}),L.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:M.startsWith("h")?M:"paragraph",onChange:c=>V(c.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:L.map(c=>jsx("option",{value:c.value,children:c.label},c.value))}),jsx(He,{})]}),T.length>0&&jsxs(Fragment,{children:[T.includes("bold")&&jsx(Q,{label:Se.bold,onClick:()=>k("bold"),icon:we.bold,active:p}),T.includes("italic")&&jsx(Q,{label:Se.italic,onClick:()=>k("italic"),icon:we.italic,active:a}),T.includes("underline")&&jsx(Q,{label:Se.underline,onClick:()=>k("underline"),icon:we.underline,active:b}),T.includes("strikethrough")&&jsx(Q,{label:Se.strikethrough,onClick:()=>k("strikethrough"),icon:we.strikethrough,active:h}),T.includes("code")&&jsx(Q,{label:Se.code,onClick:()=>k("code"),icon:we.code,active:v}),jsx(He,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(Q,{label:"Bulleted list",onClick:()=>S("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:M==="ul"}),jsx(Q,{label:"Numbered list",onClick:()=>S("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:M==="ol"}),jsx(He,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(Q,{label:"Decrease indent",onClick:()=>t.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(Q,{label:"Increase indent",onClick:()=>t.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(He,{})]}),E.length>0&&jsx(Fragment,{children:E.map(c=>jsx(Q,{label:yi[c],onClick:()=>t.dispatchCommand(FORMAT_ELEMENT_COMMAND,c),icon:vi[c],active:R===c},c))})]})};var Uo=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},_i=forwardRef(({value:e,onChange:o,onBlur:t,onError:n,placeholder:r="Write your content...",readOnly:i=false,showToolbar:l=true,toolbarConfig:s=Lt,className:p,editorClassName:m,toolbarClassName:a,autoFocus:C=false,minHeight:b=160,maxHeight:d,error:h=false,errorMessage:x,editorRef:v},I)=>{let M=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:yt,onError:(g,T)=>{if(n){n(g,T);return}console.error("RichTextEditor error",g);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),R={minHeight:Uo(b),maxHeight:Uo(d),overflowY:d?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,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",h?"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",p),"data-error":h,"data-readonly":i,children:[l&&!i&&jsx(kt,{config:s,className:a}),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:R,onBlur:t,"aria-invalid":h}),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(It,{readOnly:i}),jsx(Et,{value:e,isSyncingRef:M}),C&&!i&&jsx(AutoFocusPlugin,{}),v&&jsx(Rt,{editorRef:v}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(g,T)=>{!o||M.current||o(ot(T),g);}})]}),h&&x&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:x})]})})});_i.displayName="RichTextEditor";var Le="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"],Gp=["primary","secondary","ghost"],Kp=["primary","neutral"],Qi=tv({extend:d$1,slots:{root:"group data-[state=open]:ring-primary-800 gap-2 outline-none data-[state=open]:ring-3 data-[state=open]:ring-inset"},variants:{disabled:{true:{},false:{}}}}),Wo=({label:e,options:o,onSelect:t,variant:n="primary",size:r="md",disabled:i=false,className:l,tone:s="primary",...p})=>{let m=useCallback(b=>{t?.(b.value);},[t]),{root:a,icon:C}=Qi({variant:n,size:r,tone:s,disabled:i});return jsxs(MenuRoot,{unmountOnExit:true,lazyMount:true,onSelect:m,positioning:{placement:"bottom-start",flip:["bottom-end"]},...p,children:[jsxs(MenuTrigger,{disabled:i,className:a({className:l}),children:[e,jsx(g,{className:C({className:"transition-transform duration-150 group-data-[state=open]:rotate-180"})})]}),jsx(Portal,{children:jsx(MenuPositioner,{children:jsx(MenuContent,{className:a$2("elevation-9 z-layer max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",Le),children:o.map(({label:b,value:d,description:h,startIcon:x,endIcon:v,hasDivider:I,disabled:M,onClick:y})=>jsx(MenuItem,{value:d,disabled:M,onSelect:y,asChild:true,children:jsx(ce,{title:b,description:h,startIcon:x,endIcon:v,disabled:M,hasDivider:I,className:"data-highlighted:bg-primary-100 outline-none [&_p]:break-normal"})},d))})})})]})};var Qo=createContext(null),il=()=>{let e=useContext(Qo);if(!e)throw new Error("TrackerItem components must be used within TrackerItem");return e},ll=({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",e==="current"&&"bg-primary-500")}),o]}),Go="flex min-h-10 w-full items-center gap-3 py-2 pr-1 pl-3",sl=forwardRef((e,o)=>{let{state:t$1,stepNumber:n,expandable:r,isClickable:i,headerMenu:l,onHeaderButtonClick:s$1}=il(),{label:p,badgeStatus:m,details:a,className:C,...b}=e,d=()=>jsxs(Fragment,{children:[jsxs("div",{className:a$2("flex flex-1 gap-2",!m&&(!a||a.length===0)&&"self-center"),children:[jsx(a$b,{state:t$1,stepNumber:n}),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",t$1==="wait"?"text-neutral-500":"text-neutral-900"),children:p}),m&&m.visible!==false&&(()=>{let{visible:h,...x}=m;return jsx(a$c,{...x})})(),a&&jsx("div",{className:"text-2xs flex flex-col gap-1.5 text-neutral-700",children:a.map(({Icon:h,text:x},v)=>jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(h,{className:"size-3 shrink-0"}),jsx("span",{className:"font-inter",children:x})]},v))})]})]}),i&&l&&jsx(I,{className:"size-3.5 shrink-0 text-neutral-800"}),!i&&r&&jsx(Collapsible.Context,{children:({open:h})=>jsx(Collapsible.Trigger,{asChild:true,children:jsx(e$1,{Icon:h?s:t,size:"sm",variant:"ghost",tone:"neutral"})})}),!i&&!r&&s$1&&jsx(e$1,{Icon:h,size:"sm",variant:"ghost",tone:"neutral",onClick:s$1})]});return i&&l?jsxs(MenuRoot,{unmountOnExit:true,lazyMount:true,positioning:{placement:"bottom-end",flip:["bottom-start"]},children:[jsx(MenuTrigger,{asChild:true,children:jsx("div",{ref:o,className:a$2(Go,"group cursor-pointer outline-none hover:bg-neutral-100 focus-visible:ring-3 focus-visible:ring-neutral-800 focus-visible:ring-inset",C),...b,children:d()})}),jsx(Portal,{children:jsx(MenuPositioner,{children:jsx(MenuContent,{className:a$2("elevation-9 z-layer max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",Le),children:l.options.map(({label:h,value:x,description:v,startIcon:I,endIcon:M,hasDivider:y,disabled:R,onClick:g})=>jsx(MenuItem,{value:x,disabled:R,onSelect:g,asChild:true,children:jsx(ce,{title:h,description:v,startIcon:I,endIcon:M,disabled:R,hasDivider:y,className:"data-highlighted:bg-primary-100 outline-none [&_p]:break-normal"})},x))})})})]}):jsx("div",{ref:o,className:a$2(Go,C),...b,children:d()})});sl.displayName="TrackerItemHeader";var al=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})}));al.displayName="TrackerItemExpandableContent";var cl=forwardRef(({buttons:e$1=[],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$1.map((r,i)=>{if(r.visible===false)return null;let{visible:l,...s}=r;return "options"in s?jsx(Wo,{...s,size:"sm"},i):jsx(e,{...s,size:"sm"},i)})}));cl.displayName="TrackerItemFooter";var Ko="overflow-hidden rounded-sm border border-neutral-300 bg-neutral-50",pl=forwardRef(({state:e,stepNumber:o,expandable:t,isClickable:n,headerMenu:r,defaultExpanded:i,onExpandedChange:l,onHeaderButtonClick:s,className:p,children:m,...a},C)=>{let b=t===true,d=n===true,h=useMemo(()=>({state:e,stepNumber:o,expandable:b,isClickable:d,headerMenu:d?r:void 0,onHeaderButtonClick:d?void 0:s}),[e,o,b,d,r,s]),x=useCallback(v=>{l?.(v.open);},[l]);return jsx(Qo.Provider,{value:h,children:jsx(ll,{state:e,children:b?jsx(Collapsible.Root,{ref:C,defaultOpen:i??false,onOpenChange:x,className:a$2(Ko,p),...a,children:m}):jsx("div",{ref:C,className:a$2(Ko,p),...a,children:m})})})});pl.displayName="TrackerItem";var Au=["sm","md","lg"],Ou=["semibold","medium"],ku=["primary","neutral"],vl=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}}),wu=({className:e,label:o,badgeText:t="00",StartIcon:n,options:r,onSelect:i,isSelected:l=false,isLoading:s=false,isDisabled:p=false,hasTrailingBadge:m=false,size:a="lg",weight:C="semibold",tone:b="primary",type:d="button",...h})=>{let x=p||s,v=r.filter(({isHidden:P})=>!P),I=v.length>0,M=s,y=!!n&&!s,R=!s&&m,g$1=I&&!x,T=useCallback(P=>{i?.(P.value);},[i]),E=useCallback(P=>{P?.();},[]),{root:L,label:O,icon:k,chevron:V,trailing:S}=vl({size:a,weight:C,tone:b,loading:M}),c=a,u=jsxs(Fragment,{children:[M&&jsx(c$6,{size:"sm",tone:"neutral",className:k()}),y&&n&&jsx(n,{className:k()}),jsx("span",{className:O(),children:o}),R&&jsx(a$e,{type:"square",variant:"primary",size:c,text:t,className:S()}),g$1&&jsx(g,{className:V()})]});return I?jsxs(MenuRoot,{onSelect:T,lazyMount:true,positioning:{placement:"bottom-start",flip:["bottom-end"]},children:[jsx(MenuTrigger,{...h,type:d,disabled:x,"aria-pressed":l,className:L({className:e}),children:u}),jsx(Portal,{children:jsx(MenuPositioner,{children:jsx(MenuContent,{className:cn$1("elevation-9 z-layer max-h-67.5 max-w-[calc(100vw-1rem)] min-w-max overflow-y-auto rounded-lg bg-neutral-50 py-1 outline-none",Le),children:v.map(({label:P,description:D,startIcon:H,endIcon:G,hasDivider:z,isDisabled:le,onClick:F})=>jsx(MenuItem,{value:P,disabled:le,onSelect:()=>E(F),asChild:true,className:"flex items-center",children:jsx(ce,{title:P,description:D,startIcon:H,endIcon:G,disabled:le,hasDivider:z,className:"data-highlighted:bg-primary-100 outline-none [&_p]:break-normal"})},P))})})})]}):jsx("button",{...h,type:d,disabled:x,"aria-pressed":l,className:L({className:e}),children:u})};var Xo={en:rr,es:ir,pt:lr},El={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},Al={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},Ol=Xo.en,Zo="9 1234 5678",wt="ZZ",Jo=()=>{},it=e=>El[e]??Al,en=e=>Xo[e]??Ol,tn=e=>{if(e)try{let o=parsePhoneNumber(e)?.country;return !o||!j$1(o)?void 0:o}catch{return}},on=e=>{if(e)return getExampleNumber(e,Rl)?.formatNational()},lt=e=>e??wt,st=()=>getDefaultOptions().locale?.code;var Fl=({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}`})]}),nn=({className:e,disabled:o,error:t,iconComponent:n,onChange:r,onOpenChange:i,options:l,readOnly:s,translations:p$1,value:m})=>{let a=_.useRef(null),[C,b]=_.useState(""),[d,h]=_.useState(false),{wrapper:x,input:v,clearIcon:I,searchIcon:M}=b$2({size:"md"}),{contains:y}=useFilter({sensitivity:"base"}),R=_.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:lt(u.value),label:u.label})),[l]),g=_.useMemo(()=>R.find(u=>u.key===lt(m)),[R,m]),{collection:T,filter:E,set:L}=useListCollection({initialItems:R,itemToString:u=>u.callingCode?`${u.label} +${u.callingCode}`:u.label,itemToValue:u=>u.key,filter:(u,P,D)=>{let H=P.trim().replace(/^\+/,"");return y(u,P)||(D.country?y(D.country,P.toUpperCase()):false)||(D.callingCode?y(D.callingCode,H)||y(`+${D.callingCode}`,P):false)}});_.useEffect(()=>{L(R);},[R,L]);let O=_.useCallback(u=>{h(u),i?.(u);},[i]),k=_.useCallback(({inputValue:u})=>{let P=u??"";b(P),E(P),a.current?.scrollTo({top:0});},[E]),V=_.useCallback(u=>{O(u),u&&(b(""),E(""));},[E,O]),S=_.useCallback(({itemValue:u})=>{if(!u||u===wt){r(void 0),O(false);return}j$1(u)&&(r(u),O(false));},[O,r]),c=useCombobox({collection:T,inputBehavior:"autohighlight",inputValue:C,open:d,openOnChange:false,openOnClick:false,selectionBehavior:"preserve",value:g?[g.key]:[],onInputValueChange:k,onOpenChange:({open:u})=>{u||O(false);},onSelect:S});return jsx(Combobox.RootProvider,{value:c,children:jsxs(a$9,{open:d,onOpenChange:V,children:[jsx(b$3,{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&&d&&"after:bg-input-ring-focus after:w-0.5",e),disabled:o||s,children:g&&jsx(Fl,{Icon:n,callingCode:g.callingCode,country:g.country,countryName:g.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:x({className:"m-1 mb-0"}),children:[jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:p$1.searchCountryPlaceholder,className:v()}),!o&&C.length>0&&jsx("button",{type:"button",className:I(),onClick:()=>{c.setInputValue("","clear-trigger");},children:jsx(d$4,{className:"size-4.5"})}),jsx(p,{className:M()})]}),jsx(a$1,{className:"mt-2"})]}),jsx(Combobox.List,{ref:a,className:a$2("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":T.items.length===0}),children:T.items.length===0?jsx(a$a,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:T.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===lt(m)?"opacity-100":"opacity-0")})]},u.key))})})]})})]})})};var ln=({className:e,country:o,countryName:t})=>{let n=Zn[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 Ht=_.forwardRef(({className:e,disabled:o,error:t,onChange:n,readOnly:r,type:i,value:l,...s},p)=>{let m=st(),a=_.useMemo(()=>it(m),[m]),C=_.useRef(null),d$1=!o&&!r&&!!l,h=d$1||t;_.useImperativeHandle(p,()=>C.current,[]);let x=_.useCallback(()=>{let v=C.current;if(!v){n?.({target:{value:""}});return}v.value="",n?.({target:v}),v.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",h&&!t&&"pr-10.5",d$1&&t&&"pr-14",t&&!d$1&&"pr-10.5",o&&"text-input-text-disabled",e),...s,disabled:o,readOnly:r,value:l,onChange:n,ref:C}),(d$1||t)&&jsxs("div",{className:"absolute inset-y-0 right-3 z-10 flex items-center gap-1",children:[d$1&&jsx(a$5,{ariaLabel:a.clearPhoneNumberLabel,onClick:x}),t&&jsx(d,{})]})]})});Ht.displayName="PhoneNumberInputComponent";var _l=Bl,cn=_.forwardRef(({className:e,defaultCountry:o,disabled:t,error:n,helperText:r,id:i,label:l,onChange:s=Jo,placeholder:p,readOnly:m,required:a,tooltip:C,value:b,...d},h)=>{let[x,v]=_.useState(false),[I,M]=_.useState(()=>tn(b)??o),y=_.useId(),R=i??y,g=st(),T=_.useMemo(()=>it(g),[g]),E=_.useMemo(()=>en(g),[g]),L=_.useMemo(()=>on(I)??p??Zo,[p,I]),O=c$1({error:n,disabled:t,readOnly:m}),k=a$2(O.control(),"group/phone",!n&&!t&&!m&&x&&"after:ring-input-ring-focus after:ring-2",e),V=_.useCallback(S=>{M(S);},[]);return jsx(tt,{disabled:t,error:n,helperText:r,htmlFor:R,label:l,readOnly:m,required:a,tooltip:C,children:jsx(_l,{...d,className:k,ref:h,countrySelectComponent:nn,countrySelectProps:{error:n,onOpenChange:v,translations:T},defaultCountry:o,disabled:t,flagComponent:ln,id:R,initialValueFormat:"national",inputComponent:Ht,labels:E,numberInputProps:{error:n,placeholder:L},readOnly:m,required:a,value:b,onChange:s,onCountryChange:V})})});cn.displayName="PhoneInput";var zl=({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=zl;var bf=({children:e,title:o,titleLines:t,description:n="",descriptionLines:r,startIcon:i,badgeContent:l,hasDivider:s=false,disabled:p=false,onSelect:m,className:a,...C})=>jsxs(ee,{hasDescription:!!n,disabled:p,onClick:m,hasDivider:s,className:a$2(!p&&"cursor-pointer",a),...C,children:[i&&___default.cloneElement(i,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(pe,{title:o,titleLines:t,description:n,descriptionLines:r,disabled:p}),jsxs("div",{className:"ml-4 flex gap-2",children:[l&&jsx(a$3,{content:l,size:"lg",variant:"alert",className:a$2("self-center",p&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});export{Kp as A,Wo as B,is as a,bf as b,co as c,Ma as d,wo as e,Tc as f,Fc as g,yt as h,Lt as i,xe as j,Nt as k,Mt as l,_i as m,il as n,sl as o,al as p,cl as q,pl as r,Au as s,Ou as t,ku as u,wu as v,cn as w,ce as x,Wp as y,Gp as z};
@@ -1 +1 @@
1
- import {d}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import*as r from'react';import {jsx}from'react/jsx-runtime';var f=({as:l,ariaLabel:u="Clear",className:c,onMouseDown:t,...p})=>{let e=l??"button",m=r.useCallback(o=>{o.preventDefault(),t?.(o);},[t]);return jsx(e,{type:e==="button"?"button":void 0,"aria-label":u,className:a("flex cursor-pointer items-center justify-center text-neutral-900",c),onMouseDown:m,...p,children:jsx(d,{className:"size-4.5"})})};export{f as a};
1
+ import {d}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import*as r from'react';import {jsx}from'react/jsx-runtime';var f=({as:l,ariaLabel:u="Clear",className:c,onMouseDown:t,...p})=>{let e=l??"button",m=r.useCallback(o=>{o.preventDefault(),t?.(o);},[t]);return jsx(e,{type:e==="button"?"button":void 0,"aria-label":u,className:a("flex cursor-pointer items-center justify-center text-neutral-900",c),onMouseDown:m,...p,children:jsx(d,{className:"size-4.5"})})};export{f as a};
@@ -1 +1 @@
1
- import {e as e$1}from'./chunk-PI7DECIN.js';import {b,e,f,c as c$1,d}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(e$1,{Icon:d,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};
1
+ import {e as e$1}from'./chunk-PI7DECIN.js';import {b,e,f,c as c$1,d}from'./chunk-TPE6CVKA.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(e$1,{Icon:d,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};
@@ -1 +1 @@
1
- import {e}from'./chunk-SRCJQWFE.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-VOPVBJKL.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var q=["vertical","horizontal"],w=(o,{selectedValue:t,isSelected:n})=>t!=null&&!n,V=({label:o,orientation:t="vertical",options:n,value:a$3,onChange:m,required:x,tooltip:v,disabled:p,isOptionDisabled:r,error:f,helperText:c,variant:T,tone:g,size:O,className:S})=>{let d=t==="horizontal";return jsxs("div",{className:a$1("group flex flex-col",S),"data-error":f||void 0,"data-disabled":p||void 0,children:[jsxs("div",{className:a$1("flex",d?"flex-row items-center":"flex-col"),children:[o&&jsx(a,{as:"p",label:o,required:x,tooltip:v,className:d?"mr-3 mb-0":"mb-3"}),jsx("div",{className:"flex flex-wrap gap-3",children:n.map((e$1,y)=>{let s=a$3===e$1.value,z=typeof r=="function"?r(e$1,{selectedValue:a$3,isSelected:s,index:y}):!!r,P=p||e$1.disabled||z;return jsx(e,{selected:s,disabled:P,variant:T,tone:g,size:O,StartIcon:e$1.StartIcon,onClick:()=>m(s?null:e$1.value),children:e$1.label},e$1.value)})})]}),c&&jsx(a$2,{children:c})]})};export{q as a,w as b,V as c};
1
+ import {e}from'./chunk-SRCJQWFE.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-XKMQ2LPV.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var q=["vertical","horizontal"],w=(o,{selectedValue:t,isSelected:n})=>t!=null&&!n,V=({label:o,orientation:t="vertical",options:n,value:a$3,onChange:m,required:x,tooltip:v,disabled:p,isOptionDisabled:r,error:f,helperText:c,variant:T,tone:g,size:O,className:S})=>{let d=t==="horizontal";return jsxs("div",{className:a$1("group flex flex-col",S),"data-error":f||void 0,"data-disabled":p||void 0,children:[jsxs("div",{className:a$1("flex",d?"flex-row items-center":"flex-col"),children:[o&&jsx(a,{as:"p",label:o,required:x,tooltip:v,className:d?"mr-3 mb-0":"mb-3"}),jsx("div",{className:"flex flex-wrap gap-3",children:n.map((e$1,y)=>{let s=a$3===e$1.value,z=typeof r=="function"?r(e$1,{selectedValue:a$3,isSelected:s,index:y}):!!r,P=p||e$1.disabled||z;return jsx(e,{selected:s,disabled:P,variant:T,tone:g,size:O,StartIcon:e$1.StartIcon,onClick:()=>m(s?null:e$1.value),children:e$1.label},e$1.value)})})]}),c&&jsx(a$2,{children:c})]})};export{q as a,w as b,V as c};
@@ -1 +1 @@
1
- import {i,h}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import {Carousel}from'@ark-ui/react/carousel';import {forwardRef}from'react';import {jsx}from'react/jsx-runtime';var p=forwardRef(({className:e,...r},o)=>jsx(Carousel.Root,{ref:o,className:a("relative w-full",e),...r})),c=forwardRef(({className:e,...r},o)=>jsx(Carousel.Control,{ref:o,className:a("pointer-events-none absolute inset-0 z-10 flex items-center justify-between px-4",e),...r})),m=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.PrevTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(i,{className:"h-4 w-4"})})),g=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.NextTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(h,{className:"h-4 w-4"})})),C=forwardRef(({className:e,...r},o)=>jsx(Carousel.IndicatorGroup,{ref:o,className:a("flex items-center justify-center gap-2",e),...r})),d=forwardRef(({className:e,...r},o)=>jsx(Carousel.Indicator,{ref:o,className:a("bg-primary-100 hover:bg-primary-400 data-[current]:bg-primary-500 h-2 w-2 rounded-full shadow transition-all duration-300 data-[current]:scale-125",e),...r})),f=forwardRef(({className:e,...r},o)=>jsx(Carousel.ItemGroup,{ref:o,className:a("flex overflow-hidden",e),...r})),P=forwardRef(({className:e,...r},o)=>jsx(Carousel.Item,{ref:o,className:a("w-full flex-none",e),...r})),v=forwardRef(({className:e,...r},o)=>jsx("div",{ref:o,className:a("overflow-hidden rounded-lg",e),...r})),R=Object.assign(p,{Root:p,Control:c,PrevTrigger:m,NextTrigger:g,IndicatorGroup:C,Indicator:d,ItemGroup:f,Item:P,Viewport:v});export{p as a,c as b,m as c,g as d,C as e,d as f,f as g,P as h,v as i,R as j};
1
+ import {i,h}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import {Carousel}from'@ark-ui/react/carousel';import {forwardRef}from'react';import {jsx}from'react/jsx-runtime';var p=forwardRef(({className:e,...r},o)=>jsx(Carousel.Root,{ref:o,className:a("relative w-full",e),...r})),c=forwardRef(({className:e,...r},o)=>jsx(Carousel.Control,{ref:o,className:a("pointer-events-none absolute inset-0 z-10 flex items-center justify-between px-4",e),...r})),m=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.PrevTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(i,{className:"h-4 w-4"})})),g=forwardRef(({className:e,children:r,...o},n)=>jsx(Carousel.NextTrigger,{ref:n,className:a("pointer-events-auto flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-600 shadow-lg backdrop-blur-sm transition-all hover:bg-white hover:text-gray-800 focus:ring-2 focus:ring-white/50 focus:outline-none disabled:cursor-not-allowed disabled:opacity-30",e),...o,children:r||jsx(h,{className:"h-4 w-4"})})),C=forwardRef(({className:e,...r},o)=>jsx(Carousel.IndicatorGroup,{ref:o,className:a("flex items-center justify-center gap-2",e),...r})),d=forwardRef(({className:e,...r},o)=>jsx(Carousel.Indicator,{ref:o,className:a("bg-primary-100 hover:bg-primary-400 data-[current]:bg-primary-500 h-2 w-2 rounded-full shadow transition-all duration-300 data-[current]:scale-125",e),...r})),f=forwardRef(({className:e,...r},o)=>jsx(Carousel.ItemGroup,{ref:o,className:a("flex overflow-hidden",e),...r})),P=forwardRef(({className:e,...r},o)=>jsx(Carousel.Item,{ref:o,className:a("w-full flex-none",e),...r})),v=forwardRef(({className:e,...r},o)=>jsx("div",{ref:o,className:a("overflow-hidden rounded-lg",e),...r})),R=Object.assign(p,{Root:p,Control:c,PrevTrigger:m,NextTrigger:g,IndicatorGroup:C,Indicator:d,ItemGroup:f,Item:P,Viewport:v});export{p as a,c as b,m as c,g as d,C as e,d as f,f as g,P as h,v as i,R as j};
@@ -1 +1 @@
1
- import {r,m}from'./chunk-Z6FU5QVL.js';import {a}from'./chunk-OBZIYJO7.js';import {useCallback}from'react';import {RatingGroup}from'@ark-ui/react/rating-group';import {jsx,jsxs}from'react/jsx-runtime';var V=["md","sm"],b=({size:e="sm",count:c=5,onValueChange:r$1,...a$1})=>{let R=useCallback(n=>{r$1?.(n.value);},[r$1]);return jsx(RatingGroup.Root,{count:c,onValueChange:R,...a$1,children:jsxs(RatingGroup.Control,{className:"flex gap-1",children:[jsx(RatingGroup.Context,{children:({items:n})=>n.map(i=>jsx(RatingGroup.Item,{index:i,className:"outline-0",children:jsx(RatingGroup.ItemContext,{children:({half:g,highlighted:s})=>{let l=a("transition-colors",!a$1.readOnly&&!a$1.disabled&&"cursor-pointer",e==="md"&&"size-6",e==="sm"&&"h-4.5 w-4.5");return g?jsx(r,{fill:"#FFCB00",color:"#FFCB00",className:l}):jsx(m,{fill:s?"#FFCB00":"transparent",color:s?"#FFCB00":"#7E8A86",className:l})}})},i))}),jsx(RatingGroup.HiddenInput,{})]})})};export{V as a,b};
1
+ import {r,m}from'./chunk-TPE6CVKA.js';import {a}from'./chunk-OBZIYJO7.js';import {useCallback}from'react';import {RatingGroup}from'@ark-ui/react/rating-group';import {jsx,jsxs}from'react/jsx-runtime';var V=["md","sm"],b=({size:e="sm",count:c=5,onValueChange:r$1,...a$1})=>{let R=useCallback(n=>{r$1?.(n.value);},[r$1]);return jsx(RatingGroup.Root,{count:c,onValueChange:R,...a$1,children:jsxs(RatingGroup.Control,{className:"flex gap-1",children:[jsx(RatingGroup.Context,{children:({items:n})=>n.map(i=>jsx(RatingGroup.Item,{index:i,className:"outline-0",children:jsx(RatingGroup.ItemContext,{children:({half:g,highlighted:s})=>{let l=a("transition-colors",!a$1.readOnly&&!a$1.disabled&&"cursor-pointer",e==="md"&&"size-6",e==="sm"&&"h-4.5 w-4.5");return g?jsx(r,{fill:"#FFCB00",color:"#FFCB00",className:l}):jsx(m,{fill:s?"#FFCB00":"transparent",color:s?"#FFCB00":"#7E8A86",className:l})}})},i))}),jsx(RatingGroup.HiddenInput,{})]})})};export{V as a,b};
@@ -1 +1 @@
1
- import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-QDSBR67A.js';import {a as a$5,b as b$2,c as c$1}from'./chunk-GTVHYHF4.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,q,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 {e as e$2}from'./chunk-5D64Y4FM.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,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:G,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"}},Qe=["alert","incident"],Cn=n=>{let a=Qe.map(r=>n.find(c=>c.name===r)).filter(r=>r!==void 0),l=n.filter(r=>!Qe.includes(r.name));return [...a,...l]},Tn=n=>({id:V,size:54,enableResizing:false,header:({table:a})=>{let l=a.getRowModel().rows.some(c=>c.getCanSelect()),r=a.getIsAllPageRowsSelected()?true:a.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:r,disabled:!l,className:"ml-1",onCheckedChange:c=>a.toggleAllPageRowsSelected(c===true)})},cell:({row:a})=>{let l=a.getCanSelect(),r=l?a.getIsSelected():typeof n.setDisabledRowState=="function"?n.setDisabledRowState(a.original):n.setDisabledRowState??false,c=jsx(b$1,{checked:r,onCheckedChange:p=>a.toggleSelected(p===true),disabled:!l}),u=n.rowSelectionTooltip?.content(a.original);return u?jsx(a$2,{className:"w-fit",content:u,positioning:n.rowSelectionTooltip?.positioning??{placement:"right"},children:c}):c},enableSorting:false}),ee=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],tn=({columns:n,rows:a$2,hasSelection:l,hasRowActions:r,hasPagination:c$1,className:u,...p})=>jsxs(a$1,{className:u,...p,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[r&&jsx(h,{className:a("p-0",Z)}),l&&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:n},(z,h$1)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},h$1))]})}),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:a$2},(z,h)=>jsxs(e,{children:[r&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",Z),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"})]})}),l&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:n},(i$1,m)=>jsx(i,{children:jsx(a$3,{className:a("h-4",ee[(h+m)%ee.length])})},m))]},h))})]}),c$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"})})]})]});tn.displayName="DataTableFullSkeleton";var hn={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},M="__row_actions__",V="__select__",Z="w-7.5 min-w-7.5 max-w-7.5",en="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",Y=(n,a$1)=>{let l=n.Icon;return jsx(a$2,{content:a$1?.tooltip??"",disabled:!a$1?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":a$1?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",n.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:l&&jsx(l,{className:a("size-3.5 shrink-0",n.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},a$1?.key)},be=(n,a)=>typeof n=="function"?n(a):n??false,Sn=({row:n,rowActions:a})=>{let[l,r]=useState(false),c=n.original,u=Cn(a(c));if(u.length===0)return Y(U.empty);let p=u.length>3,z=p?u.slice(0,2):u,h=p?3:z.length;if(u.length===1){let i=u[0],m=be(i.isDisabled,c);return jsx("button",{type:"button","aria-label":i.label,disabled:m,className:en,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:N=>{N.stopPropagation(),i.onClick(c);},children:Y(U[i.name],{disabled:m,tooltip:i.tooltip})})}return jsxs(a$5,{open:l,onOpenChange:r,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$2,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:en,style:{gridTemplateRows:`repeat(${h}, minmax(0, 1fr))`},onClick:i=>{i.stopPropagation();},children:[z.map((i,m)=>Y(U[i.name],{key:`${i.name}-${m}`,disabled:be(i.isDisabled,c),tooltip:i.tooltip})),p&&Y(U.more)]})}),jsx(c$1,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:u.map((i,m)=>{let N=U[i.name];if(!N.Icon)return null;let x=be(i.isDisabled,c);return jsx(e$2,{variant:"ghost",size:"md",disabled:x,StartIcon:N.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:v=>{v.stopPropagation(),i.onClick(c),r(false);},type:"button",children:i.label},`${i.name}-${m}`)})})})]})},wn=({rowActions:n})=>({id:M,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:a})=>n?jsx(Sn,{row:a,rowActions:n}):null}),on=memo(({row:n,isSelected:a$1,type:l})=>jsx(e,{"data-state":a$1&&"selected",className:a(l&&l!=="default"&&hn[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:n.getVisibleCells().map(r=>jsx(i,{className:r.column.id===M?a("p-0 align-middle",Z):void 0,children:flexRender(r.column.columnDef.cell,r.getContext())},r.id))}),(n,a)=>n.isSelected===a.isSelected&&n.row.original===a.row.original&&n.type===a.type);on.displayName="DataTableRow";var Nn=150,Dn=Number.POSITIVE_INFINITY,yn=140,Q=(n,a,l)=>Math.min(Math.max(n,a),l),Rn=20,zn=Number.MAX_SAFE_INTEGER,J=n=>{let a=n.size??Nn,l=n.minSize===void 0||n.minSize===Rn?void 0:n.minSize,r=n.maxSize===void 0||n.maxSize===zn?void 0:n.maxSize;return {size:a,minSize:l??Math.min(a,yn),maxSize:r??Dn}},an="dt-col-sizes-",xn="dt-col-ratios-",Pn=n=>{try{localStorage.removeItem(`${xn}${n}`);let a=localStorage.getItem(`${an}${n}`);if(!a)return {};let l=JSON.parse(a),r={};for(let[c,u]of Object.entries(l))typeof u=="number"&&Number.isFinite(u)&&u>0&&(r[c]=u);return r}catch{return {}}},vn=(n,a)=>{try{localStorage.setItem(`${an}${n}`,JSON.stringify(a));}catch{}},In=(n,a)=>{let l={},r=0,c=[];for(let i of n)if(i.isFixed)l[i.id]=i.weight,r+=i.weight;else if(i.isPinned){let m=Q(i.pinnedPx,i.minSize,i.maxSize);l[i.id]=m,r+=m;}else c.push(i);if(c.length===0)return l;let u=Math.max(a-r,0),p=c.map(i=>({column:i,px:i.minSize,frozen:false})),z=p.length+1;for(;z-- >0;){let i=p.filter(d=>!d.frozen);if(i.length===0)break;let m=p.filter(d=>d.frozen).reduce((d,S)=>d+S.px,0),N=u-m,x=i.reduce((d,S)=>d+S.column.weight,0);if(x<=0)break;let v=false;for(let d of i){let S=d.column.weight/x*N;S<d.column.minSize?(d.px=d.column.minSize,d.frozen=true,v=true):S>d.column.maxSize?(d.px=d.column.maxSize,d.frozen=true,v=true):d.px=S;}if(!v)break}for(let i of p)l[i.column.id]=i.px;let h=p.find(i=>i.column.isFill);if(h){let i=p.filter(m=>m.column.id!==h.column.id).reduce((m,N)=>m+N.px,0);l[h.column.id]=Math.max(u-i,h.column.minSize);}return l};function at({columns:n,data:a$4,rowsCount:l,pagination:r,onPaginationChange:c$1,noResults:u,onNextPageClick:p,onPreviousPageClick:z,disableNextPage:h$1,disablePreviousPage:i$1,className:m,onRowsPerPageChange:N,columnOrder:x,columnVisibility:v,rowsPerPageOptions:d$1,enableRowSelection:S=false,rowSelection:pe,onRowSelectionChange:ln,getRowId:fe,rowSelectionTooltip:Ce,setDisabledRowState:Te,tableId:D,isLoading:L,isInitialLoading:he,skeletonRowCount:sn,skeletonColumns:rn=6,getRowType:Se,rowActions:k,...we}){let F=typeof S=="function"||S,Ne=useMemo(()=>{if(!x)return;let t=[k?M:null,F?V:null].filter(s=>s!=null),o=new Set(t);return [...t,...x.filter(s=>!o.has(s))]},[x,F,k]),j$1=useMemo(()=>{let t=[...n];if(F&&t.unshift(Tn({rowSelectionTooltip:Ce,setDisabledRowState:Te})),k){let o=wn({rowActions:k});t.unshift(o);}return t},[F,n,Ce,Te,k]),[I,cn]=useState(null),un=useCallback(t=>cn(t),[]),[ne,De]=useState(0),ye=useRef(false),[y,te]=useState({}),[Re,ze]=useState(null),oe=useRef(null),ae=useRef(null),f$1=useReactTable({data:a$4,columns:j$1,rowCount:l,state:{pagination:r,...Ne!==void 0&&{columnOrder:Ne},columnVisibility:v,...pe!==void 0&&{rowSelection:pe},...D&&{columnSizing:y}},onPaginationChange:c$1,onRowSelectionChange:ln,...D&&{onColumnSizingChange:te},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof S=="function"?t=>S(t.original):S,getRowId:fe?t=>fe(t):void 0}),ie=f$1.getVisibleLeafColumns().map(t=>t.id).join(","),xe=Re!==null,A=useMemo(()=>{let t=f$1.getVisibleLeafColumns().filter(s=>s.getCanResize());return t.length===0?void 0:(t.find(s=>s.columnDef.isFillColumn)??t[t.length-1]).id},[f$1,ie,j$1]),Pe=useMemo(()=>{if(!ne)return {};let t=f$1.getVisibleLeafColumns().map(o=>{let{size:s,minSize:g,maxSize:C}=J(o.columnDef),P=o.getCanResize(),R=o.id===A;return {id:o.id,isFixed:!P,isPinned:P&&!R&&o.id in y,pinnedPx:y[o.id]??s,weight:s,minSize:g,maxSize:C,isFill:R}});return In(t,ne)},[f$1,ie,j$1,ne,y,A]),mn=useMemo(()=>f$1.getVisibleLeafColumns().reduce((t,o)=>{let{size:s,minSize:g,maxSize:C}=J(o.columnDef);return o.getCanResize()?o.id!==A&&o.id in y?t+Q(y[o.id]??s,g,C):t+g:t+s},0),[f$1,ie,j$1,y,A]),ve=(t,o)=>{let s=t.column.id,{size:g,minSize:C,maxSize:P}=J(t.column.columnDef),R=Pe[s]??g,_="touches"in o?o.touches[0]?.clientX??0:o.clientX;o.preventDefault(),o.stopPropagation(),oe.current=s,ze(s),document.body.style.userSelect="none";let q=W=>{"touches"in W&&W.preventDefault();let dn="touches"in W?W.touches[0]?.clientX??_:W.clientX,ke=Q(R+(dn-_),C,P);te(le=>le[s]===ke?le:{...le,[s]:ke});},H=()=>{oe.current=null,ze(null),document.body.style.userSelect="",document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",H),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",H),ae.current=null,I&&De(I.clientWidth);};ae.current=H,document.addEventListener("mousemove",q),document.addEventListener("mouseup",H),document.addEventListener("touchmove",q,{passive:false}),document.addEventListener("touchend",H);};useEffect(()=>()=>ae.current?.(),[]),useEffect(()=>{D&&te(Pn(D));},[D]),useEffect(()=>{if(!I)return;let t=g=>{g>0&&De(g);};t(I.clientWidth);let o=0,s=new ResizeObserver(([g])=>{if(!g||oe.current!==null)return;cancelAnimationFrame(o);let C=I.clientWidth;o=requestAnimationFrame(()=>t(C));});return s.observe(I),()=>{cancelAnimationFrame(o),s.disconnect();}},[I]),useEffect(()=>{if(D){if(!ye.current){ye.current=true;return}xe||vn(D,y);}},[D,xe,y]);let Ie=sn??r?.pageSize??10;return he?jsx(tn,{columns:rn,rows:Ie,hasSelection:F,hasRowActions:!!k,hasPagination:!!r,className:m,...we}):!L&&!he&&!f$1.getRowModel().rows?.length?jsx(f,{...u}):jsxs(a$1,{ref:un,className:m,...we,children:[jsxs(b,{style:{width:"100%",minWidth:mn,tableLayout:"fixed"},children:[jsx("colgroup",{children:f$1.getHeaderGroups()[0].headers.map(t=>{let o=t.column,s=o.getCanResize(),{size:g,minSize:C,maxSize:P}=J(o.columnDef);if(o.id===A)return jsx("col",{span:1,style:{width:"auto",minWidth:C}},t.id);let R=Pe[o.id]??Q(y[o.id]??g,C,P);return jsx("col",{span:1,style:{width:R,minWidth:s?C:R}},t.id)})}),jsx(c,{children:f$1.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(o=>{if(o.isPlaceholder)return jsx(h,{},o.id);let s=o.column.columnDef,g=flexRender(s.header,o.getContext()),C=o.column.id!==V&&s.headerTooltip!==false,P=s.headerTooltip&&typeof s.headerTooltip!="boolean"?s.headerTooltip:g,R=jsx("span",{className:"line-clamp-1",children:g});return jsxs(h,{className:o.column.id===M?a("p-0",Z):D?"group/resize relative overflow-clip":void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:P,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"})})]}),D&&o.column.getCanResize()&&o.column.id!==A&&jsx("div",{onMouseDown:_=>ve(o,_),onTouchStart:_=>ve(o,_),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",Re===o.column.id&&"bg-primary-600 opacity-100")})]},o.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:L?Array.from({length:Ie},(t,o)=>jsx(e,{children:f$1.getVisibleLeafColumns().map((s,g)=>{let C=s.columnDef;return jsx(i,{className:s.id===V?"align-middle":s.id===M?a("bg-primary-50 p-0 align-middle",Z):void 0,children:s.id===V?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===M?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",ee[(o+g)%ee.length])})},s.id)})},o)):f$1.getRowModel().rows.map(t=>jsx(on,{row:t,isSelected:t.getIsSelected(),type:Se?Se(t.original):"default"},t.id))})]}),r&&c$1&&(a$4.length>0||L)&&jsx(j,{rowsPerPageOptions:d$1,rowsCount:l,pagination:r,onPageSizeChange:t=>{f$1.setPagination({pageIndex:0,pageSize:t}),N?.(t);},onPreviousPageClick:z,onNextPageClick:p,isDisableNextPageButton:L||h$1||!!l&&!f$1.getCanNextPage(),isDisablePreviousPageButton:L||i$1||!!l&&!f$1.getCanPreviousPage(),onPageChange:t=>{f$1.setPageIndex(t-1);}})]})}export{at as a};
1
+ import {e,i,f,a as a$1,b,c,g,h,d,j}from'./chunk-UXA4LNOV.js';import {a as a$5,b as b$2,c as c$1}from'./chunk-GTVHYHF4.js';import {b as b$1}from'./chunk-5RKO7FZ7.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,q,F,E,D,C,x,y,z,f as f$1,B}from'./chunk-TPE6CVKA.js';import {a as a$4}from'./chunk-ICF6RQIW.js';import {e as e$2}from'./chunk-5D64Y4FM.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,bgClassName:"bg-danger-100 hover:bg-danger-200",iconClassName:"text-danger-700"},draft:{Icon:G,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"}},Qe=["alert","incident"],Cn=n=>{let a=Qe.map(r=>n.find(c=>c.name===r)).filter(r=>r!==void 0),l=n.filter(r=>!Qe.includes(r.name));return [...a,...l]},Tn=n=>({id:V,size:54,enableResizing:false,header:({table:a})=>{let l=a.getRowModel().rows.some(c=>c.getCanSelect()),r=a.getIsAllPageRowsSelected()?true:a.getIsSomePageRowsSelected()?"indeterminate":false;return jsx(b$1,{checked:r,disabled:!l,className:"ml-1",onCheckedChange:c=>a.toggleAllPageRowsSelected(c===true)})},cell:({row:a})=>{let l=a.getCanSelect(),r=l?a.getIsSelected():typeof n.setDisabledRowState=="function"?n.setDisabledRowState(a.original):n.setDisabledRowState??false,c=jsx(b$1,{checked:r,onCheckedChange:p=>a.toggleSelected(p===true),disabled:!l}),u=n.rowSelectionTooltip?.content(a.original);return u?jsx(a$2,{className:"w-fit",content:u,positioning:n.rowSelectionTooltip?.positioning??{placement:"right"},children:c}):c},enableSorting:false}),ee=["w-3/4","w-1/2","w-2/3","w-5/6","w-3/5"],tn=({columns:n,rows:a$2,hasSelection:l,hasRowActions:r,hasPagination:c$1,className:u,...p})=>jsxs(a$1,{className:u,...p,children:[jsxs(b,{children:[jsx(c,{children:jsxs(g,{children:[r&&jsx(h,{className:a("p-0",Z)}),l&&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:n},(z,h$1)=>jsx(h,{children:jsx(a$3,{className:"bg-primary-300 h-3 w-16"})},h$1))]})}),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:a$2},(z,h)=>jsxs(e,{children:[r&&jsx(i,{className:a("bg-primary-50 p-0 align-middle",Z),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"})]})}),l&&jsx(i,{className:"align-middle",children:jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"})}),Array.from({length:n},(i$1,m)=>jsx(i,{children:jsx(a$3,{className:a("h-4",ee[(h+m)%ee.length])})},m))]},h))})]}),c$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"})})]})]});tn.displayName="DataTableFullSkeleton";var hn={neutral:"bg-neutral-100",success:"bg-success-20",orange:"bg-orange-20",warning:"bg-warning-20",danger:"bg-danger-20",default:"bg-neutral-50"},M="__row_actions__",V="__select__",Z="w-7.5 min-w-7.5 max-w-7.5",en="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",Y=(n,a$1)=>{let l=n.Icon;return jsx(a$2,{content:a$1?.tooltip??"",disabled:!a$1?.tooltip,className:"h-full w-full",positioning:{placement:"right"},children:jsx("div",{"data-disabled":a$1?.disabled||void 0,className:a("group/preset flex h-full w-full items-center justify-center",n.bgClassName,"data-disabled:cursor-not-allowed data-disabled:bg-neutral-200"),children:l&&jsx(l,{className:a("size-3.5 shrink-0",n.iconClassName,"group-data-disabled/preset:text-neutral-600"),"aria-hidden":true})})},a$1?.key)},be=(n,a)=>typeof n=="function"?n(a):n??false,Sn=({row:n,rowActions:a})=>{let[l,r]=useState(false),c=n.original,u=Cn(a(c));if(u.length===0)return Y(U.empty);let p=u.length>3,z=p?u.slice(0,2):u,h=p?3:z.length;if(u.length===1){let i=u[0],m=be(i.isDisabled,c);return jsx("button",{type:"button","aria-label":i.label,disabled:m,className:en,style:{gridTemplateRows:"repeat(1, minmax(0, 1fr))"},onClick:N=>{N.stopPropagation(),i.onClick(c);},children:Y(U[i.name],{disabled:m,tooltip:i.tooltip})})}return jsxs(a$5,{open:l,onOpenChange:r,modal:false,positioning:{placement:"right-start",gutter:0},children:[jsx(b$2,{asChild:true,children:jsxs("button",{type:"button","aria-label":"Row actions",className:en,style:{gridTemplateRows:`repeat(${h}, minmax(0, 1fr))`},onClick:i=>{i.stopPropagation();},children:[z.map((i,m)=>Y(U[i.name],{key:`${i.name}-${m}`,disabled:be(i.isDisabled,c),tooltip:i.tooltip})),p&&Y(U.more)]})}),jsx(c$1,{className:"min-w-48 overflow-hidden rounded-sm p-0",children:jsx("div",{className:"flex flex-col",children:u.map((i,m)=>{let N=U[i.name];if(!N.Icon)return null;let x=be(i.isDisabled,c);return jsx(e$2,{variant:"ghost",size:"md",disabled:x,StartIcon:N.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:v=>{v.stopPropagation(),i.onClick(c),r(false);},type:"button",children:i.label},`${i.name}-${m}`)})})})]})},wn=({rowActions:n})=>({id:M,header:()=>jsx("span",{className:"sr-only",children:"Actions"}),size:30,minSize:30,maxSize:30,enableResizing:false,cell:({row:a})=>n?jsx(Sn,{row:a,rowActions:n}):null}),on=memo(({row:n,isSelected:a$1,type:l})=>jsx(e,{"data-state":a$1&&"selected",className:a(l&&l!=="default"&&hn[l]),style:l&&l!=="default"?{"--row-divider-color":`var(--color-${l}-100)`}:void 0,children:n.getVisibleCells().map(r=>jsx(i,{className:r.column.id===M?a("p-0 align-middle",Z):void 0,children:flexRender(r.column.columnDef.cell,r.getContext())},r.id))}),(n,a)=>n.isSelected===a.isSelected&&n.row.original===a.row.original&&n.type===a.type);on.displayName="DataTableRow";var Nn=150,Dn=Number.POSITIVE_INFINITY,yn=140,Q=(n,a,l)=>Math.min(Math.max(n,a),l),Rn=20,zn=Number.MAX_SAFE_INTEGER,J=n=>{let a=n.size??Nn,l=n.minSize===void 0||n.minSize===Rn?void 0:n.minSize,r=n.maxSize===void 0||n.maxSize===zn?void 0:n.maxSize;return {size:a,minSize:l??Math.min(a,yn),maxSize:r??Dn}},an="dt-col-sizes-",xn="dt-col-ratios-",Pn=n=>{try{localStorage.removeItem(`${xn}${n}`);let a=localStorage.getItem(`${an}${n}`);if(!a)return {};let l=JSON.parse(a),r={};for(let[c,u]of Object.entries(l))typeof u=="number"&&Number.isFinite(u)&&u>0&&(r[c]=u);return r}catch{return {}}},vn=(n,a)=>{try{localStorage.setItem(`${an}${n}`,JSON.stringify(a));}catch{}},In=(n,a)=>{let l={},r=0,c=[];for(let i of n)if(i.isFixed)l[i.id]=i.weight,r+=i.weight;else if(i.isPinned){let m=Q(i.pinnedPx,i.minSize,i.maxSize);l[i.id]=m,r+=m;}else c.push(i);if(c.length===0)return l;let u=Math.max(a-r,0),p=c.map(i=>({column:i,px:i.minSize,frozen:false})),z=p.length+1;for(;z-- >0;){let i=p.filter(d=>!d.frozen);if(i.length===0)break;let m=p.filter(d=>d.frozen).reduce((d,S)=>d+S.px,0),N=u-m,x=i.reduce((d,S)=>d+S.column.weight,0);if(x<=0)break;let v=false;for(let d of i){let S=d.column.weight/x*N;S<d.column.minSize?(d.px=d.column.minSize,d.frozen=true,v=true):S>d.column.maxSize?(d.px=d.column.maxSize,d.frozen=true,v=true):d.px=S;}if(!v)break}for(let i of p)l[i.column.id]=i.px;let h=p.find(i=>i.column.isFill);if(h){let i=p.filter(m=>m.column.id!==h.column.id).reduce((m,N)=>m+N.px,0);l[h.column.id]=Math.max(u-i,h.column.minSize);}return l};function at({columns:n,data:a$4,rowsCount:l,pagination:r,onPaginationChange:c$1,noResults:u,onNextPageClick:p,onPreviousPageClick:z,disableNextPage:h$1,disablePreviousPage:i$1,className:m,onRowsPerPageChange:N,columnOrder:x,columnVisibility:v,rowsPerPageOptions:d$1,enableRowSelection:S=false,rowSelection:pe,onRowSelectionChange:ln,getRowId:fe,rowSelectionTooltip:Ce,setDisabledRowState:Te,tableId:D,isLoading:L,isInitialLoading:he,skeletonRowCount:sn,skeletonColumns:rn=6,getRowType:Se,rowActions:k,...we}){let F=typeof S=="function"||S,Ne=useMemo(()=>{if(!x)return;let t=[k?M:null,F?V:null].filter(s=>s!=null),o=new Set(t);return [...t,...x.filter(s=>!o.has(s))]},[x,F,k]),j$1=useMemo(()=>{let t=[...n];if(F&&t.unshift(Tn({rowSelectionTooltip:Ce,setDisabledRowState:Te})),k){let o=wn({rowActions:k});t.unshift(o);}return t},[F,n,Ce,Te,k]),[I,cn]=useState(null),un=useCallback(t=>cn(t),[]),[ne,De]=useState(0),ye=useRef(false),[y,te]=useState({}),[Re,ze]=useState(null),oe=useRef(null),ae=useRef(null),f$1=useReactTable({data:a$4,columns:j$1,rowCount:l,state:{pagination:r,...Ne!==void 0&&{columnOrder:Ne},columnVisibility:v,...pe!==void 0&&{rowSelection:pe},...D&&{columnSizing:y}},onPaginationChange:c$1,onRowSelectionChange:ln,...D&&{onColumnSizingChange:te},manualPagination:true,getCoreRowModel:getCoreRowModel(),enableRowSelection:typeof S=="function"?t=>S(t.original):S,getRowId:fe?t=>fe(t):void 0}),ie=f$1.getVisibleLeafColumns().map(t=>t.id).join(","),xe=Re!==null,A=useMemo(()=>{let t=f$1.getVisibleLeafColumns().filter(s=>s.getCanResize());return t.length===0?void 0:(t.find(s=>s.columnDef.isFillColumn)??t[t.length-1]).id},[f$1,ie,j$1]),Pe=useMemo(()=>{if(!ne)return {};let t=f$1.getVisibleLeafColumns().map(o=>{let{size:s,minSize:g,maxSize:C}=J(o.columnDef),P=o.getCanResize(),R=o.id===A;return {id:o.id,isFixed:!P,isPinned:P&&!R&&o.id in y,pinnedPx:y[o.id]??s,weight:s,minSize:g,maxSize:C,isFill:R}});return In(t,ne)},[f$1,ie,j$1,ne,y,A]),mn=useMemo(()=>f$1.getVisibleLeafColumns().reduce((t,o)=>{let{size:s,minSize:g,maxSize:C}=J(o.columnDef);return o.getCanResize()?o.id!==A&&o.id in y?t+Q(y[o.id]??s,g,C):t+g:t+s},0),[f$1,ie,j$1,y,A]),ve=(t,o)=>{let s=t.column.id,{size:g,minSize:C,maxSize:P}=J(t.column.columnDef),R=Pe[s]??g,_="touches"in o?o.touches[0]?.clientX??0:o.clientX;o.preventDefault(),o.stopPropagation(),oe.current=s,ze(s),document.body.style.userSelect="none";let q=W=>{"touches"in W&&W.preventDefault();let dn="touches"in W?W.touches[0]?.clientX??_:W.clientX,ke=Q(R+(dn-_),C,P);te(le=>le[s]===ke?le:{...le,[s]:ke});},H=()=>{oe.current=null,ze(null),document.body.style.userSelect="",document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",H),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",H),ae.current=null,I&&De(I.clientWidth);};ae.current=H,document.addEventListener("mousemove",q),document.addEventListener("mouseup",H),document.addEventListener("touchmove",q,{passive:false}),document.addEventListener("touchend",H);};useEffect(()=>()=>ae.current?.(),[]),useEffect(()=>{D&&te(Pn(D));},[D]),useEffect(()=>{if(!I)return;let t=g=>{g>0&&De(g);};t(I.clientWidth);let o=0,s=new ResizeObserver(([g])=>{if(!g||oe.current!==null)return;cancelAnimationFrame(o);let C=I.clientWidth;o=requestAnimationFrame(()=>t(C));});return s.observe(I),()=>{cancelAnimationFrame(o),s.disconnect();}},[I]),useEffect(()=>{if(D){if(!ye.current){ye.current=true;return}xe||vn(D,y);}},[D,xe,y]);let Ie=sn??r?.pageSize??10;return he?jsx(tn,{columns:rn,rows:Ie,hasSelection:F,hasRowActions:!!k,hasPagination:!!r,className:m,...we}):!L&&!he&&!f$1.getRowModel().rows?.length?jsx(f,{...u}):jsxs(a$1,{ref:un,className:m,...we,children:[jsxs(b,{style:{width:"100%",minWidth:mn,tableLayout:"fixed"},children:[jsx("colgroup",{children:f$1.getHeaderGroups()[0].headers.map(t=>{let o=t.column,s=o.getCanResize(),{size:g,minSize:C,maxSize:P}=J(o.columnDef);if(o.id===A)return jsx("col",{span:1,style:{width:"auto",minWidth:C}},t.id);let R=Pe[o.id]??Q(y[o.id]??g,C,P);return jsx("col",{span:1,style:{width:R,minWidth:s?C:R}},t.id)})}),jsx(c,{children:f$1.getHeaderGroups().map(t=>jsx(g,{children:t.headers.map(o=>{if(o.isPlaceholder)return jsx(h,{},o.id);let s=o.column.columnDef,g=flexRender(s.header,o.getContext()),C=o.column.id!==V&&s.headerTooltip!==false,P=s.headerTooltip&&typeof s.headerTooltip!="boolean"?s.headerTooltip:g,R=jsx("span",{className:"line-clamp-1",children:g});return jsxs(h,{className:o.column.id===M?a("p-0",Z):D?"group/resize relative overflow-clip":void 0,children:[jsxs("div",{className:"flex items-center",children:[C?jsx(a$2,{content:P,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"})})]}),D&&o.column.getCanResize()&&o.column.id!==A&&jsx("div",{onMouseDown:_=>ve(o,_),onTouchStart:_=>ve(o,_),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",Re===o.column.id&&"bg-primary-600 opacity-100")})]},o.id)})},t.id))}),jsx(d,{className:"[&>tr:not(:last-child)>td]:shadow-[inset_0_-1px_0_0_var(--row-divider-color,var(--color-primary-200))]",children:L?Array.from({length:Ie},(t,o)=>jsx(e,{children:f$1.getVisibleLeafColumns().map((s,g)=>{let C=s.columnDef;return jsx(i,{className:s.id===V?"align-middle":s.id===M?a("bg-primary-50 p-0 align-middle",Z):void 0,children:s.id===V?jsx(a$3,{className:"m-0.5 size-4.5 rounded-sm"}):s.id===M?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",ee[(o+g)%ee.length])})},s.id)})},o)):f$1.getRowModel().rows.map(t=>jsx(on,{row:t,isSelected:t.getIsSelected(),type:Se?Se(t.original):"default"},t.id))})]}),r&&c$1&&(a$4.length>0||L)&&jsx(j,{rowsPerPageOptions:d$1,rowsCount:l,pagination:r,onPageSizeChange:t=>{f$1.setPagination({pageIndex:0,pageSize:t}),N?.(t);},onPreviousPageClick:z,onNextPageClick:p,isDisableNextPageButton:L||h$1||!!l&&!f$1.getCanNextPage(),isDisablePreviousPageButton:L||i$1||!!l&&!f$1.getCanPreviousPage(),onPageChange:t=>{f$1.setPageIndex(t-1);}})]})}export{at as a};
@@ -1 +1 @@
1
- import {c,d}from'./chunk-AY7M5GEB.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-VOPVBJKL.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var n=0,f=t=>{let e=document.activeElement;if(!e||e.type!=="number")return;document.elementFromPoint(t.clientX,t.clientY)===e&&t.preventDefault();},x=()=>{useEffect(()=>(n===0&&document.addEventListener("wheel",f,{passive:false}),n+=1,()=>{n-=1,n===0&&document.removeEventListener("wheel",f);}),[]);};var L=forwardRef(({className:t,disabled:e,error:o,helperText:v,label:T,readOnly:m,required:s,tooltip:E,...h},b)=>{x();let l=c({error:o,disabled:e,readOnly:m});return jsxs(Field.Root,{"data-error":o,disabled:e,readOnly:m,className:l.root({className:t}),children:[jsx(a,{as:Field.Label,label:T,required:s,tooltip:E}),jsxs("div",{className:l.control(),children:[jsx(Field.Input,{ref:b,required:s,className:l.input(),...h}),o&&jsx("div",{className:a$1(l.trailing(),"cursor-text"),children:jsx(d,{})})]}),jsx(a$2,{as:Field.HelperText,children:v})]})});L.displayName="TextField";export{L as a};
1
+ import {c,d}from'./chunk-XZALFC6K.js';import {a as a$2}from'./chunk-VIMWKUML.js';import {a}from'./chunk-XKMQ2LPV.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Field}from'@ark-ui/react/field';import {forwardRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var n=0,f=t=>{let e=document.activeElement;if(!e||e.type!=="number")return;document.elementFromPoint(t.clientX,t.clientY)===e&&t.preventDefault();},x=()=>{useEffect(()=>(n===0&&document.addEventListener("wheel",f,{passive:false}),n+=1,()=>{n-=1,n===0&&document.removeEventListener("wheel",f);}),[]);};var L=forwardRef(({className:t,disabled:e,error:o,helperText:v,label:T,readOnly:m,required:s,tooltip:E,...h},b)=>{x();let l=c({error:o,disabled:e,readOnly:m});return jsxs(Field.Root,{"data-error":o,disabled:e,readOnly:m,className:l.root({className:t}),children:[jsx(a,{as:Field.Label,label:T,required:s,tooltip:E}),jsxs("div",{className:l.control(),children:[jsx(Field.Input,{ref:b,required:s,className:l.input(),...h}),o&&jsx("div",{className:a$1(l.trailing(),"cursor-text"),children:jsx(d,{})})]}),jsx(a$2,{as:Field.HelperText,children:v})]})});L.displayName="TextField";export{L as a};
@@ -1 +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 {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$1}from'./chunk-CM6ALMTT.js';import {e,s,t}from'./chunk-Z6FU5QVL.js';import {e as e$2}from'./chunk-5D64Y4FM.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$3,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$3&&jsx("span",{className:F(),children:e$3}),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(e$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(e$2,{...C,size:"sm",variant:"ghost",tone:"neutral"})})})(),jsx(a$1,{content:S,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(e$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};
1
+ import {b}from'./chunk-5RKO7FZ7.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 {e as e$1}from'./chunk-PI7DECIN.js';import {a as a$1}from'./chunk-CM6ALMTT.js';import {e,s,t}from'./chunk-TPE6CVKA.js';import {e as e$2}from'./chunk-5D64Y4FM.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$3,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$3&&jsx("span",{className:F(),children:e$3}),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(e$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(e$2,{...C,size:"sm",variant:"ghost",tone:"neutral"})})})(),jsx(a$1,{content:S,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(e$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};