sodtrack-web-ui 0.121.0 → 0.122.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{chunk-2NKOH26P.js → chunk-6RQZ6JRA.js} +1 -1
  2. package/dist/chunk-IFHVHLTC.js +1 -0
  3. package/dist/{chunk-52E6DZUK.js → chunk-IHZ6VWMZ.js} +1 -1
  4. package/dist/{chunk-QSZHWUTE.js → chunk-QNVRZTON.js} +1 -1
  5. package/dist/{chunk-XMLL2NSL.js → chunk-RMGRGUPS.js} +1 -1
  6. package/dist/{chunk-PIFJNNC2.js → chunk-UMPU6MBO.js} +1 -1
  7. package/dist/{chunk-RIT4AVFU.js → chunk-UXEJUHPK.js} +1 -1
  8. package/dist/chunk-W3SG67XH.js +2 -0
  9. package/dist/{chunk-TBU4CEVF.js → chunk-XMI6Z3GT.js} +1 -1
  10. package/dist/components/autocomplete-multiple.js +1 -1
  11. package/dist/components/autocomplete-skeleton.js +1 -1
  12. package/dist/components/autocomplete.js +1 -1
  13. package/dist/components/card-action.d.ts +80 -0
  14. package/dist/components/card-action.js +1 -0
  15. package/dist/components/checkbox.d.ts +1 -1
  16. package/dist/components/empty-state.d.ts +6 -2
  17. package/dist/components/empty-state.js +1 -1
  18. package/dist/components/index.d.ts +3 -2
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/list-item-arrow.js +1 -1
  21. package/dist/components/list-item-button.js +1 -1
  22. package/dist/components/list-item-checkbox-left.js +1 -1
  23. package/dist/components/list-item-checkbox.js +1 -1
  24. package/dist/components/list-item_old.js +1 -1
  25. package/dist/components/radio.d.ts +1 -1
  26. package/dist/components/select-skeleton.js +1 -1
  27. package/dist/components/select.js +1 -1
  28. package/dist/preferences.js +1 -1
  29. package/dist/styles/index.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-AKR7AIFQ.js +0 -2
@@ -1 +1 @@
1
- import {a as a$5}from'./chunk-RBXMHWJQ.js';import {b,e,a as a$3}from'./chunk-PIFJNNC2.js';import {a as a$1}from'./chunk-AKR7AIFQ.js';import {c,b as b$1,d,e as e$1,a as a$4}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {useAsyncList}from'@ark-ui/react/collection';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useRef,useState,useMemo,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var He=a$5,ge="lg",be=({clearable:i,placeholder:u,size:m,state:S})=>{let d=useSelectContext().value.length>0;return jsx(e$1,{as:Select.Control,size:m,state:S,trailingClassName:"pointer-events-none",clearAdornment:i&&d?jsx(a$4,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:s=>s.stopPropagation()}):void 0,indicator:jsx(Select.Indicator,{className:"group/chevron-host flex shrink-0 items-center justify-center",children:jsx(a$3,{})}),children:s=>jsx(Select.Trigger,{className:a$2(s,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:u})})})};function he(i,u){let{className:m,label:S,labelProps:h,required:d$1,error:s,isItemDisabled:v,value:l,helperText:T,placeholder:X,emptyState:Y,onSelect:x,onOpenChange:y,defaultValue:C,options:O,load:r,clearable:$=true,disabled:R,id:ee,invalid:te,readOnly:I,size:oe=ge,...ne}=i,le=Object.hasOwn(i,"defaultValue"),w=Object.hasOwn(i,"value"),P=typeof l=="object"&&l!==null?l.value:l,z=useRef(null),E=useRef(null),[re,ae]=useState(false),o=useAsyncList({load:async({cursor:e,signal:a})=>{if(!r)return {items:[]};let c=e??1,p=await r({page:c,pageSize:b,signal:a});return {items:p.options,cursor:p.hasMore?c+1:void 0}}}),L=useMemo(()=>{let e=r?o.items:O;return typeof l!="object"||l===null||e.some(a=>a.value===l.value)?e:[l,...e]},[o.items,r,O,l]),f=useMemo(()=>createListCollection({items:L,isItemDisabled:v,itemToValue:e=>String(e.value)}),[L,v]),ie=useCallback(e=>{let a=e.items.at(0)??null;x?.(a);},[x]),se=useCallback(e=>{ae(e.open),y?.(e),e.open&&r&&o.empty&&!o.loading&&o.reload();},[o.empty,o.loading,o.reload,r,y]),V=!!r&&re&&o.hasMore&&!o.loading&&!o.error;if(useEffect(()=>{let e=E.current,a=z.current;if(!e||!a||!V)return;let c=new IntersectionObserver(p=>{p[0]?.isIntersecting&&o.loadMore();},{root:a,rootMargin:"0px 0px 64px 0px"});return c.observe(e),()=>c.disconnect()},[V,o.loadMore]),le&&w)throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");let A=!!(s||te),g=c({error:A,disabled:R,readOnly:I});return jsxs(Select.Root,{ref:u,"data-disabled":g==="disabled"?"":void 0,"data-error":d(g)||void 0,disabled:R,id:ee,invalid:A,readOnly:I,required:d$1,collection:f,className:a$2(b$1,m),positioning:{placement:"bottom-end",getAnchorRect:e=>e instanceof HTMLElement?e.parentElement?.getBoundingClientRect()??null:null},onValueChange:ie,onOpenChange:se,value:w?P!=null?[String(P)]:[]:void 0,defaultValue:C!=null?[String(C)]:void 0,...ne,children:[jsx(c$1,{...h,as:Select.Label,label:S,required:d$1}),jsx(be,{clearable:$,placeholder:X,size:oe,state:g}),T&&jsx(a,{children:T}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsxs(Select.Content,{ref:z,"aria-busy":o.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg outline-none",children:[f.items.map(e=>jsx(Select.Item,{item:e,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:e.label})},e.value)),o.loading&&jsx(e,{}),!o.loading&&f.items.length===0&&jsx(a$1,{size:"sm",variant:"empty",...Y,className:"mx-auto"}),r&&jsx("div",{ref:E,className:"h-px","aria-hidden":"true"})]})})}),jsx(Select.HiddenSelect,{required:false})]})}var Q=forwardRef(he);Q.displayName="Select";var qe=Q;export{He as a,ge as b,qe as c};
1
+ import {a as a$5}from'./chunk-RBXMHWJQ.js';import {b,e,a as a$3}from'./chunk-UMPU6MBO.js';import {a as a$1}from'./chunk-W3SG67XH.js';import {c,b as b$1,d,e as e$1,a as a$4}from'./chunk-MQL3NZ6S.js';import {a}from'./chunk-VIMWKUML.js';import {c as c$1}from'./chunk-QZUQ6AZK.js';import {a as a$2}from'./chunk-OBZIYJO7.js';import {Portal}from'@ark-ui/react/portal';import {useAsyncList}from'@ark-ui/react/collection';import {createListCollection,Select,useSelectContext}from'@ark-ui/react/select';import {forwardRef,useRef,useState,useMemo,useCallback,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var He=a$5,ge="lg",be=({clearable:i,placeholder:u,size:m,state:S})=>{let d=useSelectContext().value.length>0;return jsx(e$1,{as:Select.Control,size:m,state:S,trailingClassName:"pointer-events-none",clearAdornment:i&&d?jsx(a$4,{as:Select.ClearTrigger,className:"pointer-events-auto",onClick:s=>s.stopPropagation()}):void 0,indicator:jsx(Select.Indicator,{className:"group/chevron-host flex shrink-0 items-center justify-center",children:jsx(a$3,{})}),children:s=>jsx(Select.Trigger,{className:a$2(s,"flex cursor-pointer items-center text-left after:absolute after:inset-0 after:z-10 after:content-[''] data-disabled:cursor-not-allowed"),children:jsx(Select.ValueText,{className:"min-w-0 flex-1 truncate text-left",placeholder:u})})})};function he(i,u){let{className:m,label:S,labelProps:h,required:d$1,error:s,isItemDisabled:v,value:l,helperText:T,placeholder:X,emptyState:Y,onSelect:x,onOpenChange:y,defaultValue:C,options:O,load:r,clearable:$=true,disabled:R,id:ee,invalid:te,readOnly:I,size:oe=ge,...ne}=i,le=Object.hasOwn(i,"defaultValue"),w=Object.hasOwn(i,"value"),P=typeof l=="object"&&l!==null?l.value:l,z=useRef(null),E=useRef(null),[re,ae]=useState(false),o=useAsyncList({load:async({cursor:e,signal:a})=>{if(!r)return {items:[]};let c=e??1,p=await r({page:c,pageSize:b,signal:a});return {items:p.options,cursor:p.hasMore?c+1:void 0}}}),L=useMemo(()=>{let e=r?o.items:O;return typeof l!="object"||l===null||e.some(a=>a.value===l.value)?e:[l,...e]},[o.items,r,O,l]),f=useMemo(()=>createListCollection({items:L,isItemDisabled:v,itemToValue:e=>String(e.value)}),[L,v]),ie=useCallback(e=>{let a=e.items.at(0)??null;x?.(a);},[x]),se=useCallback(e=>{ae(e.open),y?.(e),e.open&&r&&o.empty&&!o.loading&&o.reload();},[o.empty,o.loading,o.reload,r,y]),V=!!r&&re&&o.hasMore&&!o.loading&&!o.error;if(useEffect(()=>{let e=E.current,a=z.current;if(!e||!a||!V)return;let c=new IntersectionObserver(p=>{p[0]?.isIntersecting&&o.loadMore();},{root:a,rootMargin:"0px 0px 64px 0px"});return c.observe(e),()=>c.disconnect()},[V,o.loadMore]),le&&w)throw new Error("Cannot set both defaultValue and value props on Select. Use one or the other.");let A=!!(s||te),g=c({error:A,disabled:R,readOnly:I});return jsxs(Select.Root,{ref:u,"data-disabled":g==="disabled"?"":void 0,"data-error":d(g)||void 0,disabled:R,id:ee,invalid:A,readOnly:I,required:d$1,collection:f,className:a$2(b$1,m),positioning:{placement:"bottom-end",getAnchorRect:e=>e instanceof HTMLElement?e.parentElement?.getBoundingClientRect()??null:null},onValueChange:ie,onOpenChange:se,value:w?P!=null?[String(P)]:[]:void 0,defaultValue:C!=null?[String(C)]:void 0,...ne,children:[jsx(c$1,{...h,as:Select.Label,label:S,required:d$1}),jsx(be,{clearable:$,placeholder:X,size:oe,state:g}),T&&jsx(a,{children:T}),jsx(Portal,{children:jsx(Select.Positioner,{children:jsxs(Select.Content,{ref:z,"aria-busy":o.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg outline-none",children:[f.items.map(e=>jsx(Select.Item,{item:e,className:"font-inter data-highlighted:bg-primary-100 cursor-pointer py-3 pr-2.5 pl-3 text-sm font-medium data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Select.ItemText,{children:e.label})},e.value)),o.loading&&jsx(e,{}),!o.loading&&f.items.length===0&&jsx(a$1,{size:"sm",variant:"empty",...Y,className:"mx-auto"}),r&&jsx("div",{ref:E,className:"h-px","aria-hidden":"true"})]})})}),jsx(Select.HiddenSelect,{required:false})]})}var Q=forwardRef(he);Q.displayName="Select";var qe=Q;export{He as a,ge as b,qe as c};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-UIZFLYFP.js';import {c as c$1}from'./chunk-QQM4FVO7.js';import {c as c$3}from'./chunk-CY5DLXHV.js';import {d as d$1}from'./chunk-4CAN7PGG.js';import {d as d$2}from'./chunk-7JM2X4UD.js';import {c as c$2}from'./chunk-FYB3QRNL.js';import {d as d$3}from'./chunk-YFDUDY6Y.js';import {a as a$2}from'./chunk-TN46TEUP.js';import {e}from'./chunk-PI7DECIN.js';import {a}from'./chunk-HZYZAFW3.js';import {a as a$3}from'./chunk-7TTDAJTY.js';import {createContext,useContext}from'react';import {tv}from'tailwind-variants';import {jsx}from'react/jsx-runtime';var B=["ring-1 outline-none ring-inset","not-data-disabled:data-selected:not-focus:ring-2","not-data-disabled:focus:ring-primary-800 not-data-disabled:focus:ring-3"],d=tv({slots:{root:["grid grid-cols-[auto_minmax(0,1fr)] rounded-md p-3 [&>:not([data-part=card-action-description])]:col-span-full","transition-[background-color] duration-150 ease-out motion-reduce:transition-none","data-disabled:cursor-not-allowed","data-disabled:[&_[data-part=card-action-title]]:text-neutral-600","data-disabled:[&_[data-part=card-action-description]]:text-neutral-500","data-disabled:[&_[data-part=card-action-icon]]:text-neutral-600"],header:"grid grid-cols-subgrid items-start",leading:["col-start-1 mr-1.5 shrink-0","[&_[data-part=card-action-icon]]:mt-0.75","has-[[data-scope=checkbox][data-part=control]]:mr-1","has-[[data-scope=radio-group][data-part=item-control]]:mr-1","[&_[data-part=card-action-badge-category]]:p-1.25","[&_[data-part=card-action-badge-category]>svg]:size-3.5"],headerContent:"col-start-2 grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center self-center [&>:not([data-part=card-action-title]):not([data-part=card-action-trailing])]:col-span-full",trailing:"col-start-2 row-start-1 ml-6 flex shrink-0 items-center gap-2",title:"font-inter col-start-1 row-start-1 line-clamp-2 text-base leading-[150%] font-medium text-neutral-900",description:"font-inter col-start-2 mt-1 block text-sm leading-[143%] font-normal text-neutral-800",icon:"size-4.5 shrink-0 text-neutral-900",fileIcon:"shrink-0"},variants:{variant:{outline:{root:[...B,"bg-neutral-50"]},fill:{root:[...B,"data-disabled:bg-neutral-100"]},elevated:{root:["bg-neutral-50 outline-0 outline-solid data-disabled:bg-neutral-100","not-data-disabled:data-selected:not-focus:outline-2 not-data-disabled:data-selected:not-focus:-outline-offset-2","not-data-disabled:focus:outline-primary-800 not-data-disabled:focus:outline-3 not-data-disabled:focus:-outline-offset-3"]}},tone:{neutral:{root:"not-data-disabled:data-selected:bg-neutral-200"},primary:{root:["not-data-disabled:[&_[data-part=card-action-title]]:text-primary-700","not-data-disabled:[&_[data-part=card-action-description]]:text-primary-600","not-data-disabled:[&_[data-part=card-action-icon]]:text-primary-700"]}}},compoundVariants:[{variant:["outline","fill"],tone:"neutral",class:{root:"not-data-disabled:data-selected:not-focus:ring-neutral-800"}},{variant:"outline",tone:"neutral",class:{root:"ring-neutral-400 not-data-disabled:not-data-selected:hover:bg-neutral-100"}},{variant:"fill",tone:"neutral",class:{root:"bg-neutral-100 ring-neutral-300 not-data-disabled:not-data-selected:hover:bg-neutral-200 data-disabled:ring-neutral-400"}},{variant:["outline","fill"],tone:"primary",class:{root:["ring-primary-400 data-disabled:ring-neutral-400","not-data-disabled:data-selected:not-focus:ring-primary-800"]}},{variant:"outline",tone:"primary",class:{root:"not-data-disabled:not-data-selected:hover:bg-primary-50 not-data-disabled:data-selected:bg-primary-100"}},{variant:"fill",tone:"primary",class:{root:"bg-primary-50 not-data-disabled:not-data-selected:hover:bg-primary-100 not-data-disabled:data-selected:bg-primary-200"}},{variant:"elevated",tone:"neutral",class:{root:"elevation-9 not-data-disabled:not-data-selected:hover:bg-neutral-100 not-data-disabled:data-selected:not-focus:outline-neutral-800"}},{variant:"elevated",tone:"primary",class:{root:"elevation-3 not-data-disabled:not-data-selected:hover:bg-primary-50 not-data-disabled:data-selected:bg-primary-100 not-data-disabled:data-selected:not-focus:outline-primary-800"}}]}),c=createContext(false),T=({variant:t="outline",tone:a="neutral",selected:i,disabled:e=false,onClick:r,onKeyDown:l,tabIndex:p,children:h,className:I,...k})=>{let S=n=>{!e&&!n.defaultPrevented&&r?.(n);},z=n=>{l?.(n),!(e||n.defaultPrevented||n.target!==n.currentTarget||n.key!=="Enter"&&n.key!==" ")&&(n.preventDefault(),n.repeat||n.currentTarget.click());};return jsx(c.Provider,{value:e,children:jsx("div",{...k,"data-part":"card-action-root","data-variant":t,"data-tone":a,"data-selected":i||void 0,"data-disabled":e||void 0,tabIndex:r?e?-1:p??0:p,className:d({variant:t,tone:a}).root({className:I}),onClick:r?S:void 0,onKeyDown:r?z:l,children:h})})},E=({className:t,...a})=>jsx("div",{...a,"data-part":"card-action-header",className:d().header({className:t})}),w=({className:t,...a})=>jsx("div",{...a,"data-part":"card-action-leading",className:d().leading({className:t})}),D=({className:t,...a})=>jsx("div",{...a,"data-part":"card-action-header-content",className:d().headerContent({className:t})}),_=({className:t,...a})=>jsx("div",{...a,"data-part":"card-action-trailing",className:d().trailing({className:t})}),H=({className:t,...a})=>jsx("span",{...a,"data-part":"card-action-title",className:d().title({className:t})}),O=({className:t,...a})=>jsx("span",{...a,"data-part":"card-action-description",className:d().description({className:t})}),L=({icon:t,className:a,...i})=>jsx(t,{...i,"data-part":"card-action-icon",className:d().icon({className:a})}),W=({className:t,...a$1})=>jsx(a,{...a$1,"data-part":"card-action-file-icon",className:d().fileIcon({className:t})}),F=t=>jsx("img",{...t,"data-part":"card-action-image"}),M=t=>jsx(c$1,{...t,size:"sm"}),G=({disabled:t,onClick:a,...i})=>{let e$1=useContext(c);return jsx(e,{variant:"ghost",tone:"neutral",...i,size:"sm",disabled:e$1||t,onClick:r=>{r.stopPropagation(),a?.(r);}})},K=({disabled:t,onClick:a,...i})=>{let e=useContext(c);return jsx(c$2,{...i,onClick:r=>{r.stopPropagation(),a?.(r);},disabled:e||t})},V=({disabled:t,onClick:a,...i})=>{let e=useContext(c);return jsx(d$1,{...i,onClick:r=>{r.stopPropagation(),a?.(r);},disabled:e||t})},q=({disabled:t,onClick:a,...i})=>{let e=useContext(c);return jsx(d$2,{...i,onClick:r=>{r.stopPropagation(),a?.(r);},size:"sm",disabled:e||t})},J=t=>jsx(a$1,{...t,size:"lg"}),Q=t=>jsx(a$2,{...t,size:"md"}),U=t=>jsx(a$3,{variant:"primary",type:"square",...t,size:"lg"}),X=t=>jsx(d$3,{variant:"light",color:"neutral",...t,"data-part":"card-action-badge-category",size:"sm"}),Y=t=>jsx(c$3,{...t,size:"lg"}),lt={Root:T,Header:E,Leading:w,HeaderContent:D,Trailing:_,Title:H,Description:O,Icon:L,Avatar:M,Image:F,FileIcon:W,Checkbox:K,RadioControl:V,Switch:q,IconButton:G,BadgeStatus:J,BadgeExpandable:Q,BadgeNumber:U,BadgeCategory:X,BadgeAlert:Y};export{lt as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-2NKOH26P.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 {a}from'./chunk-KTD2GEB6.js';import {b}from'./chunk-6RQZ6JRA.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 {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {b}from'./chunk-5B6ZOVKE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-FYB3QRNL.js';import {a as a$8}from'./chunk-AKR7AIFQ.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-WWQW5ZXG.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import Pn from'react-phone-number-input/locale/en.json';import En from'react-phone-number-input/locale/es.json';import Nn 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 vl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import pl from'libphonenumber-js/mobile/examples';var wo=(e,t)=>{let o=useCallback(n=>{e.current&&!e.current.contains(n.target)&&t();},[]);useEffect(()=>(document.addEventListener("pointerdown",o),()=>{document.removeEventListener("pointerdown",o);}),[]);},Ge=wo;var Do=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),je=Do;var So=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(je,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=So;var zo=336,Jl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=zo,j=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),K=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,Q=window.innerHeight-D.bottom>Z,we=D.top>Z;M(Q?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),Ge(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return K(),C.current.addEventListener("mousedown",K),C.current.addEventListener("input",Le),window.addEventListener("scroll",K,true),window.addEventListener("resize",K),()=>{C.current?.removeEventListener("mousedown",K),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",K,true),window.removeEventListener("resize",K);}},[K,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:j,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Uo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Uo;var mi=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var Li=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=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:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Jo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Jo;var nn=150,rn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-nn,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("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:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=rn;var an=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=an;var un=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,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:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(je,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Kt=un;var hn=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),Qt=hn;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,j]=useState(t??[]),K=useCallback(W=>{j(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{j([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),Q=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),Ge(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return Q(),b.current.addEventListener("mousedown",Q),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{b.current?.removeEventListener("mousedown",Q),b.current?.removeEventListener("input",Q),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Z,D,we]),useEffect(()=>{P&&(j(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(j(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(Qt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:K,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Kt,{handleSelect:K,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Ns=e=>jsx($t,{children:jsx(Yt,{...e})});var vn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("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-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(vn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,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(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:Pn,es:En,pt:Nn},An=st.en,Mn=Jt.en,On={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},Fn={clearIdLabel:An,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>On[e]??Fn,kn=(e,t)=>(Jt[t]??Mn)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:kn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let j=lo(A,$);E.current=j,R(j);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ga=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Na=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,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$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={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"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Vn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Un={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},$n=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>$n()?new DOMParser().parseFromString(e,"text/html"):null,Wn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},qn=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Vn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},Gn=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},jn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},Kn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Qn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=jn(a,i),R=Kn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Yn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Qn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Xn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Un[r];l&&n.classList.add(l);}},ge=e=>Wn(e).replace(/>\s+</g,"><").replace(/&nbsp;/g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return qn(n),Gn(n),Yn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Xn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},lr=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,lr(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Vr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Ur={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},$r={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={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:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Wr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},qr=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},Gr=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("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:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Wr(e),[e]),f=useMemo(()=>qr(e),[e]),C=useMemo(()=>Gr(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,j=>$isListNode(j));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Vr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("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:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:$r[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Ur[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},sl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("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",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("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",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?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(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});sl.displayName="RichTextEditor";var Lo={en:Pn,es:En,pt:Nn},hl={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},bl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},gl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>hl[e]??bl,vo=e=>Lo[e]??gl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,pl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Il=({Icon:e,callingCode:t,country:o,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:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("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-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Il,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,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 [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Tl=vl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Tl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var El=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=El;var uu=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Jl as a,uu as b,mi as c,Li as d,Ns as e,ao as f,ga as g,Na as h,ct as i,pt as j,ge as k,ht as l,bt as m,sl as n,Ao as o};
1
+ import {a as a$3}from'./chunk-ORDWXBDZ.js';import {c as c$3,h}from'./chunk-XRFPQJ5P.js';import {a as a$7}from'./chunk-B5KKVXLE.js';import {c as c$6}from'./chunk-JYNJHAGL.js';import {b}from'./chunk-5B6ZOVKE.js';import {d as d$1}from'./chunk-WAUY2MS6.js';import {a as a$4,b as b$2,c as c$4,d as d$2}from'./chunk-NYURVOJI.js';import {c as c$5}from'./chunk-FYB3QRNL.js';import {a as a$8}from'./chunk-W3SG67XH.js';import {c as c$1,e as e$1,a as a$5,b as b$1,d}from'./chunk-MQL3NZ6S.js';import {a as a$6}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {d as d$3}from'./chunk-MP4CHZ2K.js';import {a as a$2}from'./chunk-R6NIURLZ.js';import {a}from'./chunk-AWRP67K4.js';import {e as e$2}from'./chunk-PI7DECIN.js';import {c,q,k,h as h$1}from'./chunk-QMPBFFFC.js';import {e}from'./chunk-WWQW5ZXG.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import*as H from'react';import H__default,{createContext,useMemo,useCallback,forwardRef,useRef,useContext,useEffect,useId,useState}from'react';import*as Ht from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Field,useFieldContext}from'@ark-ui/react/field';import {useListCollection,Combobox}from'@ark-ui/react/combobox';import {useFilter}from'@ark-ui/react/locale';import {Portal}from'@ark-ui/react/portal';import {getDefaultOptions}from'date-fns';import Pn from'react-phone-number-input/locale/en.json';import En from'react-phone-number-input/locale/es.json';import Nn 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 vl,{parsePhoneNumber,getCountryCallingCode}from'react-phone-number-input';import {getExampleNumber}from'libphonenumber-js/mobile';import pl from'libphonenumber-js/mobile/examples';var wo=(e,t)=>{let o=useCallback(n=>{e.current&&!e.current.contains(n.target)&&t();},[]);useEffect(()=>(document.addEventListener("pointerdown",o),()=>{document.removeEventListener("pointerdown",o);}),[]);},Ge=wo;var Do=({title:e,titleLines:t=2,description:o,descriptionLines:n=1,Icon:r,iconAsColumn:l=true,className:i,...s})=>jsxs("div",{className:a$1("flex gap-2 py-4 pr-6 pl-4",l&&"flex-col items-center gap-1",!l&&!o&&"items-center",i),...s,children:[r&&jsx(r,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",l&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:e}),o&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:n?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n}:void 0,children:o})]})]}),je=Do;var So=H__default.memo(({handleSelect:e$1,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:n,noResultsDescriptionLines:r,noResultsAsColumn:l,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:a$2,filteredOptions:d,inputRect:c,inputRef:R,popoverPosition:x,optionsListRef:g,selectedOption:u,options:I,setFilteredOptions:P})=>jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:g,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c?{width:`${c.width}px`,left:c.left,top:x==="bottom"?`${c.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-c.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(je,{title:o,description:n,Icon:t,iconAsColumn:l,descriptionLines:r}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{g.current.style.display="none",R.current.value="",P(I),i();},children:a$2})]})]}),d.map(L=>jsx(b.Root,{disabled:L.disabled,selected:u?.value===L.value,onClick:()=>e$1(L),children:jsxs(b.Content,{children:[jsx(b.Headline,{children:L.label}),L.description&&jsx(b.Description,{className:a$1({"line-clamp-1":s===1,"line-clamp-2":s===2,"line-clamp-3":s===3,"line-clamp-4":s===4}),children:L.description})]})},L.key??L.value))]})})),wt=So;var zo=336,Jl=({options:e,defaultSelectedOption:t,onSelect:o,onClick:n,onInputChange:r,error:l,helperText:i,label:s,placeholder:a,value:d,size:c="md",optionDescriptionLines:R=1,noResultsLabel:x,noResultsIcon:g,noResultsDescription:u,noResultsDescriptionLines:I,noResultsAsColumn:P,noResultsButtonOnClick:L,noResultsButtonLabel:T,className:y,disabled:N})=>{let[b,E]=useState(t??null),f=useRef(null),C=useRef(null),[_,F]=useState(),[U,h]=useState([]),[m,M]=useState("bottom"),[w,A]=useState(),$=zo,j=useCallback(D=>{f.current.style.display="none",C.current.value=D.label,E(D),o?.(D);},[o]),K=useCallback(()=>{if(!C?.current)return;let D=C.current.getBoundingClientRect();F(D);let Z=w?w.height:$,Q=window.innerHeight-D.bottom>Z,we=D.top>Z;M(Q?"bottom":we?"top":"bottom");},[w?.height]),Le=useCallback(()=>{let D=e.filter(Z=>Z.label.toLowerCase().includes(C?.current?.value.toLowerCase()??""));if(h(D),f?.current){let Z=f.current.getBoundingClientRect();A(Z);}},[e]);return useEffect(()=>{h(e);},[e]),useEffect(()=>{if(!d){E(null),C.current&&(C.current.value="");return}(!C.current?.value||b?.value!==d.value)&&(E(d),C.current.value=d.label);},[d]),Ge(f,()=>{f.current.style.display="none",b&&C.current&&(C.current.value=b.label);}),useEffect(()=>{if(C?.current)return K(),C.current.addEventListener("mousedown",K),C.current.addEventListener("input",Le),window.addEventListener("scroll",K,true),window.addEventListener("resize",K),()=>{C.current?.removeEventListener("mousedown",K),C.current?.removeEventListener("input",Le),window.removeEventListener("scroll",K,true),window.removeEventListener("resize",K);}},[K,Le]),jsxs("div",{className:a$1("relative",y),children:[jsx(a$3,{ref:C,autoComplete:"off",list:"",selectMode:true,onChange:D=>{D.target.value||(E(null),o?.(null)),r?.(D);},onClean:()=>{E(null),h(e),o?.(null);},onClick:D=>{f.current.style.display="flex",n?.(D);},onBlur:()=>{b&&C.current&&(C.current.value=b.label);},label:s,helperText:i,placeholder:a,size:c,error:l,disabled:N}),jsx(wt,{handleSelect:j,noResultsLabel:x,NoResultsIcon:g,optionDescriptionLines:R,noResultsAsColumn:P,noResultsButtonLabel:T,noResultsButtonOnClick:L,noResultsDescription:u,noResultsDescriptionLines:I,filteredOptions:U,inputRect:_,inputRef:C,popoverPosition:m,optionsListRef:f,selectedOption:b,options:e,setFilteredOptions:h})]})};var Uo=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,disabled:l=false,className:i,...s})=>jsxs("div",{className:a$1("flex w-full flex-col gap-1",i),...s,children:[jsx("p",{className:a$1("text-sm leading-[130%] break-all",!!n&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),n&&jsx("p",{className:a$1("text-xs leading-[130%]",l?"text-neutral-400":"text-neutral-700"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:n})]}),ce=Uo;var mi=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,badgeContent:i,hasDivider:s=false,disabled:a=false,onSelect:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,onClick:d,hasDivider:s,className:a$1(!a&&"cursor-pointer",c),...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),jsxs("div",{className:"ml-4 flex gap-2",children:[i&&jsx(a$2,{content:i,size:"lg",variant:"alert",className:a$1("self-center",a&&"bg-neutral-400")}),jsx(h$1,{className:"h-4.5 w-4.5 self-center"})]})]});var Li=({children:e,title:t,titleLines:o=1,description:n="",descriptionLines:r,startIcon:l,hasDivider:i=false,disabled:s=false,checked:a,onCheckedChange:d,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,...R,className:a$1("pr-6",c),children:[l&&H__default.cloneElement(l,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),jsx(c$5,{checked:a,onCheckedChange:d,className:"ml-4 self-center",disabled:s})]});var ne=336,Ut=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:()=>{}}),oe=()=>{let e=useContext(Ut);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},$t=({children:e})=>{let t=useRef(null),o=useRef(null),n=useId(),[r,l]=useState(),[i,s]=useState(true),[a,d]=useState([]),[c,R]=useState(-1),[x,g]=useState("bottom"),[u,I]=useState(),[P,L]=useState(ne);return jsx(Ut.Provider,{value:{optionsListRef:t,inputRef:o,autocompleteId:n,inputRect:r,showChips:i,filteredOptions:a,currentFocus:c,popoverPosition:x,setFilteredOptions:d,setCurrentFocus:R,setShowChips:s,setPopoverPosition:g,setInputRect:l,optionsListHeight:P,optionsListRect:u,setOptionsListRect:I,setOptionsListHeight:L},children:e})};var Jo=({option:e,onMountWidth:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&t?.(o.current.clientWidth);},[]),jsx(d$1,{variant:"fill",color:"neutral",ref:o,className:"shrink-0",size:"md",hasCloseIcon:false,children:e.label})},Wt=Jo;var nn=150,rn=H__default.memo(({selectedOptions:e,error:t,onCleanSelectedOptions:o,disabled:n,size:r})=>{let{autocompleteId:l,inputRect:i,inputRef:s,optionsListRef:a}=oe(),d=H__default.useRef(null),[c$1,R]=H__default.useState(new Map),x=useMemo(()=>{if(!i?.width)return [];let u=0,I=i.width-nn,P=0;for(let L=0;L<e.length&&(P+=c$1.get(L)??0,!(P>I));L++)u++;return e.slice(0,u)},[i?.width,e,c$1]),g=useCallback(()=>{n||(s?.current?.focus(),a.current.style.display="flex");},[n]);return jsxs("div",{onClick:g,className:a$1("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:i?.width?i?.width:void 0,height:i?.height?i?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:x.map((u,I)=>jsx(Wt,{option:u,onMountWidth:P=>R(L=>new Map(L).set(I,P))},`chip-input-${l}-${u.value}`))}),e.length>x.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!t&&jsx(a$2,{content:String(e.length),size:r}),t&&e.length>0&&jsx(c,{className:"text-error-700 h-6 w-6",onClick:u=>{u.stopPropagation(),o();}})]})}),qt=rn;var an=H__default.memo(({option:e,index:t,onPressOption:o,isSelected:n,optionDescriptionLines:r})=>{let{currentFocus:l,inputRef:i}=oe();return jsxs(b.Root,{selected:l===t,disabled:e.disabled,onMouseDown:s=>{e.disabled||(i?.current?.value&&s.preventDefault(),o?.(e,s));},children:[jsxs(b.Content,{children:[jsx(b.Headline,{children:e.label}),e.description&&jsx(b.Description,{className:a$1({"line-clamp-1":r===1,"line-clamp-2":r===2,"line-clamp-3":r===3,"line-clamp-4":r===4}),children:e.description})]}),jsx(b.Trailing,{children:jsx(b.CheckboxControl,{checked:n})})]})}),rt=an;var un=H__default.memo(({selectedOptions:e$1,handleSelect:t,NoResultsIcon:o,noResultsLabel:n,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:s,optionDescriptionLines:a$1,noResultsButtonLabel:d})=>{let{popoverPosition:c,optionsListRef:R,filteredOptions:x,inputRect:g,autocompleteId:u,inputRef:I,optionsListHeight:P}=oe(),L=useCallback(y=>e$1.some(N=>N.value===y.value),[e$1]),T=useMemo(()=>e$1.filter(y=>y.label.toLowerCase().includes(I?.current?.value.toLowerCase()??"")),[e$1,I?.current?.value]);return jsx(Ht.Root,{asChild:true,children:jsxs("div",{ref:R,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:g?{width:`${g.width}px`,left:g.left,top:c==="bottom"?`${g.bottom}px`:void 0,bottom:c==="top"?`${window.innerHeight-g.top}px`:void 0,maxHeight:P+"px"}:void 0,children:[x.length===0&&jsxs("div",{className:"elevation-8 flex max-h-88 flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(je,{title:n,description:r,Icon:o,iconAsColumn:i,descriptionLines:l}),s&&jsxs(Fragment,{children:[jsx(a,{}),jsx(e,{variant:"ghost",className:"my-3 w-fit self-center",onClick:()=>{R.current.style.display="none",I.current.value="",s();},children:d})]})]}),T.map((y,N)=>jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`)),x.map((y,N)=>!e$1.some(b=>b.value===y.value)&&jsx(rt,{option:y,index:N,onPressOption:b=>t(b),isSelected:L(y),optionDescriptionLines:a$1},`autocomplete-option-${u}-${y.key??y.value}`))]})})}),Kt=un;var hn=H__default.memo(({selectedOptions:e,onSelect:t,error:o,helperText:n,label:r,placeholder:l,options:i,onInputChange:s,size:a,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:R,optionsListRef:x,inputRef:g}=oe();return jsx(a$3,{ref:g,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:u=>{c(-1),s?.(u.target.value);},onClean:()=>{c(-1),R(i),t?.(null,e);},onClick:()=>{d||(x.current.style.display="flex");},error:o,helperText:n,label:r,placeholder:l,fixedTopLabel:e.length>0,size:a})}),Qt=hn;var Yt=({options:e,defaultSelectedOptions:t,onSelect:o,error:n,helperText:r,label:l,placeholder:i,noResultsLabel:s,noResultsIcon:a,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:R,noResultsButtonOnClick:x,noResultsButtonLabel:g,className:u,onInputChange:I,value:P,loading:L,size:T="md",optionDescriptionLines:y=1,disabled:N})=>{let{inputRef:b,optionsListRef:E,setFilteredOptions:f,setShowChips:C,setInputRect:_,setPopoverPosition:F,setCurrentFocus:U,showChips:h,setOptionsListRect:m,optionsListRect:M,setOptionsListHeight:w}=oe(),A=useRef(false),[$,j]=useState(t??[]),K=useCallback(W=>{j(J=>{let le,ye=J.findIndex(Fo=>Fo.value===W.value);return ye===-1?(le=J.concat(W),o?.(W,le),le):(le=J.toSpliced(ye,1),o?.(W,le),le)});},[o]),Le=useCallback(()=>{j([]),f(e),o?.(null,[]);},[]),D=useCallback(()=>{C(false);},[]),Z=useCallback(()=>{C(true);},[]),Q=useCallback(()=>{if(!b?.current)return;let W=b.current.getBoundingClientRect();_(W);let J=M?M.height>ne?ne:M.height:ne,le=window.innerHeight-W.bottom>J,ye=W.top>J;F(le?"bottom":ye?"top":"bottom"),w(ye?ne:window.innerHeight-W.bottom>ne?ne:window.innerHeight-W.bottom);},[M?.height]),we=useCallback(()=>{let W=e.filter(J=>J.label.toLowerCase().includes(b?.current?.value.toLowerCase()??""));if(f(W),E?.current){let J=E.current.getBoundingClientRect();m(J);}},[e,E?.current]);return useEffect(()=>{f(e);},[e]),Ge(E,()=>{E.current.style.display="none",U(-1);}),useEffect(()=>{if(b?.current)return Q(),b.current.addEventListener("mousedown",Q),b.current.addEventListener("input",we),b.current.addEventListener("focusin",D),b.current.addEventListener("focusout",Z),window.addEventListener("scroll",Q,true),window.addEventListener("resize",Q),()=>{b.current?.removeEventListener("mousedown",Q),b.current?.removeEventListener("input",Q),b.current?.removeEventListener("focusout",Z),b.current?.removeEventListener("focusin",D),window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[Q,Z,D,we]),useEffect(()=>{P&&(j(P),C(true));},[P]),useEffect(()=>{L||t&&t.length&&!A.current&&(j(t),A.current=true,C(true));},[t,L]),jsxs("div",{className:a$1("relative",u),children:[jsx(Qt,{selectedOptions:$,onSelect:o,error:n,helperText:r,label:l,placeholder:i,handleSelect:K,options:e,onInputChange:I,size:T,disabled:N}),h&&jsx(qt,{selectedOptions:$,disabled:N,error:n,onCleanSelectedOptions:Le,size:T}),jsx(Kt,{handleSelect:K,selectedOptions:$,noResultsLabel:s,NoResultsIcon:a,optionDescriptionLines:y,noResultsAsColumn:R,noResultsButtonLabel:g,noResultsButtonOnClick:x,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Ns=e=>jsx($t,{children:jsx(Yt,{...e})});var vn=({code:e,codeClassName:t})=>jsxs("div",{className:"flex justify-center gap-2",children:[jsx(a$7,{country:e,className:"size-4.5"}),jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",t),children:e})]}),Zt=({className:e,disabled:t,error:o,onChange:n,options:r,readOnly:l,translations:i,value:s})=>{let a$2=useFieldContext(),d=H.useRef(null),c=H.useId(),[R,x]=H.useState(""),{contains:g}=useFilter({sensitivity:"base"}),u=c$1({disabled:t,error:o,readOnly:l}),I=H.useMemo(()=>r.map(f=>({...f,key:f.code})),[r]),P=H.useMemo(()=>I.find(f=>f.key===s),[I,s]),{collection:L,filter:T,set:y}=useListCollection({initialItems:I,itemToString:f=>`${f.label} ${f.code}`,itemToValue:f=>f.key,filter:(f,C,_)=>g(f,C)||g(_.code,C.toUpperCase())});H.useEffect(()=>{y(I);},[I,y]);let N=H.useCallback(({inputValue:f})=>{let C=f??"";x(C),T(C),d.current?.scrollTo({top:0});},[T]),b=H.useCallback(({open:f})=>{f&&(x(""),T(""));},[T]),E=H.useCallback(({items:f})=>{let C=f[0]?.code;C&&n(C);},[n]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:L,disabled:t||l,ids:{input:c,label:a$2.ids.label},inputBehavior:"autohighlight",inputValue:R,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:P?[P.key]:[],onInputValueChange:N,onOpenChange:b,onValueChange:E,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{className:a$1("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-['']",u==="error"?"bg-danger-20 after:bg-input-ring-error":u==="disabled"||u==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":u==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/id-field:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",e),disabled:t||l,focusable:true,children:P&&jsx(vn,{code:P.code,codeClassName:a$1(u==="error"&&"text-danger-600",(u==="disabled"||u==="readOnly"||u==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:f=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!t&&f.inputValue.length>0?jsx(a$5,{onClick:()=>{f.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:C=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:i.searchCountryPlaceholder,className:C})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:d,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":L.items.length===0}),children:L.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:L.items.map(f=>jsxs(Combobox.Item,{item:f,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(a$7,{country:f.code,className:"size-4.5"}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:f.label}),jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:f.code}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",f.key===s?"opacity-100":"opacity-0")})]},f.key))})})]})})})]})};var st={en:"Clear identification number",es:"Limpiar n\xFAmero de identificaci\xF3n",pt:"Limpar n\xFAmero de identifica\xE7\xE3o"},Jt={en:Pn,es:En,pt:Nn},An=st.en,Mn=Jt.en,On={es:{clearIdLabel:st.es,searchCountryPlaceholder:"Buscar..."},pt:{clearIdLabel:st.pt,searchCountryPlaceholder:"Pesquisar..."}},Fn={clearIdLabel:An,searchCountryPlaceholder:"Search..."},eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"},to=e=>On[e]??Fn,kn=(e,t)=>(Jt[t]??Mn)[e]??e,oo=({localeCode:e})=>c$3.map(t=>({code:t,label:kn(t,e)})).sort((t,o)=>t.label.localeCompare(o.label)),no=a$4,ro=b$2,lo=(e,t)=>{let o=t.trim();return !o||!c$4(e,o).isValid?o:d$2(e,o)};var io=()=>{},ao=H.forwardRef(({autoComplete:e,className:t,country:o,disabled:n,error:r,helperText:l,id:i,label:s,labelProps:a,name:d$1,onBlur:c,onChange:R=io,onCountryChange:x=io,placeholder:g,readOnly:u,required:I,value:P},L)=>{let[T,y]=H.useState(P??""),N=H.useRef(null),b=eo(),E=H.useRef(P??""),f=c$1({disabled:n,error:r,readOnly:u});H.useEffect(()=>{let A=P??"";A!==E.current&&(E.current=A,y(A));},[P]);let C=H.useMemo(()=>to(b),[b]),_=H.useMemo(()=>oo({localeCode:b}),[b]),F=H.useMemo(()=>ro(o??"")||g||no,[o,g]),U=H.useCallback((A,$)=>{let j=lo(A,$);E.current=j,R(j);},[R]),h=H.useCallback(A=>{y(A),U(o??"",A);},[o,U]),m=H.useCallback(A=>{x(A),U(A,T);},[T,x,U]),M=H.useCallback(A=>{N.current=A,typeof L=="function"?L(A):L&&(L.current=A);},[L]),w=H.useCallback(()=>{h(""),N.current?.focus();},[h]);return jsxs(Field.Root,{"data-error":d(f)||void 0,disabled:n,id:i,invalid:r,readOnly:u,className:a$1(b$1,t),children:[s&&jsx(c$2,{...a,as:Field.Label,label:s,required:I}),jsx(e$1,{state:f,className:"group/id-field pl-0",clearAdornment:T?jsx(a$5,{ariaLabel:C.clearIdLabel,onClick:w}):void 0,children:A=>jsxs(Fragment,{children:[jsx(Zt,{disabled:n,error:r,onChange:m,options:_,readOnly:u,translations:C,value:o}),jsx(Field.Input,{"aria-required":I||void 0,autoComplete:e,className:a$1(A,"pl-3"),name:d$1,onBlur:c,onChange:$=>h($.target.value),placeholder:F,value:T,ref:M})]})}),l&&jsx(a$6,{as:r?Field.ErrorText:Field.HelperText,children:l})]})});ao.displayName="IdField";var ga=({children:e$1,title:t,titleLines:o=1,description:n,descriptionLines:r=1,StartIcon:l,hasDivider:i=false,disabled:s=false,actionButton:a,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:s,hasDivider:i,isSelected:d,...R,className:c,children:[l&&jsx(l,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:s}),a&&jsx(Fragment,{children:a.isIcon?jsx(e$2,{...a,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:s??a.disabled}):jsx(e,{...a,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:s??a.disabled})})]});var Na=({title:e,description:t="",descriptionLines:o,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:i,className:s,chipStatus:a,chipExpandable:d,...c})=>jsxs(te,{hasDescription:!!t,disabled:r,hasDivider:n,...c,className:a$1("pr-6",s),children:[jsx(c$5,{checked:l,onCheckedChange:i,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$1("line-clamp-1 text-sm leading-[130%] break-all",!!t&&"font-medium"),children:e}),d&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$6,{...d})}),a&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$3,{...a,size:"xs",className:"shrink-0"})})]}),t&&jsx("p",{className:a$1("text-xs leading-[130%]",r?"text-neutral-400":"text-neutral-700",{"line-clamp-1":o===1,"line-clamp-2":o===2,"line-clamp-3":o===3,"line-clamp-4":o===4}),children:t})]})]});var ct={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"},pt={headings:["h1","h2","h3"],textFormat:["bold","italic","underline"],lists:true,indent:true,alignment:["left","center","right","justify"],undoRedo:true};var mt=({readOnly:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>{t.setEditable(!e);},[t,e]),null};var ut=({editorRef:e})=>{let[t]=useLexicalComposerContext();return useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null);}),[t,e]),null};var Vn={"ql-align-left":"left","ql-align-center":"center","ql-align-right":"right","ql-align-justify":"justify"},Un={center:"ql-align-center",right:"ql-align-right",justify:"ql-align-justify"},$n=()=>typeof window<"u"&&typeof window.DOMParser<"u",co=e=>$n()?new DOMParser().parseFromString(e,"text/html"):null,Wn=e=>(e??"").replace(/\s+/g," ").trim(),ft=e=>{let t=0;for(let o of Array.from(e.classList)){let n=o.match(/^ql-indent-(\d+)$/);if(!n)continue;let r=Number.parseInt(n[1],10);Number.isFinite(r)&&(t=Math.max(t,r)),e.classList.remove(o);}return t},qn=e=>{let t=e.querySelectorAll("[class*='ql-align-']");for(let o of Array.from(t))for(let n of Array.from(o.classList)){let r=Vn[n];r&&(r!=="left"&&(o.style.textAlign=r),o.classList.remove(n));}},Gn=e=>{let t=e.querySelectorAll("[class*='ql-indent-']");for(let o of Array.from(t)){if(o.tagName==="LI")continue;let n=ft(o);n>0&&(o.style.paddingInlineStart=`${n*3}em`);}},jn=(e,t)=>{let o=e.getAttribute("data-list");return o==="bullet"?"ul":o==="ordered"?"ol":t},Kn=e=>{let t=e.cloneNode(true);return t.removeAttribute("data-list"),t.removeAttribute("data-checked"),t.removeAttribute("data-indent"),ft(t),t},dt=(e,t)=>e.createElement(t),Qn=(e,t)=>{let o=Array.from(e.children).filter(a=>a.tagName==="LI");if(o.length===0||!o.some(a=>a.hasAttribute("data-list")?true:Array.from(a.classList).some(d=>/^ql-indent-\d+$/.test(d))))return;let r=[],l=[],i=e.tagName==="UL"?"ul":"ol";for(let a of o){let d=ft(a),c=jn(a,i),R=Kn(a);for(;l.length>0&&l[l.length-1].level>d;)l.pop();if(l.length===0){let g=dt(t,c);r.push(g),l.push({level:0,kind:c,listElement:g});}let x=l[l.length-1];for(;x.level<d;){let g=x.listElement.lastElementChild;if(!g||g.tagName!=="LI")break;let u=dt(t,c);g.appendChild(u),x={level:x.level+1,kind:c,listElement:u},l.push(x);}if(x=l[l.length-1],x.kind!==c){let g=dt(t,c);if(l.length===1)r.push(g),l[0]={level:0,kind:c,listElement:g};else {let I=l[l.length-2].listElement.lastElementChild;I&&I.tagName==="LI"?(I.appendChild(g),l[l.length-1]={level:x.level,kind:c,listElement:g}):(r.push(g),l.length=1,l[0]={level:0,kind:c,listElement:g});}x=l[l.length-1];}x.listElement.appendChild(R);}if(r.length===0)return;let s=t.createDocumentFragment();for(let a of r)s.appendChild(a);e.replaceWith(s);},Yn=(e,t)=>{let o=Array.from(e.querySelectorAll("ol, ul"));for(let n of o)Qn(n,t);},po=(e,t)=>{let o=e.tagName==="UL"?"bullet":"ordered",n=Array.from(e.children).filter(r=>r.tagName==="LI");for(let r of n){r.setAttribute("data-list",o);for(let i of Array.from(r.classList))/^ql-indent-\d+$/.test(i)&&r.classList.remove(i);t>0&&r.classList.add(`ql-indent-${t}`);let l=Array.from(r.children).filter(i=>i.tagName==="UL"||i.tagName==="OL");for(let i of l)po(i,t+1);}},Xn=e=>{let t=e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li");for(let o of Array.from(t)){let n=o;for(let i of Array.from(n.classList))i.startsWith("ql-align-")&&n.classList.remove(i);let r=n.style.textAlign.trim().toLowerCase(),l=Un[r];l&&n.classList.add(l);}},ge=e=>Wn(e).replace(/>\s+</g,"><").replace(/&nbsp;/g," "),ht=e=>{let t=e??"";if(!t.trim())return "";let o=co(t);if(!o)return t;let{body:n}=o;return qn(n),Gn(n),Yn(n,o),n.innerHTML},bt=e=>{if(!e.trim())return "";let t=co(e);if(!t)return e;let{body:o}=t,n=Array.from(o.querySelectorAll("ul, ol"));for(let r of n)po(r,0);return Xn(o),o.innerHTML};var Xe=e=>{let t="";return e.getEditorState().read(()=>{t=$generateHtmlFromNodes(e,null);}),bt(t)},lr=(e,t)=>{let o=ht(t);e.update(()=>{let n=$getRoot();if(n.clear(),!o.trim()){n.append($createParagraphNode());return}let l=new DOMParser().parseFromString(o,"text/html"),i=$generateNodesFromDOM(e,l);if(i.length===0){n.append($createParagraphNode());return}n.select(),$insertNodes(i);});},gt=({value:e,isSyncingRef:t})=>{let[o]=useLexicalComposerContext(),n=useRef(null);return useEffect(()=>{let r=e??"";if(n.current!==null&&ge(r)===ge(n.current))return;let l=Xe(o);ge(l)!==ge(r)&&(t.current=true,lr(o,r),queueMicrotask(()=>{t.current=false;})),n.current=r;},[o,t,e]),null};var uo=["left","center","right","justify"];var fo=["bold","italic","underline","strikethrough","code"];var Vr={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"},Ur={left:jsx(AlignLeftIcon,{className:"size-4"}),center:jsx(AlignCenterIcon,{className:"size-4"}),right:jsx(AlignRightIcon,{className:"size-4"}),justify:jsx(AlignJustifyIcon,{className:"size-4"})},$r={left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},Ae={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:"</>"})},Me={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code"},Wr=e=>{let t=e.textFormat;return t===false?[]:Array.isArray(t)?fo.filter(o=>t.includes(o)):["bold","italic","underline"]},qr=e=>{let t=e.alignment;return t===false?[]:Array.isArray(t)?uo.filter(o=>t.includes(o)):["left","center","right","justify"]},Gr=e=>{if(e.headings===false)return [];let t=Array.isArray(e.headings)?e.headings:["h1","h2","h3"];return [{value:"paragraph",label:"Normal"},...t.map(o=>({value:o,label:o.toUpperCase()}))]},Oe=()=>jsx("div",{className:"mx-1 h-5 w-px bg-neutral-300"}),G=({label:e,onClick:t,icon:o,active:n=false,disabled:r=false})=>jsx("button",{type:"button","aria-label":e,title:e,disabled:r,onClick:t,className:a$1("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:o}),Lt=({config:e,className:t})=>{let[o]=useLexicalComposerContext(),n=useId(),[r,l]=useState(false),[i,s]=useState(false),[a,d]=useState(false),[c,R]=useState(false),[x,g]=useState(false),[u,I]=useState(false),[P,L]=useState(false),[T,y]=useState("paragraph"),[N,b]=useState("left"),E=useMemo(()=>Wr(e),[e]),f=useMemo(()=>qr(e),[e]),C=useMemo(()=>Gr(e),[e]),_=useCallback(()=>{let m=$getSelection();if(!$isRangeSelection(m))return;d(m.hasFormat("bold")),R(m.hasFormat("italic")),g(m.hasFormat("underline")),I(m.hasFormat("strikethrough")),L(m.hasFormat("code"));let M=m.anchor.getNode(),w=M.getKey()==="root"?M:M.getTopLevelElementOrThrow();if($isListNode(w))y(w.getListType()==="number"?"ol":"ul");else {let $=$findMatchingParent(w,j=>$isListNode(j));$isListNode($)?y($.getListType()==="number"?"ol":"ul"):y($isHeadingNode(w)?w.getTag():w.getType());}let A=$isElementNode(w)?w.getFormatType():"";b(A==="center"||A==="right"||A==="justify"?A:"left");},[]);useEffect(()=>mergeRegister(o.registerUpdateListener(({editorState:m})=>{m.read(()=>{_();});}),o.registerCommand(SELECTION_CHANGE_COMMAND,()=>(_(),false),1),o.registerCommand(CAN_UNDO_COMMAND,m=>(l(m),false),1),o.registerCommand(CAN_REDO_COMMAND,m=>(s(m),false),1)),[o,_]);let F=m=>{o.dispatchCommand(FORMAT_TEXT_COMMAND,Vr[m]);},U=m=>{o.update(()=>{let M=$getSelection();if($isRangeSelection(M)){if(m==="paragraph"){$setBlocksType(M,()=>$createParagraphNode());return}$setBlocksType(M,()=>$createHeadingNode(m));}});},h=m=>{if(T===(m==="bullet"?"ul":"ol")){o.dispatchCommand(REMOVE_LIST_COMMAND,void 0);return}o.dispatchCommand(m==="bullet"?INSERT_UNORDERED_LIST_COMMAND:INSERT_ORDERED_LIST_COMMAND,void 0);};return jsxs("div",{className:a$1("flex flex-wrap items-center gap-1 border-b border-neutral-300 bg-neutral-100 px-2 py-1.5",t),children:[e.undoRedo!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Undo",onClick:()=>o.dispatchCommand(UNDO_COMMAND,void 0),disabled:!r,icon:jsx(UndoIcon,{className:"size-4"})}),jsx(G,{label:"Redo",onClick:()=>o.dispatchCommand(REDO_COMMAND,void 0),disabled:!i,icon:jsx(RedoIcon,{className:"size-4"})}),jsx(Oe,{})]}),C.length>0&&jsxs(Fragment,{children:[jsx("label",{className:"sr-only",htmlFor:n,children:"Text style"}),jsx("select",{id:n,value:T.startsWith("h")?T:"paragraph",onChange:m=>U(m.target.value),className:a$1("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:C.map(m=>jsx("option",{value:m.value,children:m.label},m.value))}),jsx(Oe,{})]}),E.length>0&&jsxs(Fragment,{children:[E.includes("bold")&&jsx(G,{label:Me.bold,onClick:()=>F("bold"),icon:Ae.bold,active:a}),E.includes("italic")&&jsx(G,{label:Me.italic,onClick:()=>F("italic"),icon:Ae.italic,active:c}),E.includes("underline")&&jsx(G,{label:Me.underline,onClick:()=>F("underline"),icon:Ae.underline,active:x}),E.includes("strikethrough")&&jsx(G,{label:Me.strikethrough,onClick:()=>F("strikethrough"),icon:Ae.strikethrough,active:u}),E.includes("code")&&jsx(G,{label:Me.code,onClick:()=>F("code"),icon:Ae.code,active:P}),jsx(Oe,{})]}),e.lists!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Bulleted list",onClick:()=>h("bullet"),icon:jsx(ListIcon,{className:"size-4"}),active:T==="ul"}),jsx(G,{label:"Numbered list",onClick:()=>h("number"),icon:jsx(ListOrderedIcon,{className:"size-4"}),active:T==="ol"}),jsx(Oe,{})]}),e.indent!==false&&jsxs(Fragment,{children:[jsx(G,{label:"Decrease indent",onClick:()=>o.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentDecreaseIcon,{className:"size-4"})}),jsx(G,{label:"Increase indent",onClick:()=>o.dispatchCommand(INDENT_CONTENT_COMMAND,void 0),icon:jsx(IndentIncreaseIcon,{className:"size-4"})}),jsx(Oe,{})]}),f.length>0&&jsx(Fragment,{children:f.map(m=>jsx(G,{label:$r[m],onClick:()=>o.dispatchCommand(FORMAT_ELEMENT_COMMAND,m),icon:Ur[m],active:N===m},m))})]})};var Co=e=>{if(e!==void 0)return typeof e=="number"?`${e}px`:e},sl=forwardRef(({value:e,onChange:t,onBlur:o,onError:n,placeholder:r="Write your content...",readOnly:l=false,showToolbar:i=true,toolbarConfig:s=pt,className:a,editorClassName:d,toolbarClassName:c,autoFocus:R=false,minHeight:x=160,maxHeight:g,error:u=false,errorMessage:I,editorRef:P},L)=>{let T=useRef(false),y=useMemo(()=>({namespace:"SodtrackRichTextEditor",theme:ct,onError:(b,E)=>{if(n){n(b,E);return}console.error("RichTextEditor error",b);},nodes:[HeadingNode,ListNode,ListItemNode]}),[n]),N={minHeight:Co(x),maxHeight:Co(g),overflowY:g?"auto":void 0};return jsx(LexicalComposer,{initialConfig:y,children:jsxs("div",{className:"w-full",children:[jsxs("div",{ref:L,className:a$1("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",u?"border-error-500 focus-within:border-error-500 focus-within:ring-error-500":"border-neutral-500",l&&"border-neutral-300 bg-neutral-50 focus-within:ring-0",a),"data-error":u,"data-readonly":l,children:[i&&!l&&jsx(Lt,{config:s,className:c}),jsx(RichTextPlugin,{contentEditable:jsx(ContentEditable,{className:a$1("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",l&&"cursor-default",d),style:N,onBlur:o,"aria-invalid":u}),placeholder:l?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(mt,{readOnly:l}),jsx(gt,{value:e,isSyncingRef:T}),R&&!l&&jsx(AutoFocusPlugin,{}),P&&jsx(ut,{editorRef:P}),jsx(OnChangePlugin,{ignoreSelectionChange:true,onChange:(b,E)=>{!t||T.current||t(Xe(E),b);}})]}),u&&I&&jsx("p",{className:"text-error-500 mt-1 text-xs leading-[133%]",children:I})]})})});sl.displayName="RichTextEditor";var Lo={en:Pn,es:En,pt:Nn},hl={es:{clearPhoneNumberLabel:"Eliminar n\xFAmero de tel\xE9fono",searchCountryPlaceholder:"Buscar..."},pt:{clearPhoneNumberLabel:"Limpar n\xFAmero de telefone",searchCountryPlaceholder:"Pesquisar..."}},bl={clearPhoneNumberLabel:"Clear phone number",searchCountryPlaceholder:"Search..."},gl=Lo.en,yo="9 1234 5678",yt="ZZ",Ro=()=>{},Io=e=>hl[e]??bl,vo=e=>Lo[e]??gl,To=e=>{if(e)try{let t=parsePhoneNumber(e)?.country;return !t||!h(t)?void 0:t}catch{return}},Po=e=>{if(e)return getExampleNumber(e,pl)?.formatNational()},Ze=e=>e??yt,Eo=()=>{let e=getDefaultOptions().locale?.code?.split("-")[0];return e==="es"||e==="pt"?e:"en"};var Il=({Icon:e,callingCode:t,country:o,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:o,label:n})}),t&&jsx("span",{className:a$1("text-sm leading-[143%] font-medium text-neutral-800",r),children:`+${t}`})]}),No=({"aria-label":e,className:t,disabled:o,error:n,iconComponent:r,name:l,onBlur:i,onChange:s,onFocus:a$2,options:d,readOnly:c,translations:R,value:x})=>{let g=useFieldContext(),u=H.useRef(null),I=H.useId(),[P,L]=H.useState(""),{contains:T}=useFilter({sensitivity:"base"}),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>d.filter(h$1=>h$1.value!==void 0&&h(h$1.value)).map(h=>({callingCode:getCountryCallingCode(h.value),country:h.value,key:Ze(h.value),label:h.label})),[d]),b=H.useMemo(()=>N.find(h=>h.key===Ze(x)),[N,x]),{collection:E,filter:f,set:C}=useListCollection({initialItems:N,itemToString:h=>h.callingCode?`${h.label} +${h.callingCode}`:h.label,itemToValue:h=>h.key,filter:(h,m,M)=>{let w=m.trim().replace(/^\+/,"");return T(h,m)||(M.country?T(M.country,m.toUpperCase()):false)||(M.callingCode?T(M.callingCode,w)||T(`+${M.callingCode}`,m):false)}});H.useEffect(()=>{C(N);},[N,C]);let _=H.useCallback(({inputValue:h})=>{let m=h??"";L(m),f(m),u.current?.scrollTo({top:0});},[f]),F=H.useCallback(({open:h})=>{h&&(L(""),f(""));},[f]),U=H.useCallback(({value:h$1})=>{let m=h$1[0];if(!m||m===yt){s(void 0);return}h(m)&&s(m);},[s]);return jsxs(Combobox.Root,{className:"h-full shrink-0",collection:E,disabled:o||c,ids:{input:I,label:g.ids.label},inputBehavior:"autohighlight",inputValue:P,lazyMount:true,openOnChange:false,openOnClick:false,positioning:{placement:"bottom-end",offset:{mainAxis:12},sameWidth:false},selectionBehavior:"preserve",unmountOnExit:true,value:b?[b.key]:[],onInputValueChange:_,onOpenChange:F,onValueChange:U,children:[jsx(Combobox.Control,{className:"h-full",children:jsx(Combobox.Trigger,{"aria-label":e,className:a$1("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-['']",y==="error"?"bg-danger-20 after:bg-input-ring-error":y==="disabled"||y==="readOnly"?"after:bg-input-ring-disabled bg-neutral-200":y==="errorReadOnly"?"after:bg-input-ring-error bg-neutral-200":"group-focus-within/phone:after:bg-input-ring-focus after:bg-input-ring data-[state=open]:after:bg-input-ring-focus bg-neutral-200",t),disabled:o||c,focusable:true,name:l,onBlur:i,onFocus:a$2,children:b&&jsx(Il,{Icon:r,callingCode:b.callingCode,country:b.country,countryName:b.label,callingCodeClassName:a$1(y==="error"&&"text-danger-600",(y==="disabled"||y==="readOnly"||y==="errorReadOnly")&&"text-input-text-disabled")})})}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{className:"elevation-9 z-layer data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 w-75 origin-(--transform-origin) overflow-hidden rounded-sm bg-neutral-50",children:[jsxs("div",{className:"pb-0",children:[jsx(Combobox.Context,{children:h=>jsx(e$1,{className:"m-1 mb-0",size:"md",state:"default",clearAdornment:!o&&h.inputValue.length>0?jsx(a$5,{onClick:()=>{h.setInputValue("","clear-trigger");}}):void 0,indicator:jsx(q,{className:"pointer-events-none size-4.5 text-neutral-800"}),children:m=>jsx(Combobox.Input,{autoComplete:"off","data-1p-ignore":true,"data-lpignore":"true",placeholder:R.searchCountryPlaceholder,className:m})})}),jsx(a,{className:"mt-2"})]}),jsx(Combobox.List,{ref:u,className:a$1("h-72 overflow-auto outline-none",{"flex flex-col items-center justify-center":E.items.length===0}),children:E.items.length===0?jsx(a$8,{size:"sm",variant:"not-found"}):jsx(Combobox.ItemGroup,{children:E.items.map(h=>jsxs(Combobox.Item,{item:h,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 [&_.PhoneInputCountryIconImg]:size-4.5!",children:jsx(r,{"aria-hidden":true,country:h.country,label:h.label})}),jsx(Combobox.ItemText,{className:"min-w-0 flex-1 truncate text-sm leading-[143%] font-medium",children:h.label}),h.callingCode&&jsx("span",{className:"shrink-0 text-sm text-neutral-600",children:`+${h.callingCode}`}),jsx(k,{className:a$1("ml-auto size-4 shrink-0",h.key===Ze(x)?"opacity-100":"opacity-0")})]},h.key))})})]})})})]})};var Tl=vl,Ao=H.forwardRef(({className:e,defaultCountry:t,disabled:o,error:n,helperText:r,id:l,label:i,labelProps:s,onChange:a=Ro,placeholder:d$1,readOnly:c,required:R,value:x,...g},u)=>{let[I,P]=H.useState(()=>To(x)??t),L=H.useRef(null),T=Eo(),y=c$1({disabled:o,error:n,readOnly:c}),N=H.useMemo(()=>Io(T),[T]),b=H.useMemo(()=>vo(T),[T]),E=H.useMemo(()=>Po(I)??d$1??yo,[d$1,I]),f=H.useCallback(F=>{P(F);},[]),C=H.useCallback(F=>{L.current=F,typeof u=="function"?u(F):u&&(u.current=F);},[u]),_=H.useCallback(()=>{a(void 0),L.current?.focus();},[a]);return jsxs(Field.Root,{"data-error":d(y)||void 0,disabled:o,id:l,invalid:n,readOnly:c,className:a$1(b$1,e),children:[i&&jsx(c$2,{...s,as:Field.Label,label:i,required:R}),jsx(e$1,{state:y,className:"group/phone pl-0 [&_.PhoneInputCountryIconImg]:size-4.5!",clearAdornment:x?jsx(a$5,{ariaLabel:N.clearPhoneNumberLabel,onClick:_}):void 0,children:F=>jsx(Tl,{...g,className:"contents",ref:C,countrySelectComponent:No,countrySelectProps:{error:n,translations:N},defaultCountry:t,disabled:o,flagComponent:a$7,initialValueFormat:"national",inputComponent:Field.Input,labels:b,numberInputProps:{"aria-required":R||void 0,className:a$1(F,"pl-3"),placeholder:E},readOnly:c,value:x,onChange:a,onCountryChange:f})}),r&&jsx(a$6,{as:n?Field.ErrorText:Field.HelperText,children:r})]})});Ao.displayName="PhoneInput";var El=({children:e,hasDescription:t=false,disabled:o=false,hasDivider:n=false,className:r,isSelected:l,onClick:i,...s})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",t?"py-3":"py-3.5",o?"cursor-not-allowed text-neutral-400":a$1("hover:bg-primary-100 focus:bg-primary-200",!!i?"cursor-pointer":"cursor-default"),l&&"bg-primary-200",r),onClick:d=>{o||i?.(d);},...s,children:e}),n&&jsx(a,{})]}),te=El;var du=({children:e,title:t,titleLines:o,description:n="",descriptionLines:r,startIcon:l,endIcon:i,hasDivider:s=false,disabled:a=false,isSelected:d=false,className:c,...R})=>jsxs(te,{hasDescription:!!n,disabled:a,hasDivider:s,className:c,isSelected:d,...R,children:[l&&H__default.cloneElement(l,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(ce,{title:t,titleLines:o,description:n,descriptionLines:r,disabled:a}),i&&H__default.cloneElement(i,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{Jl as a,du as b,mi as c,Li as d,Ns as e,ao as f,ga as g,Na as h,ct as i,pt as j,ge as k,ht as l,bt as m,sl as n,Ao as o};
@@ -1 +1 @@
1
- import {d}from'./chunk-WAUY2MS6.js';import {c,a as a$1,d as d$1,e as e$1}from'./chunk-PIFJNNC2.js';import {c as c$1,e,a as a$2,b,d as d$2}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {k}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var U=B=>{let{label:E,labelProps:q,value:p,onValueChange:h,placeholder:H,error:x,required:C,disabled:r,readOnly:d$3,options:R,load:c$3,helperText:D,emptyState:F,optionDescriptionLines:f=1,clearable:z=true,growable:u=true,className:G}=B,l=c({options:R,load:c$3,selectedOptions:p}),m=l.optionByValue,v=useMemo(()=>p.map(t=>m.get(String(t.value))??t),[m,p]),b$1=c$1({error:!!x,disabled:r,readOnly:d$3}),W=useCallback(t=>{l.search(t.inputValue);},[l.search]),j=useCallback(t=>{l.handleOpenChange(t);},[l.handleOpenChange]),Q=useCallback(t=>{h(t.value.flatMap(n=>m.get(n)??[]));},[h,m]);return jsxs(Combobox.Root,{collection:l.collection,value:p.map(t=>String(t.value)),onInputValueChange:W,onOpenChange:j,onValueChange:Q,multiple:true,inputBehavior:"none",openOnClick:true,invalid:!!x,disabled:r,readOnly:d$3,"data-disabled":b$1==="disabled"?"":void 0,"data-error":d$2(b$1)||void 0,className:a(b,G),children:[jsx(c$2,{...q,as:Combobox.Label,label:E,required:C}),jsx(Combobox.Context,{children:t=>jsx(e,{as:Combobox.Control,className:a(u&&"h-auto min-h-(--height-input) items-start",!u&&"overflow-hidden",r&&"cursor-not-allowed"),state:b$1,trailingClassName:u?"self-start py-2":void 0,clearAdornment:z&&p.length>0?jsx(a$2,{as:Combobox.ClearTrigger,onClick:n=>n.stopPropagation()}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$1,{})}),children:n=>jsxs("div",{className:a("flex min-w-0 flex-1 items-center gap-1 py-2",u?"flex-wrap":"h-full overflow-hidden"),children:[v.map(i=>jsx(d,{color:"neutral",variant:"fill",size:"md",className:a("max-w-full shrink-0 [&>button]:shrink-0",r&&"bg-neutral-50 text-neutral-600 ring-neutral-600 hover:bg-neutral-50"),disabled:r,hasCloseIcon:!d$3&&!r,onClose:()=>{t.clearValue(String(i.value));},children:jsx("span",{className:"truncate",children:i.label})},String(i.value))),jsx(Combobox.Input,{className:a(n,"h-auto px-0 py-0 disabled:cursor-not-allowed"),"aria-required":C||void 0,placeholder:v.length===0?H:""})]})})}),jsx(a$3,{children:D}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:l.contentRef,"aria-busy":l.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[l.collection.items.map(t=>jsx(Combobox.Item,{item:t,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:n,disabled:i})=>jsxs("div",{className:a("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",t.description&&"py-3",i?"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:t.label}),t.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:f?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:f,WebkitBoxOrient:"vertical"}:void 0,children:t.description})]}),jsx("div",{className:a("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",i&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(t.value))),!l.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(Combobox.Context,{children:t=>jsx(d$1,{query:c$3?l.serverQuery:t.inputValue,emptyState:F})})})]}),l.loading&&jsx(e$1,{}),c$3&&jsx("div",{ref:l.sentinelRef,className:"h-px"})]})})})]})};U.displayName="AutocompleteMultiple";export{U as a};
1
+ import {d}from'./chunk-WAUY2MS6.js';import {c,a as a$1,d as d$1,e as e$1}from'./chunk-UMPU6MBO.js';import {c as c$1,e,a as a$2,b,d as d$2}from'./chunk-MQL3NZ6S.js';import {a as a$3}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {k}from'./chunk-QMPBFFFC.js';import {a}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var U=B=>{let{label:E,labelProps:q,value:p,onValueChange:h,placeholder:H,error:x,required:C,disabled:r,readOnly:d$3,options:R,load:c$3,helperText:D,emptyState:F,optionDescriptionLines:f=1,clearable:z=true,growable:u=true,className:G}=B,l=c({options:R,load:c$3,selectedOptions:p}),m=l.optionByValue,v=useMemo(()=>p.map(t=>m.get(String(t.value))??t),[m,p]),b$1=c$1({error:!!x,disabled:r,readOnly:d$3}),W=useCallback(t=>{l.search(t.inputValue);},[l.search]),j=useCallback(t=>{l.handleOpenChange(t);},[l.handleOpenChange]),Q=useCallback(t=>{h(t.value.flatMap(n=>m.get(n)??[]));},[h,m]);return jsxs(Combobox.Root,{collection:l.collection,value:p.map(t=>String(t.value)),onInputValueChange:W,onOpenChange:j,onValueChange:Q,multiple:true,inputBehavior:"none",openOnClick:true,invalid:!!x,disabled:r,readOnly:d$3,"data-disabled":b$1==="disabled"?"":void 0,"data-error":d$2(b$1)||void 0,className:a(b,G),children:[jsx(c$2,{...q,as:Combobox.Label,label:E,required:C}),jsx(Combobox.Context,{children:t=>jsx(e,{as:Combobox.Control,className:a(u&&"h-auto min-h-(--height-input) items-start",!u&&"overflow-hidden",r&&"cursor-not-allowed"),state:b$1,trailingClassName:u?"self-start py-2":void 0,clearAdornment:z&&p.length>0?jsx(a$2,{as:Combobox.ClearTrigger,onClick:n=>n.stopPropagation()}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$1,{})}),children:n=>jsxs("div",{className:a("flex min-w-0 flex-1 items-center gap-1 py-2",u?"flex-wrap":"h-full overflow-hidden"),children:[v.map(i=>jsx(d,{color:"neutral",variant:"fill",size:"md",className:a("max-w-full shrink-0 [&>button]:shrink-0",r&&"bg-neutral-50 text-neutral-600 ring-neutral-600 hover:bg-neutral-50"),disabled:r,hasCloseIcon:!d$3&&!r,onClose:()=>{t.clearValue(String(i.value));},children:jsx("span",{className:"truncate",children:i.label})},String(i.value))),jsx(Combobox.Input,{className:a(n,"h-auto px-0 py-0 disabled:cursor-not-allowed"),"aria-required":C||void 0,placeholder:v.length===0?H:""})]})})}),jsx(a$3,{children:D}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:l.contentRef,"aria-busy":l.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 w-(--reference-width) overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[l.collection.items.map(t=>jsx(Combobox.Item,{item:t,className:"data-highlighted:bg-primary-100 cursor-pointer data-disabled:cursor-not-allowed",children:jsx(Combobox.ItemContext,{children:({selected:n,disabled:i})=>jsxs("div",{className:a("font-inter flex flex-row items-center px-3 py-3.5 text-neutral-900 transition-colors","data-highlighted:bg-primary-100",t.description&&"py-3",i?"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:t.label}),t.description&&jsx("p",{className:"text-xs leading-[130%] text-neutral-700",style:f?{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:f,WebkitBoxOrient:"vertical"}:void 0,children:t.description})]}),jsx("div",{className:a("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",i&&(n?"bg-neutral-400":"bg-neutral-100 ring-neutral-300")),children:n&&jsx(k,{className:"size-3.5 text-neutral-50"})})]})})},String(t.value))),!l.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(Combobox.Context,{children:t=>jsx(d$1,{query:c$3?l.serverQuery:t.inputValue,emptyState:F})})})]}),l.loading&&jsx(e$1,{}),c$3&&jsx("div",{ref:l.sentinelRef,className:"h-px"})]})})})]})};U.displayName="AutocompleteMultiple";export{U as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-AKR7AIFQ.js';import {g}from'./chunk-QMPBFFFC.js';import {c}from'./chunk-C7TLKKPT.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx,jsxs}from'react/jsx-runtime';import {useListCollection}from'@ark-ui/react/combobox';import {useAsyncList}from'@ark-ui/react/collection';import {useFilter,useLocaleContext}from'@ark-ui/react/locale';import {useMemo,useRef,useEffect,useCallback}from'react';var k=({className:t})=>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",t)});var V=300,F=10,P=t=>t?.startsWith("es")?{loading:"Cargando...",noData:"A\xFAn no hay informaci\xF3n"}:t?.startsWith("pt")?{loading:"Carregando...",noData:"Nenhuma informa\xE7\xE3o dispon\xEDvel ainda"}:{loading:"Loading...",noData:"No information available yet"},te=t=>{let s=!!t.load,D=useMemo(()=>({sensitivity:"base"}),[]),{contains:b}=useFilter(D),p=useRef(null),S=useRef(null),h=useRef(""),a=useRef(void 0),l=useRef(false),r=useAsyncList({load:async e=>{if(!t.load)return {items:[]};let o=e.cursor??1,n=await t.load({query:e.filterText,page:o,pageSize:F,signal:e.signal});return {items:n.options,cursor:n.hasMore?o+1:void 0}},onSuccess:()=>{l.current&&(l.current=false,p.current?.scrollTo({top:0}));}}),c=useRef(r);c.current=r;let m=useMemo(()=>{let e=t.options??r.items;if(!t.selectedOptions.length)return e;let o=new Set(e.map(g=>g.value)),n=t.selectedOptions.filter(g=>!o.has(g.value));return n.length?[...n,...e]:e},[r.items,t.options,t.selectedOptions]),d=s?r.items:m,I=useMemo(()=>new Map(m.map(e=>[String(e.value),e])),[m]),{collection:w,filter:u,set:T}=useListCollection({initialItems:d,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,o,n)=>b(e,o)||!!n.description&&b(n.description,o)}),A=r.hasMore&&!r.loading&&!r.error;useEffect(()=>{T(d),u(h.current);},[d,u,T]),useEffect(()=>()=>clearTimeout(a.current),[]),useEffect(()=>{let e=S.current;if(!e||!A)return;let o=new IntersectionObserver(n=>{n[0]?.isIntersecting&&c.current.loadMore();},{root:p.current,rootMargin:"0px 0px 64px 0px"});return o.observe(e),()=>o.disconnect()},[A]);let f=useCallback(e=>{if(!s){h.current=e,u(e);return}clearTimeout(a.current),a.current=setTimeout(()=>{let o=c.current;o.filterText===e&&!o.empty||(l.current=true,o.setFilterText(e));},V);},[u,s]),z=useCallback((e,o=false)=>{if(!e.open||e.reason==="input-change")return;if(!s){o&&f("");return}let n=c.current;if(o&&n.filterText){clearTimeout(a.current),l.current=true,n.setFilterText("");return}n.reload();},[s,f]);return {collection:w,optionByValue:I,serverQuery:r.filterText,loading:r.loading,contentRef:p,sentinelRef:S,search:f,handleOpenChange:z}},oe=t=>{let s=useLocaleContext();return t.query.trim()?jsx(a$1,{size:"sm",variant:"not-found",...t.emptyState}):jsx(a$1,{size:"sm",...t.emptyState,variant:"empty",title:P(s.locale).noData,description:""})},ne=()=>{let t=useLocaleContext();return jsxs("div",{role:"status",className:"font-inter flex items-center justify-center gap-3 px-3 py-4 text-sm font-medium text-neutral-900",children:[jsx(c,{size:"md"}),P(t.locale).loading]})};export{k as a,F as b,te as c,oe as d,ne as e};
1
+ import {a as a$1}from'./chunk-W3SG67XH.js';import {g}from'./chunk-QMPBFFFC.js';import {c}from'./chunk-C7TLKKPT.js';import {a}from'./chunk-OBZIYJO7.js';import {jsx,jsxs}from'react/jsx-runtime';import {useListCollection}from'@ark-ui/react/combobox';import {useAsyncList}from'@ark-ui/react/collection';import {useFilter,useLocaleContext}from'@ark-ui/react/locale';import {useMemo,useRef,useEffect,useCallback}from'react';var k=({className:t})=>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",t)});var V=300,F=10,P=t=>t?.startsWith("es")?{loading:"Cargando...",noData:"A\xFAn no hay informaci\xF3n"}:t?.startsWith("pt")?{loading:"Carregando...",noData:"Nenhuma informa\xE7\xE3o dispon\xEDvel ainda"}:{loading:"Loading...",noData:"No information available yet"},te=t=>{let s=!!t.load,D=useMemo(()=>({sensitivity:"base"}),[]),{contains:b}=useFilter(D),p=useRef(null),S=useRef(null),h=useRef(""),a=useRef(void 0),l=useRef(false),r=useAsyncList({load:async e=>{if(!t.load)return {items:[]};let o=e.cursor??1,n=await t.load({query:e.filterText,page:o,pageSize:F,signal:e.signal});return {items:n.options,cursor:n.hasMore?o+1:void 0}},onSuccess:()=>{l.current&&(l.current=false,p.current?.scrollTo({top:0}));}}),c=useRef(r);c.current=r;let m=useMemo(()=>{let e=t.options??r.items;if(!t.selectedOptions.length)return e;let o=new Set(e.map(g=>g.value)),n=t.selectedOptions.filter(g=>!o.has(g.value));return n.length?[...n,...e]:e},[r.items,t.options,t.selectedOptions]),d=s?r.items:m,I=useMemo(()=>new Map(m.map(e=>[String(e.value),e])),[m]),{collection:w,filter:u,set:T}=useListCollection({initialItems:d,itemToString:e=>e.label,itemToValue:e=>String(e.value),filter:(e,o,n)=>b(e,o)||!!n.description&&b(n.description,o)}),A=r.hasMore&&!r.loading&&!r.error;useEffect(()=>{T(d),u(h.current);},[d,u,T]),useEffect(()=>()=>clearTimeout(a.current),[]),useEffect(()=>{let e=S.current;if(!e||!A)return;let o=new IntersectionObserver(n=>{n[0]?.isIntersecting&&c.current.loadMore();},{root:p.current,rootMargin:"0px 0px 64px 0px"});return o.observe(e),()=>o.disconnect()},[A]);let f=useCallback(e=>{if(!s){h.current=e,u(e);return}clearTimeout(a.current),a.current=setTimeout(()=>{let o=c.current;o.filterText===e&&!o.empty||(l.current=true,o.setFilterText(e));},V);},[u,s]),z=useCallback((e,o=false)=>{if(!e.open||e.reason==="input-change")return;if(!s){o&&f("");return}let n=c.current;if(o&&n.filterText){clearTimeout(a.current),l.current=true,n.setFilterText("");return}n.reload();},[s,f]);return {collection:w,optionByValue:I,serverQuery:r.filterText,loading:r.loading,contentRef:p,sentinelRef:S,search:f,handleOpenChange:z}},oe=t=>{let s=useLocaleContext();return t.query.trim()?jsx(a$1,{size:"sm",variant:"not-found",...t.emptyState}):jsx(a$1,{size:"sm",...t.emptyState,variant:"empty",title:P(s.locale).noData,description:""})},ne=()=>{let t=useLocaleContext();return jsxs("div",{role:"status",className:"font-inter flex items-center justify-center gap-3 px-3 py-4 text-sm font-medium text-neutral-900",children:[jsx(c,{size:"md"}),P(t.locale).loading]})};export{k as a,F as b,te as c,oe as d,ne as e};
@@ -1 +1 @@
1
- import {b}from'./chunk-TBU4CEVF.js';import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var i={md:"h-(--height-input-md)",lg:"h-(--height-input)"},n=({size:m=b,className:p})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",p),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(i[m],"w-full rounded-lg")})]});export{n as a};
1
+ import {b}from'./chunk-XMI6Z3GT.js';import {a}from'./chunk-KTD2GEB6.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {jsxs,jsx}from'react/jsx-runtime';var i={md:"h-(--height-input-md)",lg:"h-(--height-input)"},n=({size:m=b,className:p})=>jsxs("div",{className:a$1("flex w-full flex-col gap-2",p),children:[jsx(a,{className:"h-4 w-15 rounded-sm"}),jsx(a,{className:a$1(i[m],"w-full rounded-lg")})]});export{n as a};
@@ -0,0 +1,2 @@
1
+ import {e}from'./chunk-WWQW5ZXG.js';import {getDefaultOptions}from'date-fns';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var r='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="116" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.595 118.918c-28.848 0-52.234-23.533-52.234-52.564s23.386-52.563 52.234-52.563 52.234 23.533 52.234 52.563-23.386 52.564-52.234 52.564"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M106.662 24.929q.031-.368.031-.745c0-4.758-3.838-8.62-8.566-8.62-4.068 0-7.478 2.86-8.35 6.688a6.8 6.8 0 0 0-2.112-.333c-3.783 0-6.854 3.09-6.854 6.897s3.071 6.897 6.854 6.897h18.649c2.96 0 5.364-2.418 5.364-5.398 0-2.861-2.218-5.206-5.016-5.386" clip-rule="evenodd"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M115.385 99.846H10.792a.615.615 0 0 1-.613-.618c0-.34.275-.617.613-.617h104.593c.339 0 .614.276.614.617a.616.616 0 0 1-.614.618m-108.693 0H.614A.616.616 0 0 1 0 99.228c0-.34.275-.617.614-.617h6.078c.338 0 .613.276.613.617a.615.615 0 0 1-.613.618" clip-rule="evenodd"/><path fill="%23f3f6f5" fill-rule="evenodd" d="M12.48 12.2a6 6 0 0 1-.02-.475c0-3.035 2.448-5.499 5.464-5.499 2.595 0 4.77 1.824 5.326 4.266a4.4 4.4 0 0 1 1.347-.212c2.413 0 4.372 1.971 4.372 4.4 0 2.428-1.96 4.399-4.372 4.399H12.702c-1.889 0-3.422-1.543-3.422-3.444a3.436 3.436 0 0 1 3.2-3.435" clip-rule="evenodd"/><path fill="%23f3f6f5" d="m94.572 72.734-6.26 10.92-10.218 2.765-11.414 3.073-7.13 1.918-.045-.061a4.43 4.43 0 0 0 3.81-3.282l11.722-44.01-6.26-10.92-9.7-2.614 18.352-4.948c2.348-.638 4.798.787 5.418 3.152z"/><path fill="%23fff" d="m58.553 30.39 10.223 2.755 6.263 10.919-4.013 15.072-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.631 2.372-3.071 3.787-5.425 3.153l-33.04-8.91c-2.353-.632-3.762-3.09-3.132-5.458l5.89-22.116 1.18-4.437 5.795-21.764c.631-2.367 3.073-3.785 5.426-3.152l18.54 5.001Z"/><path fill="%23cfd9d7" d="m88.31 83.66-2.294-8.612 8.557-2.307-6.264 10.92ZM68.776 33.139l-2.295 8.618 8.558 2.307z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m35.057 60.641 23.056 6.217a.808.808 0 0 0 .415-1.56l-23.056-6.216a.808.808 0 0 0-.415 1.56Zm2.197-8.253 23.056 6.215a.8.8 0 0 0 .982-.57.81.81 0 0 0-.567-.99L37.669 50.83a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Zm5.349 19.13 1.666.45a.808.808 0 0 0 .415-1.56l-1.666-.45a.808.808 0 0 0-.415 1.56m-9.743-2.626 5.855 1.578a.808.808 0 0 0 .415-1.56l-5.855-1.577a.8.8 0 0 0-.982.57.81.81 0 0 0 .567.99Z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="M57.652 39.047a1 1 0 0 1-.234-.031c-3.279-.886-5.232-4.292-4.354-7.591l1.588-5.963.02-.064c.674-2.32 3.063-3.69 5.375-3.07a4.38 4.38 0 0 1 2.672 2.069 4.42 4.42 0 0 1 .443 3.36l-1.588 5.963a2.65 2.65 0 0 1-1.236 1.62 2.62 2.62 0 0 1-2.014.267 2.64 2.64 0 0 1-1.61-1.244 2.66 2.66 0 0 1-.264-2.024l1.587-5.963a.897.897 0 0 1 1.102-.64c.48.129.765.626.636 1.109l-1.587 5.962a.86.86 0 0 0 .602 1.051.855.855 0 0 0 1.046-.607l1.587-5.962a2.62 2.62 0 0 0-.263-1.987 2.6 2.6 0 0 0-1.58-1.224c-1.362-.366-2.828.498-3.199 1.89l-.014.047-1.565 5.879c-.622 2.335.76 4.745 3.082 5.372a.906.906 0 0 1-.232 1.781"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M93.71 72.62 82.07 28.934c-.506-1.936-2.512-3.1-4.432-2.579l-7.466 2.014a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.463-2.012c2.774-.754 5.67.93 6.402 3.722l11.724 44.007a.8.8 0 0 1-.08.613l-6.26 10.92a.8.8 0 0 1-.487.375L78.302 87.2l-11.415 3.073-7.13 1.918a.8.8 0 0 1-.983-.571.81.81 0 0 1 .568-.989l7.13-1.918 11.413-3.072 9.897-2.68z" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m70.252 58.927-2.66 9.986-.59 2.217-1.198 4.5-3.258 12.234c-.517 1.943-2.515 3.102-4.443 2.582l-33.04-8.91c-1.927-.518-3.08-2.53-2.564-4.469a.802.802 0 1 0-1.55-.418c-.744 2.797.92 5.7 3.7 6.446l33.039 8.91c2.78.75 5.662-.922 6.408-3.723l3.257-12.233 1.199-4.501.59-2.217 2.66-9.986a.802.802 0 1 0-1.55-.418M28.389 54.95l1.18-4.437 5.795-21.764c.517-1.938 2.516-3.1 4.444-2.58l10.029 2.705a.807.807 0 0 0 .416-1.56l-10.03-2.705c-2.78-.749-5.663.926-6.408 3.722L28.02 50.095l-1.181 4.438c-.114.43.14.873.567.988a.803.803 0 0 0 .983-.57Z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.595" x2="56.595" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116v100H0z"/></clipPath></defs></svg>';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="176" height="150" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M85 178a79 79 0 1 1 0-157 79 79 0 0 1 0 157"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M161 37za13 13 0 0 0-25-3 10 10 0 1 0-4 21h28a8 8 0 0 0 1-17M174 150H16a1 1 0 0 1 0-2h158a1 1 0 0 1 0 2M10 150H1a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2" clip-rule="evenodd"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M19 18a8 8 0 0 1 16-2 7 7 0 1 1 2 13H19a5 5 0 0 1 0-11" clip-rule="evenodd"/><path fill="%23fff" d="M134 131q-1 8-9 9H50q-8-1-8-9V47q0-8 8-9h75q8 1 9 9z"/><path fill="%23bdcbc9" d="M112 38v6q-1 5-6 6H71q-6-1-6-6v-6z"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M78 76h44a1 1 0 1 0 0-2H78a1 1 0 0 0 0 2M78 86h44a1 1 0 1 0 0-2H78a1 1 0 0 0 0 2" clip-rule="evenodd"/><path fill="%23e1e7e6" d="M68 84q0 4-4 4h-7q-3 0-3-4v-7q0-3 3-4h7q4 1 4 4z"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M78 106h44a1 1 0 1 0 0-2H78a1 1 0 0 0 0 2M78 116h44a1 1 0 1 0 0-2H78a1 1 0 0 0 0 2" clip-rule="evenodd"/><path fill="%23e1e7e6" d="M68 114q0 4-4 4h-7q-3-1-3-4v-7q0-3 3-4h7q4 0 4 4z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M43 47q1-8 7-8h75q7 0 8 8v62a1 1 0 0 0 2 0V47q0-10-10-11H50q-9 1-10 11a1 1 0 0 0 3 0M133 131q-1 8-8 8H50q-7 0-7-8V86a1 1 0 0 0-3 0v45q1 10 10 11h75q10-1 10-11a1 1 0 0 0-2 0" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="85.4" x2="85.4" y1="173.5" y2="20.7" gradientUnits="userSpaceOnUse"><stop offset=".3" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h175v150H0z"/></clipPath></defs></svg>';var s='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.563-23.533-52.563-52.564s23.533-52.563 52.563-52.563 52.564 23.533 52.564 52.564-23.533 52.563-52.564 52.563"/><path fill="%23cfd9d7" fill-rule="evenodd" d="M107.335 24.929q.031-.368.031-.745c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.86-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387M116.114 99.845H10.861a.617.617 0 0 1 0-1.234h105.253a.618.618 0 0 1 0 1.234M6.733 99.845H.616a.618.618 0 0 1 0-1.234h6.117a.617.617 0 0 1 0 1.234" clip-rule="evenodd"/><path fill="%23e1e7e6" fill-rule="evenodd" d="M12.557 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.401 4.401 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4H12.78a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%23fff" d="M50.567 25.552c-14.48 0-26.225 11.745-26.225 26.225s11.745 26.211 26.225 26.211c5.125 0 9.89-1.467 13.92-4.003a26.1 26.1 0 0 0 8.303-8.301 26.2 26.2 0 0 0 3.99-13.907c0-14.48-11.732-26.225-26.213-26.225m-.002 46.985c-11.446 0-20.76-9.313-20.76-20.762 0-11.446 9.314-20.761 20.76-20.761 11.449 0 20.763 9.314 20.763 20.761 0 11.449-9.314 20.762-20.763 20.762"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M50.564 71.627c-10.944 0-19.85-8.905-19.85-19.852 0-10.945 8.906-19.852 19.85-19.852 10.948 0 19.854 8.907 19.854 19.852a.91.91 0 0 0 1.82 0c0-11.948-9.723-21.671-21.674-21.671-11.947 0-21.67 9.723-21.67 21.671 0 11.95 9.724 21.671 21.67 21.671a.91.91 0 0 0 0-1.82" clip-rule="evenodd"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M23.432 51.777c0 14.982 12.153 27.121 27.135 27.121a26.94 26.94 0 0 0 14.405-4.143 27 27 0 0 0 8.589-8.59 27.1 27.1 0 0 0 4.127-14.388c0-14.983-12.138-27.135-27.122-27.135a.91.91 0 0 0 0 1.819c13.979 0 25.303 11.338 25.303 25.316 0 4.922-1.418 9.533-3.851 13.425a25.2 25.2 0 0 1-8.013 8.011 25.13 25.13 0 0 1-13.438 3.866c-13.978 0-25.316-11.325-25.316-25.302a.91.91 0 0 0-1.82 0" clip-rule="evenodd"/><path fill="%23e1e7e6" d="m68.335 80.955 10.651 10.464c3.137 3.136 8.27 3.136 11.409 0 3.138-3.138 3.138-8.272 0-11.409L79.743 69.543z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="m69.627 80.95 10.002 9.826c2.783 2.782 7.337 2.782 10.123 0a7.15 7.15 0 0 0 2.054-5.748.91.91 0 0 1 1.81-.173 8.97 8.97 0 0 1-2.578 7.208c-3.493 3.49-9.205 3.49-12.69.005l-10.65-10.464a.907.907 0 0 1-.006-1.292L79.1 68.9a.91.91 0 0 1 1.281-.006l3.392 3.333a.91.91 0 0 1-1.275 1.298l-2.749-2.701z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="m78.313 70.969-8.554 8.567-5.404-5.417.133-.135a26.1 26.1 0 0 0 8.302-8.3l.12-.12z"/><path fill="%23bdcbc9" fill-rule="evenodd" d="M73.034 66.977a27 27 0 0 1-8.065 7.779.91.91 0 0 1-.965-1.543 25.2 25.2 0 0 0 8.012-8.01 1 1 0 0 1 .13-.163l.12-.12a.91.91 0 0 1 1.285.002l5.404 5.404a.91.91 0 0 1 0 1.285l-8.553 8.569a.91.91 0 0 1-1.288-1.286l7.911-7.925z" clip-rule="evenodd"/><path fill="%23bdcbc9" d="M56.092 43.838a1.613 1.613 0 0 1 2.468 2.076L46.626 60.107a1.613 1.613 0 0 1-2.469-2.076z"/><path fill="%23bdcbc9" d="M58.41 58.256a1.613 1.613 0 0 1-2.464 2.08l-11.96-14.17a1.613 1.613 0 0 1 2.464-2.08z"/></g><defs><linearGradient id="b" x1="56.953" x2="56.953" y1="115.671" y2="13.791" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23e1e7e6"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%2396dcb4" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%234fa271" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23bfe9d1" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%236ecf96" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%234fa271" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" fill-rule="evenodd" d="m55.436 65.185 14.64-17.738a2.472 2.472 0 0 1 3.812 3.147L57.518 70.429a2.474 2.474 0 0 1-3.655.174L42.948 59.687a2.47 2.47 0 1 1 3.495-3.495z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23abe3c2"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var f='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="117" height="100" fill="none"><g clip-path="url(%23a)"><path fill="url(%23b)" d="M56.952 118.918c-29.03 0-52.564-23.534-52.564-52.564S27.922 13.79 56.952 13.79s52.564 23.534 52.564 52.564-23.534 52.564-52.564 52.564"/><path fill="%23f18585" fill-rule="evenodd" d="M107.337 24.928q.031-.368.031-.744c0-4.758-3.862-8.62-8.62-8.62-4.094 0-7.525 2.859-8.403 6.688a6.9 6.9 0 0 0-9.022 6.564 6.9 6.9 0 0 0 6.898 6.897h18.766a5.4 5.4 0 0 0 5.398-5.398 5.4 5.4 0 0 0-5.048-5.387" clip-rule="evenodd"/><path fill="%23d34747" fill-rule="evenodd" d="M116.113 99.846H10.86a.617.617 0 0 1 0-1.235h105.253a.618.618 0 0 1 0 1.235M6.735 99.846H.618a.618.618 0 0 1 0-1.235h6.117a.617.617 0 0 1 0 1.235" clip-rule="evenodd"/><path fill="%23f6b4b4" fill-rule="evenodd" d="M12.558 12.199a5.501 5.501 0 0 1 5.479-5.973c2.61 0 4.8 1.823 5.36 4.266a4.402 4.402 0 0 1 5.755 4.187c0 2.428-1.972 4.4-4.4 4.4h-11.97a3.445 3.445 0 0 1-3.444-3.444 3.445 3.445 0 0 1 3.22-3.436" clip-rule="evenodd"/><path fill="%23f18585" d="M90.532 58.93c0 17.787-14.418 32.197-32.194 32.197-17.788 0-32.197-14.41-32.197-32.197 0-17.776 14.409-32.196 32.197-32.196 17.776 0 32.194 14.419 32.194 32.196"/><path fill="%23d34747" fill-rule="evenodd" d="M58.339 27.872c17.147 0 31.056 13.909 31.056 31.058 0 9.872-4.604 18.665-11.78 24.354a1.139 1.139 0 0 0 1.415 1.783c7.7-6.105 12.64-15.543 12.64-26.137 0-18.405-14.927-33.333-33.331-33.333a1.138 1.138 0 0 0 0 2.276M58.34 89.99c-17.16 0-31.06-13.901-31.06-31.06a1.138 1.138 0 0 0-2.276 0c0 18.415 14.919 33.335 33.335 33.335a1.138 1.138 0 0 0 0-2.275" clip-rule="evenodd"/><path fill="%23fff" d="M57.512 45.853a3.5 3.5 0 0 1 1.623.077q1.816.465 2.473 2.203.155.58-.077 2.396l-.889 5.758q-1.081 7.034-1.353 7.266-.27.116-1.855.039-.31 0-.347-.04-.194-.115-.348-.888-.116-.696-1.005-6.377-1.12-7.343-1.044-7.845 0-.077.078-.309.502-1.623 2.357-2.164.194-.078.387-.116m.038 20.25q.657-.154 1.508.078 1.7.425 2.357 2.087.116.193.155.425a3.3 3.3 0 0 1 0 1.739q-.465 1.778-2.165 2.396-.192.078-.347.116a3.3 3.3 0 0 1-1.74 0q-1.777-.464-2.396-2.164a3.318 3.318 0 0 1-.116-2.087q.31-1.16 1.16-1.817.657-.54 1.584-.772"/></g><defs><linearGradient id="b" x1="56.952" x2="56.952" y1="115.67" y2="13.79" gradientUnits="userSpaceOnUse"><stop offset=".25" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23f39d9d"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h116.732v100H0z"/></clipPath></defs></svg>';var D=e=>e?.startsWith("es")?{documentsTitle:"Nada por aqu\xED todav\xEDa",documentsDescription:"Agrega un nuevo elemento para comenzar",notFoundTitle:"No se encontraron resultados",notFoundDescription:"Ajusta los criterios e int\xE9ntalo nuevamente",doneTitle:"\xA1Est\xE1s al d\xEDa!",doneDescription:"No hay elementos que completar",contentEmptyAlt:"Contenido vac\xEDo"}:e?.startsWith("pt")?{documentsTitle:"Nada aqui ainda",documentsDescription:"Adicione um novo item para come\xE7ar",notFoundTitle:"N\xE3o foram encontrados resultados",notFoundDescription:"Ajuste os crit\xE9rios e tente novamente",doneTitle:"Voc\xEA est\xE1 em dia!",doneDescription:"N\xE3o h\xE1 itens para concluir",contentEmptyAlt:"Conte\xFAdo vazio"}:{documentsTitle:"Nothing here yet",documentsDescription:"Add a new item to get started",notFoundTitle:"No results were found",notFoundDescription:"Adjust the criteria and try again",doneTitle:"You're all caught up!",doneDescription:"Nothing left to complete",contentEmptyAlt:"Content empty"},P=e=>{switch(e){case "lg":return {width:233.46,height:200};case "md":return {width:175.09,height:150};case "sm":return {width:116,height:100}}},N=tv({slots:{root:"font-inter flex h-fit w-fit flex-col items-center p-6 pt-10 text-neutral-600",title:"mt-4.5 text-center font-semibold",description:"font-inter mt-0.5 text-center"},variants:{size:{lg:{title:"font-jakarta text-lg leading-[156%]",description:"text-base leading-[150%] font-medium"},md:{title:"text-base leading-[150%]",description:"text-sm leading-[143%]"},sm:{title:"text-sm leading-[143%]",description:"text-sm leading-[143%]"}},variant:{empty:{},"not-found":{},done:{title:"text-success-700",description:"text-success-700"},danger:{title:"text-danger-700",description:"text-danger-700"}}}}),U=(e,t)=>{switch(e.variant){case "danger":return {title:e.title,description:e.description,imgUrl:f};case "not-found":return {title:e.title??t.notFoundTitle,description:e.description??t.notFoundDescription,imgUrl:s};case "done":return {title:e.title??t.doneTitle,description:e.description??t.doneDescription,imgUrl:p};default:return {title:e.title??t.documentsTitle,description:e.description??t.documentsDescription,imgUrl:e.pictogram==="checklist"?c:r}}},J=e$1=>{let{actions:t,areActionsHidden:m=false,size:a="sm",className:u}=e$1,v=e$1.variant??"empty",{locale:g}=getDefaultOptions(),{root:y,title:M,description:b}=N({size:a,variant:v}),o=D(g?.code),l=U(e$1,o),{width:S,height:x}=P(a),d=a==="sm"?"sm":"lg";return jsxs("div",{className:y({className:u}),children:[jsx("img",{alt:o.contentEmptyAlt,width:S,height:x,src:l.imgUrl}),jsx("p",{className:M(),children:l.title}),l.description&&jsx("p",{className:b(),children:l.description}),t&&!m&&jsxs("div",{className:"mt-4.5 flex gap-3",children:[t.secondary&&jsx(e,{...t.secondary,variant:"light",tone:"primary",size:d}),jsx(e,{...t.primary,variant:"secondary",tone:"primary",size:d})]})]})};
2
+ export{J as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-RBXMHWJQ.js';import {a as a$5}from'./chunk-TN46TEUP.js';import {c,a as a$2,d,e as e$1}from'./chunk-PIFJNNC2.js';import {c as c$1,e,a as a$3,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useState,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ce=a,X="lg",Y=P=>{let{label:B,labelProps:F,value:a,onValueChange:u,placeholder:R,error:m,required:d$2,disabled:c$3,readOnly:b$1,options:H,load:r,helperText:k,size:q=X,emptyState:D,className:M}=P,[g,x]=useState(null),j=useMemo(()=>a?[a]:[],[a]),t=c({options:H,load:r,selectedOptions:j}),f=t.optionByValue,h=g??a?.label??"",i=c$1({error:!!m,disabled:c$3,readOnly:b$1}),G=useCallback(o=>{if(o.reason==="input-change"){x(o.inputValue),t.search(o.inputValue);return}x(null);},[t.search]),Q=useCallback(o=>{t.handleOpenChange(o,true);},[t.handleOpenChange]),J=useCallback(o=>{let C=o.value[0];u(C===void 0?null:f.get(C)??null);},[u,f]);return jsxs(Combobox.Root,{collection:t.collection,value:a?[String(a.value)]:[],inputValue:h,onInputValueChange:G,onOpenChange:Q,onValueChange:J,inputBehavior:"autocomplete",openOnClick:true,invalid:!!m,disabled:c$3,readOnly:b$1,"data-disabled":i==="disabled"?"":void 0,"data-error":d$1(i)||void 0,className:a$1(b,M),children:[jsx(c$2,{...F,as:Combobox.Label,label:B,required:d$2}),jsx(e,{as:Combobox.Control,size:q,state:i,clearAdornment:h.length>0||a?jsx(a$3,{as:Combobox.ClearTrigger,hidden:false}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$2,{})}),children:o=>jsx(Combobox.Input,{className:a$1(o,"text-left disabled:cursor-not-allowed"),placeholder:R,"aria-required":d$2||void 0})}),jsx(a$4,{children:k}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:t.contentRef,"aria-busy":t.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[t.collection.items.map(o=>jsx(Combobox.Item,{item:o,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:o.label}),o.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$5,{size:"sm",...o.badgeExpandable})})]}),o.description&&jsx("p",{className:"text-xs leading-[130%]",children:o.description})]})})},String(o.value))),!t.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(d,{query:r?t.serverQuery:g??"",emptyState:D})})]}),t.loading&&jsx(e$1,{}),r&&jsx("div",{ref:t.sentinelRef,className:"h-px"})]})})})]})};Y.displayName="Autocomplete";export{ce as a,X as b,Y as c};
1
+ import {a}from'./chunk-RBXMHWJQ.js';import {a as a$5}from'./chunk-TN46TEUP.js';import {c,a as a$2,d,e as e$1}from'./chunk-UMPU6MBO.js';import {c as c$1,e,a as a$3,b,d as d$1}from'./chunk-MQL3NZ6S.js';import {a as a$4}from'./chunk-VIMWKUML.js';import {c as c$2}from'./chunk-QZUQ6AZK.js';import {a as a$1}from'./chunk-OBZIYJO7.js';import {Combobox}from'@ark-ui/react/combobox';import {Portal}from'@ark-ui/react/portal';import {useState,useMemo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ce=a,X="lg",Y=P=>{let{label:B,labelProps:F,value:a,onValueChange:u,placeholder:R,error:m,required:d$2,disabled:c$3,readOnly:b$1,options:H,load:r,helperText:k,size:q=X,emptyState:D,className:M}=P,[g,x]=useState(null),j=useMemo(()=>a?[a]:[],[a]),t=c({options:H,load:r,selectedOptions:j}),f=t.optionByValue,h=g??a?.label??"",i=c$1({error:!!m,disabled:c$3,readOnly:b$1}),G=useCallback(o=>{if(o.reason==="input-change"){x(o.inputValue),t.search(o.inputValue);return}x(null);},[t.search]),Q=useCallback(o=>{t.handleOpenChange(o,true);},[t.handleOpenChange]),J=useCallback(o=>{let C=o.value[0];u(C===void 0?null:f.get(C)??null);},[u,f]);return jsxs(Combobox.Root,{collection:t.collection,value:a?[String(a.value)]:[],inputValue:h,onInputValueChange:G,onOpenChange:Q,onValueChange:J,inputBehavior:"autocomplete",openOnClick:true,invalid:!!m,disabled:c$3,readOnly:b$1,"data-disabled":i==="disabled"?"":void 0,"data-error":d$1(i)||void 0,className:a$1(b,M),children:[jsx(c$2,{...F,as:Combobox.Label,label:B,required:d$2}),jsx(e,{as:Combobox.Control,size:q,state:i,clearAdornment:h.length>0||a?jsx(a$3,{as:Combobox.ClearTrigger,hidden:false}):void 0,indicator:jsx(Combobox.Trigger,{className:"group/chevron-host cursor-pointer group-data-disabled/control:cursor-not-allowed",children:jsx(a$2,{})}),children:o=>jsx(Combobox.Input,{className:a$1(o,"text-left disabled:cursor-not-allowed"),placeholder:R,"aria-required":d$2||void 0})}),jsx(a$4,{children:k}),jsx(Portal,{children:jsx(Combobox.Positioner,{children:jsxs(Combobox.Content,{ref:t.contentRef,"aria-busy":t.loading||void 0,className:"elevation-9 z-layer bg-input-bg max-h-67.5 min-w-27.5 overflow-auto rounded-lg",children:[jsxs(Combobox.ItemGroup,{children:[t.collection.items.map(o=>jsx(Combobox.Item,{item:o,className:"font-inter data-highlighted:bg-primary-100 block w-full cursor-pointer p-3 data-disabled:cursor-not-allowed data-disabled:text-neutral-400",children:jsx(Combobox.ItemText,{className:"flex w-full min-w-0 flex-col gap-1",asChild:true,children:jsxs("div",{className:"w-full min-w-0",children:[jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[jsx("p",{className:"min-w-0 flex-1 truncate text-sm leading-[130%] font-medium",children:o.label}),o.badgeExpandable&&jsx("div",{className:"flex shrink-0 justify-end overflow-visible",children:jsx(a$5,{size:"sm",...o.badgeExpandable})})]}),o.description&&jsx("p",{className:"text-xs leading-[130%]",children:o.description})]})})},String(o.value))),!t.loading&&jsx(Combobox.Empty,{className:"flex flex-col items-center justify-center",children:jsx(d,{query:r?t.serverQuery:g??"",emptyState:D})})]}),t.loading&&jsx(e$1,{}),r&&jsx("div",{ref:t.sentinelRef,className:"h-px"})]})})})]})};Y.displayName="Autocomplete";export{ce as a,X as b,Y as c};
@@ -1 +1 @@
1
- export{a as AutocompleteMultiple}from'../chunk-XMLL2NSL.js';import'../chunk-WAUY2MS6.js';import'../chunk-PIFJNNC2.js';import'../chunk-AKR7AIFQ.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
1
+ export{a as AutocompleteMultiple}from'../chunk-RMGRGUPS.js';import'../chunk-WAUY2MS6.js';import'../chunk-UMPU6MBO.js';import'../chunk-W3SG67XH.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
@@ -1 +1 @@
1
- export{a as AutocompleteSkeleton}from'../chunk-RIT4AVFU.js';import'../chunk-TBU4CEVF.js';import'../chunk-KTD2GEB6.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-PIFJNNC2.js';import'../chunk-AKR7AIFQ.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
1
+ export{a as AutocompleteSkeleton}from'../chunk-UXEJUHPK.js';import'../chunk-XMI6Z3GT.js';import'../chunk-KTD2GEB6.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-UMPU6MBO.js';import'../chunk-W3SG67XH.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
@@ -1 +1 @@
1
- export{c as Autocomplete,b as AutocompleteSizeDefault,a as AutocompleteSizes}from'../chunk-TBU4CEVF.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-PIFJNNC2.js';import'../chunk-AKR7AIFQ.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
1
+ export{c as Autocomplete,b as AutocompleteSizeDefault,a as AutocompleteSizes}from'../chunk-XMI6Z3GT.js';import'../chunk-RBXMHWJQ.js';import'../chunk-TN46TEUP.js';import'../chunk-UMPU6MBO.js';import'../chunk-W3SG67XH.js';import'../chunk-MQL3NZ6S.js';import'../chunk-VIMWKUML.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
@@ -0,0 +1,80 @@
1
+ import * as React from 'react';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { LucideIcon } from 'lucide-react';
4
+ import { AvatarProps } from './avatar.js';
5
+ import { BadgeAlertProps } from './badge-alert.js';
6
+ import { BadgeCategoryProps } from './badge-category.js';
7
+ import { BadgeExpandableProps } from './badge-expandable.js';
8
+ import { BadgeNumberProps } from './badge-number.js';
9
+ import { BadgeStatusProps } from './badge-status.js';
10
+ import { CheckboxProps } from './checkbox.js';
11
+ import { IconButtonProps } from './icon-button.js';
12
+ import { RadioGroupItemProps } from './radio.js';
13
+ import { SwitchProps } from './switch.js';
14
+ import 'tailwind-variants';
15
+ import '@ark-ui/react/avatar';
16
+ import '@ark-ui/react';
17
+ import '@ark-ui/react/radio-group';
18
+ import '../label-CwyjuBj_.js';
19
+ import './tooltip.js';
20
+ import '@ark-ui/react/tooltip';
21
+ import '@ark-ui/react/switch';
22
+
23
+ type CardActionVariant = "outline" | "fill" | "elevated";
24
+ type CardActionTone = "neutral" | "primary";
25
+ type CardActionRootProps = ComponentPropsWithoutRef<"div"> & {
26
+ variant?: CardActionVariant;
27
+ tone?: CardActionTone;
28
+ selected?: boolean;
29
+ disabled?: boolean;
30
+ };
31
+ type CardActionSectionProps = ComponentPropsWithoutRef<"div">;
32
+ type CardActionTextProps = ComponentPropsWithoutRef<"span">;
33
+ type CardActionTitleProps = CardActionTextProps;
34
+ type CardActionIconProps = ComponentPropsWithoutRef<"svg"> & {
35
+ icon: LucideIcon;
36
+ };
37
+ type CardActionFileIconProps = Omit<CardActionIconProps, "icon">;
38
+ type CardActionImageProps = ComponentPropsWithoutRef<"img">;
39
+ type CardActionAvatarProps = Omit<AvatarProps, "size">;
40
+ type CardActionIconButtonProps = Omit<IconButtonProps, "size">;
41
+ type CardActionCheckboxProps = CheckboxProps;
42
+ type CardActionRadioControlProps = RadioGroupItemProps;
43
+ type CardActionSwitchProps = Omit<SwitchProps, "size">;
44
+ type CardActionBadgeStatusProps = Omit<BadgeStatusProps, "size">;
45
+ type CardActionBadgeExpandableProps = Omit<BadgeExpandableProps, "size">;
46
+ type CardActionBadgeNumberProps = Omit<BadgeNumberProps, "size" | "variant" | "type"> & {
47
+ variant?: BadgeNumberProps["variant"];
48
+ type?: BadgeNumberProps["type"];
49
+ };
50
+ type CardActionBadgeCategoryProps = Omit<BadgeCategoryProps, "size" | "variant" | "color"> & {
51
+ variant?: BadgeCategoryProps["variant"];
52
+ color?: BadgeCategoryProps["color"];
53
+ };
54
+ type CardActionBadgeAlertProps = Omit<BadgeAlertProps, "size">;
55
+ /** Compose Header and optional Description as root children; other root children are consumer-owned content. */
56
+ declare const CardAction: {
57
+ Root: ({ variant, tone, selected, disabled, onClick, onKeyDown, tabIndex, children, className, ...props }: CardActionRootProps) => React.JSX.Element;
58
+ Header: ({ className, ...props }: CardActionSectionProps) => React.JSX.Element;
59
+ Leading: ({ className, ...props }: CardActionSectionProps) => React.JSX.Element;
60
+ HeaderContent: ({ className, ...props }: CardActionSectionProps) => React.JSX.Element;
61
+ Trailing: ({ className, ...props }: CardActionSectionProps) => React.JSX.Element;
62
+ Title: ({ className, ...props }: CardActionTitleProps) => React.JSX.Element;
63
+ Description: ({ className, ...props }: CardActionTextProps) => React.JSX.Element;
64
+ Icon: ({ icon: Icon, className, ...props }: CardActionIconProps) => React.JSX.Element;
65
+ Avatar: (props: CardActionAvatarProps) => React.JSX.Element;
66
+ Image: (props: CardActionImageProps) => React.JSX.Element;
67
+ FileIcon: ({ className, ...props }: CardActionFileIconProps) => React.JSX.Element;
68
+ Checkbox: ({ disabled, onClick, ...props }: CardActionCheckboxProps) => React.JSX.Element;
69
+ RadioControl: ({ disabled, onClick, ...props }: CardActionRadioControlProps) => React.JSX.Element;
70
+ Switch: ({ disabled, onClick, ...props }: CardActionSwitchProps) => React.JSX.Element;
71
+ IconButton: ({ disabled, onClick, ...props }: CardActionIconButtonProps) => React.JSX.Element;
72
+ BadgeStatus: (props: CardActionBadgeStatusProps) => React.JSX.Element;
73
+ BadgeExpandable: (props: CardActionBadgeExpandableProps) => React.JSX.Element;
74
+ BadgeNumber: (props: CardActionBadgeNumberProps) => React.JSX.Element;
75
+ BadgeCategory: (props: CardActionBadgeCategoryProps) => React.JSX.Element;
76
+ BadgeAlert: (props: CardActionBadgeAlertProps) => React.JSX.Element;
77
+ };
78
+
79
+ export { CardAction };
80
+ export type { CardActionAvatarProps, CardActionBadgeAlertProps, CardActionBadgeCategoryProps, CardActionBadgeExpandableProps, CardActionBadgeNumberProps, CardActionBadgeStatusProps, CardActionCheckboxProps, CardActionFileIconProps, CardActionIconButtonProps, CardActionIconProps, CardActionImageProps, CardActionRadioControlProps, CardActionRootProps, CardActionSectionProps, CardActionSwitchProps, CardActionTextProps, CardActionTitleProps, CardActionTone, CardActionVariant };
@@ -0,0 +1 @@
1
+ export{a as CardAction}from'../chunk-IFHVHLTC.js';import'../chunk-UIZFLYFP.js';import'../chunk-QQM4FVO7.js';import'../chunk-CY5DLXHV.js';import'../chunk-4CAN7PGG.js';import'../chunk-7JM2X4UD.js';import'../chunk-FYB3QRNL.js';import'../chunk-YFDUDY6Y.js';import'../chunk-TN46TEUP.js';import'../chunk-QZUQ6AZK.js';import'../chunk-MW7DL42Z.js';import'../chunk-PI7DECIN.js';import'../chunk-QMPBFFFC.js';import'../chunk-ICF6RQIW.js';import'../chunk-HZYZAFW3.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
@@ -1,5 +1,5 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
- import { CheckboxCheckedState as CheckboxCheckedState$1, CheckboxRootProps } from '@ark-ui/react';
2
+ import { CheckboxRootProps, CheckboxCheckedState as CheckboxCheckedState$1 } from '@ark-ui/react';
3
3
  import { FC } from 'react';
4
4
 
5
5
  type CheckboxCheckedState = CheckboxCheckedState$1;
@@ -19,12 +19,16 @@ type BaseProps = {
19
19
  description?: string;
20
20
  };
21
21
  type EmptyStateProps = (BaseProps & {
22
- variant?: "empty" | "not-found" | "done";
22
+ variant?: "empty";
23
+ pictogram?: "documents" | "checklist";
24
+ }) | (BaseProps & {
25
+ variant: "not-found" | "done";
23
26
  }) | (BaseProps & {
24
27
  variant: "danger";
25
28
  title: string;
26
29
  description: string;
27
30
  });
31
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
28
32
  /**
29
33
  * Subset of EmptyStateProps for components that embed an EmptyState
30
34
  * internally and force their own `size` (e.g. Autocomplete,
@@ -32,7 +36,7 @@ type EmptyStateProps = (BaseProps & {
32
36
  * embedders only support variants with localized default copy, and excludes
33
37
  * `className` since the host component owns the layout.
34
38
  */
35
- type EmptyStateOverrides = Omit<Exclude<EmptyStateProps, {
39
+ type EmptyStateOverrides = DistributiveOmit<Exclude<EmptyStateProps, {
36
40
  variant: "danger";
37
41
  }>, "size" | "className">;
38
42
  declare const EmptyState: FC<EmptyStateProps>;
@@ -1 +1 @@
1
- export{a as EmptyState}from'../chunk-AKR7AIFQ.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';
1
+ export{a as EmptyState}from'../chunk-W3SG67XH.js';import'../chunk-WWQW5ZXG.js';import'../chunk-C7TLKKPT.js';import'../chunk-CQI4KDR4.js';import'../chunk-7TTDAJTY.js';import'../chunk-OBZIYJO7.js';