@6thbridge/hexa 0.0.40 → 0.0.42

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/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var Et=Object.defineProperty;var Ft=(t,e,r)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var He=(t,e,r)=>Ft(t,typeof e!="symbol"?e+"":e,r);import Ht from"react";import*as Ge from"react";import*as ke from"@radix-ui/react-label";import{cva as Vt}from"class-variance-authority";import{clsx as At}from"clsx";import{twMerge as Mt}from"tailwind-merge";function n(...t){return Mt(At(t))}import{jsx as Ot}from"react/jsx-runtime";var Bt=Vt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Le=Ge.forwardRef(({className:t,...e},r)=>Ot(ke.Root,{ref:r,className:n(Bt(),t),...e}));Le.displayName=ke.Root.displayName;import{jsx as We,jsxs as Gt}from"react/jsx-runtime";var N=Ht.forwardRef(({className:t,children:e,showAsterisk:r,error:i,...o},a)=>We(Le,{ref:a,className:n(i&&"text-red-500",t),...o,children:r?Gt("p",{children:[e,We("span",{className:"text-red-500",children:"*"})]}):e}));N.displayName="FormLabel";import{jsx as Ze,jsxs as Wt}from"react/jsx-runtime";var Q=({size:t=16,colour:e="primary"})=>Wt("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[Ze("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Ze("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Ce from"react";import{Slot as Zt}from"@radix-ui/react-slot";import{cva as zt}from"class-variance-authority";import{Fragment as ze,jsx as q,jsxs as Kt}from"react/jsx-runtime";var be=zt("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),_=Ce.forwardRef(({className:t,variant:e="primary",size:r,asChild:i=!1,isLoading:o=!1,leftNode:a,rightNode:l,LoaderSize:s,...d},c)=>{let m=i?Zt:"button",{children:u,disabled:p,...C}=d,x=Ce.useRef(null);return q(m,{className:n(be({variant:e,size:r,className:t})),ref:x||c,disabled:p||o,...C,children:q("div",{className:"flex font-medium justify-center items-center gap-2",children:o?q(ze,{children:q("span",{className:"mx-auto",children:q(Q,{size:s,colour:"secondary"})})}):Kt(ze,{children:[a,u,l]})})})});_.displayName="Button";import*as Se from"react";import{cva as Te}from"class-variance-authority";import _t from"react";import{jsx as $t}from"react/jsx-runtime";var R=_t.forwardRef(({className:t,children:e,error:r,...i},o)=>{let a=r??e;return a?$t("p",{ref:o,className:n("text-xs font-normal text-[#F04248]",t),...i,children:a}):null});R.displayName="ErrorMessage";import Ut from"react";import{jsx as Xt}from"react/jsx-runtime";var D=Ut.forwardRef(({className:t,...e},r)=>Xt("div",{ref:r,className:n("text-sm text-[#8E98A8",t),...e}));D.displayName="FormDescription";import{jsx as H,jsxs as _e}from"react/jsx-runtime";var Yt=Te("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),$e=Se.forwardRef(({className:t,status:e,type:r,...i},o)=>H("input",{type:r,className:n(Yt({status:e}),t),ref:o,...i}));$e.displayName="BaseInnerInput";var F=Te("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Ke=Te("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),M=Se.forwardRef(({className:t,status:e="default",disabled:r,error:i,isLoading:o,sideNodeClassName:a,showAsterisk:l,label:s,description:d,...c},m)=>{let u=e;return i&&(u="error"),o&&(u="loading"),r&&(u="prefilled"),_e("div",{className:"relative space-y-1 w-full",children:[s&&H(N,{showAsterisk:l,error:i,children:s}),_e("div",{className:n(F({status:u}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",t),children:[c.leftNode?H("div",{className:n(Ke({status:u,side:"left"}),a),children:c.leftNode}):null,H($e,{ref:m,disabled:o||r,className:n({"!pl-3":c.leftNode&&e!=="neutral","!pr-3":c.rightNode&&e!=="neutral"}),...c}),c.rightNode?H("div",{className:n(Ke({status:u,side:"right"}),a),children:c.rightNode}):null]}),d&&H(D,{className:"text-gray-400 text-sm !font-normal",children:d}),H(R,{error:i})]})});M.displayName="Input";import{useMemo as Qt,useState as tt}from"react";import{jsx as Ue,jsxs as jt}from"react/jsx-runtime";var Xe=()=>jt("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ue("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Ue("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Ye,jsxs as Jt}from"react/jsx-runtime";var je=()=>Jt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ye("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Ye("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Je}from"react/jsx-runtime";var Qe=()=>Je("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Je("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as qe}from"react/jsx-runtime";var et=()=>qe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qe("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as S,jsxs as qt}from"react/jsx-runtime";var rt=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],ot=({onValidate:t,onChange:e,disableValidation:r,...i})=>{let[o,a]=tt(!1),[l,s]=tt(rt),d=p=>rt.map(C=>({...C,validated:C.RegExp.test(p)})),c=p=>{let C=d(p),x=C.every(P=>P.validated);return s(C),x},m=p=>{if(e&&e(p),r)return;let C=p?.target?.value,x=c(C);t&&t(x,C)},u=Qt(()=>S("div",{className:"flex items-center gap-2",children:l?.map(p=>qt("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":p?.validated,"text-[#8E98A8]":!p?.validated}),children:[S("span",{className:"",children:p?.validated?S(Qe,{}):S(et,{})}),S("span",{className:"",children:p?.label})]},p?.key))}),[l]);return S(M,{sideNodeClassName:"!border-l-0",rightNode:o?S("button",{type:"button",onClick:()=>a(p=>!p),children:S(Xe,{})}):S("button",{type:"button",onClick:()=>a(p=>!p),children:S(je,{})}),type:o?"text":"password",onChange:m,description:!r&&u,...i})};ot.displayName="PasswordInput";import{cva as er}from"class-variance-authority";import{jsx as he,jsxs as tr}from"react/jsx-runtime";var aa=er("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),at=({className:t,status:e="default",disabled:r,error:i,isLoading:o,showAsterisk:a,label:l,description:s,...d})=>{let c=e;return i&&(c="error"),o&&(c="loading"),r&&(c="prefilled"),tr("div",{className:"relative space-y-1",children:[he(N,{showAsterisk:a,error:i,children:l}),he("textarea",{className:n("min-h-[80px]",F({status:c}),t),disabled:o||r,...d}),he(D,{className:"text-gray-400 text-sm !font-normal",children:s}),he(R,{error:i})]})};at.displayName="Textarea";import*as W from"react";import*as V from"react";import{Command as v}from"cmdk";import{Search as ir}from"lucide-react";import*as ee from"react";import*as g from"@radix-ui/react-dialog";import{jsx as nt,jsxs as rr}from"react/jsx-runtime";var it=()=>rr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[nt("path",{d:"M18 6 6 18"}),nt("path",{d:"m6 6 12 12"})]});import{Fragment as nr,jsx as h,jsxs as $}from"react/jsx-runtime";var or=g.Root,ar=g.Trigger,st=g.Portal,lt=ee.forwardRef(({className:t,...e},r)=>h(g.Overlay,{ref:r,className:n("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));lt.displayName=g.Overlay.displayName;var Ie=ee.forwardRef(({className:t,hideCloseButton:e,children:r,...i},o)=>$(st,{children:[h(lt,{}),$(g.Content,{ref:o,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...i,children:[r,!e&&$(g.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h(it,{}),h("span",{className:"sr-only",children:"Close"})]})]})]}));Ie.displayName=g.Content.displayName;var ct=({className:t,...e})=>h("div",{className:n("flex flex-col space-y-1.5 text-left",t),...e});ct.displayName="DialogHeader";var dt=({className:t,...e})=>h("div",{className:n("flex flex-row justify-end sm:space-x-2",t),...e});dt.displayName="DialogFooter";var pt=ee.forwardRef(({className:t,...e},r)=>h(g.Title,{ref:r,className:n("text-xl font-semibold leading-none tracking-tight",t),...e}));pt.displayName=g.Title.displayName;var mt=ee.forwardRef(({className:t,...e},r)=>h(g.Description,{ref:r,className:n("text-sm text-gray-500",t),...e}));mt.displayName=g.Description.displayName;var Ee=({trigger:t=void 0,children:e,open:r,onOpenChange:i,hideCloseButton:o,footer:a,title:l,description:s,contentClassName:d,headerClassName:c,titleClassName:m,descriptionClassName:u,footerClassName:p,asChild:C=!0,onOpenAutoFocus:x,onCloseAutoFocus:P,onEscapeKeyDown:ye,onInteractOutside:z,onPointerDownOutside:Re,...De})=>$(or,{...De,open:r,onOpenChange:i,children:[h(ar,{asChild:C,children:t}),h(st,{children:$(Ie,{className:d,hideCloseButton:o,onOpenAutoFocus:x,onCloseAutoFocus:P,onEscapeKeyDown:ye,onPointerDownOutside:Re,onInteractOutside:z,children:[l||s?$(ct,{className:c,children:[l&&h(pt,{className:m,children:l}),s&&h(mt,{className:u,children:s})]}):h(nr,{}),e,a&&h(dt,{className:p,children:a})]})})]});Ee.displayName=g.Dialog.displayName;import{Fragment as ha,jsx as T,jsxs as cr}from"react/jsx-runtime";var te=V.forwardRef(({className:t,...e},r)=>T(v,{ref:r,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));te.displayName=v.displayName;var re=V.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...i},o)=>cr("div",{className:n("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?T(Q,{size:16,colour:"secondary"}):T(ir,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),T(v.Input,{ref:o,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:r,...i})]}));re.displayName=v.Input.displayName;var oe=V.forwardRef(({className:t,...e},r)=>T(v.List,{ref:r,className:n("overflow-y-auto overflow-x-hidden",t),...e}));oe.displayName=v.List.displayName;var ae=V.forwardRef((t,e)=>T(v.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));ae.displayName=v.Empty.displayName;var ne=V.forwardRef(({className:t,...e},r)=>T(v.Group,{ref:r,className:n("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));ne.displayName=v.Group.displayName;var sr=V.forwardRef(({className:t,...e},r)=>T(v.Separator,{ref:r,className:n("-mx-1 h-px bg-border",t),...e}));sr.displayName=v.Separator.displayName;var ie=V.forwardRef(({className:t,...e},r)=>T(v.Item,{ref:r,className:n("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));ie.displayName=v.Item.displayName;var lr=({className:t,...e})=>T("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});lr.displayName="CommandShortcut";import*as ut from"react";import*as k from"@radix-ui/react-popover";import{jsx as se,jsxs as dr}from"react/jsx-runtime";var U=k.Root,B=k.Trigger,G=ut.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:i=!0,...o},a)=>i?se(k.Portal,{children:se(k.Content,{ref:a,align:e,sideOffset:r,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):se(k.Content,{ref:a,align:e,sideOffset:r,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));G.displayName=k.Content.displayName;var ve=({trigger:t,children:e,open:r,onOpenChange:i,contentClassName:o,asChild:a=!0,align:l,side:s,alignOffset:d,triggerClassName:c,sideOffset:m,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:C=!0,...x})=>dr(U,{...x,open:r,onOpenChange:i,children:[se(B,{asChild:a,className:c,children:t}),se(G,{alignOffset:d,sideOffset:m,side:s,align:l,className:o,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:C,children:e})]});ve.displayName=k.Root.displayName;import*as Fe from"react";import*as w from"@radix-ui/react-scroll-area";import{jsx as le,jsxs as pr}from"react/jsx-runtime";var ce=Fe.forwardRef(({className:t,viewPortClassName:e,children:r,...i},o)=>pr(w.Root,{ref:o,className:n("relative overflow-hidden",t),...i,children:[le(w.Viewport,{className:n("h-full w-full rounded-[inherit]",e),children:r}),le(ft,{}),le(w.Corner,{})]}));ce.displayName=w.Root.displayName;var ft=Fe.forwardRef(({className:t,orientation:e="vertical",...r},i)=>le(w.ScrollAreaScrollbar,{ref:i,orientation:e,className:n("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:le(w.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));ft.displayName=w.ScrollAreaScrollbar.displayName;import{jsx as I,jsxs as xe}from"react/jsx-runtime";var gt=({className:t,value:e,placeholder:r="",status:i,disabled:o})=>I(B,{asChild:!0,disabled:o,children:xe("button",{disabled:o,className:n(F({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??r??"Select options...",I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:I("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Ne=({options:t=[],value:e,onChange:r,containerClassName:i,placeholder:o,disabled:a,loading:l,optionComponent:s,children:d,modal:c=!1,hideSearch:m,className:u,inputValue:p,onValueChange:C,onInputValueChange:x})=>{let[P,ye]=W.useState(!1),z=W.useRef(null),[Re,De]=W.useState(void 0);return W.useLayoutEffect(()=>{z.current&&De(z.current.clientWidth)},[z.current]),xe(U,{modal:c,open:P,onOpenChange:ye,children:[I("div",{className:n("w-full",u),ref:z,children:d}),I(G,{portal:!c,className:"p-0 min-w-[200px]",style:{width:Re},children:xe(te,{className:n("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&I(re,{loading:l,placeholder:o??"Search options...",onValueChange:x,value:p,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),I(ce,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",i),children:xe(oe,{children:[!m&&I(ae,{children:"No result found."}),I(ne,{className:"w-full",children:t?.map(K=>I(ie,{defaultValue:e?.label,value:K.label,disabled:a,onSelect:()=>{r(K),ye(!1),C?.(K?.value)},children:s?s(K):K.label},K.value))})]})})]})})]})};var Ae=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],yt=()=>{let t={};return Ae?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};import*as me from"react";import*as we from"react-phone-number-input";import fr from"react-phone-number-input/flags";import{jsx as de,jsxs as ur}from"react/jsx-runtime";var mr=t=>ur("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...t,children:[de("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",de("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),de("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),de("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),de("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Ct=mr;import{jsx as f,jsxs as pe}from"react/jsx-runtime";var bt=me.forwardRef(({className:t,onChange:e,defaultCountry:r="NG",modal:i,showAsterisk:o,label:a,description:l,error:s,...d},c)=>{let m=u=>f(gr,{...u,status:d.status,modal:i});return pe("div",{className:"relative space-y-1",children:[f(N,{showAsterisk:o,error:s,children:a}),f(we.default,{ref:c,className:n("flex",t),flagComponent:O,countrySelectComponent:m,inputComponent:ht,defaultCountry:r,onChange:u=>{e&&e?.(u)},...d}),f(D,{className:"text-gray-400 text-sm !font-normal",children:l}),f(R,{error:s})]})});bt.displayName="PhoneInput";var ht=me.forwardRef(({className:t,...e},r)=>f(M,{className:n("!rounded-s-none h-10",t),...e,ref:r}));ht.displayName="InputComponent";var gr=({disabled:t,value:e,onChange:r,options:i,status:o,modal:a})=>{let l=me.useCallback(s=>{r(s)},[r]);return pe(U,{modal:a,children:[f(B,{disabled:t,children:pe("div",{className:n(F({status:o}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[f(O,{country:e,countryName:e}),f("svg",{className:n("mr-0.5 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:f("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),f(G,{portal:!a,className:"w-[200px] md:w-[300px] p-0",children:f(te,{children:f(oe,{children:pe(ce,{className:"h-72",children:[f(re,{placeholder:"Search country..."}),f(ae,{children:"No country found."}),f(ne,{children:i.filter(s=>s.value).map(s=>pe(ie,{className:"gap-2",onSelect:()=>l(s.value),children:[f(O,{country:s.value,countryName:s.label}),f("span",{className:"flex-1 text-sm",children:s.label}),s.value&&f("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${we.getCountryCallingCode(s.value)}`}),f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",s.value===e?"opacity-100":"opacity-0"),children:f("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},O=({country:t,countryName:e,className:r})=>{let i=fr[t];return t==="GLOBAL"?f("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:f(Ct,{className:"w-full h-[90%]"})}):f("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:i&&f(i,{title:e})})};O.displayName="FlagComponent";import{jsx as L,jsxs as ue}from"react/jsx-runtime";var yr=yt(),Cr=({className:t,value:e,placeholder:r="",status:i,disabled:o})=>L(B,{asChild:!0,disabled:o,children:ue("button",{disabled:o,className:n(F({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?ue("div",{className:"flex gap-2 items-center",children:[L(O,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),ue("span",{className:"",children:[" ",yr[e]]})]}):r??"Select options...",L("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:L("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),br=({hideSearch:t=!0,showAsterisk:e,label:r,description:i,error:o,...a})=>{let l=Ae?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return ue("div",{className:"relative space-y-1",children:[L(N,{showAsterisk:e,error:o,children:r}),L(Ne,{options:l,hideSearch:t,optionComponent:s=>ue("div",{className:"w-full flex items-center gap-2",children:[L(O,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),L("span",{className:"flex-1 text-sm",children:s?.label})]}),...a,children:L(Cr,{value:a?.value?.value,status:a?.status,placeholder:a?.placeholder??" Select Country"})}),L(D,{className:"text-gray-400 text-sm !font-normal",children:i}),L(R,{error:o})]})};import{jsx as fe,jsxs as vr}from"react/jsx-runtime";var hr=({showAsterisk:t,label:e,description:r,error:i,hideSearch:o=!0,status:a,...l})=>vr("div",{className:"relative space-y-1",children:[fe(N,{showAsterisk:t,error:i,children:e}),fe(Ne,{hideSearch:o,...l,containerClassName:"h-full",children:fe(gt,{disabled:l?.disabled,placeholder:"Select or search email",status:a,value:l?.value?.label??l?.value?.value})}),fe(D,{className:"text-gray-400 text-sm !font-normal",children:r}),fe(R,{error:i})]});import xr from"react-otp-input";import{cva as Nr}from"class-variance-authority";import{useMemo as wr}from"react";import{jsx as vt}from"react/jsx-runtime";var Pr=Nr("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Rr=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:i="-",status:o,...a})=>{let l=wr(()=>i||new Array(t).fill("").reduce((c,m)=>c+=m,""),[t,i]);return vt(xr,{numInputs:t,placeholder:l,containerStyle:n("w-full",r),inputStyle:n(Pr({status:o}),e),renderInput:s=>vt("input",{...s}),...a})};import{useState as Dr}from"react";import{Copy as kr,CheckIcon as Lr}from"lucide-react";import{motion as Sr,AnimatePresence as Tr}from"framer-motion";import{jsx as X,jsxs as Er}from"react/jsx-runtime";var Ir=({text:t,onCopy:e,iconsPosition:r="right",clampText:i=!0})=>{let[o,a]=Dr(!1),l=()=>{navigator.clipboard.writeText(t).then(()=>{a(!0),e?.(),setTimeout(()=>a(!1),2e3)})},s=o?Lr:kr;return Er("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&X(xt,{Icon:s,onClick:l,copied:o}),X("span",{className:`${i?"truncate max-w-[100px]":""}`,children:t}),r==="right"&&X(xt,{Icon:s,onClick:l,copied:o})]})},xt=({Icon:t,onClick:e,copied:r})=>X(Tr,{mode:"wait",children:X(Sr.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:e,children:X(t,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as Nt,useState as Fr}from"react";import{Search as Ar}from"lucide-react";import{jsx as wt}from"react/jsx-runtime";var Me=({value:t,onChange:e,debounce:r=500,addon:i,...o})=>{let[a,l]=Fr(t??""),s=d=>l(d.target.value);return Nt(()=>{t&&l(t)},[t]),Nt(()=>{let d=setTimeout(()=>{e(a)},r);return()=>clearTimeout(d)},[a,r,e]),wt(M,{leftNode:i??wt(Ar,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:n("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:a})};import{jsx as Ve}from"react/jsx-runtime";var Mr=({status:t,variant:e,className:r})=>Ve("div",{children:Ve("div",{className:n("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":e==="success"},{"bg-gray-500/20 text-white":e==="abandoned"},{"bg-red-500/20 text-red-500":e==="failed"},{"bg-yellow-500/20 text-yellow-500":e==="pending"},r),children:Ve("p",{children:t.replace("-"," ")})})});import{Download as Gr,ListFilter as Wr,Loader as Zr,RotateCw as zr}from"lucide-react";import{ChevronLeftIcon as Br,ChevronRightIcon as Or}from"lucide-react";import{jsx as Be}from"react/jsx-runtime";var Vr=({page:t,currentPage:e,onClick:r})=>typeof t=="string"?Be("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:t}):Be("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${t===e?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:t}),Pt=({totalPages:t,currentPage:e,handlePageClick:r})=>{let o=()=>{let d=Math.floor(1.5),c=Math.max(1,e-d),m=Math.min(t,c+3-1);return m>t&&(c=Math.max(1,t-3+1),m=t),{start:c,end:m}},{start:a,end:l}=o(),s=[];return a>1&&s.push(1),a>2&&s.push("..."),s.push(...Array.from({length:l-a+1},(d,c)=>a+c)),l<t-1&&s.push("..."),l<t&&s.push(t),s.map((d,c)=>Be(Vr,{page:d,currentPage:e,onClick:typeof d=="number"?()=>r(d):void 0},c))};import{jsx as Y,jsxs as Oe}from"react/jsx-runtime";var Rt=({currentPage:t=1,totalPages:e=1,onPageChange:r,itemsPerPage:i=0,totalItems:o=0})=>{let a=d=>{d>=1&&d<=e&&r?.(d)},l=i===0?1:i*(t-1)+1,s=t===e?o:Math.min(l+i-1,o);return Oe("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[o&&Y("section",{className:"text-[#717171] text-[12px]",children:Oe("p",{className:"",children:["Showing ",l," - ",s," of ",o]})}),Y("div",{className:"flex items-center justify-center sm:justify-end ",children:Oe("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Y("button",{onClick:()=>a(t-1),disabled:t===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Y(Br,{className:"size-5"})}),Pt({currentPage:t,totalPages:e,handlePageClick:a}),Y("button",{onClick:()=>a(t+1),disabled:t===e,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Y(Or,{className:"size-5"})})]})})]})};import{flexRender as Dt}from"@tanstack/react-table";import{jsx as A,jsxs as Hr}from"react/jsx-runtime";var kt=({table:t,isMobile:e,onRowClick:r,id:i})=>A("div",{className:n("relative w-full rounded-b border-0",{}),children:Hr("table",{id:i??"table",className:"w-full overflow-x-scroll",children:[A("thead",{children:t.getHeaderGroups().map(o=>A("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(a=>A("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:a.colSpan,style:{width:a.getSize()},children:a.isPlaceholder?null:A("div",{className:n("flex items-center",{"cursor-pointer select-none":a.column.getCanSort()}),onClick:a.column.getToggleSortingHandler(),children:a.isPlaceholder?null:Dt(a.column.columnDef.header,a.getContext())})},a.id))},o.id))}),A("tbody",{className:" pl-2.5",children:t?.getFilteredRowModel().rows.map(o=>A("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!e},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(a=>A("td",{className:n("",{}),children:A("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:Dt(a.column.columnDef.cell,a.getContext())})},a.id))},o.id))})]})});import{jsx as y,jsxs as j}from"react/jsx-runtime";var Kr=({table:t,isMobile:e=!1,onRowClick:r,id:i,onRefetch:o,isRefetching:a,FilterMenu:l,ExtraNode:s,onExport:d,search:c={enabled:!1,debounceRate:700},download:m={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:p})=>{let C=()=>{try{o?.()}catch(P){console.error("Error while refetching data",P)}},x=P=>{c?.onSearch?.(P)};return j("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||c?.enabled||l||s||d)&&j("div",{className:"sticky top-0 z-10 w-full flex flex-col sm:flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[y("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:j("div",{className:" w-full flex gap-x-3",children:[c?.enabled&&y("section",{className:"sm:w-56",children:y(Me,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:x,debounce:c?.debounceRate})}),j("div",{className:" flex gap-2",children:[o&&y(_,{onClick:C,title:"Refetch Data",disabled:a,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:y(zr,{className:n("w-4 h-4",{"animate-spin":a}),size:5})}),l&&y(ve,{trigger:y("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",be({variant:"outlined",size:"sm"})),children:y(Wr,{className:"w-4 h-4",size:5})}),children:l})]})]})}),y("div",{className:"flex items-start flex-col gap-2 justify-center",children:y("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:j("div",{className:"flex gap-2",children:[s&&s,d&&y(_,{variant:"primary",onClick:d,size:"sm",children:"Export"}),m?.enabled&&y(_,{variant:"primary",leftNode:y(Gr,{className:n("w-4 h-4",{"animate-spin":a}),size:5}),onClick:m?.onDownload,id:m.buttonId,size:"sm",children:m?.buttonText})]})})})]}),y("main",{className:"w-full overflow-x-auto mt-5",children:u?j("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[y(Zr,{size:20,className:"animate-spin"}),y("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):t.getRowModel().rows.length<1?y("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:y("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):y("div",{className:"flex flex-col gap-2",children:y(kt,{table:t,isMobile:e,onRowClick:r,id:i})})}),!u&&p?.enabled&&t.getRowModel().rows.length>0&&y(Rt,{...p,currentPage:p?.currentPage??1,totalPages:p?.totalPages??Math.ceil((p?.totalItems??0)/Math.max(p?.itemsPerPage??1,1))??1,onPageChange:P=>p?.onPageChange?.(P)})]})};import{useEffect as Lt}from"react";import{X as _r}from"lucide-react";import{jsx as E,jsxs as J}from"react/jsx-runtime";var $r=t=>{let{environment:e,branch:r,version:i,deployTime:o,showBanner:a,onClose:l,initDefault:s,removeFromStorage:d,syncLocalStorageToState:c}=t,m=e||process.env.NEXT_PUBLIC_NODE_ENV;return m!=="staging"&&m!=="sandbox"||(Lt(()=>{c()},[c]),Lt(()=>{let u;return(m==="staging"||m==="sandbox")&&(u=setInterval(()=>{d(),s()},5*60*1e3)),()=>{u&&clearInterval(u)}},[a,e,l,d,s,m]),!a)?null:J("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[E("button",{onClick:l,className:"absolute top-2 right-2",children:E(_r,{})}),J("div",{className:"space-y-2 text-sm",children:[J("div",{className:"flex gap-2",children:[E("span",{className:"font-medium",children:"Environment:"}),E("span",{className:"text-blue-600 capitalize",children:m})]}),J("div",{className:"flex gap-2",children:[E("span",{className:"font-medium",children:"Branch:"}),E("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),J("div",{className:"flex gap-2",children:[E("span",{className:"font-medium",children:"Version:"}),E("span",{className:"text-purple-600",children:i||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),J("div",{className:"flex gap-2",children:[E("span",{className:"font-medium",children:"Deploy Time:"}),E("span",{className:"text-orange-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{useState as Ur,useEffect as Xr}from"react";import{jsx as b,jsxs as Z}from"react/jsx-runtime";var Yr=({type:t})=>t==="gray"?b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):t==="info"?b("svg",{stroke:"#70B6F6",fill:"#70B6F6","stroke-width":"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):t==="warning"?b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):t==="success"?b("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),jr=({type:t="info",title:e,description:r,open:i,showCloseButton:o,bottomNode:a,sideNode:l,onClose:s,showIcon:d=!0})=>{let[c,m]=Ur(i);Xr(()=>{m(i)},[i]);let u="",p="";switch(t){case"gray":u="#eeeef0",p="#79818c";break;case"info":u="#ebf5fd",p="#70B6F6";break;case"warning":u="#fff8df",p="#ffc700";break;case"success":u="#e0f9f0",p="#49e0aa";break;case"danger":u="#fde8e9",p="#f3777c";break;default:u="#eeeef0",p="#79818c";break}function C(){m(!1),s&&s()}return c?Z("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[b("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:p||"#70B6F6"}}),Z("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[Z("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[d&&b("div",{className:"h-full flex justify-end",children:b(Yr,{type:t})}),Z("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[Z("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(e||r)&&Z("div",{children:[e&&b("div",{className:"text-sm font-bold text-[#191919]",children:e}),r&&b("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),a]}),l]})]}),o&&b("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:b("button",{onClick:C,children:Z("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),b("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};var St={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},ge=class ge{static getCurrencyLocaleMap(e){return{XOF:"fr",XAF:"fr"}[e]||"en"}static koboToNaira(e){return+e/100}static nairaToKobo(e){return+e*100}static getCurrencySymbol(e){return St[e]||e}};He(ge,"formatAmountAndCurrency",(e,r,i)=>{let o=new Intl.NumberFormat(i?.locale||ge.getCurrencyLocaleMap(e),{maximumFractionDigits:3,style:"currency",currency:e,currencyDisplay:"symbol"}).format(i?.convertToMajorCurrency?ge.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),a=St[e]||e;return o.replace(e,a)});var Tt=ge;import*as Pe from"dayjs";var It=class{static getDateLibrary(){return Pe()}static formatTimestampToDate(e,r){return Pe.unix(e).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(e){return Pe(e).unix()}};export{Tt as AmountAction,jr as Banner,_ as Button,Ir as CopyableLabel,br as Country,St as CurrencySymbolMap,It as DateAction,Me as DebouncedInput,$r as DevBanner,Ee as Dialog,O as FlagComponent,N as FormLabel,M as Input,Q as Loader,Rr as OTPInput,ot as PasswordInput,bt as PhoneInput,ve as Popover,G as PopoverContent,U as PopoverRoot,B as PopoverTrigger,hr as Select,Mr as Status,Kr as Table,at as Textarea,be as buttonVariants,n as cn};
1
+ var Zt=Object.defineProperty;var zt=(e,t,r)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ze=(e,t,r)=>zt(e,typeof t!="symbol"?t+"":t,r);import Yt from"react";import*as Ke from"react";import*as Le from"@radix-ui/react-label";import{cva as $t}from"class-variance-authority";import{clsx as Kt}from"clsx";import{twMerge as _t}from"tailwind-merge";function n(...e){return _t(Kt(e))}import{jsx as Xt}from"react/jsx-runtime";var Ut=$t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Se=Ke.forwardRef(({className:e,...t},r)=>Xt(Le.Root,{ref:r,className:n(Ut(),e),...t}));Se.displayName=Le.Root.displayName;import{jsx as _e,jsxs as jt}from"react/jsx-runtime";var N=Yt.forwardRef(({className:e,children:t,showAsterisk:r,error:o,...a},i)=>_e(Se,{ref:i,className:n(o&&"text-red-500",e),...a,children:r?jt("p",{children:[t,_e("span",{className:"text-red-500",children:"*"})]}):t}));N.displayName="FormLabel";import{jsx as $e,jsxs as Jt}from"react/jsx-runtime";var q=({size:e=16,colour:t="primary"})=>Jt("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[$e("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),$e("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as he from"react";import{Slot as Qt}from"@radix-ui/react-slot";import{cva as qt}from"class-variance-authority";import{Fragment as Ue,jsx as ee,jsxs as er}from"react/jsx-runtime";var ve=qt("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),U=he.forwardRef(({className:e,variant:t="primary",size:r,asChild:o=!1,isLoading:a=!1,leftNode:i,rightNode:l,LoaderSize:s,...d},c)=>{let m=o?Qt:"button",{children:u,disabled:p,...C}=d,x=he.useRef(null);return ee(m,{className:n(ve({variant:t,size:r,className:e})),ref:x||c,disabled:p||a,...C,children:ee("div",{className:"flex font-medium justify-center items-center gap-2",children:a?ee(Ue,{children:ee("span",{className:"mx-auto",children:ee(q,{size:s,colour:"secondary"})})}):er(Ue,{children:[i,u,l]})})})});U.displayName="Button";import*as Fe from"react";import{cva as Te}from"class-variance-authority";import tr from"react";import{jsx as rr}from"react/jsx-runtime";var D=tr.forwardRef(({className:e,children:t,error:r,...o},a)=>{let i=r??t;return i?rr("p",{ref:a,className:n("text-xs font-normal text-[#F04248]",e),...o,children:i}):null});D.displayName="ErrorMessage";import or from"react";import{jsx as ar}from"react/jsx-runtime";var k=or.forwardRef(({className:e,...t},r)=>ar("div",{ref:r,className:n("text-sm text-[#8E98A8",e),...t}));k.displayName="FormDescription";import{jsx as Z,jsxs as Ye}from"react/jsx-runtime";var nr=Te("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),je=Fe.forwardRef(({className:e,status:t,type:r,...o},a)=>Z("input",{type:r,className:n(nr({status:t}),e),ref:a,...o}));je.displayName="BaseInnerInput";var A=Te("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Xe=Te("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),O=Fe.forwardRef(({className:e,status:t="default",disabled:r,error:o,isLoading:a,sideNodeClassName:i,showAsterisk:l,label:s,description:d,...c},m)=>{let u=t;return o&&(u="error"),a&&(u="loading"),r&&(u="prefilled"),Ye("div",{className:"relative space-y-1 w-full",children:[s&&Z(N,{showAsterisk:l,error:o,children:s}),Ye("div",{className:n(A({status:u}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?Z("div",{className:n(Xe({status:u,side:"left"}),i),children:c.leftNode}):null,Z(je,{ref:m,disabled:a||r,className:n({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral"}),...c}),c.rightNode?Z("div",{className:n(Xe({status:u,side:"right"}),i),children:c.rightNode}):null]}),d&&Z(k,{className:"text-gray-400 text-sm !font-normal",children:d}),Z(D,{error:o})]})});O.displayName="Input";import{useMemo as lr,useState as nt}from"react";import{jsx as Je,jsxs as ir}from"react/jsx-runtime";var Qe=()=>ir("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Je("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Je("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as qe,jsxs as sr}from"react/jsx-runtime";var et=()=>sr("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[qe("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),qe("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as tt}from"react/jsx-runtime";var rt=()=>tt("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:tt("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as ot}from"react/jsx-runtime";var at=()=>ot("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ot("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as F,jsxs as cr}from"react/jsx-runtime";var it=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],st=({onValidate:e,onChange:t,disableValidation:r,...o})=>{let[a,i]=nt(!1),[l,s]=nt(it),d=p=>it.map(C=>({...C,validated:C.RegExp.test(p)})),c=p=>{let C=d(p),x=C.every(R=>R.validated);return s(C),x},m=p=>{if(t&&t(p),r)return;let C=p?.target?.value,x=c(C);e&&e(x,C)},u=lr(()=>F("div",{className:"flex items-center gap-2",children:l?.map(p=>cr("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":p?.validated,"text-[#8E98A8]":!p?.validated}),children:[F("span",{className:"",children:p?.validated?F(rt,{}):F(at,{})}),F("span",{className:"",children:p?.label})]},p?.key))}),[l]);return F(O,{sideNodeClassName:"!border-l-0",rightNode:a?F("button",{type:"button",onClick:()=>i(p=>!p),children:F(Qe,{})}):F("button",{type:"button",onClick:()=>i(p=>!p),children:F(et,{})}),type:a?"text":"password",onChange:m,description:!r&&u,...o})};st.displayName="PasswordInput";import{cva as dr}from"class-variance-authority";import{jsx as xe,jsxs as pr}from"react/jsx-runtime";var Na=dr("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),lt=({className:e,status:t="default",disabled:r,error:o,isLoading:a,showAsterisk:i,label:l,description:s,...d})=>{let c=t;return o&&(c="error"),a&&(c="loading"),r&&(c="prefilled"),pr("div",{className:"relative space-y-1",children:[xe(N,{showAsterisk:i,error:o,children:l}),xe("textarea",{className:n("min-h-[80px]",A({status:c}),e),disabled:a||r,...d}),xe(k,{className:"text-gray-400 text-sm !font-normal",children:s}),xe(D,{error:o})]})};lt.displayName="Textarea";import*as z from"react";import*as G from"react";import{Command as v}from"cmdk";import{Search as yr}from"lucide-react";import*as te from"react";import*as g from"@radix-ui/react-dialog";import{jsx as ct,jsxs as mr}from"react/jsx-runtime";var dt=()=>mr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[ct("path",{d:"M18 6 6 18"}),ct("path",{d:"m6 6 12 12"})]});import{Fragment as gr,jsx as h,jsxs as X}from"react/jsx-runtime";var ur=g.Root,fr=g.Trigger,pt=g.Portal,mt=te.forwardRef(({className:e,...t},r)=>h(g.Overlay,{ref:r,className:n("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));mt.displayName=g.Overlay.displayName;var Ee=te.forwardRef(({className:e,hideCloseButton:t,children:r,...o},a)=>X(pt,{children:[h(mt,{}),X(g.Content,{ref:a,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...o,children:[r,!t&&X(g.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h(dt,{}),h("span",{className:"sr-only",children:"Close"})]})]})]}));Ee.displayName=g.Content.displayName;var ut=({className:e,...t})=>h("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});ut.displayName="DialogHeader";var ft=({className:e,...t})=>h("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});ft.displayName="DialogFooter";var gt=te.forwardRef(({className:e,...t},r)=>h(g.Title,{ref:r,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));gt.displayName=g.Title.displayName;var yt=te.forwardRef(({className:e,...t},r)=>h(g.Description,{ref:r,className:n("text-sm text-gray-500",e),...t}));yt.displayName=g.Description.displayName;var Ie=({trigger:e=void 0,children:t,open:r,onOpenChange:o,hideCloseButton:a,footer:i,title:l,description:s,contentClassName:d,headerClassName:c,titleClassName:m,descriptionClassName:u,footerClassName:p,asChild:C=!0,onOpenAutoFocus:x,onCloseAutoFocus:R,onEscapeKeyDown:be,onInteractOutside:_,onPointerDownOutside:De,...ke})=>X(ur,{...ke,open:r,onOpenChange:o,children:[h(fr,{asChild:C,children:e}),h(pt,{children:X(Ee,{className:d,hideCloseButton:a,onOpenAutoFocus:x,onCloseAutoFocus:R,onEscapeKeyDown:be,onPointerDownOutside:De,onInteractOutside:_,children:[l||s?X(ut,{className:c,children:[l&&h(gt,{className:m,children:l}),s&&h(yt,{className:u,children:s})]}):h(gr,{}),t,i&&h(ft,{className:p,children:i})]})})]});Ie.displayName=g.Dialog.displayName;import{Fragment as Ba,jsx as T,jsxs as hr}from"react/jsx-runtime";var re=G.forwardRef(({className:e,...t},r)=>T(v,{ref:r,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));re.displayName=v.displayName;var oe=G.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...o},a)=>hr("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?T(q,{size:16,colour:"secondary"}):T(yr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),T(v.Input,{ref:a,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...o})]}));oe.displayName=v.Input.displayName;var ae=G.forwardRef(({className:e,...t},r)=>T(v.List,{ref:r,className:n("overflow-y-auto overflow-x-hidden",e),...t}));ae.displayName=v.List.displayName;var ne=G.forwardRef((e,t)=>T(v.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ne.displayName=v.Empty.displayName;var ie=G.forwardRef(({className:e,...t},r)=>T(v.Group,{ref:r,className:n("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ie.displayName=v.Group.displayName;var Cr=G.forwardRef(({className:e,...t},r)=>T(v.Separator,{ref:r,className:n("-mx-1 h-px bg-border",e),...t}));Cr.displayName=v.Separator.displayName;var se=G.forwardRef(({className:e,...t},r)=>T(v.Item,{ref:r,className:n("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));se.displayName=v.Item.displayName;var br=({className:e,...t})=>T("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});br.displayName="CommandShortcut";import*as Ct from"react";import*as L from"@radix-ui/react-popover";import{jsx as le,jsxs as vr}from"react/jsx-runtime";var H=L.Root,E=L.Trigger,V=Ct.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:o=!0,...a},i)=>o?le(L.Portal,{children:le(L.Content,{ref:i,align:t,sideOffset:r,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):le(L.Content,{ref:i,align:t,sideOffset:r,className:n("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));V.displayName=L.Content.displayName;var Ne=({trigger:e,children:t,open:r,onOpenChange:o,contentClassName:a,asChild:i=!0,align:l,side:s,alignOffset:d,triggerClassName:c,sideOffset:m,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:C=!0,...x})=>vr(H,{...x,open:r,onOpenChange:o,children:[le(E,{asChild:i,className:c,children:e}),le(V,{alignOffset:d,sideOffset:m,side:s,align:l,className:a,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:C,children:t})]});Ne.displayName=L.Root.displayName;import*as Me from"react";import*as w from"@radix-ui/react-scroll-area";import{jsx as ce,jsxs as xr}from"react/jsx-runtime";var de=Me.forwardRef(({className:e,viewPortClassName:t,children:r,...o},a)=>xr(w.Root,{ref:a,className:n("relative overflow-hidden",e),...o,children:[ce(w.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:r}),ce(bt,{}),ce(w.Corner,{})]}));de.displayName=w.Root.displayName;var bt=Me.forwardRef(({className:e,orientation:t="vertical",...r},o)=>ce(w.ScrollAreaScrollbar,{ref:o,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:ce(w.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));bt.displayName=w.ScrollAreaScrollbar.displayName;import{jsx as I,jsxs as we}from"react/jsx-runtime";var ht=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>I(E,{asChild:!0,disabled:a,children:we("button",{disabled:a,className:n(A({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??r??"Select options...",I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:I("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Pe=({options:e=[],value:t,onChange:r,containerClassName:o,placeholder:a,disabled:i,loading:l,optionComponent:s,children:d,modal:c=!1,hideSearch:m,className:u,inputValue:p,onValueChange:C,onInputValueChange:x})=>{let[R,be]=z.useState(!1),_=z.useRef(null),[De,ke]=z.useState(void 0);return z.useLayoutEffect(()=>{_.current&&ke(_.current.clientWidth)},[_.current]),we(H,{modal:c,open:R,onOpenChange:be,children:[I("div",{className:n("w-full",u),ref:_,children:d}),I(V,{portal:!c,className:"p-0 min-w-[200px]",style:{width:De},children:we(re,{className:n("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&I(oe,{loading:l,placeholder:a??"Search options...",onValueChange:x,value:p,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),I(de,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",o),children:we(ae,{children:[!m&&I(ne,{children:"No result found."}),I(ie,{className:"w-full",children:e?.map($=>I(se,{defaultValue:t?.label,value:$.label,disabled:i,onSelect:()=>{r($),be(!1),C?.($?.value)},children:s?s($):$.label},$.value))})]})})]})})]})};var Ae=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],vt=()=>{let e={};return Ae?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as ue from"react";import*as Re from"react-phone-number-input";import Pr from"react-phone-number-input/flags";import{jsx as pe,jsxs as wr}from"react/jsx-runtime";var Nr=e=>wr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[pe("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",pe("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),pe("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),pe("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),pe("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),xt=Nr;import{jsx as f,jsxs as me}from"react/jsx-runtime";var Nt=ue.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",modal:o,showAsterisk:a,label:i,description:l,error:s,...d},c)=>{let m=u=>f(Rr,{...u,status:d.status,modal:o});return me("div",{className:"relative space-y-1",children:[f(N,{showAsterisk:a,error:s,children:i}),f(Re.default,{ref:c,className:n("flex",e),flagComponent:W,countrySelectComponent:m,inputComponent:wt,defaultCountry:r,onChange:u=>{t&&t?.(u)},...d}),f(k,{className:"text-gray-400 text-sm !font-normal",children:l}),f(D,{error:s})]})});Nt.displayName="PhoneInput";var wt=ue.forwardRef(({className:e,...t},r)=>f(O,{className:n("!rounded-s-none h-10",e),...t,ref:r}));wt.displayName="InputComponent";var Rr=({disabled:e,value:t,onChange:r,options:o,status:a,modal:i})=>{let l=ue.useCallback(s=>{r(s)},[r]);return me(H,{modal:i,children:[f(E,{disabled:e,children:me("div",{className:n(A({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[f(W,{country:t,countryName:t}),f("svg",{className:n("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:f("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),f(V,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:f(re,{children:f(ae,{children:me(de,{className:"h-72",children:[f(oe,{placeholder:"Search country..."}),f(ne,{children:"No country found."}),f(ie,{children:o.filter(s=>s.value).map(s=>me(se,{className:"gap-2",onSelect:()=>l(s.value),children:[f(W,{country:s.value,countryName:s.label}),f("span",{className:"flex-1 text-sm",children:s.label}),s.value&&f("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Re.getCountryCallingCode(s.value)}`}),f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:f("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},W=({country:e,countryName:t,className:r})=>{let o=Pr[e];return e==="GLOBAL"?f("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:f(xt,{className:"w-full h-[90%]"})}):f("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&f(o,{title:t})})};W.displayName="FlagComponent";import{jsx as S,jsxs as fe}from"react/jsx-runtime";var Dr=vt(),kr=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>S(E,{asChild:!0,disabled:a,children:fe("button",{disabled:a,className:n(A({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?fe("div",{className:"flex gap-2 items-center",children:[S(W,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),fe("span",{className:"",children:[" ",Dr[t]]})]}):r??"Select options...",S("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:S("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Lr=({hideSearch:e=!0,showAsterisk:t,label:r,description:o,error:a,...i})=>{let l=Ae?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return fe("div",{className:"relative space-y-1",children:[S(N,{showAsterisk:t,error:a,children:r}),S(Pe,{options:l,hideSearch:e,optionComponent:s=>fe("div",{className:"w-full flex items-center gap-2",children:[S(W,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),S("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:S(kr,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),S(k,{className:"text-gray-400 text-sm !font-normal",children:o}),S(D,{error:a})]})};import{jsx as ge,jsxs as Fr}from"react/jsx-runtime";var Sr=({showAsterisk:e,label:t,description:r,error:o,hideSearch:a=!0,status:i,...l})=>Fr("div",{className:"relative space-y-1",children:[ge(N,{showAsterisk:e,error:o,children:t}),ge(Pe,{hideSearch:a,...l,containerClassName:"h-full",children:ge(ht,{disabled:l?.disabled,placeholder:"Select or search email",status:i,value:l?.value?.label??l?.value?.value})}),ge(k,{className:"text-gray-400 text-sm !font-normal",children:r}),ge(D,{error:o})]});import Tr from"react-otp-input";import{cva as Er}from"class-variance-authority";import{useMemo as Ir}from"react";import{jsx as Pt}from"react/jsx-runtime";var Mr=Er("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Ar=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:o="-",status:a,...i})=>{let l=Ir(()=>o||new Array(e).fill("").reduce((c,m)=>c+=m,""),[e,o]);return Pt(Tr,{numInputs:e,placeholder:l,containerStyle:n("w-full",r),inputStyle:n(Mr({status:a}),t),renderInput:s=>Pt("input",{...s}),...i})};import{useState as Vr}from"react";import{Copy as Br,CheckIcon as Or}from"lucide-react";import{motion as Gr,AnimatePresence as Hr}from"framer-motion";import{jsx as Y,jsxs as Zr}from"react/jsx-runtime";var Wr=({text:e,textToCopy:t,onCopy:r,iconsPosition:o="right",clampText:a=!0,textClassName:i})=>{let[l,s]=Vr(!1),d=()=>{navigator.clipboard.writeText(t??e).then(()=>{s(!0),r?.(),setTimeout(()=>s(!1),2e3)})},c=l?Or:Br;return Zr("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[o==="left"&&Y(Rt,{Icon:c,onClick:d,copied:l}),Y("span",{className:n({"truncate max-w-[100px]":a},i),children:e}),o==="right"&&Y(Rt,{Icon:c,onClick:d,copied:l})]})},Rt=({Icon:e,onClick:t,copied:r})=>Y(Hr,{mode:"wait",children:Y(Gr.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Y(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as Dt,useState as zr}from"react";import{Search as Kr}from"lucide-react";import{jsx as kt}from"react/jsx-runtime";var Ve=({value:e,onChange:t,debounce:r=500,addon:o,...a})=>{let[i,l]=zr(e??""),s=d=>l(d.target.value);return Dt(()=>{e&&l(e)},[e]),Dt(()=>{let d=setTimeout(()=>{t(i)},r);return()=>clearTimeout(d)},[i,r,t]),kt(O,{leftNode:o??kt(Kr,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:n("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:s,value:i})};import{jsx as Be}from"react/jsx-runtime";var _r=({status:e,variant:t,className:r})=>Be("div",{children:Be("div",{className:n("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:Be("p",{children:e.replace("-"," ")})})});import{Download as jr,ListFilter as Jr,Loader as Qr,RotateCw as qr}from"lucide-react";import{ChevronLeftIcon as Ur,ChevronRightIcon as Xr}from"lucide-react";import{jsx as Oe}from"react/jsx-runtime";var $r=({page:e,currentPage:t,onClick:r})=>typeof e=="string"?Oe("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):Oe("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),Lt=({totalPages:e,currentPage:t,handlePageClick:r})=>{let a=()=>{let d=Math.floor(1.5),c=Math.max(1,t-d),m=Math.min(e,c+3-1);return m>e&&(c=Math.max(1,e-3+1),m=e),{start:c,end:m}},{start:i,end:l}=a(),s=[];return i>1&&s.push(1),i>2&&s.push("..."),s.push(...Array.from({length:l-i+1},(d,c)=>i+c)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((d,c)=>Oe($r,{page:d,currentPage:t,onClick:typeof d=="number"?()=>r(d):void 0},c))};import{jsx as j,jsxs as Ge}from"react/jsx-runtime";var St=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:o=0,totalItems:a=0})=>{let i=d=>{d>=1&&d<=t&&r?.(d)},l=o===0?1:o*(e-1)+1,s=e===t?a:Math.min(l+o-1,a);return Ge("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&j("section",{className:"text-[#717171] text-[12px]",children:Ge("p",{className:"",children:["Showing ",l," - ",s," of ",a]})}),j("div",{className:"flex items-center justify-center sm:justify-end ",children:Ge("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[j("button",{onClick:()=>i(e-1),disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:j(Ur,{className:"size-5"})}),Lt({currentPage:e,totalPages:t,handlePageClick:i}),j("button",{onClick:()=>i(e+1),disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:j(Xr,{className:"size-5"})})]})})]})};import{flexRender as Ft}from"@tanstack/react-table";import{jsx as B,jsxs as Yr}from"react/jsx-runtime";var Tt=({table:e,isMobile:t,onRowClick:r,id:o})=>B("div",{className:n("relative w-full rounded-b border-0",{}),children:Yr("table",{id:o??"table",className:"w-full overflow-x-scroll",children:[B("thead",{children:e.getHeaderGroups().map(a=>B("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(i=>B("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:i.colSpan,style:{width:i.getSize()},children:i.isPlaceholder?null:B("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:Ft(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),B("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>B("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(a):{},children:a.getVisibleCells().map(i=>B("td",{className:n("",{}),children:B("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:Ft(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});import{jsx as y,jsxs as J}from"react/jsx-runtime";var eo=({table:e,isMobile:t=!1,onRowClick:r,id:o,onRefetch:a,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:d,search:c={enabled:!1,debounceRate:700},download:m={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:p})=>{let C=()=>{try{a?.()}catch(R){console.error("Error while refetching data",R)}},x=R=>{c?.onSearch?.(R)};return J("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[(a||c?.enabled||l||s||d)&&J("div",{className:"sticky top-0 z-10 w-full flex flex-col sm:flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[y("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:J("div",{className:" w-full flex gap-x-3",children:[c?.enabled&&y("section",{className:"sm:w-56",children:y(Ve,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:x,debounce:c?.debounceRate})}),J("div",{className:" flex gap-2",children:[a&&y(U,{onClick:C,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:y(qr,{className:n("w-4 h-4",{"animate-spin":i}),size:5})}),l&&y(Ne,{trigger:y("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ve({variant:"outlined",size:"sm"})),children:y(Jr,{className:"w-4 h-4",size:5})}),children:l})]})]})}),y("div",{className:"flex items-start flex-col gap-2 justify-center",children:y("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:J("div",{className:"flex gap-2",children:[s&&s,d&&y(U,{variant:"primary",onClick:d,size:"sm",children:"Export"}),m?.enabled&&y(U,{variant:"primary",leftNode:y(jr,{className:n("w-4 h-4",{"animate-spin":i}),size:5}),onClick:m?.onDownload,id:m.buttonId,size:"sm",children:m?.buttonText})]})})})]}),y("main",{className:"w-full overflow-x-auto mt-5",children:u?J("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[y(Qr,{size:20,className:"animate-spin"}),y("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?y("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:y("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):y("div",{className:"flex flex-col gap-2",children:y(Tt,{table:e,isMobile:t,onRowClick:r,id:o})})}),!u&&p?.enabled&&e.getRowModel().rows.length>0&&y(St,{...p,currentPage:p?.currentPage??1,totalPages:p?.totalPages??Math.ceil((p?.totalItems??0)/Math.max(p?.itemsPerPage??1,1))??1,onPageChange:R=>p?.onPageChange?.(R)})]})};import{useEffect as Et}from"react";import{X as to}from"lucide-react";import{jsx as M,jsxs as Q}from"react/jsx-runtime";var ro=e=>{let{environment:t,branch:r,version:o,deployTime:a,showBanner:i,onClose:l,initDefault:s,removeFromStorage:d,syncLocalStorageToState:c}=e,m=t||process.env.NEXT_PUBLIC_NODE_ENV;return m!=="staging"&&m!=="sandbox"||(Et(()=>{c()},[c]),Et(()=>{let u;return(m==="staging"||m==="sandbox")&&(u=setInterval(()=>{d(),s()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,t,l,d,s,m]),!i)?null:Q("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[M("button",{onClick:l,className:"absolute top-2 right-2",children:M(to,{})}),Q("div",{className:"space-y-2 text-sm",children:[Q("div",{className:"flex gap-2",children:[M("span",{className:"font-medium",children:"Environment:"}),M("span",{className:"text-blue-600 capitalize",children:m})]}),Q("div",{className:"flex gap-2",children:[M("span",{className:"font-medium",children:"Branch:"}),M("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),Q("div",{className:"flex gap-2",children:[M("span",{className:"font-medium",children:"Version:"}),M("span",{className:"text-purple-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),Q("div",{className:"flex gap-2",children:[M("span",{className:"font-medium",children:"Deploy Time:"}),M("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{useState as oo,useEffect as ao}from"react";import{jsx as b,jsxs as K}from"react/jsx-runtime";var no=({type:e})=>e==="gray"?b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):e==="info"?b("svg",{stroke:"#70B6F6",fill:"#70B6F6","stroke-width":"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):e==="warning"?b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):e==="success"?b("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),io=({type:e="info",title:t,description:r,open:o,showCloseButton:a,bottomNode:i,sideNode:l,onClose:s,showIcon:d=!0})=>{let[c,m]=oo(o);ao(()=>{m(o)},[o]);let u="",p="";switch(e){case"gray":u="#eeeef0",p="#79818c";break;case"info":u="#ebf5fd",p="#70B6F6";break;case"warning":u="#fff8df",p="#ffc700";break;case"success":u="#e0f9f0",p="#49e0aa";break;case"danger":u="#fde8e9",p="#f3777c";break;default:u="#eeeef0",p="#79818c";break}function C(){m(!1),s&&s()}return c?K("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[b("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:p||"#70B6F6"}}),K("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[K("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[d&&b("div",{className:"h-full flex justify-end",children:b(no,{type:e})}),K("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[K("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||r)&&K("div",{children:[t&&b("div",{className:"text-sm font-bold text-[#191919]",children:t}),r&&b("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),i]}),l]})]}),a&&b("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:b("button",{onClick:C,children:K("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),b("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{jsx as It}from"react/jsx-runtime";var Mt=()=>It("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:It("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})});import{jsx as ye,jsxs as so}from"react/jsx-runtime";var At=e=>so("svg",{viewBox:"0 0 60 30",className:"w-full max-w-md h-auto","aria-label":"Union Jack - Flag of the United Kingdom",...e,children:[ye("rect",{width:"60",height:"30",fill:"#00247D"}),ye("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),ye("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),ye("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),ye("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as He,jsxs as lo}from"react/jsx-runtime";var Vt=e=>lo("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[He("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),He("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),He("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as Bt,jsxs as co}from"react/jsx-runtime";var Ot=()=>co("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Bt("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),Bt("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as po}from"@radix-ui/react-popover";import{jsx as P,jsxs as We}from"react/jsx-runtime";var mo=[{key:"en",label:"English"},{key:"fr",label:"French"}],uo=({locale:e})=>e==="fr"?P(Vt,{width:10}):P(At,{width:10}),fo=({locale:e})=>P("div",{className:"px-2 py-1 ",children:We("div",{className:"flex items-center gap-2.5",children:[P(uo,{locale:e})," ",P("span",{className:"uppercase",children:e}),P(Ot,{})]})}),go=({locale:e="en",onChange:t,locales:r=mo})=>We(H,{children:[P("div",{className:"flex items-center gap-2 px-2 py-1 rounded-lg shadow border-[0.5px] border-gray-50/50 text-current bg-white/10 ",children:P(E,{className:"!p-0 !bg-transparent ",children:P(fo,{locale:e})})}),P(V,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:P("div",{children:r?.map(o=>We(po,{type:"button",className:n("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===o?.key}),onClick:()=>t?.(o?.key),children:[o?.label," ",e&&e===o?.key&&P(Mt,{})]},o?.key))})})]});var Gt={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},Ce=class Ce{static getCurrencyLocaleMap(t){return{XOF:"fr",XAF:"fr"}[t]||"en"}static koboToNaira(t){return+t/100}static nairaToKobo(t){return+t*100}static getCurrencySymbol(t){return Gt[t]||t}};ze(Ce,"formatAmountAndCurrency",(t,r,o)=>{let a=new Intl.NumberFormat(o?.locale||Ce.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(o?.convertToMajorCurrency?Ce.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=Gt[t]||t;return a.replace(t,i)});var Ht=Ce;import Ze from"dayjs";var Wt=class{static getDateLibrary(){return Ze()}static formatTimestampToDate(t,r){return Ze.unix(t).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ze(t).unix()}};export{Ht as AmountAction,io as Banner,U as Button,Wr as CopyableLabel,Lr as Country,Gt as CurrencySymbolMap,Wt as DateAction,Ve as DebouncedInput,ro as DevBanner,Ie as Dialog,W as FlagComponent,N as FormLabel,O as Input,q as Loader,go as LocaleSelector,Ar as OTPInput,st as PasswordInput,Nt as PhoneInput,Ne as Popover,V as PopoverContent,H as PopoverRoot,E as PopoverTrigger,Sr as Select,_r as Status,eo as Table,lt as Textarea,ve as buttonVariants,n as cn};
2
2
  //# sourceMappingURL=index.mjs.map