@6thbridge/hexa 0.0.52 → 0.0.53

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.
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/Users/joachim/.nvm/versions/node/v20.17.0/lib/node_modules/npmrc". EISDIR: illegal operation on a directory, read
2
2
 
3
- > @6thbridge/hexa@0.0.51 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
3
+ > @6thbridge/hexa@0.0.53 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
4
4
  > eslint . --max-warnings 0
5
5
 
package/dist/index.d.mts CHANGED
@@ -358,6 +358,39 @@ type PageDataToolbarProps = {
358
358
  };
359
359
  declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
360
360
 
361
+ type ResourcePermission = {
362
+ resource: string;
363
+ action: string;
364
+ };
365
+ type ResourcePermissions = ResourcePermission[];
366
+ type ResourcePermissionProps = {
367
+ permission?: {
368
+ resource?: string;
369
+ action?: string;
370
+ };
371
+ children: ReactNode;
372
+ };
373
+
374
+ declare const PermissionsContext: React$1.Context<ResourcePermissions | undefined>;
375
+ declare const PermissionsProvider: ({ permissions, children, }: {
376
+ permissions: ResourcePermissions;
377
+ children: ReactNode;
378
+ }) => react_jsx_runtime.JSX.Element;
379
+
380
+ declare const usePermissions: () => ResourcePermissions | undefined;
381
+ declare const useHasPermission: (permission: {
382
+ resource?: string;
383
+ action?: string;
384
+ }) => {
385
+ hasPermission: boolean;
386
+ validatePermission: (permission: {
387
+ resource?: string;
388
+ action?: string;
389
+ }) => boolean;
390
+ };
391
+
392
+ declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => react_jsx_runtime.JSX.Element;
393
+
361
394
  declare const CurrencySymbolMap: Record<string, string>;
362
395
  interface FormatCurrencyOptions {
363
396
  convertToMajorCurrency?: boolean;
@@ -379,4 +412,4 @@ declare class DateAction {
379
412
 
380
413
  declare function cn(...inputs: ClassValue[]): string;
381
414
 
382
- export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
415
+ export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn, useHasPermission, usePermissions };
package/dist/index.d.ts CHANGED
@@ -358,6 +358,39 @@ type PageDataToolbarProps = {
358
358
  };
359
359
  declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, }: PageDataToolbarProps) => react_jsx_runtime.JSX.Element;
360
360
 
361
+ type ResourcePermission = {
362
+ resource: string;
363
+ action: string;
364
+ };
365
+ type ResourcePermissions = ResourcePermission[];
366
+ type ResourcePermissionProps = {
367
+ permission?: {
368
+ resource?: string;
369
+ action?: string;
370
+ };
371
+ children: ReactNode;
372
+ };
373
+
374
+ declare const PermissionsContext: React$1.Context<ResourcePermissions | undefined>;
375
+ declare const PermissionsProvider: ({ permissions, children, }: {
376
+ permissions: ResourcePermissions;
377
+ children: ReactNode;
378
+ }) => react_jsx_runtime.JSX.Element;
379
+
380
+ declare const usePermissions: () => ResourcePermissions | undefined;
381
+ declare const useHasPermission: (permission: {
382
+ resource?: string;
383
+ action?: string;
384
+ }) => {
385
+ hasPermission: boolean;
386
+ validatePermission: (permission: {
387
+ resource?: string;
388
+ action?: string;
389
+ }) => boolean;
390
+ };
391
+
392
+ declare const HasResourcePermission: ({ permission, children, }: ResourcePermissionProps) => react_jsx_runtime.JSX.Element;
393
+
361
394
  declare const CurrencySymbolMap: Record<string, string>;
362
395
  interface FormatCurrencyOptions {
363
396
  convertToMajorCurrency?: boolean;
@@ -379,4 +412,4 @@ declare class DateAction {
379
412
 
380
413
  declare function cn(...inputs: ClassValue[]): string;
381
414
 
382
- export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
415
+ export { AmountAction, Banner, Button, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn, useHasPermission, usePermissions };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Bo=Object.create;var ce=Object.defineProperty;var Vo=Object.getOwnPropertyDescriptor;var Oo=Object.getOwnPropertyNames;var Wo=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty;var Go=(e,t,o)=>t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var zo=(e,t)=>{for(var o in t)ce(e,o,{get:t[o],enumerable:!0})},Ct=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Oo(t))!Ho.call(e,r)&&r!==o&&ce(e,r,{get:()=>t[r],enumerable:!(a=Vo(t,r))||a.enumerable});return e};var x=(e,t,o)=>(o=e!=null?Bo(Wo(e)):{},Ct(t||!e||!e.__esModule?ce(o,"default",{value:e,enumerable:!0}):o,e)),Zo=e=>Ct(ce({},"__esModule",{value:!0}),e);var bt=(e,t,o)=>Go(e,typeof t!="symbol"?t+"":t,o);var dr={};zo(dr,{AmountAction:()=>gt,Banner:()=>io,Button:()=>oe,CopyableLabel:()=>co,Country:()=>eo,CurrencySymbolMap:()=>ft,DateAction:()=>yt,DebouncedInput:()=>Ge,DevBanner:()=>uo,Dialog:()=>Ae,Drawer:()=>Po,DrawerClose:()=>Co,DrawerRoot:()=>Ze,FlagComponent:()=>U,FormLabel:()=>S,Input:()=>_,Loader:()=>se,LocaleSelector:()=>So,OTPInput:()=>no,PageDataToolbar:()=>Xe,Pagination:()=>Ue,PasswordInput:()=>rt,PhoneInput:()=>lt,Popover:()=>Re,PopoverContent:()=>z,PopoverRoot:()=>$,PopoverTrigger:()=>H,Select:()=>to,Status:()=>Fo,Table:()=>Ao,Textarea:()=>at,buttonVariants:()=>ue,cn:()=>n});module.exports=Zo(dr);var Pt=x(require("react"));var xt=x(require("react")),Qe=x(require("@radix-ui/react-label")),wt=require("class-variance-authority");var ht=require("clsx"),vt=require("tailwind-merge");function n(...e){return(0,vt.twMerge)((0,ht.clsx)(e))}var Nt=require("react/jsx-runtime"),Ko=(0,wt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qe=xt.forwardRef(({className:e,...t},o)=>(0,Nt.jsx)(Qe.Root,{ref:o,className:n(Ko(),e),...t}));qe.displayName=Qe.Root.displayName;var pe=require("react/jsx-runtime"),S=Pt.default.forwardRef(({className:e,children:t,showAsterisk:o,error:a,...r},i)=>(0,pe.jsx)(qe,{ref:i,className:n(a&&"text-red-500",e),...r,children:o?(0,pe.jsxs)("p",{children:[t,(0,pe.jsx)("span",{className:"text-red-500",children:"*"})]}):t}));S.displayName="FormLabel";var me=require("react/jsx-runtime"),se=({size:e=16,colour:t="primary"})=>(0,me.jsxs)("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[(0,me.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,me.jsx)("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"})]});var Ie=x(require("react")),Rt=require("@radix-ui/react-slot"),Dt=require("class-variance-authority");var A=require("react/jsx-runtime"),ue=(0,Dt.cva)("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"}}),oe=Ie.forwardRef(({className:e,variant:t="primary",size:o,asChild:a=!1,isLoading:r=!1,leftNode:i,rightNode:l,LoaderSize:s,...c},d)=>{let u=a?Rt.Slot:"button",{children:m,disabled:p,...b}=c,T=Ie.useRef(null);return(0,A.jsx)(u,{className:n(ue({variant:t,size:o,className:e})),ref:T||d,disabled:p||r,...b,children:(0,A.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:r?(0,A.jsx)(A.Fragment,{children:(0,A.jsx)("span",{className:"mx-auto",children:(0,A.jsx)(se,{size:s,colour:"secondary"})})}):(0,A.jsxs)(A.Fragment,{children:[i,m,l]})})})});oe.displayName="Button";var et=x(require("react"));var Me=require("class-variance-authority");var kt=x(require("react")),Lt=require("react/jsx-runtime"),B=kt.default.forwardRef(({className:e,children:t,error:o,...a},r)=>{let i=o??t;return i?(0,Lt.jsx)("p",{ref:r,className:n("text-xs font-normal text-[#F04248]",e),...a,children:i}):null});B.displayName="ErrorMessage";var Tt=x(require("react")),St=require("react/jsx-runtime"),V=Tt.default.forwardRef(({className:e,...t},o)=>(0,St.jsx)("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));V.displayName="FormDescription";var O=require("react/jsx-runtime"),_o=(0,Me.cva)("!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"}}),Et=et.forwardRef(({className:e,status:t,type:o,...a},r)=>(0,O.jsx)("input",{type:o,className:n(_o({status:t}),e),ref:r,...a}));Et.displayName="BaseInnerInput";var K=(0,Me.cva)("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"}}),Ft=(0,Me.cva)("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"}}),_=et.forwardRef(({className:e,status:t="default",disabled:o,error:a,isLoading:r,sideNodeClassName:i,showAsterisk:l,label:s,description:c,...d},u)=>{let m=t;return a&&(m="error"),r&&(m="loading"),o&&(m="prefilled"),(0,O.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,O.jsx)(S,{showAsterisk:l,error:a,children:s}),(0,O.jsxs)("div",{className:n(K({status:m}),d.leftNode?"pl-0":"",d.rightNode?"pr-0":"",e),children:[d.leftNode?(0,O.jsx)("div",{className:n(Ft({status:m,side:"left"}),i),children:d.leftNode}):null,(0,O.jsx)(Et,{ref:u,disabled:r||o,className:n({"!pl-3":d.leftNode&&t!=="neutral","!pr-3":d.rightNode&&t!=="neutral"}),...d}),d.rightNode?(0,O.jsx)("div",{className:n(Ft({status:m,side:"right"}),i),children:d.rightNode}):null]}),c&&(0,O.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:c}),(0,O.jsx)(B,{error:a})]})});_.displayName="Input";var ye=require("react");var fe=require("react/jsx-runtime"),It=()=>(0,fe.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fe.jsx)("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"}),(0,fe.jsx)("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"})]});var ge=require("react/jsx-runtime"),Mt=()=>(0,ge.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ge.jsx)("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"}),(0,ge.jsx)("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"})]});var tt=require("react/jsx-runtime"),At=()=>(0,tt.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,tt.jsx)("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"})});var ot=require("react/jsx-runtime"),Bt=()=>(0,ot.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ot.jsx)("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"})});var F=require("react/jsx-runtime"),Vt=[{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}],rt=({onValidate:e,onChange:t,disableValidation:o,...a})=>{let[r,i]=(0,ye.useState)(!1),[l,s]=(0,ye.useState)(Vt),c=p=>Vt.map(b=>({...b,validated:b.RegExp.test(p)})),d=p=>{let b=c(p),T=b.every(te=>te.validated);return s(b),T},u=p=>{if(t&&t(p),o)return;let b=p?.target?.value,T=d(b);e&&e(T,b)},m=(0,ye.useMemo)(()=>(0,F.jsx)("div",{className:"flex items-center gap-2",children:l?.map(p=>(0,F.jsxs)("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":p?.validated,"text-[#8E98A8]":!p?.validated}),children:[(0,F.jsx)("span",{className:"",children:p?.validated?(0,F.jsx)(At,{}):(0,F.jsx)(Bt,{})}),(0,F.jsx)("span",{className:"",children:p?.label})]},p?.key))}),[l]);return(0,F.jsx)(_,{sideNodeClassName:"!border-l-0",rightNode:r?(0,F.jsx)("button",{type:"button",onClick:()=>i(p=>!p),children:(0,F.jsx)(It,{})}):(0,F.jsx)("button",{type:"button",onClick:()=>i(p=>!p),children:(0,F.jsx)(Mt,{})}),type:r?"text":"password",onChange:u,description:!o&&m,...a})};rt.displayName="PasswordInput";var Ot=require("class-variance-authority");var re=require("react/jsx-runtime"),Ur=(0,Ot.cva)("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:e,status:t="default",disabled:o,error:a,isLoading:r,showAsterisk:i,label:l,description:s,...c})=>{let d=t;return a&&(d="error"),r&&(d="loading"),o&&(d="prefilled"),(0,re.jsxs)("div",{className:"relative space-y-1",children:[(0,re.jsx)(S,{showAsterisk:i,error:a,children:l}),(0,re.jsx)("textarea",{className:n("min-h-[80px]",K({status:d}),e),disabled:r||o,...c}),(0,re.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,re.jsx)(B,{error:a})]})};at.displayName="Textarea";var ae=x(require("react"));var Y=x(require("react")),D=require("cmdk"),$t=require("lucide-react");var be=x(require("react")),h=x(require("@radix-ui/react-dialog"));var Ce=require("react/jsx-runtime"),Wt=()=>(0,Ce.jsxs)("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:[(0,Ce.jsx)("path",{d:"M18 6 6 18"}),(0,Ce.jsx)("path",{d:"m6 6 12 12"})]});var C=require("react/jsx-runtime"),$o=h.Root,Uo=h.Trigger,Ht=h.Portal,Gt=be.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Overlay,{ref:o,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}));Gt.displayName=h.Overlay.displayName;var nt=be.forwardRef(({className:e,hideCloseButton:t,children:o,...a},r)=>(0,C.jsxs)(Ht,{children:[(0,C.jsx)(Gt,{}),(0,C.jsxs)(h.Content,{ref:r,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),...a,children:[o,!t&&(0,C.jsxs)(h.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:[(0,C.jsx)(Wt,{}),(0,C.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));nt.displayName=h.Content.displayName;var zt=({className:e,...t})=>(0,C.jsx)("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});zt.displayName="DialogHeader";var Zt=({className:e,...t})=>(0,C.jsx)("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});Zt.displayName="DialogFooter";var Kt=be.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));Kt.displayName=h.Title.displayName;var _t=be.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));_t.displayName=h.Description.displayName;var Ae=({trigger:e=void 0,children:t,open:o,onOpenChange:a,hideCloseButton:r,footer:i,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:u,descriptionClassName:m,footerClassName:p,asChild:b=!0,onOpenAutoFocus:T,onCloseAutoFocus:te,onEscapeKeyDown:ne,onInteractOutside:Z,onPointerDownOutside:je,...Je})=>(0,C.jsxs)($o,{...Je,open:o,onOpenChange:a,children:[(0,C.jsx)(Uo,{asChild:b,children:e}),(0,C.jsx)(Ht,{children:(0,C.jsxs)(nt,{className:c,hideCloseButton:r,onOpenAutoFocus:T,onCloseAutoFocus:te,onEscapeKeyDown:ne,onPointerDownOutside:je,onInteractOutside:Z,children:[l||s?(0,C.jsxs)(zt,{className:d,children:[l&&(0,C.jsx)(Kt,{className:u,children:l}),s&&(0,C.jsx)(_t,{className:m,children:s})]}):(0,C.jsx)(C.Fragment,{}),t,i&&(0,C.jsx)(Zt,{className:p,children:i})]})})]});Ae.displayName=h.Dialog.displayName;var k=require("react/jsx-runtime"),he=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));he.displayName=D.Command.displayName;var ve=Y.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...a},r)=>(0,k.jsxs)("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?(0,k.jsx)(se,{size:16,colour:"secondary"}):(0,k.jsx)($t.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,k.jsx)(D.Command.Input,{ref:r,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:o,...a})]}));ve.displayName=D.Command.Input.displayName;var xe=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));xe.displayName=D.Command.List.displayName;var we=Y.forwardRef((e,t)=>(0,k.jsx)(D.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));we.displayName=D.Command.Empty.displayName;var Ne=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Group,{ref:o,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}));Ne.displayName=D.Command.Group.displayName;var Xo=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));Xo.displayName=D.Command.Separator.displayName;var Pe=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Item,{ref:o,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}));Pe.displayName=D.Command.Item.displayName;var Yo=({className:e,...t})=>(0,k.jsx)("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Yo.displayName="CommandShortcut";var Ut=x(require("react")),W=x(require("@radix-ui/react-popover"));var j=require("react/jsx-runtime"),$=W.Root,H=W.Trigger,z=Ut.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:a=!0,...r},i)=>a?(0,j.jsx)(W.Portal,{children:(0,j.jsx)(W.Content,{ref:i,align:t,sideOffset:o,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:r.onOpenAutoFocus,onCloseAutoFocus:r.onCloseAutoFocus,...r})}):(0,j.jsx)(W.Content,{ref:i,align:t,sideOffset:o,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:r.onOpenAutoFocus,onCloseAutoFocus:r.onCloseAutoFocus,...r}));z.displayName=W.Content.displayName;var Re=({trigger:e,children:t,open:o,onOpenChange:a,contentClassName:r,asChild:i=!0,align:l,side:s,alignOffset:c,triggerClassName:d,sideOffset:u,onOpenAutoFocus:m,onCloseAutoFocus:p,portal:b=!0,...T})=>(0,j.jsxs)($,{...T,open:o,onOpenChange:a,children:[(0,j.jsx)(H,{asChild:i,className:d,children:e}),(0,j.jsx)(z,{alignOffset:c,sideOffset:u,side:s,align:l,className:r,onOpenAutoFocus:m,onCloseAutoFocus:p,portal:b,children:t})]});Re.displayName=W.Root.displayName;var it=x(require("react")),I=x(require("@radix-ui/react-scroll-area"));var J=require("react/jsx-runtime"),De=it.forwardRef(({className:e,viewPortClassName:t,children:o,...a},r)=>(0,J.jsxs)(I.Root,{ref:r,className:n("relative overflow-hidden",e),...a,children:[(0,J.jsx)(I.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),(0,J.jsx)(Xt,{}),(0,J.jsx)(I.Corner,{})]}));De.displayName=I.Root.displayName;var Xt=it.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,J.jsx)(I.ScrollAreaScrollbar,{ref:a,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),...o,children:(0,J.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Xt.displayName=I.ScrollAreaScrollbar.displayName;var R=require("react/jsx-runtime"),Yt=({className:e,value:t,placeholder:o="",status:a,disabled:r})=>(0,R.jsx)(H,{asChild:!0,disabled:r,children:(0,R.jsxs)("button",{disabled:r,className:n(K({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??o??"Select options...",(0,R.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,R.jsx)("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"})})]})}),Be=({options:e=[],value:t,onChange:o,containerClassName:a,placeholder:r,disabled:i,loading:l,optionComponent:s,children:c,modal:d=!1,hideSearch:u,className:m,inputValue:p,onValueChange:b,onInputValueChange:T})=>{let[te,ne]=ae.useState(!1),Z=ae.useRef(null),[je,Je]=ae.useState(void 0);return ae.useLayoutEffect(()=>{Z.current&&Je(Z.current.clientWidth)},[Z.current]),(0,R.jsxs)($,{modal:d,open:te,onOpenChange:ne,children:[(0,R.jsx)("div",{className:n("w-full",m),ref:Z,children:c}),(0,R.jsx)(z,{portal:!d,className:"p-0 min-w-[200px]",style:{width:je},children:(0,R.jsxs)(he,{className:n("relative max-h-[270px]",{"mt-2":!u}),children:[!u&&(0,R.jsx)(ve,{loading:l,placeholder:r??"Search options...",onValueChange:T,value:p,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,R.jsx)(De,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",a),children:(0,R.jsxs)(xe,{children:[!u&&(0,R.jsx)(we,{children:"No result found."}),(0,R.jsx)(Ne,{className:"w-full",children:e?.map(ie=>(0,R.jsx)(Pe,{defaultValue:t?.label,value:ie.label,disabled:i,onSelect:()=>{o(ie),ne(!1),b?.(ie?.value)},children:s?s(ie):ie.label},ie.value))})]})})]})})]})};var st=[{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"}],jt=()=>{let e={};return st?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};var ke=x(require("react")),Ve=x(require("react-phone-number-input")),Qt=x(require("react-phone-number-input/flags"));var Q=require("react/jsx-runtime"),jo=e=>(0,Q.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[(0,Q.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,Q.jsx)("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"}),(0,Q.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,Q.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,Q.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Jt=jo;var f=require("react/jsx-runtime"),lt=ke.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:a,showAsterisk:r,label:i,description:l,error:s,...c},d)=>{let u=m=>(0,f.jsx)(Jo,{...m,status:c.status,modal:a});return(0,f.jsxs)("div",{className:"relative space-y-1",children:[(0,f.jsx)(S,{showAsterisk:r,error:s,children:i}),(0,f.jsx)(Ve.default,{ref:d,className:n("flex",e),flagComponent:U,countrySelectComponent:u,inputComponent:qt,defaultCountry:o,onChange:m=>{t&&t?.(m)},...c}),(0,f.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,f.jsx)(B,{error:s})]})});lt.displayName="PhoneInput";var qt=ke.forwardRef(({className:e,...t},o)=>(0,f.jsx)(_,{className:n("!rounded-s-none h-10",e),...t,ref:o}));qt.displayName="InputComponent";var Jo=({disabled:e,value:t,onChange:o,options:a,status:r,modal:i})=>{let l=ke.useCallback(s=>{o(s)},[o]);return(0,f.jsxs)($,{modal:i,children:[(0,f.jsx)(H,{disabled:e,children:(0,f.jsxs)("div",{className:n(K({status:r}),"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:[(0,f.jsx)(U,{country:t,countryName:t}),(0,f.jsx)("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:(0,f.jsx)("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"})})]})}),(0,f.jsx)(z,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,f.jsx)(he,{children:(0,f.jsx)(xe,{children:(0,f.jsxs)(De,{className:"h-72",children:[(0,f.jsx)(ve,{placeholder:"Search country..."}),(0,f.jsx)(we,{children:"No country found."}),(0,f.jsx)(Ne,{children:a.filter(s=>s.value).map(s=>(0,f.jsxs)(Pe,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,f.jsx)(U,{country:s.value,countryName:s.label}),(0,f.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,f.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Ve.getCountryCallingCode(s.value)}`}),(0,f.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:(0,f.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},U=({country:e,countryName:t,className:o})=>{let a=Qt.default[e];return e==="GLOBAL"?(0,f.jsx)("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:(0,f.jsx)(Jt,{className:"w-full h-[90%]"})}):(0,f.jsx)("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:a&&(0,f.jsx)(a,{title:t})})};U.displayName="FlagComponent";var w=require("react/jsx-runtime"),Qo=jt(),qo=({className:e,value:t,placeholder:o="",status:a,disabled:r})=>(0,w.jsx)(H,{asChild:!0,disabled:r,children:(0,w.jsxs)("button",{disabled:r,className:n(K({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?(0,w.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,w.jsx)(U,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),(0,w.jsxs)("span",{className:"",children:[" ",Qo[t]]})]}):o??"Select options...",(0,w.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,w.jsx)("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"})})]})}),eo=({hideSearch:e=!0,showAsterisk:t,label:o,description:a,error:r,...i})=>{let l=st?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,w.jsxs)("div",{className:"relative space-y-1",children:[(0,w.jsx)(S,{showAsterisk:t,error:r,children:o}),(0,w.jsx)(Be,{options:l,hideSearch:e,optionComponent:s=>(0,w.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,w.jsx)(U,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,w.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,w.jsx)(qo,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,w.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:a}),(0,w.jsx)(B,{error:r})]})};var q=require("react/jsx-runtime"),to=({showAsterisk:e,label:t,description:o,error:a,hideSearch:r=!0,status:i,...l})=>(0,q.jsxs)("div",{className:"relative space-y-1",children:[(0,q.jsx)(S,{showAsterisk:e,error:a,children:t}),(0,q.jsx)(Be,{hideSearch:r,...l,containerClassName:"h-full",children:(0,q.jsx)(Yt,{disabled:l?.disabled,placeholder:l?.placeholder??"Select",status:i,value:l?.value?.label??l?.value?.value})}),(0,q.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:o}),(0,q.jsx)(B,{error:a})]});var oo=x(require("react-otp-input"));var ro=require("class-variance-authority"),ao=require("react"),dt=require("react/jsx-runtime"),er=(0,ro.cva)("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"}}),no=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:a="-",status:r,...i})=>{let l=(0,ao.useMemo)(()=>a||new Array(e).fill("").reduce((d,u)=>d+=u,""),[e,a]);return(0,dt.jsx)(oo.default,{numInputs:e,placeholder:l,containerStyle:n("w-full",o),inputStyle:n(er({status:r}),t),renderInput:s=>(0,dt.jsx)("input",{...s}),...i})};var Oe=require("react"),g=require("react/jsx-runtime"),tr=({type:e})=>e==="gray"?(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"?(0,g.jsx)("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:(0,g.jsx)("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"?(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"?(0,g.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"})}):(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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:o,open:a,showCloseButton:r,bottomNode:i,sideNode:l,onClose:s,showIcon:c=!0})=>{let[d,u]=(0,Oe.useState)(a);(0,Oe.useEffect)(()=>{u(a)},[a]);let m="",p="";switch(e){case"gray":m="#eeeef0",p="#79818c";break;case"info":m="#ebf5fd",p="#70B6F6";break;case"warning":m="#fff8df",p="#ffc700";break;case"success":m="#e0f9f0",p="#49e0aa";break;case"danger":m="#fde8e9",p="#f3777c";break;default:m="#eeeef0",p="#79818c";break}function b(){u(!1),s&&s()}return d?(0,g.jsxs)("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:m||"#ebf5fd"},children:[(0,g.jsx)("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:p||"#70B6F6"}}),(0,g.jsxs)("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[(0,g.jsxs)("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[c&&(0,g.jsx)("div",{className:"h-full flex justify-end",children:(0,g.jsx)(tr,{type:e})}),(0,g.jsxs)("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[(0,g.jsxs)("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&(0,g.jsxs)("div",{children:[t&&(0,g.jsx)("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&(0,g.jsx)("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),l]})]}),r&&(0,g.jsx)("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:(0,g.jsx)("button",{onClick:b,children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};var lo=require("react"),We=require("lucide-react"),He=require("framer-motion");var X=require("react/jsx-runtime"),co=({text:e,textToCopy:t,onCopy:o,iconsPosition:a="right",clampText:r=!0,textClassName:i})=>{let[l,s]=(0,lo.useState)(!1),c=()=>{navigator.clipboard.writeText(t??e).then(()=>{s(!0),o?.(),setTimeout(()=>s(!1),2e3)})},d=l?We.CheckIcon:We.Copy;return(0,X.jsxs)("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:[a==="left"&&(0,X.jsx)(so,{Icon:d,onClick:c,copied:l}),(0,X.jsx)("span",{className:n({"truncate max-w-[100px]":r},i),children:e}),a==="right"&&(0,X.jsx)(so,{Icon:d,onClick:c,copied:l})]})},so=({Icon:e,onClick:t,copied:o})=>(0,X.jsx)(He.AnimatePresence,{mode:"wait",children:(0,X.jsx)(He.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:(0,X.jsx)(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});var Le=require("react");var po=require("lucide-react"),ct=require("react/jsx-runtime"),Ge=({value:e,onChange:t,debounce:o=500,addon:a,...r})=>{let[i,l]=(0,Le.useState)(e??""),s=c=>l(c.target.value);return(0,Le.useEffect)(()=>{e&&l(e)},[e]),(0,Le.useEffect)(()=>{let c=setTimeout(()=>{t(i)},o);return()=>clearTimeout(c)},[i,o,t]),(0,ct.jsx)(_,{leftNode:a??(0,ct.jsx)(po.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...r,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",r?.className),onChange:s,value:i})};var pt=require("react"),mo=require("lucide-react"),N=require("react/jsx-runtime"),uo=e=>{let{environment:t,branch:o,version:a,deployTime:r,showBanner:i,onClose:l,initDefault:s,removeFromStorage:c,syncLocalStorageToState:d}=e,u=t||process.env.NEXT_PUBLIC_NODE_ENV;return u!=="staging"&&u!=="sandbox"||((0,pt.useEffect)(()=>{d()},[d]),(0,pt.useEffect)(()=>{let m;return(u==="staging"||u==="sandbox")&&(m=setInterval(()=>{c(),s()},5*60*1e3)),()=>{m&&clearInterval(m)}},[i,t,l,c,s,u]),!i)?null:(0,N.jsxs)("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[(0,N.jsx)("button",{onClick:l,className:"absolute top-2 right-2",children:(0,N.jsx)(mo.X,{})}),(0,N.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Environment:"}),(0,N.jsx)("span",{className:"text-blue-600 capitalize",children:u})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Branch:"}),(0,N.jsx)("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Version:"}),(0,N.jsx)("span",{className:"text-purple-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Deploy Time:"}),(0,N.jsx)("span",{className:"text-orange-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};var Se=x(require("react")),L=require("vaul"),yo=require("class-variance-authority");var Te=require("react/jsx-runtime"),fo=()=>(0,Te.jsxs)("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:[(0,Te.jsx)("path",{d:"M18 6 6 18"}),(0,Te.jsx)("path",{d:"m6 6 12 12"})]});var ze=require("react");function go(){let[e,t]=(0,ze.useState)({width:window.innerWidth,height:window.innerHeight});return(0,ze.useEffect)(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}var y=require("react/jsx-runtime"),Ze=({shouldScaleBackground:e=!0,...t})=>(0,y.jsx)(L.Drawer.Root,{direction:"right",shouldScaleBackground:e,...t});Ze.displayName="Drawer";var or=L.Drawer.Trigger,Co=L.Drawer.Close,rr=L.Drawer.Portal,bo=Se.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Overlay,{className:n("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));bo.displayName=L.Drawer.Overlay.displayName;var ar=(0,yo.cva)("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),ho=Se.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:a,...r},i)=>(0,y.jsxs)(rr,{children:[(0,y.jsx)(bo,{}),(0,y.jsxs)(L.Drawer.Content,{ref:i,className:n(ar({side:e}),o),...r,children:[(0,y.jsx)("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),a,!t&&(0,y.jsxs)(L.Drawer.Close,{className:"absolute right-2 top-3 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-secondary",children:[(0,y.jsx)(fo,{}),(0,y.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ho.displayName=L.Drawer.Content.displayName;var vo=({className:e,...t})=>(0,y.jsx)("div",{className:n("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});vo.displayName="DrawerHeader";var xo=({className:e,...t})=>(0,y.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});xo.displayName="DrawerFooter";var wo=Se.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));wo.displayName=L.Drawer.Title.displayName;var No=Se.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));No.displayName=L.Drawer.Description.displayName;var Po=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:a=void 0,hideCloseButton:r,footer:i,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:u,descriptionClassName:m,footerClassName:p,asChild:b=!0,onOpenAutoFocus:T,onCloseAutoFocus:te})=>{let{width:ne}=go(),Z=ne<768?"bottom":"right";return(0,y.jsxs)(Ze,{open:o,onOpenChange:a,direction:Z,children:[(0,y.jsx)(or,{className:"cursor-pointer",asChild:b,children:e}),(0,y.jsxs)(ho,{className:n("flex flex-col gap-0 justify-start items-start max-h-[90vh] md:max-h-full w-full !max-w-md",c),side:Z,hideCloseButton:r,onOpenAutoFocus:T,onCloseAutoFocus:te,children:[l||s?(0,y.jsxs)(vo,{className:d,children:[l&&(0,y.jsx)(wo,{className:u,children:l}),s&&(0,y.jsx)(No,{className:m,children:s})]}):(0,y.jsx)(y.Fragment,{}),(0,y.jsx)("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]"),children:t}),i&&(0,y.jsx)(xo,{className:p,children:i})]})]})};var mt=require("react/jsx-runtime"),Ro=()=>(0,mt.jsx)("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:(0,mt.jsx)("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"})});var ee=require("react/jsx-runtime"),Do=e=>(0,ee.jsxs)("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:[(0,ee.jsx)("rect",{width:"60",height:"30",fill:"#00247D"}),(0,ee.jsx)("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),(0,ee.jsx)("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),(0,ee.jsx)("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),(0,ee.jsx)("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});var le=require("react/jsx-runtime"),ko=e=>(0,le.jsxs)("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[(0,le.jsx)("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),(0,le.jsx)("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),(0,le.jsx)("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});var Fe=require("react/jsx-runtime"),Lo=()=>(0,Fe.jsxs)("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Fe.jsx)("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Fe.jsx)("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});var To=require("@radix-ui/react-popover"),P=require("react/jsx-runtime"),nr=[{key:"en",label:"English"},{key:"fr",label:"French"}],ir=({locale:e})=>e==="fr"?(0,P.jsx)(ko,{width:10}):(0,P.jsx)(Do,{width:10}),sr=({locale:e})=>(0,P.jsx)("div",{className:"px-2 py-1 ",children:(0,P.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,P.jsx)(ir,{locale:e})," ",(0,P.jsx)("span",{className:"uppercase",children:e}),(0,P.jsx)(Lo,{})]})}),So=({locale:e="en",onChange:t,locales:o=nr})=>(0,P.jsxs)($,{children:[(0,P.jsx)("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:(0,P.jsx)(H,{className:"!p-0 !bg-transparent ",children:(0,P.jsx)(sr,{locale:e})})}),(0,P.jsx)(z,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:(0,P.jsx)("div",{children:o?.map(a=>(0,P.jsxs)(To.PopoverClose,{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===a?.key}),onClick:()=>t?.(a?.key),children:[a?.label," ",e&&e===a?.key&&(0,P.jsx)(Ro,{})]},a?.key))})})]});var Ke=require("react/jsx-runtime"),Fo=({status:e,variant:t,className:o})=>(0,Ke.jsx)("div",{children:(0,Ke.jsx)("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"},o),children:(0,Ke.jsx)("p",{children:e.replace("-"," ")})})});var Mo=require("lucide-react");var $e=require("lucide-react");var _e=require("react/jsx-runtime"),lr=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?(0,_e.jsx)("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):(0,_e.jsx)("button",{onClick:o,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}),Eo=({totalPages:e,currentPage:t,handlePageClick:o})=>{let r=()=>{let c=Math.floor(1.5),d=Math.max(1,t-c),u=Math.min(e,d+3-1);return u>e&&(d=Math.max(1,e-3+1),u=e),{start:d,end:u}},{start:i,end:l}=r(),s=[];return i>1&&s.push(1),i>2&&s.push("..."),s.push(...Array.from({length:l-i+1},(c,d)=>i+d)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((c,d)=>(0,_e.jsx)(lr,{page:c,currentPage:t,onClick:typeof c=="number"?()=>o(c):void 0},d))};var G=require("react/jsx-runtime"),Ue=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:a=0,totalItems:r=0})=>{let i=c=>{c>=1&&c<=t&&o?.(c)},l=a===0?1:a*(e-1)+1,s=e===t?r:Math.min(l+a-1,r);return(0,G.jsxs)("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:[r&&(0,G.jsx)("section",{className:"text-[#717171] text-[12px]",children:(0,G.jsxs)("p",{className:"",children:["Showing ",l," - ",s," of ",r]})}),(0,G.jsx)("div",{className:"flex items-center justify-center sm:justify-end ",children:(0,G.jsxs)("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[(0,G.jsx)("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:(0,G.jsx)($e.ChevronLeftIcon,{className:"size-5"})}),Eo({currentPage:e,totalPages:t,handlePageClick:i}),(0,G.jsx)("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:(0,G.jsx)($e.ChevronRightIcon,{className:"size-5"})})]})})]})};var ut=require("@tanstack/react-table");var M=require("react/jsx-runtime"),Io=({table:e,isMobile:t,onRowClick:o,id:a})=>(0,M.jsx)("div",{className:n("relative w-full rounded-b border-0",{}),children:(0,M.jsxs)("table",{id:a??"table",className:"w-full overflow-x-scroll",children:[(0,M.jsx)("thead",{children:e.getHeaderGroups().map(r=>(0,M.jsx)("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:r.headers.map(i=>(0,M.jsx)("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:(0,M.jsx)("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,ut.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},r.id))}),(0,M.jsx)("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(r=>(0,M.jsx)("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(r):{},children:r.getVisibleCells().map(i=>(0,M.jsx)("td",{className:n("",{}),children:(0,M.jsx)("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,ut.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},r.id))})]})});var de=require("lucide-react");var v=require("react/jsx-runtime"),Xe=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:a,onExport:r,download:i,isRefetching:l})=>{let s=d=>{t?.onSearch?.(d)},c=()=>{try{e?.()}catch(d){console.error("Error while refetching data",d)}};return(0,v.jsx)(v.Fragment,{children:(e||t?.enabled||o||a||r)&&(0,v.jsxs)("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[(0,v.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:(0,v.jsxs)("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&(0,v.jsx)("section",{className:"sm:w-56",children:(0,v.jsx)(Ge,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:s,debounce:t?.debounceRate})}),(0,v.jsxs)("div",{className:" flex gap-2",children:[e&&(0,v.jsx)(oe,{onClick:c,title:"Refetch Data",disabled:l,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,v.jsx)(de.RotateCw,{className:n("w-4 h-4",{"animate-spin":l}),size:5})}),o&&(0,v.jsx)(Re,{trigger:(0,v.jsx)("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ue({variant:"outlined",size:"sm"})),children:(0,v.jsx)(de.ListFilter,{className:"w-4 h-4",size:5})}),children:o})]})]})}),(0,v.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,v.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,v.jsxs)("div",{className:"flex gap-2",children:[a&&a,r&&(0,v.jsx)(oe,{variant:"primary",onClick:r,size:"sm",children:"Export"}),i?.enabled&&(0,v.jsx)(oe,{variant:"primary",leftNode:(0,v.jsx)(de.Download,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};var E=require("react/jsx-runtime"),Ao=({table:e,isMobile:t=!1,onRowClick:o,id:a,onRefetch:r,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:c,search:d={enabled:!1,debounceRate:700},download:u={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:m,pagination:p})=>(0,E.jsxs)("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[(0,E.jsx)(Xe,{onRefetch:r,search:d,FilterMenu:l,ExtraNode:s,onExport:c,download:u,isRefetching:i}),(0,E.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:m?(0,E.jsxs)("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[(0,E.jsx)(Mo.Loader,{size:20,className:"animate-spin"}),(0,E.jsx)("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?(0,E.jsx)("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:(0,E.jsx)("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):(0,E.jsx)("div",{className:"flex flex-col gap-2",children:(0,E.jsx)(Io,{table:e,isMobile:t,onRowClick:o,id:a})})}),!m&&p?.enabled&&e.getRowModel().rows.length>0&&(0,E.jsx)(Ue,{...p,currentPage:p?.currentPage??1,totalPages:p?.totalPages??Math.ceil((p?.totalItems??0)/Math.max(p?.itemsPerPage??1,1))??1,onPageChange:b=>p?.onPageChange?.(b)})]});var ft={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$"},Ee=class Ee{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 ft[t]||t}};bt(Ee,"formatAmountAndCurrency",(t,o,a)=>{let r=new Intl.NumberFormat(a?.locale||Ee.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(a?.convertToMajorCurrency?Ee.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=ft[t]||t;return r.replace(t,i)});var gt=Ee;var Ye=x(require("dayjs")),yt=class{static getDateLibrary(){return(0,Ye.default)()}static formatTimestampToDate(t,o){return Ye.default.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return(0,Ye.default)(t).unix()}};0&&(module.exports={AmountAction,Banner,Button,CopyableLabel,Country,CurrencySymbolMap,DateAction,DebouncedInput,DevBanner,Dialog,Drawer,DrawerClose,DrawerRoot,FlagComponent,FormLabel,Input,Loader,LocaleSelector,OTPInput,PageDataToolbar,Pagination,PasswordInput,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn});
1
+ "use strict";var _o=Object.create;var me=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Xo=Object.getPrototypeOf,Yo=Object.prototype.hasOwnProperty;var jo=(e,t,o)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Jo=(e,t)=>{for(var o in t)me(e,o,{get:t[o],enumerable:!0})},Nt=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Uo(t))!Yo.call(e,r)&&r!==o&&me(e,r,{get:()=>t[r],enumerable:!(a=$o(t,r))||a.enumerable});return e};var x=(e,t,o)=>(o=e!=null?_o(Xo(e)):{},Nt(t||!e||!e.__esModule?me(o,"default",{value:e,enumerable:!0}):o,e)),Qo=e=>Nt(me({},"__esModule",{value:!0}),e);var Pt=(e,t,o)=>jo(e,typeof t!="symbol"?t+"":t,o);var br={};Jo(br,{AmountAction:()=>xt,Banner:()=>uo,Button:()=>oe,CopyableLabel:()=>yo,Country:()=>io,CurrencySymbolMap:()=>vt,DateAction:()=>wt,DebouncedInput:()=>Ke,DevBanner:()=>ho,Dialog:()=>Oe,Drawer:()=>So,DrawerClose:()=>No,DrawerRoot:()=>$e,FlagComponent:()=>U,FormLabel:()=>S,HasResourcePermission:()=>Ko,Input:()=>_,Loader:()=>se,LocaleSelector:()=>Bo,OTPInput:()=>mo,PageDataToolbar:()=>Je,Pagination:()=>je,PasswordInput:()=>lt,PermissionsContext:()=>Me,PermissionsProvider:()=>zo,PhoneInput:()=>ut,Popover:()=>ke,PopoverContent:()=>z,PopoverRoot:()=>$,PopoverTrigger:()=>W,Select:()=>so,Status:()=>Vo,Table:()=>Go,Textarea:()=>dt,buttonVariants:()=>ge,cn:()=>n,useHasPermission:()=>qe,usePermissions:()=>ht});module.exports=Qo(br);var St=x(require("react"));var kt=x(require("react")),rt=x(require("@radix-ui/react-label")),Lt=require("class-variance-authority");var Rt=require("clsx"),Dt=require("tailwind-merge");function n(...e){return(0,Dt.twMerge)((0,Rt.clsx)(e))}var Tt=require("react/jsx-runtime"),qo=(0,Lt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),at=kt.forwardRef(({className:e,...t},o)=>(0,Tt.jsx)(rt.Root,{ref:o,className:n(qo(),e),...t}));at.displayName=rt.Root.displayName;var ue=require("react/jsx-runtime"),S=St.default.forwardRef(({className:e,children:t,showAsterisk:o,error:a,...r},i)=>(0,ue.jsx)(at,{ref:i,className:n(a&&"text-red-500",e),...r,children:o?(0,ue.jsxs)("p",{children:[t,(0,ue.jsx)("span",{className:"text-red-500",children:"*"})]}):t}));S.displayName="FormLabel";var fe=require("react/jsx-runtime"),se=({size:e=16,colour:t="primary"})=>(0,fe.jsxs)("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[(0,fe.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,fe.jsx)("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"})]});var Be=x(require("react")),Ft=require("@radix-ui/react-slot"),Et=require("class-variance-authority");var A=require("react/jsx-runtime"),ge=(0,Et.cva)("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"}}),oe=Be.forwardRef(({className:e,variant:t="primary",size:o,asChild:a=!1,isLoading:r=!1,leftNode:i,rightNode:l,LoaderSize:s,...c},d)=>{let p=a?Ft.Slot:"button",{children:u,disabled:m,...b}=c,T=Be.useRef(null);return(0,A.jsx)(p,{className:n(ge({variant:t,size:o,className:e})),ref:T||d,disabled:m||r,...b,children:(0,A.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:r?(0,A.jsx)(A.Fragment,{children:(0,A.jsx)("span",{className:"mx-auto",children:(0,A.jsx)(se,{size:s,colour:"secondary"})})}):(0,A.jsxs)(A.Fragment,{children:[i,u,l]})})})});oe.displayName="Button";var nt=x(require("react"));var Ve=require("class-variance-authority");var It=x(require("react")),Mt=require("react/jsx-runtime"),B=It.default.forwardRef(({className:e,children:t,error:o,...a},r)=>{let i=o??t;return i?(0,Mt.jsx)("p",{ref:r,className:n("text-xs font-normal text-[#F04248]",e),...a,children:i}):null});B.displayName="ErrorMessage";var At=x(require("react")),Bt=require("react/jsx-runtime"),V=At.default.forwardRef(({className:e,...t},o)=>(0,Bt.jsx)("div",{ref:o,className:n("text-sm text-[#8E98A8",e),...t}));V.displayName="FormDescription";var O=require("react/jsx-runtime"),er=(0,Ve.cva)("!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"}}),Ot=nt.forwardRef(({className:e,status:t,type:o,...a},r)=>(0,O.jsx)("input",{type:o,className:n(er({status:t}),e),ref:r,...a}));Ot.displayName="BaseInnerInput";var K=(0,Ve.cva)("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"}}),Vt=(0,Ve.cva)("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"}}),_=nt.forwardRef(({className:e,status:t="default",disabled:o,error:a,isLoading:r,sideNodeClassName:i,showAsterisk:l,label:s,description:c,...d},p)=>{let u=t;return a&&(u="error"),r&&(u="loading"),o&&(u="prefilled"),(0,O.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,O.jsx)(S,{showAsterisk:l,error:a,children:s}),(0,O.jsxs)("div",{className:n(K({status:u}),d.leftNode?"pl-0":"",d.rightNode?"pr-0":"",e),children:[d.leftNode?(0,O.jsx)("div",{className:n(Vt({status:u,side:"left"}),i),children:d.leftNode}):null,(0,O.jsx)(Ot,{ref:p,disabled:r||o,className:n({"!pl-3":d.leftNode&&t!=="neutral","!pr-3":d.rightNode&&t!=="neutral"}),...d}),d.rightNode?(0,O.jsx)("div",{className:n(Vt({status:u,side:"right"}),i),children:d.rightNode}):null]}),c&&(0,O.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:c}),(0,O.jsx)(B,{error:a})]})});_.displayName="Input";var be=require("react");var ye=require("react/jsx-runtime"),Ht=()=>(0,ye.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ye.jsx)("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"}),(0,ye.jsx)("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"})]});var Ce=require("react/jsx-runtime"),Wt=()=>(0,Ce.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ce.jsx)("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"}),(0,Ce.jsx)("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"})]});var it=require("react/jsx-runtime"),Gt=()=>(0,it.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)("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"})});var st=require("react/jsx-runtime"),zt=()=>(0,st.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,st.jsx)("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"})});var F=require("react/jsx-runtime"),Zt=[{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}],lt=({onValidate:e,onChange:t,disableValidation:o,...a})=>{let[r,i]=(0,be.useState)(!1),[l,s]=(0,be.useState)(Zt),c=m=>Zt.map(b=>({...b,validated:b.RegExp.test(m)})),d=m=>{let b=c(m),T=b.every(te=>te.validated);return s(b),T},p=m=>{if(t&&t(m),o)return;let b=m?.target?.value,T=d(b);e&&e(T,b)},u=(0,be.useMemo)(()=>(0,F.jsx)("div",{className:"flex items-center gap-2",children:l?.map(m=>(0,F.jsxs)("div",{className:n("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[(0,F.jsx)("span",{className:"",children:m?.validated?(0,F.jsx)(Gt,{}):(0,F.jsx)(zt,{})}),(0,F.jsx)("span",{className:"",children:m?.label})]},m?.key))}),[l]);return(0,F.jsx)(_,{sideNodeClassName:"!border-l-0",rightNode:r?(0,F.jsx)("button",{type:"button",onClick:()=>i(m=>!m),children:(0,F.jsx)(Ht,{})}):(0,F.jsx)("button",{type:"button",onClick:()=>i(m=>!m),children:(0,F.jsx)(Wt,{})}),type:r?"text":"password",onChange:p,description:!o&&u,...a})};lt.displayName="PasswordInput";var Kt=require("class-variance-authority");var re=require("react/jsx-runtime"),oa=(0,Kt.cva)("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"}}),dt=({className:e,status:t="default",disabled:o,error:a,isLoading:r,showAsterisk:i,label:l,description:s,...c})=>{let d=t;return a&&(d="error"),r&&(d="loading"),o&&(d="prefilled"),(0,re.jsxs)("div",{className:"relative space-y-1",children:[(0,re.jsx)(S,{showAsterisk:i,error:a,children:l}),(0,re.jsx)("textarea",{className:n("min-h-[80px]",K({status:d}),e),disabled:r||o,...c}),(0,re.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,re.jsx)(B,{error:a})]})};dt.displayName="Textarea";var ae=x(require("react"));var Y=x(require("react")),D=require("cmdk"),Qt=require("lucide-react");var ve=x(require("react")),h=x(require("@radix-ui/react-dialog"));var he=require("react/jsx-runtime"),_t=()=>(0,he.jsxs)("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:[(0,he.jsx)("path",{d:"M18 6 6 18"}),(0,he.jsx)("path",{d:"m6 6 12 12"})]});var C=require("react/jsx-runtime"),tr=h.Root,or=h.Trigger,$t=h.Portal,Ut=ve.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Overlay,{ref:o,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}));Ut.displayName=h.Overlay.displayName;var ct=ve.forwardRef(({className:e,hideCloseButton:t,children:o,...a},r)=>(0,C.jsxs)($t,{children:[(0,C.jsx)(Ut,{}),(0,C.jsxs)(h.Content,{ref:r,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),...a,children:[o,!t&&(0,C.jsxs)(h.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:[(0,C.jsx)(_t,{}),(0,C.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ct.displayName=h.Content.displayName;var Xt=({className:e,...t})=>(0,C.jsx)("div",{className:n("flex flex-col space-y-1.5 text-left",e),...t});Xt.displayName="DialogHeader";var Yt=({className:e,...t})=>(0,C.jsx)("div",{className:n("flex flex-row justify-end sm:space-x-2",e),...t});Yt.displayName="DialogFooter";var jt=ve.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Title,{ref:o,className:n("text-xl font-semibold leading-none tracking-tight",e),...t}));jt.displayName=h.Title.displayName;var Jt=ve.forwardRef(({className:e,...t},o)=>(0,C.jsx)(h.Description,{ref:o,className:n("text-sm text-gray-500",e),...t}));Jt.displayName=h.Description.displayName;var Oe=({trigger:e=void 0,children:t,open:o,onOpenChange:a,hideCloseButton:r,footer:i,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:p,descriptionClassName:u,footerClassName:m,asChild:b=!0,onOpenAutoFocus:T,onCloseAutoFocus:te,onEscapeKeyDown:ne,onInteractOutside:Z,onPointerDownOutside:tt,...ot})=>(0,C.jsxs)(tr,{...ot,open:o,onOpenChange:a,children:[(0,C.jsx)(or,{asChild:b,children:e}),(0,C.jsx)($t,{children:(0,C.jsxs)(ct,{className:c,hideCloseButton:r,onOpenAutoFocus:T,onCloseAutoFocus:te,onEscapeKeyDown:ne,onPointerDownOutside:tt,onInteractOutside:Z,children:[l||s?(0,C.jsxs)(Xt,{className:d,children:[l&&(0,C.jsx)(jt,{className:p,children:l}),s&&(0,C.jsx)(Jt,{className:u,children:s})]}):(0,C.jsx)(C.Fragment,{}),t,i&&(0,C.jsx)(Yt,{className:m,children:i})]})})]});Oe.displayName=h.Dialog.displayName;var k=require("react/jsx-runtime"),xe=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));xe.displayName=D.Command.displayName;var we=Y.forwardRef(({className:e,CommandInputContainerClassName:t,loading:o,...a},r)=>(0,k.jsxs)("div",{className:n("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[o?(0,k.jsx)(se,{size:16,colour:"secondary"}):(0,k.jsx)(Qt.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,k.jsx)(D.Command.Input,{ref:r,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:o,...a})]}));we.displayName=D.Command.Input.displayName;var Ne=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.List,{ref:o,className:n("overflow-y-auto overflow-x-hidden",e),...t}));Ne.displayName=D.Command.List.displayName;var Pe=Y.forwardRef((e,t)=>(0,k.jsx)(D.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Pe.displayName=D.Command.Empty.displayName;var Re=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Group,{ref:o,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}));Re.displayName=D.Command.Group.displayName;var rr=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));rr.displayName=D.Command.Separator.displayName;var De=Y.forwardRef(({className:e,...t},o)=>(0,k.jsx)(D.Command.Item,{ref:o,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}));De.displayName=D.Command.Item.displayName;var ar=({className:e,...t})=>(0,k.jsx)("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ar.displayName="CommandShortcut";var qt=x(require("react")),H=x(require("@radix-ui/react-popover"));var j=require("react/jsx-runtime"),$=H.Root,W=H.Trigger,z=qt.forwardRef(({className:e,align:t="center",sideOffset:o=4,portal:a=!0,...r},i)=>a?(0,j.jsx)(H.Portal,{children:(0,j.jsx)(H.Content,{ref:i,align:t,sideOffset:o,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:r.onOpenAutoFocus,onCloseAutoFocus:r.onCloseAutoFocus,...r})}):(0,j.jsx)(H.Content,{ref:i,align:t,sideOffset:o,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:r.onOpenAutoFocus,onCloseAutoFocus:r.onCloseAutoFocus,...r}));z.displayName=H.Content.displayName;var ke=({trigger:e,children:t,open:o,onOpenChange:a,contentClassName:r,asChild:i=!0,align:l,side:s,alignOffset:c,triggerClassName:d,sideOffset:p,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:b=!0,...T})=>(0,j.jsxs)($,{...T,open:o,onOpenChange:a,children:[(0,j.jsx)(W,{asChild:i,className:d,children:e}),(0,j.jsx)(z,{alignOffset:c,sideOffset:p,side:s,align:l,className:r,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:b,children:t})]});ke.displayName=H.Root.displayName;var pt=x(require("react")),I=x(require("@radix-ui/react-scroll-area"));var J=require("react/jsx-runtime"),Le=pt.forwardRef(({className:e,viewPortClassName:t,children:o,...a},r)=>(0,J.jsxs)(I.Root,{ref:r,className:n("relative overflow-hidden",e),...a,children:[(0,J.jsx)(I.Viewport,{className:n("h-full w-full rounded-[inherit]",t),children:o}),(0,J.jsx)(eo,{}),(0,J.jsx)(I.Corner,{})]}));Le.displayName=I.Root.displayName;var eo=pt.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,J.jsx)(I.ScrollAreaScrollbar,{ref:a,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),...o,children:(0,J.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));eo.displayName=I.ScrollAreaScrollbar.displayName;var R=require("react/jsx-runtime"),to=({className:e,value:t,placeholder:o="",status:a,disabled:r})=>(0,R.jsx)(W,{asChild:!0,disabled:r,children:(0,R.jsxs)("button",{disabled:r,className:n(K({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??o??"Select options...",(0,R.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,R.jsx)("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"})})]})}),He=({options:e=[],value:t,onChange:o,containerClassName:a,placeholder:r,disabled:i,loading:l,optionComponent:s,children:c,modal:d=!1,hideSearch:p,className:u,inputValue:m,onValueChange:b,onInputValueChange:T})=>{let[te,ne]=ae.useState(!1),Z=ae.useRef(null),[tt,ot]=ae.useState(void 0);return ae.useLayoutEffect(()=>{Z.current&&ot(Z.current.clientWidth)},[Z.current]),(0,R.jsxs)($,{modal:d,open:te,onOpenChange:ne,children:[(0,R.jsx)("div",{className:n("w-full",u),ref:Z,children:c}),(0,R.jsx)(z,{portal:!d,className:"p-0 min-w-[200px]",style:{width:tt},children:(0,R.jsxs)(xe,{className:n("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&(0,R.jsx)(we,{loading:l,placeholder:r??"Search options...",onValueChange:T,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,R.jsx)(Le,{viewPortClassName:"max-h-[225px]",className:n("w-full px-0 h-full overflow-y-auto",a),children:(0,R.jsxs)(Ne,{children:[!p&&(0,R.jsx)(Pe,{children:"No result found."}),(0,R.jsx)(Re,{className:"w-full",children:e?.map(ie=>(0,R.jsx)(De,{defaultValue:t?.label,value:ie.label,disabled:i,onSelect:()=>{o(ie),ne(!1),b?.(ie?.value)},children:s?s(ie):ie.label},ie.value))})]})})]})})]})};var mt=[{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"}],oo=()=>{let e={};return mt?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};var Te=x(require("react")),We=x(require("react-phone-number-input")),ao=x(require("react-phone-number-input/flags"));var Q=require("react/jsx-runtime"),nr=e=>(0,Q.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[(0,Q.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,Q.jsx)("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"}),(0,Q.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,Q.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,Q.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),ro=nr;var f=require("react/jsx-runtime"),ut=Te.forwardRef(({className:e,onChange:t,defaultCountry:o="NG",modal:a,showAsterisk:r,label:i,description:l,error:s,...c},d)=>{let p=u=>(0,f.jsx)(ir,{...u,status:c.status,modal:a});return(0,f.jsxs)("div",{className:"relative space-y-1",children:[(0,f.jsx)(S,{showAsterisk:r,error:s,children:i}),(0,f.jsx)(We.default,{ref:d,className:n("flex",e),flagComponent:U,countrySelectComponent:p,inputComponent:no,defaultCountry:o,onChange:u=>{t&&t?.(u)},...c}),(0,f.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,f.jsx)(B,{error:s})]})});ut.displayName="PhoneInput";var no=Te.forwardRef(({className:e,...t},o)=>(0,f.jsx)(_,{className:n("!rounded-s-none h-10",e),...t,ref:o}));no.displayName="InputComponent";var ir=({disabled:e,value:t,onChange:o,options:a,status:r,modal:i})=>{let l=Te.useCallback(s=>{o(s)},[o]);return(0,f.jsxs)($,{modal:i,children:[(0,f.jsx)(W,{disabled:e,children:(0,f.jsxs)("div",{className:n(K({status:r}),"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:[(0,f.jsx)(U,{country:t,countryName:t}),(0,f.jsx)("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:(0,f.jsx)("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"})})]})}),(0,f.jsx)(z,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,f.jsx)(xe,{children:(0,f.jsx)(Ne,{children:(0,f.jsxs)(Le,{className:"h-72",children:[(0,f.jsx)(we,{placeholder:"Search country..."}),(0,f.jsx)(Pe,{children:"No country found."}),(0,f.jsx)(Re,{children:a.filter(s=>s.value).map(s=>(0,f.jsxs)(De,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,f.jsx)(U,{country:s.value,countryName:s.label}),(0,f.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,f.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${We.getCountryCallingCode(s.value)}`}),(0,f.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:n("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:(0,f.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},U=({country:e,countryName:t,className:o})=>{let a=ao.default[e];return e==="GLOBAL"?(0,f.jsx)("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:(0,f.jsx)(ro,{className:"w-full h-[90%]"})}):(0,f.jsx)("span",{className:n("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:a&&(0,f.jsx)(a,{title:t})})};U.displayName="FlagComponent";var w=require("react/jsx-runtime"),sr=oo(),lr=({className:e,value:t,placeholder:o="",status:a,disabled:r})=>(0,w.jsx)(W,{asChild:!0,disabled:r,children:(0,w.jsxs)("button",{disabled:r,className:n(K({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?(0,w.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,w.jsx)(U,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),(0,w.jsxs)("span",{className:"",children:[" ",sr[t]]})]}):o??"Select options...",(0,w.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,w.jsx)("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"})})]})}),io=({hideSearch:e=!0,showAsterisk:t,label:o,description:a,error:r,...i})=>{let l=mt?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,w.jsxs)("div",{className:"relative space-y-1",children:[(0,w.jsx)(S,{showAsterisk:t,error:r,children:o}),(0,w.jsx)(He,{options:l,hideSearch:e,optionComponent:s=>(0,w.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,w.jsx)(U,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,w.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,w.jsx)(lr,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,w.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:a}),(0,w.jsx)(B,{error:r})]})};var q=require("react/jsx-runtime"),so=({showAsterisk:e,label:t,description:o,error:a,hideSearch:r=!0,status:i,...l})=>(0,q.jsxs)("div",{className:"relative space-y-1",children:[(0,q.jsx)(S,{showAsterisk:e,error:a,children:t}),(0,q.jsx)(He,{hideSearch:r,...l,containerClassName:"h-full",children:(0,q.jsx)(to,{disabled:l?.disabled,placeholder:l?.placeholder??"Select",status:i,value:l?.value?.label??l?.value?.value})}),(0,q.jsx)(V,{className:"text-gray-400 text-sm !font-normal",children:o}),(0,q.jsx)(B,{error:a})]});var lo=x(require("react-otp-input"));var co=require("class-variance-authority"),po=require("react"),ft=require("react/jsx-runtime"),dr=(0,co.cva)("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"}}),mo=({numInputs:e=4,inputStyle:t,containerStyle:o,placeholder:a="-",status:r,...i})=>{let l=(0,po.useMemo)(()=>a||new Array(e).fill("").reduce((d,p)=>d+=p,""),[e,a]);return(0,ft.jsx)(lo.default,{numInputs:e,placeholder:l,containerStyle:n("w-full",o),inputStyle:n(dr({status:r}),t),renderInput:s=>(0,ft.jsx)("input",{...s}),...i})};var Ge=require("react"),g=require("react/jsx-runtime"),cr=({type:e})=>e==="gray"?(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"?(0,g.jsx)("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:(0,g.jsx)("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"?(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"?(0,g.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"})}):(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("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"})}),uo=({type:e="info",title:t,description:o,open:a,showCloseButton:r,bottomNode:i,sideNode:l,onClose:s,showIcon:c=!0})=>{let[d,p]=(0,Ge.useState)(a);(0,Ge.useEffect)(()=>{p(a)},[a]);let u="",m="";switch(e){case"gray":u="#eeeef0",m="#79818c";break;case"info":u="#ebf5fd",m="#70B6F6";break;case"warning":u="#fff8df",m="#ffc700";break;case"success":u="#e0f9f0",m="#49e0aa";break;case"danger":u="#fde8e9",m="#f3777c";break;default:u="#eeeef0",m="#79818c";break}function b(){p(!1),s&&s()}return d?(0,g.jsxs)("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[(0,g.jsx)("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:m||"#70B6F6"}}),(0,g.jsxs)("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[(0,g.jsxs)("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[c&&(0,g.jsx)("div",{className:"h-full flex justify-end",children:(0,g.jsx)(cr,{type:e})}),(0,g.jsxs)("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[(0,g.jsxs)("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||o)&&(0,g.jsxs)("div",{children:[t&&(0,g.jsx)("div",{className:"text-sm font-bold text-[#191919]",children:t}),o&&(0,g.jsx)("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:o})]}),i]}),l]})]}),r&&(0,g.jsx)("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:(0,g.jsx)("button",{onClick:b,children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};var go=require("react"),ze=require("lucide-react"),Ze=require("framer-motion");var X=require("react/jsx-runtime"),yo=({text:e,textToCopy:t,onCopy:o,iconsPosition:a="right",clampText:r=!0,textClassName:i})=>{let[l,s]=(0,go.useState)(!1),c=()=>{navigator.clipboard.writeText(t??e).then(()=>{s(!0),o?.(),setTimeout(()=>s(!1),2e3)})},d=l?ze.CheckIcon:ze.Copy;return(0,X.jsxs)("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:[a==="left"&&(0,X.jsx)(fo,{Icon:d,onClick:c,copied:l}),(0,X.jsx)("span",{className:n({"truncate max-w-[100px]":r},i),children:e}),a==="right"&&(0,X.jsx)(fo,{Icon:d,onClick:c,copied:l})]})},fo=({Icon:e,onClick:t,copied:o})=>(0,X.jsx)(Ze.AnimatePresence,{mode:"wait",children:(0,X.jsx)(Ze.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:(0,X.jsx)(e,{className:`w-5 h-5 ${o?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},o?"check":"copy")});var Se=require("react");var Co=require("lucide-react"),gt=require("react/jsx-runtime"),Ke=({value:e,onChange:t,debounce:o=500,addon:a,...r})=>{let[i,l]=(0,Se.useState)(e??""),s=c=>l(c.target.value);return(0,Se.useEffect)(()=>{e&&l(e)},[e]),(0,Se.useEffect)(()=>{let c=setTimeout(()=>{t(i)},o);return()=>clearTimeout(c)},[i,o,t]),(0,gt.jsx)(_,{leftNode:a??(0,gt.jsx)(Co.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...r,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",r?.className),onChange:s,value:i})};var yt=require("react"),bo=require("lucide-react"),N=require("react/jsx-runtime"),ho=e=>{let{environment:t,branch:o,version:a,deployTime:r,showBanner:i,onClose:l,initDefault:s,removeFromStorage:c,syncLocalStorageToState:d}=e,p=t||process.env.NEXT_PUBLIC_NODE_ENV;return p!=="staging"&&p!=="sandbox"||((0,yt.useEffect)(()=>{d()},[d]),(0,yt.useEffect)(()=>{let u;return(p==="staging"||p==="sandbox")&&(u=setInterval(()=>{c(),s()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,t,l,c,s,p]),!i)?null:(0,N.jsxs)("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[(0,N.jsx)("button",{onClick:l,className:"absolute top-2 right-2",children:(0,N.jsx)(bo.X,{})}),(0,N.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Environment:"}),(0,N.jsx)("span",{className:"text-blue-600 capitalize",children:p})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Branch:"}),(0,N.jsx)("span",{className:"text-green-600 capitalize",children:o||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Version:"}),(0,N.jsx)("span",{className:"text-purple-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Deploy Time:"}),(0,N.jsx)("span",{className:"text-orange-600",children:r||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};var Ee=x(require("react")),L=require("vaul"),wo=require("class-variance-authority");var Fe=require("react/jsx-runtime"),vo=()=>(0,Fe.jsxs)("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:[(0,Fe.jsx)("path",{d:"M18 6 6 18"}),(0,Fe.jsx)("path",{d:"m6 6 12 12"})]});var _e=require("react");function xo(){let[e,t]=(0,_e.useState)({width:window.innerWidth,height:window.innerHeight});return(0,_e.useEffect)(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}var y=require("react/jsx-runtime"),$e=({shouldScaleBackground:e=!0,...t})=>(0,y.jsx)(L.Drawer.Root,{direction:"right",shouldScaleBackground:e,...t});$e.displayName="Drawer";var pr=L.Drawer.Trigger,No=L.Drawer.Close,mr=L.Drawer.Portal,Po=Ee.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Overlay,{className:n("fixed inset-0 z-40 bg-black/75 !m-0 !p-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Po.displayName=L.Drawer.Overlay.displayName;var ur=(0,wo.cva)("fixed focus-visible:outline-0 z-50 gap-4 bg-white shadow-lg dark:bg-[#2B2B2B] dark:text-white transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:border-none",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top rounded-b-lg",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-lg",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-[512px] ",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-[512px]"}},defaultVariants:{side:"right"}}),Ro=Ee.forwardRef(({side:e="right",hideCloseButton:t,className:o,children:a,...r},i)=>(0,y.jsxs)(mr,{children:[(0,y.jsx)(Po,{}),(0,y.jsxs)(L.Drawer.Content,{ref:i,className:n(ur({side:e}),o),...r,children:[(0,y.jsx)("button",{className:"bg-gray-300 block md:!hidden mx-auto mt-4 md:!mt-0 h-1.5 w-[80px] rounded-full opacity-70 transition-opacity hover:opacity-100 relative"}),a,!t&&(0,y.jsxs)(L.Drawer.Close,{className:"absolute right-2 top-3 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-secondary",children:[(0,y.jsx)(vo,{}),(0,y.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ro.displayName=L.Drawer.Content.displayName;var Do=({className:e,...t})=>(0,y.jsx)("div",{className:n("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});Do.displayName="DrawerHeader";var ko=({className:e,...t})=>(0,y.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row m-auto right-0 left-0 p-3 sm:space-x-2 border-t border-t-[#EDEDED] dark:border-t-[#242424] w-full",e),...t});ko.displayName="DrawerFooter";var Lo=Ee.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Title,{ref:o,className:n("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));Lo.displayName=L.Drawer.Title.displayName;var To=Ee.forwardRef(({className:e,...t},o)=>(0,y.jsx)(L.Drawer.Description,{ref:o,className:n("text-xs text-[#5d5c5c] dark:text-white",e),...t}));To.displayName=L.Drawer.Description.displayName;var So=({trigger:e=void 0,children:t,open:o=void 0,onOpenChange:a=void 0,hideCloseButton:r,footer:i,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:p,descriptionClassName:u,footerClassName:m,asChild:b=!0,onOpenAutoFocus:T,onCloseAutoFocus:te})=>{let{width:ne}=xo(),Z=ne<768?"bottom":"right";return(0,y.jsxs)($e,{open:o,onOpenChange:a,direction:Z,children:[(0,y.jsx)(pr,{className:"cursor-pointer",asChild:b,children:e}),(0,y.jsxs)(Ro,{className:n("flex flex-col gap-0 justify-start items-start max-h-[90vh] md:max-h-full w-full !max-w-md",c),side:Z,hideCloseButton:r,onOpenAutoFocus:T,onCloseAutoFocus:te,children:[l||s?(0,y.jsxs)(Do,{className:d,children:[l&&(0,y.jsx)(Lo,{className:p,children:l}),s&&(0,y.jsx)(To,{className:u,children:s})]}):(0,y.jsx)(y.Fragment,{}),(0,y.jsx)("div",{className:n("flex w-full overflow-y-auto flex-col justify-start items-start p-4 flex-1 h-[30px]"),children:t}),i&&(0,y.jsx)(ko,{className:m,children:i})]})]})};var Ct=require("react/jsx-runtime"),Fo=()=>(0,Ct.jsx)("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:(0,Ct.jsx)("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"})});var ee=require("react/jsx-runtime"),Eo=e=>(0,ee.jsxs)("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:[(0,ee.jsx)("rect",{width:"60",height:"30",fill:"#00247D"}),(0,ee.jsx)("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),(0,ee.jsx)("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),(0,ee.jsx)("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),(0,ee.jsx)("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});var le=require("react/jsx-runtime"),Io=e=>(0,le.jsxs)("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[(0,le.jsx)("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),(0,le.jsx)("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),(0,le.jsx)("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});var Ie=require("react/jsx-runtime"),Mo=()=>(0,Ie.jsxs)("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ie.jsx)("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ie.jsx)("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});var Ao=require("@radix-ui/react-popover"),P=require("react/jsx-runtime"),fr=[{key:"en",label:"English"},{key:"fr",label:"French"}],gr=({locale:e})=>e==="fr"?(0,P.jsx)(Io,{width:10}):(0,P.jsx)(Eo,{width:10}),yr=({locale:e})=>(0,P.jsx)("div",{className:"px-2 py-1 ",children:(0,P.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,P.jsx)(gr,{locale:e})," ",(0,P.jsx)("span",{className:"uppercase",children:e}),(0,P.jsx)(Mo,{})]})}),Bo=({locale:e="en",onChange:t,locales:o=fr})=>(0,P.jsxs)($,{children:[(0,P.jsx)("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:(0,P.jsx)(W,{className:"!p-0 !bg-transparent ",children:(0,P.jsx)(yr,{locale:e})})}),(0,P.jsx)(z,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:(0,P.jsx)("div",{children:o?.map(a=>(0,P.jsxs)(Ao.PopoverClose,{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===a?.key}),onClick:()=>t?.(a?.key),children:[a?.label," ",e&&e===a?.key&&(0,P.jsx)(Fo,{})]},a?.key))})})]});var Ue=require("react/jsx-runtime"),Vo=({status:e,variant:t,className:o})=>(0,Ue.jsx)("div",{children:(0,Ue.jsx)("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"},o),children:(0,Ue.jsx)("p",{children:e.replace("-"," ")})})});var Wo=require("lucide-react");var Ye=require("lucide-react");var Xe=require("react/jsx-runtime"),Cr=({page:e,currentPage:t,onClick:o})=>typeof e=="string"?(0,Xe.jsx)("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):(0,Xe.jsx)("button",{onClick:o,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}),Oo=({totalPages:e,currentPage:t,handlePageClick:o})=>{let r=()=>{let c=Math.floor(1.5),d=Math.max(1,t-c),p=Math.min(e,d+3-1);return p>e&&(d=Math.max(1,e-3+1),p=e),{start:d,end:p}},{start:i,end:l}=r(),s=[];return i>1&&s.push(1),i>2&&s.push("..."),s.push(...Array.from({length:l-i+1},(c,d)=>i+d)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((c,d)=>(0,Xe.jsx)(Cr,{page:c,currentPage:t,onClick:typeof c=="number"?()=>o(c):void 0},d))};var G=require("react/jsx-runtime"),je=({currentPage:e=1,totalPages:t=1,onPageChange:o,itemsPerPage:a=0,totalItems:r=0})=>{let i=c=>{c>=1&&c<=t&&o?.(c)},l=a===0?1:a*(e-1)+1,s=e===t?r:Math.min(l+a-1,r);return(0,G.jsxs)("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:[r&&(0,G.jsx)("section",{className:"text-[#717171] text-[12px]",children:(0,G.jsxs)("p",{className:"",children:["Showing ",l," - ",s," of ",r]})}),(0,G.jsx)("div",{className:"flex items-center justify-center sm:justify-end ",children:(0,G.jsxs)("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[(0,G.jsx)("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:(0,G.jsx)(Ye.ChevronLeftIcon,{className:"size-5"})}),Oo({currentPage:e,totalPages:t,handlePageClick:i}),(0,G.jsx)("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:(0,G.jsx)(Ye.ChevronRightIcon,{className:"size-5"})})]})})]})};var bt=require("@tanstack/react-table");var M=require("react/jsx-runtime"),Ho=({table:e,isMobile:t,onRowClick:o,id:a})=>(0,M.jsx)("div",{className:n("relative w-full rounded-b border-0",{}),children:(0,M.jsxs)("table",{id:a??"table",className:"w-full overflow-x-scroll",children:[(0,M.jsx)("thead",{children:e.getHeaderGroups().map(r=>(0,M.jsx)("tr",{className:n(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:r.headers.map(i=>(0,M.jsx)("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:(0,M.jsx)("div",{className:n("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,bt.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},r.id))}),(0,M.jsx)("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(r=>(0,M.jsx)("tr",{className:n("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":o}),onClick:()=>o?o(r):{},children:r.getVisibleCells().map(i=>(0,M.jsx)("td",{className:n("",{}),children:(0,M.jsx)("div",{className:n("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,bt.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},r.id))})]})});var de=require("lucide-react");var v=require("react/jsx-runtime"),Je=({onRefetch:e,search:t,FilterMenu:o,ExtraNode:a,onExport:r,download:i,isRefetching:l})=>{let s=d=>{t?.onSearch?.(d)},c=()=>{try{e?.()}catch(d){console.error("Error while refetching data",d)}};return(0,v.jsx)(v.Fragment,{children:(e||t?.enabled||o||a||r)&&(0,v.jsxs)("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[(0,v.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:(0,v.jsxs)("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&(0,v.jsx)("section",{className:"sm:w-56",children:(0,v.jsx)(Ke,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:s,debounce:t?.debounceRate})}),(0,v.jsxs)("div",{className:" flex gap-2",children:[e&&(0,v.jsx)(oe,{onClick:c,title:"Refetch Data",disabled:l,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,v.jsx)(de.RotateCw,{className:n("w-4 h-4",{"animate-spin":l}),size:5})}),o&&(0,v.jsx)(ke,{trigger:(0,v.jsx)("button",{title:"Filter",className:n("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ge({variant:"outlined",size:"sm"})),children:(0,v.jsx)(de.ListFilter,{className:"w-4 h-4",size:5})}),children:o})]})]})}),(0,v.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,v.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,v.jsxs)("div",{className:"flex gap-2",children:[a&&a,r&&(0,v.jsx)(oe,{variant:"primary",onClick:r,size:"sm",children:"Export"}),i?.enabled&&(0,v.jsx)(oe,{variant:"primary",leftNode:(0,v.jsx)(de.Download,{className:"w-4 h-5",size:5}),onClick:i?.onDownload,id:i.buttonId,size:"sm",children:i?.buttonText})]})})})]})})};var E=require("react/jsx-runtime"),Go=({table:e,isMobile:t=!1,onRowClick:o,id:a,onRefetch:r,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:c,search:d={enabled:!1,debounceRate:700},download:p={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:m})=>(0,E.jsxs)("div",{className:n("relative w-full rounded-b border-0 overflow-x-auto"),children:[(0,E.jsx)(Je,{onRefetch:r,search:d,FilterMenu:l,ExtraNode:s,onExport:c,download:p,isRefetching:i}),(0,E.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:u?(0,E.jsxs)("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[(0,E.jsx)(Wo.Loader,{size:20,className:"animate-spin"}),(0,E.jsx)("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?(0,E.jsx)("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:(0,E.jsx)("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):(0,E.jsx)("div",{className:"flex flex-col gap-2",children:(0,E.jsx)(Ho,{table:e,isMobile:t,onRowClick:o,id:a})})}),!u&&m?.enabled&&e.getRowModel().rows.length>0&&(0,E.jsx)(je,{...m,currentPage:m?.currentPage??1,totalPages:m?.totalPages??Math.ceil((m?.totalItems??0)/Math.max(m?.itemsPerPage??1,1))??1,onPageChange:b=>m?.onPageChange?.(b)})]});var Qe=require("react"),Zo=require("react/jsx-runtime"),Me=(0,Qe.createContext)(void 0),zo=({permissions:e,children:t})=>{let o=(0,Qe.useMemo)(()=>e,[e]);return(0,Zo.jsx)(Me.Provider,{value:o,children:t})};var ce=require("react");var ht=()=>(0,ce.useContext)(Me),qe=e=>{let t=ht(),o=(0,ce.useCallback)(r=>{if(!t||!r||t.some(p=>p.resource==="all"&&p.action==="administrator"))return!0;let{resource:l,action:s}=r,c=t.filter(p=>p.resource===l);return c.some(p=>p.action===s)?!0:s==="read"?c.some(p=>p.action==="write"):!1},[e]);return{hasPermission:(0,ce.useMemo)(()=>o(e),[t,e]),validatePermission:o}};var pe=require("react/jsx-runtime"),Ko=({permission:e,children:t})=>{let{hasPermission:o}=qe(e||{});return e?(0,pe.jsx)(pe.Fragment,{children:o?t:null}):(0,pe.jsx)(pe.Fragment,{children:t})};var vt={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$"},Ae=class Ae{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 vt[t]||t}};Pt(Ae,"formatAmountAndCurrency",(t,o,a)=>{let r=new Intl.NumberFormat(a?.locale||Ae.getCurrencyLocaleMap(t),{maximumFractionDigits:3,style:"currency",currency:t,currencyDisplay:"symbol"}).format(a?.convertToMajorCurrency?Ae.koboToNaira(Number(o)):Number(o)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=vt[t]||t;return r.replace(t,i)});var xt=Ae;var et=x(require("dayjs")),wt=class{static getDateLibrary(){return(0,et.default)()}static formatTimestampToDate(t,o){return et.default.unix(t).format(o||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return(0,et.default)(t).unix()}};0&&(module.exports={AmountAction,Banner,Button,CopyableLabel,Country,CurrencySymbolMap,DateAction,DebouncedInput,DevBanner,Dialog,Drawer,DrawerClose,DrawerRoot,FlagComponent,FormLabel,HasResourcePermission,Input,Loader,LocaleSelector,OTPInput,PageDataToolbar,Pagination,PasswordInput,PermissionsContext,PermissionsProvider,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn,useHasPermission,usePermissions});
2
2
  //# sourceMappingURL=index.js.map