@app-studio/web 0.9.95 → 0.9.96
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.
- package/dist/web.cjs.js +1 -1
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +357 -355
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +1 -1
- package/dist/web.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/web.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
${D} no-repeat,
|
|
4
4
|
${F} no-repeat,
|
|
5
5
|
${q} no-repeat
|
|
6
|
-
`,backgroundSize:`200% ${N}px, ${N}px 200%, 200% ${N}px, ${N}px 200%`,backgroundPosition:O,transitionProperty:"background-position",transitionDuration:`${W}s`,transitionTimingFunction:"linear",transitionDelay:X,_hover:{backgroundPosition:U,transitionDelay:Z},width:a?"fit-content":c?"100%":void 0,...f==null?void 0:f.container,...P,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||l),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,H-3),width:"100%",height:"100%",...m,...p,...b,backgroundColor:(m==null?void 0:m.backgroundColor)||T,color:y,borderWidth:0,cursor:n?"default":"pointer",children:S})})}return r.jsx(i.Element,{ref:x,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||l),...p,...b,display:"inline-flex",alignItems:"center",justifyContent:"center",width:a?"fit-content":c?"100%":void 0,borderRadius:co[s],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:h,...m,...f==null?void 0:f.container,...P,children:S})},ai=d.memo(d.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:l="left",backgroundColor:a,color:c,textColor:g,reversed:s=!1,isAuto:u=!0,isFilled:h,isDisabled:f,isLoading:m,isIconRounded:p,isHovered:b,icon:x,children:y,to:k,isExternal:I,shadow:T,onClick:C,views:w={},borderMovingDuration:j=2,borderMovingGradientColors:z=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:E="#705CFF",animatedStrokeTextColor:P="#333333",...H},S)=>{const{getColorHex:$}=i.useTheme();let V=$(f?"theme-disabled":m?"theme-loading":a??c??"theme-button-background");(V==="theme-button-background"||V==="theme-loading")&&(V=$(m?"color-dark-500":"theme-primary"));let W=$(g??"theme-button-text");W==="theme-button-text"&&(W=$("color-white"));const D=d.useMemo(()=>Rc(V,W,s),[V,W,s])[e],F=(D==null?void 0:D.color)??W,q=r.jsx(ei,{icon:x,isLoading:m,iconPosition:n,loaderPosition:l,size:o,resolvedTextColor:F,isIconRounded:p,views:w,children:y}),O=gr[o],U=p?ur[o]:{};return r.jsx(ni,{variant:e,animation:H.animation,to:k,isDisabled:f,isLoading:m,isAuto:u,isFilled:h,isExternal:I,shape:t,shadow:T,onClick:C,views:w,baseStyles:D,sizeStyles:O,iconPad:U,resolvedTextColor:F,content:q,size:o,mainTone:V,borderMovingDuration:j,borderMovingGradientColors:z,animatedStrokeAccentColor:E,animatedStrokeTextColor:P,getColor:$,containerRef:S,...H})})),_e=e=>{const[o,t]=i.useHover();return r.jsx(ai,{isHovered:t,...e})},li={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},ci={square:0,rounded:"8px",pill:"24px"},ii=e=>{const o=e==="dark";return{default:{backgroundColor:o?"color-gray-900":"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:o?"color-gray-900":"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:o?"color-gray-700":"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:o?"color-gray-600":"color-gray-300",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:o?"color-gray-900":"color-white",boxShadow:o?"0px 4px 12px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 8px 16px rgba(0, 0, 0, 0.4)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},_o=e=>{const o=e.themeMode==="dark";return{container:{backgroundColor:o?"color-gray-900":"color-white",color:o?"color-white":"color-black",borderRadius:"8px",overflow:"hidden",transition:"all 0.2s ease"},header:{padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:o?"color-gray-800":"color-gray-100",color:"theme-primary"},content:{padding:"16px",color:o?"color-gray-300":"color-gray-600"},footer:{padding:"16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:o?"color-gray-800":"color-gray-100"}}},hr=d.createContext({}),yt=()=>d.useContext(hr),xt=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).header,s={...g,...c==null?void 0:c.header,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.header)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},kt=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).content,s={...g,...c==null?void 0:c.content,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.content)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:12,...s,children:e})},Ct=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).footer,s={...g,...c==null?void 0:c.footer,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.footer)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},si=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:l,footer:a,isFullWidth:c=!1,views:g,style:s,themeMode:u,...h})=>{var C,w;const f=i.useTheme(),m=_o(f),p=((C=li[o])==null?void 0:C.padding)||"16px",b=d.useMemo(()=>({styles:{container:{...m.container,borderRadius:ci[t],...g==null?void 0:g.container},header:{...m.header,padding:p,...g==null?void 0:g.header},content:{...m.content,padding:p,...g==null?void 0:g.content},footer:{...m.footer,padding:p,...g==null?void 0:g.footer}}}),[m,g,p,t]),x=d.Children.toArray(n).some(j=>d.isValidElement(j)&&(j.type===xt||j.type===kt||j.type===Ct)),{themeMode:y}=f,I=ii(u||y)[e],T={width:c?"100%":"auto",overflow:"hidden",...I,...b.styles.container,...h,style:{...(w=b.styles.container)==null?void 0:w.style,...s}};return r.jsx(hr.Provider,{value:b,children:r.jsx(i.View,{...T,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[l&&r.jsx(xt,{children:l}),r.jsx(kt,{children:n}),a&&r.jsx(Ct,{children:a})]})})})},$o=e=>r.jsx(si,{...e});$o.Header=xt,$o.Content=kt,$o.Footer=Ct;const di=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:l=3e3,pauseOnHover:a=!0,infinite:c=!0,totalSlides:g,stepIndices:s})=>{const u=d.useRef(g||0),[h,f]=d.useState(g||0),m=d.useRef(new Set),p=d.useRef(0),b=d.useMemo(()=>rt("carousel-content"),[]),[x,y]=d.useState(o!==void 0?o:e),[k,I]=d.useState(!1),[T,C]=d.useState(!1),[w,j]=d.useState(0),[z,E]=d.useState(0),P=d.useRef(null);d.useEffect(()=>{o!==void 0&&y(o)},[o]);const H=d.useCallback(O=>{let U=O;c?O<0?U=h-1:O>=h&&(U=0):U=Math.max(0,Math.min(O,h-1)),s&&s.length>0&&(s.includes(U)||(U=s.reduce((X,N)=>Math.abs(N-U)<Math.abs(X-U)?N:X))),o===void 0&&y(U),t&&t(U)},[o,c,t,h]),S=d.useCallback(()=>{H(x+1)},[x,H]),$=d.useCallback(()=>{H(x-1)},[x,H]);d.useEffect(()=>(n&&!k&&!T&&(P.current=setInterval(()=>{S()},l)),()=>{P.current&&clearInterval(P.current)}),[n,l,k,T,S,a]);const A=d.useCallback(()=>{a&&I(!0)},[a]),_=d.useCallback(()=>{I(!1)},[]),V=d.useCallback(O=>{C(!0),"touches"in O?(j(O.touches[0].clientX),E(O.touches[0].clientY)):(j(O.clientX),E(O.clientY))},[]),B=d.useCallback(O=>{if(!T)return;let U,Z;"touches"in O?(U=O.touches[0].clientX,Z=O.touches[0].clientY):(U=O.clientX,Z=O.clientY);const X=U-w,N=Z-z;Math.abs(X)>Math.abs(N)&&Math.abs(X)>50&&(X>0?$():S(),C(!1))},[T,w,z,S,$]),W=d.useCallback(()=>{C(!1)},[]),L=d.useCallback(()=>{const O=p.current++;m.current.add(O);const U=m.current.size;return u.current=U,f(U),O},[]),D=d.useCallback(O=>{m.current.delete(O);const U=m.current.size;if(u.current=U,f(U),U>0&&x>=U){const Z=Math.max(0,U-1);o===void 0&&y(Z),t&&t(Z)}},[x,o,t]),F=c||x>0,q=c||x<h-1;return{activeIndex:x,totalSlides:h,goToSlide:H,nextSlide:S,prevSlide:$,canGoNext:q,canGoPrevious:F,handleMouseEnter:A,handleMouseLeave:_,handleDragStart:V,handleDragMove:B,handleDragEnd:W,registerSlide:L,unregisterSlide:D,contentId:b,infinite:c}},gi={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},ui={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Ho={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},io=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Ho},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Ho}}),fr=d.createContext(null),Bo=()=>{const e=d.useContext(fr);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},mr=({children:e,isActive:o,views:t,...n})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...t,...n,children:e}),pr=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:l,styles:a}=Bo(),g={...io().prevButton,...a==null?void 0:a.prevButton,...e==null?void 0:e.prevButton};return r.jsx(_e,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!l,...g,...t,children:o??r.jsx(le,{orientation:"left",widthHeight:16})})},br=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:l,styles:a}=Bo(),g={...io().nextButton,...a==null?void 0:a.nextButton,...e==null?void 0:e.nextButton};return r.jsx(_e,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!l,...g,...t,children:o??r.jsx(le,{orientation:"right",widthHeight:16})})},yr=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:l,styles:a}=Bo(),c=d.useRef(null);d.useEffect(()=>{const u=n();return c.current=u,()=>{c.current!==null&&l(c.current)}},[n,l]);const s={...io().item,...a==null?void 0:a.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...s,...t,children:e})},xr=({children:e,views:o,style:t,...n})=>{const{currentIndex:l,styles:a,contentId:c}=Bo(),g=io(),s={...g.content,...a==null?void 0:a.content,...o==null?void 0:o.content},u={...g.innerContainer,...a==null?void 0:a.innerContainer,...o==null?void 0:o.innerContainer},h=`-${l*100}%`;return r.jsx(i.View,{...s,...n,style:{...s==null?void 0:s.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...u,style:{...u==null?void 0:u.style,transform:`translateX(${h})`},children:e})})},hi=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:l=!0,navigationPosition:a="inside",prevButton:c,nextButton:g,showIndicators:s=!0,indicatorPosition:u="bottom",indicatorVariant:h="dot",autoPlay:f=!1,autoPlayInterval:m=3e3,pauseOnHover:p=!0,infinite:b=!0,direction:x="horizontal",transitionDuration:y=300,views:k,stepIndices:I,themeMode:T,...C})=>{const w=d.useMemo(()=>d.Children.toArray(e),[e]),j=di({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:m,pauseOnHover:p,infinite:b,totalSlides:w.length}),{activeIndex:z,totalSlides:E,goToSlide:P,nextSlide:H,prevSlide:S,handleMouseEnter:$,handleMouseLeave:A,handleDragStart:_,handleDragMove:V,handleDragEnd:B}=j,W=()=>{if(!l)return null;const F=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...Ho,...k==null?void 0:k.prevButton,children:"❮"}),q=g||r.jsx(i.View,{as:"button","aria-label":"Next slide",...Ho,...k==null?void 0:k.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:a==="inside"?"10px":"-40px",onClick:S,cursor:!b&&z===0?"not-allowed":"pointer",opacity:!b&&z===0?.5:1,children:F}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:a==="inside"?"10px":"-40px",onClick:H,cursor:!b&&z===w.length-1?"not-allowed":"pointer",opacity:!b&&z===w.length-1?.5:1,children:q})]})},L=()=>s?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...u==="top"?{top:"10px"}:{bottom:"10px"},...k==null?void 0:k.indicators,children:w.map((F,q)=>r.jsx(i.View,{onClick:()=>P(q),cursor:"pointer",...gi[h],...q===z?{...ui[h]}:{},...k==null?void 0:k.indicator,...q===z?k==null?void 0:k.activeIndicator:{},children:h==="number"&&q+1},q))}):null;return d.useMemo(()=>d.Children.toArray(e).some(F=>d.isValidElement(F)&&(F.type===xr||F.type===yr||F.type===pr||F.type===br)),[e])?r.jsx(fr.Provider,{value:{currentIndex:z,totalSlides:E,goToSlide:P,goToNext:H,goToPrevious:S,canGoNext:j.canGoNext,canGoPrevious:j.canGoPrevious,registerSlide:j.registerSlide,unregisterSlide:j.unregisterSlide,styles:{...io(),...k},contentId:j.contentId,infinite:b},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...k==null?void 0:k.container,...C,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:$,onMouseLeave:A,onTouchStart:_,onTouchMove:V,onTouchEnd:B,onMouseDown:_,onMouseMove:V,onMouseUp:B,...k==null?void 0:k.container,...C,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...k==null?void 0:k.slideWrapper,children:w.map((F,q)=>r.jsx(mr,{isActive:q===z,index:q,views:k==null?void 0:k.slide,children:F},q))}),W(),L()]})},Oe=e=>r.jsx(hi,{...e});Oe.Slide=mr,Oe.Content=xr,Oe.Item=yr,Oe.Previous=pr,Oe.Next=br;const ke={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},qe=[ke.blue,ke.green,ke.purple,ke.orange,ke.red,ke.teal,ke.pink,ke.indigo,ke.yellow,ke.cyan],fi={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},mi={fontSize:"18px",fontWeight:"bold",marginBottom:"16px",textAlign:"center"},pi={display:"flex",flexWrap:"wrap",justifyContent:"center",marginTop:"16px"},bi={display:"flex",alignItems:"center",marginRight:"16px",marginBottom:"8px"},yi={width:"12px",height:"12px",borderRadius:"2px",marginRight:"6px"},xi={fontSize:"14px"},kr={stroke:"color-gray-200",strokeWidth:"1px"},Lo={stroke:"color-gray-300",strokeWidth:"1px"},Ao={fontSize:"12px",fill:"color-gray-600"},ki={rx:"2px",ry:"2px",cursor:"pointer",transition:"opacity 0.2s ease",_hover:{opacity:.8}},Ci={strokeWidth:"2px",fill:"none"},wi={r:"4px",strokeWidth:"2px",stroke:"white",cursor:"pointer",transition:"r 0.2s ease"},Do={strokeWidth:"1px",stroke:"white",cursor:"pointer",transition:"opacity 0.2s ease",_hover:{opacity:.8}},wt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.8)",borderRadius:"4px",zIndex:10,padding:"16px",textAlign:"center"},Ii={...wt},Ti={...wt,backgroundColor:"rgba(255, 235, 238, 0.9)",color:"color-red-700"},ji={...wt,backgroundColor:"rgba(245, 245, 245, 0.8)",color:"color-gray-600"},Si=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:l=!0})=>{const[a,c]=d.useState(t?0:1),[g,s]=d.useState({visible:!1,x:0,y:0,content:null}),u=d.useRef(null),h=d.useRef(null);d.useEffect(()=>{if(!t){c(1);return}const x=Date.now(),y=()=>{const k=Date.now()-x,I=Math.min(k/n,1);c(I),I<1&&(u.current=requestAnimationFrame(y))};return u.current=requestAnimationFrame(y),()=>{u.current&&cancelAnimationFrame(u.current)}},[t,n]);const f=d.useCallback(()=>e?{...e,series:e.series.map((x,y)=>({...x,color:x.color||qe[y%qe.length]}))}:o?o.map((x,y)=>({...x,color:x.color||qe[y%qe.length]})):null,[e,o]),m=d.useCallback((x,y,k)=>{l&&s({visible:!0,x,y,content:k})},[l]),p=d.useCallback(()=>{s(x=>({...x,visible:!1}))},[]),b=d.useCallback(()=>{if(!h.current)return{width:0,height:0};const{width:x,height:y}=h.current.getBoundingClientRect();return{width:x,height:y}},[]);return{animationProgress:a,tooltip:g,containerRef:h,processedData:f,showTooltip:m,hideTooltip:p,getChartDimensions:b}},Mi=({data:e,width:o,height:t,animationProgress:n,showGrid:l=!0,onBarClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),h={top:20,right:20,bottom:40,left:50},f=o-h.left-h.right,m=t-h.top-h.bottom,p=d.useMemo(()=>{let w=0;return e.series.forEach(j=>{j.data.forEach(z=>{w=Math.max(w,z)})}),w},[e]),b=e.labels.length,x=e.series.length,y=f/b,k=y*.8/x,I=y*.2/(x+1),T=p||10,C=d.useMemo(()=>{const j=[];for(let z=0;z<=5;z++){const E=T/5*z;j.push(E)}return j},[p]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("line",{x1:h.left,y1:t-h.bottom,x2:o-h.right,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),r.jsx("line",{x1:h.left,y1:h.top,x2:h.left,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),e.labels.map((w,j)=>{const z=h.left+(j+.5)*y,E=t-h.bottom+20;return r.jsx("text",{x:z,y:E,textAnchor:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:w},`x-label-${j}`)}),C.map((w,j)=>{const z=t-h.bottom-w/T*m;return r.jsxs(d.Fragment,{children:[r.jsx("text",{x:h.left-10,y:z,textAnchor:"end",dominantBaseline:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:w.toFixed(0)}),l&&r.jsx("line",{x1:h.left,y1:z,x2:o-h.right,y2:z,...kr,...s==null?void 0:s.grid})]},`y-tick-${j}`)}),e.series.map((w,j)=>r.jsx(d.Fragment,{children:w.data.map((z,E)=>{const P=z/T*m*n,H=h.left+E*y+I*(j+1)+k*j,S=t-h.bottom-P,$=e.labels[E],A=e.series.reduce((L,D)=>{const F=D.data[E];return L+(typeof F=="number"?F:0)},0),_=A>0?(z/A*100).toFixed(1):null,V=w.color?u(w.color):"black",B=L=>{const D=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:w.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:V})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:$}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:z.toLocaleString()})]}),_!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${_}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:A.toLocaleString()})]})]})]});c(L.clientX,L.clientY,D)},W=()=>{a&&a(w.name,E)};return r.jsx("rect",{x:H,y:S,width:k,height:P,fill:V,onMouseEnter:B,onMouseLeave:g,onClick:W,...ki,...s==null?void 0:s.bar},`bar-${j}-${E}`)})},`series-${j}`))]})},zi=({data:e,width:o,height:t,animationProgress:n,showGrid:l=!0,onPointClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),h={top:20,right:20,bottom:40,left:50},f=o-h.left-h.right,m=t-h.top-h.bottom,p=d.useMemo(()=>{let I=0;return e.series.forEach(T=>{T.data.forEach(C=>{I=Math.max(I,C)})}),I},[e]),b=p||10,x=d.useMemo(()=>{const T=[];for(let C=0;C<=5;C++){const w=b/5*C;T.push(w)}return T},[p]),y=I=>`M ${I.map((C,w)=>{const j=h.left+w/(e.labels.length-1)*f,z=t-h.bottom-C/b*m*n;return`${j},${z}`}).join(" L ")}`,k=I=>{const T=h.left,C=h.left+f,w=t-h.bottom,j=I.map((z,E)=>{const P=h.left+E/(e.labels.length-1)*f,H=t-h.bottom-z/b*m*n;return`${P},${H}`});return`M ${T},${w} L ${j.join(" L ")} L ${C},${w} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("line",{x1:h.left,y1:t-h.bottom,x2:o-h.right,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),r.jsx("line",{x1:h.left,y1:h.top,x2:h.left,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),e.labels.map((I,T)=>{const C=h.left+T/(e.labels.length-1)*f,w=t-h.bottom+20;return r.jsx("text",{x:C,y:w,textAnchor:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:I},`x-label-${T}`)}),x.map((I,T)=>{const C=t-h.bottom-I/b*m;return r.jsxs(d.Fragment,{children:[r.jsx("text",{x:h.left-10,y:C,textAnchor:"end",dominantBaseline:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:I.toFixed(0)}),l&&r.jsx("line",{x1:h.left,y1:C,x2:o-h.right,y2:C,...kr,...s==null?void 0:s.grid})]},`y-tick-${T}`)}),e.series.map((I,T)=>{const C=I.color?u(I.color):"black";return r.jsxs(d.Fragment,{children:[r.jsx("path",{d:k(I.data),fill:C,opacity:.1,...s==null?void 0:s.area}),r.jsx("path",{d:y(I.data),stroke:C,...Ci,...s==null?void 0:s.line}),I.data.map((w,j)=>{const z=h.left+j/(e.labels.length-1)*f,E=t-h.bottom-w/b*m*n,P=e.labels[j],H=e.series.reduce((W,L)=>{const D=L.data[j];return W+(typeof D=="number"?D:0)},0),S=H>0?(w/H*100).toFixed(1):null,$=j>0&&typeof I.data[j-1]=="number"?I.data[j-1]:null,A=typeof $=="number"?w-$:null,_=typeof A=="number"?`${A>=0?"+":""}${A.toLocaleString()}`:null,V=W=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:I.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:P}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),_!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:_})]}),S!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${S}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]});c(W.clientX,W.clientY,L)},B=()=>{a&&a(I.name,j)};return r.jsx("circle",{cx:z,cy:E,fill:C,onMouseEnter:V,onMouseLeave:g,onClick:B,...wi,...s==null?void 0:s.point},`point-${T}-${j}`)})]},`series-${T}`)})]})},Vi=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:l=!1,onSliceClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),{ref:h,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),m=d.useRef(null);d.useEffect(()=>{m.current&&h&&(h.current=m.current)},[m,h]);const b=Math.min(o,t)/2*.8,x=o/2,y=t/2,k=l?b*.6:0,I=d.useMemo(()=>e.reduce((C,w)=>C+w.value,0),[e]),T=d.useMemo(()=>{if(I===0)return[{path:l?[`M ${x} ${y-b}`,`A ${b} ${b} 0 1 1 ${x} ${y+b}`,`A ${b} ${b} 0 1 1 ${x} ${y-b}`,`M ${x} ${y-k}`,`A ${k} ${k} 0 1 0 ${x} ${y+k}`,`A ${k} ${k} 0 1 0 ${x} ${y-k}`,"Z"].join(" "):[`M ${x} ${y}`,`M ${x} ${y-b}`,`A ${b} ${b} 0 1 1 ${x} ${y+b}`,`A ${b} ${b} 0 1 1 ${x} ${y-b}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:x,labelY:y,startAngle:0,endAngle:Math.PI*2,index:-1}];const C=[];let w=-Math.PI/2;for(let j=0;j<e.length;j++){const E=e[j].value/I,P=E*2*Math.PI*n,H=w+P,S=x+Math.cos(w)*b,$=y+Math.sin(w)*b,A=x+Math.cos(H)*b,_=y+Math.sin(H)*b,V=x+Math.cos(w)*k,B=y+Math.sin(w)*k,W=x+Math.cos(H)*k,L=y+Math.sin(H)*k,D=P>Math.PI?1:0;let F;l?F=[`M ${S} ${$}`,`A ${b} ${b} 0 ${D} 1 ${A} ${_}`,`L ${W} ${L}`,`A ${k} ${k} 0 ${D} 0 ${V} ${B}`,"Z"].join(" "):F=[`M ${x} ${y}`,`L ${S} ${$}`,`A ${b} ${b} 0 ${D} 1 ${A} ${_}`,"Z"].join(" ");const q=w+P/2,O=b*.7,U=x+Math.cos(q)*O,Z=y+Math.sin(q)*O,X=`${(E*100).toFixed(1)}%`,N=e[j].color||qe[j%qe.length],Q=u(N);C.push({path:F,color:Q,label:e[j].label,value:e[j].value,percentage:X,labelX:U,labelY:Z,startAngle:w,endAngle:H,index:j}),w=H}return C},[e,I,b,x,y,k,n,l]);return r.jsxs("svg",{ref:m,width:o,height:t,style:{overflow:"visible"},children:[l&&r.jsx("circle",{cx:x,cy:y,r:k,fill:"white",pointerEvents:"none"}),T.map((C,w)=>{const j=P=>{const H=I>0?C.value/I*100:0,S=I>0?Math.max(0,100-H):null,$=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:C.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",C.index+1," of ",e.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:C.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:C.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:I.toLocaleString()})]}),S!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${S.toFixed(1)}%`})]})]})]});let A=P.clientX,_=P.clientY;if(f&&m.current){const V=m.current.getBoundingClientRect();P.clientX-V.left,P.clientY-V.top,f.space.horizontal==="left"?A=P.clientX-100:A=P.clientX+10,f.space.vertical==="top"?_=P.clientY-30:_=P.clientY+10}c(A,_,$)},z=()=>{C.index!==-1&&a&&a(e[C.index],C.index)},E=C.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:C.path,fill:C.color,onMouseEnter:E?void 0:j,onMouseLeave:E?void 0:g,onClick:z,...Do,style:{...Do==null?void 0:Do.style,cursor:E?"default":"pointer"},...s==null?void 0:s.pie}),!E&&C.endAngle-C.startAngle>.2&&r.jsx("text",{x:C.labelX,y:C.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontWeight:"bold",pointerEvents:"none",style:{textShadow:"0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3)",filter:"drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))"},children:C.percentage})]},`slice-${w}`)})]})},Ei=({visible:e,x:o,y:t,content:n,maxDistance:l=100,views:a})=>{const c=d.useRef(null),[g,s]=d.useState({left:0,top:0});return d.useEffect(()=>{if(!e||!c.current)return;const h=c.current.getBoundingClientRect(),f=h.width,m=h.height,p=10,b=15;let x=o-b,y=t-b;const k=o-x,I=t-y;k>l&&(x=o-l),I>l&&(y=t-l),x+f>window.innerWidth-p&&(x=window.innerWidth-f-p,o-x>l&&(x=o-l)),x<p&&(x=p),y+m>window.innerHeight-p&&(y=window.innerHeight-m-p,t-y>l&&(y=t-l)),y<p&&(y=p),s({left:x,top:y})},[e,o,t,l]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${g.left}px`,top:`${g.top}px`,backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:10,...a==null?void 0:a.tooltip,children:n}):null},Pi=({type:e,data:o,dataPoints:t,title:n,showLegend:l=!0,legendPosition:a="bottom",showGrid:c=!0,showTooltips:g=!0,animated:s=!0,animationDuration:u=500,responsive:h=!0,aspectRatio:f=16/9,width:m=200,height:p=200,views:b,onDataPointClick:x,onSeriesClick:y,isLoading:k=!1,error:I,noData:T,loadingIndicator:C,errorIndicator:w,noDataIndicator:j,"aria-label":z,themeMode:E,...P})=>{const{animationProgress:H,tooltip:S,containerRef:$,processedData:A,showTooltip:_,hideTooltip:V,getChartDimensions:B}=Si({data:o,dataPoints:t,animated:s,animationDuration:u,showTooltips:g}),W=A(),{width:L,height:D}=B(),F=m||L,q=p||(h?L/f:D),O=()=>{if(!l||!W)return null;let ee=[];return e==="pie"||e==="donut"?Array.isArray(W)&&(ee=W):W&&W.series&&(ee=W.series),!ee||ee.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"center",marginTop:a==="bottom"?"16px":0,marginBottom:a==="top"?"16px":0,...pi,...b==null?void 0:b.legend,children:ee.map((re,ne)=>r.jsxs(i.View,{...bi,...b==null?void 0:b.legendItem,children:[r.jsx(i.View,{backgroundColor:re.color,...yi}),r.jsx(i.Text,{...xi,children:re.name||re.label})]},`legend-${ne}`))})},U=()=>{if(!W)return null;switch(e){case"bar":return r.jsx(Mi,{data:W,width:F,height:q,animationProgress:H,showGrid:c,onBarClick:y,showTooltip:_,hideTooltip:V,views:b});case"line":case"area":return r.jsx(zi,{data:W,width:F,height:q,animationProgress:H,showGrid:c,onPointClick:y,showTooltip:_,hideTooltip:V,views:b});case"pie":case"donut":return r.jsx(Vi,{dataPoints:W,width:F,height:q,animationProgress:H,isDonut:e==="donut",onSliceClick:x,showTooltip:_,hideTooltip:V,views:b});default:return null}},Z=()=>k?r.jsx(i.View,{...Ii,...b==null?void 0:b.loadingOverlay,children:C||r.jsx(i.Center,{children:r.jsx(no,{size:"lg"})})}):null,X=()=>I?r.jsx(i.View,{...Ti,...b==null?void 0:b.errorOverlay,children:w||r.jsx(i.Text,{fontWeight:"medium",children:typeof I=="string"?I:"An error occurred"})}):null,N=()=>T?r.jsx(i.View,{...ji,...b==null?void 0:b.noDataOverlay,children:j||r.jsx(i.Text,{children:typeof T=="string"?T:"No data available"})}):null,Q=z??(typeof n=="string"?n:"Chart"),R=!I&&!k&&!T;return r.jsxs(i.View,{ref:$,role:"region","aria-label":Q,"aria-busy":k,...fi,...b==null?void 0:b.container,...P,children:[n&&r.jsx(i.Text,{...mi,children:n}),R&&a==="top"&&O(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...b==null?void 0:b.chart,children:[R&&U(),Z(),X(),N()]}),R&&a==="bottom"&&O(),r.jsx(Ei,{visible:g&&S.visible,x:S.x,y:S.y,content:S.content,maxDistance:100,views:b})]})},Wi=e=>r.jsx(Pi,{...e}),_i=(e=365)=>{const[o,t]=d.useState(!1),[n,l]=d.useState(null),a="app-studio-cookie-consent";d.useEffect(()=>{const u=localStorage.getItem(a);l(u!==null?u==="true":!1)},[]);const c=u=>{localStorage.setItem(a,String(u));const h=new Date;h.setDate(h.getDate()+e),localStorage.setItem(`${a}-expires`,h.toISOString()),l(u)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{localStorage.removeItem(a),localStorage.removeItem(`${a}-expires`),l(!1)}}},$i=e=>{const o=e==="dark";return{default:{container:{backgroundColor:o?"#1f2937":"#ffffff",borderColor:o?"#374151":"#e5e7eb",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#e5e7eb":"#1f2937"},acceptButton:{backgroundColor:"#3b82f6",color:"#ffffff",hoverBackgroundColor:"#2563eb"},customizeButton:{backgroundColor:"transparent",color:o?"#e5e7eb":"#4b5563",borderColor:o?"#4b5563":"#d1d5db",hoverBackgroundColor:o?"#374151":"#f3f4f6"}},info:{container:{backgroundColor:o?"#1e3a8a":"#eff6ff",borderColor:o?"#1e40af":"#bfdbfe",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#bfdbfe":"#1e40af"},acceptButton:{backgroundColor:"#3b82f6",color:"#ffffff",hoverBackgroundColor:"#2563eb"},customizeButton:{backgroundColor:"transparent",color:o?"#bfdbfe":"#1e40af",borderColor:o?"#3b82f6":"#93c5fd",hoverBackgroundColor:o?"#1e40af":"#dbeafe"}},primary:{container:{backgroundColor:o?"#0c4a6e":"#f0f9ff",borderColor:o?"#0369a1":"#bae6fd",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#bae6fd":"#0369a1"},acceptButton:{backgroundColor:"#0ea5e9",color:"#ffffff",hoverBackgroundColor:"#0284c7"},customizeButton:{backgroundColor:"transparent",color:o?"#bae6fd":"#0369a1",borderColor:o?"#0ea5e9":"#7dd3fc",hoverBackgroundColor:o?"#0369a1":"#e0f2fe"}}}},Hi=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:l="bottom",variant:a="default",onAccept:c,onCustomize:g,views:s,showCustomizeButton:u=!0,cookieExpiration:h=365,themeMode:f,...m})=>{const{themeMode:p}=i.useTheme(),b=f||p||"light",{hasConsent:x,acceptCookies:y}=_i(h),I=$i(b)[a];if(x)return null;const T=()=>{y(),c&&c()},C=()=>{g&&g()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...l==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...I.container,...s==null?void 0:s.container,...m,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...s==null?void 0:s.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...s==null?void 0:s.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...s==null?void 0:s.buttonGroup,children:[u&&r.jsx(_e,{variant:"outline",onClick:C,size:"sm",...s==null?void 0:s.customizeButton,children:n}),r.jsx(_e,{variant:"primary",onClick:T,size:"sm",...s==null?void 0:s.acceptButton,children:t})]})]})})},Bi=e=>r.jsx(Hi,{...e}),Li=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[l,a]=d.useState(!1),[c,g]=d.useState({x:0,y:0}),[s,u]=d.useState(null),h=d.useRef(null),f=d.useRef(null),m=d.useMemo(()=>rt("contextmenu-content"),[]),p=d.useCallback(x=>{g({x:x.clientX,y:x.clientY}),a(!0),n==null||n(!0)},[n]),b=d.useCallback(()=>{a(!1),u(null),n==null||n(!1)},[n]);return d.useEffect(()=>{const x=I=>{f.current&&!f.current.contains(I.target)&&b()},y=()=>{l&&b()},k=I=>{I.key==="Escape"&&l&&b()};return document.addEventListener("mousedown",x),window.addEventListener("resize",y),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",x),window.removeEventListener("resize",y),document.removeEventListener("keydown",k)}},[l,b]),{isOpen:l,setIsOpen:a,position:c,setPosition:g,activeSubmenuId:s,setActiveSubmenuId:u,size:o,variant:t,triggerRef:h,contentRef:f,contentId:m,openMenu:p,closeMenu:b}},Cr={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Ai={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},wr={hover:{backgroundColor:"color-gray-100"}},Ir=d.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),Di=({children:e,value:o})=>r.jsx(Ir.Provider,{value:o,children:e}),Fo=()=>{const e=d.useContext(Ir);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Tr=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:l,...a})=>{const{triggerRef:c,contentId:g,openMenu:s}=Fo(),h={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),s)s(f);else{const{setIsOpen:m,setPosition:p}=Fo();p({x:f.clientX,y:f.clientY}),m(!0)}},"aria-controls":g,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&d.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...l==null?void 0:l.container,...a};if(t&&d.isValidElement(e)){const f=d.Children.only(e);return d.cloneElement(f,{...h,...f.props})}return r.jsx(i.View,{...h,children:e})},It=({items:e,children:o,position:t,side:n="right",align:l="start",views:a,style:c,...g})=>{const{isOpen:s,position:u,contentRef:h,contentId:f,variant:m}=Fo(),p=d.useRef(null),b=h||p,{ref:x,relation:y}=i.useElementPosition({}),[k,I]=d.useState({x:0,y:0});if(d.useEffect(()=>{if(s&&b.current){const C=t||u,w=b.current.offsetWidth,j=b.current.offsetHeight,z=window.innerWidth,E=window.innerHeight;let P=C.x,H=C.y;y&&(y.space.horizontal==="left"?P=C.x-w:P=C.x,y.space.vertical==="top"?H=C.y-j:H=C.y),P+w>z&&(P=z-w-8),P<8&&(P=8),H+j>E&&(H=E-j-8),H<8&&(H=8),I({x:P,y:H})}},[s,u,t,n,l,b,y]),!s)return null;const T={position:"fixed",top:`${k.y}px`,left:`${k.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:b,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...T,...c},...Ai[m],...a==null?void 0:a.menu,...a==null?void 0:a.content,...g,children:[e&&e.map((C,w)=>C.divider?r.jsx(Sr,{views:a},`divider-${w}`):r.jsx(jr,{item:C,views:a},C.id)),o]})},jr=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:l,...a})=>{const{activeSubmenuId:c,setActiveSubmenuId:g,size:s,closeMenu:u}=Fo();if(e){const[f,m]=d.useState(!1),p=e.items&&e.items.length>0,b=c===e.id,[x,y]=d.useState({x:0,y:0}),k=e.disabled||n,I=()=>{m(!0),p&&g(e.id)},T=()=>{m(!1)},C=()=>{k||!p&&e.onClick&&(e.onClick(),u&&u())},{ref:w,relation:j}=i.useElementPosition({});return d.useEffect(()=>{if(b&&w.current){const z=w.current.getBoundingClientRect(),E=window.innerWidth,P=200;let H=!1;if(j)H=j.space.horizontal==="left";else{const S=E-z.right,$=z.left;H=S<P&&$>S}y({x:H?z.left-P:z.right,y:z.top})}},[b,e.items,j]),r.jsxs(i.View,{ref:w,role:"menuitem",display:"flex",alignItems:"center",cursor:k?"not-allowed":"pointer",opacity:k?.5:1,position:"relative","aria-disabled":k,"data-disabled":k?"":void 0,...Cr[s],_hover:k?{}:wr.hover,backgroundColor:f&&!k?"color-gray-100":"transparent",onMouseEnter:I,onMouseLeave:T,onClick:C,...l==null?void 0:l.item,...a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...l==null?void 0:l.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),p&&r.jsx(i.View,{marginLeft:8,...l==null?void 0:l.submenuIndicator,children:r.jsx(le,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),b&&p&&r.jsx(It,{items:e.items||[],position:x,side:"right",align:"start",views:l})]})}const h=f=>{n||(t==null||t(f),u&&u())};return r.jsx(i.View,{role:"menuitem",onClick:h,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Cr[s],_hover:n?{}:wr.hover,...l==null?void 0:l.item,...a,children:o})},Sr=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Fi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),Oi=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:l=!0,views:a,themeMode:c,...g})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Tr,{disableNativeContextMenu:l,views:a,...g,children:e}),r.jsx(It,{items:o,views:a})]}),Ne=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:l=!0,onOpenChange:a,views:c,...g})=>{const s=Li({size:t,variant:n,onOpenChange:a}),{isOpen:u,setIsOpen:h,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:b,triggerRef:x,contentRef:y,contentId:k,openMenu:I,closeMenu:T}=s;return r.jsx(Di,{value:{isOpen:u,setIsOpen:h,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:b,size:t,variant:n,triggerRef:x,contentRef:y,contentId:k,openMenu:I,closeMenu:T,styles:c},children:r.jsx(Oi,{items:o,size:t,variant:n,disableNativeContextMenu:l,views:c,...g,children:e})})};Ne.Trigger=Tr,Ne.Content=It,Ne.Item=jr,Ne.Divider=Sr,Ne.Separator=Fi;const qi=({src:e,color:o,views:t,themeMode:n,...l})=>{const{getColor:a,themeMode:c}=i.useTheme(),g=o?{fill:a(o,{themeMode:c}),stroke:a(o,{themeMode:c})}:{};return r.jsx(i.Center,{...l,...t==null?void 0:t.container,children:r.jsx(i.Image,{...g,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},Ni=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Mr=({placeholder:e,isMulti:o,options:t,id:n=`select-${Math.random().toString(36).substr(2,9)}`})=>{const l=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(l),[f,m]=d.useState(0),[p,b]=d.useState(!0);return{id:n,value:u,setValue:h,hide:p,setHide:b,isHovered:a,setIsHovered:c,isFocused:g,setIsFocused:s,highlightedIndex:f,setHighlightedIndex:m}},zr=({children:e,containerId:o="portal-root"})=>{const[t,n]=d.useState(null);return d.useEffect(()=>{let l=document.getElementById(o),a=!1;return l||(a=!0,l=document.createElement("div"),l.setAttribute("id",o),document.body.appendChild(l)),n(l),()=>{a&&l&&l.parentNode&&l.childNodes.length===0&&l.parentNode.removeChild(l)}},[o]),t?Ka.createPortal(e,t):null},Tt=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{size:"xs",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"all 0.2s ease",...o.helperText,...t,children:e}),Te=d.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...l},a)=>r.jsxs(i.Vertical,{ref:a,gap:8,position:"relative",width:"100%",marginVertical:4,...l,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Tt,{marginTop:4,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"all 0.2s ease",...n==null?void 0:n.error,children:t})]}));Te.displayName="FieldContainer";const Vr={default:{borderRadius:"8px",media:{mobile:{borderRadius:"6px"}}},square:{borderRadius:0},rounded:{borderRadius:"8px",media:{mobile:{borderRadius:"6px"}}},pill:{borderRadius:"9999px"}},Er={xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px"},Pr={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",transition:"border-color 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out",_hover:{borderColor:"color-gray-300",backgroundColor:"color-gray-50"},_focus:{borderColor:"theme-primary",backgroundColor:"color-white",outline:"none",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.05)"},_focusVisible:{borderColor:"theme-primary",backgroundColor:"color-white",outline:"none",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.05)"}},default:{borderWidth:0,borderBottomWidth:"1.5px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",borderRadius:0,backgroundColor:"transparent",transition:"border-color 200ms ease-out, background-color 200ms ease-out, box-shadow 200ms ease-out",_hover:{borderBottomColor:"color-gray-400",backgroundColor:"color-gray-50"},_focus:{borderBottomColor:"theme-primary",borderBottomWidth:"2px",backgroundColor:"transparent",outline:"none"},_focusVisible:{borderBottomColor:"theme-primary",borderBottomWidth:"2px",backgroundColor:"transparent",outline:"none"}},none:{border:"none",backgroundColor:"transparent",transition:"background-color 200ms ease-out",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"},_focusVisible:{outline:"none",backgroundColor:"color-gray-100"}}},Ui={paddingTop:"16px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px",media:{mobile:{paddingTop:"12px",paddingBottom:"6px",paddingLeft:"12px",paddingRight:"12px"}}},Gi={paddingTop:"12px",paddingBottom:"12px",paddingLeft:"16px",paddingRight:"16px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},Me=({label:e,shadow:o,children:t,value:n,size:l="md",shape:a="default",variant:c="default",error:g=!1,showLabel:s=!1,isFocused:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,views:p={pickerBox:{}},...b})=>{const y=g?"color-red-500":(h||u)&&!f?"theme-primary":"color-gray-300";return r.jsx(i.Horizontal,{gap:8,width:"100%",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"space-between",marginBottom:2,borderStyle:"solid",borderColor:y,backgroundColor:"color-white",fontSize:i.Typography.fontSizes[l],cursor:f?"not-allowed":m?"auto":"text",opacity:f?.7:1,transition:"border-color 200ms ease-out, background-color 200ms ease-out, box-shadow 200ms ease-out, opacity 200ms ease-out",...s?Ui:Gi,...o,...Vr[a],...Pr[c],...p==null?void 0:p.container,...b,children:t})},jt=({children:e,...o})=>r.jsx(i.Center,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",...o,children:e}),Yi={h1:{fontSize:96,lineHeight:112,letterSpacing:-1.5},h2:{fontSize:60,lineHeight:71,letterSpacing:-.5},h3:{fontSize:48,lineHeight:57,letterSpacing:0},h4:{fontSize:34,lineHeight:40,letterSpacing:.25},h5:{fontSize:24,lineHeight:28,letterSpacing:0},h6:{fontSize:20,lineHeight:24,letterSpacing:.15}},vi=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:l=!1,weight:a="normal",size:c="sm",dropDown:g,...s})=>{const u=o?Yi[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[a],textDecoration:l?"line-through":n?"underline":"none",...u,...s,children:e})},so=e=>r.jsx(vi,{...e}),$e=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:l={label:{}},helperText:a,...c})=>r.jsx(so,{top:0,zIndex:-10,position:"absolute",fontSize:Er[o],lineHeight:Er[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":n,transition:"color 200ms ease-out",...l.label,...c,children:e}),Ue=({children:e,...o})=>r.jsx(i.Vertical,{width:"100%",maxWidth:"100%",position:"relative",...o,children:e}),Wr={xs:12,sm:14,md:16,lg:20,xl:24},Xi={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:"10px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02)"},Ki={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Qi={padding:"10px 12px",cursor:"pointer",borderRadius:"6px",margin:"2px 4px",transition:"background-color 0.15s ease"},Oo={default:{backgroundColor:"transparent"},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},_r={open:{transform:"rotate(180deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},closed:{transform:"rotate(0deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Zi={padding:"4px 8px",borderRadius:"6px",backgroundColor:"color-gray-100",fontSize:"13px",fontWeight:"500",color:"color-gray-700",transition:"background-color 0.15s ease"},Ji={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Ri=({isHovered:e,setIsHovered:o,option:t,size:n="md",callback:l=()=>{},style:a,isSelected:c=!1,...g})=>{const s=(f,m)=>{f.stopPropagation(),f.preventDefault(),typeof l=="function"&&l(m)},u=()=>o(!e),h=()=>c&&e?Oo.selectedHighlighted:c?Oo.selected:e?Oo.highlighted:Oo.default;return r.jsxs(i.Element,{as:"li",display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Qi,...h(),onMouseEnter:u,onMouseLeave:u,onClick:f=>s(f,t.value),...g,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"1.4",color:c?"color-gray-900":"color-gray-700",...a,children:t.label}),c&&r.jsx(i.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},es=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:l,removeOption:a=()=>{},options:c})=>{const g={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:4,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",lineHeight:"1.5",letterSpacing:"-0.01em",backgroundColor:"transparent",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease",...o.field,...o.text},s=c.length>0&&c.find(u=>u.value===t);return r.jsx(i.Text,{...g,children:(t===""||Array.isArray(t)&&t.length===0)&&l?l:r.jsx(r.Fragment,{children:typeof t=="string"?(s&&s.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(u=>r.jsx(rs,{option:u,removeOption:a},u))}):r.jsx("span",{children:t})})})},os=({id:e,name:o,value:t,onChange:n,isMulti:l=!1,isDisabled:a=!1,isReadOnly:c=!1,options:g=[],...s})=>{const u=h=>{n&&n(h)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:0,height:0,position:"absolute",value:t,disabled:a,readOnly:c,onChange:u,multiple:l,...s,children:g.length>0&&g.map(h=>r.jsx("option",{value:h.value,children:h.label},h.value))})},ts=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:l,setHighlightedIndex:a,selectedValue:c})=>{const g=u=>n(u),s=u=>Array.isArray(c)?c.includes(u):c===u;return r.jsx(i.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...Xi,style:Ji,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((u,h)=>r.jsx(Ri,{size:e,style:o.text,option:u,callback:g,isSelected:s(u.value),isHovered:h===l,setIsHovered:()=>{},onMouseEnter:()=>a(h)},u.value))})},rs=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const l=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:a=>a.stopPropagation(),...Zi,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(pe,{role:"close-button",color:"color-gray-500",widthHeight:Wr[o],onClick:l,cursor:"pointer",transition:"color 0.15s ease",_hover:{color:"color-gray-700"}})]})},$r=({id:e,name:o,label:t,value:n,placeholder:l,helperText:a,hide:c=!1,error:g=!1,isMulti:s=!1,isFocused:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,options:p=[],shadow:b={},size:x="md",shape:y="default",variant:k="default",views:I={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:T=()=>{},setHide:C=()=>{},setValue:w=()=>{},setIsHovered:j=()=>{},setIsFocused:z=()=>{},setHighlightedIndex:E,highlightedIndex:P,...H})=>{const{ref:S,relation:$,updateRelation:A}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),_=d.useRef(null),V=()=>{var X;if(!S.current)return{};const O=S.current.getBoundingClientRect(),U={position:"fixed",left:O.left,width:O.width,zIndex:1e4};return((X=$==null?void 0:$.space)==null?void 0:X.vertical)==="top"?{...U,bottom:window.innerHeight-O.top+8}:{...U,top:O.bottom+8}};d.useEffect(()=>{const O=()=>C(!0);return document.addEventListener("closeAllSelects",O),()=>document.removeEventListener("closeAllSelects",O)},[C]),d.useEffect(()=>{const O=U=>{!U.target.closest(`#${e}`)&&!c&&C(!0)};return document.addEventListener("click",O),()=>{document.removeEventListener("click",O)}},[e,c,C]);const B=!!(u&&t),W=()=>j(!h),L=()=>z(!0),D=O=>{document.dispatchEvent(new Event("closeAllSelects")),O&&O.stopPropagation&&O.stopPropagation();const U=!c;C(U),z(!U)},F=d.useCallback(O=>{if(C(!0),document.dispatchEvent(new Event("closeAllSelects")),s&&Array.isArray(n)){if(!n.includes(O)){const U=[...n,O];w(U),T&&T(O)}}else w(O),T&&T(O);z(!0)},[s,n,C,w,T,z]),q=O=>{if(Array.isArray(n)&&n.includes(O)){const U=n.filter(Z=>Z!==O);w(U.length===0?[]:U)}};return r.jsx(Te,{ref:S,position:"relative",width:"100%",display:"inline-block",id:e,role:"SelectBox",helperText:a,error:g,views:I,onClick:O=>{O.stopPropagation(),f||m||D(O)},children:r.jsxs(Me,{label:t,size:x,error:g,shape:y,views:I,shadow:b,variant:k,value:n,color:"theme-primary",isHovered:h,isDisabled:f,isReadOnly:m,isFocused:u,showLabel:B,onMouseEnter:W,onMouseLeave:W,position:"relative",children:[r.jsxs(Ue,{children:[B&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:g,...I,children:t}),r.jsx(os,{id:e,name:o,options:p,onChange:T,value:n,isDisabled:f,isReadOnly:m,isMulti:s,onFocus:L,...H}),r.jsx(es,{options:p,size:x,views:I,value:n,isDisabled:f,placeholder:l,removeOption:q})]}),r.jsx(jt,{children:!m&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?_r.closed:_r.open,children:r.jsx(le,{color:"inherit",widthHeight:Wr[x],style:I.icon,orientation:"down"})})}),!c&&p.length>0&&r.jsx(zr,{children:r.jsx(i.Element,{ref:_,onClick:O=>O.stopPropagation(),style:{...V(),...Ki.enter},children:r.jsx(ts,{size:x,views:I,options:p,callback:F,highlightedIndex:P,setHighlightedIndex:E,selectedValue:n})})})]})})},ns=e=>{const o={...e,options:e.options||[]},t=Mr(o);return r.jsx($r,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Hr=({isDisabled:e,isChecked:o})=>{const[t,n]=d.useState(!1),[l,a]=d.useState(o||!1),[c,g]=d.useState(o||!1);return d.useEffect(()=>{o!==void 0&&(a(o),g(o))},[o]),{isHovered:t,setIsHovered:n,on:l,setOn:a,value:c,setValue:g}},as={xs:{height:"8px",width:"8px"},sm:{height:"12px",width:"12px"},md:{height:"16px",width:"16px"},lg:{height:"20px",width:"20px"},xl:{height:"24px",width:"24px"}},ls={xs:{height:"16px",width:"36px"},sm:{height:"20px",width:"44px"},md:{height:"24px",width:"52px"},lg:{height:"28px",width:"60px"},xl:{height:"32px",width:"68px"}},cs={xs:{paddingVertical:4,paddingHorizontal:2},sm:{paddingVertical:4,paddingHorizontal:2},md:{paddingVertical:4,paddingHorizontal:4},lg:{paddingVertical:4,paddingHorizontal:4},xl:{paddingVertical:4,paddingHorizontal:4}},He={default:{active:"theme-primary",inactive:"color-gray-300",knob:"white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9}}},Br={slider:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},knob:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}},is=e=>r.jsx(i.Input,{type:"checkbox",...e}),Lr=({id:e,name:o,label:t,inActiveChild:n,isChecked:l,activeChild:a,labelPosition:c="right",shadow:g={},size:s="sm",value:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,on:p,setOn:b,onChange:x,setValue:y=()=>{},setIsHovered:k=()=>{},helperText:I,views:T={slider:{},circle:{},label:{}},...C})=>{const w=P=>{if(!m&&!f){const H=P.target.checked;y(H),b(H),x&&x(H)}},j=()=>k(!0),z=()=>k(!1),E={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":m?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease",...T.label}};return r.jsxs(so,{htmlFor:e,onMouseEnter:j,onMouseLeave:z,...E.container,...C,children:[r.jsx(is,{id:e,name:o,opacity:0,width:0,height:0,checked:u,onChange:w,disabled:f,readOnly:m,...C}),c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"color-gray-700",transition:"all 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:u?a?"space-between":"flex-end":n?"space-between":"flex-start",marginBottom:4,borderRadius:"9999px",backgroundColor:f?He.default.disabled:u?h?He.states.hover.active:He.default.active:h?He.states.hover.inactive:He.default.inactive,opacity:!f&&u&&h?He.states.hover.activeOpacity:1,cursor:"pointer",...Br.slider,...g,...cs[s],...ls[s],...T.slider,children:[a&&u&&r.jsx(i.View,{marginLeft:8,marginRight:4,transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",children:a}),r.jsx(i.View,{borderRadius:"50%",backgroundColor:He.default.knob,boxShadow:h?"0 2px 4px rgba(0, 0, 0, 0.2)":"0 1px 2px rgba(0, 0, 0, 0.1)",transform:h?"scale(1.05)":"scale(1)",...Br.knob,zIndex:1,...as[s],...T.circle}),n&&!u&&r.jsx(i.View,{marginRight:8,marginLeft:4,transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",children:n})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"color-gray-700",transition:"all 0.2s ease",children:t})]})},ss=e=>{const o=Hr(e);return r.jsx(Lr,{...o,...e})},Ar=({placeholder:e,isMulti:o,options:t,id:n=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const l=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(l),[f,m]=d.useState(0),[p,b]=d.useState(!0);return{id:n,value:u,setValue:h,hide:p,setHide:b,isHovered:a,setIsHovered:c,isFocused:g,setIsFocused:s,highlightedIndex:f,setHighlightedIndex:m}},Dr=({id:e,name:o,label:t,value:n,size:l,views:a={},options:c=[],onChange:g=()=>{},setValue:s=()=>{},...u})=>{const{getColor:h}=i.useTheme(),f=d.useCallback(m=>{s(m.value),g&&g(m.value)},[s,g]);return r.jsxs(Te,{id:e,width:"100%",views:a,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Se,{widthHeight:14})," ",r.jsx(i.Text,{children:t})]}),r.jsx(i.Horizontal,{gap:0,children:c.map((m,p,b)=>{const x=n===m.value;let y=h("color-gray-200"),k=h("color-gray-500"),I="transparent";if(x){if(m.color)m.color,y=h(m.color),k=h(m.color),I="rgba(0,0,0,0.05)";else{const T=h("theme-primary");y=T,k=T,I="color-gray-50"}m.color?(y=h(m.color),k=h(m.color),I="transparent"):(y=h("theme-primary"),k=h("theme-primary"),I="transparent")}return r.jsx(_e,{onClick:()=>f(m),flex:1,...l?{size:l}:{paddingVertical:6,fontSize:"12px"},fontWeight:x?"bold":"normal",style:{borderTop:`1px solid ${x?y:h("color-gray-200")}`,borderBottom:`1px solid ${x?y:h("color-gray-200")}`,borderLeft:`1px solid ${x?y:h("color-gray-200")}`,borderRight:p===b.length-1||x?`1px solid ${x?y:h("color-gray-200")}`:"none",backgroundColor:I,color:k,borderRadius:p===0?"6px 0 0 6px":p===b.length-1?"0 6px 6px 0":"0",zIndex:x?1:0,boxShadow:"none"},...a.item,children:m.label},m.value)})}),r.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}})]})},ds=e=>{const o={...e,options:e.options||[]},t=Ar(o);return r.jsx(Dr,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Fr=({label:e,placeholder:o,value:t})=>{const[n,l]=d.useState(e??o),[a,c]=d.useState(!1),[g,s]=d.useState(t||""),[u,h]=d.useState(!1);return d.useMemo(()=>{l(u&&!g?o??"":e??o)},[g,u,e,o]),{hint:n,setHint:l,isHovered:a,setIsHovered:c,value:g,setValue:s,isFocused:u,setIsFocused:h}},Or=({id:e,name:o,hint:t,error:n,value:l,label:a,shadow:c,helperText:g,placeholder:s,size:u="sm",shape:h="default",variant:f="default",isHovered:m=!1,isFocused:p=!1,isEditable:b=!1,isReadOnly:x=!1,isDisabled:y=!1,isAutoFocus:k=!1,isMultiline:I=!1,maxRows:T=3,maxCols:C=30,onBlur:w=()=>{},onChange:j,onFocus:z,setHint:E=()=>{},setValue:P=()=>{},setIsFocused:H=()=>{},setIsHovered:S=()=>{},views:$={label:{},helperText:{}},...A})=>{const _=!!(p&&a),V={margin:0,paddingVertical:4,paddingHorizontal:0,width:"100%",minHeight:"5em",maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[u],lineHeight:`${Math.round(i.Typography.fontSizes[u]*1.5)}px`,letterSpacing:"-0.01em",fontWeight:400,backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":"text",opacity:y?.7:1,transition:"color 200ms ease-out, opacity 200ms ease-out",...$.field},B=()=>S(!m),W=()=>{H(!0),z&&z()},L=F=>{w(F),H(!1)},D=F=>{typeof F=="string"?(P(F),j&&j(F)):(P(F.target.value),j&&j(F.target.value))};return r.jsx(Te,{helperText:g,error:n,views:$,...A,children:r.jsx(Me,{label:a,size:u,error:n,shape:h,views:$,shadow:c,variant:f,value:l,color:"theme-primary",isHovered:m,isDisabled:y,isReadOnly:x,isFocused:p,showLabel:_,onMouseEnter:B,onMouseLeave:B,...$==null?void 0:$.content,children:r.jsxs(Ue,{...$==null?void 0:$.warper,children:[_&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:n,...$==null?void 0:$.label,children:a}),r.jsx(i.Element,{as:"textarea",id:e,name:o,rows:T,cols:C,value:l,readOnly:x,disabled:y,autoFocus:k,editable:`${!!b.toString()}`,placeholder:t,onBlur:L,onFocus:W,multiline:`${!!I.toString()}`,onChange:F=>D(F),...V,style:{resize:y||x?"none":"vertical"},...$==null?void 0:$.textarea})]})})})},gs=e=>{const o=Fr(e);return r.jsx(Or,{...o,...e})},St=({label:e,placeholder:o,value:t})=>{const[n,l]=d.useState(e??o),[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(t);return d.useMemo(()=>{l(a&&!u?o??"":e??o)},[u,a,e,o]),{hint:n,setHint:l,isFocused:a,setIsFocused:c,isHovered:g,setIsHovered:s,setValue:h,value:u}},us=e=>r.jsx(i.Input,{type:"text",...e}),go=({id:e,name:o,label:t,hint:n,value:l,onChange:a,left:c,right:g,helperText:s,placeholder:u,onChangeText:h,shadow:f={},views:m={container:{},field:{},label:{},helperText:{},text:{}},size:p="md",shape:b="default",variant:x="default",error:y=!1,isFocused:k=!1,isHovered:I=!1,isDisabled:T=!1,isReadOnly:C=!1,isClearable:w=!0,isAutoFocus:j=!1,setHint:z=()=>{},setIsFocused:E=()=>{},setIsHovered:P=()=>{},setValue:H=()=>{},onClick:S=()=>{},onFocus:$,onBlur:A=()=>{},themeMode:_,...V})=>{const{getColor:B,themeMode:W}=i.useTheme(),L=B("color-blueGray-700",{themeMode:_||W}),D=!!(k&&t),F={margin:0,paddingVertical:4,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[p],lineHeight:`${Math.round(i.Typography.fontSizes[p]*1.4)}px`,letterSpacing:"-0.01em",fontWeight:400,backgroundColor:"transparent",color:T?"color-gray-400":"color-gray-900",cursor:T?"not-allowed":"text",opacity:T?.7:1,transition:"color 200ms ease-out, opacity 200ms ease-out",...m.field},q=()=>{E(!0),$&&$()},O=()=>P(!I),U=N=>{A&&A(N),E(!1)},Z=N=>{typeof N=="string"?(H(N),h&&h(N),a&&a(N)):(H(N.target.value),h&&h(N.target.value),a&&a(N.target.value))},X=()=>{H(""),a&&(A({target:{name:o}}),h&&h(""),a&&a("")),typeof document>"u"&&h&&h("")};return r.jsx(Te,{helperText:s,error:y,views:m,children:r.jsxs(Me,{label:t,size:p,error:y,shape:b,views:m,shadow:f,variant:x,value:l,color:"theme-primary",isHovered:I,isDisabled:T,isReadOnly:C,isFocused:k,showLabel:D,onMouseEnter:O,onMouseLeave:O,children:[c,r.jsxs(Ue,{children:[D&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:y,...m,children:t}),r.jsx(us,{id:e,name:o,readOnly:C,disabled:T,autoFocus:j,placeholder:n,onFocus:q,onBlur:U,autoComplete:"off",...F,...V,onChange:Z,value:l})]}),w&&l&&!C&&!T&&r.jsx(jt,{children:r.jsx(pe,{size:20,color:L,onClick:X,cursor:"pointer",borderRadius:"50%",transition:"background-color 150ms ease-out, transform 150ms ease-out",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),g]})})},uo=e=>{const o=St(e);return r.jsx(go,{...o,...e})},qr=({defaultIsSelected:e=!1})=>{const[o,t]=d.useState(!1),[n,l]=d.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:l}},hs={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},Nr={xs:10,sm:14,md:16,lg:20,xl:24},fs={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"color-black",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Mt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Ur=({id:e,icon:o,name:t,label:n,isChecked:l,onChange:a,onValueChange:c,shadow:g={},labelPosition:s="right",size:u="md",error:h=!1,isSelected:f=!1,isHovered:m=!1,isDisabled:p=!1,isReadOnly:b=!1,isIndeterminate:x=!1,defaultIsSelected:y=!1,setIsSelected:k=()=>{},setIsHovered:I=()=>{},views:T={checkbox:{},label:{}},infoText:C,helperText:w,...j})=>{const z=()=>I(!m),E=()=>{!b&&!p&&(k&&k(!f),a&&a(!l),c&&c(!l))},P=x?"indeterminate":l||f?"selected":"unselected",H=h?Mt.error[P]:p?Mt.disabled[P]:m?Mt.hover[P]:{},S={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:h?"color-red-600":p?"color-gray-400":"color-gray-700",cursor:p?"not-allowed":b?"default":"pointer",opacity:p?.6:1,transition:"all 0.2s ease",...T.label},checkbox:{...fs[P],...H,borderRadius:"4px",...hs[u],transition:"all 0.2s ease",...g,...T.checkbox}};return r.jsxs(so,{htmlFor:e,as:"div",onClick:E,onMouseEnter:z,onMouseLeave:z,size:i.Typography.fontSizes[u],...S.container,...j,children:[r.jsxs(i.Vertical,{gap:8,children:[" ",r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",s==="left"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...T==null?void 0:T.label,children:n}),r.jsx(i.Center,{...S.checkbox,children:x?r.jsx(Jt,{widthHeight:Nr[u],color:"white",transition:"all 0.2s ease"}):(l||f)&&(o??r.jsx(Vo,{widthHeight:Nr[u],color:"white",transition:"all 0.2s ease"}))}),s==="right"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...T==null?void 0:T.label,children:n})]}),C&&r.jsx(i.Text,{marginLeft:s==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"15",...T==null?void 0:T.infoText,children:C})]}),h&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease",children:h})]})},ms=e=>{const o=qr(e);return r.jsx(Ur,{...o,...e})},Gr=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:l,onOpen:a,onClose:c,closeOnSelect:g=!0,maxRecentColors:s=8,showRecentColors:u=!0,isAutoFocus:h=!1}=e,[f,m]=d.useState(!1),[p,b]=d.useState(o??t),[x,y]=d.useState(""),[k,I]=d.useState([]),[T,C]=d.useState(!1),[w,j]=d.useState(!1),z=d.useRef(null),E=d.useRef(null);d.useEffect(()=>{o!==void 0&&b(o)},[o]),d.useEffect(()=>{if(u)try{const B=localStorage.getItem("colorInput-recentColors");B&&I(JSON.parse(B))}catch(B){console.warn("Failed to load recent colors from localStorage:",B)}},[u]),d.useEffect(()=>{h&&z.current&&z.current.focus()},[h]),d.useEffect(()=>{const B=W=>{f&&z.current&&E.current&&!z.current.contains(W.target)&&!E.current.contains(W.target)&&_()};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[f]);const P=d.useCallback(B=>{u&&I(W=>{const L=W.filter(F=>F!==B),D=[B,...L].slice(0,s);try{localStorage.setItem("colorInput-recentColors",JSON.stringify(D))}catch(F){console.warn("Failed to save recent colors to localStorage:",F)}return D})},[u,s]),H=d.useCallback(()=>{const B=!f;m(B),B?a==null||a():c==null||c()},[f,a,c]),S=d.useCallback(B=>{b(B),P(B),n==null||n(B),l==null||l(B),g&&(m(!1),c==null||c())},[n,l,g,c,P]),$=d.useCallback(B=>{y(B)},[]),A=d.useCallback(()=>{x&&(S(x),y(""))},[x,S]),_=d.useCallback(()=>{m(!1),c==null||c()},[c]),V=d.useCallback(B=>{b(B),n==null||n(B)},[n]);return{isOpen:f,selectedColor:p,recentColors:k,customColor:x,isFocused:T,isHovered:w,handleToggle:H,handleColorSelect:S,handleCustomColorChange:$,handleCustomColorSubmit:A,handleClose:_,setIsFocused:C,setIsHovered:j,setValue:V,triggerRef:z,dropdownRef:E}},ho={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px"},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 8px 16px rgba(0,0,0,0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},ps={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},bs={default:{borderRadius:"6px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},ys={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},xs=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Yr=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:l,views:a={},size:c="md",shape:g="default",variant:s="default",shadow:u,error:h=!1,isDisabled:f=!1,isReadOnly:m=!1,isFocused:p=!1,isHovered:b=!1,predefinedColors:x=xs,showCustomInput:y=!0,showRecentColors:k=!0,isOpen:I=!1,selectedColor:T="",recentColors:C=[],customColor:w="",handleToggle:j=()=>{},handleColorSelect:z=()=>{},handleCustomColorChange:E=()=>{},handleCustomColorSubmit:P=()=>{},setIsFocused:H=()=>{},setIsHovered:S=()=>{},triggerRef:$,dropdownRef:A,onChange:_,...V})=>{const{getColor:B}=i.useTheme(),W={...ho.container,...a==null?void 0:a.container},L={...ho.trigger,...ps[c],...bs[g],...ys[s],...h&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...p&&{borderColor:"color-blue-500",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.1)"},...b&&!f&&{borderColor:"color-gray-400"},...a==null?void 0:a.trigger,...u&&u},D={...ho.dropdown,...a==null?void 0:a.dropdown},F={...ho.colorGrid,...a==null?void 0:a.colorGrid},q={...ho.recentColors,...a==null?void 0:a.recentColors},O=T||"color-gray-200";return r.jsxs(i.View,{...W,...V,children:[t&&r.jsx(so,{htmlFor:e,size:c,isDisabled:f,error:h,views:a==null?void 0:a.label,children:t}),r.jsxs(i.View,{ref:$,onClick:f||m?void 0:j,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onFocus:()=>H(!0),onBlur:()=>H(!1),tabIndex:f?-1:0,role:"button","aria-expanded":I,"aria-haspopup":"listbox","aria-label":t||n,width:"fit-content",gap:8,...L,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:O,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!m&&!f&&r.jsx(le,{widthHeight:16,color:"color-gray-500",orientation:I?"up":"down"})]}),I&&r.jsxs(i.View,{ref:A,...D,children:[r.jsx(i.View,{...F,children:x.map((U,Z)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"4px",backgroundColor:U.value,borderWidth:"2px",borderStyle:"solid",borderColor:T===U.value?"color-blue-500":"transparent",cursor:"pointer",transition:"all 0.2s ease",onClick:()=>z(U.value),title:U.name,_hover:{transform:"scale(1.1)",borderColor:"color-gray-400"},...a==null?void 0:a.colorSwatch},Z))}),k&&C.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...q,children:C.map((U,Z)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:U,borderWidth:"1px",borderStyle:"solid",borderColor:T===U?"color-blue-500":"color-gray-300",cursor:"pointer",transition:"all 0.2s ease",onClick:()=>z(U),title:U,_hover:{transform:"scale(1.1)",borderColor:"color-gray-400"}},Z))})]}),y&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(uo,{value:w,onChange:U=>E(U.target.value),placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:a==null?void 0:a.customInput}),r.jsx(i.View,{padding:"8px 12px",backgroundColor:"color-blue-500",borderRadius:"4px",cursor:"pointer",onClick:P,_hover:{backgroundColor:"color-blue-600"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),l&&r.jsx(i.Text,{fontSize:"12px",color:h?"color-red-500":"color-gray-600",marginTop:"4px",...a==null?void 0:a.helperText,children:l}),h&&typeof h=="string"&&r.jsx(i.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...a==null?void 0:a.error,children:h})]})},ks=e=>{const o=Gr(e);return r.jsx(Yr,{...o,...e})},zt=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],vr=({placeholder:e})=>{const[o,t]=d.useState(zt),[n,l]=d.useState(e??zt[0].name),[a,c]=d.useState(!0),[g,s]=d.useState(!1),[u,h]=d.useState(!1);return{hide:a,setHide:c,newOptions:o,setNewOptions:t,isHovered:u,setIsHovered:h,isFocused:g,setIsFocused:s,value:n,setValue:l}},Xr={xs:8,sm:10,md:12,lg:14,xl:16},Cs=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),ws=e=>r.jsx(i.Input,{type:"country",...e}),Is=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Ts=({option:e,size:o="md",callback:t=()=>{},views:n={text:{}}})=>{const l=a=>{a&&a.stopPropagation&&a.stopPropagation(),t(e)};return r.jsx(Is,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:l,fontSize:i.Typography.fontSizes[o],_hover:{opacity:.8},...n.text,children:e})},js=({size:e,views:o={dropDown:{}},options:t=[],callback:n=()=>{}})=>{const l=a=>n(a);return r.jsx(Cs,{role:"dropDown",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:4,position:"absolute",flexDirection:"column",backgroundColor:"color-white",boxShadow:"rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px",...o.dropDown,children:t.map(a=>r.jsx(Ts,{size:e,option:a.name,callback:l,...o.text},a.code))})},Kr=({id:e,name:o,label:t,value:n,placeholder:l,helperText:a,hide:c=!1,error:g=!1,isHovered:s=!1,isFocused:u=!1,isAutoFocus:h=!1,isDisabled:f=!1,isReadOnly:m=!1,shadow:p={},newOptions:b=[],size:x="md",variant:y="default",shape:k="default",onChange:I,onBlur:T=()=>{},setHide:C=()=>{},setNewOptions:w=()=>{},setIsHovered:j=()=>{},setIsFocused:z=()=>{},setValue:E=()=>{},views:P={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:H,...S})=>{const{getColor:$,themeMode:A}=i.useTheme(),_=$("color-blueGray-700",{themeMode:H||A}),V=()=>z(!0),B=O=>{C(!c),E(O),I&&I(O)},W=()=>{!f&&!m&&C(!c)},L=O=>{const U=O.target.value,Z=zt.filter(X=>X.name.toLowerCase().startsWith(U.toLowerCase()));c&&C(!1),w(Z),I&&I(U)},D=O=>{T(O),z(!1)},F=!!(t&&(u||n)),q={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[x],backgroundColor:"transparent",color:f?"color-trueGray-600":"color-blueGray-700",cursor:f?"not-allowed":m?"auto":"pointer",...P.field};return r.jsxs(Te,{helperText:a,error:g,views:P,onClick:W,children:[r.jsxs(Me,{label:t,size:x,error:g,shape:k,views:P,shadow:p,variant:y,value:n,color:"theme-primary",isDisabled:f,isReadOnly:m,isFocused:u,showLabel:F,_hover:!f&&!g?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Ue,{children:[F&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:g,...P,children:t}),r.jsx(ws,{id:e,name:o,placeholder:l,readOnly:m,disabled:f,autoFocus:h,onBlur:D,onFocus:V,...q,...S,value:n,onChange:L})]}),r.jsx(jt,{children:c?r.jsx(le,{orientation:"down",widthHeight:Xr[x],color:_,style:P.icon}):r.jsx(le,{orientation:"up",widthHeight:Xr[x],color:_,style:P.icon})})]}),!c&&r.jsx(js,{size:x,views:P,options:b,callback:B})]})},Ss=e=>{const o=vr(e);return r.jsx(Kr,{...o,...e})};function qo(e){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},qo(e)}function he(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function Ms(e){return he(1,arguments),e instanceof Date||qo(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ce(e){he(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||qo(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function zs(e){if(he(1,arguments),!Ms(e)&&typeof e!="number")return!1;var o=Ce(e);return!isNaN(Number(o))}function Be(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Vs(e,o){he(2,arguments);var t=Ce(e).getTime(),n=Be(o);return new Date(t+n)}function Es(e,o){he(2,arguments);var t=Be(o);return Vs(e,-t)}var Ps=864e5;function Ws(e){he(1,arguments);var o=Ce(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),l=t-n;return Math.floor(l/Ps)+1}function No(e){he(1,arguments);var o=1,t=Ce(e),n=t.getUTCDay(),l=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-l),t.setUTCHours(0,0,0,0),t}function Qr(e){he(1,arguments);var o=Ce(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var l=No(n),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var c=No(a);return o.getTime()>=l.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function _s(e){he(1,arguments);var o=Qr(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=No(t);return n}var $s=6048e5;function Hs(e){he(1,arguments);var o=Ce(e),t=No(o).getTime()-_s(o).getTime();return Math.round(t/$s)+1}var Bs={};function Uo(){return Bs}function Go(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Uo(),f=Be((t=(n=(l=(a=o==null?void 0:o.weekStartsOn)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&l!==void 0?l:h.weekStartsOn)!==null&&n!==void 0?n:(s=h.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Ce(e),p=m.getUTCDay(),b=(p<f?7:0)+p-f;return m.setUTCDate(m.getUTCDate()-b),m.setUTCHours(0,0,0,0),m}function Zr(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Ce(e),f=h.getUTCFullYear(),m=Uo(),p=Be((t=(n=(l=(a=o==null?void 0:o.firstWeekContainsDate)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:m.firstWeekContainsDate)!==null&&n!==void 0?n:(s=m.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(f+1,0,p),b.setUTCHours(0,0,0,0);var x=Go(b,o),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var k=Go(y,o);return h.getTime()>=x.getTime()?f+1:h.getTime()>=k.getTime()?f:f-1}function Ls(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Uo(),f=Be((t=(n=(l=(a=o==null?void 0:o.firstWeekContainsDate)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:h.firstWeekContainsDate)!==null&&n!==void 0?n:(s=h.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),m=Zr(e,o),p=new Date(0);p.setUTCFullYear(m,0,f),p.setUTCHours(0,0,0,0);var b=Go(p,o);return b}var As=6048e5;function Ds(e,o){he(1,arguments);var t=Ce(e),n=Go(t,o).getTime()-Ls(t,o).getTime();return Math.round(n/As)+1}function te(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ze={y:function(o,t){var n=o.getUTCFullYear(),l=n>0?n:1-n;return te(t==="yy"?l%100:l,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):te(n+1,2)},d:function(o,t){return te(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return te(o.getUTCHours()%12||12,t.length)},H:function(o,t){return te(o.getUTCHours(),t.length)},m:function(o,t){return te(o.getUTCMinutes(),t.length)},s:function(o,t){return te(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,l=o.getUTCMilliseconds(),a=Math.floor(l*Math.pow(10,n-3));return te(a,t.length)}},Ge={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fs={G:function(o,t,n){var l=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(l,{width:"abbreviated"});case"GGGGG":return n.era(l,{width:"narrow"});case"GGGG":default:return n.era(l,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var l=o.getUTCFullYear(),a=l>0?l:1-l;return n.ordinalNumber(a,{unit:"year"})}return ze.y(o,t)},Y:function(o,t,n,l){var a=Zr(o,l),c=a>0?a:1-a;if(t==="YY"){var g=c%100;return te(g,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):te(c,t.length)},R:function(o,t){var n=Qr(o);return te(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return te(n,t.length)},Q:function(o,t,n){var l=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(l);case"QQ":return te(l,2);case"Qo":return n.ordinalNumber(l,{unit:"quarter"});case"QQQ":return n.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(l,{width:"wide",context:"formatting"})}},q:function(o,t,n){var l=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(l);case"qq":return te(l,2);case"qo":return n.ordinalNumber(l,{unit:"quarter"});case"qqq":return n.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(l,{width:"wide",context:"standalone"})}},M:function(o,t,n){var l=o.getUTCMonth();switch(t){case"M":case"MM":return ze.M(o,t);case"Mo":return n.ordinalNumber(l+1,{unit:"month"});case"MMM":return n.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(l,{width:"wide",context:"formatting"})}},L:function(o,t,n){var l=o.getUTCMonth();switch(t){case"L":return String(l+1);case"LL":return te(l+1,2);case"Lo":return n.ordinalNumber(l+1,{unit:"month"});case"LLL":return n.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(l,{width:"wide",context:"standalone"})}},w:function(o,t,n,l){var a=Ds(o,l);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):te(a,t.length)},I:function(o,t,n){var l=Hs(o);return t==="Io"?n.ordinalNumber(l,{unit:"week"}):te(l,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ze.d(o,t)},D:function(o,t,n){var l=Ws(o);return t==="Do"?n.ordinalNumber(l,{unit:"dayOfYear"}):te(l,t.length)},E:function(o,t,n){var l=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(l,{width:"short",context:"formatting"});case"EEEE":default:return n.day(l,{width:"wide",context:"formatting"})}},e:function(o,t,n,l){var a=o.getUTCDay(),c=(a-l.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return te(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(o,t,n,l){var a=o.getUTCDay(),c=(a-l.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return te(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(o,t,n){var l=o.getUTCDay(),a=l===0?7:l;switch(t){case"i":return String(a);case"ii":return te(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(l,{width:"short",context:"formatting"});case"iiii":default:return n.day(l,{width:"wide",context:"formatting"})}},a:function(o,t,n){var l=o.getUTCHours(),a=l/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(o,t,n){var l=o.getUTCHours(),a;switch(l===12?a=Ge.noon:l===0?a=Ge.midnight:a=l/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(o,t,n){var l=o.getUTCHours(),a;switch(l>=17?a=Ge.evening:l>=12?a=Ge.afternoon:l>=4?a=Ge.morning:a=Ge.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var l=o.getUTCHours()%12;return l===0&&(l=12),n.ordinalNumber(l,{unit:"hour"})}return ze.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ze.H(o,t)},K:function(o,t,n){var l=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(l,{unit:"hour"}):te(l,t.length)},k:function(o,t,n){var l=o.getUTCHours();return l===0&&(l=24),t==="ko"?n.ordinalNumber(l,{unit:"hour"}):te(l,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ze.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ze.s(o,t)},S:function(o,t){return ze.S(o,t)},X:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Rr(c);case"XXXX":case"XX":return Le(c);case"XXXXX":case"XXX":default:return Le(c,":")}},x:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"x":return Rr(c);case"xxxx":case"xx":return Le(c);case"xxxxx":case"xxx":default:return Le(c,":")}},O:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jr(c,":");case"OOOO":default:return"GMT"+Le(c,":")}},z:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jr(c,":");case"zzzz":default:return"GMT"+Le(c,":")}},t:function(o,t,n,l){var a=l._originalDate||o,c=Math.floor(a.getTime()/1e3);return te(c,t.length)},T:function(o,t,n,l){var a=l._originalDate||o,c=a.getTime();return te(c,t.length)}};function Jr(e,o){var t=e>0?"-":"+",n=Math.abs(e),l=Math.floor(n/60),a=n%60;if(a===0)return t+String(l);var c=o;return t+String(l)+c+te(a,2)}function Rr(e,o){if(e%60===0){var t=e>0?"-":"+";return t+te(Math.abs(e)/60,2)}return Le(e,o)}function Le(e,o){var t=o||"",n=e>0?"-":"+",l=Math.abs(e),a=te(Math.floor(l/60),2),c=te(l%60,2);return n+a+t+c}var en=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},on=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Os=function(o,t){var n=o.match(/(P+)(p+)?/)||[],l=n[1],a=n[2];if(!a)return en(o,t);var c;switch(l){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",en(l,t)).replace("{{time}}",on(a,t))},qs={p:on,P:Os};function Ns(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var Us=["D","DD"],Gs=["YY","YYYY"];function Ys(e){return Us.indexOf(e)!==-1}function vs(e){return Gs.indexOf(e)!==-1}function tn(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Xs={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ks=function(o,t,n){var l,a=Xs[o];return typeof a=="string"?l=a:t===1?l=a.one:l=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+l:l+" ago":l};function Vt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Qs={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zs={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Js={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rs={date:Vt({formats:Qs,defaultWidth:"full"}),time:Vt({formats:Zs,defaultWidth:"full"}),dateTime:Vt({formats:Js,defaultWidth:"full"})},ed={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},od=function(o,t,n,l){return ed[o]};function fo(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",l;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):a;l=e.formattingValues[c]||e.formattingValues[a]}else{var g=e.defaultWidth,s=t!=null&&t.width?String(t.width):e.defaultWidth;l=e.values[s]||e.values[g]}var u=e.argumentCallback?e.argumentCallback(o):o;return l[u]}}var td={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rd={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ad={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ld={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cd={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},id=function(o,t){var n=Number(o),l=n%100;if(l>20||l<10)switch(l%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},sd={ordinalNumber:id,era:fo({values:td,defaultWidth:"wide"}),quarter:fo({values:rd,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:fo({values:nd,defaultWidth:"wide"}),day:fo({values:ad,defaultWidth:"wide"}),dayPeriod:fo({values:ld,defaultWidth:"wide",formattingValues:cd,defaultFormattingWidth:"wide"})};function mo(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,l=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=o.match(l);if(!a)return null;var c=a[0],g=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(g)?gd(g,function(f){return f.test(c)}):dd(g,function(f){return f.test(c)}),u;u=e.valueCallback?e.valueCallback(s):s,u=t.valueCallback?t.valueCallback(u):u;var h=o.slice(c.length);return{value:u,rest:h}}}function dd(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function gd(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function ud(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var l=n[0],a=o.match(e.parsePattern);if(!a)return null;var c=e.valueCallback?e.valueCallback(a[0]):a[0];c=t.valueCallback?t.valueCallback(c):c;var g=o.slice(l.length);return{value:c,rest:g}}}var hd=/^(\d+)(th|st|nd|rd)?/i,fd=/\d+/i,md={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pd={any:[/^b/i,/^(a|c)/i]},bd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yd={any:[/1/i,/2/i,/3/i,/4/i]},xd={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kd={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Cd={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wd={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Id={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Td={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jd={ordinalNumber:ud({matchPattern:hd,parsePattern:fd,valueCallback:function(o){return parseInt(o,10)}}),era:mo({matchPatterns:md,defaultMatchWidth:"wide",parsePatterns:pd,defaultParseWidth:"any"}),quarter:mo({matchPatterns:bd,defaultMatchWidth:"wide",parsePatterns:yd,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:mo({matchPatterns:xd,defaultMatchWidth:"wide",parsePatterns:kd,defaultParseWidth:"any"}),day:mo({matchPatterns:Cd,defaultMatchWidth:"wide",parsePatterns:wd,defaultParseWidth:"any"}),dayPeriod:mo({matchPatterns:Id,defaultMatchWidth:"any",parsePatterns:Td,defaultParseWidth:"any"})},Sd={code:"en-US",formatDistance:Ks,formatLong:Rs,formatRelative:od,localize:sd,match:jd,options:{weekStartsOn:0,firstWeekContainsDate:1}},Md=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vd=/^'([^]*?)'?$/,Ed=/''/g,Pd=/[a-zA-Z]/;function Wd(e,o,t){var n,l,a,c,g,s,u,h,f,m,p,b,x,y;he(2,arguments);var k=String(o),I=Uo(),T=(n=(l=void 0)!==null&&l!==void 0?l:I.locale)!==null&&n!==void 0?n:Sd,C=Be((a=(c=(g=(s=void 0)!==null&&s!==void 0?s:void 0)!==null&&g!==void 0?g:I.firstWeekContainsDate)!==null&&c!==void 0?c:(u=I.locale)===null||u===void 0||(h=u.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=Be((f=(m=(p=(b=void 0)!==null&&b!==void 0?b:void 0)!==null&&p!==void 0?p:I.weekStartsOn)!==null&&m!==void 0?m:(x=I.locale)===null||x===void 0||(y=x.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var j=Ce(e);if(!zs(j))throw new RangeError("Invalid time value");var z=Ns(j),E=Es(j,z),P={firstWeekContainsDate:C,weekStartsOn:w,locale:T,_originalDate:j},H=k.match(zd).map(function(S){var $=S[0];if($==="p"||$==="P"){var A=qs[$];return A(S,T.formatLong)}return S}).join("").match(Md).map(function(S){if(S==="''")return"'";var $=S[0];if($==="'")return _d(S);var A=Fs[$];if(A)return vs(S)&&tn(S,o,String(e)),Ys(S)&&tn(S,o,String(e)),A(E,S,T.localize,P);if($.match(Pd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return S}).join("");return H}function _d(e){var o=e.match(Vd);return o?o[1].replace(Ed,"'"):e}const rn=()=>{const[e,o]=d.useState(!1),[t,n]=d.useState(!1),[l,a]=d.useState(Wd(new Date,"yyyy-MM-dd"));return{date:l,setDate:a,isHovered:e,setIsHovered:o,isFocused:t,setIsFocused:n}},$d=e=>r.jsx(i.Input,{type:"date",...e}),nn=({id:e,icon:o,name:t,label:n,date:l,children:a,helperText:c,shadow:g={},size:s="md",variant:u="default",shape:h="default",views:f={container:{},label:{},helperText:{},text:{},field:{}},error:m=!1,isHovered:p=!1,isFocused:b=!1,isDisabled:x=!1,isReadOnly:y=!1,setDate:k=()=>{},setIsFocused:I=()=>{},setIsHovered:T=()=>{},onChange:C,onChangeText:w,...j})=>{const z=!!(b&&n),E=()=>T(!p),P=()=>I(!0),H=$=>{typeof $=="string"?(k($),w&&w($)):(k($.target.value),C&&C($.target.value))},S={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},fontSize:i.Typography.fontSizes[s],backgroundColor:"transparent",color:x?"color-trueGray-600":"color-blueGray-700",cursor:x?"not-allowed":y?"auto":"pointer",...f.field};return r.jsx(Te,{helperText:c,error:m,views:f,children:r.jsx(Me,{label:n,size:s,error:m,shape:h,views:f,shadow:g,color:"theme-primary",variant:u,value:l,isHovered:p,isDisabled:x,isReadOnly:y,isFocused:b,showLabel:z,onMouseEnter:E,onMouseLeave:E,children:r.jsxs(Ue,{children:[z&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:m,...f,children:n}),r.jsx($d,{id:e,name:t,onFocus:P,disabled:x,readOnly:y,...S,...j,...w&&{onChangeText:H},onChange:H})]})})})},Hd=e=>{const o=rn();return r.jsx(nn,{...o,...e})},an=e=>{const o=St(e),[t,n]=d.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},Bd=({visibleIcon:e=r.jsx(gt,{widthHeight:14}),hiddenIcon:o=r.jsx(dt,{widthHeight:14}),...t})=>{const{isVisible:n,setIsVisible:l,...a}=an(t);return r.jsx(go,{...a,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!n)},children:n?e:o})})},ln=(e,o,t)=>{const[n,l]=d.useState(e),[a,c]=d.useState(o?{value:o,label:o}:e[0]),[g,s]=d.useState([]),[u,h]=d.useState(0),[f,m]=d.useState(t??""),[p,b]=d.useState(!1);return{filteredItems:n,setFilteredItems:l,selectedItem:a,setSelectedItem:c,selectedItems:g,setSelectedItems:s,highlightedIndex:u,setHighlightedIndex:h,searchQuery:f,setSearchQuery:m,isDropdownVisible:p,setIsDropdownVisible:b}},Ld={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:"10px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02)"},cn={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Ad={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:"10px",borderTopRightRadius:"10px"},Dd={padding:"8px 10px",cursor:"pointer",borderRadius:"6px",margin:"1px 4px",transition:"background-color 0.15s ease"},Fd={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},sn={open:{transform:"rotate(180deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},closed:{transform:"rotate(0deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Od={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:"4px",fontSize:"13px",fontWeight:"500",color:"color-gray-700",transition:"background-color 0.15s ease"},dn=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:l=!0,left:a,right:c,label:g,filteredItems:s,setSelectedItem:u,selectedItem:h,selectedItems:f,setSelectedItems:m,highlightedIndex:p,setHighlightedIndex:b,searchQuery:x,setSearchQuery:y,setFilteredItems:k,views:I,isDropdownVisible:T,setIsDropdownVisible:C,isMulti:w=!1,...j})=>{const{ref:z,relation:E}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),P=d.useRef(null),[H,S]=d.useState(!1),[$,A]=d.useState(!1),_=()=>{var U;const D=$?cn.enter:cn.initial;if(!z.current)return{};const F=z.current.getBoundingClientRect(),q={position:"fixed",left:F.left,width:F.width,zIndex:1e4,...D};return((U=E==null?void 0:E.space)==null?void 0:U.vertical)==="top"?{...q,bottom:window.innerHeight-F.top+6}:{...q,top:F.bottom+6}};d.useEffect(()=>{if(T){const D=setTimeout(()=>A(!0),10);return()=>clearTimeout(D)}A(!1)},[T]),d.useEffect(()=>{const D=F=>{!F.composedPath().some(U=>(U==null?void 0:U.id)==="combobox-dropdown")&&z.current&&!z.current.contains(F.target)&&C(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const V=D=>{if(y(D),D==="")k(o);else{const F=o.filter(q=>q.label.toLowerCase().includes(D.toLowerCase()));k(F)}b(0)},B=D=>{if(w){const F=f.some(O=>O.value===D.value);let q;F?q=f.filter(O=>O.value!==D.value):q=[...f,D],m(q),n==null||n(q)}else u(D),n==null||n(D),C(!1)},W=(D,F)=>{D.stopPropagation();const q=f.filter(O=>O.value!==F.value);m(q),n==null||n(q)},L=D=>w?f.some(F=>F.value===D.value):D.value===h.value;return r.jsxs(i.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...j,children:[g&&r.jsx(i.Text,{views:I==null?void 0:I.label,htmlFor:j.id,children:g}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:z,onClick:()=>C(!T),style:{width:"100%"},children:r.jsxs(Me,{isHovered:H,isFocused:T,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),cursor:"pointer",views:{container:I==null?void 0:I.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",width:"100%",flexWrap:w?"wrap":"nowrap",...I==null?void 0:I.labelContainer,children:[a,w?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(D=>r.jsxs(i.Horizontal,{...Od,_hover:{backgroundColor:"color-gray-200"},children:[D.icon&&r.jsx(i.View,{flexShrink:0,children:D.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:D.label}),r.jsx(pe,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:F=>W(F,D)})]},D.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...I==null?void 0:I.label,children:e}):r.jsxs(r.Fragment,{children:[h.icon&&h.label!==e&&r.jsx(i.View,{children:h.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:h.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...I==null?void 0:I.label,children:h.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[c,r.jsx(i.View,{style:T?sn.open:sn.closed,children:r.jsx(le,{widthHeight:16,orientation:"down",color:T?"color-gray-700":"color-gray-400"})})]})]})}),T&&r.jsx(zr,{children:r.jsxs(i.View,{ref:P,id:"combobox-dropdown",role:"listbox","aria-labelledby":j.id,...Ld,style:_(),...I==null?void 0:I.dropdown,children:[l&&r.jsx(i.View,{...Ad,children:r.jsx(go,{id:`${j.id}-search`,name:`${j.name}-search`,width:"100%",type:"search",autoFocus:!0,value:x,onChange:D=>V(D),hint:e||"Search...",isClearable:!1,left:r.jsx(zo,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...I==null?void 0:I.text},field:{fontSize:"13px"}}})}),s.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:s.map((D,F)=>{const q=L(D),O=F===p;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Dd,backgroundColor:q&&O?"rgba(59, 130, 246, 0.12)":q?"rgba(59, 130, 246, 0.08)":O?"color-gray-100":"transparent",onMouseEnter:()=>b(F),onClick:()=>B(D),...I==null?void 0:I.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[D.icon&&r.jsx(i.View,{flexShrink:0,children:D.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:D.label})]}),q&&t&&r.jsx(Vo,{widthHeight:16,color:"theme-primary"})]},D.value)})}),s.length===0&&r.jsxs(i.Vertical,{...Fd,children:[r.jsx(zo,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},qd=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:l,...a})=>{const c=ln(t,n,l);return r.jsx(dn,{id:e,name:o,items:t,...c,...a})},gn=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:l,onTagRemove:a,maxTags:c,minTagLength:g=1,maxTagLength:s=50,allowDuplicates:u=!1,separators:h=["enter","comma"],isDisabled:f=!1,isReadOnly:m=!1}=e,[p,b]=d.useState(""),[x,y]=d.useState(()=>(o||t||[]).map((_,V)=>({id:`tag-${V}-${Date.now()}`,value:_}))),[k,I]=d.useState(!1),[T,C]=d.useState(!1),w=o&&Array.isArray(o)?o.map((A,_)=>({id:`tag-${_}-${Date.now()}`,value:A})):x;d.useEffect(()=>{o&&Array.isArray(o)&&y(o.map((A,_)=>({id:`tag-${_}-${Date.now()}`,value:A})))},[o]);const j=d.useCallback(A=>{const _=A.trim();return!(_.length<g||_.length>s||!u&&w.map(B=>B.value.toLowerCase()).includes(_.toLowerCase())||c&&w.length>=c)},[w,g,s,u,c]),z=d.useCallback(A=>{if(f||m)return;const _=A.trim();if(!_||!j(_))return;const V={id:`tag-${Date.now()}-${Math.random()}`,value:_},B=[...w,V],W=B.map(L=>L.value);o||y(B),n==null||n(W),l==null||l(_),b("")},[w,j,n,l,f,m,o]),E=d.useCallback(A=>{if(f||m)return;const _=w[A];if(!_)return;const V=w.filter((W,L)=>L!==A),B=V.map(W=>W.value);o||y(V),n==null||n(B),a==null||a(_.value,A)},[w,n,a,f,m,o]),P=d.useCallback(A=>{if(f||m)return;const _=A.target.value;if(h.includes("comma")&&_.includes(",")){const V=_.split(","),B=V[0],W=V.slice(1).join(",");B.trim()&&z(B),b(W);return}b(_)},[z,h,f,m]),H=d.useCallback(A=>{if(f||m)return;const{key:_}=A;if(h.includes("enter")&&_==="Enter"){A.preventDefault(),p.trim()&&z(p);return}if(h.includes("tab")&&_==="Tab"&&p.trim()){A.preventDefault(),z(p);return}if(h.includes("space")&&_===" "&&p.trim()){A.preventDefault(),z(p);return}if(_==="Backspace"&&!p&&w.length>0){A.preventDefault(),E(w.length-1);return}},[z,E,p,w,h,f,m]),S=d.useCallback(()=>{var A;I(!0),(A=e.onFocus)==null||A.call(e)},[e.onFocus]),$=d.useCallback(()=>{var A;I(!1),p.trim()&&z(p),(A=e.onBlur)==null||A.call(e)},[z,p,e.onBlur]);return{inputValue:p,setInputValue:b,tags:w,setTags:y,isFocused:k,setIsFocused:I,isHovered:T,setIsHovered:C,addTag:z,removeTag:E,handleInputChange:P,handleKeyDown:H,handleFocus:S,handleBlur:$,validateTag:j}},Nd=({tag:e,onRemove:o,isRemovable:t,size:n,views:l,isDisabled:a,isReadOnly:c})=>{const[g,s]=d.useState(!1),u={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:u.padding,backgroundColor:"color-gray-100-100",borderRadius:"16px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-100",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",opacity:a?.6:1,_hover:!a&&!c?{backgroundColor:"color-gray-100-200",borderColor:"color-gray-200",boxShadow:"0 4px 6px rgba(0,0,0,0.05)",transform:"translateY(-1px)"}:{},...l==null?void 0:l.tag,children:[r.jsx(i.Text,{fontSize:u.fontSize,color:a?"color-gray-100":"theme-primary",whiteSpace:"nowrap",...l==null?void 0:l.tagText,children:e}),t&&!a&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.2s ease",backgroundColor:g?"color-red-100":"transparent",opacity:g?1:.7,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onClick:h=>{h.stopPropagation(),o()},_hover:{backgroundColor:"color-red-50"},...l==null?void 0:l.tagRemove,children:r.jsx(pe,{widthHeight:u.iconSize,color:g?"color-red-500":"color-gray-400"})})]})},un=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:l,error:a=!1,inputValue:c="",tags:g=[],left:s,right:u,shadow:h={},views:f={},size:m="md",shape:p="default",variant:b="default",isDisabled:x=!1,isReadOnly:y=!1,isAutoFocus:k=!1,isRemovable:I=!0,isFocused:T=!1,isHovered:C=!1,maxTags:w,handleInputChange:j,handleKeyDown:z,handleFocus:E,handleBlur:P,removeTag:H,setIsHovered:S,onClick:$,...A})=>{const{getColor:_,themeMode:V}=i.useTheme(),B=!!(t&&(T||g.length>0||c)),W=w&&g.length>=w,L={...Vr[p],...Pr[b],...f==null?void 0:f.inputContainer},D={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[m],color:x?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",...f==null?void 0:f.input};return r.jsx(Te,{error:!!a,helperText:typeof a=="string"?a:l,views:f,...A,children:r.jsxs(Me,{label:t,shadow:h,value:g.length>0||c?"has-content":"",size:m,shape:p,variant:b,error:!!a,showLabel:B,isFocused:T,isHovered:C,isDisabled:x,isReadOnly:y,views:f,onClick:$,onMouseEnter:()=>S==null?void 0:S(!0),onMouseLeave:()=>S==null?void 0:S(!1),...L,children:[s,r.jsxs(Ue,{children:[t&&r.jsx($e,{size:m,error:!!a,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[m],padding:"8px 0",...f==null?void 0:f.tagsContainer,children:[g.map((F,q)=>r.jsx(Nd,{tag:F.value,onRemove:()=>H==null?void 0:H(q),isRemovable:I,size:m,views:f,isDisabled:x,isReadOnly:y},F.id)),!W&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:g.length===0?n:"",disabled:x,readOnly:y,autoFocus:k,onChange:j,onKeyDown:z,onFocus:E,onBlur:P,autoComplete:"off",...D}),W&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[m],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",w," tags reached"]})]})]}),u]})})},Ud=e=>{const o=gn(e),{tags:t,...n}=e;return r.jsx(un,{...o,...n})};function Gd(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hn=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:l,onComplete:a,onKeyDown:c,onKeyPress:g,onBlur:s,onFocus:u,isReadOnly:h,isDisabled:f,pattern:m,stepValues:p,pasteTransformer:b})=>{var Z,X;const x=e!==void 0,y=x?e:o,[k,I]=d.useState((y==null?void 0:y.slice(0,t))||""),[T,C]=d.useState(!1),[w,j]=d.useState(!1),[z,E]=d.useState(null),[P,H]=d.useState(null),S=d.useRef(null),$=d.useRef(null),A=d.useRef({value:k,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((X=(Z=window==null?void 0:window.CSS)==null?void 0:Z.supports)==null?void 0:X.call(Z,"-webkit-touch-callout","none"))}),_=d.useRef({prev:[null,null,"none"]}),V=m?typeof m=="string"?new RegExp(m):m:null;d.useEffect(()=>{x&&e!==k&&I((e==null?void 0:e.slice(0,t))||"")},[x,e,t,k]);const B=d.useCallback(N=>{let Q=N;if(p&&p.length>0&&N){const R=parseInt(N,10);if(!isNaN(R)){let ee=p[0],re=Math.abs(R-ee);for(let ne=1;ne<p.length;ne++){const ge=Math.abs(R-p[ne]);ge<re&&(re=ge,ee=p[ne])}Q=ee.toString()}}I(Q),n&&n(Q),l&&l(Q),a&&Q.length===t&&a(Q)},[n,l,a,t,p]),W=d.useCallback(N=>{N&&S.current!==N&&Object.defineProperty(S,"current",{value:N,writable:!0})},[]),L=d.useCallback(N=>{const Q=N.currentTarget.value.slice(0,t);if(Q.length>0&&V&&!V.test(Q)){N.preventDefault();return}B(Q),S.current&&(S.current.value=Q)},[t,V,B,S]),D=d.useCallback(()=>{var N;if(S.current){const Q=Math.min(S.current.value.length,t-1),R=S.current.value.length;(N=S.current)==null||N.setSelectionRange(Q,R),E(Q),H(R)}C(!0)},[t]),F=d.useCallback(()=>{C(!1)},[]),q=d.useCallback(N=>{c&&c(N)},[]),O=d.useCallback(N=>{g&&g(N)},[]),U=d.useCallback(N=>{const Q=S.current;if(!N.clipboardData||!Q)return;const R=N.clipboardData.getData("text/plain"),ee=b?b(R):R;N.preventDefault();const re=Q.selectionStart||0,ne=Q.selectionEnd||0,Y=(re!==ne?k.slice(0,re)+ee+k.slice(ne):k.slice(0,re)+ee+k.slice(re)).slice(0,t);if(Y.length>0&&V&&!V.test(Y))return;Q.value=Y,B(Y),I(Y);const v=Math.min(Y.length,t-1),oe=Y.length;Q.setSelectionRange(v,oe),E(v),H(oe)},[t,b,V,B,k,I]);return d.useEffect(()=>{const N=S.current,Q=$.current;if(!N||!Q)return;A.current.value!==N.value&&A.current.onChange&&A.current.onChange(N.value),_.current.prev=[N.selectionStart,N.selectionEnd,N.selectionDirection];function R(){if(document.activeElement!==N){E(null),H(null);return}const ne=(N==null?void 0:N.selectionStart)??null,ge=(N==null?void 0:N.selectionEnd)??null,me=(N==null?void 0:N.selectionDirection)??null,Y=(N==null?void 0:N.maxLength)??0,v=(N==null?void 0:N.value)??"",oe=_.current.prev;let K=-1,J=-1,ie="none";if(v.length!==0&&ne!==null&&ge!==null){const ae=ne===ge,We=ne===v.length&&v.length<Y;if(ae&&!We){const Ie=ne;if(Ie===0)K=0,J=1,ie="forward";else if(Ie===Y)K=Ie-1,J=Ie,ie="backward";else if(Y>1&&v.length>1){let Xt=0;if(oe[0]!==null&&oe[1]!==null){ie=Ie<oe[1]?"backward":"forward";const c0=oe[0]===oe[1]&&oe[0]<Y;ie==="backward"&&!c0&&(Xt=-1)}K=Xt+Ie,J=Xt+Ie+1}}K!==-1&&J!==-1&&K!==J&&S.current&&S.current.setSelectionRange(K,J,ie)}const ue=K!==-1?K:ne,fe=J!==-1?J:ge,xe=ie!=="none"?ie:me;E(ue),H(fe),_.current.prev=[ue,fe,xe]}document.addEventListener("selectionchange",R,{capture:!0}),R(),document.activeElement===N&&C(!0);const ee=()=>{Q&&Q.style.setProperty("--root-height",`${N.clientHeight}px`)};ee();const re=new window.ResizeObserver(ee);return re.observe(N),()=>{document.removeEventListener("selectionchange",R,{capture:!0}),re.disconnect()}},[]),d.useEffect(()=>{Gd(()=>{var ee,re,ne,ge;(ee=S.current)==null||ee.dispatchEvent(new Event("input"));const N=(re=S.current)==null?void 0:re.selectionStart,Q=(ne=S.current)==null?void 0:ne.selectionEnd,R=(ge=S.current)==null?void 0:ge.selectionDirection;N!==null&&Q!==null&&N!==void 0&&Q!==void 0&&(E(N),H(Q),_.current.prev=[N,Q,R||"none"])})},[k,T]),{value:k,setValue:B,isFocused:T,setIsFocused:C,isHovered:w,setIsHovered:j,inputRef:S,containerRef:$,mirrorSelectionStart:z,mirrorSelectionEnd:P,setMirrorSelectionStart:E,setMirrorSelectionEnd:H,setInputRef:W,handleChange:L,handleFocus:D,handleBlur:F,handleKeyDown:q,handleKeyPress:O,handlePaste:U}},Yd=d.createContext({slots:[],isFocused:!1,isHovering:!1}),vd=`
|
|
6
|
+
`,backgroundSize:`200% ${N}px, ${N}px 200%, 200% ${N}px, ${N}px 200%`,backgroundPosition:O,transitionProperty:"background-position",transitionDuration:`${W}s`,transitionTimingFunction:"linear",transitionDelay:X,_hover:{backgroundPosition:U,transitionDelay:Z},width:a?"fit-content":c?"100%":void 0,...f==null?void 0:f.container,...P,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||l),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,H-3),width:"100%",height:"100%",...m,...p,...b,backgroundColor:(m==null?void 0:m.backgroundColor)||T,color:y,borderWidth:0,cursor:n?"default":"pointer",children:S})})}return r.jsx(i.Element,{ref:x,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||l),...p,...b,display:"inline-flex",alignItems:"center",justifyContent:"center",width:a?"fit-content":c?"100%":void 0,borderRadius:co[s],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:h,...m,...f==null?void 0:f.container,...P,children:S})},ai=d.memo(d.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:l="left",backgroundColor:a,color:c,textColor:g,reversed:s=!1,isAuto:u=!0,isFilled:h,isDisabled:f,isLoading:m,isIconRounded:p,isHovered:b,icon:x,children:y,to:k,isExternal:I,shadow:T,onClick:C,views:w={},borderMovingDuration:j=2,borderMovingGradientColors:z=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:E="#705CFF",animatedStrokeTextColor:P="#333333",...H},S)=>{const{getColorHex:$}=i.useTheme();let V=$(f?"theme-disabled":m?"theme-loading":a??c??"theme-button-background");(V==="theme-button-background"||V==="theme-loading")&&(V=$(m?"color-dark-500":"theme-primary"));let W=$(g??"theme-button-text");W==="theme-button-text"&&(W=$("color-white"));const D=d.useMemo(()=>Rc(V,W,s),[V,W,s])[e],F=(D==null?void 0:D.color)??W,q=r.jsx(ei,{icon:x,isLoading:m,iconPosition:n,loaderPosition:l,size:o,resolvedTextColor:F,isIconRounded:p,views:w,children:y}),O=gr[o],U=p?ur[o]:{};return r.jsx(ni,{variant:e,animation:H.animation,to:k,isDisabled:f,isLoading:m,isAuto:u,isFilled:h,isExternal:I,shape:t,shadow:T,onClick:C,views:w,baseStyles:D,sizeStyles:O,iconPad:U,resolvedTextColor:F,content:q,size:o,mainTone:V,borderMovingDuration:j,borderMovingGradientColors:z,animatedStrokeAccentColor:E,animatedStrokeTextColor:P,getColor:$,containerRef:S,...H})})),_e=e=>{const[o,t]=i.useHover();return r.jsx(ai,{isHovered:t,...e})},li={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},ci={square:0,rounded:"8px",pill:"24px"},ii=e=>{const o=e==="dark";return{default:{backgroundColor:o?"color-gray-900":"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:o?"color-gray-900":"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:o?"color-gray-700":"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:o?"color-gray-600":"color-gray-300",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:o?"color-gray-900":"color-white",boxShadow:o?"0px 4px 12px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 8px 16px rgba(0, 0, 0, 0.4)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},_o=e=>{const o=e.themeMode==="dark";return{container:{backgroundColor:o?"color-gray-900":"color-white",color:o?"color-white":"color-black",borderRadius:"8px",overflow:"hidden",transition:"all 0.2s ease"},header:{padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:o?"color-gray-800":"color-gray-100",color:"theme-primary"},content:{padding:"16px",color:o?"color-gray-300":"color-gray-600"},footer:{padding:"16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:o?"color-gray-800":"color-gray-100"}}},hr=d.createContext({}),yt=()=>d.useContext(hr),xt=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).header,s={...g,...c==null?void 0:c.header,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.header)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},kt=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).content,s={...g,...c==null?void 0:c.content,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.content)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:12,...s,children:e})},Ct=({children:e,views:o,style:t,themeMode:n,...l})=>{var u;const a=i.useTheme(),{styles:c}=yt(),g=_o(a).footer,s={...g,...c==null?void 0:c.footer,...l,style:{...g==null?void 0:g.style,...(u=c==null?void 0:c.footer)==null?void 0:u.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},si=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:l,footer:a,isFullWidth:c=!1,views:g,style:s,themeMode:u,...h})=>{var C,w;const f=i.useTheme(),m=_o(f),p=((C=li[o])==null?void 0:C.padding)||"16px",b=d.useMemo(()=>({styles:{container:{...m.container,borderRadius:ci[t],...g==null?void 0:g.container},header:{...m.header,padding:p,...g==null?void 0:g.header},content:{...m.content,padding:p,...g==null?void 0:g.content},footer:{...m.footer,padding:p,...g==null?void 0:g.footer}}}),[m,g,p,t]),x=d.Children.toArray(n).some(j=>d.isValidElement(j)&&(j.type===xt||j.type===kt||j.type===Ct)),{themeMode:y}=f,I=ii(u||y)[e],T={width:c?"100%":"auto",overflow:"hidden",...I,...b.styles.container,...h,style:{...(w=b.styles.container)==null?void 0:w.style,...s}};return r.jsx(hr.Provider,{value:b,children:r.jsx(i.View,{...T,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[l&&r.jsx(xt,{children:l}),r.jsx(kt,{children:n}),a&&r.jsx(Ct,{children:a})]})})})},$o=e=>r.jsx(si,{...e});$o.Header=xt,$o.Content=kt,$o.Footer=Ct;const di=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:l=3e3,pauseOnHover:a=!0,infinite:c=!0,totalSlides:g,stepIndices:s})=>{const u=d.useRef(g||0),[h,f]=d.useState(g||0),m=d.useRef(new Set),p=d.useRef(0),b=d.useMemo(()=>rt("carousel-content"),[]),[x,y]=d.useState(o!==void 0?o:e),[k,I]=d.useState(!1),[T,C]=d.useState(!1),[w,j]=d.useState(0),[z,E]=d.useState(0),P=d.useRef(null);d.useEffect(()=>{o!==void 0&&y(o)},[o]);const H=d.useCallback(O=>{let U=O;c?O<0?U=h-1:O>=h&&(U=0):U=Math.max(0,Math.min(O,h-1)),s&&s.length>0&&(s.includes(U)||(U=s.reduce((X,N)=>Math.abs(N-U)<Math.abs(X-U)?N:X))),o===void 0&&y(U),t&&t(U)},[o,c,t,h]),S=d.useCallback(()=>{H(x+1)},[x,H]),$=d.useCallback(()=>{H(x-1)},[x,H]);d.useEffect(()=>(n&&!k&&!T&&(P.current=setInterval(()=>{S()},l)),()=>{P.current&&clearInterval(P.current)}),[n,l,k,T,S,a]);const A=d.useCallback(()=>{a&&I(!0)},[a]),_=d.useCallback(()=>{I(!1)},[]),V=d.useCallback(O=>{C(!0),"touches"in O?(j(O.touches[0].clientX),E(O.touches[0].clientY)):(j(O.clientX),E(O.clientY))},[]),B=d.useCallback(O=>{if(!T)return;let U,Z;"touches"in O?(U=O.touches[0].clientX,Z=O.touches[0].clientY):(U=O.clientX,Z=O.clientY);const X=U-w,N=Z-z;Math.abs(X)>Math.abs(N)&&Math.abs(X)>50&&(X>0?$():S(),C(!1))},[T,w,z,S,$]),W=d.useCallback(()=>{C(!1)},[]),L=d.useCallback(()=>{const O=p.current++;m.current.add(O);const U=m.current.size;return u.current=U,f(U),O},[]),D=d.useCallback(O=>{m.current.delete(O);const U=m.current.size;if(u.current=U,f(U),U>0&&x>=U){const Z=Math.max(0,U-1);o===void 0&&y(Z),t&&t(Z)}},[x,o,t]),F=c||x>0,q=c||x<h-1;return{activeIndex:x,totalSlides:h,goToSlide:H,nextSlide:S,prevSlide:$,canGoNext:q,canGoPrevious:F,handleMouseEnter:A,handleMouseLeave:_,handleDragStart:V,handleDragMove:B,handleDragEnd:W,registerSlide:L,unregisterSlide:D,contentId:b,infinite:c}},gi={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},ui={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Ho={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},io=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Ho},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Ho}}),fr=d.createContext(null),Bo=()=>{const e=d.useContext(fr);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},mr=({children:e,isActive:o,views:t,...n})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...t,...n,children:e}),pr=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:l,styles:a}=Bo(),g={...io().prevButton,...a==null?void 0:a.prevButton,...e==null?void 0:e.prevButton};return r.jsx(_e,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!l,...g,...t,children:o??r.jsx(le,{orientation:"left",widthHeight:16})})},br=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:l,styles:a}=Bo(),g={...io().nextButton,...a==null?void 0:a.nextButton,...e==null?void 0:e.nextButton};return r.jsx(_e,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!l,...g,...t,children:o??r.jsx(le,{orientation:"right",widthHeight:16})})},yr=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:l,styles:a}=Bo(),c=d.useRef(null);d.useEffect(()=>{const u=n();return c.current=u,()=>{c.current!==null&&l(c.current)}},[n,l]);const s={...io().item,...a==null?void 0:a.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...s,...t,children:e})},xr=({children:e,views:o,style:t,...n})=>{const{currentIndex:l,styles:a,contentId:c}=Bo(),g=io(),s={...g.content,...a==null?void 0:a.content,...o==null?void 0:o.content},u={...g.innerContainer,...a==null?void 0:a.innerContainer,...o==null?void 0:o.innerContainer},h=`-${l*100}%`;return r.jsx(i.View,{...s,...n,style:{...s==null?void 0:s.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...u,style:{...u==null?void 0:u.style,transform:`translateX(${h})`},children:e})})},hi=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:l=!0,navigationPosition:a="inside",prevButton:c,nextButton:g,showIndicators:s=!0,indicatorPosition:u="bottom",indicatorVariant:h="dot",autoPlay:f=!1,autoPlayInterval:m=3e3,pauseOnHover:p=!0,infinite:b=!0,direction:x="horizontal",transitionDuration:y=300,views:k,stepIndices:I,themeMode:T,...C})=>{const w=d.useMemo(()=>d.Children.toArray(e),[e]),j=di({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:m,pauseOnHover:p,infinite:b,totalSlides:w.length}),{activeIndex:z,totalSlides:E,goToSlide:P,nextSlide:H,prevSlide:S,handleMouseEnter:$,handleMouseLeave:A,handleDragStart:_,handleDragMove:V,handleDragEnd:B}=j,W=()=>{if(!l)return null;const F=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...Ho,...k==null?void 0:k.prevButton,children:"❮"}),q=g||r.jsx(i.View,{as:"button","aria-label":"Next slide",...Ho,...k==null?void 0:k.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:a==="inside"?"10px":"-40px",onClick:S,cursor:!b&&z===0?"not-allowed":"pointer",opacity:!b&&z===0?.5:1,children:F}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:a==="inside"?"10px":"-40px",onClick:H,cursor:!b&&z===w.length-1?"not-allowed":"pointer",opacity:!b&&z===w.length-1?.5:1,children:q})]})},L=()=>s?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...u==="top"?{top:"10px"}:{bottom:"10px"},...k==null?void 0:k.indicators,children:w.map((F,q)=>r.jsx(i.View,{onClick:()=>P(q),cursor:"pointer",...gi[h],...q===z?{...ui[h]}:{},...k==null?void 0:k.indicator,...q===z?k==null?void 0:k.activeIndicator:{},children:h==="number"&&q+1},q))}):null;return d.useMemo(()=>d.Children.toArray(e).some(F=>d.isValidElement(F)&&(F.type===xr||F.type===yr||F.type===pr||F.type===br)),[e])?r.jsx(fr.Provider,{value:{currentIndex:z,totalSlides:E,goToSlide:P,goToNext:H,goToPrevious:S,canGoNext:j.canGoNext,canGoPrevious:j.canGoPrevious,registerSlide:j.registerSlide,unregisterSlide:j.unregisterSlide,styles:{...io(),...k},contentId:j.contentId,infinite:b},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...k==null?void 0:k.container,...C,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:$,onMouseLeave:A,onTouchStart:_,onTouchMove:V,onTouchEnd:B,onMouseDown:_,onMouseMove:V,onMouseUp:B,...k==null?void 0:k.container,...C,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...k==null?void 0:k.slideWrapper,children:w.map((F,q)=>r.jsx(mr,{isActive:q===z,index:q,views:k==null?void 0:k.slide,children:F},q))}),W(),L()]})},Oe=e=>r.jsx(hi,{...e});Oe.Slide=mr,Oe.Content=xr,Oe.Item=yr,Oe.Previous=pr,Oe.Next=br;const ke={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},qe=[ke.blue,ke.green,ke.purple,ke.orange,ke.red,ke.teal,ke.pink,ke.indigo,ke.yellow,ke.cyan],fi={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},mi={fontSize:"18px",fontWeight:"bold",marginBottom:"16px",textAlign:"center"},pi={display:"flex",flexWrap:"wrap",justifyContent:"center",marginTop:"16px"},bi={display:"flex",alignItems:"center",marginRight:"16px",marginBottom:"8px"},yi={width:"12px",height:"12px",borderRadius:"2px",marginRight:"6px"},xi={fontSize:"14px"},kr={stroke:"color-gray-200",strokeWidth:"1px"},Lo={stroke:"color-gray-300",strokeWidth:"1px"},Ao={fontSize:"12px",fill:"color-gray-600"},ki={rx:"2px",ry:"2px",cursor:"pointer",transition:"opacity 0.2s ease",_hover:{opacity:.8}},Ci={strokeWidth:"2px",fill:"none"},wi={r:"4px",strokeWidth:"2px",stroke:"white",cursor:"pointer",transition:"r 0.2s ease"},Do={strokeWidth:"1px",stroke:"white",cursor:"pointer",transition:"opacity 0.2s ease",_hover:{opacity:.8}},wt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.8)",borderRadius:"4px",zIndex:10,padding:"16px",textAlign:"center"},Ii={...wt},Ti={...wt,backgroundColor:"rgba(255, 235, 238, 0.9)",color:"color-red-700"},ji={...wt,backgroundColor:"rgba(245, 245, 245, 0.8)",color:"color-gray-600"},Si=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:l=!0})=>{const[a,c]=d.useState(t?0:1),[g,s]=d.useState({visible:!1,x:0,y:0,content:null}),u=d.useRef(null),h=d.useRef(null);d.useEffect(()=>{if(!t){c(1);return}const x=Date.now(),y=()=>{const k=Date.now()-x,I=Math.min(k/n,1);c(I),I<1&&(u.current=requestAnimationFrame(y))};return u.current=requestAnimationFrame(y),()=>{u.current&&cancelAnimationFrame(u.current)}},[t,n]);const f=d.useCallback(()=>e?{...e,series:e.series.map((x,y)=>({...x,color:x.color||qe[y%qe.length]}))}:o?o.map((x,y)=>({...x,color:x.color||qe[y%qe.length]})):null,[e,o]),m=d.useCallback((x,y,k)=>{l&&s({visible:!0,x,y,content:k})},[l]),p=d.useCallback(()=>{s(x=>({...x,visible:!1}))},[]),b=d.useCallback(()=>{if(!h.current)return{width:0,height:0};const{width:x,height:y}=h.current.getBoundingClientRect();return{width:x,height:y}},[]);return{animationProgress:a,tooltip:g,containerRef:h,processedData:f,showTooltip:m,hideTooltip:p,getChartDimensions:b}},Mi=({data:e,width:o,height:t,animationProgress:n,showGrid:l=!0,onBarClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),h={top:20,right:20,bottom:40,left:50},f=o-h.left-h.right,m=t-h.top-h.bottom,p=d.useMemo(()=>{let w=0;return e.series.forEach(j=>{j.data.forEach(z=>{w=Math.max(w,z)})}),w},[e]),b=e.labels.length,x=e.series.length,y=f/b,k=y*.8/x,I=y*.2/(x+1),T=p||10,C=d.useMemo(()=>{const j=[];for(let z=0;z<=5;z++){const E=T/5*z;j.push(E)}return j},[p]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("line",{x1:h.left,y1:t-h.bottom,x2:o-h.right,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),r.jsx("line",{x1:h.left,y1:h.top,x2:h.left,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),e.labels.map((w,j)=>{const z=h.left+(j+.5)*y,E=t-h.bottom+20;return r.jsx("text",{x:z,y:E,textAnchor:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:w},`x-label-${j}`)}),C.map((w,j)=>{const z=t-h.bottom-w/T*m;return r.jsxs(d.Fragment,{children:[r.jsx("text",{x:h.left-10,y:z,textAnchor:"end",dominantBaseline:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:w.toFixed(0)}),l&&r.jsx("line",{x1:h.left,y1:z,x2:o-h.right,y2:z,...kr,...s==null?void 0:s.grid})]},`y-tick-${j}`)}),e.series.map((w,j)=>r.jsx(d.Fragment,{children:w.data.map((z,E)=>{const P=z/T*m*n,H=h.left+E*y+I*(j+1)+k*j,S=t-h.bottom-P,$=e.labels[E],A=e.series.reduce((L,D)=>{const F=D.data[E];return L+(typeof F=="number"?F:0)},0),_=A>0?(z/A*100).toFixed(1):null,V=w.color?u(w.color):"black",B=L=>{const D=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:w.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:V})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:$}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:z.toLocaleString()})]}),_!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${_}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:A.toLocaleString()})]})]})]});c(L.clientX,L.clientY,D)},W=()=>{a&&a(w.name,E)};return r.jsx("rect",{x:H,y:S,width:k,height:P,fill:V,onMouseEnter:B,onMouseLeave:g,onClick:W,...ki,...s==null?void 0:s.bar},`bar-${j}-${E}`)})},`series-${j}`))]})},zi=({data:e,width:o,height:t,animationProgress:n,showGrid:l=!0,onPointClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),h={top:20,right:20,bottom:40,left:50},f=o-h.left-h.right,m=t-h.top-h.bottom,p=d.useMemo(()=>{let I=0;return e.series.forEach(T=>{T.data.forEach(C=>{I=Math.max(I,C)})}),I},[e]),b=p||10,x=d.useMemo(()=>{const T=[];for(let C=0;C<=5;C++){const w=b/5*C;T.push(w)}return T},[p]),y=I=>`M ${I.map((C,w)=>{const j=h.left+w/(e.labels.length-1)*f,z=t-h.bottom-C/b*m*n;return`${j},${z}`}).join(" L ")}`,k=I=>{const T=h.left,C=h.left+f,w=t-h.bottom,j=I.map((z,E)=>{const P=h.left+E/(e.labels.length-1)*f,H=t-h.bottom-z/b*m*n;return`${P},${H}`});return`M ${T},${w} L ${j.join(" L ")} L ${C},${w} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("line",{x1:h.left,y1:t-h.bottom,x2:o-h.right,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),r.jsx("line",{x1:h.left,y1:h.top,x2:h.left,y2:t-h.bottom,...Lo,...s==null?void 0:s.axis}),e.labels.map((I,T)=>{const C=h.left+T/(e.labels.length-1)*f,w=t-h.bottom+20;return r.jsx("text",{x:C,y:w,textAnchor:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:I},`x-label-${T}`)}),x.map((I,T)=>{const C=t-h.bottom-I/b*m;return r.jsxs(d.Fragment,{children:[r.jsx("text",{x:h.left-10,y:C,textAnchor:"end",dominantBaseline:"middle",...Ao,...s==null?void 0:s.axisLabel,style:{textShadow:"0 1px 2px rgba(0, 0, 0, 0.2)",filter:"drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2))"},children:I.toFixed(0)}),l&&r.jsx("line",{x1:h.left,y1:C,x2:o-h.right,y2:C,...kr,...s==null?void 0:s.grid})]},`y-tick-${T}`)}),e.series.map((I,T)=>{const C=I.color?u(I.color):"black";return r.jsxs(d.Fragment,{children:[r.jsx("path",{d:k(I.data),fill:C,opacity:.1,...s==null?void 0:s.area}),r.jsx("path",{d:y(I.data),stroke:C,...Ci,...s==null?void 0:s.line}),I.data.map((w,j)=>{const z=h.left+j/(e.labels.length-1)*f,E=t-h.bottom-w/b*m*n,P=e.labels[j],H=e.series.reduce((W,L)=>{const D=L.data[j];return W+(typeof D=="number"?D:0)},0),S=H>0?(w/H*100).toFixed(1):null,$=j>0&&typeof I.data[j-1]=="number"?I.data[j-1]:null,A=typeof $=="number"?w-$:null,_=typeof A=="number"?`${A>=0?"+":""}${A.toLocaleString()}`:null,V=W=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:I.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:P}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),_!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:_})]}),S!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${S}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]});c(W.clientX,W.clientY,L)},B=()=>{a&&a(I.name,j)};return r.jsx("circle",{cx:z,cy:E,fill:C,onMouseEnter:V,onMouseLeave:g,onClick:B,...wi,...s==null?void 0:s.point},`point-${T}-${j}`)})]},`series-${T}`)})]})},Vi=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:l=!1,onSliceClick:a,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:u}=i.useTheme(),{ref:h,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),m=d.useRef(null);d.useEffect(()=>{m.current&&h&&(h.current=m.current)},[m,h]);const b=Math.min(o,t)/2*.8,x=o/2,y=t/2,k=l?b*.6:0,I=d.useMemo(()=>e.reduce((C,w)=>C+w.value,0),[e]),T=d.useMemo(()=>{if(I===0)return[{path:l?[`M ${x} ${y-b}`,`A ${b} ${b} 0 1 1 ${x} ${y+b}`,`A ${b} ${b} 0 1 1 ${x} ${y-b}`,`M ${x} ${y-k}`,`A ${k} ${k} 0 1 0 ${x} ${y+k}`,`A ${k} ${k} 0 1 0 ${x} ${y-k}`,"Z"].join(" "):[`M ${x} ${y}`,`M ${x} ${y-b}`,`A ${b} ${b} 0 1 1 ${x} ${y+b}`,`A ${b} ${b} 0 1 1 ${x} ${y-b}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:x,labelY:y,startAngle:0,endAngle:Math.PI*2,index:-1}];const C=[];let w=-Math.PI/2;for(let j=0;j<e.length;j++){const E=e[j].value/I,P=E*2*Math.PI*n,H=w+P,S=x+Math.cos(w)*b,$=y+Math.sin(w)*b,A=x+Math.cos(H)*b,_=y+Math.sin(H)*b,V=x+Math.cos(w)*k,B=y+Math.sin(w)*k,W=x+Math.cos(H)*k,L=y+Math.sin(H)*k,D=P>Math.PI?1:0;let F;l?F=[`M ${S} ${$}`,`A ${b} ${b} 0 ${D} 1 ${A} ${_}`,`L ${W} ${L}`,`A ${k} ${k} 0 ${D} 0 ${V} ${B}`,"Z"].join(" "):F=[`M ${x} ${y}`,`L ${S} ${$}`,`A ${b} ${b} 0 ${D} 1 ${A} ${_}`,"Z"].join(" ");const q=w+P/2,O=b*.7,U=x+Math.cos(q)*O,Z=y+Math.sin(q)*O,X=`${(E*100).toFixed(1)}%`,N=e[j].color||qe[j%qe.length],Q=u(N);C.push({path:F,color:Q,label:e[j].label,value:e[j].value,percentage:X,labelX:U,labelY:Z,startAngle:w,endAngle:H,index:j}),w=H}return C},[e,I,b,x,y,k,n,l]);return r.jsxs("svg",{ref:m,width:o,height:t,style:{overflow:"visible"},children:[l&&r.jsx("circle",{cx:x,cy:y,r:k,fill:"white",pointerEvents:"none"}),T.map((C,w)=>{const j=P=>{const H=I>0?C.value/I*100:0,S=I>0?Math.max(0,100-H):null,$=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:C.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",C.index+1," of ",e.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:C.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:C.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:I.toLocaleString()})]}),S!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${S.toFixed(1)}%`})]})]})]});let A=P.clientX,_=P.clientY;if(f&&m.current){const V=m.current.getBoundingClientRect();P.clientX-V.left,P.clientY-V.top,f.space.horizontal==="left"?A=P.clientX-100:A=P.clientX+10,f.space.vertical==="top"?_=P.clientY-30:_=P.clientY+10}c(A,_,$)},z=()=>{C.index!==-1&&a&&a(e[C.index],C.index)},E=C.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:C.path,fill:C.color,onMouseEnter:E?void 0:j,onMouseLeave:E?void 0:g,onClick:z,...Do,style:{...Do==null?void 0:Do.style,cursor:E?"default":"pointer"},...s==null?void 0:s.pie}),!E&&C.endAngle-C.startAngle>.2&&r.jsx("text",{x:C.labelX,y:C.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontWeight:"bold",pointerEvents:"none",style:{textShadow:"0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3)",filter:"drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))"},children:C.percentage})]},`slice-${w}`)})]})},Ei=({visible:e,x:o,y:t,content:n,maxDistance:l=100,views:a})=>{const c=d.useRef(null),[g,s]=d.useState({left:0,top:0});return d.useEffect(()=>{if(!e||!c.current)return;const h=c.current.getBoundingClientRect(),f=h.width,m=h.height,p=10,b=15;let x=o-b,y=t-b;const k=o-x,I=t-y;k>l&&(x=o-l),I>l&&(y=t-l),x+f>window.innerWidth-p&&(x=window.innerWidth-f-p,o-x>l&&(x=o-l)),x<p&&(x=p),y+m>window.innerHeight-p&&(y=window.innerHeight-m-p,t-y>l&&(y=t-l)),y<p&&(y=p),s({left:x,top:y})},[e,o,t,l]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${g.left}px`,top:`${g.top}px`,backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:10,...a==null?void 0:a.tooltip,children:n}):null},Pi=({type:e,data:o,dataPoints:t,title:n,showLegend:l=!0,legendPosition:a="bottom",showGrid:c=!0,showTooltips:g=!0,animated:s=!0,animationDuration:u=500,responsive:h=!0,aspectRatio:f=16/9,width:m=200,height:p=200,views:b,onDataPointClick:x,onSeriesClick:y,isLoading:k=!1,error:I,noData:T,loadingIndicator:C,errorIndicator:w,noDataIndicator:j,"aria-label":z,themeMode:E,...P})=>{const{animationProgress:H,tooltip:S,containerRef:$,processedData:A,showTooltip:_,hideTooltip:V,getChartDimensions:B}=Si({data:o,dataPoints:t,animated:s,animationDuration:u,showTooltips:g}),W=A(),{width:L,height:D}=B(),F=m||L,q=p||(h?L/f:D),O=()=>{if(!l||!W)return null;let ee=[];return e==="pie"||e==="donut"?Array.isArray(W)&&(ee=W):W&&W.series&&(ee=W.series),!ee||ee.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"center",marginTop:a==="bottom"?"16px":0,marginBottom:a==="top"?"16px":0,...pi,...b==null?void 0:b.legend,children:ee.map((re,ne)=>r.jsxs(i.View,{...bi,...b==null?void 0:b.legendItem,children:[r.jsx(i.View,{backgroundColor:re.color,...yi}),r.jsx(i.Text,{...xi,children:re.name||re.label})]},`legend-${ne}`))})},U=()=>{if(!W)return null;switch(e){case"bar":return r.jsx(Mi,{data:W,width:F,height:q,animationProgress:H,showGrid:c,onBarClick:y,showTooltip:_,hideTooltip:V,views:b});case"line":case"area":return r.jsx(zi,{data:W,width:F,height:q,animationProgress:H,showGrid:c,onPointClick:y,showTooltip:_,hideTooltip:V,views:b});case"pie":case"donut":return r.jsx(Vi,{dataPoints:W,width:F,height:q,animationProgress:H,isDonut:e==="donut",onSliceClick:x,showTooltip:_,hideTooltip:V,views:b});default:return null}},Z=()=>k?r.jsx(i.View,{...Ii,...b==null?void 0:b.loadingOverlay,children:C||r.jsx(i.Center,{children:r.jsx(no,{size:"lg"})})}):null,X=()=>I?r.jsx(i.View,{...Ti,...b==null?void 0:b.errorOverlay,children:w||r.jsx(i.Text,{fontWeight:"medium",children:typeof I=="string"?I:"An error occurred"})}):null,N=()=>T?r.jsx(i.View,{...ji,...b==null?void 0:b.noDataOverlay,children:j||r.jsx(i.Text,{children:typeof T=="string"?T:"No data available"})}):null,Q=z??(typeof n=="string"?n:"Chart"),R=!I&&!k&&!T;return r.jsxs(i.View,{ref:$,role:"region","aria-label":Q,"aria-busy":k,...fi,...b==null?void 0:b.container,...P,children:[n&&r.jsx(i.Text,{...mi,children:n}),R&&a==="top"&&O(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...b==null?void 0:b.chart,children:[R&&U(),Z(),X(),N()]}),R&&a==="bottom"&&O(),r.jsx(Ei,{visible:g&&S.visible,x:S.x,y:S.y,content:S.content,maxDistance:100,views:b})]})},Wi=e=>r.jsx(Pi,{...e}),_i=(e=365)=>{const[o,t]=d.useState(!1),[n,l]=d.useState(null),a="app-studio-cookie-consent";d.useEffect(()=>{const u=localStorage.getItem(a);l(u!==null?u==="true":!1)},[]);const c=u=>{localStorage.setItem(a,String(u));const h=new Date;h.setDate(h.getDate()+e),localStorage.setItem(`${a}-expires`,h.toISOString()),l(u)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{localStorage.removeItem(a),localStorage.removeItem(`${a}-expires`),l(!1)}}},$i=e=>{const o=e==="dark";return{default:{container:{backgroundColor:o?"#1f2937":"#ffffff",borderColor:o?"#374151":"#e5e7eb",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#e5e7eb":"#1f2937"},acceptButton:{backgroundColor:"#3b82f6",color:"#ffffff",hoverBackgroundColor:"#2563eb"},customizeButton:{backgroundColor:"transparent",color:o?"#e5e7eb":"#4b5563",borderColor:o?"#4b5563":"#d1d5db",hoverBackgroundColor:o?"#374151":"#f3f4f6"}},info:{container:{backgroundColor:o?"#1e3a8a":"#eff6ff",borderColor:o?"#1e40af":"#bfdbfe",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#bfdbfe":"#1e40af"},acceptButton:{backgroundColor:"#3b82f6",color:"#ffffff",hoverBackgroundColor:"#2563eb"},customizeButton:{backgroundColor:"transparent",color:o?"#bfdbfe":"#1e40af",borderColor:o?"#3b82f6":"#93c5fd",hoverBackgroundColor:o?"#1e40af":"#dbeafe"}},primary:{container:{backgroundColor:o?"#0c4a6e":"#f0f9ff",borderColor:o?"#0369a1":"#bae6fd",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"#bae6fd":"#0369a1"},acceptButton:{backgroundColor:"#0ea5e9",color:"#ffffff",hoverBackgroundColor:"#0284c7"},customizeButton:{backgroundColor:"transparent",color:o?"#bae6fd":"#0369a1",borderColor:o?"#0ea5e9":"#7dd3fc",hoverBackgroundColor:o?"#0369a1":"#e0f2fe"}}}},Hi=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:l="bottom",variant:a="default",onAccept:c,onCustomize:g,views:s,showCustomizeButton:u=!0,cookieExpiration:h=365,themeMode:f,...m})=>{const{themeMode:p}=i.useTheme(),b=f||p||"light",{hasConsent:x,acceptCookies:y}=_i(h),I=$i(b)[a];if(x)return null;const T=()=>{y(),c&&c()},C=()=>{g&&g()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...l==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...I.container,...s==null?void 0:s.container,...m,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...s==null?void 0:s.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...s==null?void 0:s.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...s==null?void 0:s.buttonGroup,children:[u&&r.jsx(_e,{variant:"outline",onClick:C,size:"sm",...s==null?void 0:s.customizeButton,children:n}),r.jsx(_e,{variant:"primary",onClick:T,size:"sm",...s==null?void 0:s.acceptButton,children:t})]})]})})},Bi=e=>r.jsx(Hi,{...e}),Li=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[l,a]=d.useState(!1),[c,g]=d.useState({x:0,y:0}),[s,u]=d.useState(null),h=d.useRef(null),f=d.useRef(null),m=d.useMemo(()=>rt("contextmenu-content"),[]),p=d.useCallback(x=>{g({x:x.clientX,y:x.clientY}),a(!0),n==null||n(!0)},[n]),b=d.useCallback(()=>{a(!1),u(null),n==null||n(!1)},[n]);return d.useEffect(()=>{const x=I=>{f.current&&!f.current.contains(I.target)&&b()},y=()=>{l&&b()},k=I=>{I.key==="Escape"&&l&&b()};return document.addEventListener("mousedown",x),window.addEventListener("resize",y),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",x),window.removeEventListener("resize",y),document.removeEventListener("keydown",k)}},[l,b]),{isOpen:l,setIsOpen:a,position:c,setPosition:g,activeSubmenuId:s,setActiveSubmenuId:u,size:o,variant:t,triggerRef:h,contentRef:f,contentId:m,openMenu:p,closeMenu:b}},Cr={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Ai={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},wr={hover:{backgroundColor:"color-gray-100"}},Ir=d.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),Di=({children:e,value:o})=>r.jsx(Ir.Provider,{value:o,children:e}),Fo=()=>{const e=d.useContext(Ir);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Tr=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:l,...a})=>{const{triggerRef:c,contentId:g,openMenu:s}=Fo(),h={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),s)s(f);else{const{setIsOpen:m,setPosition:p}=Fo();p({x:f.clientX,y:f.clientY}),m(!0)}},"aria-controls":g,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&d.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...l==null?void 0:l.container,...a};if(t&&d.isValidElement(e)){const f=d.Children.only(e);return d.cloneElement(f,{...h,...f.props})}return r.jsx(i.View,{...h,children:e})},It=({items:e,children:o,position:t,side:n="right",align:l="start",views:a,style:c,...g})=>{const{isOpen:s,position:u,contentRef:h,contentId:f,variant:m}=Fo(),p=d.useRef(null),b=h||p,{ref:x,relation:y}=i.useElementPosition({}),[k,I]=d.useState({x:0,y:0});if(d.useEffect(()=>{if(s&&b.current){const C=t||u,w=b.current.offsetWidth,j=b.current.offsetHeight,z=window.innerWidth,E=window.innerHeight;let P=C.x,H=C.y;y&&(y.space.horizontal==="left"?P=C.x-w:P=C.x,y.space.vertical==="top"?H=C.y-j:H=C.y),P+w>z&&(P=z-w-8),P<8&&(P=8),H+j>E&&(H=E-j-8),H<8&&(H=8),I({x:P,y:H})}},[s,u,t,n,l,b,y]),!s)return null;const T={position:"fixed",top:`${k.y}px`,left:`${k.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:b,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...T,...c},...Ai[m],...a==null?void 0:a.menu,...a==null?void 0:a.content,...g,children:[e&&e.map((C,w)=>C.divider?r.jsx(Sr,{views:a},`divider-${w}`):r.jsx(jr,{item:C,views:a},C.id)),o]})},jr=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:l,...a})=>{const{activeSubmenuId:c,setActiveSubmenuId:g,size:s,closeMenu:u}=Fo();if(e){const[f,m]=d.useState(!1),p=e.items&&e.items.length>0,b=c===e.id,[x,y]=d.useState({x:0,y:0}),k=e.disabled||n,I=()=>{m(!0),p&&g(e.id)},T=()=>{m(!1)},C=()=>{k||!p&&e.onClick&&(e.onClick(),u&&u())},{ref:w,relation:j}=i.useElementPosition({});return d.useEffect(()=>{if(b&&w.current){const z=w.current.getBoundingClientRect(),E=window.innerWidth,P=200;let H=!1;if(j)H=j.space.horizontal==="left";else{const S=E-z.right,$=z.left;H=S<P&&$>S}y({x:H?z.left-P:z.right,y:z.top})}},[b,e.items,j]),r.jsxs(i.View,{ref:w,role:"menuitem",display:"flex",alignItems:"center",cursor:k?"not-allowed":"pointer",opacity:k?.5:1,position:"relative","aria-disabled":k,"data-disabled":k?"":void 0,...Cr[s],_hover:k?{}:wr.hover,backgroundColor:f&&!k?"color-gray-100":"transparent",onMouseEnter:I,onMouseLeave:T,onClick:C,...l==null?void 0:l.item,...a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...l==null?void 0:l.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),p&&r.jsx(i.View,{marginLeft:8,...l==null?void 0:l.submenuIndicator,children:r.jsx(le,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),b&&p&&r.jsx(It,{items:e.items||[],position:x,side:"right",align:"start",views:l})]})}const h=f=>{n||(t==null||t(f),u&&u())};return r.jsx(i.View,{role:"menuitem",onClick:h,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Cr[s],_hover:n?{}:wr.hover,...l==null?void 0:l.item,...a,children:o})},Sr=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Fi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),Oi=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:l=!0,views:a,themeMode:c,...g})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Tr,{disableNativeContextMenu:l,views:a,...g,children:e}),r.jsx(It,{items:o,views:a})]}),Ne=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:l=!0,onOpenChange:a,views:c,...g})=>{const s=Li({size:t,variant:n,onOpenChange:a}),{isOpen:u,setIsOpen:h,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:b,triggerRef:x,contentRef:y,contentId:k,openMenu:I,closeMenu:T}=s;return r.jsx(Di,{value:{isOpen:u,setIsOpen:h,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:b,size:t,variant:n,triggerRef:x,contentRef:y,contentId:k,openMenu:I,closeMenu:T,styles:c},children:r.jsx(Oi,{items:o,size:t,variant:n,disableNativeContextMenu:l,views:c,...g,children:e})})};Ne.Trigger=Tr,Ne.Content=It,Ne.Item=jr,Ne.Divider=Sr,Ne.Separator=Fi;const qi=({src:e,color:o,views:t,themeMode:n,...l})=>{const{getColor:a,themeMode:c}=i.useTheme(),g=o?{fill:a(o,{themeMode:c}),stroke:a(o,{themeMode:c})}:{};return r.jsx(i.Center,{...l,...t==null?void 0:t.container,children:r.jsx(i.Image,{...g,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},Ni=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Mr=({placeholder:e,isMulti:o,options:t,id:n=`select-${Math.random().toString(36).substr(2,9)}`})=>{const l=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(l),[f,m]=d.useState(0),[p,b]=d.useState(!0);return{id:n,value:u,setValue:h,hide:p,setHide:b,isHovered:a,setIsHovered:c,isFocused:g,setIsFocused:s,highlightedIndex:f,setHighlightedIndex:m}},zr=({children:e,containerId:o="portal-root"})=>{const[t,n]=d.useState(null);return d.useEffect(()=>{let l=document.getElementById(o),a=!1;return l||(a=!0,l=document.createElement("div"),l.setAttribute("id",o),document.body.appendChild(l)),n(l),()=>{a&&l&&l.parentNode&&l.childNodes.length===0&&l.parentNode.removeChild(l)}},[o]),t?Ka.createPortal(e,t):null},Tt=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{size:"xs",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"all 0.2s ease",...o.helperText,...t,children:e}),Te=d.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...l},a)=>r.jsxs(i.Vertical,{ref:a,gap:8,position:"relative",width:"100%",marginVertical:4,...l,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Tt,{marginTop:4,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"all 0.2s ease",...n==null?void 0:n.error,children:t})]}));Te.displayName="FieldContainer";const Vr={default:{borderRadius:"8px",media:{mobile:{borderRadius:"6px"}}},square:{borderRadius:0},rounded:{borderRadius:"8px",media:{mobile:{borderRadius:"6px"}}},pill:{borderRadius:"9999px"}},Er={xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px"},Pr={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",transition:"border-color 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out",_hover:{borderColor:"color-gray-300",backgroundColor:"color-gray-50"},_focus:{borderColor:"theme-primary",backgroundColor:"color-white",outline:"none",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.05)"},_focusVisible:{borderColor:"theme-primary",backgroundColor:"color-white",outline:"none",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.05)"}},default:{borderWidth:0,borderBottomWidth:"1.5px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",borderRadius:0,backgroundColor:"transparent",transition:"border-color 200ms ease-out, background-color 200ms ease-out, box-shadow 200ms ease-out",_hover:{borderBottomColor:"color-gray-400",backgroundColor:"color-gray-50"},_focus:{borderBottomColor:"theme-primary",borderBottomWidth:"2px",backgroundColor:"transparent",outline:"none"},_focusVisible:{borderBottomColor:"theme-primary",borderBottomWidth:"2px",backgroundColor:"transparent",outline:"none"}},none:{border:"none",backgroundColor:"transparent",transition:"background-color 200ms ease-out",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"},_focusVisible:{outline:"none",backgroundColor:"color-gray-100"}}},Ui={paddingTop:"16px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px",media:{mobile:{paddingTop:"12px",paddingBottom:"6px",paddingLeft:"12px",paddingRight:"12px"}}},Gi={paddingTop:"12px",paddingBottom:"12px",paddingLeft:"16px",paddingRight:"16px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},Me=({label:e,shadow:o,children:t,value:n,size:l="md",shape:a="default",variant:c="default",error:g=!1,showLabel:s=!1,isFocused:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,views:p={pickerBox:{}},...b})=>{const y=g?"color-red-500":(h||u)&&!f?"theme-primary":"color-gray-300";return r.jsx(i.Horizontal,{gap:8,width:"100%",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"space-between",marginBottom:2,borderStyle:"solid",borderColor:y,backgroundColor:"color-white",fontSize:i.Typography.fontSizes[l],cursor:f?"not-allowed":m?"auto":"text",opacity:f?.7:1,transition:"border-color 200ms ease-out, background-color 200ms ease-out, box-shadow 200ms ease-out, opacity 200ms ease-out",...s?Ui:Gi,...o,...Vr[a],...Pr[c],...p==null?void 0:p.container,...b,children:t})},jt=({children:e,...o})=>r.jsx(i.Center,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",...o,children:e}),Yi={h1:{fontSize:96,lineHeight:112,letterSpacing:-1.5},h2:{fontSize:60,lineHeight:71,letterSpacing:-.5},h3:{fontSize:48,lineHeight:57,letterSpacing:0},h4:{fontSize:34,lineHeight:40,letterSpacing:.25},h5:{fontSize:24,lineHeight:28,letterSpacing:0},h6:{fontSize:20,lineHeight:24,letterSpacing:.15}},vi=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:l=!1,weight:a="normal",size:c="sm",dropDown:g,...s})=>{const u=o?Yi[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[a],textDecoration:l?"line-through":n?"underline":"none",...u,...s,children:e})},so=e=>r.jsx(vi,{...e}),$e=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:l={label:{}},helperText:a,...c})=>r.jsx(so,{top:0,zIndex:-10,position:"absolute",fontSize:Er[o],lineHeight:Er[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":n,transition:"color 200ms ease-out",...l.label,...c,children:e}),Ue=({children:e,...o})=>r.jsx(i.Vertical,{width:"100%",maxWidth:"100%",position:"relative",...o,children:e}),Wr={xs:12,sm:14,md:16,lg:20,xl:24},Xi={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:"10px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02)"},Ki={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Qi={padding:"10px 12px",cursor:"pointer",borderRadius:"6px",margin:"2px 4px",transition:"background-color 0.15s ease"},Oo={default:{backgroundColor:"transparent"},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},_r={open:{transform:"rotate(180deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},closed:{transform:"rotate(0deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Zi={padding:"4px 8px",borderRadius:"6px",backgroundColor:"color-gray-100",fontSize:"13px",fontWeight:"500",color:"color-gray-700",transition:"background-color 0.15s ease"},Ji={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Ri=({isHovered:e,setIsHovered:o,option:t,size:n="md",callback:l=()=>{},style:a,isSelected:c=!1,...g})=>{const s=(f,m)=>{f.stopPropagation(),f.preventDefault(),typeof l=="function"&&l(m)},u=()=>o(!e),h=()=>c&&e?Oo.selectedHighlighted:c?Oo.selected:e?Oo.highlighted:Oo.default;return r.jsxs(i.Element,{as:"li",display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Qi,...h(),onMouseEnter:u,onMouseLeave:u,onClick:f=>s(f,t.value),...g,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"1.4",color:c?"color-gray-900":"color-gray-700",...a,children:t.label}),c&&r.jsx(i.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},es=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:l,removeOption:a=()=>{},options:c})=>{const g={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:4,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",lineHeight:"1.5",letterSpacing:"-0.01em",backgroundColor:"transparent",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease",...o.field,...o.text},s=c.length>0&&c.find(u=>u.value===t);return r.jsx(i.Text,{...g,children:(t===""||Array.isArray(t)&&t.length===0)&&l?l:r.jsx(r.Fragment,{children:typeof t=="string"?(s&&s.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(u=>r.jsx(rs,{option:u,removeOption:a},u))}):r.jsx("span",{children:t})})})},os=({id:e,name:o,value:t,onChange:n,isMulti:l=!1,isDisabled:a=!1,isReadOnly:c=!1,options:g=[],...s})=>{const u=h=>{n&&n(h)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:a,readOnly:c,onChange:u,multiple:l,...s,children:g.length>0&&g.map(h=>r.jsx("option",{value:h.value,children:h.label},h.value))})},ts=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:l,setHighlightedIndex:a,selectedValue:c})=>{const g=u=>n(u),s=u=>Array.isArray(c)?c.includes(u):c===u;return r.jsx(i.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...Xi,style:Ji,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((u,h)=>r.jsx(Ri,{size:e,style:o.text,option:u,callback:g,isSelected:s(u.value),isHovered:h===l,setIsHovered:()=>{},onMouseEnter:()=>a(h)},u.value))})},rs=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const l=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:a=>a.stopPropagation(),...Zi,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(pe,{role:"close-button",color:"color-gray-500",widthHeight:Wr[o],onClick:l,cursor:"pointer",transition:"color 0.15s ease",_hover:{color:"color-gray-700"}})]})},$r=({id:e,name:o,label:t,value:n,placeholder:l,helperText:a,hide:c=!1,error:g=!1,isMulti:s=!1,isFocused:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,options:p=[],shadow:b={},size:x="md",shape:y="default",variant:k="default",views:I={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:T=()=>{},setHide:C=()=>{},setValue:w=()=>{},setIsHovered:j=()=>{},setIsFocused:z=()=>{},setHighlightedIndex:E,highlightedIndex:P,...H})=>{const{ref:S,relation:$,updateRelation:A}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),_=d.useRef(null),V=()=>{var X;if(!S.current)return{};const O=S.current.getBoundingClientRect(),U={position:"fixed",left:O.left,width:O.width,zIndex:1e4};return((X=$==null?void 0:$.space)==null?void 0:X.vertical)==="top"?{...U,bottom:window.innerHeight-O.top+8}:{...U,top:O.bottom+8}};d.useEffect(()=>{const O=()=>C(!0);return document.addEventListener("closeAllSelects",O),()=>document.removeEventListener("closeAllSelects",O)},[C]),d.useEffect(()=>{const O=U=>{!U.target.closest(`#${e}`)&&!c&&C(!0)};return document.addEventListener("click",O),()=>{document.removeEventListener("click",O)}},[e,c,C]);const B=!!(u&&t),W=()=>j(!h),L=()=>z(!0),D=O=>{document.dispatchEvent(new Event("closeAllSelects")),O&&O.stopPropagation&&O.stopPropagation();const U=!c;C(U),z(!U)},F=d.useCallback(O=>{if(C(!0),document.dispatchEvent(new Event("closeAllSelects")),s&&Array.isArray(n)){if(!n.includes(O)){const U=[...n,O];w(U),T&&T(O)}}else w(O),T&&T(O);z(!0)},[s,n,C,w,T,z]),q=O=>{if(Array.isArray(n)&&n.includes(O)){const U=n.filter(Z=>Z!==O);w(U.length===0?[]:U)}};return r.jsx(Te,{ref:S,position:"relative",width:"100%",display:"inline-block",id:e,role:"SelectBox",helperText:a,error:g,views:I,onClick:O=>{O.stopPropagation(),f||m||D(O)},children:r.jsxs(Me,{label:t,size:x,error:g,shape:y,views:I,shadow:b,variant:k,value:n,color:"theme-primary",isHovered:h,isDisabled:f,isReadOnly:m,isFocused:u,showLabel:B,onMouseEnter:W,onMouseLeave:W,position:"relative",children:[r.jsxs(Ue,{children:[B&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:g,...I,children:t}),r.jsx(os,{id:e,name:o,options:p,onChange:T,value:n,isDisabled:f,isReadOnly:m,isMulti:s,onFocus:L,...H}),r.jsx(es,{options:p,size:x,views:I,value:n,isDisabled:f,placeholder:l,removeOption:q})]}),r.jsx(jt,{children:!m&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?_r.closed:_r.open,children:r.jsx(le,{color:"inherit",widthHeight:Wr[x],style:I.icon,orientation:"down"})})}),!c&&p.length>0&&r.jsx(zr,{children:r.jsx(i.Element,{ref:_,onClick:O=>O.stopPropagation(),style:{...V(),...Ki.enter},children:r.jsx(ts,{size:x,views:I,options:p,callback:F,highlightedIndex:P,setHighlightedIndex:E,selectedValue:n})})})]})})},ns=e=>{const o={...e,options:e.options||[]},t=Mr(o);return r.jsx($r,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Hr=({isDisabled:e,isChecked:o})=>{const[t,n]=d.useState(!1),[l,a]=d.useState(o||!1),[c,g]=d.useState(o||!1);return d.useEffect(()=>{o!==void 0&&(a(o),g(o))},[o]),{isHovered:t,setIsHovered:n,on:l,setOn:a,value:c,setValue:g}},as={xs:{height:"8px",width:"8px"},sm:{height:"12px",width:"12px"},md:{height:"16px",width:"16px"},lg:{height:"20px",width:"20px"},xl:{height:"24px",width:"24px"}},ls={xs:{height:"16px",width:"36px"},sm:{height:"20px",width:"44px"},md:{height:"24px",width:"52px"},lg:{height:"28px",width:"60px"},xl:{height:"32px",width:"68px"}},cs={xs:{paddingVertical:4,paddingHorizontal:2},sm:{paddingVertical:4,paddingHorizontal:2},md:{paddingVertical:4,paddingHorizontal:4},lg:{paddingVertical:4,paddingHorizontal:4},xl:{paddingVertical:4,paddingHorizontal:4}},He={default:{active:"theme-primary",inactive:"color-gray-300",knob:"white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9}}},Br={slider:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},knob:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}},is=e=>r.jsx(i.Input,{type:"checkbox",...e}),Lr=({id:e,name:o,label:t,inActiveChild:n,isChecked:l,activeChild:a,labelPosition:c="right",shadow:g={},size:s="sm",value:u=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:m=!1,on:p,setOn:b,onChange:x,setValue:y=()=>{},setIsHovered:k=()=>{},helperText:I,views:T={slider:{},circle:{},label:{}},...C})=>{const w=P=>{if(!m&&!f){const H=P.target.checked;y(H),b(H),x&&x(H)}},j=()=>k(!0),z=()=>k(!1),E={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":m?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease",...T.label}};return r.jsxs(so,{htmlFor:e,onMouseEnter:j,onMouseLeave:z,...E.container,...C,children:[r.jsx(is,{id:e,name:o,opacity:0,width:0,height:0,checked:u,onChange:w,disabled:f,readOnly:m,...C}),c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"color-gray-700",transition:"all 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:u?a?"space-between":"flex-end":n?"space-between":"flex-start",marginBottom:4,borderRadius:"9999px",backgroundColor:f?He.default.disabled:u?h?He.states.hover.active:He.default.active:h?He.states.hover.inactive:He.default.inactive,opacity:!f&&u&&h?He.states.hover.activeOpacity:1,cursor:"pointer",...Br.slider,...g,...cs[s],...ls[s],...T.slider,children:[a&&u&&r.jsx(i.View,{marginLeft:8,marginRight:4,transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",children:a}),r.jsx(i.View,{borderRadius:"50%",backgroundColor:He.default.knob,boxShadow:h?"0 2px 4px rgba(0, 0, 0, 0.2)":"0 1px 2px rgba(0, 0, 0, 0.1)",transform:h?"scale(1.05)":"scale(1)",...Br.knob,zIndex:1,...as[s],...T.circle}),n&&!u&&r.jsx(i.View,{marginRight:8,marginLeft:4,transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",children:n})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"color-gray-700",transition:"all 0.2s ease",children:t})]})},ss=e=>{const o=Hr(e);return r.jsx(Lr,{...o,...e})},Ar=({placeholder:e,isMulti:o,options:t,id:n=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const l=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(l),[f,m]=d.useState(0),[p,b]=d.useState(!0);return{id:n,value:u,setValue:h,hide:p,setHide:b,isHovered:a,setIsHovered:c,isFocused:g,setIsFocused:s,highlightedIndex:f,setHighlightedIndex:m}},Dr=({id:e,name:o,label:t,value:n,size:l,views:a={},options:c=[],onChange:g=()=>{},setValue:s=()=>{},...u})=>{const{getColor:h}=i.useTheme(),f=d.useCallback(m=>{s(m.value),g&&g(m.value)},[s,g]);return r.jsxs(Te,{id:e,width:"100%",views:a,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Se,{widthHeight:14})," ",r.jsx(i.Text,{children:t})]}),r.jsx(i.Horizontal,{gap:0,children:c.map((m,p,b)=>{const x=n===m.value;let y=h("color-gray-200"),k=h("color-gray-500"),I="transparent";if(x){if(m.color)m.color,y=h(m.color),k=h(m.color),I="rgba(0,0,0,0.05)";else{const T=h("theme-primary");y=T,k=T,I="color-gray-50"}m.color?(y=h(m.color),k=h(m.color),I="transparent"):(y=h("theme-primary"),k=h("theme-primary"),I="transparent")}return r.jsx(_e,{onClick:()=>f(m),flex:1,...l?{size:l}:{paddingVertical:6,fontSize:"12px"},fontWeight:x?"bold":"normal",style:{borderTop:`1px solid ${x?y:h("color-gray-200")}`,borderBottom:`1px solid ${x?y:h("color-gray-200")}`,borderLeft:`1px solid ${x?y:h("color-gray-200")}`,borderRight:p===b.length-1||x?`1px solid ${x?y:h("color-gray-200")}`:"none",backgroundColor:I,color:k,borderRadius:p===0?"6px 0 0 6px":p===b.length-1?"0 6px 6px 0":"0",zIndex:x?1:0,boxShadow:"none"},...a.item,children:m.label},m.value)})}),r.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}})]})},ds=e=>{const o={...e,options:e.options||[]},t=Ar(o);return r.jsx(Dr,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Fr=({label:e,placeholder:o,value:t})=>{const[n,l]=d.useState(e??o),[a,c]=d.useState(!1),[g,s]=d.useState(t||""),[u,h]=d.useState(!1);return d.useMemo(()=>{l(u&&!g?o??"":e??o)},[g,u,e,o]),{hint:n,setHint:l,isHovered:a,setIsHovered:c,value:g,setValue:s,isFocused:u,setIsFocused:h}},Or=({id:e,name:o,hint:t,error:n,value:l,label:a,shadow:c,helperText:g,placeholder:s,size:u="sm",shape:h="default",variant:f="default",isHovered:m=!1,isFocused:p=!1,isEditable:b=!1,isReadOnly:x=!1,isDisabled:y=!1,isAutoFocus:k=!1,isMultiline:I=!1,maxRows:T=3,maxCols:C=30,onBlur:w=()=>{},onChange:j,onFocus:z,setHint:E=()=>{},setValue:P=()=>{},setIsFocused:H=()=>{},setIsHovered:S=()=>{},views:$={label:{},helperText:{}},...A})=>{const _=!!(p&&a),V={margin:0,paddingVertical:4,paddingHorizontal:0,width:"100%",minHeight:"5em",maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[u],lineHeight:`${Math.round(i.Typography.fontSizes[u]*1.5)}px`,letterSpacing:"-0.01em",fontWeight:400,backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":"text",opacity:y?.7:1,transition:"color 200ms ease-out, opacity 200ms ease-out",...$.field},B=()=>S(!m),W=()=>{H(!0),z&&z()},L=F=>{w(F),H(!1)},D=F=>{typeof F=="string"?(P(F),j&&j(F)):(P(F.target.value),j&&j(F.target.value))};return r.jsx(Te,{helperText:g,error:n,views:$,...A,children:r.jsx(Me,{label:a,size:u,error:n,shape:h,views:$,shadow:c,variant:f,value:l,color:"theme-primary",isHovered:m,isDisabled:y,isReadOnly:x,isFocused:p,showLabel:_,onMouseEnter:B,onMouseLeave:B,...$==null?void 0:$.content,children:r.jsxs(Ue,{...$==null?void 0:$.warper,children:[_&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:n,...$==null?void 0:$.label,children:a}),r.jsx(i.Element,{as:"textarea",id:e,name:o,rows:T,cols:C,value:l,readOnly:x,disabled:y,autoFocus:k,placeholder:t,onBlur:L,onFocus:W,onChange:F=>D(F),...V,style:{resize:y||x?"none":"vertical"},...$==null?void 0:$.textarea})]})})})},gs=e=>{const o=Fr(e);return r.jsx(Or,{...o,...e})},St=({label:e,placeholder:o,value:t})=>{const[n,l]=d.useState(e??o),[a,c]=d.useState(!1),[g,s]=d.useState(!1),[u,h]=d.useState(t);return d.useMemo(()=>{l(a&&!u?o??"":e??o)},[u,a,e,o]),{hint:n,setHint:l,isFocused:a,setIsFocused:c,isHovered:g,setIsHovered:s,setValue:h,value:u}},us=e=>r.jsx(i.Input,{type:"text",...e}),go=({id:e,name:o,label:t,hint:n,value:l,onChange:a,left:c,right:g,helperText:s,placeholder:u,onChangeText:h,shadow:f={},views:m={container:{},field:{},label:{},helperText:{},text:{}},size:p="md",shape:b="default",variant:x="default",error:y=!1,isFocused:k=!1,isHovered:I=!1,isDisabled:T=!1,isReadOnly:C=!1,isClearable:w=!0,isAutoFocus:j=!1,setHint:z=()=>{},setIsFocused:E=()=>{},setIsHovered:P=()=>{},setValue:H=()=>{},onClick:S=()=>{},onFocus:$,onBlur:A=()=>{},themeMode:_,...V})=>{const{getColor:B,themeMode:W}=i.useTheme(),L=B("color-blueGray-700",{themeMode:_||W}),D=!!(k&&t),F={margin:0,paddingVertical:4,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[p],lineHeight:`${Math.round(i.Typography.fontSizes[p]*1.4)}px`,letterSpacing:"-0.01em",fontWeight:400,backgroundColor:"transparent",color:T?"color-gray-400":"color-gray-900",cursor:T?"not-allowed":"text",opacity:T?.7:1,transition:"color 200ms ease-out, opacity 200ms ease-out",...m.field},q=()=>{E(!0),$&&$()},O=()=>P(!I),U=N=>{A&&A(N),E(!1)},Z=N=>{typeof N=="string"?(H(N),h&&h(N),a&&a(N)):(H(N.target.value),h&&h(N.target.value),a&&a(N.target.value))},X=()=>{H(""),a&&(A({target:{name:o}}),h&&h(""),a&&a("")),typeof document>"u"&&h&&h("")};return r.jsx(Te,{helperText:s,error:y,views:m,children:r.jsxs(Me,{label:t,size:p,error:y,shape:b,views:m,shadow:f,variant:x,value:l,color:"theme-primary",isHovered:I,isDisabled:T,isReadOnly:C,isFocused:k,showLabel:D,onMouseEnter:O,onMouseLeave:O,children:[c,r.jsxs(Ue,{children:[D&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:y,...m,children:t}),r.jsx(us,{id:e,name:o,readOnly:C,disabled:T,autoFocus:j,placeholder:n,onFocus:q,onBlur:U,autoComplete:"off",...F,...V,onChange:Z,value:l})]}),w&&l&&!C&&!T&&r.jsx(jt,{children:r.jsx(pe,{size:20,color:L,onClick:X,cursor:"pointer",borderRadius:"50%",transition:"background-color 150ms ease-out, transform 150ms ease-out",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),g]})})},uo=e=>{const o=St(e);return r.jsx(go,{...o,...e})},qr=({defaultIsSelected:e=!1})=>{const[o,t]=d.useState(!1),[n,l]=d.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:l}},hs={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},Nr={xs:10,sm:14,md:16,lg:20,xl:24},fs={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"color-black",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Mt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Ur=({id:e,icon:o,name:t,label:n,isChecked:l,onChange:a,onValueChange:c,shadow:g={},labelPosition:s="right",size:u="md",error:h=!1,isSelected:f=!1,isHovered:m=!1,isDisabled:p=!1,isReadOnly:b=!1,isIndeterminate:x=!1,defaultIsSelected:y=!1,setIsSelected:k=()=>{},setIsHovered:I=()=>{},views:T={checkbox:{},label:{}},infoText:C,helperText:w,...j})=>{const z=()=>I(!m),E=()=>{!b&&!p&&(k&&k(!f),a&&a(!l),c&&c(!l))},P=x?"indeterminate":l||f?"selected":"unselected",H=h?Mt.error[P]:p?Mt.disabled[P]:m?Mt.hover[P]:{},S={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:h?"color-red-600":p?"color-gray-400":"color-gray-700",cursor:p?"not-allowed":b?"default":"pointer",opacity:p?.6:1,transition:"all 0.2s ease",...T.label},checkbox:{...fs[P],...H,borderRadius:"4px",...hs[u],transition:"all 0.2s ease",...g,...T.checkbox}};return r.jsxs(so,{htmlFor:e,as:"div",onClick:E,onMouseEnter:z,onMouseLeave:z,size:i.Typography.fontSizes[u],...S.container,...j,children:[r.jsxs(i.Vertical,{gap:8,children:[" ",r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",s==="left"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...T==null?void 0:T.label,children:n}),r.jsx(i.Center,{...S.checkbox,children:x?r.jsx(Jt,{widthHeight:Nr[u],color:"white",transition:"all 0.2s ease"}):(l||f)&&(o??r.jsx(Vo,{widthHeight:Nr[u],color:"white",transition:"all 0.2s ease"}))}),s==="right"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...T==null?void 0:T.label,children:n})]}),C&&r.jsx(i.Text,{marginLeft:s==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"15",...T==null?void 0:T.infoText,children:C})]}),h&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease",children:h})]})},ms=e=>{const o=qr(e);return r.jsx(Ur,{...o,...e})},Gr=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:l,onOpen:a,onClose:c,closeOnSelect:g=!0,maxRecentColors:s=8,showRecentColors:u=!0,isAutoFocus:h=!1}=e,[f,m]=d.useState(!1),[p,b]=d.useState(o??t),[x,y]=d.useState(""),[k,I]=d.useState([]),[T,C]=d.useState(!1),[w,j]=d.useState(!1),z=d.useRef(null),E=d.useRef(null);d.useEffect(()=>{o!==void 0&&b(o)},[o]),d.useEffect(()=>{if(u)try{const B=localStorage.getItem("colorInput-recentColors");B&&I(JSON.parse(B))}catch(B){console.warn("Failed to load recent colors from localStorage:",B)}},[u]),d.useEffect(()=>{h&&z.current&&z.current.focus()},[h]),d.useEffect(()=>{const B=W=>{f&&z.current&&E.current&&!z.current.contains(W.target)&&!E.current.contains(W.target)&&_()};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[f]);const P=d.useCallback(B=>{u&&I(W=>{const L=W.filter(F=>F!==B),D=[B,...L].slice(0,s);try{localStorage.setItem("colorInput-recentColors",JSON.stringify(D))}catch(F){console.warn("Failed to save recent colors to localStorage:",F)}return D})},[u,s]),H=d.useCallback(()=>{const B=!f;m(B),B?a==null||a():c==null||c()},[f,a,c]),S=d.useCallback(B=>{b(B),P(B),n==null||n(B),l==null||l(B),g&&(m(!1),c==null||c())},[n,l,g,c,P]),$=d.useCallback(B=>{y(B)},[]),A=d.useCallback(()=>{x&&(S(x),y(""))},[x,S]),_=d.useCallback(()=>{m(!1),c==null||c()},[c]),V=d.useCallback(B=>{b(B),n==null||n(B)},[n]);return{isOpen:f,selectedColor:p,recentColors:k,customColor:x,isFocused:T,isHovered:w,handleToggle:H,handleColorSelect:S,handleCustomColorChange:$,handleCustomColorSubmit:A,handleClose:_,setIsFocused:C,setIsHovered:j,setValue:V,triggerRef:z,dropdownRef:E}},ho={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px"},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 8px 16px rgba(0,0,0,0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},ps={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},bs={default:{borderRadius:"6px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},ys={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},xs=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Yr=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:l,views:a={},size:c="md",shape:g="default",variant:s="default",shadow:u,error:h=!1,isDisabled:f=!1,isReadOnly:m=!1,isFocused:p=!1,isHovered:b=!1,predefinedColors:x=xs,showCustomInput:y=!0,showRecentColors:k=!0,isOpen:I=!1,selectedColor:T="",recentColors:C=[],customColor:w="",handleToggle:j=()=>{},handleColorSelect:z=()=>{},handleCustomColorChange:E=()=>{},handleCustomColorSubmit:P=()=>{},setIsFocused:H=()=>{},setIsHovered:S=()=>{},triggerRef:$,dropdownRef:A,onChange:_,...V})=>{const{getColor:B}=i.useTheme(),W={...ho.container,...a==null?void 0:a.container},L={...ho.trigger,...ps[c],...bs[g],...ys[s],...h&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...p&&{borderColor:"color-blue-500",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.1)"},...b&&!f&&{borderColor:"color-gray-400"},...a==null?void 0:a.trigger,...u&&u},D={...ho.dropdown,...a==null?void 0:a.dropdown},F={...ho.colorGrid,...a==null?void 0:a.colorGrid},q={...ho.recentColors,...a==null?void 0:a.recentColors},O=T||"color-gray-200";return r.jsxs(i.View,{...W,...V,children:[t&&r.jsx(so,{htmlFor:e,size:c,isDisabled:f,error:h,views:a==null?void 0:a.label,children:t}),r.jsxs(i.View,{ref:$,onClick:f||m?void 0:j,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onFocus:()=>H(!0),onBlur:()=>H(!1),tabIndex:f?-1:0,role:"button","aria-expanded":I,"aria-haspopup":"listbox","aria-label":t||n,width:"fit-content",gap:8,...L,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:O,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!m&&!f&&r.jsx(le,{widthHeight:16,color:"color-gray-500",orientation:I?"up":"down"})]}),I&&r.jsxs(i.View,{ref:A,...D,children:[r.jsx(i.View,{...F,children:x.map((U,Z)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"4px",backgroundColor:U.value,borderWidth:"2px",borderStyle:"solid",borderColor:T===U.value?"color-blue-500":"transparent",cursor:"pointer",transition:"all 0.2s ease",onClick:()=>z(U.value),title:U.name,_hover:{transform:"scale(1.1)",borderColor:"color-gray-400"},...a==null?void 0:a.colorSwatch},Z))}),k&&C.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...q,children:C.map((U,Z)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:U,borderWidth:"1px",borderStyle:"solid",borderColor:T===U?"color-blue-500":"color-gray-300",cursor:"pointer",transition:"all 0.2s ease",onClick:()=>z(U),title:U,_hover:{transform:"scale(1.1)",borderColor:"color-gray-400"}},Z))})]}),y&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(uo,{value:w,onChange:U=>E(U.target.value),placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:a==null?void 0:a.customInput}),r.jsx(i.View,{padding:"8px 12px",backgroundColor:"color-blue-500",borderRadius:"4px",cursor:"pointer",onClick:P,_hover:{backgroundColor:"color-blue-600"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),l&&r.jsx(i.Text,{fontSize:"12px",color:h?"color-red-500":"color-gray-600",marginTop:"4px",...a==null?void 0:a.helperText,children:l}),h&&typeof h=="string"&&r.jsx(i.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...a==null?void 0:a.error,children:h})]})},ks=e=>{const o=Gr(e);return r.jsx(Yr,{...o,...e})},zt=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],vr=({placeholder:e})=>{const[o,t]=d.useState(zt),[n,l]=d.useState(e??zt[0].name),[a,c]=d.useState(!0),[g,s]=d.useState(!1),[u,h]=d.useState(!1);return{hide:a,setHide:c,newOptions:o,setNewOptions:t,isHovered:u,setIsHovered:h,isFocused:g,setIsFocused:s,value:n,setValue:l}},Xr={xs:8,sm:10,md:12,lg:14,xl:16},Cs=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),ws=e=>r.jsx(i.Input,{type:"country",...e}),Is=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Ts=({option:e,size:o="md",callback:t=()=>{},views:n={text:{}}})=>{const l=a=>{a&&a.stopPropagation&&a.stopPropagation(),t(e)};return r.jsx(Is,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:l,fontSize:i.Typography.fontSizes[o],_hover:{opacity:.8},...n.text,children:e})},js=({size:e,views:o={dropDown:{}},options:t=[],callback:n=()=>{}})=>{const l=a=>n(a);return r.jsx(Cs,{role:"dropDown",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:4,position:"absolute",flexDirection:"column",backgroundColor:"color-white",boxShadow:"rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px",...o.dropDown,children:t.map(a=>r.jsx(Ts,{size:e,option:a.name,callback:l,...o.text},a.code))})},Kr=({id:e,name:o,label:t,value:n,placeholder:l,helperText:a,hide:c=!1,error:g=!1,isHovered:s=!1,isFocused:u=!1,isAutoFocus:h=!1,isDisabled:f=!1,isReadOnly:m=!1,shadow:p={},newOptions:b=[],size:x="md",variant:y="default",shape:k="default",onChange:I,onBlur:T=()=>{},setHide:C=()=>{},setNewOptions:w=()=>{},setIsHovered:j=()=>{},setIsFocused:z=()=>{},setValue:E=()=>{},views:P={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:H,...S})=>{const{getColor:$,themeMode:A}=i.useTheme(),_=$("color-blueGray-700",{themeMode:H||A}),V=()=>z(!0),B=O=>{C(!c),E(O),I&&I(O)},W=()=>{!f&&!m&&C(!c)},L=O=>{const U=O.target.value,Z=zt.filter(X=>X.name.toLowerCase().startsWith(U.toLowerCase()));c&&C(!1),w(Z),I&&I(U)},D=O=>{T(O),z(!1)},F=!!(t&&(u||n)),q={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none"}},fontSize:i.Typography.fontSizes[x],backgroundColor:"transparent",color:f?"color-trueGray-600":"color-blueGray-700",cursor:f?"not-allowed":m?"auto":"pointer",...P.field};return r.jsxs(Te,{helperText:a,error:g,views:P,onClick:W,children:[r.jsxs(Me,{label:t,size:x,error:g,shape:k,views:P,shadow:p,variant:y,value:n,color:"theme-primary",isDisabled:f,isReadOnly:m,isFocused:u,showLabel:F,_hover:!f&&!g?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Ue,{children:[F&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:g,...P,children:t}),r.jsx(ws,{id:e,name:o,placeholder:l,readOnly:m,disabled:f,autoFocus:h,onBlur:D,onFocus:V,...q,...S,value:n,onChange:L})]}),r.jsx(jt,{children:c?r.jsx(le,{orientation:"down",widthHeight:Xr[x],color:_,style:P.icon}):r.jsx(le,{orientation:"up",widthHeight:Xr[x],color:_,style:P.icon})})]}),!c&&r.jsx(js,{size:x,views:P,options:b,callback:B})]})},Ss=e=>{const o=vr(e);return r.jsx(Kr,{...o,...e})};function qo(e){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},qo(e)}function he(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function Ms(e){return he(1,arguments),e instanceof Date||qo(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ce(e){he(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||qo(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function zs(e){if(he(1,arguments),!Ms(e)&&typeof e!="number")return!1;var o=Ce(e);return!isNaN(Number(o))}function Be(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Vs(e,o){he(2,arguments);var t=Ce(e).getTime(),n=Be(o);return new Date(t+n)}function Es(e,o){he(2,arguments);var t=Be(o);return Vs(e,-t)}var Ps=864e5;function Ws(e){he(1,arguments);var o=Ce(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),l=t-n;return Math.floor(l/Ps)+1}function No(e){he(1,arguments);var o=1,t=Ce(e),n=t.getUTCDay(),l=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-l),t.setUTCHours(0,0,0,0),t}function Qr(e){he(1,arguments);var o=Ce(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var l=No(n),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var c=No(a);return o.getTime()>=l.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function _s(e){he(1,arguments);var o=Qr(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=No(t);return n}var $s=6048e5;function Hs(e){he(1,arguments);var o=Ce(e),t=No(o).getTime()-_s(o).getTime();return Math.round(t/$s)+1}var Bs={};function Uo(){return Bs}function Go(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Uo(),f=Be((t=(n=(l=(a=o==null?void 0:o.weekStartsOn)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&l!==void 0?l:h.weekStartsOn)!==null&&n!==void 0?n:(s=h.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Ce(e),p=m.getUTCDay(),b=(p<f?7:0)+p-f;return m.setUTCDate(m.getUTCDate()-b),m.setUTCHours(0,0,0,0),m}function Zr(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Ce(e),f=h.getUTCFullYear(),m=Uo(),p=Be((t=(n=(l=(a=o==null?void 0:o.firstWeekContainsDate)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:m.firstWeekContainsDate)!==null&&n!==void 0?n:(s=m.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(f+1,0,p),b.setUTCHours(0,0,0,0);var x=Go(b,o),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var k=Go(y,o);return h.getTime()>=x.getTime()?f+1:h.getTime()>=k.getTime()?f:f-1}function Ls(e,o){var t,n,l,a,c,g,s,u;he(1,arguments);var h=Uo(),f=Be((t=(n=(l=(a=o==null?void 0:o.firstWeekContainsDate)!==null&&a!==void 0?a:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&l!==void 0?l:h.firstWeekContainsDate)!==null&&n!==void 0?n:(s=h.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),m=Zr(e,o),p=new Date(0);p.setUTCFullYear(m,0,f),p.setUTCHours(0,0,0,0);var b=Go(p,o);return b}var As=6048e5;function Ds(e,o){he(1,arguments);var t=Ce(e),n=Go(t,o).getTime()-Ls(t,o).getTime();return Math.round(n/As)+1}function te(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ze={y:function(o,t){var n=o.getUTCFullYear(),l=n>0?n:1-n;return te(t==="yy"?l%100:l,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):te(n+1,2)},d:function(o,t){return te(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return te(o.getUTCHours()%12||12,t.length)},H:function(o,t){return te(o.getUTCHours(),t.length)},m:function(o,t){return te(o.getUTCMinutes(),t.length)},s:function(o,t){return te(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,l=o.getUTCMilliseconds(),a=Math.floor(l*Math.pow(10,n-3));return te(a,t.length)}},Ge={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fs={G:function(o,t,n){var l=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(l,{width:"abbreviated"});case"GGGGG":return n.era(l,{width:"narrow"});case"GGGG":default:return n.era(l,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var l=o.getUTCFullYear(),a=l>0?l:1-l;return n.ordinalNumber(a,{unit:"year"})}return ze.y(o,t)},Y:function(o,t,n,l){var a=Zr(o,l),c=a>0?a:1-a;if(t==="YY"){var g=c%100;return te(g,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):te(c,t.length)},R:function(o,t){var n=Qr(o);return te(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return te(n,t.length)},Q:function(o,t,n){var l=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(l);case"QQ":return te(l,2);case"Qo":return n.ordinalNumber(l,{unit:"quarter"});case"QQQ":return n.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(l,{width:"wide",context:"formatting"})}},q:function(o,t,n){var l=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(l);case"qq":return te(l,2);case"qo":return n.ordinalNumber(l,{unit:"quarter"});case"qqq":return n.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(l,{width:"wide",context:"standalone"})}},M:function(o,t,n){var l=o.getUTCMonth();switch(t){case"M":case"MM":return ze.M(o,t);case"Mo":return n.ordinalNumber(l+1,{unit:"month"});case"MMM":return n.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(l,{width:"wide",context:"formatting"})}},L:function(o,t,n){var l=o.getUTCMonth();switch(t){case"L":return String(l+1);case"LL":return te(l+1,2);case"Lo":return n.ordinalNumber(l+1,{unit:"month"});case"LLL":return n.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(l,{width:"wide",context:"standalone"})}},w:function(o,t,n,l){var a=Ds(o,l);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):te(a,t.length)},I:function(o,t,n){var l=Hs(o);return t==="Io"?n.ordinalNumber(l,{unit:"week"}):te(l,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ze.d(o,t)},D:function(o,t,n){var l=Ws(o);return t==="Do"?n.ordinalNumber(l,{unit:"dayOfYear"}):te(l,t.length)},E:function(o,t,n){var l=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(l,{width:"short",context:"formatting"});case"EEEE":default:return n.day(l,{width:"wide",context:"formatting"})}},e:function(o,t,n,l){var a=o.getUTCDay(),c=(a-l.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return te(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(o,t,n,l){var a=o.getUTCDay(),c=(a-l.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return te(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(o,t,n){var l=o.getUTCDay(),a=l===0?7:l;switch(t){case"i":return String(a);case"ii":return te(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(l,{width:"short",context:"formatting"});case"iiii":default:return n.day(l,{width:"wide",context:"formatting"})}},a:function(o,t,n){var l=o.getUTCHours(),a=l/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(o,t,n){var l=o.getUTCHours(),a;switch(l===12?a=Ge.noon:l===0?a=Ge.midnight:a=l/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(o,t,n){var l=o.getUTCHours(),a;switch(l>=17?a=Ge.evening:l>=12?a=Ge.afternoon:l>=4?a=Ge.morning:a=Ge.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var l=o.getUTCHours()%12;return l===0&&(l=12),n.ordinalNumber(l,{unit:"hour"})}return ze.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ze.H(o,t)},K:function(o,t,n){var l=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(l,{unit:"hour"}):te(l,t.length)},k:function(o,t,n){var l=o.getUTCHours();return l===0&&(l=24),t==="ko"?n.ordinalNumber(l,{unit:"hour"}):te(l,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ze.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ze.s(o,t)},S:function(o,t){return ze.S(o,t)},X:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Rr(c);case"XXXX":case"XX":return Le(c);case"XXXXX":case"XXX":default:return Le(c,":")}},x:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"x":return Rr(c);case"xxxx":case"xx":return Le(c);case"xxxxx":case"xxx":default:return Le(c,":")}},O:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jr(c,":");case"OOOO":default:return"GMT"+Le(c,":")}},z:function(o,t,n,l){var a=l._originalDate||o,c=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jr(c,":");case"zzzz":default:return"GMT"+Le(c,":")}},t:function(o,t,n,l){var a=l._originalDate||o,c=Math.floor(a.getTime()/1e3);return te(c,t.length)},T:function(o,t,n,l){var a=l._originalDate||o,c=a.getTime();return te(c,t.length)}};function Jr(e,o){var t=e>0?"-":"+",n=Math.abs(e),l=Math.floor(n/60),a=n%60;if(a===0)return t+String(l);var c=o;return t+String(l)+c+te(a,2)}function Rr(e,o){if(e%60===0){var t=e>0?"-":"+";return t+te(Math.abs(e)/60,2)}return Le(e,o)}function Le(e,o){var t=o||"",n=e>0?"-":"+",l=Math.abs(e),a=te(Math.floor(l/60),2),c=te(l%60,2);return n+a+t+c}var en=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},on=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Os=function(o,t){var n=o.match(/(P+)(p+)?/)||[],l=n[1],a=n[2];if(!a)return en(o,t);var c;switch(l){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",en(l,t)).replace("{{time}}",on(a,t))},qs={p:on,P:Os};function Ns(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var Us=["D","DD"],Gs=["YY","YYYY"];function Ys(e){return Us.indexOf(e)!==-1}function vs(e){return Gs.indexOf(e)!==-1}function tn(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Xs={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ks=function(o,t,n){var l,a=Xs[o];return typeof a=="string"?l=a:t===1?l=a.one:l=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+l:l+" ago":l};function Vt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Qs={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zs={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Js={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rs={date:Vt({formats:Qs,defaultWidth:"full"}),time:Vt({formats:Zs,defaultWidth:"full"}),dateTime:Vt({formats:Js,defaultWidth:"full"})},ed={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},od=function(o,t,n,l){return ed[o]};function fo(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",l;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):a;l=e.formattingValues[c]||e.formattingValues[a]}else{var g=e.defaultWidth,s=t!=null&&t.width?String(t.width):e.defaultWidth;l=e.values[s]||e.values[g]}var u=e.argumentCallback?e.argumentCallback(o):o;return l[u]}}var td={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rd={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ad={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ld={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cd={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},id=function(o,t){var n=Number(o),l=n%100;if(l>20||l<10)switch(l%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},sd={ordinalNumber:id,era:fo({values:td,defaultWidth:"wide"}),quarter:fo({values:rd,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:fo({values:nd,defaultWidth:"wide"}),day:fo({values:ad,defaultWidth:"wide"}),dayPeriod:fo({values:ld,defaultWidth:"wide",formattingValues:cd,defaultFormattingWidth:"wide"})};function mo(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,l=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=o.match(l);if(!a)return null;var c=a[0],g=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(g)?gd(g,function(f){return f.test(c)}):dd(g,function(f){return f.test(c)}),u;u=e.valueCallback?e.valueCallback(s):s,u=t.valueCallback?t.valueCallback(u):u;var h=o.slice(c.length);return{value:u,rest:h}}}function dd(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function gd(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function ud(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var l=n[0],a=o.match(e.parsePattern);if(!a)return null;var c=e.valueCallback?e.valueCallback(a[0]):a[0];c=t.valueCallback?t.valueCallback(c):c;var g=o.slice(l.length);return{value:c,rest:g}}}var hd=/^(\d+)(th|st|nd|rd)?/i,fd=/\d+/i,md={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pd={any:[/^b/i,/^(a|c)/i]},bd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yd={any:[/1/i,/2/i,/3/i,/4/i]},xd={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kd={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Cd={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wd={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Id={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Td={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jd={ordinalNumber:ud({matchPattern:hd,parsePattern:fd,valueCallback:function(o){return parseInt(o,10)}}),era:mo({matchPatterns:md,defaultMatchWidth:"wide",parsePatterns:pd,defaultParseWidth:"any"}),quarter:mo({matchPatterns:bd,defaultMatchWidth:"wide",parsePatterns:yd,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:mo({matchPatterns:xd,defaultMatchWidth:"wide",parsePatterns:kd,defaultParseWidth:"any"}),day:mo({matchPatterns:Cd,defaultMatchWidth:"wide",parsePatterns:wd,defaultParseWidth:"any"}),dayPeriod:mo({matchPatterns:Id,defaultMatchWidth:"any",parsePatterns:Td,defaultParseWidth:"any"})},Sd={code:"en-US",formatDistance:Ks,formatLong:Rs,formatRelative:od,localize:sd,match:jd,options:{weekStartsOn:0,firstWeekContainsDate:1}},Md=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vd=/^'([^]*?)'?$/,Ed=/''/g,Pd=/[a-zA-Z]/;function Wd(e,o,t){var n,l,a,c,g,s,u,h,f,m,p,b,x,y;he(2,arguments);var k=String(o),I=Uo(),T=(n=(l=void 0)!==null&&l!==void 0?l:I.locale)!==null&&n!==void 0?n:Sd,C=Be((a=(c=(g=(s=void 0)!==null&&s!==void 0?s:void 0)!==null&&g!==void 0?g:I.firstWeekContainsDate)!==null&&c!==void 0?c:(u=I.locale)===null||u===void 0||(h=u.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=Be((f=(m=(p=(b=void 0)!==null&&b!==void 0?b:void 0)!==null&&p!==void 0?p:I.weekStartsOn)!==null&&m!==void 0?m:(x=I.locale)===null||x===void 0||(y=x.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var j=Ce(e);if(!zs(j))throw new RangeError("Invalid time value");var z=Ns(j),E=Es(j,z),P={firstWeekContainsDate:C,weekStartsOn:w,locale:T,_originalDate:j},H=k.match(zd).map(function(S){var $=S[0];if($==="p"||$==="P"){var A=qs[$];return A(S,T.formatLong)}return S}).join("").match(Md).map(function(S){if(S==="''")return"'";var $=S[0];if($==="'")return _d(S);var A=Fs[$];if(A)return vs(S)&&tn(S,o,String(e)),Ys(S)&&tn(S,o,String(e)),A(E,S,T.localize,P);if($.match(Pd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return S}).join("");return H}function _d(e){var o=e.match(Vd);return o?o[1].replace(Ed,"'"):e}const rn=()=>{const[e,o]=d.useState(!1),[t,n]=d.useState(!1),[l,a]=d.useState(Wd(new Date,"yyyy-MM-dd"));return{date:l,setDate:a,isHovered:e,setIsHovered:o,isFocused:t,setIsFocused:n}},$d=e=>r.jsx(i.Input,{type:"date",...e}),nn=({id:e,icon:o,name:t,label:n,date:l,children:a,helperText:c,shadow:g={},size:s="md",variant:u="default",shape:h="default",views:f={container:{},label:{},helperText:{},text:{},field:{}},error:m=!1,isHovered:p=!1,isFocused:b=!1,isDisabled:x=!1,isReadOnly:y=!1,setDate:k=()=>{},setIsFocused:I=()=>{},setIsHovered:T=()=>{},onChange:C,onChangeText:w,...j})=>{const z=!!(b&&n),E=()=>T(!p),P=()=>I(!0),H=$=>{typeof $=="string"?(k($),w&&w($)):(k($.target.value),C&&C($.target.value))},S={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},fontSize:i.Typography.fontSizes[s],backgroundColor:"transparent",color:x?"color-trueGray-600":"color-blueGray-700",cursor:x?"not-allowed":y?"auto":"pointer",...f.field};return r.jsx(Te,{helperText:c,error:m,views:f,children:r.jsx(Me,{label:n,size:s,error:m,shape:h,views:f,shadow:g,color:"theme-primary",variant:u,value:l,isHovered:p,isDisabled:x,isReadOnly:y,isFocused:b,showLabel:z,onMouseEnter:E,onMouseLeave:E,children:r.jsxs(Ue,{children:[z&&r.jsx($e,{htmlFor:e,color:"theme-primary",error:m,...f,children:n}),r.jsx($d,{id:e,name:t,onFocus:P,disabled:x,readOnly:y,...S,...j,...w&&{onChangeText:H},onChange:H})]})})})},Hd=e=>{const o=rn();return r.jsx(nn,{...o,...e})},an=e=>{const o=St(e),[t,n]=d.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},Bd=({visibleIcon:e=r.jsx(gt,{widthHeight:14}),hiddenIcon:o=r.jsx(dt,{widthHeight:14}),...t})=>{const{isVisible:n,setIsVisible:l,...a}=an(t);return r.jsx(go,{...a,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!n)},children:n?e:o})})},ln=(e,o,t)=>{const[n,l]=d.useState(e),[a,c]=d.useState(o?{value:o,label:o}:e[0]),[g,s]=d.useState([]),[u,h]=d.useState(0),[f,m]=d.useState(t??""),[p,b]=d.useState(!1);return{filteredItems:n,setFilteredItems:l,selectedItem:a,setSelectedItem:c,selectedItems:g,setSelectedItems:s,highlightedIndex:u,setHighlightedIndex:h,searchQuery:f,setSearchQuery:m,isDropdownVisible:p,setIsDropdownVisible:b}},Ld={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:"10px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02)"},cn={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Ad={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:"10px",borderTopRightRadius:"10px"},Dd={padding:"8px 10px",cursor:"pointer",borderRadius:"6px",margin:"1px 4px",transition:"background-color 0.15s ease"},Fd={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},sn={open:{transform:"rotate(180deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"},closed:{transform:"rotate(0deg)",transition:"transform 0.2s cubic-bezier(0.16, 1, 0.3, 1)"}},Od={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:"4px",fontSize:"13px",fontWeight:"500",color:"color-gray-700",transition:"background-color 0.15s ease"},dn=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:l=!0,left:a,right:c,label:g,filteredItems:s,setSelectedItem:u,selectedItem:h,selectedItems:f,setSelectedItems:m,highlightedIndex:p,setHighlightedIndex:b,searchQuery:x,setSearchQuery:y,setFilteredItems:k,views:I,isDropdownVisible:T,setIsDropdownVisible:C,isMulti:w=!1,...j})=>{const{ref:z,relation:E}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),P=d.useRef(null),[H,S]=d.useState(!1),[$,A]=d.useState(!1),_=()=>{var U;const D=$?cn.enter:cn.initial;if(!z.current)return{};const F=z.current.getBoundingClientRect(),q={position:"fixed",left:F.left,width:F.width,zIndex:1e4,...D};return((U=E==null?void 0:E.space)==null?void 0:U.vertical)==="top"?{...q,bottom:window.innerHeight-F.top+6}:{...q,top:F.bottom+6}};d.useEffect(()=>{if(T){const D=setTimeout(()=>A(!0),10);return()=>clearTimeout(D)}A(!1)},[T]),d.useEffect(()=>{const D=F=>{!F.composedPath().some(U=>(U==null?void 0:U.id)==="combobox-dropdown")&&z.current&&!z.current.contains(F.target)&&C(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const V=D=>{if(y(D),D==="")k(o);else{const F=o.filter(q=>q.label.toLowerCase().includes(D.toLowerCase()));k(F)}b(0)},B=D=>{if(w){const F=f.some(O=>O.value===D.value);let q;F?q=f.filter(O=>O.value!==D.value):q=[...f,D],m(q),n==null||n(q)}else u(D),n==null||n(D),C(!1)},W=(D,F)=>{D.stopPropagation();const q=f.filter(O=>O.value!==F.value);m(q),n==null||n(q)},L=D=>w?f.some(F=>F.value===D.value):D.value===h.value;return r.jsxs(i.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...j,children:[g&&r.jsx(i.Text,{views:I==null?void 0:I.label,htmlFor:j.id,children:g}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:z,onClick:()=>C(!T),style:{width:"100%"},children:r.jsxs(Me,{isHovered:H,isFocused:T,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),cursor:"pointer",views:{container:I==null?void 0:I.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",width:"100%",flexWrap:w?"wrap":"nowrap",...I==null?void 0:I.labelContainer,children:[a,w?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(D=>r.jsxs(i.Horizontal,{...Od,_hover:{backgroundColor:"color-gray-200"},children:[D.icon&&r.jsx(i.View,{flexShrink:0,children:D.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:D.label}),r.jsx(pe,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:F=>W(F,D)})]},D.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...I==null?void 0:I.label,children:e}):r.jsxs(r.Fragment,{children:[h.icon&&h.label!==e&&r.jsx(i.View,{children:h.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:h.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...I==null?void 0:I.label,children:h.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[c,r.jsx(i.View,{style:T?sn.open:sn.closed,children:r.jsx(le,{widthHeight:16,orientation:"down",color:T?"color-gray-700":"color-gray-400"})})]})]})}),T&&r.jsx(zr,{children:r.jsxs(i.View,{ref:P,id:"combobox-dropdown",role:"listbox","aria-labelledby":j.id,...Ld,style:_(),...I==null?void 0:I.dropdown,children:[l&&r.jsx(i.View,{...Ad,children:r.jsx(go,{id:`${j.id}-search`,name:`${j.name}-search`,width:"100%",type:"search",autoFocus:!0,value:x,onChange:D=>V(D),hint:e||"Search...",isClearable:!1,left:r.jsx(zo,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...I==null?void 0:I.text},field:{fontSize:"13px"}}})}),s.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:s.map((D,F)=>{const q=L(D),O=F===p;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Dd,backgroundColor:q&&O?"rgba(59, 130, 246, 0.12)":q?"rgba(59, 130, 246, 0.08)":O?"color-gray-100":"transparent",onMouseEnter:()=>b(F),onClick:()=>B(D),...I==null?void 0:I.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[D.icon&&r.jsx(i.View,{flexShrink:0,children:D.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:D.label})]}),q&&t&&r.jsx(Vo,{widthHeight:16,color:"theme-primary"})]},D.value)})}),s.length===0&&r.jsxs(i.Vertical,{...Fd,children:[r.jsx(zo,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},qd=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:l,...a})=>{const c=ln(t,n,l);return r.jsx(dn,{id:e,name:o,items:t,...c,...a})},gn=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:l,onTagRemove:a,maxTags:c,minTagLength:g=1,maxTagLength:s=50,allowDuplicates:u=!1,separators:h=["enter","comma"],isDisabled:f=!1,isReadOnly:m=!1}=e,[p,b]=d.useState(""),[x,y]=d.useState(()=>(o||t||[]).map((_,V)=>({id:`tag-${V}-${Date.now()}`,value:_}))),[k,I]=d.useState(!1),[T,C]=d.useState(!1),w=o&&Array.isArray(o)?o.map((A,_)=>({id:`tag-${_}-${Date.now()}`,value:A})):x;d.useEffect(()=>{o&&Array.isArray(o)&&y(o.map((A,_)=>({id:`tag-${_}-${Date.now()}`,value:A})))},[o]);const j=d.useCallback(A=>{const _=A.trim();return!(_.length<g||_.length>s||!u&&w.map(B=>B.value.toLowerCase()).includes(_.toLowerCase())||c&&w.length>=c)},[w,g,s,u,c]),z=d.useCallback(A=>{if(f||m)return;const _=A.trim();if(!_||!j(_))return;const V={id:`tag-${Date.now()}-${Math.random()}`,value:_},B=[...w,V],W=B.map(L=>L.value);o||y(B),n==null||n(W),l==null||l(_),b("")},[w,j,n,l,f,m,o]),E=d.useCallback(A=>{if(f||m)return;const _=w[A];if(!_)return;const V=w.filter((W,L)=>L!==A),B=V.map(W=>W.value);o||y(V),n==null||n(B),a==null||a(_.value,A)},[w,n,a,f,m,o]),P=d.useCallback(A=>{if(f||m)return;const _=A.target.value;if(h.includes("comma")&&_.includes(",")){const V=_.split(","),B=V[0],W=V.slice(1).join(",");B.trim()&&z(B),b(W);return}b(_)},[z,h,f,m]),H=d.useCallback(A=>{if(f||m)return;const{key:_}=A;if(h.includes("enter")&&_==="Enter"){A.preventDefault(),p.trim()&&z(p);return}if(h.includes("tab")&&_==="Tab"&&p.trim()){A.preventDefault(),z(p);return}if(h.includes("space")&&_===" "&&p.trim()){A.preventDefault(),z(p);return}if(_==="Backspace"&&!p&&w.length>0){A.preventDefault(),E(w.length-1);return}},[z,E,p,w,h,f,m]),S=d.useCallback(()=>{var A;I(!0),(A=e.onFocus)==null||A.call(e)},[e.onFocus]),$=d.useCallback(()=>{var A;I(!1),p.trim()&&z(p),(A=e.onBlur)==null||A.call(e)},[z,p,e.onBlur]);return{inputValue:p,setInputValue:b,tags:w,setTags:y,isFocused:k,setIsFocused:I,isHovered:T,setIsHovered:C,addTag:z,removeTag:E,handleInputChange:P,handleKeyDown:H,handleFocus:S,handleBlur:$,validateTag:j}},Nd=({tag:e,onRemove:o,isRemovable:t,size:n,views:l,isDisabled:a,isReadOnly:c})=>{const[g,s]=d.useState(!1),u={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:u.padding,backgroundColor:"color-gray-100-100",borderRadius:"16px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-100",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",opacity:a?.6:1,_hover:!a&&!c?{backgroundColor:"color-gray-100-200",borderColor:"color-gray-200",boxShadow:"0 4px 6px rgba(0,0,0,0.05)",transform:"translateY(-1px)"}:{},...l==null?void 0:l.tag,children:[r.jsx(i.Text,{fontSize:u.fontSize,color:a?"color-gray-100":"theme-primary",whiteSpace:"nowrap",...l==null?void 0:l.tagText,children:e}),t&&!a&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.2s ease",backgroundColor:g?"color-red-100":"transparent",opacity:g?1:.7,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onClick:h=>{h.stopPropagation(),o()},_hover:{backgroundColor:"color-red-50"},...l==null?void 0:l.tagRemove,children:r.jsx(pe,{widthHeight:u.iconSize,color:g?"color-red-500":"color-gray-400"})})]})},un=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:l,error:a=!1,inputValue:c="",tags:g=[],left:s,right:u,shadow:h={},views:f={},size:m="md",shape:p="default",variant:b="default",isDisabled:x=!1,isReadOnly:y=!1,isAutoFocus:k=!1,isRemovable:I=!0,isFocused:T=!1,isHovered:C=!1,maxTags:w,handleInputChange:j,handleKeyDown:z,handleFocus:E,handleBlur:P,removeTag:H,setIsHovered:S,onClick:$,...A})=>{const{getColor:_,themeMode:V}=i.useTheme(),B=!!(t&&(T||g.length>0||c)),W=w&&g.length>=w,L={...Vr[p],...Pr[b],...f==null?void 0:f.inputContainer},D={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[m],color:x?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",...f==null?void 0:f.input};return r.jsx(Te,{error:!!a,helperText:typeof a=="string"?a:l,views:f,...A,children:r.jsxs(Me,{label:t,shadow:h,value:g.length>0||c?"has-content":"",size:m,shape:p,variant:b,error:!!a,showLabel:B,isFocused:T,isHovered:C,isDisabled:x,isReadOnly:y,views:f,onClick:$,onMouseEnter:()=>S==null?void 0:S(!0),onMouseLeave:()=>S==null?void 0:S(!1),...L,children:[s,r.jsxs(Ue,{children:[t&&r.jsx($e,{size:m,error:!!a,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[m],padding:"8px 0",...f==null?void 0:f.tagsContainer,children:[g.map((F,q)=>r.jsx(Nd,{tag:F.value,onRemove:()=>H==null?void 0:H(q),isRemovable:I,size:m,views:f,isDisabled:x,isReadOnly:y},F.id)),!W&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:g.length===0?n:"",disabled:x,readOnly:y,autoFocus:k,onChange:j,onKeyDown:z,onFocus:E,onBlur:P,autoComplete:"off",...D}),W&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[m],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",w," tags reached"]})]})]}),u]})})},Ud=e=>{const o=gn(e),{tags:t,...n}=e;return r.jsx(un,{...o,...n})};function Gd(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hn=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:l,onComplete:a,onKeyDown:c,onKeyPress:g,onBlur:s,onFocus:u,isReadOnly:h,isDisabled:f,pattern:m,stepValues:p,pasteTransformer:b})=>{var Z,X;const x=e!==void 0,y=x?e:o,[k,I]=d.useState((y==null?void 0:y.slice(0,t))||""),[T,C]=d.useState(!1),[w,j]=d.useState(!1),[z,E]=d.useState(null),[P,H]=d.useState(null),S=d.useRef(null),$=d.useRef(null),A=d.useRef({value:k,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((X=(Z=window==null?void 0:window.CSS)==null?void 0:Z.supports)==null?void 0:X.call(Z,"-webkit-touch-callout","none"))}),_=d.useRef({prev:[null,null,"none"]}),V=m?typeof m=="string"?new RegExp(m):m:null;d.useEffect(()=>{x&&e!==k&&I((e==null?void 0:e.slice(0,t))||"")},[x,e,t,k]);const B=d.useCallback(N=>{let Q=N;if(p&&p.length>0&&N){const R=parseInt(N,10);if(!isNaN(R)){let ee=p[0],re=Math.abs(R-ee);for(let ne=1;ne<p.length;ne++){const ge=Math.abs(R-p[ne]);ge<re&&(re=ge,ee=p[ne])}Q=ee.toString()}}I(Q),n&&n(Q),l&&l(Q),a&&Q.length===t&&a(Q)},[n,l,a,t,p]),W=d.useCallback(N=>{N&&S.current!==N&&Object.defineProperty(S,"current",{value:N,writable:!0})},[]),L=d.useCallback(N=>{const Q=N.currentTarget.value.slice(0,t);if(Q.length>0&&V&&!V.test(Q)){N.preventDefault();return}B(Q),S.current&&(S.current.value=Q)},[t,V,B,S]),D=d.useCallback(()=>{var N;if(S.current){const Q=Math.min(S.current.value.length,t-1),R=S.current.value.length;(N=S.current)==null||N.setSelectionRange(Q,R),E(Q),H(R)}C(!0)},[t]),F=d.useCallback(()=>{C(!1)},[]),q=d.useCallback(N=>{c&&c(N)},[]),O=d.useCallback(N=>{g&&g(N)},[]),U=d.useCallback(N=>{const Q=S.current;if(!N.clipboardData||!Q)return;const R=N.clipboardData.getData("text/plain"),ee=b?b(R):R;N.preventDefault();const re=Q.selectionStart||0,ne=Q.selectionEnd||0,Y=(re!==ne?k.slice(0,re)+ee+k.slice(ne):k.slice(0,re)+ee+k.slice(re)).slice(0,t);if(Y.length>0&&V&&!V.test(Y))return;Q.value=Y,B(Y),I(Y);const v=Math.min(Y.length,t-1),oe=Y.length;Q.setSelectionRange(v,oe),E(v),H(oe)},[t,b,V,B,k,I]);return d.useEffect(()=>{const N=S.current,Q=$.current;if(!N||!Q)return;A.current.value!==N.value&&A.current.onChange&&A.current.onChange(N.value),_.current.prev=[N.selectionStart,N.selectionEnd,N.selectionDirection];function R(){if(document.activeElement!==N){E(null),H(null);return}const ne=(N==null?void 0:N.selectionStart)??null,ge=(N==null?void 0:N.selectionEnd)??null,me=(N==null?void 0:N.selectionDirection)??null,Y=(N==null?void 0:N.maxLength)??0,v=(N==null?void 0:N.value)??"",oe=_.current.prev;let K=-1,J=-1,ie="none";if(v.length!==0&&ne!==null&&ge!==null){const ae=ne===ge,We=ne===v.length&&v.length<Y;if(ae&&!We){const Ie=ne;if(Ie===0)K=0,J=1,ie="forward";else if(Ie===Y)K=Ie-1,J=Ie,ie="backward";else if(Y>1&&v.length>1){let Xt=0;if(oe[0]!==null&&oe[1]!==null){ie=Ie<oe[1]?"backward":"forward";const c0=oe[0]===oe[1]&&oe[0]<Y;ie==="backward"&&!c0&&(Xt=-1)}K=Xt+Ie,J=Xt+Ie+1}}K!==-1&&J!==-1&&K!==J&&S.current&&S.current.setSelectionRange(K,J,ie)}const ue=K!==-1?K:ne,fe=J!==-1?J:ge,xe=ie!=="none"?ie:me;E(ue),H(fe),_.current.prev=[ue,fe,xe]}document.addEventListener("selectionchange",R,{capture:!0}),R(),document.activeElement===N&&C(!0);const ee=()=>{Q&&Q.style.setProperty("--root-height",`${N.clientHeight}px`)};ee();const re=new window.ResizeObserver(ee);return re.observe(N),()=>{document.removeEventListener("selectionchange",R,{capture:!0}),re.disconnect()}},[]),d.useEffect(()=>{Gd(()=>{var ee,re,ne,ge;(ee=S.current)==null||ee.dispatchEvent(new Event("input"));const N=(re=S.current)==null?void 0:re.selectionStart,Q=(ne=S.current)==null?void 0:ne.selectionEnd,R=(ge=S.current)==null?void 0:ge.selectionDirection;N!==null&&Q!==null&&N!==void 0&&Q!==void 0&&(E(N),H(Q),_.current.prev=[N,Q,R||"none"])})},[k,T]),{value:k,setValue:B,isFocused:T,setIsFocused:C,isHovered:w,setIsHovered:j,inputRef:S,containerRef:$,mirrorSelectionStart:z,mirrorSelectionEnd:P,setMirrorSelectionStart:E,setMirrorSelectionEnd:H,setInputRef:W,handleChange:L,handleFocus:D,handleBlur:F,handleKeyDown:q,handleKeyPress:O,handlePaste:U}},Yd=d.createContext({slots:[],isFocused:!1,isHovering:!1}),vd=`
|
|
7
7
|
@keyframes blink {
|
|
8
8
|
0%, 100% { opacity: 1; }
|
|
9
9
|
50% { opacity: 0; }
|