polpo 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.turbo/turbo-lint.log +1 -1
  2. package/dist/chunk-LWUSFVRE.js +3 -0
  3. package/dist/chunk-LWUSFVRE.js.map +1 -0
  4. package/dist/hooks.cjs +1 -1
  5. package/dist/hooks.cjs.map +1 -1
  6. package/dist/hooks.d.cts +2 -2
  7. package/dist/hooks.d.ts +2 -2
  8. package/dist/hooks.js +1 -1
  9. package/dist/ui.cjs +53 -53
  10. package/dist/ui.cjs.map +1 -1
  11. package/dist/ui.d.cts +1 -1
  12. package/dist/ui.d.ts +1 -1
  13. package/dist/ui.js +57 -57
  14. package/dist/ui.js.map +1 -1
  15. package/package.json +6 -4
  16. package/src/components/cursor/cursor.stories.tsx +3 -2
  17. package/src/components/form/checkbox/checkbox.stories.tsx +1 -2
  18. package/src/components/form/field/field.stories.tsx +1 -2
  19. package/src/components/form/select/select.style.ts +1 -1
  20. package/src/components/modals/action-modal/action-modal.stories.tsx +6 -2
  21. package/src/components/modals/aside-modal/aside-modal.stories.tsx +4 -1
  22. package/src/components/modals/aside-modal/aside-modal.style.ts +1 -1
  23. package/src/components/modals/menu/menu.stories.tsx +1 -1
  24. package/src/components/modals/menu/menu.style.ts +1 -1
  25. package/src/components/modals/menu/menu.tsx +7 -10
  26. package/src/components/modals/modal/modal.stories.tsx +4 -1
  27. package/src/components/modals/modal/modal.tsx +2 -1
  28. package/src/components/modals/portal/portal.tsx +7 -3
  29. package/src/components/tabs/tabs-list.tsx +1 -1
  30. package/src/components/tooltips/tooltip/tooltip.style.ts +1 -1
  31. package/src/hooks/use-dom-container.ts +13 -17
  32. package/tsconfig.json +0 -1
  33. package/.turbo/turbo-build.log +0 -0
  34. package/dist/chunk-CFYQBHH5.js +0 -3
  35. package/dist/chunk-CFYQBHH5.js.map +0 -1
package/dist/ui.d.cts CHANGED
@@ -523,7 +523,7 @@ type PortalProps = {
523
523
  id: string;
524
524
  children: ReactNode;
525
525
  };
526
- declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<HTMLElement>>;
526
+ declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<unknown>>;
527
527
 
528
528
  type RippleProps = {
529
529
  color?: string;
package/dist/ui.d.ts CHANGED
@@ -523,7 +523,7 @@ type PortalProps = {
523
523
  id: string;
524
524
  children: ReactNode;
525
525
  };
526
- declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<HTMLElement>>;
526
+ declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<unknown>>;
527
527
 
528
528
  type RippleProps = {
529
529
  color?: string;
package/dist/ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as T2,w as M2,x as w2}from"./chunk-CFYQBHH5.js";import{a as m1}from"./chunk-MAWW6AA7.js";import{createContext as l5,useCallback as s5,useContext as c5,useState as d5}from"react";import r5,{css as P2}from"styled-components";var k2=r5.span`
2
+ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as T2,w as M2,x as w2}from"./chunk-LWUSFVRE.js";import{a as m1}from"./chunk-MAWW6AA7.js";import{createContext as l5,useCallback as s5,useContext as c5,useState as d5}from"react";import r5,{css as P2}from"styled-components";var k2=r5.span`
3
3
  &.horizontal,
4
4
  &.vertical {
5
5
  background: ${e=>e.$color??"currentColor"};
@@ -563,11 +563,11 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
563
563
  width: auto;
564
564
  }
565
565
  }
566
- `;var Q5=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Q5||{}),J5=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(J5||{});import{jsx as s1,jsxs as Q1}from"react/jsx-runtime";var r3=({iconName:e,className:o,onClick:t})=>e?s1(T,{className:o,name:e,onClick:t}):s1("span",{}),o0=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:a="cross",error:n,onClickLeftIcon:i,onClickRightIcon:c,fieldOrientation:l="vertical",children:s,isFocus:d=!1,variant:C},m)=>{let u=R({focus:d,error:!!n,"variant-content-border":C==="content-border","variant-content-line":C==="line","variant-full-border":C==="full-border","variant-inline":l==="horizontal"}),g=h=>y=>{y.stopPropagation(),document.getElementById(e)?.focus(),h&&h()};return Q1(t3,{className:u,ref:m,children:[o?s1(M,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,Q1("section",{className:"field-content",children:[r3({className:"field-left-icon",iconName:t,onClick:g(i)}),s1("section",{className:"field-children",children:s}),r3({className:"field-right-icon",iconName:r,onClick:g(c)})]}),!!n&&Q1("section",{className:"field-message",children:[a?s1(T,{name:a,size:10}):s1("span",{}),s1(M,{noPadding:!0,variant:"small",children:n})]})]})},z=e0.forwardRef(o0);import{jsx as J1}from"react/jsx-runtime";var n3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,...b})=>{let L=t0(()=>crypto.randomUUID(),[]),{isFocus:x,handlers:S}=F({onBlur:r,onChange:v=>t(v.target.value),onFocus:a});return J1(z,{id:L,error:y,isFocus:x,...b,children:J1("input",{id:L,type:n,name:e,className:i,style:c,value:o,autoFocus:l,autoComplete:m,placeholder:C,disabled:d,readOnly:s,...S})})},r0=({rules:e,...o})=>J1(V,{Component:n3,defaultValue:"",inputProps:o,rules:e});n3.Controller=r0;import{useMemo as n0}from"react";import{jsx as e2}from"react/jsx-runtime";var a3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="text",className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,min:b,max:L,...x})=>{let S=n0(()=>crypto.randomUUID(),[]),{handlers:v,isFocus:$}=F({onChange:H=>t(H.target.value),onBlur:r,onFocus:a});return e2(z,{id:S,error:y,isFocus:$,...x,children:e2("input",{id:S,type:n,name:e,className:i,style:c,value:o,autoFocus:l,autoComplete:m,placeholder:C,disabled:d,readOnly:s,min:b,max:L,...v})})},a0=({rules:e,...o})=>e2(V,{Component:a3,defaultValue:"",inputProps:o,rules:e});a3.Controller=a0;import{useMemo as i3}from"react";import{jsx as o2}from"react/jsx-runtime";var l3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="",autoComplete:C="off",isDirty:m=!1,isTouched:u=!1,invalid:g=!1,error:h,...y})=>{let b=i3(()=>crypto.randomUUID(),[]),[L,x]=$2(["password","text"]),{isFocus:S,handlers:v}=F({onBlur:r,onChange:H=>t(H.target.value),onFocus:a}),$=i3(()=>L==="password"?"eye":L==="text"?"eye-hidden":"warning",[L]);return o2(z,{id:b,error:h,isFocus:S,...y,rightIcon:$,onClickRightIcon:()=>x(),children:o2("input",{id:b,type:L,name:e,className:n,style:i,value:o,autoFocus:c,autoComplete:C,placeholder:d,disabled:s,readOnly:l,...v})})},i0=({rules:e,...o})=>o2(V,{Component:l3,defaultValue:"",inputProps:o,rules:e});l3.Controller=i0;import Z0 from"color";import{useCallback as F0,useEffect as N0,useMemo as H3,useRef as E0,useState as V3}from"react";import{HexAlphaColorPicker as A0,HexColorInput as D0}from"react-colorful";import O0 from"use-eye-dropper";import a2 from"styled-components";import{createContext as f0,useCallback as g3,useContext as g0,useRef as h0,useState as h3}from"react";import{styled as m3}from"styled-components";import{useLayoutEffect as C0,useRef as m0}from"react";import{useMemo as s0}from"react";import{useTheme as c0}from"styled-components";import t2 from"styled-components";var s3=t2.section`
566
+ `;var Q5=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Q5||{}),J5=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(J5||{});import{jsx as s1,jsxs as Q1}from"react/jsx-runtime";var r3=({iconName:e,className:o,onClick:t})=>e?s1(T,{className:o,name:e,onClick:t}):s1("span",{}),o0=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:a="cross",error:n,onClickLeftIcon:i,onClickRightIcon:c,fieldOrientation:l="vertical",children:s,isFocus:d=!1,variant:C},m)=>{let u=R({focus:d,error:!!n,"variant-content-border":C==="content-border","variant-content-line":C==="line","variant-full-border":C==="full-border","variant-inline":l==="horizontal"}),g=h=>y=>{y.stopPropagation(),document.getElementById(e)?.focus(),h&&h()};return Q1(t3,{className:u,ref:m,children:[o?s1(M,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,Q1("section",{className:"field-content",children:[r3({className:"field-left-icon",iconName:t,onClick:g(i)}),s1("section",{className:"field-children",children:s}),r3({className:"field-right-icon",iconName:r,onClick:g(c)})]}),!!n&&Q1("section",{className:"field-message",children:[a?s1(T,{name:a,size:10}):s1("span",{}),s1(M,{noPadding:!0,variant:"small",children:n})]})]})},z=e0.forwardRef(o0);import{jsx as J1}from"react/jsx-runtime";var n3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,...b})=>{let L=t0(()=>crypto.randomUUID(),[]),{isFocus:x,handlers:S}=F({onBlur:r,onChange:v=>t(v.target.value),onFocus:a});return J1(z,{id:L,error:y,isFocus:x,...b,children:J1("input",{id:L,type:n,name:e,className:i,style:c,value:o,autoFocus:l,autoComplete:m,placeholder:C,disabled:d,readOnly:s,...S})})},r0=({rules:e,...o})=>J1(V,{Component:n3,defaultValue:"",inputProps:o,rules:e});n3.Controller=r0;import{useMemo as n0}from"react";import{jsx as e2}from"react/jsx-runtime";var a3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="text",className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,min:b,max:L,...x})=>{let S=n0(()=>crypto.randomUUID(),[]),{handlers:v,isFocus:$}=F({onChange:H=>t(H.target.value),onBlur:r,onFocus:a});return e2(z,{id:S,error:y,isFocus:$,...x,children:e2("input",{id:S,type:n,name:e,className:i,style:c,value:o,autoFocus:l,autoComplete:m,placeholder:C,disabled:d,readOnly:s,min:b,max:L,...v})})},a0=({rules:e,...o})=>e2(V,{Component:a3,defaultValue:"",inputProps:o,rules:e});a3.Controller=a0;import{useMemo as i3}from"react";import{jsx as o2}from"react/jsx-runtime";var l3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="",autoComplete:C="off",isDirty:m=!1,isTouched:u=!1,invalid:g=!1,error:h,...y})=>{let b=i3(()=>crypto.randomUUID(),[]),[L,x]=$2(["password","text"]),{isFocus:S,handlers:v}=F({onBlur:r,onChange:H=>t(H.target.value),onFocus:a}),$=i3(()=>L==="password"?"eye":L==="text"?"eye-hidden":"warning",[L]);return o2(z,{id:b,error:h,isFocus:S,...y,rightIcon:$,onClickRightIcon:()=>x(),children:o2("input",{id:b,type:L,name:e,className:n,style:i,value:o,autoFocus:c,autoComplete:C,placeholder:d,disabled:s,readOnly:l,...v})})},i0=({rules:e,...o})=>o2(V,{Component:l3,defaultValue:"",inputProps:o,rules:e});l3.Controller=i0;import N0 from"color";import{useCallback as E0,useEffect as A0,useMemo as Z3,useRef as D0,useState as F3}from"react";import{HexAlphaColorPicker as O0,HexColorInput as B0}from"react-colorful";import z0 from"use-eye-dropper";import i2 from"styled-components";import{createContext as b0,useCallback as g3,useContext as L0,useRef as x0,useState as h3}from"react";import{styled as m3}from"styled-components";import{useLayoutEffect as g0,useRef as h0}from"react";import{forwardRef as l0,useMemo as s0}from"react";import{createPortal as c0}from"react-dom";var d0=({children:e,id:o})=>{let t=s0(()=>crypto.randomUUID(),[]),r=S2(`${o}-${t}`);return r===null?null:c0(e,r)},s3=l0(d0);import{useMemo as C0}from"react";import{useTheme as m0}from"styled-components";import t2 from"styled-components";var c3=t2.section`
567
567
  position: fixed;
568
568
  z-index: 1001;
569
569
  pointer-events: none;
570
- `,c3=t2.section`
570
+ `,d3=t2.section`
571
571
  background: ${e=>e.theme.colors.background.paper};
572
572
  pointer-events: initial;
573
573
 
@@ -590,7 +590,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
590
590
  opacity: 0;
591
591
  }
592
592
  }
593
- `,d3=t2.section`
593
+ `,p3=t2.section`
594
594
  position: fixed;
595
595
  width: 100%;
596
596
  height: 100%;
@@ -626,7 +626,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
626
626
  transform: translateY(-10px);
627
627
  }
628
628
  }
629
- `;import{jsx as p0}from"react/jsx-runtime";var d0=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(d0||{}),p3=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=c0(),i=R({"backdrop-close":a==="CLOSING"||a==="CLOSED"}),c=s0(()=>({opaque:{background:`${n.colors.background.paper}${(e*255).toString(16)}`},transparent:{background:"transparent"},blur:{background:`${n.colors.background.paper}${(e*255).toString(16)}`,backdropFilter:"blur(5px)"},none:{display:"none"}})[o]??{},[o,n.colors.background.paper,e]);return o==="none"?null:p0(d3,{tabIndex:-1,onClick:r,className:i,style:{zIndex:t,...c}})};import{jsx as r2,jsxs as u0}from"react/jsx-runtime";var K=({id:e,children:o,isOpen:t,onClose:r,className:a="",style:n={},rootStyle:i={},animation:c="fade-down",closeAnimationClassName:l="modal-close",modalRef:s,closeOnClickOutside:d,transitionDuration:C=300,windowOffset:m=10,offset:u=20,position:g,containerRef:h,zIndex:y=1e3,...b})=>{let L=m0(null),{openModal:x,closeModal:S,modalState:v,isVisible:$}=M2({modalRef:s??L,containerRef:h,closeOnClickOutside:d,offset:u,windowOffset:m,position:g,transitionDuration:C,onClose:r}),H=R({[a]:!0,[`animation-${c}`]:!!c&&c!=="none",[l]:v==="CLOSING"||v==="CLOSED"});return C0(()=>{v==="CLOSED"&&t?x():v==="OPEN"&&!t&&S()},[t,x,S,v]),$?u0(C3,{id:`modal-${e}`,children:[r2(p3,{...b,modalState:v,zIndex:y}),r2(s3,{ref:s??L,style:{maxWidth:`calc(100dvw - ${m*2}px)`,maxHeight:`calc(100dvh - ${m*2}px)`,...i,zIndex:+y+1},children:r2(c3,{style:n,className:H,children:o})})]}):null};var u3=m3(K)`
629
+ `;import{jsx as f0}from"react/jsx-runtime";var u0=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(u0||{}),C3=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=m0(),i=R({"backdrop-close":a==="CLOSING"||a==="CLOSED"}),c=C0(()=>({opaque:{background:`${n.colors.background.paper}${(e*255).toString(16)}`},transparent:{background:"transparent"},blur:{background:`${n.colors.background.paper}${(e*255).toString(16)}`,backdropFilter:"blur(5px)"},none:{display:"none"}})[o]??{},[o,n.colors.background.paper,e]);return o==="none"?null:f0(p3,{tabIndex:-1,onClick:r,className:i,style:{zIndex:t,...c}})};import{jsx as r2,jsxs as y0}from"react/jsx-runtime";var K=({id:e,children:o,isOpen:t,onClose:r,className:a="",style:n={},rootStyle:i={},animation:c="fade-down",closeAnimationClassName:l="modal-close",modalRef:s,closeOnClickOutside:d,transitionDuration:C=300,windowOffset:m=10,offset:u=20,position:g,containerRef:h,zIndex:y=1e3,...b})=>{let L=h0(null),{openModal:x,closeModal:S,modalState:v,isVisible:$}=M2({modalRef:s??L,containerRef:h,closeOnClickOutside:d,offset:u,windowOffset:m,position:g,transitionDuration:C,onClose:r}),H=R({[a]:!0,[`animation-${c}`]:!!c&&c!=="none",[l]:v==="CLOSING"||v==="CLOSED"});return g0(()=>{v==="CLOSED"&&t?x():v==="OPEN"&&!t&&S()},[t,x,S,v]),$?y0(s3,{id:`modal-${e}`,children:[r2(C3,{...b,modalState:v,zIndex:y}),r2(c3,{ref:s??L,style:{maxWidth:`calc(100dvw - ${m*2}px)`,maxHeight:`calc(100dvh - ${m*2}px)`,...i,zIndex:+y+1},children:r2(d3,{style:n,className:H,children:o})})]}):null};var u3=m3(K)`
630
630
  background: transparent;
631
631
 
632
632
  .modal-content {
@@ -736,7 +736,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
736
736
  top: 15px;
737
737
  }
738
738
  }
739
- `;import{jsx as _,jsxs as L0}from"react/jsx-runtime";var y3=f0(null),y0=()=>{let e=g0(y3);if(!e)throw new Error("useActionModalContext must be used within a ActionModal");return e},x1=({children:e,isOpen:o,onClose:t,actionRequired:r,icon:a,noCloseButton:n,lineOnTop:i=!1,backCard:c=!1,noPadding:l=!1,className:s="",style:d={},...C})=>{let[m,u]=h3(!1),g=h0(null),h=g3(()=>{g.current?.classList.add("shake-animation"),setTimeout(()=>{g.current?.classList.remove("shake-animation")},500)},[]),y=R({"back-card":c,"line-on-top":i,"no-padding":l});return _(y3.Provider,{value:{onClose:t,isActionInProgress:m,setIsActionInProgress:u},children:_(u3,{id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...C,backdropOnClick:r?h:t,position:"center",children:_("section",{ref:g,className:"modal-content",children:L0(f3,{className:y,children:[!n&&!r&&_("section",{className:"close-modal-button",onClick:()=>t(),children:_(T,{name:"cross",inCircle:!0,scale:2})}),a?_(M,{variant:"header4",className:"action-modal-icon",children:_(T,{name:a})}):null,_("section",{className:"action-modal-body",children:_("section",{className:`action-modal-content ${s}`,style:d,children:e})})]})})})})},b0=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=y0(),[c,l]=h3(!1),s=g3(()=>{l(!0),i(!0);let d=e();d instanceof Promise?d.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[e,a,i]);return!c&&n?null:_(_2,{...r,onClick:s,isLoading:t||c,children:o})};x1.ActionButton=b0;import{useMemo as S0}from"react";import x0 from"styled-components";var b3=x0(K)`
739
+ `;import{jsx as _,jsxs as v0}from"react/jsx-runtime";var y3=b0(null),S0=()=>{let e=L0(y3);if(!e)throw new Error("useActionModalContext must be used within a ActionModal");return e},x1=({children:e,isOpen:o,onClose:t,actionRequired:r,icon:a,noCloseButton:n,lineOnTop:i=!1,backCard:c=!1,noPadding:l=!1,className:s="",style:d={},...C})=>{let[m,u]=h3(!1),g=x0(null),h=g3(()=>{g.current?.classList.add("shake-animation"),setTimeout(()=>{g.current?.classList.remove("shake-animation")},500)},[]),y=R({"back-card":c,"line-on-top":i,"no-padding":l});return _(y3.Provider,{value:{onClose:t,isActionInProgress:m,setIsActionInProgress:u},children:_(u3,{id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...C,backdropOnClick:r?h:t,position:"center",children:_("section",{ref:g,className:"modal-content",children:v0(f3,{className:y,children:[!n&&!r&&_("section",{className:"close-modal-button",onClick:()=>t(),children:_(T,{name:"cross",inCircle:!0,scale:2})}),a?_(M,{variant:"header4",className:"action-modal-icon",children:_(T,{name:a})}):null,_("section",{className:"action-modal-body",children:_("section",{className:`action-modal-content ${s}`,style:d,children:e})})]})})})})},R0=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=S0(),[c,l]=h3(!1),s=g3(()=>{l(!0),i(!0);let d=e();d instanceof Promise?d.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[e,a,i]);return!c&&n?null:_(_2,{...r,onClick:s,isLoading:t||c,children:o})};x1.ActionButton=R0;import{useMemo as M0}from"react";import T0 from"styled-components";var b3=T0(K)`
740
740
  color: ${e=>e.theme.colors.text.main};
741
741
  overflow: auto;
742
742
  height: 100%;
@@ -819,7 +819,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
819
819
  transform: translate(0, calc(-50% + 2px));
820
820
  }
821
821
  }
822
- `;import{jsx as n2,jsxs as R0}from"react/jsx-runtime";var C7=({children:e,isOpen:o,onClose:t,position:r="left",size:a,className:n="",...i})=>{let c=S0(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return R0(b3,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:`${n} ${r}`,rootStyle:c,backdropOnClick:t,position:r,...i,children:[n2("span",{className:"close-modal-button",onClick:t,children:n2(T,{name:"cross"})}),n2("section",{className:"aside-modal-content",children:e})]})};import{styled as v0}from"styled-components";var L3=v0.section`
822
+ `;import{jsx as n2,jsxs as w0}from"react/jsx-runtime";var h7=({children:e,isOpen:o,onClose:t,position:r="left",size:a,className:n="",...i})=>{let c=M0(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return w0(b3,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:`${n} ${r}`,rootStyle:c,backdropOnClick:t,position:r,...i,children:[n2("span",{className:"close-modal-button",onClick:t,children:n2(T,{name:"cross"})}),n2("section",{className:"aside-modal-content",children:e})]})};import{styled as $0}from"styled-components";var L3=$0.section`
823
823
  display: grid;
824
824
  max-width: 450px;
825
825
  gap: 1em;
@@ -833,7 +833,32 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
833
833
  justify-content: center;
834
834
  gap: 1em;
835
835
  }
836
- `;import{jsx as S1,jsxs as x3}from"react/jsx-runtime";var x7=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...c})=>S1(x1,{...c,backCard:!0,children:x3(L3,{children:[S1(M,{variant:"header4",children:e}),S1("section",{children:n}),x3("section",{className:"confirmation-modal-actions",children:[!i&&S1(x1.ActionButton,{variant:"ghost",onClick:t,children:a}),S1(x1.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});import{useCallback as T0,useMemo as M0}from"react";import S3 from"styled-components";var R3=S3(K)`
836
+ `;import{jsx as S1,jsxs as x3}from"react/jsx-runtime";var M7=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...c})=>S1(x1,{...c,backCard:!0,children:x3(L3,{children:[S1(M,{variant:"header4",children:e}),S1("section",{children:n}),x3("section",{className:"confirmation-modal-actions",children:[!i&&S1(x1.ActionButton,{variant:"ghost",onClick:t,children:a}),S1(x1.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});import{useCallback as H0,useMemo as V0}from"react";import{useEffect as P0}from"react";import S3 from"styled-components";var k7=S3.section`
837
+ display: grid;
838
+ gap: 1em;
839
+ `,R3=S3.section`
840
+ display: grid;
841
+ place-content: start center;
842
+ place-items: start center;
843
+
844
+ .loading {
845
+ width: 100%;
846
+ height: 30px;
847
+ display: grid;
848
+ place-content: center;
849
+
850
+ &--icon {
851
+ animation: spin 0.5s linear infinite;
852
+ font-size: 20px;
853
+ }
854
+ }
855
+
856
+ .empty-message {
857
+ font-size: 0.8em;
858
+ text-align: center;
859
+ color: #a6a6a6;
860
+ }
861
+ `;import{Fragment as k0,jsx as a2,jsxs as v3}from"react/jsx-runtime";var T3=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,data:r=[],renderItem:a,customLoadMoreElement:n,emptyMessage:i,children:c})=>{let{ref:l,inView:s}=R2(),d=L2(e,100);return P0(()=>{o&&s&&!d&&t()},[o,d,t,s]),v3(k0,{children:[c,r.map(a),v3(R3,{children:[!!i&&r.length===0&&!d&&a2("p",{className:"empty-message",children:i}),(o||d)&&(n?n(l):a2("section",{ref:l,className:"loading",children:d&&a2(T,{name:"spinner",className:"loading--icon"})}))]})]})};import M3 from"styled-components";var w3=M3(K)`
837
862
  border-radius: 0.5em;
838
863
  border: 1px solid ${e=>e.theme.colors.border.main};
839
864
  background: ${e=>e.theme.colors.background.main};
@@ -855,7 +880,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
855
880
  margin: 0.4em 0;
856
881
  color: ${e=>e.theme.colors.border.main};
857
882
  }
858
- `,v3=S3.li`
883
+ `,$3=M3.li`
859
884
  padding: 0.1em 0.5em;
860
885
  border-radius: 0.3em;
861
886
  border: 1px solid transparent;
@@ -888,7 +913,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
888
913
  &:hover {
889
914
  border: 1px solid ${e=>e.theme.colors.border.main};
890
915
  }
891
- `;import{Fragment as T3,jsx as j,jsxs as M3}from"react/jsx-runtime";var w0=({children:e,label:o="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:c="",style:l={},onClick:s=()=>null,onKeyDown:d=()=>null})=>{let C=R({[c]:!0,"is-disabled":n,"is-selected":i}),m=T0(g=>{g.stopPropagation(),n||s(!i)},[n,s,i]),u=M0(()=>e||(t?j(p1,{className:"menu-checkbox",disabled:n,value:i,setValue:g=>s(g),name:"option",label:M3(T3,{children:[r!==void 0&&j(T,{className:"option-icon",name:r}),j(M,{variant:"label",children:o})]})}):M3(T3,{children:[r!==void 0&&j(T,{className:"option-icon",name:r}),j(M,{variant:"label",children:o})]})),[t,e,n,r,o,s,i]);return j(v3,{id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:m,onKeyDown:d,className:C,style:l,children:u})},t1=({children:e,isOpen:o,onClose:t,id:r,...a})=>j(R3,{...a,id:`menu-${r}`,isOpen:o,onClose:t,children:e});t1.Option=w0;var $0=()=>j(V1,{className:"divider"});t1.Divider=$0;var P0=({className:e="",style:o={},...t})=>j("ul",{className:`menu-content ${e}`,role:"listbox",style:o,children:j(w3,{...t})});t1.OptionsGroup=P0;import{forwardRef as k0,useMemo as H0}from"react";import{createPortal as V0}from"react-dom";var I0=({children:e,id:o},t)=>{let r=H0(()=>crypto.randomUUID(),[]),a=S2(`${o}-${r}`,t);return V0(e,a)},C3=k0(I0);var $3=a2.section`
916
+ `;import{Fragment as P3,jsx as j,jsxs as k3}from"react/jsx-runtime";var I0=({children:e,label:o="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:c="",style:l={},onClick:s=()=>null,onKeyDown:d=()=>null})=>{let C=R({[c]:!0,"is-disabled":n,"is-selected":i}),m=H0(g=>{g.stopPropagation(),n||s(!i)},[n,s,i]),u=V0(()=>e||(t?j(p1,{className:"menu-checkbox",disabled:n,value:i,setValue:g=>s(g),name:"option",label:k3(P3,{children:[r!==void 0&&j(T,{className:"option-icon",name:r}),j(M,{variant:"label",children:o})]})}):k3(P3,{children:[r!==void 0&&j(T,{className:"option-icon",name:r}),j(M,{variant:"label",children:o})]})),[t,e,n,r,o,s,i]);return j($3,{id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:m,onKeyDown:d,className:C,style:l,children:u})},t1=({children:e,isOpen:o,onClose:t,id:r,...a})=>j(w3,{...a,id:`menu-${r}`,isOpen:o,onClose:t,children:e});t1.Option=I0;var Z0=()=>j(V1,{className:"divider"});t1.Divider=Z0;var F0=({className:e="",style:o={},...t})=>j("ul",{className:`menu-content ${e}`,role:"listbox",style:o,children:j(T3,{...t})});t1.OptionsGroup=F0;var H3=i2.section`
892
917
  display: grid;
893
918
  grid-auto-flow: column;
894
919
  align-items: center;
@@ -906,7 +931,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
906
931
  font-size: ${e=>e.theme.constants.typography.label.fontSize};
907
932
  font-family: ${e=>e.theme.constants.fontFamily};
908
933
  }
909
- `,P3=a2.section`
934
+ `,V3=i2.section`
910
935
  background: white;
911
936
  border-radius: 5px;
912
937
  border: 2px solid;
@@ -926,7 +951,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
926
951
  background: repeating-conic-gradient(#cccccc 0% 25%, white 0% 50%) 50% / 8px 8px;
927
952
  z-index: -1;
928
953
  }
929
- `,k3=a2(K)`
954
+ `,I3=i2(K)`
930
955
  display: grid;
931
956
  gap: 10px;
932
957
  background: ${e=>e.theme.colors.background.main};
@@ -973,10 +998,10 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
973
998
  letter-spacing: 2px;
974
999
  text-align: center;
975
1000
  }
976
- `;import{jsx as r1,jsxs as N1}from"react/jsx-runtime";var I3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,...b})=>{let{open:L,isSupported:x}=O0(),[S,v]=V3(o),$=H3(()=>crypto.randomUUID(),[]),H=E0(null),[A,O]=V3(!1),{handlers:i1,isFocus:l1}=F({onChange:Z=>v(Z.target.value),onBlur:Z=>{X(),r&&r(Z)},onFocus:Z=>{X(),a&&a(Z)}}),P=H3(()=>{let Z=Z0(o===""?"#000000":o);return Z.isLight()||Z.alpha()<.5?"#000000":"#FFFFFF"},[o]),N=async()=>{let{sRGBHex:Z}=await L();t(Z)};N0(()=>{v(o)},[o]);let X=F0(()=>{S.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(S):v(o)},[S,t,o]);return N1(z,{id:$,error:y,isFocus:l1,...b,children:[N1($3,{onClick:()=>O(!0),ref:H,children:[r1(P3,{className:i,style:{borderColor:P,background:o,color:o,...c}}),n?r1("input",{id:$,name:e,value:S,placeholder:C,readOnly:s,autoFocus:l,disabled:d,autoComplete:m,className:"color-input",...i1}):null]}),N1(k3,{id:"input-color",isOpen:A,onClose:()=>O(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:H,children:[r1(A0,{id:$,color:o,onChange:t}),N1("section",{className:"color-input-container",children:[x()?r1(T,{name:"dropper",onClick:()=>{N()}}):r1("span",{}),r1(D0,{className:"color-input",id:$,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),r1("span",{})]})]})]})},B0=({rules:e,...o})=>r1(V,{Component:I3,defaultValue:"#147EFB",inputProps:o,rules:e});I3.Controller=B0;import{useEffect as X0,useMemo as B3,useState as W0}from"react";import{createElement as z0}from"react";var R1=({tag:e="section",children:o,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:c,row:l,pc:s,pi:d,ps:C,jc:m,ji:u,js:g,ac:h,ai:y,as:b,gtc:L,gtr:x,gta:S,gt:v,gap:$,...H})=>z0(e,{className:t,...H,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...c?{gridColumn:c}:{},...l?{gridRow:l}:{},...s?{placeContent:s}:{},...d?{placeItems:d}:{},...C?{placeSelf:C}:{},...m?{justifyContent:m}:{},...u?{justifyItems:u}:{},...g?{justifySelf:g}:{},...h?{alignContent:h}:{},...y?{alignItems:y}:{},...b?{alignSelf:b}:{},...L?{gridTemplateColumns:L}:{},...x?{gridTemplateRows:x}:{},...S?{gridTemplateAreas:S}:{},...v?{gridTemplate:v}:{},...$?{gap:$}:{},display:"grid"}},o);import{createElement as U0}from"react";var c9=({tag:e="section",children:o,className:t,style:r,direction:a,wrap:n,basis:i,grow:c,shrink:l,flow:s,pc:d,pi:C,ps:m,jc:u,ji:g,js:h,ac:y,ai:b,as:L,gap:x})=>U0(e,{className:t,style:{...r,...a?{flexDirection:a}:{},...n?{flexWrap:n}:{},...i?{flexBasis:i}:{},...c?{flexGrow:c}:{},...l?{flexShrink:l}:{},...s?{flexFlow:s}:{},...d?{placeContent:d}:{},...C?{placeItems:C}:{},...m?{placeSelf:m}:{},...u?{justifyContent:u}:{},...g?{justifyItems:g}:{},...h?{justifySelf:h}:{},...y?{alignContent:y}:{},...b?{alignItems:b}:{},...L?{alignSelf:L}:{},...x?{gap:x}:{},display:"flex"}},o);import{forwardRef as G0}from"react";import{styled as Z3}from"styled-components";var F3=Z3.section`
1001
+ `;import{jsx as r1,jsxs as N1}from"react/jsx-runtime";var N3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:c={},autoFocus:l=!1,readOnly:s=!1,disabled:d=!1,placeholder:C="",autoComplete:m="off",isDirty:u=!1,isTouched:g=!1,invalid:h=!1,error:y,...b})=>{let{open:L,isSupported:x}=z0(),[S,v]=F3(o),$=Z3(()=>crypto.randomUUID(),[]),H=D0(null),[A,O]=F3(!1),{handlers:i1,isFocus:l1}=F({onChange:Z=>v(Z.target.value),onBlur:Z=>{X(),r&&r(Z)},onFocus:Z=>{X(),a&&a(Z)}}),P=Z3(()=>{let Z=N0(o===""?"#000000":o);return Z.isLight()||Z.alpha()<.5?"#000000":"#FFFFFF"},[o]),N=async()=>{let{sRGBHex:Z}=await L();t(Z)};A0(()=>{v(o)},[o]);let X=E0(()=>{S.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(S):v(o)},[S,t,o]);return N1(z,{id:$,error:y,isFocus:l1,...b,children:[N1(H3,{onClick:()=>O(!0),ref:H,children:[r1(V3,{className:i,style:{borderColor:P,background:o,color:o,...c}}),n?r1("input",{id:$,name:e,value:S,placeholder:C,readOnly:s,autoFocus:l,disabled:d,autoComplete:m,className:"color-input",...i1}):null]}),N1(I3,{id:"input-color",isOpen:A,onClose:()=>O(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:H,children:[r1(O0,{id:$,color:o,onChange:t}),N1("section",{className:"color-input-container",children:[x()?r1(T,{name:"dropper",onClick:()=>{N()}}):r1("span",{}),r1(B0,{className:"color-input",id:$,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),r1("span",{})]})]})]})},U0=({rules:e,...o})=>r1(V,{Component:N3,defaultValue:"#147EFB",inputProps:o,rules:e});N3.Controller=U0;import{useEffect as K0,useMemo as G3,useState as _0}from"react";import{createElement as G0}from"react";var R1=({tag:e="section",children:o,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:c,row:l,pc:s,pi:d,ps:C,jc:m,ji:u,js:g,ac:h,ai:y,as:b,gtc:L,gtr:x,gta:S,gt:v,gap:$,...H})=>G0(e,{className:t,...H,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...c?{gridColumn:c}:{},...l?{gridRow:l}:{},...s?{placeContent:s}:{},...d?{placeItems:d}:{},...C?{placeSelf:C}:{},...m?{justifyContent:m}:{},...u?{justifyItems:u}:{},...g?{justifySelf:g}:{},...h?{alignContent:h}:{},...y?{alignItems:y}:{},...b?{alignSelf:b}:{},...L?{gridTemplateColumns:L}:{},...x?{gridTemplateRows:x}:{},...S?{gridTemplateAreas:S}:{},...v?{gridTemplate:v}:{},...$?{gap:$}:{},display:"grid"}},o);import{createElement as Y0}from"react";var S9=({tag:e="section",children:o,className:t,style:r,direction:a,wrap:n,basis:i,grow:c,shrink:l,flow:s,pc:d,pi:C,ps:m,jc:u,ji:g,js:h,ac:y,ai:b,as:L,gap:x})=>Y0(e,{className:t,style:{...r,...a?{flexDirection:a}:{},...n?{flexWrap:n}:{},...i?{flexBasis:i}:{},...c?{flexGrow:c}:{},...l?{flexShrink:l}:{},...s?{flexFlow:s}:{},...d?{placeContent:d}:{},...C?{placeItems:C}:{},...m?{placeSelf:m}:{},...u?{justifyContent:u}:{},...g?{justifyItems:g}:{},...h?{justifySelf:h}:{},...y?{alignContent:y}:{},...b?{alignItems:b}:{},...L?{alignSelf:L}:{},...x?{gap:x}:{},display:"flex"}},o);import{forwardRef as X0}from"react";import{styled as E3}from"styled-components";var A3=E3.section`
977
1002
  display: grid;
978
1003
  padding: ${e=>e.$padding};
979
- `,N3=Z3.section`
1004
+ `,D3=E3.section`
980
1005
  max-width: ${e=>e.theme.constants.breakpoints.laptopL};
981
1006
  width: 100%;
982
1007
  margin: 0 auto;
@@ -985,7 +1010,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
985
1010
  min-height: ${e=>e.theme.constants.sectionMinHeight};
986
1011
  display: grid;
987
1012
  }
988
- `;import{jsx as E3}from"react/jsx-runtime";var Y0=({children:e,className:o="",contentClassName:t="",style:r={},padding:a="0 2em",fitHeightContent:n=!1,alignContent:i="center"},c)=>{let l=R({[t]:!!t,"section-layout-min-height":!n});return E3(F3,{ref:c,className:o,style:r,$padding:a,children:E3(N3,{className:l,style:{alignContent:!n&&i||void 0},children:e})})},h9=G0(Y0);import A3 from"styled-components";var D3=A3.section`
1013
+ `;import{jsx as O3}from"react/jsx-runtime";var W0=({children:e,className:o="",contentClassName:t="",style:r={},padding:a="0 2em",fitHeightContent:n=!1,alignContent:i="center"},c)=>{let l=R({[t]:!!t,"section-layout-min-height":!n});return O3(A3,{ref:c,className:o,style:r,$padding:a,children:O3(D3,{className:l,style:{alignContent:!n&&i||void 0},children:e})})},k9=X0(W0);import B3 from"styled-components";var z3=B3.section`
989
1014
  display: grid;
990
1015
  gap: 10px;
991
1016
 
@@ -1074,7 +1099,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1074
1099
  }
1075
1100
  }
1076
1101
  }
1077
- `,O3=A3.section`
1102
+ `,U3=B3.section`
1078
1103
  display: grid;
1079
1104
  grid-template-columns: 35px 1fr 35px;
1080
1105
  gap: 1em;
@@ -1123,13 +1148,13 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1123
1148
  color: ${e=>e.theme.colors.primary.contrast};
1124
1149
  }
1125
1150
  }
1126
- `;import{Fragment as _0,jsx as D,jsxs as Q}from"react/jsx-runtime";var z3=({name:e,value:o={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="Click to upload or drag and drop",autoComplete:C="off",accept:m,multiple:u=!1,limitSize:g=5e6,errorTimeout:h=3e3,label:y})=>{let[b,L]=W0(null),x=B3(()=>crypto.randomUUID(),[]),{handlers:S}=F({onBlur:r,onFocus:a,onChange:P=>{let{files:N}=P.target;N&&v(N)}});X0(()=>{let P=null;return b!==null&&(P=setTimeout(()=>{L(null)},h)),()=>{P!==null&&clearTimeout(P)}},[b,h]);let v=P=>{let N=u?{...o}:{},X=u?P.length:1;for(let Z=0;Z<X;Z++){let w=P.item(Z);w&&(w.size<g?N[w.name]=w:L(`File '${w.name}' size is larger than ${m1(g)}`))}t(N)},$=P=>{P.preventDefault(),P.stopPropagation(),P.dataTransfer.files&&P.dataTransfer.files.length&&v(P.dataTransfer.files)},H=P=>({"image/png":"download","application/pdf":"download"})[P]??"warning",A=P=>{let N={...o};delete N[P.name],t(N)},O=()=>{t({})},i1=B3(()=>Object.values(o).reduce((P,{size:N})=>P+N,0),[o]),l1=(P,N)=>Q(O3,{children:[D("section",{className:"file-card--image",children:D(T,{name:H(P.type)})}),Q(R1,{children:[D(M,{variant:"label",noPadding:!0,nowrap:!0,children:P.name}),D(M,{noPadding:!0,variant:"small",children:m1(P.size)})]}),D("section",{className:"file-card--delete",onClick:()=>A(P),children:D(T,{name:"trash-can"})})]},N);return Q(D3,{children:[!!y&&D(M,{variant:"label-form",htmlFor:x,noPadding:!0,children:y}),Q("section",{className:"input-file--box",onDrop:$,children:[D("section",{className:"input-file--box--icon",children:D(T,{name:"magnifying-glass"})}),Q(R1,{children:[D(M,{variant:"label-form",htmlFor:x,noPadding:!0,weight:"bold",children:d}),Q(M,{variant:"small",noPadding:!0,children:["Max size (",m1(g),")"]})]}),D("input",{id:x,type:"file",name:e,value:"",placeholder:d,readOnly:l,autoFocus:c,disabled:s,autoComplete:C,className:n,style:i,accept:m,multiple:u,title:"",...S})]}),b!==null&&D(M,{variant:"small",noPadding:!0,className:"error",children:b}),Object.keys(o).length>0&&Q(_0,{children:[u&&Q("span",{className:"total-info",children:[Q(M,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",m1(i1)]}),D("span",{className:"total-info--delete",onClick:O,children:D(T,{name:"trash-can"})})]}),D("section",{className:"input-file--files",children:D("section",{className:"input-file--files--content",children:Object.values(o).map(l1)})})]})]})},K0=({rules:e,...o})=>D(V,{Component:z3,defaultValue:{},inputProps:o,rules:e});z3.Controller=K0;import{useMemo as j0}from"react";import{useTheme as q0}from"styled-components";import i2 from"styled-components";var v1=i2.section`
1151
+ `;import{Fragment as q0,jsx as D,jsxs as Q}from"react/jsx-runtime";var Y3=({name:e,value:o={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="Click to upload or drag and drop",autoComplete:C="off",accept:m,multiple:u=!1,limitSize:g=5e6,errorTimeout:h=3e3,label:y})=>{let[b,L]=_0(null),x=G3(()=>crypto.randomUUID(),[]),{handlers:S}=F({onBlur:r,onFocus:a,onChange:P=>{let{files:N}=P.target;N&&v(N)}});K0(()=>{let P=null;return b!==null&&(P=setTimeout(()=>{L(null)},h)),()=>{P!==null&&clearTimeout(P)}},[b,h]);let v=P=>{let N=u?{...o}:{},X=u?P.length:1;for(let Z=0;Z<X;Z++){let w=P.item(Z);w&&(w.size<g?N[w.name]=w:L(`File '${w.name}' size is larger than ${m1(g)}`))}t(N)},$=P=>{P.preventDefault(),P.stopPropagation(),P.dataTransfer.files&&P.dataTransfer.files.length&&v(P.dataTransfer.files)},H=P=>({"image/png":"download","application/pdf":"download"})[P]??"warning",A=P=>{let N={...o};delete N[P.name],t(N)},O=()=>{t({})},i1=G3(()=>Object.values(o).reduce((P,{size:N})=>P+N,0),[o]),l1=(P,N)=>Q(U3,{children:[D("section",{className:"file-card--image",children:D(T,{name:H(P.type)})}),Q(R1,{children:[D(M,{variant:"label",noPadding:!0,nowrap:!0,children:P.name}),D(M,{noPadding:!0,variant:"small",children:m1(P.size)})]}),D("section",{className:"file-card--delete",onClick:()=>A(P),children:D(T,{name:"trash-can"})})]},N);return Q(z3,{children:[!!y&&D(M,{variant:"label-form",htmlFor:x,noPadding:!0,children:y}),Q("section",{className:"input-file--box",onDrop:$,children:[D("section",{className:"input-file--box--icon",children:D(T,{name:"magnifying-glass"})}),Q(R1,{children:[D(M,{variant:"label-form",htmlFor:x,noPadding:!0,weight:"bold",children:d}),Q(M,{variant:"small",noPadding:!0,children:["Max size (",m1(g),")"]})]}),D("input",{id:x,type:"file",name:e,value:"",placeholder:d,readOnly:l,autoFocus:c,disabled:s,autoComplete:C,className:n,style:i,accept:m,multiple:u,title:"",...S})]}),b!==null&&D(M,{variant:"small",noPadding:!0,className:"error",children:b}),Object.keys(o).length>0&&Q(q0,{children:[u&&Q("span",{className:"total-info",children:[Q(M,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",m1(i1)]}),D("span",{className:"total-info--delete",onClick:O,children:D(T,{name:"trash-can"})})]}),D("section",{className:"input-file--files",children:D("section",{className:"input-file--files--content",children:Object.values(o).map(l1)})})]})]})},j0=({rules:e,...o})=>D(V,{Component:Y3,defaultValue:{},inputProps:o,rules:e});Y3.Controller=j0;import{useMemo as Q0}from"react";import{useTheme as J0}from"styled-components";import l2 from"styled-components";var v1=l2.section`
1127
1152
  transition: all 200ms ease-out;
1128
1153
  border-radius: inherit;
1129
1154
  margin: auto;
1130
1155
  width: 0;
1131
1156
  height: 0;
1132
- `,T1=i2.section`
1157
+ `,T1=l2.section`
1133
1158
  border-radius: 50%;
1134
1159
  background: ${e=>e.theme.colors.background.paper};
1135
1160
  transition: all 300ms ease;
@@ -1150,7 +1175,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1150
1175
  opacity: 0;
1151
1176
  z-index: 1;
1152
1177
  }
1153
- `,U3=i2.section`
1178
+ `,X3=l2.section`
1154
1179
  display: flex;
1155
1180
  align-items: center;
1156
1181
  gap: 1em;
@@ -1191,7 +1216,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1191
1216
  }
1192
1217
  }
1193
1218
  }
1194
- `;import{jsx as E1,jsxs as G3}from"react/jsx-runtime";var Q0=(e,o)=>{let t={primary:e.colors.primary.main,secondary:e.colors.secondary.main,tertiary:e.colors.tertiary.main,info:e.colors.info.main,active:e.colors.active.main,warning:e.colors.warning.main,alert:e.colors.alert.main};return t[o]??t.primary},Y3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,autoComplete:d="off",radioValue:C,label:m,color:u="primary"})=>{let g=q0(),h=j0(()=>crypto.randomUUID(),[]),{handlers:y}=F({onChange:b=>t(b.target.value),onBlur:r,onFocus:a});return G3(U3,{$color:Q0(g,u),className:n,style:i,children:[G3(T1,{className:C===o?"is-checked":"",children:[E1(v1,{}),E1("input",{id:h,type:"radio",name:e,className:`radio-input ${n}`,style:i,value:C,checked:C===o,autoFocus:c,autoComplete:d,disabled:s||l,...y})]}),m?E1(M,{variant:"label-form",htmlFor:h,className:"radio-label",children:m}):null]})},J0=({rules:e,...o})=>E1(V,{Component:Y3,defaultValue:"",inputProps:o,rules:e});Y3.Controller=J0;import{useCallback as J,useMemo as Q3,useRef as ro,useState as no}from"react";import{useCallback as M1,useEffect as eo,useRef as _3,useState as j3}from"react";import{useTheme as oo}from"styled-components";import l2 from"styled-components";var X3=l2.section`
1219
+ `;import{jsx as E1,jsxs as W3}from"react/jsx-runtime";var eo=(e,o)=>{let t={primary:e.colors.primary.main,secondary:e.colors.secondary.main,tertiary:e.colors.tertiary.main,info:e.colors.info.main,active:e.colors.active.main,warning:e.colors.warning.main,alert:e.colors.alert.main};return t[o]??t.primary},K3=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,autoComplete:d="off",radioValue:C,label:m,color:u="primary"})=>{let g=J0(),h=Q0(()=>crypto.randomUUID(),[]),{handlers:y}=F({onChange:b=>t(b.target.value),onBlur:r,onFocus:a});return W3(X3,{$color:eo(g,u),className:n,style:i,children:[W3(T1,{className:C===o?"is-checked":"",children:[E1(v1,{}),E1("input",{id:h,type:"radio",name:e,className:`radio-input ${n}`,style:i,value:C,checked:C===o,autoFocus:c,autoComplete:d,disabled:s||l,...y})]}),m?E1(M,{variant:"label-form",htmlFor:h,className:"radio-label",children:m}):null]})},oo=({rules:e,...o})=>E1(V,{Component:K3,defaultValue:"",inputProps:o,rules:e});K3.Controller=oo;import{useCallback as J,useMemo as oe,useRef as ao,useState as io}from"react";import{useCallback as M1,useEffect as to,useRef as Q3,useState as J3}from"react";import{useTheme as ro}from"styled-components";import s2 from"styled-components";var _3=s2.section`
1195
1220
  cursor: pointer;
1196
1221
 
1197
1222
  .icon-close {
@@ -1246,7 +1271,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1246
1271
  color: #919191;
1247
1272
  }
1248
1273
  }
1249
- `,W3=l2(t1)`
1274
+ `,j3=s2(t1)`
1250
1275
  overflow-y: auto;
1251
1276
 
1252
1277
  &.search-input {
@@ -1254,7 +1279,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1254
1279
  grid-template-rows: auto 1fr;
1255
1280
  grid-template-columns: 1fr;
1256
1281
  }
1257
- `,K3=l2.section`
1282
+ `,q3=s2.section`
1258
1283
  margin: 5px;
1259
1284
 
1260
1285
  .input-search {
@@ -1264,7 +1289,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1264
1289
  width: 100%;
1265
1290
  border-radius: 4px;
1266
1291
  }
1267
- `;import{jsx as w1,jsxs as to}from"react/jsx-runtime";var q3=({onSearchQuery:e,searchQueryValue:o,value:t,compareValueOrValuesAreEqual:r,searchQueryPlaceholder:a="Search option",multiselect:n=!1,selectOption:i,unselectOption:c,isOpen:l,options:s,loadMore:d=()=>null,isLoading:C=!1,hasNextPage:m=!1,containerRef:u,Component:g,onClose:h,emptyMessage:y="No options to select",maxHeight:b=400})=>{let L=oo(),x=_3(null),S=v2(`(max-width: ${L.constants.breakpoints.mobileL})`),[v,$]=j3(""),H=_3(null),A=M1(w=>{let{value:E}=w.target;e&&e(E),$(E)},[e]);Y("keydown",w=>{if(["ArrowDown","ArrowUp"].includes(w.code)){w.preventDefault();let E=document.activeElement,W=E?.tagName==="LI";if(l&&W)switch(w.code){case"ArrowDown":E?.nextSibling?.focus();break;case"ArrowUp":E?.previousElementSibling?.focus();break}}}),eo(()=>{l&&(H.current?H.current.focus():x.current?.focus())},[l,x]);let O=M1(w=>!!t&&t!==""&&r(w,t),[r,t]),i1=M1(w=>E=>{["Enter"," "].includes(E.key)&&(E.preventDefault(),O(w)&&n?c(w):i(w))},[n,i,O,c]),l1=M1((w,E)=>{let W=O(w);return w1(t1.Option,{id:`${E}`,label:w1(g,{data:w,isSelected:W,multiselect:n}),onClick:O1=>{n?O1?i(w):c(w):i(w)},onKeyDown:i1(w),asCheckbox:n,selected:W},E)},[O,g,n,i1,i,c]),[P,N]=j3("400px"),X=M1(()=>{let w=u.current?.getBoundingClientRect().bottom??0,E=Math.min(window.innerHeight-w-20,b);N(`${Math.round(E)}px`)},[u,b]);x2(u,X),Y("resize",X);let Z=R({"search-input":!!e});return to(W3,{id:"form-select",isOpen:l,onClose:h,backdrop:S?"blur":"opaque",opacity:S?.8:.4,position:S?"center":"bottom",offset:5,transitionDuration:200,containerRef:S?void 0:u,className:Z,style:S?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{maxHeight:P,minHeight:"200px",width:u.current?.offsetWidth??"auto"},rootStyle:S?{}:{},children:[e&&w1(K3,{children:w1("input",{name:"query",className:"input-search",value:o??v,onChange:A,placeholder:a,onClick:w=>w.stopPropagation(),ref:H,autoFocus:!0})}),w1(t1.OptionsGroup,{isLoading:C,hasNextPage:m,loadMore:d,data:s,renderItem:l1,emptyMessage:y})]})};import{jsx as U,jsxs as J3}from"react/jsx-runtime";var s2=({options:e,renderOption:o,isEqualComparator:t,searchQueryValue:r,searchQueryPlaceholder:a,onSearchQuery:n,loadMore:i,isLoading:c,hasNextPage:l,multiselect:s,maxOptions:d,name:C,value:m,setValue:u,onBlur:g,onFocus:h,className:y="",style:b={},showClearOption:L=!1,autoFocus:x=!1,readOnly:S=!1,disabled:v=!1,placeholder:$="",autoComplete:H="off",isDirty:A=!1,isTouched:O=!1,invalid:i1=!1,error:l1,...P})=>{let N=Q3(()=>crypto.randomUUID(),[]),X=ro(null),[Z,w]=no(!1),E=J(k=>{w(!!(k&&!v))},[v]),W=J((k,G)=>["number","string"].includes(typeof k)?k===G:!!t&&t(k,G),[t]),O1=J((k,G)=>G===null?!0:Array.isArray(G)?["number","string"].includes(typeof k)?G.includes(k):G.some(U1=>!!t&&t(k,U1)):W(k,G),[W,t]),B1=J(({data:k})=>U(M,{noPadding:!0,variant:"label",nowrap:!0,children:o(k)}),[o]),b2=J(k=>{if(d){let G=Math.min(d,e.length);return`${k.length}/${G} item${k.length===1?"":"s"} selected`}return`${k.length} item${k.length===1?"":"s"} selected`},[d,e.length]),Je=J(k=>k===null?null:Array.isArray(k)?U(M,{noPadding:!0,nowrap:!0,variant:"label",children:b2(k)}):U(B1,{data:k,isSelected:!1,multiselect:!!s}),[B1,s,b2]),e5=J(k=>{if(s){let G=m.filter(U1=>!W(U1,k));u(G.length===0?[]:G)}else u(null),w(!1)},[W,s,u,m]),o5=J(k=>{if(s){if(d&&Array.isArray(m)&&m.length>=d)return;u([...m,k])}else u(k),w(!1)},[d,s,u,m]),t5=J(k=>{k.stopPropagation(),u(s?[]:null)},[s,u]),z1=Q3(()=>s?m.length>0:!!m,[s,m]);return U(z,{id:N,error:l1,isFocus:Z,onClickLeftIcon:()=>E(!0),onClickRightIcon:()=>E(!0),ref:X,...P,children:J3(X3,{id:C,style:b,onBlur:g,className:`${v?"disabled":""} ${y}`,children:[J3("section",{className:`select-container ${z1&&L?"three-columns":""}`,onClick:()=>E(!0),children:[U("button",{type:"button",className:`input-button ${(Array.isArray(m)?m.length>0:m)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":Z,onFocus:k=>{E(!0),h&&h(k)},children:z1&&Je(m)||U(M,{variant:"label",noPadding:!0,nowrap:!0,children:$})}),z1&&L&&U("section",{className:"icon-close",onClick:t5,children:U(T,{name:"cross"})}),U(T,{name:Z?"caret-up":"caret-down"})]}),U(q3,{containerRef:X,isOpen:Z,onClose:()=>w(!1),value:m,compareValueOrValuesAreEqual:O1,Component:B1,multiselect:s,isLoading:c,hasNextPage:l,loadMore:i,searchQueryValue:r,onSearchQuery:n,searchQueryPlaceholder:a,options:e,selectOption:o5,unselectOption:e5})]})})},ao=({rules:e,...o})=>U(V,{Component:s2,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),io=({rules:e,...o})=>U(V,{Component:s2,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),lo=e=>{let{multiselect:o}=e;return o?U(ao,{...e,multiselect:!0}):U(io,{...e,multiselect:!1})};s2.Controller=lo;import{useMemo as co}from"react";import so from"styled-components";var ee=so.section`
1292
+ `;import{jsx as w1,jsxs as no}from"react/jsx-runtime";var ee=({onSearchQuery:e,searchQueryValue:o,value:t,compareValueOrValuesAreEqual:r,searchQueryPlaceholder:a="Search option",multiselect:n=!1,selectOption:i,unselectOption:c,isOpen:l,options:s,loadMore:d=()=>null,isLoading:C=!1,hasNextPage:m=!1,containerRef:u,Component:g,onClose:h,emptyMessage:y="No options to select",maxHeight:b=400})=>{let L=ro(),x=Q3(null),S=v2(`(max-width: ${L.constants.breakpoints.mobileL})`),[v,$]=J3(""),H=Q3(null),A=M1(w=>{let{value:E}=w.target;e&&e(E),$(E)},[e]);Y("keydown",w=>{if(["ArrowDown","ArrowUp"].includes(w.code)){w.preventDefault();let E=document.activeElement,W=E?.tagName==="LI";if(l&&W)switch(w.code){case"ArrowDown":E?.nextSibling?.focus();break;case"ArrowUp":E?.previousElementSibling?.focus();break}}}),to(()=>{l&&(H.current?H.current.focus():x.current?.focus())},[l,x]);let O=M1(w=>!!t&&t!==""&&r(w,t),[r,t]),i1=M1(w=>E=>{["Enter"," "].includes(E.key)&&(E.preventDefault(),O(w)&&n?c(w):i(w))},[n,i,O,c]),l1=M1((w,E)=>{let W=O(w);return w1(t1.Option,{id:`${E}`,label:w1(g,{data:w,isSelected:W,multiselect:n}),onClick:O1=>{n?O1?i(w):c(w):i(w)},onKeyDown:i1(w),asCheckbox:n,selected:W},E)},[O,g,n,i1,i,c]),[P,N]=J3("400px"),X=M1(()=>{let w=u.current?.getBoundingClientRect().bottom??0,E=Math.min(window.innerHeight-w-20,b);N(`${Math.round(E)}px`)},[u,b]);x2(u,X),Y("resize",X);let Z=R({"search-input":!!e});return no(j3,{id:"form-select",isOpen:l,onClose:h,backdrop:S?"blur":"opaque",opacity:S?.8:.4,position:S?"center":"bottom",offset:5,transitionDuration:200,containerRef:S?void 0:u,className:Z,style:S?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{maxHeight:P,minHeight:"200px",width:u.current?.offsetWidth??"auto"},rootStyle:S?{}:{},children:[e&&w1(q3,{children:w1("input",{name:"query",className:"input-search",value:o??v,onChange:A,placeholder:a,onClick:w=>w.stopPropagation(),ref:H,autoFocus:!0})}),w1(t1.OptionsGroup,{isLoading:C,hasNextPage:m,loadMore:d,data:s,renderItem:l1,emptyMessage:y})]})};import{jsx as U,jsxs as te}from"react/jsx-runtime";var c2=({options:e,renderOption:o,isEqualComparator:t,searchQueryValue:r,searchQueryPlaceholder:a,onSearchQuery:n,loadMore:i,isLoading:c,hasNextPage:l,multiselect:s,maxOptions:d,name:C,value:m,setValue:u,onBlur:g,onFocus:h,className:y="",style:b={},showClearOption:L=!1,autoFocus:x=!1,readOnly:S=!1,disabled:v=!1,placeholder:$="",autoComplete:H="off",isDirty:A=!1,isTouched:O=!1,invalid:i1=!1,error:l1,...P})=>{let N=oe(()=>crypto.randomUUID(),[]),X=ao(null),[Z,w]=io(!1),E=J(k=>{w(!!(k&&!v))},[v]),W=J((k,G)=>["number","string"].includes(typeof k)?k===G:!!t&&t(k,G),[t]),O1=J((k,G)=>G===null?!0:Array.isArray(G)?["number","string"].includes(typeof k)?G.includes(k):G.some(U1=>!!t&&t(k,U1)):W(k,G),[W,t]),B1=J(({data:k})=>U(M,{noPadding:!0,variant:"label",nowrap:!0,children:o(k)}),[o]),b2=J(k=>{if(d){let G=Math.min(d,e.length);return`${k.length}/${G} item${k.length===1?"":"s"} selected`}return`${k.length} item${k.length===1?"":"s"} selected`},[d,e.length]),Je=J(k=>k===null?null:Array.isArray(k)?U(M,{noPadding:!0,nowrap:!0,variant:"label",children:b2(k)}):U(B1,{data:k,isSelected:!1,multiselect:!!s}),[B1,s,b2]),e5=J(k=>{if(s){let G=m.filter(U1=>!W(U1,k));u(G.length===0?[]:G)}else u(null),w(!1)},[W,s,u,m]),o5=J(k=>{if(s){if(d&&Array.isArray(m)&&m.length>=d)return;u([...m,k])}else u(k),w(!1)},[d,s,u,m]),t5=J(k=>{k.stopPropagation(),u(s?[]:null)},[s,u]),z1=oe(()=>s?m.length>0:!!m,[s,m]);return U(z,{id:N,error:l1,isFocus:Z,onClickLeftIcon:()=>E(!0),onClickRightIcon:()=>E(!0),ref:X,...P,children:te(_3,{id:C,style:b,onBlur:g,className:`${v?"disabled":""} ${y}`,children:[te("section",{className:`select-container ${z1&&L?"three-columns":""}`,onClick:()=>E(!0),children:[U("button",{type:"button",className:`input-button ${(Array.isArray(m)?m.length>0:m)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":Z,onFocus:k=>{E(!0),h&&h(k)},children:z1&&Je(m)||U(M,{variant:"label",noPadding:!0,nowrap:!0,children:$})}),z1&&L&&U("section",{className:"icon-close",onClick:t5,children:U(T,{name:"cross"})}),U(T,{name:Z?"caret-up":"caret-down"})]}),U(ee,{containerRef:X,isOpen:Z,onClose:()=>w(!1),value:m,compareValueOrValuesAreEqual:O1,Component:B1,multiselect:s,isLoading:c,hasNextPage:l,loadMore:i,searchQueryValue:r,onSearchQuery:n,searchQueryPlaceholder:a,options:e,selectOption:o5,unselectOption:e5})]})})},lo=({rules:e,...o})=>U(V,{Component:c2,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),so=({rules:e,...o})=>U(V,{Component:c2,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),co=e=>{let{multiselect:o}=e;return o?U(lo,{...e,multiselect:!0}):U(so,{...e,multiselect:!1})};c2.Controller=co;import{useMemo as Co}from"react";import po from"styled-components";var re=po.section`
1268
1293
  display: grid;
1269
1294
  grid-template-columns: 1fr 50px;
1270
1295
  align-items: center;
@@ -1349,11 +1374,11 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1349
1374
  margin: 0;
1350
1375
  }
1351
1376
  }
1352
- `;import{jsx as A1,jsxs as Co}from"react/jsx-runtime";var oe=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:c,className:l="",style:s={},autoFocus:d=!1,readOnly:C=!1,disabled:m=!1,placeholder:u="",autoComplete:g="off",isDirty:h=!1,isTouched:y=!1,invalid:b=!1,error:L,...x})=>{let S=co(()=>crypto.randomUUID(),[]),v=A=>{r&&r(A);let O=parseInt(`${o}`);n!==void 0&&O<n&&t(n),i!==void 0&&O>i&&t(i),t(O)},{isFocus:$,handlers:H}=F({onBlur:v,onChange:A=>t(+A.target.value),onFocus:a});return A1(z,{id:S,error:L,isFocus:$,...x,children:Co(ee,{$isFocus:$,children:[A1("input",{id:S,type:"range",name:e,className:`slider ${l}`,style:s,value:o,autoFocus:d,autoComplete:g,placeholder:u,disabled:m,readOnly:C,min:n,max:i,step:c,...H}),A1("input",{id:S,type:"number",name:e,className:`slider-number ${l}`,style:s,value:o,autoComplete:g,disabled:m,readOnly:C,min:n,max:i,step:c,...H})]})})},po=({rules:e,...o})=>A1(V,{Component:oe,defaultValue:0,inputProps:o,rules:e});oe.Controller=po;import{useMemo as uo}from"react";import mo from"styled-components";var te=mo.textarea`
1377
+ `;import{jsx as A1,jsxs as uo}from"react/jsx-runtime";var ne=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:c,className:l="",style:s={},autoFocus:d=!1,readOnly:C=!1,disabled:m=!1,placeholder:u="",autoComplete:g="off",isDirty:h=!1,isTouched:y=!1,invalid:b=!1,error:L,...x})=>{let S=Co(()=>crypto.randomUUID(),[]),v=A=>{r&&r(A);let O=parseInt(`${o}`);n!==void 0&&O<n&&t(n),i!==void 0&&O>i&&t(i),t(O)},{isFocus:$,handlers:H}=F({onBlur:v,onChange:A=>t(+A.target.value),onFocus:a});return A1(z,{id:S,error:L,isFocus:$,...x,children:uo(re,{$isFocus:$,children:[A1("input",{id:S,type:"range",name:e,className:`slider ${l}`,style:s,value:o,autoFocus:d,autoComplete:g,placeholder:u,disabled:m,readOnly:C,min:n,max:i,step:c,...H}),A1("input",{id:S,type:"number",name:e,className:`slider-number ${l}`,style:s,value:o,autoComplete:g,disabled:m,readOnly:C,min:n,max:i,step:c,...H})]})})},mo=({rules:e,...o})=>A1(V,{Component:ne,defaultValue:0,inputProps:o,rules:e});ne.Controller=mo;import{useMemo as go}from"react";import fo from"styled-components";var ae=fo.textarea`
1353
1378
  border: 0;
1354
1379
  outline: 0;
1355
1380
  field-sizing: content;
1356
- `;import{jsx as c2}from"react/jsx-runtime";var re=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:c="",style:l={},autoFocus:s=!1,readOnly:d=!1,disabled:C=!1,placeholder:m="",autoComplete:u="off",isDirty:g=!1,isTouched:h=!1,invalid:y=!1,error:b,...L})=>{let x=uo(()=>crypto.randomUUID(),[]),{handlers:S,isFocus:v}=F({onBlur:r,onChange:$=>t($.target.value),onFocus:a});return c2(z,{id:x,error:b,isFocus:v,...L,children:c2(te,{id:x,name:e,className:c,style:{resize:i,...l},value:o,rows:n,...S,autoFocus:s,autoComplete:u,placeholder:m,disabled:C,readOnly:d})})},fo=({rules:e,...o})=>c2(V,{Component:re,defaultValue:"",inputProps:o,rules:e});re.Controller=fo;import{useMemo as go}from"react";import ne,{css as ae}from"styled-components";var C1=ne.section(({$width:e,$dotSize:o,$padding:t,theme:r})=>ae`
1381
+ `;import{jsx as d2}from"react/jsx-runtime";var ie=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:c="",style:l={},autoFocus:s=!1,readOnly:d=!1,disabled:C=!1,placeholder:m="",autoComplete:u="off",isDirty:g=!1,isTouched:h=!1,invalid:y=!1,error:b,...L})=>{let x=go(()=>crypto.randomUUID(),[]),{handlers:S,isFocus:v}=F({onBlur:r,onChange:$=>t($.target.value),onFocus:a});return d2(z,{id:x,error:b,isFocus:v,...L,children:d2(ae,{id:x,name:e,className:c,style:{resize:i,...l},value:o,rows:n,...S,autoFocus:s,autoComplete:u,placeholder:m,disabled:C,readOnly:d})})},ho=({rules:e,...o})=>d2(V,{Component:ie,defaultValue:"",inputProps:o,rules:e});ie.Controller=ho;import{useMemo as yo}from"react";import le,{css as se}from"styled-components";var C1=le.section(({$width:e,$dotSize:o,$padding:t,theme:r})=>se`
1357
1382
  width: ${e}em;
1358
1383
  border-radius: 100em;
1359
1384
  background: ${r.colors.background.paper};
@@ -1428,7 +1453,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1428
1453
  opacity: 0;
1429
1454
  z-index: 3;
1430
1455
  }
1431
- `),ie=ne.section(({$padding:e,$width:o,$dotHoverSize:t})=>ae`
1456
+ `),ce=le.section(({$padding:e,$width:o,$dotHoverSize:t})=>se`
1432
1457
  display: flex;
1433
1458
  align-items: center;
1434
1459
  gap: 1em;
@@ -1452,32 +1477,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1452
1477
  &:has(.switch-label:active) ${C1}.is-checked .switch-dot {
1453
1478
  margin-left: ${o-t-e*2}em;
1454
1479
  }
1455
- `);import{jsx as n1,jsxs as le}from"react/jsx-runtime";var se=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="",autoComplete:C="off",label:m,width:u=3,dotSize:g=1.2,dotHoverSize:h=1.2,padding:y=.25,leftIcon:b,rightIcon:L})=>{let x=go(()=>crypto.randomUUID(),[]),{handlers:S}=F({onChange:O=>t(O.target.checked),onBlur:r,onFocus:a}),v=R({"is-checked":o,"is-readonly":!s&&l}),$=Math.max(u,3)*g,H=Math.min(Math.max(h,1),2)*g,A=Math.min(y,($-.5-g*2)/2);return le(ie,{$width:$,$padding:A,$dotHoverSize:H,className:n,style:i,children:[le(C1,{$width:$,$padding:A,$dotSize:g,className:v,children:[b!==void 0&&n1("span",{className:"switch-left-icon",children:n1(T,{name:b,size:`${g*.7}em`})}),L!==void 0&&n1("span",{className:"switch-right-icon",children:n1(T,{name:L,size:`${g*.7}em`})}),n1("span",{className:"switch-dot"}),n1("input",{id:x,type:"checkbox",name:e,className:`switch-checkbox ${n}`,style:i,checked:o,autoFocus:c,autoComplete:C,placeholder:d,disabled:s||l,...S})]}),m?n1(M,{variant:"label-form",className:"switch-label",htmlFor:x,children:m}):null]})},ho=({rules:e,...o})=>n1(V,{Component:se,defaultValue:!1,inputProps:o,rules:e});se.Controller=ho;import{jsx as yo}from"react/jsx-runtime";var Gr=({alt:e="",loading:o="eager",...t})=>yo("img",{loading:o,alt:e,...t,width:"100%"});import{useEffect as bo}from"react";import ce from"styled-components";var Kr=ce.section`
1456
- display: grid;
1457
- gap: 1em;
1458
- `,de=ce.section`
1459
- display: grid;
1460
- place-content: start center;
1461
- place-items: start center;
1462
-
1463
- .loading {
1464
- width: 100%;
1465
- height: 30px;
1466
- display: grid;
1467
- place-content: center;
1468
-
1469
- &--icon {
1470
- animation: spin 0.5s linear infinite;
1471
- font-size: 20px;
1472
- }
1473
- }
1474
-
1475
- .empty-message {
1476
- font-size: 0.8em;
1477
- text-align: center;
1478
- color: #a6a6a6;
1479
- }
1480
- `;import{Fragment as Lo,jsx as d2,jsxs as pe}from"react/jsx-runtime";var w3=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,data:r=[],renderItem:a,customLoadMoreElement:n,emptyMessage:i,children:c})=>{let{ref:l,inView:s}=R2(),d=L2(e,100);return bo(()=>{o&&s&&!d&&t()},[o,d,t,s]),pe(Lo,{children:[c,r.map(a),pe(de,{children:[!!i&&r.length===0&&!d&&d2("p",{className:"empty-message",children:i}),(o||d)&&(n?n(l):d2("section",{ref:l,className:"loading",children:d&&d2(T,{name:"spinner",className:"loading--icon"})}))]})]})};import xo from"styled-components";var Ce=xo.section`
1480
+ `);import{jsx as n1,jsxs as de}from"react/jsx-runtime";var pe=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:c=!1,readOnly:l=!1,disabled:s=!1,placeholder:d="",autoComplete:C="off",label:m,width:u=3,dotSize:g=1.2,dotHoverSize:h=1.2,padding:y=.25,leftIcon:b,rightIcon:L})=>{let x=yo(()=>crypto.randomUUID(),[]),{handlers:S}=F({onChange:O=>t(O.target.checked),onBlur:r,onFocus:a}),v=R({"is-checked":o,"is-readonly":!s&&l}),$=Math.max(u,3)*g,H=Math.min(Math.max(h,1),2)*g,A=Math.min(y,($-.5-g*2)/2);return de(ce,{$width:$,$padding:A,$dotHoverSize:H,className:n,style:i,children:[de(C1,{$width:$,$padding:A,$dotSize:g,className:v,children:[b!==void 0&&n1("span",{className:"switch-left-icon",children:n1(T,{name:b,size:`${g*.7}em`})}),L!==void 0&&n1("span",{className:"switch-right-icon",children:n1(T,{name:L,size:`${g*.7}em`})}),n1("span",{className:"switch-dot"}),n1("input",{id:x,type:"checkbox",name:e,className:`switch-checkbox ${n}`,style:i,checked:o,autoFocus:c,autoComplete:C,placeholder:d,disabled:s||l,...S})]}),m?n1(M,{variant:"label-form",className:"switch-label",htmlFor:x,children:m}):null]})},bo=({rules:e,...o})=>n1(V,{Component:pe,defaultValue:!1,inputProps:o,rules:e});pe.Controller=bo;import{jsx as Lo}from"react/jsx-runtime";var rn=({alt:e="",loading:o="eager",...t})=>Lo("img",{loading:o,alt:e,...t,width:"100%"});import xo from"styled-components";var Ce=xo.section`
1481
1481
  width: 100%;
1482
1482
  height: 100%;
1483
1483
  display: grid;
@@ -1487,7 +1487,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1487
1487
  animation: spin linear infinite;
1488
1488
  font-size: 3em;
1489
1489
  }
1490
- `;import{jsx as me}from"react/jsx-runtime";var cn=({spinDuration:e=500})=>me(Ce,{children:me(T,{name:"spinner",className:"simple-loader-spinner",style:{animationDuration:`${e}ms`}})});import{useMemo as $e,useState as $o}from"react";import{useMemo as So}from"react";import{useTheme as Ro}from"styled-components";import{styled as a1}from"styled-components";var ue=a1.section`
1490
+ `;import{jsx as me}from"react/jsx-runtime";var pn=({spinDuration:e=500})=>me(Ce,{children:me(T,{name:"spinner",className:"simple-loader-spinner",style:{animationDuration:`${e}ms`}})});import{useMemo as $e,useState as $o}from"react";import{useMemo as So}from"react";import{useTheme as Ro}from"styled-components";import{styled as a1}from"styled-components";var ue=a1.section`
1491
1491
  border: 1px solid ${e=>e.theme.colors.primary.main};
1492
1492
  border-radius: 10px;
1493
1493
  overflow: auto;
@@ -1572,7 +1572,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1572
1572
  &:last-child {
1573
1573
  padding-right: 2em;
1574
1574
  }
1575
- `;import{jsx as $1,jsxs as Se}from"react/jsx-runtime";var Re=({header:e,sortBy:o,icon:t,width:r,field:a,toggleSortField:n,sortField:i,orderField:c})=>{let l=Ro(),s=o||a,d=R({"sort-on-click":!!s}),C=s&&(()=>n(s)),m=So(()=>s?$1("span",{className:"sort-icon",children:!!i&&i===s&&$1(T,{name:c==="asc"?"arrow-down":"arrow-up"})}):null,[s,i,c]);return Se(ye,{style:{width:r},className:d,onClick:C,children:[Se(R1,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t&&$1(T,{name:t}),$1(M,{variant:"label",noPadding:!0,children:e}),m]}),$1(F1,{color:l.colors.text.main})]})};import{jsx as p2}from"react/jsx-runtime";var vo=(e,{field:o,render:t,Component:r},a)=>{if(o&&e[o])return p2(M,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,a);if(r)return p2(r,{data:e,rowKey:a})},ve=(e,o,t)=>o.map((r,a)=>p2(xe,{children:vo(e,r,t)},a)),Te=(e,o,t)=>o?e.toSorted((r,a)=>{let n=r[o],i=a[o];return["number","boolean","string"].includes(typeof n)&&["number","boolean","string"].includes(typeof i)?n===i?0:t==="asc"?n>i?1:-1:n>i?-1:1:0}):e;import{useCallback as To,useState as Mo}from"react";var Me=()=>{let[[e,o],t]=Mo([null,null]),r=To(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};import{jsx as wo}from"react/jsx-runtime";var we=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:a})=>{let n=R({"row-selected":r&&t});return wo(Le,{className:n,children:ve(e,o,a)})};import{jsx as c1,jsxs as Po}from"react/jsx-runtime";var Un=({columns:e,data:o,width:t,selectable:r=!1,rowId:a})=>{let[n,i]=$o({}),c=R({"layout-fixed":t==="content","layout-scrollable":t==="scroll"}),{sortBy:l,order:s,toggleSortField:d}=Me(),C=$e(()=>{let u=[...e];return r&&(u=[{header:`${Object.values(n).length}`,render:(g,h)=>c1(p1,{name:`selected-${h}`,value:`${h}`in n,setValue:y=>{i(b=>{let L={...b};return y?L[`${h}`]=g:delete L[`${h}`],L})}})},...u]),u},[e,r,n]),m=$e(()=>Te(o,l,s),[o,l,s]);return c1(ue,{children:Po(fe,{className:c,children:[c1(ge,{children:c1(be,{children:C.map((u,g)=>c1(Re,{toggleSortField:d,sortField:l,orderField:s,...u},g))})}),c1(he,{children:m.map(u=>c1(we,{rowKey:u[a],data:u,columns:C,isSelected:`${u[a]}`in n,selectable:r},u[a]))})]})})};import Fo,{createContext as No,useContext as Fe,useEffect as Eo,useState as Ao}from"react";import{useEffect as Ho,useRef as He,useState as Ve}from"react";import{useTheme as Vo}from"styled-components";import Pe,{css as P1}from"styled-components";var e1=Pe.span`
1575
+ `;import{jsx as $1,jsxs as Se}from"react/jsx-runtime";var Re=({header:e,sortBy:o,icon:t,width:r,field:a,toggleSortField:n,sortField:i,orderField:c})=>{let l=Ro(),s=o||a,d=R({"sort-on-click":!!s}),C=s&&(()=>n(s)),m=So(()=>s?$1("span",{className:"sort-icon",children:!!i&&i===s&&$1(T,{name:c==="asc"?"arrow-down":"arrow-up"})}):null,[s,i,c]);return Se(ye,{style:{width:r},className:d,onClick:C,children:[Se(R1,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t&&$1(T,{name:t}),$1(M,{variant:"label",noPadding:!0,children:e}),m]}),$1(F1,{color:l.colors.text.main})]})};import{jsx as p2}from"react/jsx-runtime";var vo=(e,{field:o,render:t,Component:r},a)=>{if(o&&e[o])return p2(M,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,a);if(r)return p2(r,{data:e,rowKey:a})},ve=(e,o,t)=>o.map((r,a)=>p2(xe,{children:vo(e,r,t)},a)),Te=(e,o,t)=>o?e.toSorted((r,a)=>{let n=r[o],i=a[o];return["number","boolean","string"].includes(typeof n)&&["number","boolean","string"].includes(typeof i)?n===i?0:t==="asc"?n>i?1:-1:n>i?-1:1:0}):e;import{useCallback as To,useState as Mo}from"react";var Me=()=>{let[[e,o],t]=Mo([null,null]),r=To(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};import{jsx as wo}from"react/jsx-runtime";var we=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:a})=>{let n=R({"row-selected":r&&t});return wo(Le,{className:n,children:ve(e,o,a)})};import{jsx as c1,jsxs as Po}from"react/jsx-runtime";var Yn=({columns:e,data:o,width:t,selectable:r=!1,rowId:a})=>{let[n,i]=$o({}),c=R({"layout-fixed":t==="content","layout-scrollable":t==="scroll"}),{sortBy:l,order:s,toggleSortField:d}=Me(),C=$e(()=>{let u=[...e];return r&&(u=[{header:`${Object.values(n).length}`,render:(g,h)=>c1(p1,{name:`selected-${h}`,value:`${h}`in n,setValue:y=>{i(b=>{let L={...b};return y?L[`${h}`]=g:delete L[`${h}`],L})}})},...u]),u},[e,r,n]),m=$e(()=>Te(o,l,s),[o,l,s]);return c1(ue,{children:Po(fe,{className:c,children:[c1(ge,{children:c1(be,{children:C.map((u,g)=>c1(Re,{toggleSortField:d,sortField:l,orderField:s,...u},g))})}),c1(he,{children:m.map(u=>c1(we,{rowKey:u[a],data:u,columns:C,isSelected:`${u[a]}`in n,selectable:r},u[a]))})]})})};import Fo,{createContext as No,useContext as Fe,useEffect as Eo,useState as Ao}from"react";import{useEffect as Ho,useRef as He,useState as Ve}from"react";import{useTheme as Vo}from"styled-components";import Pe,{css as P1}from"styled-components";var e1=Pe.span`
1576
1576
  cursor: pointer;
1577
1577
  user-select: none;
1578
1578
  transition: all 300ms ease;
@@ -1703,7 +1703,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1703
1703
  background: ${e=>e.theme.colors.primary.main};
1704
1704
  color: ${e=>e.theme.colors.primary.contrast};
1705
1705
  }
1706
- `;import{jsx as Yo}from"react/jsx-runtime";var La=({children:e,className:o="",isSelected:t=!1,size:r="medium",radius:a="medium",...n})=>{let i=R({[o]:!!o,"tag-selected":t});return Yo(Ee,{className:i,...n,$size:r,$radius:a,children:e})};import{useState as jo}from"react";import{cloneElement as Wo}from"react";import Xo from"styled-components";var Ae=Xo(K)`
1706
+ `;import{jsx as Yo}from"react/jsx-runtime";var Sa=({children:e,className:o="",isSelected:t=!1,size:r="medium",radius:a="medium",...n})=>{let i=R({[o]:!!o,"tag-selected":t});return Yo(Ee,{className:i,...n,$size:r,$radius:a,children:e})};import{useState as jo}from"react";import{cloneElement as Wo}from"react";import Xo from"styled-components";var Ae=Xo(K)`
1707
1707
  color: ${e=>e.theme.colors.text.main};
1708
1708
  font-size: ${e=>e.theme.constants.typography.small.fontSize};
1709
1709
  line-height: 1em;
@@ -1791,7 +1791,7 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
1791
1791
  transform: translate(-50%, 50%) rotate(-135deg);
1792
1792
  }
1793
1793
  }
1794
- `;import{Fragment as Ko,jsx as De,jsxs as _o}from"react/jsx-runtime";var Oe=({position:e="top",children:o,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:c,isOpen:l}=T2(),s=R({[e]:!0});return Y("mouseenter",()=>i(),n),Y("mouseleave",()=>c(),n),a?o:_o(Ko,{children:[Wo(o,{ref:n}),De(Ae,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:c,position:e,className:s,closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:250,children:De("span",{className:"tooltip-content",children:t})})]})};import{jsx as Be}from"react/jsx-runtime";var Na=({children:e,value:o,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[c,l]=jo(!1);return Be(Oe,{content:c&&n?n:a,position:t,offset:r,children:Be("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};import{yupResolver as qo}from"@hookform/resolvers/yup";import{FormProvider as Qo,useForm as Jo}from"react-hook-form";import{jsx as ze}from"react/jsx-runtime";var Ya=({mode:e="onSubmit",reValidateMode:o="onBlur",onSubmit:t,className:r="",style:a={},defaultValues:n,shouldFocusError:i=!1,children:c,schema:l})=>{let s=Jo({mode:e,defaultValues:n,reValidateMode:o,shouldFocusError:i,resolver:l?qo(l):void 0});return ze(Qo,{...s,children:ze("form",{autoComplete:"off",onSubmit:s.handleSubmit(t),className:r,style:a,children:c})})};import e4 from"axios";import{createContext as o4,useCallback as D1,useContext as t4,useEffect as r4,useMemo as n4,useState as a4}from"react";import{jsx as i4}from"react/jsx-runtime";var Ue=o4(null),qa=({children:e,baseURL:o})=>{let[t,r]=a4({isAuthenticated:!1,user:null,token:null}),a=D1(()=>localStorage.getItem("token"),[]),n=D1(()=>{let s=localStorage.getItem("user"),d=a();r({isAuthenticated:d!==null,user:s!==null?JSON.parse(s):s,token:d})},[a]);r4(n,[n]);let i=D1((s,d)=>{localStorage.setItem("user",JSON.stringify(s)),localStorage.setItem("token",d),n()},[n]),c=D1(()=>{localStorage.clear(),n()},[n]),l=n4(()=>{let s=e4.create({baseURL:o,headers:{"Content-Type":"application/json"}});return s.interceptors.request.use(d=>{let C=a();return C!==null&&d.headers.setAuthorization(`Bearer ${C}`),d}),s.interceptors.response.use(d=>Promise.resolve(d),d=>{d.response.status===401&&c(),Promise.reject(d)}),s},[o,a,c]);return i4(Ue.Provider,{value:{...t,httpClient:l,login:i,logout:c},children:e})},Qa=()=>{let e=t4(Ue);if(e===null)throw new Error("useFetch must be used with in a FetchProvider");return e};var l4=(l=>(l.HERO="hero",l.HEADER1="header1",l.HEADER2="header2",l.HEADER3="header3",l.HEADER4="header4",l.BODY="body",l.LABEL="label",l.SMALL="small",l))(l4||{}),s4=(l=>(l.MOBILE="mobile",l.MOBILE_L="mobileL",l.TABLET="tablet",l.LAPTOPS="laptopS",l.LAPTOP_M="laptopM",l.LAPTOP_L="laptopL",l.DESKTOP="desktop",l.LARGE="large",l))(s4||{});import m4,{Suspense as u4,useCallback as h2,useContext as f4,useEffect as qe,useState as y2}from"react";import{ThemeProvider as g4}from"styled-components";import{createGlobalStyle as c4,css as f2}from"styled-components";var Ge=c4(({theme:{constants:e}})=>Object.entries(e.typography).map(([o,{breakpoints:t,fontSize:r,lineHeight:a,defaultWeight:n,weights:i}])=>f2`
1794
+ `;import{Fragment as Ko,jsx as De,jsxs as _o}from"react/jsx-runtime";var Oe=({position:e="top",children:o,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:c,isOpen:l}=T2(),s=R({[e]:!0});return Y("mouseenter",()=>i(),n),Y("mouseleave",()=>c(),n),a?o:_o(Ko,{children:[Wo(o,{ref:n}),De(Ae,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:c,position:e,className:s,closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:250,children:De("span",{className:"tooltip-content",children:t})})]})};import{jsx as Be}from"react/jsx-runtime";var Aa=({children:e,value:o,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[c,l]=jo(!1);return Be(Oe,{content:c&&n?n:a,position:t,offset:r,children:Be("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};import{yupResolver as qo}from"@hookform/resolvers/yup";import{FormProvider as Qo,useForm as Jo}from"react-hook-form";import{jsx as ze}from"react/jsx-runtime";var Wa=({mode:e="onSubmit",reValidateMode:o="onBlur",onSubmit:t,className:r="",style:a={},defaultValues:n,shouldFocusError:i=!1,children:c,schema:l})=>{let s=Jo({mode:e,defaultValues:n,reValidateMode:o,shouldFocusError:i,resolver:l?qo(l):void 0});return ze(Qo,{...s,children:ze("form",{autoComplete:"off",onSubmit:s.handleSubmit(t),className:r,style:a,children:c})})};import e4 from"axios";import{createContext as o4,useCallback as D1,useContext as t4,useEffect as r4,useMemo as n4,useState as a4}from"react";import{jsx as i4}from"react/jsx-runtime";var Ue=o4(null),Ja=({children:e,baseURL:o})=>{let[t,r]=a4({isAuthenticated:!1,user:null,token:null}),a=D1(()=>localStorage.getItem("token"),[]),n=D1(()=>{let s=localStorage.getItem("user"),d=a();r({isAuthenticated:d!==null,user:s!==null?JSON.parse(s):s,token:d})},[a]);r4(n,[n]);let i=D1((s,d)=>{localStorage.setItem("user",JSON.stringify(s)),localStorage.setItem("token",d),n()},[n]),c=D1(()=>{localStorage.clear(),n()},[n]),l=n4(()=>{let s=e4.create({baseURL:o,headers:{"Content-Type":"application/json"}});return s.interceptors.request.use(d=>{let C=a();return C!==null&&d.headers.setAuthorization(`Bearer ${C}`),d}),s.interceptors.response.use(d=>Promise.resolve(d),d=>{d.response.status===401&&c(),Promise.reject(d)}),s},[o,a,c]);return i4(Ue.Provider,{value:{...t,httpClient:l,login:i,logout:c},children:e})},ei=()=>{let e=t4(Ue);if(e===null)throw new Error("useFetch must be used with in a FetchProvider");return e};var l4=(l=>(l.HERO="hero",l.HEADER1="header1",l.HEADER2="header2",l.HEADER3="header3",l.HEADER4="header4",l.BODY="body",l.LABEL="label",l.SMALL="small",l))(l4||{}),s4=(l=>(l.MOBILE="mobile",l.MOBILE_L="mobileL",l.TABLET="tablet",l.LAPTOPS="laptopS",l.LAPTOP_M="laptopM",l.LAPTOP_L="laptopL",l.DESKTOP="desktop",l.LARGE="large",l))(s4||{});import m4,{Suspense as u4,useCallback as h2,useContext as f4,useEffect as qe,useState as y2}from"react";import{ThemeProvider as g4}from"styled-components";import{createGlobalStyle as c4,css as f2}from"styled-components";var Ge=c4(({theme:{constants:e}})=>Object.entries(e.typography).map(([o,{breakpoints:t,fontSize:r,lineHeight:a,defaultWeight:n,weights:i}])=>f2`
1795
1795
  .${o} {
1796
1796
  font-size: ${r};
1797
1797
  line-height: ${a};
@@ -2195,5 +2195,5 @@ import{D as $2,c as R,d as Y,h as L2,i as x2,k as S2,q as R2,r as F,s as v2,t as
2195
2195
  font-family: ${e=>e.theme.constants.fontFamily};
2196
2196
  color: ${e=>e.theme.colors.text.main};
2197
2197
  }
2198
- `;import{jsx as H1,jsxs as b4}from"react/jsx-runtime";var h4=(t=>(t.LIGHT="light",t.DARK="dark",t))(h4||{}),Qe=m4.createContext(null),y4=({children:e,commonTheme:o=We,lightTheme:t=_e,darkTheme:r=Ke,constants:a=Xe,defaultTheme:n="dark"})=>{let[i,c]=y2(n),[l,s]=y2("dark"),[d,C]=y2(!1);qe(()=>{if(["dark","light"].includes(n)){c(n),C(!1),localStorage.setItem("theme-name",n);return}let y=localStorage.getItem("theme-name");!y||!["dark","light"].includes(y)?(C(!0),localStorage.setItem("theme-name","system")):(c(y),localStorage.setItem("theme-name",y))},[n]),qe(()=>{let y=L=>{s(L.matches?"dark":"light")},b=window.matchMedia("(prefers-color-scheme: dark)");return s(b.matches?"dark":"light"),b.addEventListener("change",y),()=>b.removeEventListener("change",y)},[]);let m=h2(()=>{localStorage.setItem("theme-name","system"),C(!0)},[]),u=h2(y=>{c(y),localStorage.setItem("theme-name",y),d&&C(!1)},[d]),g=h2(()=>{c(y=>{let b=y==="light"?"dark":"light";return d&&(b=l==="light"?"dark":"light",C(!1)),localStorage.setItem("theme-name",b),b})},[l,d]),h={light:{...o,...t},dark:{...o,...r}};return H1(u4,{children:H1(Qe.Provider,{value:{themeName:d?l:i,changeTheme:u,toggleTheme:g,setSystemTheme:m},children:b4(g4,{theme:{name:d?l:i,colors:h[d?l:i],constants:a},children:[H1(je,{}),H1(Ye,{}),H1(Ge,{}),e]})})})};y4.Wrapper=g2;var fi=()=>{let e=f4(Qe);if(e===null)throw new Error("useFetch must be used with in a ThemeProvider");return e};export{V4 as Accordion,jt as AccordionItem,x1 as ActionModal,C7 as AsideModal,p3 as Backdrop,s4 as Breakpoints,_2 as Button,A5 as ButtonVariant,p1 as Checkbox,Na as ClickToCopy,We as CommonTheme,x7 as ConfirmationModal,V as Controller,w8 as Cursor,Ke as DarkTheme,n3 as DatePicker,qa as FetchProvider,z as Field,J5 as FieldOrientation,Q5 as FieldVariant,c9 as Flex,U4 as FlipCard,Ya as Form,R1 as Grid,J4 as HoverCard,T as Icon,vt as IconNames,Gr as Image,w3 as InfinityScroll,a3 as Input,I3 as InputColor,z3 as InputFile,l3 as InputPassword,_e as LightTheme,V1 as Line,n5 as LineOrientation,a5 as LineStyle,t1 as Menu,K as Modal,d0 as ModalBackdrop,C3 as Portal,Y3 as Radio,F1 as Ripple,h9 as SectionLayout,s2 as Select,cn as SimpleLoader,N2 as SlideCard,oe as Slider,Un as SmartTable,se as Switch,h4 as THEME,k1 as Tabs,La as Tag,re as Textarea,Xe as ThemeConstants,y4 as ThemeProvider,Oe as Tooltip,M as Typography,P5 as TypographyComponent,X2 as TypographyVariant,l4 as TypographyVariants,W1 as TypographyVariantsClassNames,X1 as TypographyVariantsElements,R5 as TypographyWeight,F2 as useAccordionItem,Qa as useFetch,fi as useMyTheme};
2198
+ `;import{jsx as H1,jsxs as b4}from"react/jsx-runtime";var h4=(t=>(t.LIGHT="light",t.DARK="dark",t))(h4||{}),Qe=m4.createContext(null),y4=({children:e,commonTheme:o=We,lightTheme:t=_e,darkTheme:r=Ke,constants:a=Xe,defaultTheme:n="dark"})=>{let[i,c]=y2(n),[l,s]=y2("dark"),[d,C]=y2(!1);qe(()=>{if(["dark","light"].includes(n)){c(n),C(!1),localStorage.setItem("theme-name",n);return}let y=localStorage.getItem("theme-name");!y||!["dark","light"].includes(y)?(C(!0),localStorage.setItem("theme-name","system")):(c(y),localStorage.setItem("theme-name",y))},[n]),qe(()=>{let y=L=>{s(L.matches?"dark":"light")},b=window.matchMedia("(prefers-color-scheme: dark)");return s(b.matches?"dark":"light"),b.addEventListener("change",y),()=>b.removeEventListener("change",y)},[]);let m=h2(()=>{localStorage.setItem("theme-name","system"),C(!0)},[]),u=h2(y=>{c(y),localStorage.setItem("theme-name",y),d&&C(!1)},[d]),g=h2(()=>{c(y=>{let b=y==="light"?"dark":"light";return d&&(b=l==="light"?"dark":"light",C(!1)),localStorage.setItem("theme-name",b),b})},[l,d]),h={light:{...o,...t},dark:{...o,...r}};return H1(u4,{children:H1(Qe.Provider,{value:{themeName:d?l:i,changeTheme:u,toggleTheme:g,setSystemTheme:m},children:b4(g4,{theme:{name:d?l:i,colors:h[d?l:i],constants:a},children:[H1(je,{}),H1(Ye,{}),H1(Ge,{}),e]})})})};y4.Wrapper=g2;var hi=()=>{let e=f4(Qe);if(e===null)throw new Error("useFetch must be used with in a ThemeProvider");return e};export{V4 as Accordion,jt as AccordionItem,x1 as ActionModal,h7 as AsideModal,C3 as Backdrop,s4 as Breakpoints,_2 as Button,A5 as ButtonVariant,p1 as Checkbox,Aa as ClickToCopy,We as CommonTheme,M7 as ConfirmationModal,V as Controller,w8 as Cursor,Ke as DarkTheme,n3 as DatePicker,Ja as FetchProvider,z as Field,J5 as FieldOrientation,Q5 as FieldVariant,S9 as Flex,U4 as FlipCard,Wa as Form,R1 as Grid,J4 as HoverCard,T as Icon,vt as IconNames,rn as Image,T3 as InfinityScroll,a3 as Input,N3 as InputColor,Y3 as InputFile,l3 as InputPassword,_e as LightTheme,V1 as Line,n5 as LineOrientation,a5 as LineStyle,t1 as Menu,K as Modal,u0 as ModalBackdrop,s3 as Portal,K3 as Radio,F1 as Ripple,k9 as SectionLayout,c2 as Select,pn as SimpleLoader,N2 as SlideCard,ne as Slider,Yn as SmartTable,pe as Switch,h4 as THEME,k1 as Tabs,Sa as Tag,ie as Textarea,Xe as ThemeConstants,y4 as ThemeProvider,Oe as Tooltip,M as Typography,P5 as TypographyComponent,X2 as TypographyVariant,l4 as TypographyVariants,W1 as TypographyVariantsClassNames,X1 as TypographyVariantsElements,R5 as TypographyWeight,F2 as useAccordionItem,ei as useFetch,hi as useMyTheme};
2199
2199
  //# sourceMappingURL=ui.js.map