@6thbridge/hexa 0.0.109-pr94-207 → 0.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use client";var Oi=Object.defineProperty;var Vi=(e,t,r)=>t in e?Oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lr=(e,t,r)=>Vi(e,typeof t!="symbol"?t+"":t,r);var Mo={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$"},Ot=class Ot{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 Mo[t]||t}};lr(Ot,"formatAmountAndCurrency",(t,r,o)=>{let a=new Intl.NumberFormat(o?.locale||Ot.getCurrencyLocaleMap(t),{maximumFractionDigits:2,style:"currency",currency:t,currencyDisplay:"symbol"}).format(o?.convertToMajorCurrency?Ot.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=Mo[t]||t;return a.replace(t,n)});var Io=Ot;import Ir from"dayjs";var Bo=class{static getDateLibrary(){return Ir()}static formatTimestampToDate(t,r){return Ir.unix(t).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ir(t).unix()}};var Br=class{static capitalizeFirstWord(t){return t.charAt(0).toUpperCase()+t.slice(1)}static capitalizeEachWord(t){return t.split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}};lr(Br,"sanitizeString",({str:t,allowedChars:r})=>{if(!r)return t.replace(/[^a-zA-Z0-9\s]/g,"");let o=r.map(n=>["^","$",".","*","+","?","(",")","[","]","{","}","|","\\","-"].includes(n)?"\\"+n:n),a=new RegExp(`[^a-zA-Z0-9${o.join("")}]`,"g");return t.replace(a,"")});import*as Vo from"react";import*as we from"@radix-ui/react-tooltip";import{clsx as Hi}from"clsx";import{twMerge as $i}from"tailwind-merge";function s(...e){return $i(Hi(e))}import{jsx as vt,jsxs as Oo}from"react/jsx-runtime";var Ho=we.Provider,$o=we.Root,_o=we.Trigger,Or=Vo.forwardRef(({className:e,sideOffset:t=2,...r},o)=>vt(we.Portal,{children:vt(we.Content,{ref:o,sideOffset:t,className:s("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...r,children:r.children})}));Or.displayName=we.Content.displayName;var cr=({trigger:e,children:t,contentClassName:r,triggerClassName:o,asChild:a=!0,side:n,sideOffset:i,align:l,alignOffset:f,delayDuration:c=100,hasArrow:m=!0,arrowClassName:u,...d})=>vt(Ho,{children:vt($o,{delayDuration:c,...d,children:Oo("div",{className:"flex justify-center items-center",children:[vt(_o,{asChild:a,className:o,children:e}),Oo(Or,{side:n,sideOffset:i,align:l,alignOffset:f,className:r,children:[t,m&&vt(we.Arrow,{className:s("fill-white",u)})]})]})})});cr.displayName="Tooltip";import Gi from"react";import*as zo from"react";import*as Vr from"@radix-ui/react-label";import{cva as _i}from"class-variance-authority";import{jsx as Wi}from"react/jsx-runtime";var zi=_i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hr=zo.forwardRef(({className:e,...t},r)=>Wi(Vr.Root,{ref:r,className:s(zi(),e),...t}));Hr.displayName=Vr.Root.displayName;import{jsx as Wo,jsxs as Ui}from"react/jsx-runtime";var Z=Gi.forwardRef(({className:e,children:t,showAsterisk:r,error:o,...a},n)=>Wo(Hr,{ref:n,className:s(o&&"text-red-500",e),...a,children:r?Ui("p",{children:[t,Wo("span",{className:"text-red-500",children:"*"})]}):t}));Z.displayName="FormLabel";import{jsx as Go,jsxs as Zi}from"react/jsx-runtime";var Fe=({size:e=16,colour:t="primary"})=>Zi("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Go("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Go("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Uo from"react";import{Slot as Ki}from"@radix-ui/react-slot";import{cva as ji}from"class-variance-authority";import{Fragment as Xi,jsx as lt,jsxs as Yi}from"react/jsx-runtime";var ce=ji("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=Uo.forwardRef(({className:e,variant:t="primary",size:r,asChild:o=!1,isLoading:a=!1,leftNode:n,rightNode:i,LoaderSize:l,children:f,disabled:c,...m},u)=>lt(o?Ki:"button",{className:s(ce({variant:t,size:r,className:e})),ref:u,disabled:c||a,...m,children:lt("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?lt("span",{className:"mx-auto",children:lt(Fe,{size:l,colour:"secondary"})}):Yi(Xi,{children:[n&<("span",{children:n}),f&<("span",{children:f}),i&<("span",{children:i})]})})}));oe.displayName="Button";import*as Re from"@radix-ui/react-dropdown-menu";import{ChevronDown as qi}from"lucide-react";import*as Zo from"react";import{jsx as ze,jsxs as dr}from"react/jsx-runtime";var Ji=ce,Ko=({items:e,variant:t="primary",size:r,isLoading:o=!1,leftNode:a,children:n,disabled:i,className:l,buttonClassName:f,triggerClassName:c,contentClassName:m,itemClassName:u,menuAlign:d="end",menuSide:g="bottom",menuTriggerLabel:C="More options",open:v,onOpenChange:h,modal:p=!1,id:x="split-button",...P})=>dr("div",{className:s("inline-flex",l),id:x,children:[ze(oe,{type:"button",variant:t,size:r,isLoading:o,leftNode:a,disabled:i,className:s("!rounded-r-none",f),id:`${x}-action`,...P,children:n}),dr(Re.Root,{open:v,onOpenChange:h,modal:p,children:[ze(Re.Trigger,{asChild:!0,disabled:i,className:"!h-full",children:ze(oe,{type:"button",variant:t,size:r,disabled:i,className:s("!px-2 !rounded-l-none !h-auto",Ji({variant:t,size:r}),c,{"!border-l-white border-l-[0.5px]":t==="primary"||t==="danger"}),id:`${x}-trigger`,"aria-label":C,children:ze(qi,{className:"h-full w-4"})})}),ze(Re.Portal,{children:ze(Re.Content,{align:d,side:g,sideOffset:4,className:s("z-50 min-w-[10rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 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",m),id:`${x}-content`,children:e.map((y,k)=>dr(Zo.Fragment,{children:[y.separatorBefore&&ze(Re.Separator,{className:"-mx-1 my-1 h-px bg-gray-100"}),dr(Re.Item,{disabled:y.disabled,onSelect:()=>y.onSelect?.(),className:s("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-primary-accent focus:bg-primary-accent data-[highlighted]:bg-primary-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",y.destructive&&"text-red-600 hover:bg-red-50 focus:bg-red-50 data-[highlighted]:bg-red-50",u,y.className),id:`${x}-item-${y.value??k}`,children:[y.icon&&ze("span",{className:"shrink-0",children:y.icon}),ze("span",{children:y.label})]})]},y.value??k))})})]})]});Ko.displayName="SplitButton";import*as $r from"react";import{cva as _r}from"class-variance-authority";import Qi from"react";import{jsx as es}from"react/jsx-runtime";var me=Qi.forwardRef(({className:e,children:t,error:r,...o},a)=>{let n=r??t;return n?es("p",{ref:a,className:s("text-xs font-normal text-[#F04248]",e),...o,children:n}):null});me.displayName="ErrorMessage";import ts from"react";import{jsx as rs}from"react/jsx-runtime";var Ne=ts.forwardRef(({className:e,...t},r)=>rs("div",{ref:r,className:s("text-sm text-[#8E98A8",e),...t}));Ne.displayName="FormDescription";import{jsx as ct,jsxs as Xo}from"react/jsx-runtime";var os=_r("!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"}}),Yo=$r.forwardRef(({className:e,status:t,type:r,...o},a)=>ct("input",{type:r,className:s(os({status:t}),e),ref:a,...o}));Yo.displayName="BaseInnerInput";var ne=_r("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"}}),jo=_r("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"}}),ae=$r.forwardRef(({className:e,status:t="default",disabled:r,error:o,isLoading:a,sideNodeClassName:n,showAsterisk:i,label:l,description:f,...c},m)=>{let u=t;return o&&(u="error"),a&&(u="loading"),r&&(u="prefilled"),Xo("div",{className:"relative space-y-1 w-full",children:[l&&ct(Z,{showAsterisk:i,error:o,children:l}),Xo("div",{className:s(ne({status:u}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?ct("div",{className:s(jo({status:u,side:"left"}),n),children:c.leftNode}):null,ct(Yo,{ref:m,disabled:a||r,className:s({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral","sentry-mask":!!c?.isContentSensitive}),...c}),c.rightNode?ct("div",{className:s(jo({status:u,side:"right"}),n),children:c.rightNode}):null]}),f&&ct(Ne,{className:"text-gray-400 text-sm !font-normal",children:f}),ct(me,{error:o})]})});ae.displayName="Input";import{useMemo as is,useState as an}from"react";import{jsx as qo}from"react/jsx-runtime";var Jo=()=>qo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Qo,jsxs as ns}from"react/jsx-runtime";var en=()=>ns("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qo("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"}),Qo("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as tn,jsxs as as}from"react/jsx-runtime";var rn=()=>as("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[tn("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"}),tn("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as on}from"react/jsx-runtime";var nn=()=>on("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:on("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as Ie,jsxs as ss}from"react/jsx-runtime";var sn=[{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:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],ln=({onValidate:e,onChange:t,disableValidation:r,...o})=>{let[a,n]=an(!1),[i,l]=an(sn),f=d=>sn.map(g=>({...g,validated:g.RegExp.test(d)})),c=d=>{let g=f(d),C=g.every(v=>v.validated);return l(g),C},m=d=>{if(t&&t(d),r)return;let g=d?.target?.value,C=c(g);e&&e(C,g)},u=is(()=>Ie("div",{className:"flex items-center gap-2",children:i?.map(d=>ss("div",{className:s("text-xs flex items-center gap-0.5",{"text-[#62C554]":d?.validated,"text-[#8E98A8]":!d?.validated}),children:[Ie("span",{className:"",children:d?.validated?Ie(Jo,{}):Ie(nn,{})}),Ie("span",{className:"",children:d?.label})]},d?.key))}),[i]);return Ie(ae,{sideNodeClassName:"!border-l-0",rightNode:a?Ie("button",{type:"button",onClick:()=>n(d=>!d),children:Ie(en,{})}):Ie("button",{type:"button",onClick:()=>n(d=>!d),children:Ie(rn,{})}),type:a?"text":"password",onChange:m,description:!r&&u,isContentSensitive:!0,...o})};ln.displayName="PasswordInput";import{cva as ls}from"class-variance-authority";import{jsx as ur,jsxs as cs}from"react/jsx-runtime";var v1=ls("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"}}),cn=({className:e,status:t="default",disabled:r,error:o,isLoading:a,showAsterisk:n,label:i,description:l,...f})=>{let c=t;return o&&(c="error"),a&&(c="loading"),r&&(c="prefilled"),cs("div",{className:"relative space-y-1",children:[ur(Z,{showAsterisk:n,error:o,children:i}),ur("textarea",{className:s("min-h-[80px]",ne({status:c}),e),disabled:a||r,...f}),ur(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),ur(me,{error:o})]})};cn.displayName="Textarea";import*as Sn from"react";import{X as Ts}from"lucide-react";import*as ie from"react";import{defaultFilter as Cs}from"cmdk";import*as et from"react";import{Command as fe}from"cmdk";import{Search as gs}from"lucide-react";import*as G from"@radix-ui/react-dialog";import*as Qe from"react";import{jsx as dn,jsxs as ds}from"react/jsx-runtime";var un=()=>ds("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:[dn("path",{d:"M18 6 6 18"}),dn("path",{d:"m6 6 12 12"})]});import{Fragment as fs,jsx as Ce,jsxs as bt}from"react/jsx-runtime";var us=G.Root,ps=G.Trigger,ms=G.Portal,pn=Qe.forwardRef(({className:e,...t},r)=>Ce(G.Overlay,{ref:r,className:s("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}));pn.displayName=G.Overlay.displayName;var zr=Qe.forwardRef(({className:e,hideCloseButton:t,children:r,...o},a)=>bt(ms,{children:[Ce(pn,{}),bt(G.Content,{ref:a,className:s("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] 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 max-h-[95%] overflow-y-auto",e),...o,children:[r,!t&&bt(G.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-20",children:[Ce(un,{}),Ce("span",{className:"sr-only",children:"Close"})]})]})]}));zr.displayName=G.Content.displayName;var mn=({className:e,...t})=>Ce("div",{className:s("flex flex-col space-y-1.5 text-left",e),...t});mn.displayName="DialogHeader";var fn=({className:e,...t})=>Ce("div",{className:s("flex flex-row justify-end sm:space-x-2",e),...t});fn.displayName="DialogFooter";var gn=Qe.forwardRef(({className:e,...t},r)=>Ce(G.Title,{ref:r,className:s("text-xl font-semibold leading-none tracking-tight",e),...t}));gn.displayName=G.Title.displayName;var hn=Qe.forwardRef(({className:e,...t},r)=>Ce(G.Description,{ref:r,className:s("text-sm text-gray-500",e),...t}));hn.displayName=G.Description.displayName;var Wr=({trigger:e=void 0,children:t,open:r,onOpenChange:o,hideCloseButton:a,footer:n,title:i,description:l,contentClassName:f,headerClassName:c,titleClassName:m,descriptionClassName:u,footerClassName:d,asChild:g=!0,onOpenAutoFocus:C,onCloseAutoFocus:v,onEscapeKeyDown:h,onInteractOutside:p,onPointerDownOutside:x,closeOnOutsideClick:P=!0,...y})=>{let k=Qe.useCallback(b=>{P||b.preventDefault(),x?.(b)},[P,x]),F=Qe.useCallback(b=>{P||b.preventDefault(),p?.(b)},[P,p]);return bt(us,{...y,...r!==void 0?{open:r,onOpenChange:o}:{},children:[Ce(ps,{asChild:g,children:e}),bt(zr,{className:f,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:v,onEscapeKeyDown:h,onPointerDownOutside:k,onInteractOutside:F,children:[i||l?bt(mn,{className:c,children:[i&&Ce(gn,{className:m,children:i}),l&&Ce(hn,{className:u,children:l})]}):Ce(fs,{}),t,n&&Ce(fn,{className:d,children:n})]})]})};Wr.displayName=G.Dialog.displayName;import{Fragment as F1,jsx as Be,jsxs as bs}from"react/jsx-runtime";var Vt=et.forwardRef(({className:e,...t},r)=>Be(fe,{ref:r,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Vt.displayName=fe.displayName;var Ht=et.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...o},a)=>bs("div",{className:s("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?Be(Fe,{size:16,colour:"secondary"}):Be(gs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Be(fe.Input,{ref:a,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...o})]}));Ht.displayName=fe.Input.displayName;var $t=et.forwardRef(({className:e,...t},r)=>Be(fe.List,{ref:r,className:s("overflow-y-auto overflow-x-hidden",e),...t}));$t.displayName=fe.List.displayName;var _t=et.forwardRef((e,t)=>Be(fe.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));_t.displayName=fe.Empty.displayName;var zt=et.forwardRef(({className:e,...t},r)=>Be(fe.Group,{ref:r,className:s("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}));zt.displayName=fe.Group.displayName;var hs=et.forwardRef(({className:e,...t},r)=>Be(fe.Separator,{ref:r,className:s("-mx-1 h-px bg-border",e),...t}));hs.displayName=fe.Separator.displayName;var Wt=et.forwardRef(({className:e,...t},r)=>Be(fe.Item,{ref:r,className:s("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}));Wt.displayName=fe.Item.displayName;var vs=({className:e,...t})=>Be("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});vs.displayName="CommandShortcut";import*as Gr from"react";import*as Pe from"@radix-ui/react-popover";import{jsx as yt,jsxs as ys}from"react/jsx-runtime";var ge=Pe.Root,ee=Gr.forwardRef((e,t)=>yt(Pe.Trigger,{ref:t,...e,onPointerDown:r=>{e.onPointerDown?.(r)}}));ee.displayName=Pe.Trigger.displayName;var de=Gr.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:o=!0,...a},n)=>o?yt(Pe.Portal,{children:yt(Pe.Content,{ref:n,align:t,sideOffset:r,className:s("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):yt(Pe.Content,{ref:n,align:t,sideOffset:r,className:s("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));de.displayName=Pe.Content.displayName;var De=({trigger:e,children:t,open:r,onOpenChange:o,contentClassName:a,asChild:n=!0,align:i,side:l,alignOffset:f,triggerClassName:c,sideOffset:m,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:g=!0,id:C="popover",...v})=>ys(ge,{...v,...r!==void 0?{open:r,onOpenChange:o}:{},children:[yt(ee,{asChild:n,className:c,id:`${C}-trigger`,children:e}),yt(de,{alignOffset:f,sideOffset:m,side:l,align:i,className:a,onOpenAutoFocus:u,onCloseAutoFocus:d,portal:g,id:`${C}-content`,children:t})]});De.displayName=Pe.Root.displayName;import*as Ur from"react";import*as Se from"@radix-ui/react-scroll-area";import{jsx as Gt,jsxs as ws}from"react/jsx-runtime";var Le=Ur.forwardRef(({className:e,viewPortClassName:t,children:r,...o},a)=>ws(Se.Root,{ref:a,className:s("relative overflow-hidden",e),...o,children:[Gt(Se.Viewport,{className:s("h-full w-full rounded-[inherit]",t),children:r}),Gt(pr,{}),Gt(Se.Corner,{})]}));Le.displayName=Se.Root.displayName;var pr=Ur.forwardRef(({className:e,orientation:t="vertical",...r},o)=>Gt(Se.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:Gt(Se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));pr.displayName=Se.ScrollAreaScrollbar.displayName;import{jsx as ke,jsxs as mr}from"react/jsx-runtime";var vn=({className:e,value:t,placeholder:r="",status:o,disabled:a,id:n})=>ke(ee,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:mr("button",{disabled:a,className:s(ne({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[ke("span",{children:t??r??"Select options..."}),ke("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ke("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"})})]})}),fr=({options:e=[],value:t,onChange:r,containerClassName:o,placeholder:a,disabled:n,loading:i,optionComponent:l,children:f,modal:c=!1,hideSearch:m,className:u,inputValue:d,onValueChange:g,onInputValueChange:C,searchDebounce:v=0,shouldFilter:h=!0})=>{let[p,x]=ie.useState(!1),[P,y]=ie.useState(d??""),[k,F]=ie.useState(d??""),b=ie.useRef(C);ie.useEffect(()=>{b.current=C},[C]),ie.useEffect(()=>{d!==void 0&&y(d)},[d]),ie.useEffect(()=>{if(v<=0||P===k)return;let E=setTimeout(()=>{F(P),b.current?.(P)},v);return()=>clearTimeout(E)},[v,P,k]);let S=E=>{y(E),!(v>0)&&(F(E),C?.(E))},D=ie.useMemo(()=>!h||v<=0||!k?e:e.map(E=>({option:E,score:Cs(E.label,k)})).filter(({score:E})=>E>0).sort((E,z)=>z.score-E.score).map(({option:E})=>E),[e,v,k,h]),[M,T]=ie.useState(void 0),N=ie.useRef(null),w=ie.useCallback(E=>{if(N.current&&(N.current.disconnect(),N.current=null),E){let z=()=>{T(E.getBoundingClientRect().width)};z();let Q=new ResizeObserver(()=>{z()});Q.observe(E),N.current=Q}},[]);return mr(ge,{modal:c,open:p,onOpenChange:x,children:[ke("div",{className:s("w-full",u),ref:w,children:f}),ke(de,{portal:!c,className:"p-0 min-w-[200px]",style:{width:M?`${M}px`:void 0},children:mr(Vt,{defaultValue:t?.label,shouldFilter:h&&v<=0,className:s("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&ke(Ht,{loading:i,placeholder:a??"Search options...",onValueChange:S,value:v>0?P:d,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ke(Le,{viewPortClassName:"max-h-[225px]",className:s("w-full px-0 h-full overflow-y-auto",o),children:mr($t,{children:[!m&&ke(_t,{children:"No result found."}),ke(zt,{className:"w-full",children:D?.map((E,z)=>ke(Wt,{defaultValue:t?.label,value:E.label,disabled:n,onSelect:()=>{r(E),x(!1),g?.(E?.value)},id:E.value,children:l?l(E):ke("span",{children:E.label})},`${E.value}-${z}`))})]})})]})})]})};import{X as Ns}from"lucide-react";import*as j from"react";import{v4 as yn}from"uuid";import{AnimatePresence as xs,motion as Rs}from"framer-motion";import*as bn from"react";import{jsx as tt,jsxs as Zr}from"react/jsx-runtime";var Ut=({size:e="md",semi:t=!1,className:r,id:o,label:a,labelClassName:n,labelWrapperClassName:i,disabled:l,subtitle:f,subtitleClassName:c,bodyClassName:m,checked:u,defaultChecked:d,onCheckedChange:g,name:C,value:v,onClick:h})=>{let p=bn.useId(),x=o??p,P=l?"#B0B0B0":"#00D488";return Zr("div",{className:s("flex justify-start items-start gap-1",m),children:[Zr("div",{className:"relative flex items-center justify-center",children:[tt("input",{type:"checkbox",id:x,name:C,value:v,checked:u,defaultChecked:d,disabled:l,onClick:h,onChange:y=>g?.(y.target.checked),className:s("appearance-none shrink-0 rounded-[3px] border border-solid border-base-500","bg-base-100 dark:bg-transparent cursor-pointer transition","hover:bg-status-success-bg hover:border-status-success-fill","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-success-fill focus-visible:ring-offset-2","checked:bg-status-success-bg checked:border-status-success-fill","disabled:cursor-not-allowed disabled:opacity-50",e==="md"?"h-5 w-5":"h-6 w-6",r)}),tt(xs,{children:u&&tt(Rs.svg,{className:"absolute pointer-events-none",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.1},...t?{width:12,height:2,viewBox:"0 0 12 2"}:{width:10,height:8,viewBox:"0 0 10 8"},fill:"none",children:t?tt("path",{d:"M1.9165 1H10.0832",stroke:P,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}):tt("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:P,strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})},t?"semi":"check")})]}),(a||f)&&Zr("div",{className:s("flex flex-col justify-start items-start",i),children:[tt("label",{htmlFor:x,children:tt("span",{className:s("text-sm font-normal cursor-pointer transition-colors text-base-700 dark:text-white",l&&"cursor-not-allowed opacity-50",n),onClick:()=>!l&&g?.(!u),children:a})}),f&&tt("p",{className:s("text-sm text-base-500",l&&"opacity-50",c),children:f})]})]})};Ut.displayName="Checkbox";import{jsx as V,jsxs as Ae}from"react/jsx-runtime";var wn=j.memo(({item:e,onDelete:t})=>Ae("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[V("span",{children:e.label}),V("button",{type:"button",className:"pl-2",onClick:r=>{r.stopPropagation(),t(e)},children:V(Ns,{size:12})})]}));wn.displayName="SelectedChip";var Kr=j.memo(({disabled:e,className:t,values:r,placeholder:o="",status:a,onDelete:n})=>V(ee,{asChild:!0,disabled:e,children:Ae("div",{className:s(ne({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[V("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:r.length?r.map(i=>V(wn,{item:i,onDelete:n},i.value)):V("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:o})}),V("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:V("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"})})]})}));Kr.displayName="MultiSelectTrigger";var Cn=j.memo(({option:e,isChecked:t,onSelect:r,optionComponent:o})=>V("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center focus:dark:!text-[#DDDFE0] py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1 focus-visible:ring-offset-status-success-fill",onClick:()=>r(e),children:V("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:V(Ut,{onCheckedChange:()=>r(e),value:e.value,label:o?o(e):V("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:s(o&&"w-full"),checked:t})})}));Cn.displayName="OptionItem";var jr=({options:e,children:t,onChange:r,optionComponent:o,values:a,hideSearch:n,shouldFilter:i=!0,onInputValueChange:l,modal:f,placeholder:c,isLoading:m,showSelectedValues:u=!1,error:d,label:g,showAsterisk:C})=>{let[v,h]=j.useState(""),p=a,x=j.useMemo(()=>new Set(p.map(T=>T.value)),[p]),P=j.useMemo(()=>{if(!i||!v)return e;let T=v.trim().toLowerCase();return e.filter(N=>N.label?.trim()?.toLowerCase()?.includes(T))},[e,v,i]),y=j.useCallback(T=>{let N=x.has(T.value);r(N?p.filter(w=>w.value!==T.value):[...p,T])},[p,x,r]),k=j.useRef(null),[F,b]=j.useState(void 0);j.useLayoutEffect(()=>{if(!k.current)return;let T=k.current,N=()=>{b(T.getBoundingClientRect().width)};N();let w=new ResizeObserver(()=>{N()});return w.observe(T),()=>w.disconnect()},[]);let S=j.useCallback(T=>{let N=p.filter(w=>w.value!==T.value);r(N)},[p,r]),D=j.useCallback(()=>{p.length===e.length?r([]):r(e)},[p.length,e,r]),M=j.useCallback(T=>{h(T.target.value),l?.(T.target.value)},[l]);return Ae("div",{className:"relative space-y-1",children:[V(Z,{showAsterisk:C,error:d,children:g}),Ae(ge,{modal:f,children:[V("div",{ref:k,children:t??V(Kr,{values:p,placeholder:c??"Select",onDelete:S,className:"h-auto"})}),u&&V("div",{className:"flex py-2 gap-2 flex-wrap",children:p.map(T=>V("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:V("span",{children:T.label})},yn()))}),Ae(de,{portal:!f,align:"start",className:"min-w-[200px] p-0",style:{width:F?`${F}px`:void 0},onInteractOutside:T=>{T.target?.closest("[data-radix-popper-content-wrapper]")&&T.preventDefault()},onOpenAutoFocus:T=>T.preventDefault(),children:[!n&&V("div",{className:"w-full px-4",children:Ae("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[m?V(Fe,{}):Ae("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),V("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),V("input",{value:v,placeholder:"Search",type:"text",disabled:m,className:"oultine-0 focus-visible:outline-0 focus-visible:ring-0 ml-1 w-full !border-transparent placeholder:text-sm placeholder:font-normal dark:bg-transparent placeholder:text-[#959595] dark:placeholder:text-[#DDDFE0] focus:ring-0 focus:ring-offset-0 focus:bg-white dark:focus:bg-transparent dark:text-[#DDDFE0]",onChange:M})]})}),Ae("div",{className:s("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[V("button",{className:"text-sm text-primary-main font-normal",onClick:D,disabled:P.length<1||m,children:Ae("span",{children:[p.length===e.length?"Unselect":"Select"," all"]})}),Ae("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[p.length," selected"]})]}),Ae(Le,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[m&&V("div",{className:"py-7 flex justify-center",children:V(Fe,{})}),!m&&P.map(T=>V(Cn,{option:T,isChecked:x.has(T.value),onSelect:y,optionComponent:o},yn()))]})]})]})]})};var Ps=[{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"}],xn=e=>{if(!e)return Ps?.map(r=>({value:r?.internetCountryCode,label:r?.countryName,...r}));if(!e?.length)return[];let t=new Set;return e.reduce((r,o)=>(t.has(o.value)||(t.add(o.value),r.push(o)),r),[])};import*as jt from"react";import*as gr from"react-phone-number-input";import Ls from"react-phone-number-input/flags";import{jsx as Zt,jsxs as Ss}from"react/jsx-runtime";var Ds=e=>Ss("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Zt("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Zt("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"}),Zt("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Zt("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Zt("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Rn=Ds;import{jsx as _,jsxs as Kt}from"react/jsx-runtime";var Nn=jt.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",disableCountrySelect:o=!1,modal:a,showAsterisk:n,label:i,description:l,error:f,countryOptions:c,...m},u)=>{let d=g=>_(ks,{...g,status:m.status,modal:a,options:c||g?.options});return Kt("div",{className:"relative space-y-1",children:[_(Z,{showAsterisk:n,error:f,children:i}),_(gr.default,{ref:u,className:s("flex sentry-mask",e),flagComponent:We,countrySelectComponent:g=>_(d,{...g,disabled:g?.disabled||o}),inputComponent:Pn,defaultCountry:r,onChange:g=>{t&&t?.(g)},...m}),_(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),_(me,{error:f})]})});Nn.displayName="PhoneInput";var Pn=jt.forwardRef(({className:e,...t},r)=>_(ae,{className:s("!rounded-s-none h-10",e),...t,ref:r}));Pn.displayName="InputComponent";var ks=({disabled:e,value:t,onChange:r,options:o,status:a,modal:n})=>{let i=jt.useCallback(l=>{r(l)},[r]);return Kt(ge,{modal:n,children:[_(ee,{disabled:e,children:Kt("div",{className:s(ne({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[_(We,{country:t,countryName:t}),_("svg",{className:s("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:_("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"})})]})}),_(de,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:_(Vt,{children:_($t,{children:Kt(Le,{className:"h-72",children:[_(Ht,{placeholder:"Search country..."}),_(_t,{children:"No country found."}),_(zt,{children:o.filter(l=>l.value).map(l=>Kt(Wt,{className:"gap-2",onSelect:()=>i(l.value),children:[_(We,{country:l.value,countryName:l.label}),_("span",{className:"flex-1 text-sm",children:l.label}),l.value&&_("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${gr.getCountryCallingCode(l.value)}`}),_("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:_("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},We=({country:e,countryName:t,className:r})=>{let o=Ls[e];return e==="GLOBAL"?_("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:_(Rn,{className:"w-full h-[90%]"})}):_("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&_(o,{title:t})})};We.displayName="FlagComponent";import{jsx as B,jsxs as rt}from"react/jsx-runtime";var Es=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>B(ee,{asChild:!0,disabled:a,id:"country-dropdown",children:rt("button",{disabled:a,className:s(ne({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?rt("div",{className:"flex gap-2 items-center",children:[B(We,{country:t?.value,countryName:t?.value,className:"ml-1 !w-6 h-5"}),B("span",{className:"",children:t?.label}),"-",B("span",{className:"",children:t?.value})]}):B("span",{children:r??"Select options..."}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:B("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"})})]})}),Ln=Sn.memo(({item:e,onDelete:t})=>rt("p",{className:"text-xs pl-1.5 pr-1 py-1 bg-gray-100 rounded-md flex items-center gap-1",children:[B(We,{country:e?.internetCountryCode||e?.value,countryName:e?.value,className:"!w-5 h-4"}),B("span",{children:e.label}),B("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t(e)},children:B(Ts,{size:12})})]}));Ln.displayName="CountryChip";var Fs=({className:e,values:t,placeholder:r="",status:o,disabled:a,onDelete:n})=>B(ee,{asChild:!0,disabled:a,id:"country-dropdown",children:rt("div",{className:s(ne({status:o}),"cursor-pointer h-auto min-h-12 flex items-center justify-between w-full gap-2",e),children:[B("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:t.length?t.map(i=>B(Ln,{item:i,onDelete:n},i.value)):B("span",{className:"text-[#79818C]",children:r})}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:B("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"})})]})}),Dn=e=>rt("div",{className:"w-full flex items-center gap-2",children:[B(We,{country:e?.internetCountryCode||e?.value,countryName:e?.label,className:"ml-2 !w-6 !h-5"}),rt("div",{className:"flex-1 flex items-center gap-2",children:[B("span",{className:"flex text-sm",children:e?.label}),"-",B("span",{className:"text-sm",children:e?.internetCountryCode})]})]}),As=e=>{let{hideSearch:t=!0,showAsterisk:r,label:o,description:a,error:n,countryOptions:i=void 0}=e,l=xn(i);if(e.multiSelect){let{value:d,onChange:g,placeholder:C,status:v,disabled:h,loading:p,modal:x,className:P,optionComponent:y}=e,k=d??[];return rt("div",{className:"relative space-y-1",children:[B(Z,{showAsterisk:r,error:n,children:o}),B(jr,{options:l,values:k,onChange:b=>g(b),hideSearch:t,modal:x,isLoading:p,placeholder:C??"Select Country",optionComponent:y??Dn,children:B(Fs,{values:k,status:v,disabled:h,className:P,placeholder:C??"Select Country",onDelete:b=>{g(k.filter(S=>S.value!==b.value))}})}),B(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),B(me,{error:n})]})}let{value:f,onChange:c,...m}=e,u=l?.find(d=>(d?.value||d?.internetCountryCode)===f?.value);return rt("div",{className:"relative space-y-1",children:[B(Z,{showAsterisk:r,error:n,children:o}),B(fr,{options:l,hideSearch:t,optionComponent:Dn,value:f,onChange:c,...m,children:B(Es,{value:u,status:m?.status,placeholder:m?.placeholder??" Select Country"})}),B(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),B(me,{error:n})]})};import{jsx as Xt,jsxs as Ms}from"react/jsx-runtime";var ot=({showAsterisk:e,label:t,description:r,error:o,hideSearch:a=!1,status:n,...i})=>Ms("div",{className:"relative space-y-1",children:[Xt(Z,{showAsterisk:e,error:o,children:t}),Xt(fr,{hideSearch:a,...i,containerClassName:"h-full",children:Xt(vn,{disabled:i?.disabled,placeholder:i?.placeholder??"Select",status:n,value:i?.value?.label??i?.value?.value,className:i?.className,id:i?.id})}),Xt(Ne,{className:"text-gray-400 text-sm !font-normal",children:r}),Xt(me,{error:o})]});import{cva as Is}from"class-variance-authority";import{useMemo as Bs}from"react";import Os from"react-otp-input";import{jsx as kn}from"react/jsx-runtime";var Vs=Is("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 flex-shrink-0",{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"}}),Hs=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:o="-",status:a,inputMode:n="numeric",inputType:i="number",...l})=>{let f=Bs(()=>o||new Array(e).fill("").reduce((u,d)=>u+=d,""),[e,o]);return kn(Os,{numInputs:e,placeholder:f,containerStyle:s("w-fit sentry-mask flex justify-between",r),inputStyle:s(Vs({status:a}),t,"sentry-mask"),renderInput:c=>kn("input",{...c,inputMode:n,type:i}),inputType:i,...l})};import*as Oe from"@radix-ui/react-accordion";import{ChevronDown as $s}from"lucide-react";import{jsx as Yt,jsxs as Tn}from"react/jsx-runtime";function _s({items:e,type:t="single",defaultValue:r,onChange:o,className:a}){return Yt(Oe.Root,{...t==="single"?{type:"single",collapsible:!0,defaultValue:r,onValueChange:o}:{type:"multiple",defaultValue:r,onValueChange:o},className:s("w-full flex flex-col gap-2.5",a),children:e.map(i=>Tn(Oe.Item,{value:i.key,className:"border border-gray-300 rounded-md overflow-hidden",children:[Yt(Oe.Header,{className:"flex",children:Tn(Oe.Trigger,{className:"group flex flex-1 items-center justify-between px-4 py-3 text-sm font-medium text-gray-800 hover:bg-gray-200/50 transition-all data-[state=open]:bg-gray-200/50",children:[i.title,Yt($s,{className:"h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),Yt(Oe.Content,{className:"overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",children:Yt("div",{className:"px-4 py-3 border-t border-gray-300",children:i.content})})]},i.key))})}import{useState as zs,useEffect as Ws}from"react";import{jsx as X,jsxs as dt}from"react/jsx-runtime";var Gs=({type:e})=>e==="gray"?X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{stroke:"#70B6F6",fill:"#70B6F6",strokeWidth:"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"})}):X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"})}),Us=({type:e="info",title:t,description:r,open:o,showCloseButton:a,bottomNode:n,sideNode:i,onClose:l,showIcon:f=!0})=>{let[c,m]=zs(o);Ws(()=>{m(o)},[o]);let u="",d="";switch(e){case"gray":u="#eeeef0",d="#79818c";break;case"info":u="#ebf5fd",d="#70B6F6";break;case"warning":u="#fff8df",d="#ffc700";break;case"success":u="#e0f9f0",d="#49e0aa";break;case"danger":u="#fde8e9",d="#f3777c";break;default:u="#eeeef0",d="#79818c";break}function g(){m(!1),l&&l()}return c?dt("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[X("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:d||"#70B6F6"}}),dt("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[dt("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[f&&X("div",{className:"h-full flex justify-end",children:X(Gs,{type:e})}),dt("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[dt("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||r)&&dt("div",{children:[t&&X("div",{className:"text-sm font-bold text-[#191919]",children:t}),r&&X("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),n]}),i]})]}),a&&X("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:X("button",{onClick:g,children:dt("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[X("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),X("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Ks}from"react";import{Copy as js,CheckIcon as Xs}from"lucide-react";import{motion as Ys,AnimatePresence as qs}from"framer-motion";import{jsx as Zs}from"react/jsx-runtime";var wt=({children:e,mode:t="truncate",className:r,as:o="div",...a})=>Zs(o,{className:s({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},r),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ct,jsxs as Qs}from"react/jsx-runtime";var Js=({text:e,textToCopy:t,onCopy:r,iconsPosition:o="right",clampText:a=!0,clampMode:n="truncate",isLink:i=!1,textClassName:l})=>{let[f,c]=Ks(!1),m=()=>{navigator.clipboard.writeText(t??e).then(()=>{c(!0),r?.(),setTimeout(()=>c(!1),2e3)})},u=f?Xs:js;return Qs("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[o==="left"&&Ct(En,{Icon:u,onClick:m,copied:f}),Ct(wt,{as:i?"a":"span",mode:a?n:"overflow",className:s({underline:i},l),href:i?e:void 0,children:e}),o==="right"&&Ct(En,{Icon:u,onClick:m,copied:f})]})},En=({Icon:e,onClick:t,copied:r})=>Ct(qs,{mode:"wait",children:Ct(Ys.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ct(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as Fn,useState as el}from"react";import{Search as tl}from"lucide-react";import{jsx as An}from"react/jsx-runtime";var Xr=({value:e,onChange:t,debounce:r=500,addon:o,...a})=>{let[n,i]=el(e??""),l=f=>i(f.target.value);return Fn(()=>{e&&i(e)},[e]),Fn(()=>{let f=setTimeout(()=>{t(n)},r);return()=>clearTimeout(f)},[n,r,t]),An(ae,{leftNode:o??An(tl,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:s("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:l,value:n})};import{useEffect as Mn}from"react";import{X as rl}from"lucide-react";import{jsx as Ve,jsxs as xt}from"react/jsx-runtime";var ol=e=>{let{environment:t,branch:r,version:o,deployTime:a,showBanner:n,onClose:i,initDefault:l,removeFromStorage:f,syncLocalStorageToState:c}=e,m=t||process.env.NEXT_PUBLIC_NODE_ENV;return m!=="staging"&&m!=="sandbox"||(Mn(()=>{c()},[c]),Mn(()=>{let u;return(m==="staging"||m==="sandbox")&&(u=setInterval(()=>{f(),l()},300*1e3)),()=>{u&&clearInterval(u)}},[n,t,i,f,l,m]),!n)?null:xt("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[Ve("button",{onClick:i,className:"absolute top-2 right-2",children:Ve(rl,{})}),xt("div",{className:"space-y-2 text-sm",children:[xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Environment:"}),Ve("span",{className:"text-blue-600 capitalize",children:m})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Branch:"}),Ve("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Version:"}),Ve("span",{className:"text-purple-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Deploy Time:"}),Ve("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{cva as Ol}from"class-variance-authority";import*as Qt from"react";import*as se from"@radix-ui/react-dialog";import*as Hn from"react";import R,{useLayoutEffect as al,useEffect as il,useMemo as sl}from"react";function nl(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var $n=R.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Rt=()=>{let e=R.useContext($n);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};nl(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1
|
+
"use client";var Hi=Object.defineProperty;var $i=(e,t,r)=>t in e?Hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lr=(e,t,r)=>$i(e,typeof t!="symbol"?t+"":t,r);var Mo={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$"},Ot=class Ot{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 Mo[t]||t}};lr(Ot,"formatAmountAndCurrency",(t,r,o)=>{let a=new Intl.NumberFormat(o?.locale||Ot.getCurrencyLocaleMap(t),{maximumFractionDigits:2,style:"currency",currency:t,currencyDisplay:"symbol"}).format(o?.convertToMajorCurrency?Ot.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),n=Mo[t]||t;return a.replace(t,n)});var Io=Ot;import Ir from"dayjs";var Bo=class{static getDateLibrary(){return Ir()}static formatTimestampToDate(t,r){return Ir.unix(t).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(t){return Ir(t).unix()}};var Br=class{static capitalizeFirstWord(t){return t.charAt(0).toUpperCase()+t.slice(1)}static capitalizeEachWord(t){return t.split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}};lr(Br,"sanitizeString",({str:t,allowedChars:r})=>{if(!r)return t.replace(/[^a-zA-Z0-9\s]/g,"");let o=r.map(n=>["^","$",".","*","+","?","(",")","[","]","{","}","|","\\","-"].includes(n)?"\\"+n:n),a=new RegExp(`[^a-zA-Z0-9${o.join("")}]`,"g");return t.replace(a,"")});import*as Vo from"react";import*as we from"@radix-ui/react-tooltip";import{clsx as _i}from"clsx";import{twMerge as zi}from"tailwind-merge";function s(...e){return zi(_i(e))}import{jsx as vt,jsxs as Oo}from"react/jsx-runtime";var Ho=we.Provider,$o=we.Root,_o=we.Trigger,Or=Vo.forwardRef(({className:e,sideOffset:t=2,...r},o)=>vt(we.Portal,{children:vt(we.Content,{ref:o,sideOffset:t,className:s("z-50 rounded-md border border-transparent bg-gray-50 px-3 py-1.5 text-base font-semibold text-bold text-black/40 shadow-xl- animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 [box-shadow:3px_4px_11px_0px_#0000001A,13px_16px_21px_0px_#00000017,29px_36px_28px_0px_#0000000D,52px_65px_33px_0px_#00000003,82px_101px_36px_0px_#00000000]",e),...r,children:r.children})}));Or.displayName=we.Content.displayName;var cr=({trigger:e,children:t,contentClassName:r,triggerClassName:o,asChild:a=!0,side:n,sideOffset:i,align:l,alignOffset:f,delayDuration:c=100,hasArrow:m=!0,arrowClassName:d,...u})=>vt(Ho,{children:vt($o,{delayDuration:c,...u,children:Oo("div",{className:"flex justify-center items-center",children:[vt(_o,{asChild:a,className:o,children:e}),Oo(Or,{side:n,sideOffset:i,align:l,alignOffset:f,className:r,children:[t,m&&vt(we.Arrow,{className:s("fill-white",d)})]})]})})});cr.displayName="Tooltip";import Zi from"react";import*as zo from"react";import*as Vr from"@radix-ui/react-label";import{cva as Wi}from"class-variance-authority";import{jsx as Ui}from"react/jsx-runtime";var Gi=Wi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hr=zo.forwardRef(({className:e,...t},r)=>Ui(Vr.Root,{ref:r,className:s(Gi(),e),...t}));Hr.displayName=Vr.Root.displayName;import{jsx as Wo,jsxs as Ki}from"react/jsx-runtime";var Z=Zi.forwardRef(({className:e,children:t,showAsterisk:r,error:o,...a},n)=>Wo(Hr,{ref:n,className:s(o&&"text-red-500",e),...a,children:r?Ki("p",{children:[t,Wo("span",{className:"text-red-500",children:"*"})]}):t}));Z.displayName="FormLabel";import{jsx as Go,jsxs as ji}from"react/jsx-runtime";var Ee=({size:e=16,colour:t="primary"})=>ji("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Go("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Go("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Uo from"react";import{Slot as Xi}from"@radix-ui/react-slot";import{cva as Yi}from"class-variance-authority";import{Fragment as qi,jsx as lt,jsxs as Qi}from"react/jsx-runtime";var ce=Yi("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=Uo.forwardRef(({className:e,variant:t="primary",size:r,asChild:o=!1,isLoading:a=!1,leftNode:n,rightNode:i,LoaderSize:l,children:f,disabled:c,...m},d)=>lt(o?Xi:"button",{className:s(ce({variant:t,size:r,className:e})),ref:d,disabled:c||a,...m,children:lt("div",{className:"flex font-medium justify-center items-center gap-2 pointer-events-none",children:a?lt("span",{className:"mx-auto",children:lt(Ee,{size:l,colour:"secondary"})}):Qi(qi,{children:[n&<("span",{children:n}),f&<("span",{children:f}),i&<("span",{children:i})]})})}));oe.displayName="Button";import*as Re from"@radix-ui/react-dropdown-menu";import{ChevronDown as Ji}from"lucide-react";import*as Zo from"react";import{jsx as ze,jsxs as dr}from"react/jsx-runtime";var es=ce,Ko=({items:e,variant:t="primary",size:r,isLoading:o=!1,leftNode:a,children:n,disabled:i,className:l,buttonClassName:f,triggerClassName:c,contentClassName:m,itemClassName:d,menuAlign:u="end",menuSide:g="bottom",menuTriggerLabel:C="More options",open:v,onOpenChange:h,modal:p=!1,id:x="split-button",...P})=>dr("div",{className:s("inline-flex",l),id:x,children:[ze(oe,{type:"button",variant:t,size:r,isLoading:o,leftNode:a,disabled:i,className:s("!rounded-r-none",f),id:`${x}-action`,...P,children:n}),dr(Re.Root,{open:v,onOpenChange:h,modal:p,children:[ze(Re.Trigger,{asChild:!0,disabled:i,className:"!h-full",children:ze(oe,{type:"button",variant:t,size:r,disabled:i,className:s("!px-2 !rounded-l-none !h-auto",es({variant:t,size:r}),c,{"!border-l-white border-l-[0.5px]":t==="primary"||t==="danger"}),id:`${x}-trigger`,"aria-label":C,children:ze(Ji,{className:"h-full w-4"})})}),ze(Re.Portal,{children:ze(Re.Content,{align:u,side:g,sideOffset:4,className:s("z-50 min-w-[10rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 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",m),id:`${x}-content`,children:e.map((b,k)=>dr(Zo.Fragment,{children:[b.separatorBefore&&ze(Re.Separator,{className:"-mx-1 my-1 h-px bg-gray-100"}),dr(Re.Item,{disabled:b.disabled,onSelect:()=>b.onSelect?.(),className:s("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-primary-accent focus:bg-primary-accent data-[highlighted]:bg-primary-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",b.destructive&&"text-red-600 hover:bg-red-50 focus:bg-red-50 data-[highlighted]:bg-red-50",d,b.className),id:`${x}-item-${b.value??k}`,children:[b.icon&&ze("span",{className:"shrink-0",children:b.icon}),ze("span",{children:b.label})]})]},b.value??k))})})]})]});Ko.displayName="SplitButton";import*as $r from"react";import{cva as _r}from"class-variance-authority";import ts from"react";import{jsx as rs}from"react/jsx-runtime";var me=ts.forwardRef(({className:e,children:t,error:r,...o},a)=>{let n=r??t;return n?rs("p",{ref:a,className:s("text-xs font-normal text-[#F04248]",e),...o,children:n}):null});me.displayName="ErrorMessage";import os from"react";import{jsx as ns}from"react/jsx-runtime";var Ne=os.forwardRef(({className:e,...t},r)=>ns("div",{ref:r,className:s("text-sm text-[#8E98A8",e),...t}));Ne.displayName="FormDescription";import{jsx as ct,jsxs as Xo}from"react/jsx-runtime";var as=_r("!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"}}),Yo=$r.forwardRef(({className:e,status:t,type:r,...o},a)=>ct("input",{type:r,className:s(as({status:t}),e),ref:a,...o}));Yo.displayName="BaseInnerInput";var ne=_r("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"}}),jo=_r("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"}}),ae=$r.forwardRef(({className:e,status:t="default",disabled:r,error:o,isLoading:a,sideNodeClassName:n,showAsterisk:i,label:l,description:f,...c},m)=>{let d=t;return o&&(d="error"),a&&(d="loading"),r&&(d="prefilled"),Xo("div",{className:"relative space-y-1 w-full",children:[l&&ct(Z,{showAsterisk:i,error:o,children:l}),Xo("div",{className:s(ne({status:d}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?ct("div",{className:s(jo({status:d,side:"left"}),n),children:c.leftNode}):null,ct(Yo,{ref:m,disabled:a||r,className:s({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral","sentry-mask":!!c?.isContentSensitive}),...c}),c.rightNode?ct("div",{className:s(jo({status:d,side:"right"}),n),children:c.rightNode}):null]}),f&&ct(Ne,{className:"text-gray-400 text-sm !font-normal",children:f}),ct(me,{error:o})]})});ae.displayName="Input";import{useMemo as ls,useState as an}from"react";import{jsx as qo}from"react/jsx-runtime";var Qo=()=>qo("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:qo("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Jo,jsxs as is}from"react/jsx-runtime";var en=()=>is("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Jo("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"}),Jo("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as tn,jsxs as ss}from"react/jsx-runtime";var rn=()=>ss("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[tn("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"}),tn("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as on}from"react/jsx-runtime";var nn=()=>on("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:on("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as Ie,jsxs as cs}from"react/jsx-runtime";var sn=[{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:"12 Characters",key:"twelve-chars",RegExp:/.{12}/,validated:!1}],ln=({onValidate:e,onChange:t,disableValidation:r,...o})=>{let[a,n]=an(!1),[i,l]=an(sn),f=u=>sn.map(g=>({...g,validated:g.RegExp.test(u)})),c=u=>{let g=f(u),C=g.every(v=>v.validated);return l(g),C},m=u=>{if(t&&t(u),r)return;let g=u?.target?.value,C=c(g);e&&e(C,g)},d=ls(()=>Ie("div",{className:"flex items-center gap-2",children:i?.map(u=>cs("div",{className:s("text-xs flex items-center gap-0.5",{"text-[#62C554]":u?.validated,"text-[#8E98A8]":!u?.validated}),children:[Ie("span",{className:"",children:u?.validated?Ie(Qo,{}):Ie(nn,{})}),Ie("span",{className:"",children:u?.label})]},u?.key))}),[i]);return Ie(ae,{sideNodeClassName:"!border-l-0",rightNode:a?Ie("button",{type:"button",onClick:()=>n(u=>!u),children:Ie(en,{})}):Ie("button",{type:"button",onClick:()=>n(u=>!u),children:Ie(rn,{})}),type:a?"text":"password",onChange:m,description:!r&&d,isContentSensitive:!0,...o})};ln.displayName="PasswordInput";import{cva as ds}from"class-variance-authority";import{jsx as ur,jsxs as us}from"react/jsx-runtime";var b1=ds("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"}}),cn=({className:e,status:t="default",disabled:r,error:o,isLoading:a,showAsterisk:n,label:i,description:l,...f})=>{let c=t;return o&&(c="error"),a&&(c="loading"),r&&(c="prefilled"),us("div",{className:"relative space-y-1",children:[ur(Z,{showAsterisk:n,error:o,children:i}),ur("textarea",{className:s("min-h-[80px]",ne({status:c}),e),disabled:a||r,...f}),ur(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),ur(me,{error:o})]})};cn.displayName="Textarea";import*as Sn from"react";import{X as Es}from"lucide-react";import*as ie from"react";import{defaultFilter as Rs}from"cmdk";import*as et from"react";import{Command as fe}from"cmdk";import{Search as vs}from"lucide-react";import*as G from"@radix-ui/react-dialog";import*as Je from"react";import{jsx as dn,jsxs as ps}from"react/jsx-runtime";var un=()=>ps("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:[dn("path",{d:"M18 6 6 18"}),dn("path",{d:"m6 6 12 12"})]});import{Fragment as hs,jsx as Ce,jsxs as yt}from"react/jsx-runtime";var ms=G.Root,fs=G.Trigger,gs=G.Portal,pn=Je.forwardRef(({className:e,...t},r)=>Ce(G.Overlay,{ref:r,className:s("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}));pn.displayName=G.Overlay.displayName;var zr=Je.forwardRef(({className:e,hideCloseButton:t,children:r,...o},a)=>yt(gs,{children:[Ce(pn,{}),yt(G.Content,{ref:a,className:s("fixed left-[50%] top-[50%] z-50 grid sm:w-full w-[95%] 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 max-h-[95%] overflow-y-auto",e),...o,children:[r,!t&&yt(G.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-20",children:[Ce(un,{}),Ce("span",{className:"sr-only",children:"Close"})]})]})]}));zr.displayName=G.Content.displayName;var mn=({className:e,...t})=>Ce("div",{className:s("flex flex-col space-y-1.5 text-left",e),...t});mn.displayName="DialogHeader";var fn=({className:e,...t})=>Ce("div",{className:s("flex flex-row justify-end sm:space-x-2",e),...t});fn.displayName="DialogFooter";var gn=Je.forwardRef(({className:e,...t},r)=>Ce(G.Title,{ref:r,className:s("text-xl font-semibold leading-none tracking-tight",e),...t}));gn.displayName=G.Title.displayName;var hn=Je.forwardRef(({className:e,...t},r)=>Ce(G.Description,{ref:r,className:s("text-sm text-gray-500",e),...t}));hn.displayName=G.Description.displayName;var Wr=({trigger:e=void 0,children:t,open:r,onOpenChange:o,hideCloseButton:a,footer:n,title:i,description:l,contentClassName:f,headerClassName:c,titleClassName:m,descriptionClassName:d,footerClassName:u,asChild:g=!0,onOpenAutoFocus:C,onCloseAutoFocus:v,onEscapeKeyDown:h,onInteractOutside:p,onPointerDownOutside:x,closeOnOutsideClick:P=!0,...b})=>{let k=Je.useCallback(y=>{P||y.preventDefault(),x?.(y)},[P,x]),E=Je.useCallback(y=>{P||y.preventDefault(),p?.(y)},[P,p]);return yt(ms,{...b,...r!==void 0?{open:r,onOpenChange:o}:{},children:[Ce(fs,{asChild:g,children:e}),yt(zr,{className:f,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:v,onEscapeKeyDown:h,onPointerDownOutside:k,onInteractOutside:E,children:[i||l?yt(mn,{className:c,children:[i&&Ce(gn,{className:m,children:i}),l&&Ce(hn,{className:d,children:l})]}):Ce(hs,{}),t,n&&Ce(fn,{className:u,children:n})]})]})};Wr.displayName=G.Dialog.displayName;import{Fragment as M1,jsx as Be,jsxs as ws}from"react/jsx-runtime";var Vt=et.forwardRef(({className:e,...t},r)=>Be(fe,{ref:r,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Vt.displayName=fe.displayName;var Ht=et.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...o},a)=>ws("div",{className:s("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?Be(Ee,{size:16,colour:"secondary"}):Be(vs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Be(fe.Input,{ref:a,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...o})]}));Ht.displayName=fe.Input.displayName;var $t=et.forwardRef(({className:e,...t},r)=>Be(fe.List,{ref:r,className:s("overflow-y-auto overflow-x-hidden",e),...t}));$t.displayName=fe.List.displayName;var _t=et.forwardRef((e,t)=>Be(fe.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));_t.displayName=fe.Empty.displayName;var zt=et.forwardRef(({className:e,...t},r)=>Be(fe.Group,{ref:r,className:s("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}));zt.displayName=fe.Group.displayName;var ys=et.forwardRef(({className:e,...t},r)=>Be(fe.Separator,{ref:r,className:s("-mx-1 h-px bg-border",e),...t}));ys.displayName=fe.Separator.displayName;var Wt=et.forwardRef(({className:e,...t},r)=>Be(fe.Item,{ref:r,className:s("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}));Wt.displayName=fe.Item.displayName;var bs=({className:e,...t})=>Be("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bs.displayName="CommandShortcut";import*as Gr from"react";import*as Pe from"@radix-ui/react-popover";import{jsx as bt,jsxs as Cs}from"react/jsx-runtime";var ge=Pe.Root,ee=Gr.forwardRef((e,t)=>bt(Pe.Trigger,{ref:t,...e,onPointerDown:r=>{e.onPointerDown?.(r)}}));ee.displayName=Pe.Trigger.displayName;var de=Gr.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:o=!0,...a},n)=>o?bt(Pe.Portal,{children:bt(Pe.Content,{ref:n,align:t,sideOffset:r,className:s("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):bt(Pe.Content,{ref:n,align:t,sideOffset:r,className:s("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));de.displayName=Pe.Content.displayName;var De=({trigger:e,children:t,open:r,onOpenChange:o,contentClassName:a,asChild:n=!0,align:i,side:l,alignOffset:f,triggerClassName:c,sideOffset:m,onOpenAutoFocus:d,onCloseAutoFocus:u,portal:g=!0,id:C="popover",...v})=>Cs(ge,{...v,...r!==void 0?{open:r,onOpenChange:o}:{},children:[bt(ee,{asChild:n,className:c,id:`${C}-trigger`,children:e}),bt(de,{alignOffset:f,sideOffset:m,side:l,align:i,className:a,onOpenAutoFocus:d,onCloseAutoFocus:u,portal:g,id:`${C}-content`,children:t})]});De.displayName=Pe.Root.displayName;import*as Ur from"react";import*as Se from"@radix-ui/react-scroll-area";import{jsx as Gt,jsxs as xs}from"react/jsx-runtime";var Le=Ur.forwardRef(({className:e,viewPortClassName:t,children:r,...o},a)=>xs(Se.Root,{ref:a,className:s("relative overflow-hidden",e),...o,children:[Gt(Se.Viewport,{className:s("h-full w-full rounded-[inherit]",t),children:r}),Gt(pr,{}),Gt(Se.Corner,{})]}));Le.displayName=Se.Root.displayName;var pr=Ur.forwardRef(({className:e,orientation:t="vertical",...r},o)=>Gt(Se.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:Gt(Se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));pr.displayName=Se.ScrollAreaScrollbar.displayName;import{jsx as ke,jsxs as mr}from"react/jsx-runtime";var vn=({className:e,value:t,placeholder:r="",status:o,disabled:a,id:n})=>ke(ee,{asChild:!0,disabled:a,id:n??"searchable-trigger",children:mr("button",{disabled:a,className:s(ne({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[ke("span",{children:t??r??"Select options..."}),ke("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:ke("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"})})]})}),fr=({options:e=[],value:t,onChange:r,containerClassName:o,placeholder:a,disabled:n,loading:i,optionComponent:l,children:f,modal:c=!1,hideSearch:m,className:d,inputValue:u,onValueChange:g,onInputValueChange:C,searchDebounce:v=0,shouldFilter:h=!0})=>{let[p,x]=ie.useState(!1),[P,b]=ie.useState(u??""),[k,E]=ie.useState(u??""),y=ie.useRef(C);ie.useEffect(()=>{y.current=C},[C]),ie.useEffect(()=>{u!==void 0&&b(u)},[u]),ie.useEffect(()=>{if(v<=0||P===k)return;let F=setTimeout(()=>{E(P),y.current?.(P)},v);return()=>clearTimeout(F)},[v,P,k]);let S=F=>{b(F),!(v>0)&&(E(F),C?.(F))},D=ie.useMemo(()=>!h||v<=0||!k?e:e.map(F=>({option:F,score:Rs(F.label,k)})).filter(({score:F})=>F>0).sort((F,z)=>z.score-F.score).map(({option:F})=>F),[e,v,k,h]),[M,T]=ie.useState(void 0),N=ie.useRef(null),w=ie.useCallback(F=>{if(N.current&&(N.current.disconnect(),N.current=null),F){let z=()=>{T(F.getBoundingClientRect().width)};z();let J=new ResizeObserver(()=>{z()});J.observe(F),N.current=J}},[]);return mr(ge,{modal:c,open:p,onOpenChange:x,children:[ke("div",{className:s("w-full",d),ref:w,children:f}),ke(de,{portal:!c,className:"p-0 min-w-[200px]",style:{width:M?`${M}px`:void 0},children:mr(Vt,{defaultValue:t?.label,shouldFilter:h&&v<=0,className:s("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&ke(Ht,{loading:i,placeholder:a??"Search options...",onValueChange:S,value:v>0?P:u,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),ke(Le,{viewPortClassName:"max-h-[225px]",className:s("w-full px-0 h-full overflow-y-auto",o),children:mr($t,{children:[!m&&ke(_t,{children:"No result found."}),ke(zt,{className:"w-full",children:D?.map((F,z)=>ke(Wt,{defaultValue:t?.label,value:F.label,disabled:n,onSelect:()=>{r(F),x(!1),g?.(F?.value)},id:F.value,children:l?l(F):ke("span",{children:F.label})},`${F.value}-${z}`))})]})})]})})]})};import{X as Ds}from"lucide-react";import*as j from"react";import{v4 as bn}from"uuid";import{AnimatePresence as Ns,motion as Ps}from"framer-motion";import*as yn from"react";import{jsx as tt,jsxs as Zr}from"react/jsx-runtime";var Ut=({size:e="md",semi:t=!1,className:r,id:o,label:a,labelClassName:n,labelWrapperClassName:i,disabled:l,subtitle:f,subtitleClassName:c,bodyClassName:m,checked:d,defaultChecked:u,onCheckedChange:g,name:C,value:v,onClick:h})=>{let p=yn.useId(),x=o??p,P=l?"#B0B0B0":"#00D488";return Zr("div",{className:s("flex justify-start items-start gap-1",m),children:[Zr("div",{className:"relative flex items-center justify-center",children:[tt("input",{type:"checkbox",id:x,name:C,value:v,checked:d,defaultChecked:u,disabled:l,onClick:h,onChange:b=>g?.(b.target.checked),className:s("appearance-none shrink-0 rounded-[3px] border border-solid border-base-500","bg-base-100 dark:bg-transparent cursor-pointer transition","hover:bg-status-success-bg hover:border-status-success-fill","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-success-fill focus-visible:ring-offset-2","checked:bg-status-success-bg checked:border-status-success-fill","disabled:cursor-not-allowed disabled:opacity-50",e==="md"?"h-5 w-5":"h-6 w-6",r)}),tt(Ns,{children:d&&tt(Ps.svg,{className:"absolute pointer-events-none",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.1},...t?{width:12,height:2,viewBox:"0 0 12 2"}:{width:10,height:8,viewBox:"0 0 10 8"},fill:"none",children:t?tt("path",{d:"M1.9165 1H10.0832",stroke:P,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}):tt("path",{d:"M1 3.99996L3.66353 6.66349L9 1.33643",stroke:P,strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})},t?"semi":"check")})]}),(a||f)&&Zr("div",{className:s("flex flex-col justify-start items-start",i),children:[tt("label",{htmlFor:x,children:tt("span",{className:s("text-sm font-normal cursor-pointer transition-colors text-base-700 dark:text-white",l&&"cursor-not-allowed opacity-50",n),onClick:()=>!l&&g?.(!d),children:a})}),f&&tt("p",{className:s("text-sm text-base-500",l&&"opacity-50",c),children:f})]})]})};Ut.displayName="Checkbox";import{jsx as V,jsxs as Ae}from"react/jsx-runtime";var wn=j.memo(({item:e,onDelete:t})=>Ae("p",{className:"text-xs p-1.5 py-1 bg-gray-100 rounded-md flex items-center",children:[V("span",{children:e.label}),V("button",{type:"button",className:"pl-2",onClick:r=>{r.stopPropagation(),t(e)},children:V(Ds,{size:12})})]}));wn.displayName="SelectedChip";var Kr=j.memo(({disabled:e,className:t,values:r,placeholder:o="",status:a,onDelete:n})=>V(ee,{asChild:!0,disabled:e,children:Ae("div",{className:s(ne({status:a}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-12 flex items-center justify-between w-full gap-2",t),children:[V("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:r.length?r.map(i=>V(wn,{item:i,onDelete:n},i.value)):V("span",{className:"text-[#79818C] dark:text-[#959BA4]",children:o})}),V("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:V("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"})})]})}));Kr.displayName="MultiSelectTrigger";var Cn=j.memo(({option:e,isChecked:t,onSelect:r,optionComponent:o})=>V("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center focus:dark:!text-[#DDDFE0] py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1 focus-visible:ring-offset-status-success-fill",onClick:()=>r(e),children:V("div",{className:"w-full h-[30px] flex flex-row items-center dark:!text-white",children:V(Ut,{onCheckedChange:()=>r(e),value:e.value,label:o?o(e):V("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",labelClassName:s(o&&"w-full"),checked:t})})}));Cn.displayName="OptionItem";var jr=({options:e,children:t,onChange:r,optionComponent:o,values:a,hideSearch:n,shouldFilter:i=!0,onInputValueChange:l,modal:f,placeholder:c,isLoading:m,showSelectedValues:d=!1,error:u,label:g,showAsterisk:C})=>{let[v,h]=j.useState(""),p=a,x=j.useMemo(()=>new Set(p.map(T=>T.value)),[p]),P=j.useMemo(()=>{if(!i||!v)return e;let T=v.trim().toLowerCase();return e.filter(N=>N.label?.trim()?.toLowerCase()?.includes(T))},[e,v,i]),b=j.useCallback(T=>{let N=x.has(T.value);r(N?p.filter(w=>w.value!==T.value):[...p,T])},[p,x,r]),k=j.useRef(null),[E,y]=j.useState(void 0);j.useLayoutEffect(()=>{if(!k.current)return;let T=k.current,N=()=>{y(T.getBoundingClientRect().width)};N();let w=new ResizeObserver(()=>{N()});return w.observe(T),()=>w.disconnect()},[]);let S=j.useCallback(T=>{let N=p.filter(w=>w.value!==T.value);r(N)},[p,r]),D=j.useCallback(()=>{p.length===e.length?r([]):r(e)},[p.length,e,r]),M=j.useCallback(T=>{h(T.target.value),l?.(T.target.value)},[l]);return Ae("div",{className:"relative space-y-1",children:[V(Z,{showAsterisk:C,error:u,children:g}),Ae(ge,{modal:f,children:[V("div",{ref:k,children:t??V(Kr,{values:p,placeholder:c??"Select",onDelete:S,className:"h-auto"})}),d&&V("div",{className:"flex py-2 gap-2 flex-wrap",children:p.map(T=>V("div",{className:"bg-gray-100 border text-black rounded-xl text-[10px] font-medium px-2 py-1",children:V("span",{children:T.label})},bn()))}),Ae(de,{portal:!f,align:"start",className:"min-w-[200px] p-0",style:{width:E?`${E}px`:void 0},onInteractOutside:T=>{T.target?.closest("[data-radix-popper-content-wrapper]")&&T.preventDefault()},onOpenAutoFocus:T=>T.preventDefault(),children:[!n&&V("div",{className:"w-full px-4",children:Ae("div",{className:"w-full h-[36px] px-1 flex items-center justify-start border-[0.5px] rounded-md border-[#D7D7D7] mb-[5px]",children:[m?V(Ee,{}):Ae("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V("path",{d:"M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),V("path",{d:"M22 22L20 20",stroke:"#959595",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),V("input",{value:v,placeholder:"Search",type:"text",disabled:m,className:"oultine-0 focus-visible:outline-0 focus-visible:ring-0 ml-1 w-full !border-transparent placeholder:text-sm placeholder:font-normal dark:bg-transparent placeholder:text-[#959595] dark:placeholder:text-[#DDDFE0] focus:ring-0 focus:ring-offset-0 focus:bg-white dark:focus:bg-transparent dark:text-[#DDDFE0]",onChange:M})]})}),Ae("div",{className:s("w-full h-[44px] px-2.5 flex items-center justify-between mb-[5px] border-[#D7D7D7] dark:border-[#5C636B]",n?"border-b-[0.5px]":"border-y-[0.5px]"),children:[V("button",{className:"text-sm text-primary-main font-normal",onClick:D,disabled:P.length<1||m,children:Ae("span",{children:[p.length===e.length?"Unselect":"Select"," all"]})}),Ae("p",{className:"text-sm text-[#959595] font-normal dark:text-[#DDDFE0]",children:[p.length," selected"]})]}),Ae(Le,{viewPortClassName:"max-h-[225px]",className:"pb-1",children:[m&&V("div",{className:"py-7 flex justify-center",children:V(Ee,{})}),!m&&P.map(T=>V(Cn,{option:T,isChecked:x.has(T.value),onSelect:b,optionComponent:o},bn()))]})]})]})]})};var Ss=[{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"}],xn=e=>{if(!e)return Ss?.map(r=>({value:r?.internetCountryCode,label:r?.countryName,...r}));if(!e?.length)return[];let t=new Set;return e.reduce((r,o)=>(t.has(o.value)||(t.add(o.value),r.push(o)),r),[])};import*as jt from"react";import*as gr from"react-phone-number-input";import Ts from"react-phone-number-input/flags";import{jsx as Zt,jsxs as ks}from"react/jsx-runtime";var Ls=e=>ks("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[Zt("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Zt("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"}),Zt("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Zt("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Zt("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Rn=Ls;import{jsx as _,jsxs as Kt}from"react/jsx-runtime";var Nn=jt.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",disableCountrySelect:o=!1,modal:a,showAsterisk:n,label:i,description:l,error:f,countryOptions:c,...m},d)=>{let u=g=>_(Fs,{...g,status:m.status,modal:a,options:c||g?.options});return Kt("div",{className:"relative space-y-1",children:[_(Z,{showAsterisk:n,error:f,children:i}),_(gr.default,{ref:d,className:s("flex sentry-mask",e),flagComponent:We,countrySelectComponent:g=>_(u,{...g,disabled:g?.disabled||o}),inputComponent:Pn,defaultCountry:r,onChange:g=>{t&&t?.(g)},...m}),_(Ne,{className:"text-gray-400 text-sm !font-normal",children:l}),_(me,{error:f})]})});Nn.displayName="PhoneInput";var Pn=jt.forwardRef(({className:e,...t},r)=>_(ae,{className:s("!rounded-s-none h-10",e),...t,ref:r}));Pn.displayName="InputComponent";var Fs=({disabled:e,value:t,onChange:r,options:o,status:a,modal:n})=>{let i=jt.useCallback(l=>{r(l)},[r]);return Kt(ge,{modal:n,children:[_(ee,{disabled:e,children:Kt("div",{className:s(ne({status:a}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[_(We,{country:t,countryName:t}),_("svg",{className:s("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:_("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"})})]})}),_(de,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:_(Vt,{children:_($t,{children:Kt(Le,{className:"h-72",children:[_(Ht,{placeholder:"Search country..."}),_(_t,{children:"No country found."}),_(zt,{children:o.filter(l=>l.value).map(l=>Kt(Wt,{className:"gap-2",onSelect:()=>i(l.value),children:[_(We,{country:l.value,countryName:l.label}),_("span",{className:"flex-1 text-sm",children:l.label}),l.value&&_("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${gr.getCountryCallingCode(l.value)}`}),_("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s("ml-auto",l.value===t?"opacity-100":"opacity-0"),children:_("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l.value}-${l.label}`))})]})})})})]})},We=({country:e,countryName:t,className:r})=>{let o=Ts[e];return e==="GLOBAL"?_("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:_(Rn,{className:"w-full h-[90%]"})}):_("span",{className:s("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&_(o,{title:t})})};We.displayName="FlagComponent";import{jsx as B,jsxs as rt}from"react/jsx-runtime";var As=({className:e,value:t,placeholder:r="",status:o,disabled:a})=>B(ee,{asChild:!0,disabled:a,id:"country-dropdown",children:rt("button",{disabled:a,className:s(ne({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?rt("div",{className:"flex gap-2 items-center",children:[B(We,{country:t?.value,countryName:t?.value,className:"ml-1 !w-6 h-5"}),B("span",{className:"",children:t?.label}),"-",B("span",{className:"",children:t?.value})]}):B("span",{children:r??"Select options..."}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:B("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"})})]})}),Ln=Sn.memo(({item:e,onDelete:t})=>rt("p",{className:"text-xs pl-1.5 pr-1 py-1 bg-gray-100 rounded-md flex items-center gap-1",children:[B(We,{country:e?.internetCountryCode||e?.value,countryName:e?.value,className:"!w-5 h-4"}),B("span",{children:e.label}),B("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t(e)},children:B(Es,{size:12})})]}));Ln.displayName="CountryChip";var Ms=({className:e,values:t,placeholder:r="",status:o,disabled:a,onDelete:n})=>B(ee,{asChild:!0,disabled:a,id:"country-dropdown",children:rt("div",{className:s(ne({status:o}),"cursor-pointer h-auto min-h-12 flex items-center justify-between w-full gap-2",e),children:[B("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:t.length?t.map(i=>B(Ln,{item:i,onDelete:n},i.value)):B("span",{className:"text-[#79818C]",children:r})}),B("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:B("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"})})]})}),Dn=e=>rt("div",{className:"w-full flex items-center gap-2",children:[B(We,{country:e?.internetCountryCode||e?.value,countryName:e?.label,className:"ml-2 !w-6 !h-5"}),rt("div",{className:"flex-1 flex items-center gap-2",children:[B("span",{className:"flex text-sm",children:e?.label}),"-",B("span",{className:"text-sm",children:e?.internetCountryCode})]})]}),Is=e=>{let{hideSearch:t=!0,showAsterisk:r,label:o,description:a,error:n,countryOptions:i=void 0}=e,l=xn(i);if(e.multiSelect){let{value:u,onChange:g,placeholder:C,status:v,disabled:h,loading:p,modal:x,className:P,optionComponent:b}=e,k=u??[];return rt("div",{className:"relative space-y-1",children:[B(Z,{showAsterisk:r,error:n,children:o}),B(jr,{options:l,values:k,onChange:y=>g(y),hideSearch:t,modal:x,isLoading:p,placeholder:C??"Select Country",optionComponent:b??Dn,children:B(Ms,{values:k,status:v,disabled:h,className:P,placeholder:C??"Select Country",onDelete:y=>{g(k.filter(S=>S.value!==y.value))}})}),B(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),B(me,{error:n})]})}let{value:f,onChange:c,...m}=e,d=l?.find(u=>(u?.value||u?.internetCountryCode)===f?.value);return rt("div",{className:"relative space-y-1",children:[B(Z,{showAsterisk:r,error:n,children:o}),B(fr,{options:l,hideSearch:t,optionComponent:Dn,value:f,onChange:c,...m,children:B(As,{value:d,status:m?.status,placeholder:m?.placeholder??" Select Country"})}),B(Ne,{className:"text-gray-400 text-sm !font-normal",children:a}),B(me,{error:n})]})};import{jsx as Xt,jsxs as Bs}from"react/jsx-runtime";var ot=({showAsterisk:e,label:t,description:r,error:o,hideSearch:a=!1,status:n,...i})=>Bs("div",{className:"relative space-y-1",children:[Xt(Z,{showAsterisk:e,error:o,children:t}),Xt(fr,{hideSearch:a,...i,containerClassName:"h-full",children:Xt(vn,{disabled:i?.disabled,placeholder:i?.placeholder??"Select",status:n,value:i?.value?.label??i?.value?.value,className:i?.className,id:i?.id})}),Xt(Ne,{className:"text-gray-400 text-sm !font-normal",children:r}),Xt(me,{error:o})]});import{cva as Os}from"class-variance-authority";import{useMemo as Vs}from"react";import Hs from"react-otp-input";import{jsx as kn}from"react/jsx-runtime";var $s=Os("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 flex-shrink-0",{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"}}),_s=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:o="-",status:a,inputMode:n="numeric",inputType:i="number",...l})=>{let f=Vs(()=>o||new Array(e).fill("").reduce((d,u)=>d+=u,""),[e,o]);return kn(Hs,{numInputs:e,placeholder:f,containerStyle:s("w-fit sentry-mask flex justify-between",r),inputStyle:s($s({status:a}),t,"sentry-mask"),renderInput:c=>kn("input",{...c,inputMode:n,type:i}),inputType:i,...l})};import*as Oe from"@radix-ui/react-accordion";import{ChevronDown as zs}from"lucide-react";import{jsx as Yt,jsxs as Tn}from"react/jsx-runtime";function Ws({items:e,type:t="single",defaultValue:r,onChange:o,className:a}){return Yt(Oe.Root,{...t==="single"?{type:"single",collapsible:!0,defaultValue:r,onValueChange:o}:{type:"multiple",defaultValue:r,onValueChange:o},className:s("w-full flex flex-col gap-2.5",a),children:e.map(i=>Tn(Oe.Item,{value:i.key,className:"border border-gray-300 rounded-md overflow-hidden",children:[Yt(Oe.Header,{className:"flex",children:Tn(Oe.Trigger,{className:"group flex flex-1 items-center justify-between px-4 py-3 text-sm font-medium text-gray-800 hover:bg-gray-200/50 transition-all data-[state=open]:bg-gray-200/50",children:[i.title,Yt(zs,{className:"h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),Yt(Oe.Content,{className:"overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",children:Yt("div",{className:"px-4 py-3 border-t border-gray-300",children:i.content})})]},i.key))})}import{useState as Gs,useEffect as Us}from"react";import{jsx as X,jsxs as dt}from"react/jsx-runtime";var Zs=({type:e})=>e==="gray"?X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{stroke:"#70B6F6",fill:"#70B6F6",strokeWidth:"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"?X("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"})}):X("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:X("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"})}),Ks=({type:e="info",title:t,description:r,open:o,showCloseButton:a,bottomNode:n,sideNode:i,onClose:l,showIcon:f=!0})=>{let[c,m]=Gs(o);Us(()=>{m(o)},[o]);let d="",u="";switch(e){case"gray":d="#eeeef0",u="#79818c";break;case"info":d="#ebf5fd",u="#70B6F6";break;case"warning":d="#fff8df",u="#ffc700";break;case"success":d="#e0f9f0",u="#49e0aa";break;case"danger":d="#fde8e9",u="#f3777c";break;default:d="#eeeef0",u="#79818c";break}function g(){m(!1),l&&l()}return c?dt("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:d||"#ebf5fd"},children:[X("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:u||"#70B6F6"}}),dt("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[dt("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[f&&X("div",{className:"h-full flex justify-end",children:X(Zs,{type:e})}),dt("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[dt("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(t||r)&&dt("div",{children:[t&&X("div",{className:"text-sm font-bold text-[#191919]",children:t}),r&&X("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),n]}),i]})]}),a&&X("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:X("button",{onClick:g,children:dt("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[X("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),X("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};import{useState as Xs}from"react";import{Copy as Ys,CheckIcon as qs}from"lucide-react";import{motion as Qs,AnimatePresence as Js}from"framer-motion";import{jsx as js}from"react/jsx-runtime";var wt=({children:e,mode:t="truncate",className:r,as:o="div",...a})=>js(o,{className:s({"text-ellipsis overflow-hidden whitespace-nowrap":t==="truncate","whitespace-normal break-words":t==="wrap","":t==="overflow"},r),target:a?.href?"_blank":void 0,...a,children:e});import{jsx as Ct,jsxs as tl}from"react/jsx-runtime";var el=({text:e,textToCopy:t,onCopy:r,iconsPosition:o="right",clampText:a=!0,clampMode:n="truncate",isLink:i=!1,textClassName:l})=>{let[f,c]=Xs(!1),m=()=>{navigator.clipboard.writeText(t??e).then(()=>{c(!0),r?.(),setTimeout(()=>c(!1),2e3)})},d=f?qs:Ys;return tl("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[o==="left"&&Ct(Fn,{Icon:d,onClick:m,copied:f}),Ct(wt,{as:i?"a":"span",mode:a?n:"overflow",className:s({underline:i},l),href:i?e:void 0,children:e}),o==="right"&&Ct(Fn,{Icon:d,onClick:m,copied:f})]})},Fn=({Icon:e,onClick:t,copied:r})=>Ct(Js,{mode:"wait",children:Ct(Qs.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:Ct(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as En,useState as rl}from"react";import{Search as ol}from"lucide-react";import{jsx as An}from"react/jsx-runtime";var Xr=({value:e,onChange:t,debounce:r=500,addon:o,...a})=>{let[n,i]=rl(e??""),l=f=>i(f.target.value);return En(()=>{e&&i(e)},[e]),En(()=>{let f=setTimeout(()=>{t(n)},r);return()=>clearTimeout(f)},[n,r,t]),An(ae,{leftNode:o??An(ol,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:s("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",a?.className),onChange:l,value:n})};import{useEffect as Mn}from"react";import{X as nl}from"lucide-react";import{jsx as Ve,jsxs as xt}from"react/jsx-runtime";var al=e=>{let{environment:t,branch:r,version:o,deployTime:a,showBanner:n,onClose:i,initDefault:l,removeFromStorage:f,syncLocalStorageToState:c}=e,m=t||process.env.NEXT_PUBLIC_NODE_ENV;return m!=="staging"&&m!=="sandbox"||(Mn(()=>{c()},[c]),Mn(()=>{let d;return(m==="staging"||m==="sandbox")&&(d=setInterval(()=>{f(),l()},300*1e3)),()=>{d&&clearInterval(d)}},[n,t,i,f,l,m]),!n)?null:xt("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[Ve("button",{onClick:i,className:"absolute top-2 right-2",children:Ve(nl,{})}),xt("div",{className:"space-y-2 text-sm",children:[xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Environment:"}),Ve("span",{className:"text-blue-600 capitalize",children:m})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Branch:"}),Ve("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Version:"}),Ve("span",{className:"text-purple-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),xt("div",{className:"flex gap-2",children:[Ve("span",{className:"font-medium",children:"Deploy Time:"}),Ve("span",{className:"text-orange-600",children:a||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};import{cva as Hl}from"class-variance-authority";import*as Jt from"react";import*as se from"@radix-ui/react-dialog";import*as Hn from"react";import R,{useLayoutEffect as sl,useEffect as ll,useMemo as cl}from"react";function il(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var $n=R.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Rt=()=>{let e=R.useContext($n);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};il(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
2
2
|
[data-state=closed]
|
|
3
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function ll(){let e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function cl(){return ro(/^Mac/)}function dl(){return ro(/^iPhone/)}function In(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ul(){return ro(/^iPad/)||cl()&&navigator.maxTouchPoints>1}function _n(){return dl()||ul()}function ro(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}var pl=24,ml=typeof window<"u"?al:il;function Bn(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var Yr=typeof document<"u"&&window.visualViewport;function On(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zn(e){for(On(e)&&(e=e.parentElement);e&&!On(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var fl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),hr=0,qr;function gl(e={}){let{isDisabled:t}=e;ml(()=>{if(!t)return hr++,hr===1&&_n()&&(qr=hl()),()=>{hr--,hr===0&&qr?.()}},[t])}function hl(){let e,t=0,r=u=>{e=zn(u.target),!(e===document.documentElement&&e===document.body)&&(t=u.changedTouches[0].pageY)},o=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}let d=u.changedTouches[0].pageY,g=e.scrollTop,C=e.scrollHeight-e.clientHeight;C!==0&&((g<=0&&d>t||g>=C&&d<t)&&u.preventDefault(),t=d)},a=u=>{let d=u.target;eo(d)&&d!==document.activeElement&&(u.preventDefault(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""}))},n=u=>{let d=u.target;eo(d)&&(d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",Yr&&(Yr.height<window.innerHeight?requestAnimationFrame(()=>{Vn(d)}):Yr.addEventListener("resize",()=>Vn(d),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},l=window.pageXOffset,f=window.pageYOffset,c=Bn(vl(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Bn(qt(document,"touchstart",r,{passive:!1,capture:!0}),qt(document,"touchmove",o,{passive:!1,capture:!0}),qt(document,"touchend",a,{passive:!1,capture:!0}),qt(document,"focus",n,!0),qt(window,"scroll",i));return()=>{c(),m(),window.scrollTo(l,f)}}function vl(e,t,r){let o=e.style[t];return e.style[t]=r,()=>{e.style[t]=o}}function qt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Vn(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=zn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let o=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom,i=r.getBoundingClientRect().bottom+pl;n>i&&(r.scrollTop+=a-o)}e=r.parentElement}}function eo(e){return e instanceof HTMLInputElement&&!fl.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function bl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yl(...e){return t=>e.forEach(r=>bl(r,t))}function Wn(...e){return Hn.useCallback(yl(...e),e)}var Gn=new WeakMap;function Y(e,t,r=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([a,n])=>{if(a.startsWith("--")){e.style.setProperty(a,n);return}o[a]=e.style[a],e.style[a]=n}),!r&&Gn.set(e,o)}function wl(e,t){if(!e||!(e instanceof HTMLElement))return;let r=Gn.get(e);r&&(e.style[t]=r[t])}var K=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vr(e,t){if(!e)return null;let r=window.getComputedStyle(e),o=r.transform||r.webkitTransform||r.mozTransform,a=o.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[K(t)?13:12]):(a=o.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[K(t)?5:4]):null)}function Cl(e){return 8*(Math.log(e+1)-2)}function Jr(e,t){if(!e)return()=>{};let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function xl(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var W={DURATION:.5,EASE:[.32,.72,0,1]},Un=.4,Rl=.25,Nl=100,Zn=8,ut=16,to=26,Qr="vaul-dragging";function Kn(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function Pl({defaultProp:e,onChange:t}){let r=R.useState(e),[o]=r,a=R.useRef(o),n=Kn(t);return R.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}function jn({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,a]=Pl({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,l=Kn(r),f=R.useCallback(c=>{if(n){let u=typeof c=="function"?c(e):c;u!==e&&l(u)}else a(c)},[n,e,a,l]);return[i,f]}function Dl({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:n,onSnapPointChange:i,direction:l="bottom",container:f,snapToSequentialPoint:c}){let[m,u]=jn({prop:e,defaultProp:r?.[0],onChange:t}),[d,g]=R.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);R.useEffect(()=>{function b(){g({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);let C=R.useMemo(()=>m===r?.[r.length-1]||null,[r,m]),v=R.useMemo(()=>{var b;return(b=r?.findIndex(S=>S===m))!=null?b:null},[r,m]),h=r&&r.length>0&&(n||n===0)&&!Number.isNaN(n)&&r[n]===m||!r,p=R.useMemo(()=>{let b=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var S;return(S=r?.map(D=>{let M=typeof D=="string",T=0;if(M&&(T=parseInt(D,10)),K(l)){let w=M?T:d?D*b.height:0;return d?l==="bottom"?b.height-w:-b.height+w:w}let N=M?T:d?D*b.width:0;return d?l==="right"?b.width-N:-b.width+N:N}))!=null?S:[]},[r,d,f]),x=R.useMemo(()=>v!==null?p?.[v]:null,[p,v]),P=R.useCallback(b=>{var S;let D=(S=p?.findIndex(M=>M===b))!=null?S:null;i(D),Y(o.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(l)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`}),p&&D!==p.length-1&&n!==void 0&&D!==n&&D<n?Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"0"}):Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"1"}),u(r?.[Math.max(D,0)])},[o.current,r,p,n,a,u]);R.useEffect(()=>{if(m||e){var b;let S=(b=r?.findIndex(D=>D===e||D===m))!=null?b:-1;p&&S!==-1&&typeof p[S]=="number"&&P(p[S])}},[m,e,r,p,P]);function y({draggedDistance:b,closeDrawer:S,velocity:D,dismissible:M}){if(n===void 0)return;let T=l==="bottom"||l==="right"?(x??0)-b:(x??0)+b,N=v===n-1,w=v===0,E=b>0;if(N&&Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`}),!c&&D>2&&!E){M?S():P(p[0]);return}if(!c&&D>2&&E&&p&&r){P(p[r.length-1]);return}let z=p?.reduce((re,_e)=>typeof re!="number"||typeof _e!="number"?re:Math.abs(_e-T)<Math.abs(re-T)?_e:re),Q=K(l)?window.innerHeight:window.innerWidth;if(D>Un&&Math.abs(b)<Q*.4){let re=E?1:-1;if(re>0&&C&&r){P(p[r.length-1]);return}if(w&&re<0&&M&&S(),v===null)return;P(p[v+re]);return}P(z)}function k({draggedDistance:b}){if(x===null)return;let S=l==="bottom"||l==="right"?x-b:x+b;(l==="bottom"||l==="right")&&S<p[p.length-1]||(l==="top"||l==="left")&&S>p[p.length-1]||Y(o.current,{transform:K(l)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`})}function F(b,S){if(!r||typeof v!="number"||!p||n===void 0)return null;let D=v===n-1;if(v>=n&&S)return 0;if(D&&!S)return 1;if(!h&&!D)return null;let T=D?v+1:v-1,N=D?p[T]-p[T-1]:p[T+1]-p[T],w=b/Math.abs(N);return D?1-w:w}return{isLastSnapPoint:C,activeSnapPoint:m,shouldFade:h,getPercentageDragged:F,setActiveSnapPoint:u,activeSnapPointIndex:v,onRelease:y,onDrag:k,snapPointsOffset:p}}var Sl=()=>()=>{};function Ll(){let{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:a}=Rt(),n=R.useRef(null),i=sl(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-to)/window.innerWidth}R.useEffect(()=>{if(t&&r){n.current&&clearTimeout(n.current);let f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;xl(o&&!a?Jr(document.body,{background:"black"}):Sl,Jr(f,{transformOrigin:K(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${W.DURATION}s`,transitionTimingFunction:`cubic-bezier(${W.EASE.join(",")})`}));let c=Jr(f,{borderRadius:`${Zn}px`,overflow:"hidden",...K(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),n.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},W.DURATION*1e3)}}},[t,r,i])}var Jt=null;function kl({isOpen:e,modal:t,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:n}){let[i,l]=R.useState(()=>typeof window<"u"?window.location.href:""),f=R.useRef(0),c=R.useCallback(()=>{if(In()&&Jt===null&&e&&!n){Jt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:u,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-u}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let g=d-window.innerHeight;g&&f.current>=d&&(document.body.style.top=`${-(f.current+g)}px`)}),300)}},[e]),m=R.useCallback(()=>{if(In()&&Jt!==null&&!n){let u=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Jt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){l(window.location.href);return}window.scrollTo(d,u)}),Jt=null}},[i]);return R.useEffect(()=>{function u(){f.current=window.scrollY}return u(),window.addEventListener("scroll",u),()=>{window.removeEventListener("scroll",u)}},[]),R.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),R.useEffect(()=>{r||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&c(),t||window.setTimeout(()=>{m()},500)):m())},[e,o,i,t,r,c,m]),{restorePositionSetting:m}}function Xn({open:e,onOpenChange:t,children:r,onDrag:o,onRelease:a,snapPoints:n,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:f=Rl,scrollLockTimeout:c=Nl,dismissible:m=!0,handleOnly:u=!1,fadeFromIndex:d=n&&n.length-1,activeSnapPoint:g,setActiveSnapPoint:C,fixed:v,modal:h=!0,onClose:p,nested:x,noBodyStyles:P=!1,direction:y="bottom",defaultOpen:k=!1,disablePreventScroll:F=!0,snapToSequentialPoint:b=!1,preventScrollRestoration:S=!1,repositionInputs:D=!0,onAnimationEnd:M,container:T,autoFocus:N=!1}){var w,E;let[z=!1,Q]=jn({defaultProp:k,prop:e,onChange:L=>{t?.(L),!L&&!x&&ki(),setTimeout(()=>{M?.(L)},W.DURATION*1e3),L&&!h&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),L||(document.body.style.pointerEvents="auto")}}),[re,_e]=R.useState(!1),[Ye,Ft]=R.useState(!1),[Ri,No]=R.useState(!1),ft=R.useRef(null),ar=R.useRef(null),Tr=R.useRef(null),Er=R.useRef(null),At=R.useRef(null),Mt=R.useRef(!1),Fr=R.useRef(null),Ar=R.useRef(0),gt=R.useRef(!1),Po=R.useRef(!k),Do=R.useRef(0),A=R.useRef(null),So=R.useRef(((w=A.current)==null?void 0:w.getBoundingClientRect().height)||0),Lo=R.useRef(((E=A.current)==null?void 0:E.getBoundingClientRect().width)||0),Mr=R.useRef(0),Ni=R.useCallback(L=>{n&&L===It.length-1&&(ar.current=new Date)},[]),{activeSnapPoint:Pi,activeSnapPointIndex:ht,setActiveSnapPoint:ko,onRelease:Di,snapPointsOffset:It,onDrag:Si,shouldFade:To,getPercentageDragged:Li}=Dl({snapPoints:n,activeSnapPointProp:g,setActiveSnapPointProp:C,drawerRef:A,fadeFromIndex:d,overlayRef:ft,onSnapPointChange:Ni,direction:y,container:T,snapToSequentialPoint:b});gl({isDisabled:!z||Ye||!h||Ri||!re||!D||!F});let{restorePositionSetting:ki}=kl({isOpen:z,modal:h,nested:x??!1,hasBeenOpened:re,preventScrollRestoration:S,noBodyStyles:P});function ir(){return(window.innerWidth-to)/window.innerWidth}function Ti(L){var O,$;!m&&!n||A.current&&!A.current.contains(L.target)||(So.current=((O=A.current)==null?void 0:O.getBoundingClientRect().height)||0,Lo.current=(($=A.current)==null?void 0:$.getBoundingClientRect().width)||0,Ft(!0),Tr.current=new Date,_n()&&window.addEventListener("touchend",()=>Mt.current=!1,{once:!0}),L.target.setPointerCapture(L.pointerId),Ar.current=K(y)?L.pageY:L.pageX)}function Eo(L,O){var $;let I=L,U=($=window.getSelection())==null?void 0:$.toString(),pe=A.current?vr(A.current,y):null,le=new Date;if(I.tagName==="SELECT"||I.hasAttribute("data-vaul-no-drag")||I.closest("[data-vaul-no-drag]"))return!1;if(y==="right"||y==="left")return!0;if(ar.current&&le.getTime()-ar.current.getTime()<500)return!1;if(pe!==null&&(y==="bottom"?pe>0:pe<0))return!0;if(U&&U.length>0)return!1;if(At.current&&le.getTime()-At.current.getTime()<c&&pe===0||O)return At.current=le,!1;for(;I;){if(I.scrollHeight>I.clientHeight){if(I.scrollTop!==0)return At.current=new Date,!1;if(I.getAttribute("role")==="dialog")return!0}I=I.parentNode}return!0}function Ei(L){if(A.current&&Ye){let O=y==="bottom"||y==="right"?1:-1,$=(Ar.current-(K(y)?L.pageY:L.pageX))*O,I=$>0,U=n&&!m&&!I;if(U&&ht===0)return;let pe=Math.abs($),le=document.querySelector("[data-vaul-drawer-wrapper]"),qe=y==="bottom"||y==="top"?So.current:Lo.current,Ee=pe/qe,st=Li(pe,I);if(st!==null&&(Ee=st),U&&Ee>=1||!Mt.current&&!Eo(L.target,I))return;if(A.current.classList.add(Qr),Mt.current=!0,Y(A.current,{transition:"none"}),Y(ft.current,{transition:"none"}),n&&Si({draggedDistance:$}),I&&!n){let Me=Cl($),sr=Math.min(Me*-1,0)*O;Y(A.current,{transform:K(y)?`translate3d(0, ${sr}px, 0)`:`translate3d(${sr}px, 0, 0)`});return}let Je=1-Ee;if((To||d&&ht===d-1)&&(o?.(L,Ee),Y(ft.current,{opacity:`${Je}`,transition:"none"},!0)),le&&ft.current&&i){let Me=Math.min(ir()+Ee*(1-ir()),1),sr=8-Ee*8,Ao=Math.max(0,14-Ee*14);Y(le,{borderRadius:`${sr}px`,transform:K(y)?`scale(${Me}) translate3d(0, ${Ao}px, 0)`:`scale(${Me}) translate3d(${Ao}px, 0, 0)`,transition:"none"},!0)}if(!n){let Me=pe*O;Y(A.current,{transform:K(y)?`translate3d(0, ${Me}px, 0)`:`translate3d(${Me}px, 0, 0)`})}}}R.useEffect(()=>{window.requestAnimationFrame(()=>{Po.current=!0})},[]),R.useEffect(()=>{var L;function O(){if(!A.current||!D)return;let $=document.activeElement;if(eo($)||gt.current){var I;let U=((I=window.visualViewport)==null?void 0:I.height)||0,pe=window.innerHeight,le=pe-U,qe=A.current.getBoundingClientRect().height||0,Ee=qe>pe*.8;Mr.current||(Mr.current=qe);let st=A.current.getBoundingClientRect().top;if(Math.abs(Do.current-le)>60&&(gt.current=!gt.current),n&&n.length>0&&It&&ht){let Je=It[ht]||0;le+=Je}if(Do.current=le,qe>U||gt.current){let Je=A.current.getBoundingClientRect().height,Me=Je;Je>U&&(Me=U-(Ee?st:to)),v?A.current.style.height=`${Je-Math.max(le,0)}px`:A.current.style.height=`${Math.max(Me,U-st)}px`}else ll()||(A.current.style.height=`${Mr.current}px`);n&&n.length>0&&!gt.current?A.current.style.bottom="0px":A.current.style.bottom=`${Math.max(le,0)}px`}}return(L=window.visualViewport)==null||L.addEventListener("resize",O),()=>{var $;return($=window.visualViewport)==null?void 0:$.removeEventListener("resize",O)}},[ht,n,It]);function Bt(L){Fi(),p?.(),L||Q(!1),setTimeout(()=>{n&&ko(n[0])},W.DURATION*1e3)}function Fo(){if(!A.current)return;let L=document.querySelector("[data-vaul-drawer-wrapper]"),O=vr(A.current,y);Y(A.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`}),Y(ft.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"1"}),i&&O&&O>0&&z&&Y(L,{borderRadius:`${Zn}px`,overflow:"hidden",...K(y)?{transform:`scale(${ir()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ir()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${W.DURATION}s`,transitionTimingFunction:`cubic-bezier(${W.EASE.join(",")})`},!0)}function Fi(){!Ye||!A.current||(A.current.classList.remove(Qr),Mt.current=!1,Ft(!1),Er.current=new Date)}function Ai(L){if(!Ye||!A.current)return;A.current.classList.remove(Qr),Mt.current=!1,Ft(!1),Er.current=new Date;let O=vr(A.current,y);if(!L||!Eo(L.target,!1)||!O||Number.isNaN(O)||Tr.current===null)return;let $=Er.current.getTime()-Tr.current.getTime(),I=Ar.current-(K(y)?L.pageY:L.pageX),U=Math.abs(I)/$;if(U>.05&&(No(!0),setTimeout(()=>{No(!1)},200)),n){Di({draggedDistance:I*(y==="bottom"||y==="right"?1:-1),closeDrawer:Bt,velocity:U,dismissible:m}),a?.(L,!0);return}if(y==="bottom"||y==="right"?I>0:I<0){Fo(),a?.(L,!0);return}if(U>Un){Bt(),a?.(L,!1);return}var pe;let le=Math.min((pe=A.current.getBoundingClientRect().height)!=null?pe:0,window.innerHeight);var qe;let Ee=Math.min((qe=A.current.getBoundingClientRect().width)!=null?qe:0,window.innerWidth),st=y==="left"||y==="right";if(Math.abs(O)>=(st?Ee:le)*f){Bt(),a?.(L,!1);return}a?.(L,!0),Fo()}R.useEffect(()=>(z&&(Y(document.documentElement,{scrollBehavior:"auto"}),ar.current=new Date),()=>{wl(document.documentElement,"scrollBehavior")}),[z]);function Mi(L){let O=L?(window.innerWidth-ut)/window.innerWidth:1,$=L?-ut:0;Fr.current&&window.clearTimeout(Fr.current),Y(A.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(y)?`scale(${O}) translate3d(0, ${$}px, 0)`:`scale(${O}) translate3d(${$}px, 0, 0)`}),!L&&A.current&&(Fr.current=setTimeout(()=>{let I=vr(A.current,y);Y(A.current,{transition:"none",transform:K(y)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`})},500))}function Ii(L,O){if(O<0)return;let $=(window.innerWidth-ut)/window.innerWidth,I=$+O*(1-$),U=-ut+O*ut;Y(A.current,{transform:K(y)?`scale(${I}) translate3d(0, ${U}px, 0)`:`scale(${I}) translate3d(${U}px, 0, 0)`,transition:"none"})}function Bi(L,O){let $=K(y)?window.innerHeight:window.innerWidth,I=O?($-ut)/$:1,U=O?-ut:0;O&&Y(A.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(y)?`scale(${I}) translate3d(0, ${U}px, 0)`:`scale(${I}) translate3d(${U}px, 0, 0)`})}return R.useEffect(()=>{h||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[h]),R.createElement(se.Root,{modal:h,defaultOpen:k,onOpenChange:L=>{!m&&!L||(L?_e(!0):Bt(!0),Q(L))},open:z},R.createElement($n.Provider,{value:{activeSnapPoint:Pi,snapPoints:n,setActiveSnapPoint:ko,drawerRef:A,overlayRef:ft,onOpenChange:t,onPress:Ti,onRelease:Ai,onDrag:Ei,dismissible:m,shouldAnimate:Po,handleOnly:u,isOpen:z,isDragging:Ye,shouldFade:To,closeDrawer:Bt,onNestedDrag:Ii,onNestedOpenChange:Mi,onNestedRelease:Bi,keyboardIsOpen:gt,modal:h,snapPointsOffset:It,activeSnapPointIndex:ht,direction:y,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:P,container:T,autoFocus:N}},r))}var Yn=R.forwardRef(function({...e},t){let{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:n,isOpen:i,modal:l,shouldAnimate:f}=Rt(),c=Wn(t,r),m=o&&o.length>0;if(!l)return null;let u=R.useCallback(d=>a(d),[a]);return R.createElement(se.Overlay,{onMouseUp:u,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&m?"true":"false","data-vaul-snap-points-overlay":i&&n?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});Yn.displayName="Drawer.Overlay";var qn=R.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...o},a){let{drawerRef:n,onPress:i,onRelease:l,onDrag:f,keyboardIsOpen:c,snapPointsOffset:m,activeSnapPointIndex:u,modal:d,isOpen:g,direction:C,snapPoints:v,container:h,handleOnly:p,shouldAnimate:x,autoFocus:P}=Rt(),[y,k]=R.useState(!1),F=Wn(a,n),b=R.useRef(null),S=R.useRef(null),D=R.useRef(!1),M=v&&v.length>0;Ll();let T=(w,E,z=0)=>{if(D.current)return!0;let Q=Math.abs(w.y),re=Math.abs(w.x),_e=re>Q,Ye=["bottom","right"].includes(E)?1:-1;if(E==="left"||E==="right"){if(!(w.x*Ye<0)&&re>=0&&re<=z)return _e}else if(!(w.y*Ye<0)&&Q>=0&&Q<=z)return!_e;return D.current=!0,!0};R.useEffect(()=>{M&&window.requestAnimationFrame(()=>{k(!0)})},[]);function N(w){b.current=null,D.current=!1,l(w)}return R.createElement(se.Content,{"data-vaul-drawer-direction":C,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":g&&M?"true":"false","data-vaul-custom-container":h?"true":"false","data-vaul-animate":x?.current?"true":"false",...o,ref:F,style:m&&m.length>0?{"--snap-point-height":`${m[u??0]}px`,...t}:t,onPointerDown:w=>{p||(o.onPointerDown==null||o.onPointerDown.call(o,w),b.current={x:w.pageX,y:w.pageY},i(w))},onOpenAutoFocus:w=>{r?.(w),P||w.preventDefault()},onPointerDownOutside:w=>{if(e?.(w),!d||w.defaultPrevented){w.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:w=>{if(!d){w.preventDefault();return}},onPointerMove:w=>{if(S.current=w,p||(o.onPointerMove==null||o.onPointerMove.call(o,w),!b.current))return;let E=w.pageY-b.current.y,z=w.pageX-b.current.x,Q=w.pointerType==="touch"?10:2;T({x:z,y:E},C,Q)?f(w):(Math.abs(z)>Q||Math.abs(E)>Q)&&(b.current=null)},onPointerUp:w=>{o.onPointerUp==null||o.onPointerUp.call(o,w),b.current=null,D.current=!1,l(w)},onPointerOut:w=>{o.onPointerOut==null||o.onPointerOut.call(o,w),N(S.current)},onContextMenu:w=>{o.onContextMenu==null||o.onContextMenu.call(o,w),S.current&&N(S.current)}})});qn.displayName="Drawer.Content";var Tl=250,El=120,Jn=R.forwardRef(function({preventCycle:e=!1,children:t,...r},o){let{closeDrawer:a,isDragging:n,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:f,dismissible:c,handleOnly:m,isOpen:u,onPress:d,onDrag:g}=Rt(),C=R.useRef(null),v=R.useRef(!1);function h(){if(v.current){P();return}window.setTimeout(()=>{p()},El)}function p(){if(n||e||v.current){P();return}if(P(),!i||i.length===0){c||a();return}if(l===i[i.length-1]&&c){a();return}let k=i.findIndex(b=>b===l);if(k===-1)return;let F=i[k+1];f(F)}function x(){C.current=window.setTimeout(()=>{v.current=!0},Tl)}function P(){C.current&&window.clearTimeout(C.current),v.current=!1}return R.createElement("div",{onClick:h,onPointerCancel:P,onPointerDown:y=>{m&&d(y),x()},onPointerMove:y=>{m&&g(y)},ref:o,"data-vaul-drawer-visible":u?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},R.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Jn.displayName="Drawer.Handle";function Fl({onDrag:e,onOpenChange:t,open:r,...o}){let{onNestedDrag:a,onNestedOpenChange:n,onNestedRelease:i}=Rt();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return R.createElement(Xn,{nested:!0,open:r,onClose:()=>{n(!1)},onDrag:(l,f)=>{a(l,f),e?.(l,f)},onOpenChange:l=>{l&&n(l),t?.(l)},onRelease:i,...o})}function Al(e){let t=Rt(),{container:r=t.container,...o}=e;return R.createElement(se.Portal,{container:r,...o})}var he={Root:Xn,NestedRoot:Fl,Content:qn,Overlay:Yn,Trigger:se.Trigger,Portal:Al,Handle:Jn,Close:se.Close,Title:se.Title,Description:se.Description};import{useState as Ml,useEffect as Il}from"react";function Qn(){let[e,t]=Ml({width:100,height:100});return Il(()=>{function r(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)},[]),e}import{jsx as ea,jsxs as Bl}from"react/jsx-runtime";var ta=()=>Bl("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:[ea("path",{d:"M18 6 6 18"}),ea("path",{d:"m6 6 12 12"})]});import{Fragment as la,jsx as te,jsxs as Nt}from"react/jsx-runtime";var oo=({shouldScaleBackground:e=!1,...t})=>te(he.Root,{direction:"right",shouldScaleBackground:e,...t});oo.displayName="Drawer";var Vl=he.Trigger,Hl=he.Close,$l=he.Portal,ra=Qt.forwardRef(({className:e,...t},r)=>te(he.Overlay,{className:s("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:r}));ra.displayName=he.Overlay.displayName;var _l=Ol("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 !select-text",{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",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"},size:{default:"sm:max-w-[512px]",full:"!max-w-full w-full"}},defaultVariants:{side:"right",size:"default"}}),oa=Qt.forwardRef(({side:e="right",size:t="default",hideCloseButton:r,usePortal:o=!0,showOverlay:a=!0,className:n,children:i,id:l,...f},c)=>{let m=Nt(la,{children:[a&&te(ra,{}),Nt(he.Content,{ref:c,className:s(_l({side:e,size:t}),n),...f,children:[te("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"}),t==="full"&&te("style",{children:`
|
|
3
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function dl(){let e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function ul(){return ro(/^Mac/)}function pl(){return ro(/^iPhone/)}function In(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ml(){return ro(/^iPad/)||ul()&&navigator.maxTouchPoints>1}function _n(){return pl()||ml()}function ro(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}var fl=24,gl=typeof window<"u"?sl:ll;function Bn(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var Yr=typeof document<"u"&&window.visualViewport;function On(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zn(e){for(On(e)&&(e=e.parentElement);e&&!On(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var hl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),hr=0,qr;function vl(e={}){let{isDisabled:t}=e;gl(()=>{if(!t)return hr++,hr===1&&_n()&&(qr=yl()),()=>{hr--,hr===0&&qr?.()}},[t])}function yl(){let e,t=0,r=d=>{e=zn(d.target),!(e===document.documentElement&&e===document.body)&&(t=d.changedTouches[0].pageY)},o=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}let u=d.changedTouches[0].pageY,g=e.scrollTop,C=e.scrollHeight-e.clientHeight;C!==0&&((g<=0&&u>t||g>=C&&u<t)&&d.preventDefault(),t=u)},a=d=>{let u=d.target;eo(u)&&u!==document.activeElement&&(d.preventDefault(),u.style.transform="translateY(-2000px)",u.focus(),requestAnimationFrame(()=>{u.style.transform=""}))},n=d=>{let u=d.target;eo(u)&&(u.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{u.style.transform="",Yr&&(Yr.height<window.innerHeight?requestAnimationFrame(()=>{Vn(u)}):Yr.addEventListener("resize",()=>Vn(u),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},l=window.pageXOffset,f=window.pageYOffset,c=Bn(bl(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Bn(qt(document,"touchstart",r,{passive:!1,capture:!0}),qt(document,"touchmove",o,{passive:!1,capture:!0}),qt(document,"touchend",a,{passive:!1,capture:!0}),qt(document,"focus",n,!0),qt(window,"scroll",i));return()=>{c(),m(),window.scrollTo(l,f)}}function bl(e,t,r){let o=e.style[t];return e.style[t]=r,()=>{e.style[t]=o}}function qt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Vn(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let r=zn(e);if(r!==document.documentElement&&r!==document.body&&r!==e){let o=r.getBoundingClientRect().top,a=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom,i=r.getBoundingClientRect().bottom+fl;n>i&&(r.scrollTop+=a-o)}e=r.parentElement}}function eo(e){return e instanceof HTMLInputElement&&!hl.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function wl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Cl(...e){return t=>e.forEach(r=>wl(r,t))}function Wn(...e){return Hn.useCallback(Cl(...e),e)}var Gn=new WeakMap;function Y(e,t,r=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([a,n])=>{if(a.startsWith("--")){e.style.setProperty(a,n);return}o[a]=e.style[a],e.style[a]=n}),!r&&Gn.set(e,o)}function xl(e,t){if(!e||!(e instanceof HTMLElement))return;let r=Gn.get(e);r&&(e.style[t]=r[t])}var K=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vr(e,t){if(!e)return null;let r=window.getComputedStyle(e),o=r.transform||r.webkitTransform||r.mozTransform,a=o.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[K(t)?13:12]):(a=o.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[K(t)?5:4]):null)}function Rl(e){return 8*(Math.log(e+1)-2)}function Qr(e,t){if(!e)return()=>{};let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function Nl(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var W={DURATION:.5,EASE:[.32,.72,0,1]},Un=.4,Pl=.25,Dl=100,Zn=8,ut=16,to=26,Jr="vaul-dragging";function Kn(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function Sl({defaultProp:e,onChange:t}){let r=R.useState(e),[o]=r,a=R.useRef(o),n=Kn(t);return R.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}function jn({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,a]=Sl({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,l=Kn(r),f=R.useCallback(c=>{if(n){let d=typeof c=="function"?c(e):c;d!==e&&l(d)}else a(c)},[n,e,a,l]);return[i,f]}function Ll({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:n,onSnapPointChange:i,direction:l="bottom",container:f,snapToSequentialPoint:c}){let[m,d]=jn({prop:e,defaultProp:r?.[0],onChange:t}),[u,g]=R.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);R.useEffect(()=>{function y(){g({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);let C=R.useMemo(()=>m===r?.[r.length-1]||null,[r,m]),v=R.useMemo(()=>{var y;return(y=r?.findIndex(S=>S===m))!=null?y:null},[r,m]),h=r&&r.length>0&&(n||n===0)&&!Number.isNaN(n)&&r[n]===m||!r,p=R.useMemo(()=>{let y=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var S;return(S=r?.map(D=>{let M=typeof D=="string",T=0;if(M&&(T=parseInt(D,10)),K(l)){let w=M?T:u?D*y.height:0;return u?l==="bottom"?y.height-w:-y.height+w:w}let N=M?T:u?D*y.width:0;return u?l==="right"?y.width-N:-y.width+N:N}))!=null?S:[]},[r,u,f]),x=R.useMemo(()=>v!==null?p?.[v]:null,[p,v]),P=R.useCallback(y=>{var S;let D=(S=p?.findIndex(M=>M===y))!=null?S:null;i(D),Y(o.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(l)?`translate3d(0, ${y}px, 0)`:`translate3d(${y}px, 0, 0)`}),p&&D!==p.length-1&&n!==void 0&&D!==n&&D<n?Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"0"}):Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"1"}),d(r?.[Math.max(D,0)])},[o.current,r,p,n,a,d]);R.useEffect(()=>{if(m||e){var y;let S=(y=r?.findIndex(D=>D===e||D===m))!=null?y:-1;p&&S!==-1&&typeof p[S]=="number"&&P(p[S])}},[m,e,r,p,P]);function b({draggedDistance:y,closeDrawer:S,velocity:D,dismissible:M}){if(n===void 0)return;let T=l==="bottom"||l==="right"?(x??0)-y:(x??0)+y,N=v===n-1,w=v===0,F=y>0;if(N&&Y(a.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`}),!c&&D>2&&!F){M?S():P(p[0]);return}if(!c&&D>2&&F&&p&&r){P(p[r.length-1]);return}let z=p?.reduce((re,_e)=>typeof re!="number"||typeof _e!="number"?re:Math.abs(_e-T)<Math.abs(re-T)?_e:re),J=K(l)?window.innerHeight:window.innerWidth;if(D>Un&&Math.abs(y)<J*.4){let re=F?1:-1;if(re>0&&C&&r){P(p[r.length-1]);return}if(w&&re<0&&M&&S(),v===null)return;P(p[v+re]);return}P(z)}function k({draggedDistance:y}){if(x===null)return;let S=l==="bottom"||l==="right"?x-y:x+y;(l==="bottom"||l==="right")&&S<p[p.length-1]||(l==="top"||l==="left")&&S>p[p.length-1]||Y(o.current,{transform:K(l)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`})}function E(y,S){if(!r||typeof v!="number"||!p||n===void 0)return null;let D=v===n-1;if(v>=n&&S)return 0;if(D&&!S)return 1;if(!h&&!D)return null;let T=D?v+1:v-1,N=D?p[T]-p[T-1]:p[T+1]-p[T],w=y/Math.abs(N);return D?1-w:w}return{isLastSnapPoint:C,activeSnapPoint:m,shouldFade:h,getPercentageDragged:E,setActiveSnapPoint:d,activeSnapPointIndex:v,onRelease:b,onDrag:k,snapPointsOffset:p}}var kl=()=>()=>{};function Tl(){let{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:a}=Rt(),n=R.useRef(null),i=cl(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-to)/window.innerWidth}R.useEffect(()=>{if(t&&r){n.current&&clearTimeout(n.current);let f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;Nl(o&&!a?Qr(document.body,{background:"black"}):kl,Qr(f,{transformOrigin:K(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${W.DURATION}s`,transitionTimingFunction:`cubic-bezier(${W.EASE.join(",")})`}));let c=Qr(f,{borderRadius:`${Zn}px`,overflow:"hidden",...K(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),n.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},W.DURATION*1e3)}}},[t,r,i])}var Qt=null;function Fl({isOpen:e,modal:t,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:n}){let[i,l]=R.useState(()=>typeof window<"u"?window.location.href:""),f=R.useRef(0),c=R.useCallback(()=>{if(In()&&Qt===null&&e&&!n){Qt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:d,innerHeight:u}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-d}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let g=u-window.innerHeight;g&&f.current>=u&&(document.body.style.top=`${-(f.current+g)}px`)}),300)}},[e]),m=R.useCallback(()=>{if(In()&&Qt!==null&&!n){let d=-parseInt(document.body.style.top,10),u=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Qt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){l(window.location.href);return}window.scrollTo(u,d)}),Qt=null}},[i]);return R.useEffect(()=>{function d(){f.current=window.scrollY}return d(),window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}},[]),R.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),R.useEffect(()=>{r||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&c(),t||window.setTimeout(()=>{m()},500)):m())},[e,o,i,t,r,c,m]),{restorePositionSetting:m}}function Xn({open:e,onOpenChange:t,children:r,onDrag:o,onRelease:a,snapPoints:n,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:f=Pl,scrollLockTimeout:c=Dl,dismissible:m=!0,handleOnly:d=!1,fadeFromIndex:u=n&&n.length-1,activeSnapPoint:g,setActiveSnapPoint:C,fixed:v,modal:h=!0,onClose:p,nested:x,noBodyStyles:P=!1,direction:b="bottom",defaultOpen:k=!1,disablePreventScroll:E=!0,snapToSequentialPoint:y=!1,preventScrollRestoration:S=!1,repositionInputs:D=!0,onAnimationEnd:M,container:T,autoFocus:N=!1}){var w,F;let[z=!1,J]=jn({defaultProp:k,prop:e,onChange:L=>{t?.(L),!L&&!x&&Fi(),setTimeout(()=>{M?.(L)},W.DURATION*1e3),L&&!h&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),L||(document.body.style.pointerEvents="auto")}}),[re,_e]=R.useState(!1),[Ye,Et]=R.useState(!1),[Pi,No]=R.useState(!1),ft=R.useRef(null),ar=R.useRef(null),Tr=R.useRef(null),Fr=R.useRef(null),At=R.useRef(null),Mt=R.useRef(!1),Er=R.useRef(null),Ar=R.useRef(0),gt=R.useRef(!1),Po=R.useRef(!k),Do=R.useRef(0),A=R.useRef(null),So=R.useRef(((w=A.current)==null?void 0:w.getBoundingClientRect().height)||0),Lo=R.useRef(((F=A.current)==null?void 0:F.getBoundingClientRect().width)||0),Mr=R.useRef(0),Di=R.useCallback(L=>{n&&L===It.length-1&&(ar.current=new Date)},[]),{activeSnapPoint:Si,activeSnapPointIndex:ht,setActiveSnapPoint:ko,onRelease:Li,snapPointsOffset:It,onDrag:ki,shouldFade:To,getPercentageDragged:Ti}=Ll({snapPoints:n,activeSnapPointProp:g,setActiveSnapPointProp:C,drawerRef:A,fadeFromIndex:u,overlayRef:ft,onSnapPointChange:Di,direction:b,container:T,snapToSequentialPoint:y});vl({isDisabled:!z||Ye||!h||Pi||!re||!D||!E});let{restorePositionSetting:Fi}=Fl({isOpen:z,modal:h,nested:x??!1,hasBeenOpened:re,preventScrollRestoration:S,noBodyStyles:P});function ir(){return(window.innerWidth-to)/window.innerWidth}function Ei(L){var O,$;!m&&!n||A.current&&!A.current.contains(L.target)||(So.current=((O=A.current)==null?void 0:O.getBoundingClientRect().height)||0,Lo.current=(($=A.current)==null?void 0:$.getBoundingClientRect().width)||0,Et(!0),Tr.current=new Date,_n()&&window.addEventListener("touchend",()=>Mt.current=!1,{once:!0}),L.target.setPointerCapture(L.pointerId),Ar.current=K(b)?L.pageY:L.pageX)}function Fo(L,O){var $;let I=L,U=($=window.getSelection())==null?void 0:$.toString(),pe=A.current?vr(A.current,b):null,le=new Date;if(I.tagName==="SELECT"||I.hasAttribute("data-vaul-no-drag")||I.closest("[data-vaul-no-drag]"))return!1;if(b==="right"||b==="left")return!0;if(ar.current&&le.getTime()-ar.current.getTime()<500)return!1;if(pe!==null&&(b==="bottom"?pe>0:pe<0))return!0;if(U&&U.length>0)return!1;if(At.current&&le.getTime()-At.current.getTime()<c&&pe===0||O)return At.current=le,!1;for(;I;){if(I.scrollHeight>I.clientHeight){if(I.scrollTop!==0)return At.current=new Date,!1;if(I.getAttribute("role")==="dialog")return!0}I=I.parentNode}return!0}function Ai(L){if(A.current&&Ye){let O=b==="bottom"||b==="right"?1:-1,$=(Ar.current-(K(b)?L.pageY:L.pageX))*O,I=$>0,U=n&&!m&&!I;if(U&&ht===0)return;let pe=Math.abs($),le=document.querySelector("[data-vaul-drawer-wrapper]"),qe=b==="bottom"||b==="top"?So.current:Lo.current,Fe=pe/qe,st=Ti(pe,I);if(st!==null&&(Fe=st),U&&Fe>=1||!Mt.current&&!Fo(L.target,I))return;if(A.current.classList.add(Jr),Mt.current=!0,Y(A.current,{transition:"none"}),Y(ft.current,{transition:"none"}),n&&ki({draggedDistance:$}),I&&!n){let Me=Rl($),sr=Math.min(Me*-1,0)*O;Y(A.current,{transform:K(b)?`translate3d(0, ${sr}px, 0)`:`translate3d(${sr}px, 0, 0)`});return}let Qe=1-Fe;if((To||u&&ht===u-1)&&(o?.(L,Fe),Y(ft.current,{opacity:`${Qe}`,transition:"none"},!0)),le&&ft.current&&i){let Me=Math.min(ir()+Fe*(1-ir()),1),sr=8-Fe*8,Ao=Math.max(0,14-Fe*14);Y(le,{borderRadius:`${sr}px`,transform:K(b)?`scale(${Me}) translate3d(0, ${Ao}px, 0)`:`scale(${Me}) translate3d(${Ao}px, 0, 0)`,transition:"none"},!0)}if(!n){let Me=pe*O;Y(A.current,{transform:K(b)?`translate3d(0, ${Me}px, 0)`:`translate3d(${Me}px, 0, 0)`})}}}R.useEffect(()=>{window.requestAnimationFrame(()=>{Po.current=!0})},[]),R.useEffect(()=>{var L;function O(){if(!A.current||!D)return;let $=document.activeElement;if(eo($)||gt.current){var I;let U=((I=window.visualViewport)==null?void 0:I.height)||0,pe=window.innerHeight,le=pe-U,qe=A.current.getBoundingClientRect().height||0,Fe=qe>pe*.8;Mr.current||(Mr.current=qe);let st=A.current.getBoundingClientRect().top;if(Math.abs(Do.current-le)>60&&(gt.current=!gt.current),n&&n.length>0&&It&&ht){let Qe=It[ht]||0;le+=Qe}if(Do.current=le,qe>U||gt.current){let Qe=A.current.getBoundingClientRect().height,Me=Qe;Qe>U&&(Me=U-(Fe?st:to)),v?A.current.style.height=`${Qe-Math.max(le,0)}px`:A.current.style.height=`${Math.max(Me,U-st)}px`}else dl()||(A.current.style.height=`${Mr.current}px`);n&&n.length>0&&!gt.current?A.current.style.bottom="0px":A.current.style.bottom=`${Math.max(le,0)}px`}}return(L=window.visualViewport)==null||L.addEventListener("resize",O),()=>{var $;return($=window.visualViewport)==null?void 0:$.removeEventListener("resize",O)}},[ht,n,It]);function Bt(L){Mi(),p?.(),L||J(!1),setTimeout(()=>{n&&ko(n[0])},W.DURATION*1e3)}function Eo(){if(!A.current)return;let L=document.querySelector("[data-vaul-drawer-wrapper]"),O=vr(A.current,b);Y(A.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`}),Y(ft.current,{transition:`opacity ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,opacity:"1"}),i&&O&&O>0&&z&&Y(L,{borderRadius:`${Zn}px`,overflow:"hidden",...K(b)?{transform:`scale(${ir()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ir()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${W.DURATION}s`,transitionTimingFunction:`cubic-bezier(${W.EASE.join(",")})`},!0)}function Mi(){!Ye||!A.current||(A.current.classList.remove(Jr),Mt.current=!1,Et(!1),Fr.current=new Date)}function Ii(L){if(!Ye||!A.current)return;A.current.classList.remove(Jr),Mt.current=!1,Et(!1),Fr.current=new Date;let O=vr(A.current,b);if(!L||!Fo(L.target,!1)||!O||Number.isNaN(O)||Tr.current===null)return;let $=Fr.current.getTime()-Tr.current.getTime(),I=Ar.current-(K(b)?L.pageY:L.pageX),U=Math.abs(I)/$;if(U>.05&&(No(!0),setTimeout(()=>{No(!1)},200)),n){Li({draggedDistance:I*(b==="bottom"||b==="right"?1:-1),closeDrawer:Bt,velocity:U,dismissible:m}),a?.(L,!0);return}if(b==="bottom"||b==="right"?I>0:I<0){Eo(),a?.(L,!0);return}if(U>Un){Bt(),a?.(L,!1);return}var pe;let le=Math.min((pe=A.current.getBoundingClientRect().height)!=null?pe:0,window.innerHeight);var qe;let Fe=Math.min((qe=A.current.getBoundingClientRect().width)!=null?qe:0,window.innerWidth),st=b==="left"||b==="right";if(Math.abs(O)>=(st?Fe:le)*f){Bt(),a?.(L,!1);return}a?.(L,!0),Eo()}R.useEffect(()=>(z&&(Y(document.documentElement,{scrollBehavior:"auto"}),ar.current=new Date),()=>{xl(document.documentElement,"scrollBehavior")}),[z]);function Bi(L){let O=L?(window.innerWidth-ut)/window.innerWidth:1,$=L?-ut:0;Er.current&&window.clearTimeout(Er.current),Y(A.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(b)?`scale(${O}) translate3d(0, ${$}px, 0)`:`scale(${O}) translate3d(${$}px, 0, 0)`}),!L&&A.current&&(Er.current=setTimeout(()=>{let I=vr(A.current,b);Y(A.current,{transition:"none",transform:K(b)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`})},500))}function Oi(L,O){if(O<0)return;let $=(window.innerWidth-ut)/window.innerWidth,I=$+O*(1-$),U=-ut+O*ut;Y(A.current,{transform:K(b)?`scale(${I}) translate3d(0, ${U}px, 0)`:`scale(${I}) translate3d(${U}px, 0, 0)`,transition:"none"})}function Vi(L,O){let $=K(b)?window.innerHeight:window.innerWidth,I=O?($-ut)/$:1,U=O?-ut:0;O&&Y(A.current,{transition:`transform ${W.DURATION}s cubic-bezier(${W.EASE.join(",")})`,transform:K(b)?`scale(${I}) translate3d(0, ${U}px, 0)`:`scale(${I}) translate3d(${U}px, 0, 0)`})}return R.useEffect(()=>{h||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[h]),R.createElement(se.Root,{modal:h,defaultOpen:k,onOpenChange:L=>{!m&&!L||(L?_e(!0):Bt(!0),J(L))},open:z},R.createElement($n.Provider,{value:{activeSnapPoint:Si,snapPoints:n,setActiveSnapPoint:ko,drawerRef:A,overlayRef:ft,onOpenChange:t,onPress:Ei,onRelease:Ii,onDrag:Ai,dismissible:m,shouldAnimate:Po,handleOnly:d,isOpen:z,isDragging:Ye,shouldFade:To,closeDrawer:Bt,onNestedDrag:Oi,onNestedOpenChange:Bi,onNestedRelease:Vi,keyboardIsOpen:gt,modal:h,snapPointsOffset:It,activeSnapPointIndex:ht,direction:b,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:P,container:T,autoFocus:N}},r))}var Yn=R.forwardRef(function({...e},t){let{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:n,isOpen:i,modal:l,shouldAnimate:f}=Rt(),c=Wn(t,r),m=o&&o.length>0;if(!l)return null;let d=R.useCallback(u=>a(u),[a]);return R.createElement(se.Overlay,{onMouseUp:d,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&m?"true":"false","data-vaul-snap-points-overlay":i&&n?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});Yn.displayName="Drawer.Overlay";var qn=R.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...o},a){let{drawerRef:n,onPress:i,onRelease:l,onDrag:f,keyboardIsOpen:c,snapPointsOffset:m,activeSnapPointIndex:d,modal:u,isOpen:g,direction:C,snapPoints:v,container:h,handleOnly:p,shouldAnimate:x,autoFocus:P}=Rt(),[b,k]=R.useState(!1),E=Wn(a,n),y=R.useRef(null),S=R.useRef(null),D=R.useRef(!1),M=v&&v.length>0;Tl();let T=(w,F,z=0)=>{if(D.current)return!0;let J=Math.abs(w.y),re=Math.abs(w.x),_e=re>J,Ye=["bottom","right"].includes(F)?1:-1;if(F==="left"||F==="right"){if(!(w.x*Ye<0)&&re>=0&&re<=z)return _e}else if(!(w.y*Ye<0)&&J>=0&&J<=z)return!_e;return D.current=!0,!0};R.useEffect(()=>{M&&window.requestAnimationFrame(()=>{k(!0)})},[]);function N(w){y.current=null,D.current=!1,l(w)}return R.createElement(se.Content,{"data-vaul-drawer-direction":C,"data-vaul-drawer":"","data-vaul-delayed-snap-points":b?"true":"false","data-vaul-snap-points":g&&M?"true":"false","data-vaul-custom-container":h?"true":"false","data-vaul-animate":x?.current?"true":"false",...o,ref:E,style:m&&m.length>0?{"--snap-point-height":`${m[d??0]}px`,...t}:t,onPointerDown:w=>{p||(o.onPointerDown==null||o.onPointerDown.call(o,w),y.current={x:w.pageX,y:w.pageY},i(w))},onOpenAutoFocus:w=>{r?.(w),P||w.preventDefault()},onPointerDownOutside:w=>{if(e?.(w),!u||w.defaultPrevented){w.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:w=>{if(!u){w.preventDefault();return}},onPointerMove:w=>{if(S.current=w,p||(o.onPointerMove==null||o.onPointerMove.call(o,w),!y.current))return;let F=w.pageY-y.current.y,z=w.pageX-y.current.x,J=w.pointerType==="touch"?10:2;T({x:z,y:F},C,J)?f(w):(Math.abs(z)>J||Math.abs(F)>J)&&(y.current=null)},onPointerUp:w=>{o.onPointerUp==null||o.onPointerUp.call(o,w),y.current=null,D.current=!1,l(w)},onPointerOut:w=>{o.onPointerOut==null||o.onPointerOut.call(o,w),N(S.current)},onContextMenu:w=>{o.onContextMenu==null||o.onContextMenu.call(o,w),S.current&&N(S.current)}})});qn.displayName="Drawer.Content";var El=250,Al=120,Qn=R.forwardRef(function({preventCycle:e=!1,children:t,...r},o){let{closeDrawer:a,isDragging:n,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:f,dismissible:c,handleOnly:m,isOpen:d,onPress:u,onDrag:g}=Rt(),C=R.useRef(null),v=R.useRef(!1);function h(){if(v.current){P();return}window.setTimeout(()=>{p()},Al)}function p(){if(n||e||v.current){P();return}if(P(),!i||i.length===0){c||a();return}if(l===i[i.length-1]&&c){a();return}let k=i.findIndex(y=>y===l);if(k===-1)return;let E=i[k+1];f(E)}function x(){C.current=window.setTimeout(()=>{v.current=!0},El)}function P(){C.current&&window.clearTimeout(C.current),v.current=!1}return R.createElement("div",{onClick:h,onPointerCancel:P,onPointerDown:b=>{m&&u(b),x()},onPointerMove:b=>{m&&g(b)},ref:o,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},R.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Qn.displayName="Drawer.Handle";function Ml({onDrag:e,onOpenChange:t,open:r,...o}){let{onNestedDrag:a,onNestedOpenChange:n,onNestedRelease:i}=Rt();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return R.createElement(Xn,{nested:!0,open:r,onClose:()=>{n(!1)},onDrag:(l,f)=>{a(l,f),e?.(l,f)},onOpenChange:l=>{l&&n(l),t?.(l)},onRelease:i,...o})}function Il(e){let t=Rt(),{container:r=t.container,...o}=e;return R.createElement(se.Portal,{container:r,...o})}var he={Root:Xn,NestedRoot:Ml,Content:qn,Overlay:Yn,Trigger:se.Trigger,Portal:Il,Handle:Qn,Close:se.Close,Title:se.Title,Description:se.Description};import{useState as Bl,useEffect as Ol}from"react";function Jn(){let[e,t]=Bl({width:100,height:100});return Ol(()=>{function r(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)},[]),e}import{jsx as ea,jsxs as Vl}from"react/jsx-runtime";var ta=()=>Vl("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:[ea("path",{d:"M18 6 6 18"}),ea("path",{d:"m6 6 12 12"})]});import{Fragment as la,jsx as te,jsxs as Nt}from"react/jsx-runtime";var oo=({shouldScaleBackground:e=!1,...t})=>te(he.Root,{direction:"right",shouldScaleBackground:e,...t});oo.displayName="Drawer";var $l=he.Trigger,_l=he.Close,zl=he.Portal,ra=Jt.forwardRef(({className:e,...t},r)=>te(he.Overlay,{className:s("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:r}));ra.displayName=he.Overlay.displayName;var Wl=Hl("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 !select-text",{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",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"},size:{default:"sm:max-w-[512px]",full:"!max-w-full w-full"}},defaultVariants:{side:"right",size:"default"}}),oa=Jt.forwardRef(({side:e="right",size:t="default",hideCloseButton:r,usePortal:o=!0,showOverlay:a=!0,className:n,children:i,id:l,...f},c)=>{let m=Nt(la,{children:[a&&te(ra,{}),Nt(he.Content,{ref:c,className:s(Wl({side:e,size:t}),n),...f,children:[te("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"}),t==="full"&&te("style",{children:`
|
|
4
4
|
body { pointer-events: auto !important; }
|
|
5
5
|
#__next { pointer-events: auto !important; }
|
|
6
6
|
[data-aria-hidden="true"] { pointer-events: auto !important; }
|
|
7
|
-
`}),i,!r&&Nt(he.Close,{id:`${l}-close-button`,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:[te(ta,{}),te("span",{className:"sr-only",children:"Close"})]})]})]});return o?te(
|
|
7
|
+
`}),i,!r&&Nt(he.Close,{id:`${l}-close-button`,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:[te(ta,{}),te("span",{className:"sr-only",children:"Close"})]})]})]});return o?te(zl,{children:m}):m});oa.displayName=he.Content.displayName;var na=({className:e,...t})=>te("div",{className:s("text-lg flex flex-col border-b border-b-gray-200 space-y-1 text-left w-full p-3",e),...t});na.displayName="DrawerHeader";var aa=({className:e,...t})=>te("div",{className:s("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});aa.displayName="DrawerFooter";var ia=Jt.forwardRef(({className:e,...t},r)=>te(he.Title,{ref:r,className:s("text-xl font-semibold text-[#191919] dark:text-white",e),...t}));ia.displayName=he.Title.displayName;var sa=Jt.forwardRef(({className:e,...t},r)=>te(he.Description,{ref:r,className:s("text-xs text-[#5d5c5c] dark:text-white",e),...t}));sa.displayName=he.Description.displayName;var Gl=({trigger:e=void 0,children:t,open:r=void 0,onOpenChange:o=void 0,hideCloseButton:a,footer:n,title:i,description:l,contentClassName:f,headerClassName:c,titleClassName:m,descriptionClassName:d,footerClassName:u,asChild:g=!0,onOpenAutoFocus:C,drawerContentClassName:v,onCloseAutoFocus:h,id:p="drawer",modal:x=!0,size:P="default",usePortal:b=!0,showOverlay:k=!0})=>{let{width:E}=Jn(),S=E<768?"bottom":"right";return Nt(oo,{modal:x,...r!==void 0?{open:r,onOpenChange:o}:{},direction:S,children:[te($l,{className:"cursor-pointer",asChild:g,id:`${p}-open-trigger`,children:e}),Nt(oa,{className:s("flex flex-col gap-0 justify-start items-start md:max-h-full w-full max-md:!max-w-full max-md:!rounded-none",P==="default"?"!max-w-md":"!max-w-full",f),side:"right",size:P,usePortal:b,showOverlay:k,hideCloseButton:a,onOpenAutoFocus:C,onCloseAutoFocus:h,id:`${p}-content`,children:[i||l?Nt(na,{className:c,id:`${p}-header`,children:[i&&te(ia,{className:m,id:`${p}-title`,children:i}),l&&te(sa,{id:`${p}-description`,className:d,children:l})]}):te(la,{}),te("div",{"data-vaul-no-drag":!0,className:s("flex w-full overflow-y-auto overscroll-auto flex-col justify-start items-start p-4 flex-1 min-h-0",v),children:t}),n&&te(aa,{className:u,children:n})]})]})};import{jsx as ca}from"react/jsx-runtime";var da=()=>ca("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:ca("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})});import{jsx as er,jsxs as Ul}from"react/jsx-runtime";var ua=e=>Ul("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:[er("rect",{width:"60",height:"30",fill:"#00247D"}),er("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#FFFFFF",strokeWidth:"6"}),er("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#CF142B",strokeWidth:"4"}),er("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#FFFFFF",strokeWidth:"10"}),er("path",{d:"M30,0 L30,30 M0,15 L60,15",stroke:"#CF142B",strokeWidth:"6"})]});import{jsx as no,jsxs as Zl}from"react/jsx-runtime";var pa=e=>Zl("svg",{viewBox:"0 0 60 40",className:"w-full max-w-md h-auto","aria-label":"Tricolore - Flag of France",...e,children:[no("rect",{x:"0",y:"0",width:"20",height:"40",fill:"#002395"}),no("rect",{x:"20",y:"0",width:"20",height:"40",fill:"#FFFFFF"}),no("rect",{x:"40",y:"0",width:"20",height:"40",fill:"#ED2939"})]});import{jsx as ma,jsxs as Kl}from"react/jsx-runtime";var fa=()=>Kl("svg",{width:"20",height:"18",viewBox:"0 0 8 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ma("path",{d:"M5.50257 12.9395L3.68439 14.7576L1.86621 12.9395",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ma("path",{d:"M5.50257 5.06055L3.68439 3.24237L1.86621 5.06055",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});import{PopoverClose as jl}from"@radix-ui/react-popover";import{jsx as xe,jsxs as ao}from"react/jsx-runtime";var Xl=[{key:"en",label:"English"},{key:"fr",label:"French"}],Yl=({locale:e})=>e==="fr"?xe(pa,{width:10}):xe(ua,{width:10}),ql=({locale:e})=>xe("div",{className:"px-2 py-1 ",children:ao("div",{className:"flex items-center gap-2.5",children:[xe(Yl,{locale:e})," ",xe("span",{className:"uppercase",children:e}),xe(fa,{})]})}),Ql=({locale:e="en",onChange:t,locales:r=Xl})=>ao(ge,{children:[xe("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:xe(ee,{className:"!p-0 !bg-transparent ",id:"locale_select_dropdown",children:xe(ql,{locale:e})})}),xe(de,{side:"bottom",className:"p-0 max-w-max rounded-md overflow-hidden mx-auto mt-2",children:xe("div",{children:r?.map(o=>ao(jl,{type:"button",id:`locale_option_${o?.key}`,className:s("flex items-center gap-3 px-3 py-1 text-sm hover:bg-blue-50 w-full transition-all",{"bg-blue-100":e&&e===o?.key}),onClick:()=>t?.(o?.key),children:[xe("span",{children:o?.label})," ",e&&e===o?.key&&xe(da,{})]},o?.key))})})]});import{X as Sc}from"lucide-react";import{useMemo as Fa,useRef as Lc,useState as kc}from"react";import{AnimatePresence as Jl,motion as ec}from"framer-motion";import{useMemo as tc,useState as rc}from"react";import{HiCheck as oc}from"react-icons/hi";import{FiLogOut as nc}from"react-icons/fi";import{BsPlus as ac}from"react-icons/bs";import{jsx as io,jsxs as so}from"react/jsx-runtime";var tr=({activeBusiness:e,onTriggerClick:t,iconOnly:r=!1,className:o,rightNode:a})=>so("div",{id:"sidemenu_business_bar",role:"button",onClick:t||void 0,className:s("relative flex w-full items-center rounded-lg text-black bg-white",{"border-[.5px] border-[#E9EBF8] py-1 px-2":!r,"hover:bg-primary-accent transition-all duration-150 cursor-pointer ":!!t},o),children:[io("section",{className:s("flex items-center justify-center bg-[#E9EBF8] text-primary-main rounded-md mr-3 text-xl font-medium",{"w-10 h-10":!r,"w-full h-10 mr-0":r}),children:e?.name?.charAt(0)||"M"}),!r&&so("section",{className:"flex-1 flex justify-between items-center relative text-black w-full -space-y-1 tracking-wide",children:[so("div",{className:"flex-1 min-w-0 max-w-[150px] w-full",children:[io(wt,{as:"h2",className:"text-base capitalize font-medium",children:e?.name}),io(wt,{as:"p",className:"text-sm text-[#A5A5A5]",onClick:void 0,children:e?.email})]}),a]})]});import{ChevronUp as ic}from"lucide-react";import{jsx as ga}from"react/jsx-runtime";var ha=e=>ga("svg",{width:"9",height:"8",viewBox:"0 0 9 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:ga("circle",{cx:"4.5",cy:"4",r:"4",fill:"#62C554"})});import{jsx as ve,jsxs as lo}from"react/jsx-runtime";var sc={hidden:{y:"-12px",opacity:0},visible:{y:"0",opacity:1,transition:{type:"spring",damping:25,stiffness:500}},exit:{y:"-12px",opacity:0,transition:{type:"spring",damping:25,stiffness:500}}},va=({activeBusiness:e,toggleAddBusinessDrawer:t,businesses:r=[],handleSwitchBusiness:o,onLogoutClick:a,onToggleSideBar:n,toggleShowBusiness:i,isMobile:l,collapseType:f})=>{let[c,m]=rc(""),d=tc(()=>{let p=c.toLowerCase();return(r||[]).filter(x=>x.name?.toLowerCase().startsWith(p))},[r,c]),u=f==="hidden"||l,g=p=>m(p.target.value),C=p=>{o(p||""),u&&n(!1),m("")},v=()=>{t(),i(!1),u&&n(!1),m("")},h=()=>{a?.(),i(!1),u&&n(!1),m("")};return ve(Jl,{initial:!1,children:ve(ec.div,{initial:"hidden",animate:"visible",exit:"exit",variants:sc,children:lo("div",{className:"w-72 bg-white border-x border-t rounded-xl overflow-hidden p-3",style:{boxShadow:`
|
|
8
8
|
3px 4px 11px 0px #0000001A,
|
|
9
9
|
13px 16px 21px 0px #00000017,
|
|
10
10
|
29px 36px 28px 0px #0000000D,
|
|
11
11
|
52px 65px 33px 0px #00000003,
|
|
12
12
|
82px 101px 36px 0px #00000000
|
|
13
|
-
`},children:[ve(tr,{activeBusiness:e,rightNode:ve(ha,{}),className:"bg-[#FAFAFA] border-none p-3"}),ve("div",{className:"mt-3",children:ve(ae,{label:"Search Account",leftNode:ve(nc,{className:"h-4 w-4 text-gray-500"}),value:c,onChange:g,placeholder:"Search Account",className:"text-sm"})}),ve("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:u.map(p=>ve(tr,{onTriggerClick:()=>C(p?.clientId),activeBusiness:p,rightNode:e.clientId===p.clientId?ve(tc,{className:"text-primary-600",size:18}):void 0,className:s("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===p.clientId})},p.clientId))}),ve("div",{className:"py-2 ",children:lo("button",{onClick:v,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[ve(oc,{size:18,className:"text-primary-main"})," Add Account"]})}),ve("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:lo("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:h,children:[ve(rc,{size:16})," Log Out"]})})]})})})};import{jsx as nt,jsxs as sc}from"react/jsx-runtime";var ba=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:r,businesses:o=[],handleSwitchBusiness:a,iconOnly:n=!1,onLogoutClick:i,isMobile:l,onToggleSideBar:f,isBusinessShown:c,collapseType:m})=>nt("div",{className:"px-4 relative mb-0 ",children:nt(De,{side:l?"top":"right",open:c,onOpenChange:r,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:nt("div",{className:"flex items-center w-full",children:nt(tr,{activeBusiness:e,onTriggerClick:()=>r(!0),iconOnly:n,rightNode:nt(ic,{className:"stroke-gray-500"})})}),children:nt(va,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:o,onLogoutClick:i,onToggleSideBar:f,toggleShowBusiness:r,collapseType:m,isMobile:l})})}),ic=({className:e})=>sc("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:s("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[nt("path",{d:"M7 22l5 5 5-5"}),nt("path",{d:"M7 4l5-5 5 5"})]});import{jsx as ya,jsxs as lc}from"react/jsx-runtime";var wa=()=>lc("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[ya("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),ya("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as He,jsxs as Ca}from"react/jsx-runtime";var xa=()=>Ca("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[Ca("g",{children:[He("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),He("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),He("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),He("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),He("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),He("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),He("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),He("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),He("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),He("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as Ge,jsxs as Na}from"react/jsx-runtime";var Ra=({onToggleSideBar:e,isSidebarCollapsed:t})=>Ge("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?Ge(cc,{}):Ge(dc,{})}),cc=e=>Na("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[Ge("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),Ge("path",{d:"M9 3v18"}),Ge("path",{d:"m14 9 3 3-3 3"})]}),dc=e=>Na("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[Ge("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),Ge("path",{d:"M15 3v18"}),Ge("path",{d:"m10 15-3-3 3-3"})]});import{AnimatePresence as wc,motion as Cc}from"framer-motion";import{useEffect as xc}from"react";import{FiChevronRight as Rc}from"react-icons/fi";import{useState as Pa,useEffect as Da}from"react";var Sa=(e,t)=>{let[r,o]=Pa(t),[a,n]=Pa(!1);return Da(()=>{n(!0);try{let i=localStorage.getItem(e);i&&o(JSON.parse(i))}catch(i){console.error("Error reading from localStorage:",i)}},[e]),Da(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(r))}catch(i){console.error("Error writing to localStorage:",i)}},[e,r,a]),[r,o]};import{useCallback as gc,useContext as hc,useMemo as vc}from"react";import{createContext as uc,useMemo as pc}from"react";import{jsx as fc}from"react/jsx-runtime";var br=uc(void 0),mc=({permissions:e,children:t})=>{let r=pc(()=>e,[e]);return fc(br.Provider,{value:r,children:t})};var bc=e=>e?Array.isArray(e)?e:[e]:[],yc=(e,t)=>{let{resource:r,action:o}=t,a=e.filter(i=>i.resource===r);return a.some(i=>i.action===o)?!0:o==="read"?a.some(i=>i.action==="write"):!1},La=()=>hc(br),rr=e=>{let t=La(),r=gc(a=>!t||!a||t.some(i=>i.resource==="all"&&i.action==="administrator")?!0:bc(a).some(i=>yc(t,i)),[t]);return{hasPermission:vc(()=>r(e),[e,r]),validatePermission:r}};import{Fragment as ka,jsx as be,jsxs as Pt}from"react/jsx-runtime";var Nc={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},Ta=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:r,currentPath:o,onNavigate:a,collapseType:n,links:i,appConfig:l,isMobile:f})=>{let c="@sidebar-expanded-menus",[m,u]=Sa(c,{}),{validatePermission:d}=rr(),g=p=>{u(x=>({...x,[p]:!x[p]}))},C=p=>{if(!!p?.children?.length){e?(r(!t),u(P=>({...P,[p.id]:!0}))):g(p.id);return}a(`/${p.to}`)},v=p=>p.split("?")[0],h=p=>p?.children?.length?(p.children||[]).some(P=>v(o)===v(P.to)):v(o)===v(p.to);return xc(()=>{let p={};i.forEach(x=>{x.children&&x.children.length>0&&x.children.some(P=>v(o)===v(P.to))&&(p[x.id]=!0)}),u(p)},[i,o,t]),be("ul",{className:"w-[90%] space-y-2.5",children:i.map((p,x)=>{if(p.isHidden||p.permission&&!d(p.permission)||l?.hiddenRoutes?.includes(p.key??""))return null;let P=h(p),y=!!p?.children?.length,k=m[p.id];return Pt("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>C(p),children:[P&&!f&&(e||!y||!k)&&be("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),be("li",{id:p.id,className:s("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":P&&(!k||!t)},{"hover:bg-gray-100":!P&&(n!=="icons"||!t)},{"bg-white text-primary-main":P},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&P,"flex justify-center !px-0 max-w-[70%]":e&&!P}),children:Pt("div",{className:s("flex items-center w-full",{"justify-center":e}),children:[be(cr,{trigger:be("span",{className:"w-6",onClick:()=>C(p),children:p.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:p.name},x),(n!=="icons"||!t)&&Pt(ka,{children:[be("span",{className:"px-3 text-nowrap",children:p.name}),y&&be("span",{className:"ml-auto transition-transform duration-300",style:{transform:k?"rotate(90deg)":"rotate(0deg)"},children:be(Rc,{size:18})})]})]})},p.to),y&&(n!=="icons"||!t)&&be(wc,{children:k&&be(Cc.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:Nc,className:"overflow-hidden w-full",children:Pt("ul",{className:" mt-1 relative ",children:[p.children?.map((b,S)=>{if(l?.hiddenRoutes?.includes(b.key??"")||b.isHidden||b.permission&&!d(b.permission))return null;let D=v(o)===v(b.to);return be("div",{id:b.id,className:s("relative pl-12 bg-blue-100- mt-4"),children:Pt("li",{className:s("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":D},{"hover:text-primary-main":!D}),onClick:()=>a(`/${b.to}`),children:[b.name,D&&Pt(ka,{children:[!f&&be("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),be("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})},b.key||S)}),be("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},x)})})};import{Fragment as kc,jsx as Te,jsxs as yr}from"react/jsx-runtime";var Lc=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:r,links:o,businessProps:a,currentPath:n,onNavigate:i,appConfig:l,collapseType:f,onLogoutClick:c,openSidebarIcon:m=Te(xa,{}),closedSidebarIcon:u=Te(wa,{}),nodeAfterSideBarLogo:d})=>{let g=Ea(()=>r?"hidden":f||(r?"hidden":"icons"),[r,f]),[C,v]=Sc(!1),h=g==="icons"&&e,p=Dc(null),{businessList:x,activeBusiness:P,toggleAddBusinessDrawer:y,handleSetActiveBusiness:k}=a,F=M=>v(M),b=M=>{k?.(M),F(!1)},S=Ea(()=>g==="hidden"?m:e?u:m,[e,m,u,g]),D=r&&g==="hidden"&&e;return yr(kc,{children:[D&&Te("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),yr("div",{className:s("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":D}),children:[Te("div",{className:"absolute -right-[22px] top-0 z-20",children:g==="icons"&&Te(Ra,{isSidebarCollapsed:e,onToggleSideBar:t})}),yr("aside",{id:"sidebar_menu",ref:p,className:s("sticky top-0 pt-4 h-[100dvh] max-h-[100dvh] bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":g==="hidden","w-[311px]":e&&g!=="icons","w-[75px]":e&&g==="icons","w-[270px]":!e&&g==="icons","w-0 lg:w-0 pointer-events-none":!e&&g==="hidden","pointer-events-auto":e&&g==="hidden","left-0 top-0":r&&g==="hidden","-translate-x-full":!e&&r&&g!=="hidden","translate-x-0":e&&r&&g==="hidden"}),children:[yr("div",{className:s("flex items-center py-2 justify-center w-full",{"justify-between px-2":r}),children:[Te("section",{className:s({"ml-2":r,"-ml-16":!e}),children:S}),g==="hidden"&&Te("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:Te(Pc,{size:24,className:"text-black hover:opacity-60"})})]}),d,Te("div",{className:"flex-1 overflow-y-auto px-0 min-h-0",children:Te(Ta,{isIconsOnly:h,collapseType:g,currentPath:n,isSidebarCollapsed:e,links:o,onNavigate:i,onToggleSideBar:t,appConfig:l,isMobile:r})}),Te("div",{className:"w-full mt-auto pb-5 shrink-0",children:Te(ba,{activeBusiness:P,handleSwitchBusiness:b,isBusinessShown:C,toggleAddBusinessDrawer:y,toggleShowBusiness:F,businesses:x||[],iconOnly:g==="icons"?e:!1,onLogoutClick:c,isMobile:r,onToggleSideBar:t,collapseType:g})})]})]})]})};import{jsx as co}from"react/jsx-runtime";var Tc=({status:e,variant:t,className:r})=>co("div",{children:co("div",{className:s("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:co("p",{children:e.replace("-"," ")})})});import{Loader as vd}from"lucide-react";import{jsx as Fa,jsxs as Ec}from"react/jsx-runtime";var Aa=({tableBulkActions:e,selectedRows:t,isMobile:r=!1,id:o="bulk_row_actions"})=>{let a=t.length;return Fa("div",{className:s(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",r&&"flex-col gap-2"),id:o,children:Fa("div",{className:s("flex gap-2",r&&"w-full justify-start flex-wrap"),children:e.map((n,i)=>Ec(oe,{variant:n.variant||"outlined",size:"sm",className:s("flex ietems-center justify-center",n.className),onClick:()=>n.onClick(t),leftNode:n.icon,disabled:n.disabled||a===0,id:`${o}_action_${i}`,children:[n.label," ",n.showCount!==!1&&a]},i))})})};import{ChevronLeftIcon as Ac,ChevronRightIcon as Mc}from"lucide-react";import{jsx as uo}from"react/jsx-runtime";var Fc=({page:e,currentPage:t,onClick:r,id:o="page-button"})=>typeof e=="string"?uo("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):uo("button",{onClick:r,id:`${o}-${e}`,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}),Ma=({totalPages:e,currentPage:t,handlePageClick:r,id:o})=>{let n=()=>{let c=Math.floor(1.5),m=Math.max(1,t-c),u=Math.min(e,m+3-1);return u>e&&(m=Math.max(1,e-3+1),u=e),{start:m,end:u}},{start:i,end:l}=n(),f=[];return i>1&&f.push(1),i>2&&f.push("..."),f.push(...Array.from({length:l-i+1},(c,m)=>i+m)),l<e-1&&f.push("..."),l<e&&f.push(e),f.map((c,m)=>uo(Fc,{page:c,currentPage:t,id:o,onClick:typeof c=="number"?()=>r(c):void 0},m))};import{jsx as Dt,jsxs as po}from"react/jsx-runtime";var mo=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:o=0,totalItems:a=0,id:n="pagination"})=>{let i=c=>{c>=1&&c<=t&&r?.(c)},l=o===0?1:o*(e-1)+1,f=e===t?a:Math.min(l+o-1,a);return po("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&Dt("section",{className:"text-[#717171] text-[12px]",children:po("p",{className:"",children:["Showing ",l," - ",f," of ",a]})}),Dt("div",{className:"flex items-center justify-center sm:justify-end ",children:po("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Dt("button",{onClick:()=>i(e-1),id:`${n}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Dt(Ac,{className:"size-5"})}),Ma({currentPage:e,totalPages:t,handlePageClick:i,id:`${n}-page-button`}),Dt("button",{onClick:()=>i(e+1),id:`${n}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Dt(Mc,{className:"size-5"})})]})})]})};import{flexRender as Ia}from"@tanstack/react-table";import{jsx as Ue,jsxs as Ic}from"react/jsx-runtime";var Ba=({table:e,isMobile:t,onRowClick:r,id:o})=>Ue("div",{className:s("relative w-full rounded-b border-0",{}),children:Ic("table",{id:o??"table",className:"w-full overflow-x-scroll",children:[Ue("thead",{children:e.getHeaderGroups().map(a=>Ue("tr",{className:s(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(n=>Ue("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:Ue("div",{className:s("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:Ia(n.column.columnDef.header,n.getContext())})},n.id))},a.id))}),Ue("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>Ue("tr",{className:s("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(a):{},children:a.getVisibleCells().map(n=>Ue("td",{className:s("",{}),children:Ue("div",{className:s("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:Ia(n.column.columnDef.cell,n.getContext())})},n.id))},a.id))})]})});import{Download as md,ListFilter as fd,RotateCw as gd}from"lucide-react";import{useEffect as Bc,useState as Oc}from"react";var Oa=()=>{let[e,t]=Oc(!1);return Bc(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:o=>e?{children:o}:null}};import{ListFilter as cd}from"lucide-react";import{useEffect as dd,useState as ud}from"react";import{jsx as Vc}from"react/jsx-runtime";var Va=({count:e=0})=>e===0?null:Vc("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:e});import{PopoverClose as ti}from"@radix-ui/react-popover";import{useCallback as od}from"react";import{useForm as nd}from"react-hook-form";var St=class{static cleanFilters(t){return Object.fromEntries(Object.entries(t??{}).filter(([,r])=>r!=null&&r!==""))}static hasValue(t){return t!=null&&t!==""&&(Array.isArray(t)?t.length>0:!0)}static getRemovedKeys(t,r){return Object.keys(t).filter(o=>!(o in r)||r[o]===void 0||r[o]===null||r[o]==="")}static getUpdatedKeys(t,r){return Object.keys(r).filter(o=>r[o]!==t[o])}};import{jsx as Ha}from"react/jsx-runtime";var $a=({id:e,fieldKey:t,form:r,onClear:o})=>{let a=r.watch(t);return St.hasValue(a)?Ha("div",{className:"flex justify-end mt-1",children:Ha("button",{onClick:()=>o(t),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",id:`${e}-${t}-clear-button`,children:"Clear"})}):null};import{Controller as jc}from"react-hook-form";import{format as Gc}from"date-fns";import*as ye from"react";import{ChevronDown as Hc,ChevronLeft as $c,ChevronRight as _c,ChevronUp as zc}from"lucide-react";import{DayPicker as Wc}from"react-day-picker";import{jsx as wr}from"react/jsx-runtime";function fo({className:e,classNames:t,showOutsideDays:r=!0,...o}){return wr(Wc,{showOutsideDays:r,className:s("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2 relative",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center justify-between -top-7 relative",button_previous:s(ce({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute left-1"),button_next:s(ce({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute right-1"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"!h-9 !w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])>button]:bg-primary-main first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 [&[aria-selected=true]>button]:bg-primary-main [&[aria-selected=true]>button]:text-white",day_button:s(ce({variant:"primary"}),"!h-9 !w-9 p-0 font-normal aria-selected:opacity-100 bg-white [&:has([aria-selected])]:!bg-primary-main [&:has([aria-selected])]:text-white text-black/60"),range_end:"day-range-end",selected:"!bg-primary-main !text-white hover:bg-primary-main hover:text-primary-foreground focus:bg-primary-main focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:a,...n})=>wr(a==="left"?$c:a==="right"?_c:a==="up"?zc:Hc,{className:"h-4 w-4",...n}),Dropdown:({value:a,onChange:n,options:i,...l})=>{let f=i?.map(u=>({label:u.label,value:u.value.toString()}))??[],c=f.find(u=>u.value===a?.toString()),m=u=>{n?.({target:{value:u}})};return wr("div",{onPointerDown:u=>u.stopPropagation(),children:wr(ot,{className:"!border-0 !max-w-max !min-w-max text-sm font-medium h-8",options:f,value:c,onChange:u=>m(u.value),modal:!0,id:`${l.id}-select`})})}},disabled:a=>a>new Date||a<new Date("1900-01-01"),...o})}fo.displayName="Calendar";import{jsx as q,jsxs as Ze}from"react/jsx-runtime";var za=ye.forwardRef(({value:e,onClick:t,error:r,status:o,id:a},n)=>q("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ze("button",{className:s(ne({status:o}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!r,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":r}),onClick:t,ref:n,id:a,type:"button",children:[Ze("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[q("path",{d:"M8 2v4"}),q("path",{d:"M16 2v4"}),q("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),q("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));za.displayName="DateInputButton";var Uc=(e,t,r)=>{if(!e)return t;let o=new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});if(r){let a=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0");return`${o} at ${a}:${n}`}return o};function Zc({value:e,className:t,placeholder:r="Pick a date",showTime:o,...a}){return q(ee,{asChild:!0,className:s("cursor-pointer",t),children:q(za,{value:Uc(e,r,o),id:a.id,error:a?.error})})}function Kc({children:e,captionLayout:t="dropdown",fromYear:r,toYear:o,disableDate:a,modal:n,closeOnSelect:i=!1,showTime:l,onSelectTime:f,minDate:c,...m}){let[u,d]=ye.useState(!1),g=m.startMonth??(r?new Date(r,0):void 0),C=m.endMonth??(o?new Date(o,11):void 0),v=m.selected,[h,p]=ye.useState(v);ye.useEffect(()=>{p(v)},[v]),ye.useEffect(()=>{u&&!h&&c&&p(c)},[u,h,c]);let x=ye.useMemo(()=>{let F=Array.from({length:24},(S,D)=>({label:D.toString().padStart(2,"0"),value:D.toString()}));return!c||!h||!(h.toDateString()===c.toDateString())?F:F.filter(S=>parseInt(S.value,10)>=c.getHours())},[c,h]),P=ye.useMemo(()=>{let F=Array.from({length:60},(S,D)=>({label:D.toString().padStart(2,"0"),value:D.toString()}));return!c||!h||!(h.toDateString()===c.toDateString())?F:h.getHours()===c.getHours()?F.filter(S=>parseInt(S.value,10)>=c.getMinutes()):F},[c,h]),y=(F,b,S,D)=>{if(!F)return;let M=new Date(F);h&&(M.setHours(parseInt(h.getHours().toString(),10)),M.setMinutes(parseInt(h.getMinutes().toString(),10)),M.setSeconds(10),c&&M.toDateString()===c.toDateString()&&M<c&&(M.setHours(c.getHours()),M.setMinutes(c.getMinutes()))),m.onSelect?.(M,b,S,D),i&&d(!1)},k=(F,b)=>{let S=h?new Date(h):new Date,D=new Date(S);F==="hours"?D.setHours(parseInt(b,10)):D.setMinutes(parseInt(b,10)),f?.(D)};return Ze(ge,{modal:n,open:a?!1:u,onOpenChange:d,children:[e,Ze(de,{portal:!1,align:"start",className:"w-auto p-0 overflow-hidden",children:[q(fo,{id:`${m.id}-calendar-content`,mode:"single",...m,startMonth:g,endMonth:C,captionLayout:t,showOutsideDays:!1,onSelect:y,navLayout:"after"}),l&&Ze("div",{className:"flex items-center gap-2 px-4 pb-4 pt-2 border-t bg-gray-50/30",children:[Ze("div",{className:"flex flex-col gap-1.5 flex-1",children:[q("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Hours"}),q(ot,{options:x,value:{value:h?.getHours().toString()??"0",label:h?.getHours().toString().padStart(2,"0")??"00"},onChange:F=>k("hours",F.value),className:"!min-w-[70px]",modal:!0})]}),Ze("div",{className:"flex flex-col gap-1.5 flex-1",children:[q("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Minutes"}),q(ot,{options:P,value:{value:h?.getMinutes().toString()??"0",label:h?.getMinutes().toString().padStart(2,"0")??"00"},onChange:F=>k("minutes",F.value),className:"!min-w-[70px]",modal:!0})]})]})]})]})}var _a=(e,t="yyyy-MM-dd")=>e?t==="iso"?new Date(e).toISOString():Gc(new Date(e),t):"N/A",go=({label:e,optional:t,onChange:r,error:o,helpText:a,value:n,maxDate:i,closeOnSelect:l=!1,modal:f=!1,minDate:c,showTime:m=!1,id:u})=>{let d=ye.useMemo(()=>i?new Date(i):new Date("2099-12-31"),[i]),g=c?new Date(c):new Date("1900-01-01"),[C,v]=ye.useState(n?new Date(n):void 0),h=p=>{let x=new Date(p.getFullYear(),p.getMonth(),p.getDate()),P=new Date(g.getFullYear(),g.getMonth(),g.getDate()),y=new Date(d.getFullYear(),d.getMonth(),d.getDate());return x<P||x>y};return ye.useEffect(()=>{n&&v(new Date(n))},[n]),Ze("div",{className:"block w-full",children:[e&&Ze("div",{className:"flex justify-between w-full",children:[q(Z,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&q("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),q(Kc,{selected:C,onSelect:p=>{let x=p?_a(p,m?"iso":"yyyy-MM-dd"):"";r(x)},onSelectTime:p=>{let x=_a(p,"iso");r(x)},disabled:h,startMonth:g,endMonth:d,closeOnSelect:l,showTime:m,minDate:g,modal:f,id:u,children:q("div",{children:q(Zc,{id:u,status:o?"error":"default",value:n?new Date(n):void 0,showTime:m})})}),o&&q("p",{className:"mt-2 text-sm text-red-600",id:`${u}-error`,children:o}),a&&q("p",{className:"mt-2 text-sm text-gray-500",id:`${u}-description`,children:a})]})};import{jsx as Wa}from"react/jsx-runtime";var Ga=({filter:e,id:t,form:r})=>Wa(jc,{name:e.key,control:r.control,render:({field:o})=>Wa(go,{onChange:o?.onChange,value:o?.value,label:e?.label,id:`${t}-${e.key}`})});import{Controller as Xc}from"react-hook-form";import{jsx as Ua}from"react/jsx-runtime";var Za=({filter:e,id:t,form:r})=>Ua(Xc,{name:e.key,control:r.control,render:({field:{value:o,onChange:a},formState:{errors:n}})=>Ua(ot,{label:e?.label,options:e?.options,value:e?.options?.find(i=>String(i?.value)===String(o)),onChange:i=>a(i?.value),error:n?.[e?.key]?.message,modal:!0,placeholder:e?.placeholder,className:"!h-10",id:`${t}-${e.key}`,hideSearch:!!(e?.hideSearch??!0)})});import{Controller as Yc}from"react-hook-form";import{jsx as Ka}from"react/jsx-runtime";var ja=({filter:e,id:t,form:r})=>Ka(Yc,{name:e.key,control:r.control,render:({field:o,formState:a})=>Ka(ae,{error:a?.errors?.root?.message,placeholder:e?.placeholder,id:`${t}-${e.key}`,...o,...e})});import{Controller as qc}from"react-hook-form";import{v4 as Xa}from"uuid";import*as ho from"react";import*as at from"@radix-ui/react-radio-group";import{jsx as Cr}from"react/jsx-runtime";var xr=ho.forwardRef(({className:e,...t},r)=>Cr(at.Root,{className:s("grid gap-2",e),...t,ref:r}));xr.displayName=at.Root.displayName;var Rr=ho.forwardRef(({className:e,...t},r)=>Cr(at.Item,{ref:r,className:s(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
|
|
13
|
+
`},children:[ve(tr,{activeBusiness:e,rightNode:ve(ha,{}),className:"bg-[#FAFAFA] border-none p-3"}),ve("div",{className:"mt-3",children:ve(ae,{label:"Search Account",leftNode:ve(ic,{className:"h-4 w-4 text-gray-500"}),value:c,onChange:g,placeholder:"Search Account",className:"text-sm"})}),ve("ul",{className:"max-h-48 overflow-y-auto mt-2 px-1 space-y-2",children:d.map(p=>ve(tr,{onTriggerClick:()=>C(p?.clientId),activeBusiness:p,rightNode:e.clientId===p.clientId?ve(oc,{className:"text-primary-600",size:18}):void 0,className:s("bg-white border-none ",{"bg-[#FAFAFA]":e.clientId===p.clientId})},p.clientId))}),ve("div",{className:"py-2 ",children:lo("button",{onClick:v,className:"w-full flex items-center justify-start gap-2 text-sm text-[#0033C7] border-[#BECFFF] border-[0.5px] rounded-lg py-2 px-3 hover:bg-primary-accent transition ",children:[ve(ac,{size:18,className:"text-primary-main"})," Add Account"]})}),ve("div",{className:"bg-[#FAFAFA] px-3 py-2 -m-3 mt-4",children:lo("button",{className:"w-full flex items-center gap-2 text-sm text-black hover:text-gray-700 transition p-2 hover:bg-primary-accent",onClick:h,children:[ve(nc,{size:16})," Log Out"]})})]})})})};import{jsx as nt,jsxs as cc}from"react/jsx-runtime";var ya=({activeBusiness:e,toggleAddBusinessDrawer:t,toggleShowBusiness:r,businesses:o=[],handleSwitchBusiness:a,iconOnly:n=!1,onLogoutClick:i,isMobile:l,onToggleSideBar:f,isBusinessShown:c,collapseType:m})=>nt("div",{className:"px-4 relative mb-0 ",children:nt(De,{side:l?"top":"right",open:c,onOpenChange:r,align:"end",contentClassName:"!bg-transparent !shadow-none !p-0",trigger:nt("div",{className:"flex items-center w-full",children:nt(tr,{activeBusiness:e,onTriggerClick:()=>r(!0),iconOnly:n,rightNode:nt(lc,{className:"stroke-gray-500"})})}),children:nt(va,{activeBusiness:e,handleSwitchBusiness:a,toggleAddBusinessDrawer:t,businesses:o,onLogoutClick:i,onToggleSideBar:f,toggleShowBusiness:r,collapseType:m,isMobile:l})})}),lc=({className:e})=>cc("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:s("lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down",e),children:[nt("path",{d:"M7 22l5 5 5-5"}),nt("path",{d:"M7 4l5-5 5 5"})]});import{jsx as ba,jsxs as dc}from"react/jsx-runtime";var wa=()=>dc("svg",{width:"100%",height:"32",viewBox:"0 0 20 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pl-5",children:[ba("path",{d:"M19.686 5.71949V15.1448L19.6467 15.8434V15.8548V15.8663C19.5779 16.5076 19.4207 17.1146 19.1848 17.6758C19.0472 18.0079 18.8801 18.3286 18.6836 18.6149C18.5361 18.8439 18.3592 19.0615 18.1823 19.2677C18.025 19.4394 17.858 19.6112 17.6811 19.7601C17.5238 19.8975 17.3567 20.0235 17.1798 20.138C17.0127 20.2411 16.8456 20.3327 16.6786 20.4243C16.5606 20.4816 16.4427 20.5274 16.3149 20.5732L16.1773 20.6305L15.6761 20.8252L15.1748 21.0199L14.6736 21.2146L14.1723 21.4093L13.1698 21.7986L13.1207 21.8215V23.9402L13.0814 23.9517L12.7374 24.0777L12.6587 24.1006L12.3934 24.2036L12.1575 24.2953L12.0494 24.3296L11.7054 24.4556L11.6464 24.4785L11.3614 24.5816L11.1452 24.6617L11.0174 24.7075L10.6734 24.8335L10.6341 24.845L10.5849 24.8679H10.5653V20.745C10.5653 20.5732 10.5948 20.4129 10.6341 20.2526C10.6439 20.2182 10.6537 20.1838 10.6734 20.1495C10.752 19.9433 10.87 19.7601 11.0174 19.6112C11.0567 19.5769 11.096 19.5311 11.1452 19.4967C11.214 19.4394 11.2828 19.4051 11.3614 19.3593C11.381 19.3478 11.4105 19.3364 11.4302 19.3249L11.4498 19.3135L11.6562 19.2333L11.7152 19.2104L12.0592 19.0844L12.1673 19.0386L12.6686 18.8439L12.7472 18.8096L13.0912 18.6836L13.1796 18.6492L13.6809 18.4545L14.1821 18.2598L14.6834 18.0652L15.1846 17.8705L15.5483 17.733C15.5974 17.7216 15.6367 17.6987 15.6859 17.6758C15.8726 17.5956 16.0397 17.4811 16.1871 17.3551C16.3837 17.1948 16.5508 17.0001 16.6884 16.7825C16.9931 16.3244 17.17 15.7403 17.17 15.1333V5.71949C17.17 5.10106 17.0029 4.52844 16.6884 4.05889C16.5508 3.85275 16.3935 3.66951 16.2068 3.50917C16.197 3.49772 16.197 3.49772 16.1871 3.49772C16.0299 3.36029 15.8628 3.25722 15.6859 3.17705C15.5188 3.09689 15.3517 3.05108 15.1846 3.01672C15.0176 2.98236 14.8505 2.98236 14.6834 2.99382C14.5163 3.00527 14.3492 3.03963 14.1821 3.09689C14.1625 3.10834 14.133 3.10834 14.1133 3.11979L13.6809 3.28013L13.1796 3.46336L12.6784 3.65806L12.1378 3.82984L11.6366 4.02453L11.1353 4.20777L10.6341 4.40246L10.1328 4.5857L9.63159 4.76894L9.13034 4.96363L8.62909 5.14687L8.12784 5.3301L7.62659 5.52479L7.12534 5.70803L6.6241 5.90272L6.12285 6.08596L5.6216 6.28065L5.08103 6.46389L4.57979 6.65858L4.21614 6.79601C4.16699 6.81891 4.11785 6.83037 4.06871 6.85327C3.8918 6.93344 3.71489 7.04796 3.56746 7.17394C3.37089 7.33427 3.20381 7.52896 3.06621 7.74656C2.76153 8.2161 2.58462 8.78872 2.58462 9.40715V13.0948C2.58462 13.53 2.66325 13.8965 2.78119 14.2057C2.79102 14.2401 2.80085 14.263 2.8205 14.2973C2.81067 14.3088 2.79102 14.3088 2.78119 14.3202C2.70256 14.366 2.63376 14.4004 2.56496 14.4577C2.52565 14.4806 2.48634 14.5149 2.43719 14.5378C2.31925 14.618 2.20131 14.7096 2.0932 14.8012C2.08337 14.8127 2.06371 14.8241 2.05389 14.8356C1.94577 14.9272 1.84749 15.0188 1.74921 15.1104C1.68041 15.1792 1.61161 15.2479 1.55264 15.328C1.5035 15.3853 1.45435 15.4311 1.40521 15.4884C1.28727 15.6373 1.16933 15.7861 1.06122 15.9465C1.05139 15.9579 1.05139 15.9694 1.04156 15.9808C0.972761 16.0839 0.913791 16.1755 0.85482 16.2786C0.805678 16.1984 0.756536 16.1068 0.717223 16.0266C0.648424 15.9007 0.589453 15.7747 0.540311 15.6373C0.481341 15.4998 0.432199 15.3509 0.383057 15.2135C0.157004 14.5493 0.0390625 13.8392 0.0390625 13.1177V9.3957C0.0390625 8.50241 0.215974 7.63203 0.540311 6.87618C0.677909 6.54406 0.844992 6.22339 1.04156 5.93708C1.18899 5.70803 1.3659 5.49044 1.54281 5.28429C1.70006 5.11251 1.86715 4.94072 2.04406 4.79184C2.20131 4.65441 2.3684 4.52844 2.54531 4.41391C2.70256 4.31084 2.86964 4.21922 3.04656 4.1276C3.17432 4.07034 3.29227 4.01308 3.42003 3.96727L3.5478 3.92146L4.04905 3.73822L4.5503 3.54353L5.05155 3.36029L5.5528 3.1656L6.05405 2.98236L6.5553 2.78767L7.05654 2.60444L7.55779 2.40974L8.10818 2.22651L8.60943 2.03182L9.11068 1.84858L9.61193 1.66534L10.1132 1.47065L10.6144 1.28741L11.1157 1.09272L11.6169 0.909482L12.1182 0.714792L12.6194 0.531554L13.1207 0.336863L13.2878 0.279601C13.3959 0.233791 13.5138 0.199434 13.6317 0.165077C13.7988 0.119268 13.9659 0.073458 14.133 0.0505533C14.3001 0.0276485 14.4672 0.00474375 14.6342 0.00474375C14.8013 -0.00670864 14.9684 0.00474368 15.1355 0.0161961C15.3026 0.0276485 15.4697 0.0505533 15.6367 0.0849104C15.8038 0.119268 15.9709 0.165077 16.138 0.222339C16.3051 0.279601 16.482 0.348315 16.6392 0.428482C16.8063 0.508649 16.9832 0.61172 17.1405 0.714792C17.3174 0.829315 17.4845 0.955292 17.6417 1.09272C17.6417 1.09272 17.6417 1.09272 17.6516 1.09272C17.8285 1.2416 17.9956 1.40193 18.1528 1.58517C18.3396 1.77986 18.5066 1.99746 18.6541 2.22651C18.8506 2.52427 19.0177 2.83348 19.1553 3.1656C19.5091 3.95582 19.686 4.81475 19.686 5.71949Z",fill:"#0231C5"}),ba("path",{d:"M10.8112 9.92822V13.0846L10.7425 13.1079L10.5557 13.1778L10.2412 13.2943L10.2215 13.3059L9.87755 13.434L9.73995 13.4923L9.53356 13.5738L9.48441 13.5855L9.27802 13.667L9.10111 13.7369L8.93402 13.7951L8.59986 13.9232H8.59003L8.24604 14.0514L8.08878 14.1096L7.90204 14.1795L7.58753 14.2959L7.56787 14.3076L7.22388 14.4357L7.08628 14.4939L6.87989 14.5755L6.83074 14.5871L6.57521 14.6803L6.53589 14.692L6.1919 14.8201L6.07396 14.8667L5.8479 14.9482L5.57271 15.053L5.51374 15.0763L5.16974 15.2044L5.07146 15.2394L4.88472 15.3093L4.82575 15.3326L4.56038 15.4374L4.48175 15.4723L4.19673 15.5771C4.17707 15.5888 4.15742 15.5888 4.13776 15.6004C4.10827 15.6121 4.07879 15.6237 4.05913 15.6354C3.97068 15.682 3.88222 15.7286 3.79377 15.7868C3.71514 15.8334 3.62668 15.8916 3.54806 15.9615C3.51857 15.9848 3.47926 16.0197 3.44977 16.0547C3.322 16.1712 3.21389 16.2993 3.10578 16.4507C3.08612 16.474 3.06646 16.5089 3.04681 16.5439C2.93869 16.7186 2.84041 16.9049 2.76178 17.1146C2.63401 17.464 2.56521 17.8367 2.56521 18.2327V27.5039C2.56521 27.7951 2.63401 28.0747 2.76178 28.3076C2.84041 28.459 2.95835 28.5988 3.08612 28.7153C3.09595 28.7269 3.09595 28.7269 3.10578 28.7269C3.21389 28.8201 3.322 28.89 3.44977 28.9249C3.55788 28.9715 3.67582 28.9948 3.79377 28.9948C3.90188 28.9948 4.01982 28.9831 4.13776 28.9482C4.16725 28.9366 4.19673 28.9249 4.22622 28.9133L4.47193 28.8201L4.81592 28.692L5.15991 28.5638L5.50391 28.4357L5.8479 28.3076L6.00516 28.2494C6.06413 28.2261 6.1231 28.1911 6.18207 28.1562C6.30984 28.098 6.41795 28.0164 6.52606 27.9116C6.65383 27.7951 6.77177 27.6554 6.87006 27.4923C7.06663 27.1662 7.17474 26.7585 7.17474 26.3392V19.7585L7.20422 19.7469L7.54822 19.6187L7.56787 19.6071L7.88238 19.4906L8.06912 19.4207L8.22638 19.3625L8.57037 19.2344H8.5802L8.91437 19.1063L9.08145 19.048L9.25836 18.9781L9.5827 18.85L9.60236 18.8384L9.71047 18.7918V26.3392C9.71047 26.6188 9.69081 26.9099 9.6515 27.1778C9.63184 27.2826 9.62201 27.3758 9.60236 27.4806C9.52373 27.8767 9.41562 28.2494 9.25836 28.5988C9.16008 28.8317 9.04214 29.053 8.91437 29.2743C8.80625 29.449 8.69814 29.6121 8.57037 29.7752C8.46226 29.9149 8.34432 30.043 8.22638 30.1595C8.11827 30.276 8.00032 30.3692 7.88238 30.474C7.77427 30.5672 7.65633 30.6487 7.53839 30.7302C7.43028 30.8001 7.31234 30.87 7.19439 30.9282C7.18457 30.9282 7.17474 30.9399 7.16491 30.9515C7.06663 30.9981 6.95851 31.0447 6.86023 31.0913C6.83074 31.1029 6.80126 31.1146 6.77177 31.1262L6.51624 31.2194L5.82825 31.4757L5.48425 31.6038L5.14026 31.7319L4.983 31.7901C4.92403 31.8134 4.86506 31.8367 4.80609 31.8484C4.68815 31.8833 4.58004 31.9183 4.4621 31.9415C4.34416 31.9648 4.23604 31.9881 4.1181 31.9881C4.00999 31.9998 3.91171 31.9998 3.81342 31.9998H3.78394C3.666 31.9998 3.55788 31.9881 3.43994 31.9765C3.322 31.9648 3.21389 31.9415 3.09595 31.9183C2.97801 31.895 2.8699 31.86 2.75195 31.8134C2.68316 31.7901 2.62419 31.7668 2.55539 31.7435C2.50624 31.7203 2.4571 31.697 2.40796 31.6737C2.29002 31.6154 2.18191 31.5572 2.06397 31.4873C1.94602 31.4174 1.82808 31.3359 1.71997 31.2427C1.67083 31.2078 1.62169 31.1612 1.57255 31.1262C1.50375 31.068 1.44478 31.0098 1.37598 30.9399C1.25804 30.8234 1.1401 30.6953 1.03198 30.5555C0.904214 30.4041 0.786273 30.2294 0.687989 30.0547C0.550391 29.8334 0.442278 29.6004 0.343994 29.3559C0.117941 28.7735 0 28.1329 0 27.469V18.1978C0 17.4524 0.117941 16.7302 0.343994 16.0663C0.393136 15.9149 0.442278 15.7751 0.501249 15.6354C0.560219 15.4956 0.61919 15.3675 0.67816 15.2394C0.717474 15.1462 0.766616 15.0647 0.815758 14.9831C0.874728 14.8783 0.933699 14.7735 1.0025 14.6803C1.0025 14.6687 1.01233 14.657 1.02215 14.657C1.13027 14.494 1.23838 14.3425 1.36615 14.1911C1.41529 14.1329 1.4546 14.0746 1.51358 14.0281C1.58237 13.9465 1.64134 13.8883 1.71014 13.8184C1.80843 13.7252 1.90671 13.6204 2.01482 13.5389C2.02465 13.5272 2.04431 13.5156 2.05414 13.5039C2.16225 13.4108 2.28019 13.3176 2.39813 13.2477C2.43745 13.2244 2.47676 13.1895 2.5259 13.1662C2.5947 13.1196 2.67333 13.073 2.74213 13.0264C2.75195 13.0147 2.76178 13.0147 2.78144 13.0031C2.86007 12.9565 2.94852 12.9099 3.02715 12.875C3.04681 12.8633 3.06646 12.8517 3.08612 12.8517C3.1844 12.8051 3.29252 12.7585 3.3908 12.7236L3.42029 12.7119L3.51857 12.677L3.76428 12.5838L4.02965 12.479L4.10828 12.444L4.45227 12.3159L4.5309 12.281L4.79626 12.1878L4.85523 12.1645L5.04197 12.0946L5.14026 12.0597L5.48425 11.9316L5.54322 11.9083L5.81842 11.8034L6.04447 11.7219L6.16241 11.6753L6.50641 11.5472L6.54572 11.5355L6.80126 11.4424L6.8504 11.4307L7.0568 11.3492L7.19439 11.3026L7.53839 11.1745L7.55805 11.1628L7.87256 11.0464L8.0593 10.9765L8.21655 10.9182L8.56054 10.7901H8.57037L8.90454 10.662L9.07162 10.6038L9.24853 10.5339L9.45493 10.4523L9.50407 10.4407L9.71047 10.3592L9.84807 10.3009L10.1921 10.1728L10.2117 10.1612L10.5262 10.0447L10.713 9.97481L10.8112 9.92822Z",fill:"#0231C5"})]});import{jsx as He,jsxs as Ca}from"react/jsx-runtime";var xa=()=>Ca("svg",{width:"100%",height:40,xmlns:"http://www.w3.org/2000/svg",id:"Layer_1","data-name":"Layer 1",viewBox:"0 0 1565.51 377.21",children:[Ca("g",{children:[He("path",{fill:"#0231C5",d:"m277.49,86.74v85.18l-.41,6.31v.21c-.72,5.8-2.38,11.28-4.86,16.35-1.45,3-3.21,5.9-5.28,8.49-1.55,2.07-3.42,4.04-5.28,5.9-1.66,1.55-3.42,3.11-5.28,4.45-1.66,1.24-3.42,2.38-5.28,3.42-1.76.93-3.52,1.76-5.28,2.59-1.24.52-2.48.93-3.83,1.35l-1.45.52-5.28,1.76-5.28,1.76-5.28,1.76-5.28,1.76-10.56,3.52-.52.21v19.15l-.41.1-3.62,1.14-.83.21-2.79.93-2.48.83-1.14.31-3.62,1.14-.62.21-3,.93-2.28.72-1.35.41-3.62,1.14-.41.1-.52.21h-.21v-37.26c0-1.55.31-3,.72-4.45.1-.31.21-.62.41-.93.83-1.86,2.07-3.52,3.62-4.86.41-.31.83-.72,1.35-1.04.72-.52,1.45-.83,2.28-1.24.21-.1.52-.21.72-.31l.21-.1,2.17-.72.62-.21,3.62-1.14,1.14-.41,5.28-1.76.83-.31,3.62-1.14.93-.31,5.28-1.76,5.28-1.76,5.28-1.76,5.28-1.76,3.83-1.24c.52-.1.93-.31,1.45-.52,1.97-.72,3.73-1.76,5.28-2.9,2.07-1.45,3.83-3.21,5.28-5.18,3.21-4.14,5.07-9.42,5.07-14.9v-85.08c0-5.59-1.76-10.76-5.07-15.01-1.45-1.86-3.11-3.52-5.07-4.97q-.1-.1-.21-.1c-1.66-1.24-3.42-2.17-5.28-2.9-1.76-.72-3.52-1.14-5.28-1.45-1.76-.31-3.52-.31-5.28-.21-1.76.1-3.52.41-5.28.93-.21.1-.52.1-.72.21l-4.55,1.45-5.28,1.66-5.28,1.76-5.69,1.55-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.28,1.66-5.28,1.76-5.69,1.66-5.28,1.76-3.83,1.24c-.52.21-1.04.31-1.55.52-1.86.72-3.73,1.76-5.28,2.9-2.07,1.45-3.83,3.21-5.28,5.18-3.21,4.24-5.07,9.42-5.07,15.01v33.33c0,3.93.83,7.25,2.07,10.04.1.31.21.52.41.83-.1.1-.31.1-.41.21-.83.41-1.55.72-2.28,1.24-.41.21-.83.52-1.35.72-1.24.72-2.48,1.55-3.62,2.38-.1.1-.31.21-.41.31-1.14.83-2.17,1.66-3.21,2.48-.72.62-1.45,1.24-2.07,1.97-.52.52-1.04.93-1.55,1.45-1.24,1.35-2.48,2.69-3.62,4.14-.1.1-.1.21-.21.31-.72.93-1.35,1.76-1.97,2.69-.52-.72-1.04-1.55-1.45-2.28-.72-1.14-1.35-2.28-1.86-3.52-.62-1.24-1.14-2.59-1.66-3.83-2.38-6-3.62-12.42-3.62-18.94v-33.64c0-8.07,1.86-15.94,5.28-22.77,1.45-3,3.21-5.9,5.28-8.49,1.55-2.07,3.42-4.04,5.28-5.9,1.66-1.55,3.42-3.11,5.28-4.45,1.66-1.24,3.42-2.38,5.28-3.42,1.66-.93,3.42-1.76,5.28-2.59,1.35-.52,2.59-1.04,3.93-1.45l1.35-.41,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.8-1.66,5.28-1.76,5.28-1.66,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,5.28-1.66,5.28-1.76,1.76-.52c1.14-.41,2.38-.72,3.62-1.04,1.76-.41,3.52-.83,5.28-1.04,1.76-.21,3.52-.41,5.28-.41,1.76-.1,3.52,0,5.28.1,1.76.1,3.52.31,5.28.62,1.76.31,3.52.72,5.28,1.24,1.76.52,3.62,1.14,5.28,1.86,1.76.72,3.62,1.66,5.28,2.59,1.86,1.04,3.62,2.17,5.28,3.42h.1c1.86,1.35,3.62,2.79,5.28,4.45,1.97,1.76,3.73,3.73,5.28,5.8,2.07,2.69,3.83,5.49,5.28,8.49,3.73,7.14,5.59,14.9,5.59,23.08Z"}),He("path",{fill:"#0231C5",d:"m184.03,136.63v28.05l-.72.21-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1h0l-2.17.72-1.86.62-1.76.52-3.52,1.14h-.1l-3.62,1.14-1.66.52-1.97.62-3.31,1.04-.21.1-3.62,1.14-1.45.52-2.17.72-.52.1-2.69.83-.41.1-3.62,1.14-1.24.41-2.38.72-2.9.93-.62.21-3.62,1.14-1.04.31-1.97.62-.62.21-2.79.93-.83.31-3,.93c-.21.1-.41.1-.62.21-.31.1-.62.21-.83.31-.93.41-1.86.83-2.79,1.35-.83.41-1.76.93-2.59,1.55-.31.21-.72.52-1.04.83-1.35,1.04-2.48,2.17-3.62,3.52-.21.21-.41.52-.62.83-1.14,1.55-2.17,3.21-3,5.07-1.35,3.11-2.07,6.42-2.07,9.94v82.39c0,2.59.72,5.07,2.07,7.14.83,1.35,2.07,2.59,3.42,3.62q.1.1.21.1c1.14.83,2.28,1.45,3.62,1.76,1.14.41,2.38.62,3.62.62,1.14,0,2.38-.1,3.62-.41.31-.1.62-.21.93-.31l2.59-.83,3.62-1.14,3.62-1.14,3.62-1.14,3.62-1.14,1.66-.52c.62-.21,1.24-.52,1.86-.83,1.35-.52,2.48-1.24,3.62-2.17,1.35-1.04,2.59-2.28,3.62-3.73,2.07-2.9,3.21-6.52,3.21-10.25v-58.48l.31-.1,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,3.42-1.14.21-.1,1.14-.41v67.07c0,2.48-.21,5.07-.62,7.45-.21.93-.31,1.76-.52,2.69-.83,3.52-1.97,6.83-3.62,9.94-1.04,2.07-2.28,4.04-3.62,6-1.14,1.55-2.28,3-3.62,4.45-1.14,1.24-2.38,2.38-3.62,3.42-1.14,1.04-2.38,1.86-3.62,2.79-1.14.83-2.38,1.55-3.62,2.28-1.14.62-2.38,1.24-3.62,1.76-.1,0-.21.1-.31.21-1.04.41-2.17.83-3.21,1.24-.31.1-.62.21-.93.31l-2.69.83-7.25,2.28-3.62,1.14-3.62,1.14-1.66.52c-.62.21-1.24.41-1.86.52-1.24.31-2.38.62-3.62.83-1.24.21-2.38.41-3.62.41-1.14.1-2.17.1-3.21.1h-.31c-1.24,0-2.38-.1-3.62-.21-1.24-.1-2.38-.31-3.62-.52s-2.38-.52-3.62-.93c-.72-.21-1.35-.41-2.07-.62-.52-.21-1.04-.41-1.55-.62-1.24-.52-2.38-1.04-3.62-1.66s-2.48-1.35-3.62-2.17c-.52-.31-1.04-.72-1.55-1.04-.72-.52-1.35-1.04-2.07-1.66-1.24-1.04-2.48-2.17-3.62-3.42-1.35-1.35-2.59-2.9-3.62-4.45-1.45-1.97-2.59-4.04-3.62-6.21-2.38-5.18-3.62-10.87-3.62-16.77v-82.39c0-6.62,1.24-13.04,3.62-18.94.52-1.35,1.04-2.59,1.66-3.83s1.24-2.38,1.86-3.52c.41-.83.93-1.55,1.45-2.28.62-.93,1.24-1.86,1.97-2.69,0-.1.1-.21.21-.21,1.14-1.45,2.28-2.79,3.62-4.14.52-.52.93-1.04,1.55-1.45.72-.72,1.35-1.24,2.07-1.86,1.04-.83,2.07-1.76,3.21-2.48.1-.1.31-.21.41-.31,1.14-.83,2.38-1.66,3.62-2.28.41-.21.83-.52,1.35-.72.72-.41,1.55-.83,2.28-1.24.1-.1.21-.1.41-.21.83-.41,1.76-.83,2.59-1.14.21-.1.41-.21.62-.21,1.04-.41,2.17-.83,3.21-1.14l.31-.1,1.04-.31,2.59-.83,2.79-.93.83-.31,3.62-1.14.83-.31,2.79-.83.62-.21,1.97-.62,1.04-.31,3.62-1.14.62-.21,2.9-.93,2.38-.72,1.24-.41,3.62-1.14.41-.1,2.69-.83.52-.1,2.17-.72,1.45-.41,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.66-.52,3.62-1.14h.1l3.52-1.14,1.76-.52,1.86-.62,2.17-.72h0l.52-.1,2.17-.72,1.45-.52,3.62-1.14.21-.1,3.31-1.04,1.97-.62,1.04-.41Z"})]}),He("path",{fill:"#000000",d:"m433.57,86.41c18.92,0,34.54,6.21,46.87,18.62,12.32,12.41,18.49,28.16,18.49,47.26s-6.16,34.85-18.49,47.26c-12.33,12.41-27.95,18.62-46.87,18.62h-35.41v50.51h-42.18V86.41h77.59Zm-6.51,97.38c8.5,0,15.49-2.95,20.96-8.85,5.47-5.9,8.2-13.45,8.2-22.65s-2.73-16.75-8.2-22.65c-5.47-5.9-12.46-8.85-20.96-8.85h-28.9v63.01h28.9Z"}),He("path",{fill:"#000000",d:"m568.18,272.05c-18.23,0-32.63-6.16-43.22-18.49-10.59-12.32-15.88-28.21-15.88-47.65s5.47-34.89,16.4-47.39c10.94-12.5,25.34-18.75,43.22-18.75,8.85,0,16.75,1.91,23.69,5.73,6.94,3.82,12.15,9.03,15.62,15.62v-17.96h39.58v125.5h-39.58v-17.7c-3.47,6.25-8.81,11.33-16.01,15.23-7.2,3.91-15.15,5.86-23.82,5.86Zm11.46-33.07c9.54,0,16.92-3.12,22.13-9.37,5.21-6.25,7.81-14.15,7.81-23.69s-2.6-17.18-7.81-23.43c-5.21-6.25-12.59-9.37-22.13-9.37-9.03,0-16.27,3.04-21.74,9.11-5.47,6.08-8.2,13.97-8.2,23.69s2.73,17.66,8.2,23.82c5.47,6.16,12.71,9.24,21.74,9.24Z"}),He("path",{fill:"#000000",d:"m765.53,143.17h39.84v121.59c0,19.44-5.99,34.54-17.97,45.3-11.29,9.72-26.65,14.58-46.08,14.58s-35.76-4.34-46.34-13.02c-10.24-8.68-15.45-19.7-15.62-33.07h40.1c.87,11.28,8.16,16.92,21.87,16.92,16.14,0,24.21-9.37,24.21-28.12v-19.53c-7.29,13.89-20.57,20.83-39.84,20.83-15.45,0-27.04-4.69-34.76-14.06-7.73-9.37-11.59-22.22-11.59-38.53v-72.9h39.83v66.91c0,18.05,7.38,27.08,22.13,27.08,7.81,0,13.8-2.82,17.97-8.46,4.17-5.64,6.25-13.41,6.25-23.3v-62.23Z"}),He("path",{fill:"#000000",d:"m839.47,268.66V86.41h111.44v35.41h-69.26v49.21h69.26v34.63h-69.26v63.01h-42.18Z"}),He("path",{fill:"#000000",d:"m1090.07,253.82c-12.59,12.5-29.47,18.75-50.64,18.75s-38.1-6.25-50.77-18.75c-12.67-12.5-19.01-28.47-19.01-47.91s6.33-35.36,19.01-47.78c12.67-12.41,29.59-18.62,50.77-18.62s38.05,6.21,50.64,18.62c12.58,12.41,18.88,28.34,18.88,47.78s-6.29,35.41-18.88,47.91Zm-50.64-15.1c9.2,0,16.49-3.03,21.87-9.11,5.38-6.07,8.07-13.97,8.07-23.69s-2.69-17.61-8.07-23.69c-5.38-6.07-12.67-9.11-21.87-9.11s-16.71,3.04-22,9.11c-5.3,6.08-7.94,13.97-7.94,23.69s2.64,17.62,7.94,23.69c5.29,6.08,12.63,9.11,22,9.11Z"}),He("path",{fill:"#000000",d:"m1131.86,268.66v-125.5h39.84v18.23c7.46-14.41,21-21.61,40.62-21.61,30.55,0,45.82,17.1,45.82,51.29v77.59h-40.1v-64.57c0-10.76-1.69-18.57-5.08-23.43-3.39-4.86-9.07-7.29-17.05-7.29-16.14,0-24.21,9.89-24.21,29.68v65.61h-39.84Z"}),He("path",{fill:"#000000",d:"m1353.43,237.68c5.55,0,10.15-.26,13.8-.78v31.76c-7.64,1.39-16.49,2.08-26.56,2.08-4.52,0-8.51-.26-11.98-.78-3.47-.52-7.38-1.69-11.72-3.52-4.34-1.82-7.9-4.3-10.68-7.42-2.78-3.13-5.17-7.64-7.16-13.54-2-5.9-2.99-12.84-2.99-20.83v-49.99h-19.79v-31.5h19.79v-37.23h39.84v37.23h28.38v31.5h-28.38v41.66c0,8.51,1.47,14.19,4.43,17.05,2.95,2.86,7.29,4.3,13.02,4.3Z"}),He("path",{fill:"#000000",d:"m1513.55,199.4c0,5.21-.35,11.02-1.04,17.44h-92.69c.35,8.16,3.12,14.49,8.33,19.01,5.21,4.52,12.24,6.77,21.09,6.77,12.15,0,19.96-3.91,23.43-11.72h39.05c-1.91,12.33-8.64,22.35-20.18,30.07-11.55,7.72-25.65,11.59-42.31,11.59-21.35,0-38.19-5.9-50.51-17.7-12.33-11.8-18.49-28.12-18.49-48.95s6.16-36.67,18.49-48.56c12.32-11.89,28.73-17.83,49.21-17.83s35.23,5.56,47.39,16.66c12.15,11.11,18.23,25.52,18.23,43.22Zm-93.73-7.29h54.42c-.18-8.33-2.52-14.75-7.03-19.27-4.52-4.51-11.02-6.77-19.53-6.77s-15.23,2.39-20.18,7.16c-4.95,4.78-7.51,11.07-7.68,18.88Z"})]});import{jsx as Ge,jsxs as Na}from"react/jsx-runtime";var Ra=({onToggleSideBar:e,isSidebarCollapsed:t})=>Ge("button",{onClick:()=>e(!t),className:"w-6 h-12 bg-[#EEF2FF] rounded-tr-md [clip-path:polygon(0%_0%,100%_0%,100%_60%,0%_100%,0%_100%)] mt-5 flex justify-center items-center pb-2 text-gray-700",children:t?Ge(uc,{}):Ge(pc,{})}),uc=e=>Na("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-left-open-icon lucide-panel-left-open",...e,children:[Ge("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),Ge("path",{d:"M9 3v18"}),Ge("path",{d:"m14 9 3 3-3 3"})]}),pc=e=>Na("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-panel-right-open-icon lucide-panel-right-open",...e,children:[Ge("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),Ge("path",{d:"M15 3v18"}),Ge("path",{d:"m10 15-3-3 3-3"})]});import{AnimatePresence as xc,motion as Rc}from"framer-motion";import{useEffect as Nc}from"react";import{FiChevronRight as Pc}from"react-icons/fi";import{useState as Pa,useEffect as Da}from"react";var Sa=(e,t)=>{let[r,o]=Pa(t),[a,n]=Pa(!1);return Da(()=>{n(!0);try{let i=localStorage.getItem(e);i&&o(JSON.parse(i))}catch(i){console.error("Error reading from localStorage:",i)}},[e]),Da(()=>{if(a)try{localStorage.setItem(e,JSON.stringify(r))}catch(i){console.error("Error writing to localStorage:",i)}},[e,r,a]),[r,o]};import{useCallback as vc,useContext as yc,useMemo as bc}from"react";import{createContext as mc,useMemo as fc}from"react";import{jsx as hc}from"react/jsx-runtime";var yr=mc(void 0),gc=({permissions:e,children:t})=>{let r=fc(()=>e,[e]);return hc(yr.Provider,{value:r,children:t})};var wc=e=>e?Array.isArray(e)?e:[e]:[],Cc=(e,t)=>{let{resource:r,action:o}=t,a=e.filter(i=>i.resource===r);return a.some(i=>i.action===o)?!0:o==="read"?a.some(i=>i.action==="write"):!1},La=()=>yc(yr),rr=e=>{let t=La(),r=vc(a=>!t||!a||t.some(i=>i.resource==="all"&&i.action==="administrator")?!0:wc(a).some(i=>Cc(t,i)),[t]);return{hasPermission:bc(()=>r(e),[e,r]),validatePermission:r}};import{Fragment as ka,jsx as ye,jsxs as Pt}from"react/jsx-runtime";var Dc={hidden:{opacity:0,height:0},visible:{opacity:1,height:"auto",transition:{duration:.3}}},Ta=({isIconsOnly:e,isSidebarCollapsed:t,onToggleSideBar:r,currentPath:o,onNavigate:a,collapseType:n,links:i,appConfig:l,isMobile:f})=>{let c="@sidebar-expanded-menus",[m,d]=Sa(c,{}),{validatePermission:u}=rr(),g=p=>{d(x=>({...x,[p]:!x[p]}))},C=p=>{if(!!p?.children?.length){e?(r(!t),d(P=>({...P,[p.id]:!0}))):g(p.id);return}a(`/${p.to}`)},v=p=>p.split("?")[0],h=p=>p?.children?.length?(p.children||[]).some(P=>v(o)===v(P.to)):v(o)===v(p.to);return Nc(()=>{let p={};i.forEach(x=>{x.children&&x.children.length>0&&x.children.some(P=>v(o)===v(P.to))&&(p[x.id]=!0)}),d(p)},[i,o,t]),ye("ul",{className:"w-[90%] space-y-2.5",children:i.map((p,x)=>{if(p.isHidden||p.permission&&!u(p.permission)||l?.hiddenRoutes?.includes(p.key??""))return null;let P=h(p),b=!!p?.children?.length,k=m[p.id];return Pt("div",{className:"mb-1 relative flex flex-col justify-center items-center",onClick:()=>C(p),children:[P&&!f&&(e||!b||!k)&&ye("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),ye("li",{id:p.id,className:s("cursor-pointer transition text-base duration-300 w-full text-[#00000066] font-medium rounded-md mx-auto max-w-full ml-4 p-2",{"bg-[#F6F8FF] text-primary-main ":P&&(!k||!t)},{"hover:bg-gray-100":!P&&(n!=="icons"||!t)},{"bg-white text-primary-main":P},{"flex justify-center text-primary-main !px-0 max-w-[70%]":e&&P,"flex justify-center !px-0 max-w-[70%]":e&&!P}),children:Pt("div",{className:s("flex items-center w-full",{"justify-center":e}),children:[ye(cr,{trigger:ye("span",{className:"w-6",onClick:()=>C(p),children:p.icon}),side:"right",hasArrow:!0,open:e?void 0:!1,children:p.name},x),(n!=="icons"||!t)&&Pt(ka,{children:[ye("span",{className:"px-3 text-nowrap",children:p.name}),b&&ye("span",{className:"ml-auto transition-transform duration-300",style:{transform:k?"rotate(90deg)":"rotate(0deg)"},children:ye(Pc,{size:18})})]})]})},p.to),b&&(n!=="icons"||!t)&&ye(xc,{children:k&&ye(Rc.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:Dc,className:"overflow-hidden w-full",children:Pt("ul",{className:" mt-1 relative ",children:[p.children?.map((y,S)=>{if(l?.hiddenRoutes?.includes(y.key??"")||y.isHidden||y.permission&&!u(y.permission))return null;let D=v(o)===v(y.to);return ye("div",{id:y.id,className:s("relative pl-12 bg-blue-100- mt-4"),children:Pt("li",{className:s("cursor-pointer transition text-base duration-300 px-3 w-full text-black font-medium opacity-40 rounded-md text-nowrap",{"bg-transparent opacity-100 text-primary-main":D},{"hover:text-primary-main":!D}),onClick:()=>a(`/${y.to}`),children:[y.name,D&&Pt(ka,{children:[!f&&ye("div",{className:"absolute bg-primary-main w-2 h-4 rounded-r-full -translate-y-1/2 top-1/2 left-0"}),ye("div",{id:"vertical-bar-child",className:"h-4 w-0.5 bg-primary-main absolute left-[30px] z-10 -translate-y-1/2 top-1/2 rounded-t-full rounded-b-full "})]})]})},y.key||S)}),ye("div",{id:"vertical-bar",className:"bg-white rounded-t-full rounded-b-full h-full w-[4px] absolute left-[29px] top-0"})]})})})]},x)})})};import{Fragment as Fc,jsx as Te,jsxs as br}from"react/jsx-runtime";var Tc=({isSidebarCollapsed:e,onToggleSideBar:t,isMobile:r,links:o,businessProps:a,currentPath:n,onNavigate:i,appConfig:l,collapseType:f,onLogoutClick:c,openSidebarIcon:m=Te(xa,{}),closedSidebarIcon:d=Te(wa,{}),nodeAfterSideBarLogo:u})=>{let g=Fa(()=>r?"hidden":f||(r?"hidden":"icons"),[r,f]),[C,v]=kc(!1),h=g==="icons"&&e,p=Lc(null),{businessList:x,activeBusiness:P,toggleAddBusinessDrawer:b,handleSetActiveBusiness:k}=a,E=M=>v(M),y=M=>{k?.(M),E(!1)},S=Fa(()=>g==="hidden"?m:e?d:m,[e,m,d,g]),D=r&&g==="hidden"&&e;return br(Fc,{children:[D&&Te("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-40 transition-all animate-in fade-in-15",onClick:()=>t(!1)}),br("div",{className:s("relative flex flex-row h-full",{"fixed inset-0 z-50 pointer-events-none":D}),children:[Te("div",{className:"absolute -right-[22px] top-0 z-20",children:g==="icons"&&Te(Ra,{isSidebarCollapsed:e,onToggleSideBar:t})}),br("aside",{id:"sidebar_menu",ref:p,className:s("sticky top-0 pt-4 h-[100dvh] max-h-[100dvh] bg-[#FBFBFB] overflow-hidden flex-col flex transition-all duration-300 w-64 gap-y-5",{"!fixed":g==="hidden","w-[311px]":e&&g!=="icons","w-[75px]":e&&g==="icons","w-[270px]":!e&&g==="icons","w-0 lg:w-0 pointer-events-none":!e&&g==="hidden","pointer-events-auto":e&&g==="hidden","left-0 top-0":r&&g==="hidden","-translate-x-full":!e&&r&&g!=="hidden","translate-x-0":e&&r&&g==="hidden"}),children:[br("div",{className:s("flex items-center py-2 justify-center w-full",{"justify-between px-2":r}),children:[Te("section",{className:s({"ml-2":r,"-ml-16":!e}),children:S}),g==="hidden"&&Te("div",{onClick:()=>t(!1),className:"flex items-center gap-2 text-3xl cursor-pointer mr-5",children:Te(Sc,{size:24,className:"text-black hover:opacity-60"})})]}),u,Te("div",{className:"flex-1 overflow-y-auto px-0 min-h-0",children:Te(Ta,{isIconsOnly:h,collapseType:g,currentPath:n,isSidebarCollapsed:e,links:o,onNavigate:i,onToggleSideBar:t,appConfig:l,isMobile:r})}),Te("div",{className:"w-full mt-auto pb-5 shrink-0",children:Te(ya,{activeBusiness:P,handleSwitchBusiness:y,isBusinessShown:C,toggleAddBusinessDrawer:b,toggleShowBusiness:E,businesses:x||[],iconOnly:g==="icons"?e:!1,onLogoutClick:c,isMobile:r,onToggleSideBar:t,collapseType:g})})]})]})]})};import{jsx as co}from"react/jsx-runtime";var Ec=({status:e,variant:t,className:r})=>co("div",{children:co("div",{className:s("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:co("p",{children:e.replace("-"," ")})})});import{Loader as bd}from"lucide-react";import{jsx as Ea,jsxs as Ac}from"react/jsx-runtime";var Aa=({tableBulkActions:e,selectedRows:t,isMobile:r=!1,id:o="bulk_row_actions"})=>{let a=t.length;return Ea("div",{className:s(" border-t border-gray-200 px-4 py-3","flex items-center justify-between",r&&"flex-col gap-2"),id:o,children:Ea("div",{className:s("flex gap-2",r&&"w-full justify-start flex-wrap"),children:e.map((n,i)=>Ac(oe,{variant:n.variant||"outlined",size:"sm",className:s("flex ietems-center justify-center",n.className),onClick:()=>n.onClick(t),leftNode:n.icon,disabled:n.disabled||a===0,id:`${o}_action_${i}`,children:[n.label," ",n.showCount!==!1&&a]},i))})})};import{ChevronLeftIcon as Ic,ChevronRightIcon as Bc}from"lucide-react";import{jsx as uo}from"react/jsx-runtime";var Mc=({page:e,currentPage:t,onClick:r,id:o="page-button"})=>typeof e=="string"?uo("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):uo("button",{onClick:r,id:`${o}-${e}`,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}),Ma=({totalPages:e,currentPage:t,handlePageClick:r,id:o})=>{let n=()=>{let c=Math.floor(1.5),m=Math.max(1,t-c),d=Math.min(e,m+3-1);return d>e&&(m=Math.max(1,e-3+1),d=e),{start:m,end:d}},{start:i,end:l}=n(),f=[];return i>1&&f.push(1),i>2&&f.push("..."),f.push(...Array.from({length:l-i+1},(c,m)=>i+m)),l<e-1&&f.push("..."),l<e&&f.push(e),f.map((c,m)=>uo(Mc,{page:c,currentPage:t,id:o,onClick:typeof c=="number"?()=>r(c):void 0},m))};import{jsx as Dt,jsxs as po}from"react/jsx-runtime";var mo=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:o=0,totalItems:a=0,id:n="pagination"})=>{let i=c=>{c>=1&&c<=t&&r?.(c)},l=o===0?1:o*(e-1)+1,f=e===t?a:Math.min(l+o-1,a);return po("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[a&&Dt("section",{className:"text-[#717171] text-[12px]",children:po("p",{className:"",children:["Showing ",l," - ",f," of ",a]})}),Dt("div",{className:"flex items-center justify-center sm:justify-end ",children:po("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Dt("button",{onClick:()=>i(e-1),id:`${n}-prev-button`,disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Dt(Ic,{className:"size-5"})}),Ma({currentPage:e,totalPages:t,handlePageClick:i,id:`${n}-page-button`}),Dt("button",{onClick:()=>i(e+1),id:`${n}-next-button`,disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Dt(Bc,{className:"size-5"})})]})})]})};import{flexRender as Ia}from"@tanstack/react-table";import{jsx as Ue,jsxs as Oc}from"react/jsx-runtime";var Ba=({table:e,isMobile:t,onRowClick:r,id:o})=>Ue("div",{className:s("relative w-full rounded-b border-0",{}),children:Oc("table",{id:o??"table",className:"w-full overflow-x-scroll",children:[Ue("thead",{children:e.getHeaderGroups().map(a=>Ue("tr",{className:s(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.headers.map(n=>Ue("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:Ue("div",{className:s("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:Ia(n.column.columnDef.header,n.getContext())})},n.id))},a.id))}),Ue("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(a=>Ue("tr",{className:s("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(a):{},children:a.getVisibleCells().map(n=>Ue("td",{className:s("",{}),children:Ue("div",{className:s("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:Ia(n.column.columnDef.cell,n.getContext())})},n.id))},a.id))})]})});import{Download as gd,ListFilter as hd,RotateCw as vd}from"lucide-react";import{useEffect as Vc,useState as Hc}from"react";var Oa=()=>{let[e,t]=Hc(!1);return Vc(()=>(t(!0),()=>t(!1)),[]),{mounted:e,MounClient:o=>e?{children:o}:null}};import{ListFilter as ud}from"lucide-react";import{useEffect as pd,useState as md}from"react";import{jsx as $c}from"react/jsx-runtime";var Va=({count:e=0})=>e===0?null:$c("div",{className:"flex rounded-s-md bg-primary-main p-1 text-white text-sm px-2.5",children:e});import{PopoverClose as oi}from"@radix-ui/react-popover";import{useCallback as ad}from"react";import{useForm as id}from"react-hook-form";var St=class{static cleanFilters(t){return Object.fromEntries(Object.entries(t??{}).filter(([,r])=>r!=null&&r!==""))}static hasValue(t){return t!=null&&t!==""&&(Array.isArray(t)?t.length>0:!0)}static getRemovedKeys(t,r){return Object.keys(t).filter(o=>!(o in r)||r[o]===void 0||r[o]===null||r[o]==="")}static getUpdatedKeys(t,r){return Object.keys(r).filter(o=>r[o]!==t[o])}};import{jsx as Ha}from"react/jsx-runtime";var $a=({id:e,fieldKey:t,form:r,onClear:o})=>{let a=r.watch(t);return St.hasValue(a)?Ha("div",{className:"flex justify-end mt-1",children:Ha("button",{onClick:()=>o(t),type:"button",className:"text-gray-500 text-[10px] font-medium p-0.5 px-1.5 border rounded-md hover:bg-gray-50 transition-colors",id:`${e}-${t}-clear-button`,children:"Clear"})}):null};import{Controller as Yc}from"react-hook-form";import{format as Zc}from"date-fns";import*as be from"react";import{ChevronDown as _c,ChevronLeft as zc,ChevronRight as Wc,ChevronUp as Gc}from"lucide-react";import*as _a from"react";import{DayPicker as Uc}from"react-day-picker";import{jsx as wr}from"react/jsx-runtime";function za({value:e,onChange:t,options:r,...o}){let[a,n]=_a.useState(""),i=r?.map(d=>({label:d.label,value:d.value.toString()}))??[],l=a.trim().toLowerCase(),f=l?i.filter(d=>d.label.toLowerCase().includes(l)):i,c=i.find(d=>d.value===e?.toString()),m=d=>{n(""),t?.({target:{value:d}})};return wr("div",{onPointerDown:d=>d.stopPropagation(),children:wr(ot,{className:"!border-0 !max-w-max !min-w-max text-sm font-medium h-8",options:f,value:c,onChange:d=>m(d.value),inputValue:a,onInputValueChange:n,shouldFilter:!1,modal:!0,id:`${o.id}-select`})})}za.displayName="CalendarDropdown";function fo({className:e,classNames:t,showOutsideDays:r=!0,...o}){return wr(Uc,{showOutsideDays:r,className:s("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-2 relative",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium hidden",dropdowns:"flex justify-center gap-1 !px-4",nav:"space-x-1 flex items-center justify-between -top-7 relative",button_previous:s(ce({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute left-1"),button_next:s(ce({variant:"outlined"}),"!h-7 !w-7 bg-transparent !text-black !border-0 p-0 opacity-50 hover:opacity-100 absolute right-1"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"!h-9 !w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])>button]:bg-primary-main first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 [&[aria-selected=true]>button]:bg-primary-main [&[aria-selected=true]>button]:text-white",day_button:s(ce({variant:"primary"}),"!h-9 !w-9 p-0 font-normal aria-selected:opacity-100 bg-white [&:has([aria-selected])]:!bg-primary-main [&:has([aria-selected])]:text-white text-black/60"),range_end:"day-range-end",selected:"!bg-primary-main !text-white hover:bg-primary-main hover:text-primary-foreground focus:bg-primary-main focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:a,...n})=>wr(a==="left"?zc:a==="right"?Wc:a==="up"?Gc:_c,{className:"h-4 w-4",...n}),Dropdown:za},disabled:a=>a>new Date||a<new Date("1900-01-01"),...o})}fo.displayName="Calendar";import{jsx as q,jsxs as Ze}from"react/jsx-runtime";var Ga=be.forwardRef(({value:e,onClick:t,error:r,status:o,id:a},n)=>q("div",{className:"relative mt-2 rounded-md shadow-sm !w-full",children:Ze("button",{className:s(ne({status:o}),"flex items-center gap-2 text",{"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-purple-600":!r,"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500":r}),onClick:t,ref:n,id:a,type:"button",children:[Ze("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-calendar-icon lucide-calendar",children:[q("path",{d:"M8 2v4"}),q("path",{d:"M16 2v4"}),q("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),q("path",{d:"M3 10h18"})]}),e||"Select a date"]})}));Ga.displayName="DateInputButton";var Kc=(e,t,r)=>{if(!e)return t;let o=new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});if(r){let a=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0");return`${o} at ${a}:${n}`}return o};function jc({value:e,className:t,placeholder:r="Pick a date",showTime:o,...a}){return q(ee,{asChild:!0,className:s("cursor-pointer",t),children:q(Ga,{value:Kc(e,r,o),id:a.id,error:a?.error})})}function Xc({children:e,captionLayout:t="dropdown",fromYear:r,toYear:o,disableDate:a,modal:n,closeOnSelect:i=!1,showTime:l,onSelectTime:f,minDate:c,...m}){let[d,u]=be.useState(!1),g=m.startMonth??(r?new Date(r,0):void 0),C=m.endMonth??(o?new Date(o,11):void 0),v=m.selected,[h,p]=be.useState(v);be.useEffect(()=>{p(v)},[v]),be.useEffect(()=>{d&&!h&&c&&p(c)},[d,h,c]);let x=be.useMemo(()=>{let E=Array.from({length:24},(S,D)=>({label:D.toString().padStart(2,"0"),value:D.toString()}));return!c||!h||!(h.toDateString()===c.toDateString())?E:E.filter(S=>parseInt(S.value,10)>=c.getHours())},[c,h]),P=be.useMemo(()=>{let E=Array.from({length:60},(S,D)=>({label:D.toString().padStart(2,"0"),value:D.toString()}));return!c||!h||!(h.toDateString()===c.toDateString())?E:h.getHours()===c.getHours()?E.filter(S=>parseInt(S.value,10)>=c.getMinutes()):E},[c,h]),b=(E,y,S,D)=>{if(!E)return;let M=new Date(E);h&&(M.setHours(parseInt(h.getHours().toString(),10)),M.setMinutes(parseInt(h.getMinutes().toString(),10)),M.setSeconds(10),c&&M.toDateString()===c.toDateString()&&M<c&&(M.setHours(c.getHours()),M.setMinutes(c.getMinutes()))),m.onSelect?.(M,y,S,D),i&&u(!1)},k=(E,y)=>{let S=h?new Date(h):new Date,D=new Date(S);E==="hours"?D.setHours(parseInt(y,10)):D.setMinutes(parseInt(y,10)),f?.(D)};return Ze(ge,{modal:n,open:a?!1:d,onOpenChange:u,children:[e,Ze(de,{portal:!1,align:"start",className:"w-auto p-0 overflow-hidden",children:[q(fo,{id:`${m.id}-calendar-content`,mode:"single",...m,startMonth:g,endMonth:C,captionLayout:t,showOutsideDays:!1,onSelect:b,navLayout:"after"}),l&&Ze("div",{className:"flex items-center gap-2 px-4 pb-4 pt-2 border-t bg-gray-50/30",children:[Ze("div",{className:"flex flex-col gap-1.5 flex-1",children:[q("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Hours"}),q(ot,{options:x,value:{value:h?.getHours().toString()??"0",label:h?.getHours().toString().padStart(2,"0")??"00"},onChange:E=>k("hours",E.value),className:"!min-w-[70px]",modal:!0})]}),Ze("div",{className:"flex flex-col gap-1.5 flex-1",children:[q("span",{className:"text-[10px] uppercase font-bold text-gray-500 tracking-wider",children:"Minutes"}),q(ot,{options:P,value:{value:h?.getMinutes().toString()??"0",label:h?.getMinutes().toString().padStart(2,"0")??"00"},onChange:E=>k("minutes",E.value),className:"!min-w-[70px]",modal:!0})]})]})]})]})}var Wa=(e,t="yyyy-MM-dd")=>e?t==="iso"?new Date(e).toISOString():Zc(new Date(e),t):"N/A",go=({label:e,optional:t,onChange:r,error:o,helpText:a,value:n,maxDate:i,closeOnSelect:l=!1,modal:f=!1,minDate:c,showTime:m=!1,id:d})=>{let u=be.useMemo(()=>i?new Date(i):new Date("2099-12-31"),[i]),g=c?new Date(c):new Date("1900-01-01"),[C,v]=be.useState(n?new Date(n):void 0),h=p=>{let x=new Date(p.getFullYear(),p.getMonth(),p.getDate()),P=new Date(g.getFullYear(),g.getMonth(),g.getDate()),b=new Date(u.getFullYear(),u.getMonth(),u.getDate());return x<P||x>b};return be.useEffect(()=>{n&&v(new Date(n))},[n]),Ze("div",{className:"block w-full",children:[e&&Ze("div",{className:"flex justify-between w-full",children:[q(Z,{className:"block text-sm font-medium mb-0 text-pallet-text-white-black",children:e}),t&&q("span",{className:"text-sm leading-6 text-gray-500",id:"email-optional",children:"Optional"})]}),q(Xc,{selected:C,onSelect:p=>{let x=p?Wa(p,m?"iso":"yyyy-MM-dd"):"";r(x)},onSelectTime:p=>{let x=Wa(p,"iso");r(x)},disabled:h,startMonth:g,endMonth:u,closeOnSelect:l,showTime:m,minDate:g,modal:f,id:d,children:q("div",{children:q(jc,{id:d,status:o?"error":"default",value:n?new Date(n):void 0,showTime:m})})}),o&&q("p",{className:"mt-2 text-sm text-red-600",id:`${d}-error`,children:o}),a&&q("p",{className:"mt-2 text-sm text-gray-500",id:`${d}-description`,children:a})]})};import{jsx as Ua}from"react/jsx-runtime";var Za=({filter:e,id:t,form:r})=>Ua(Yc,{name:e.key,control:r.control,render:({field:o})=>Ua(go,{onChange:o?.onChange,value:o?.value,label:e?.label,id:`${t}-${e.key}`})});import{Controller as qc}from"react-hook-form";import{jsx as Ka}from"react/jsx-runtime";var ja=({filter:e,id:t,form:r})=>Ka(qc,{name:e.key,control:r.control,render:({field:{value:o,onChange:a},formState:{errors:n}})=>Ka(ot,{label:e?.label,options:e?.options,value:e?.options?.find(i=>String(i?.value)===String(o)),onChange:i=>a(i?.value),error:n?.[e?.key]?.message,modal:!0,placeholder:e?.placeholder,className:"!h-10",id:`${t}-${e.key}`,hideSearch:!!(e?.hideSearch??!0)})});import{Controller as Qc}from"react-hook-form";import{jsx as Xa}from"react/jsx-runtime";var Ya=({filter:e,id:t,form:r})=>Xa(Qc,{name:e.key,control:r.control,render:({field:o,formState:a})=>Xa(ae,{error:a?.errors?.root?.message,placeholder:e?.placeholder,id:`${t}-${e.key}`,...o,...e})});import{Controller as Jc}from"react-hook-form";import{v4 as qa}from"uuid";import*as ho from"react";import*as at from"@radix-ui/react-radio-group";import{jsx as Cr}from"react/jsx-runtime";var xr=ho.forwardRef(({className:e,...t},r)=>Cr(at.Root,{className:s("grid gap-2",e),...t,ref:r}));xr.displayName=at.Root.displayName;var Rr=ho.forwardRef(({className:e,...t},r)=>Cr(at.Item,{ref:r,className:s(`aspect-square h-4 w-4 rounded-full border border-[#808080] text-primary-main ring-offset-background focus-visible:outline-none
|
|
14
14
|
focus-visible:border-purplring-purple-200 focus-visible:!ring-primary-main focus-visible:!ring-status-success-bg focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-purple-200
|
|
15
|
-
focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:Cr(at.Indicator,{className:"rounded-full flex items-center justify-center",children:Cr("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));Rr.displayName=at.Item.displayName;import{Fragment as Jc,jsx as Lt,jsxs as Ya}from"react/jsx-runtime";var qa=({filter:e,id:t,form:r})=>Lt(qc,{name:e.key,control:r.control,render:({field:{value:o,onChange:a}})=>Ya(Jc,{children:[Lt(Z,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:e?.label}),Lt(xr,{onValueChange:a,defaultValue:o,"aria-label":e?.label,id:`${t}-${e.key}`,children:Lt("div",{className:"flex items-center gap-2",children:e?.options?.map(n=>Ya("div",{className:"flex items-center space-x-2",children:[Lt(Rr,{value:n?.value,id:`${t}-${e.key}-${n?.value}`}),Lt("label",{htmlFor:`${t}-${e.key}-${n?.value}`,className:"text-xs",children:n?.label})]},Xa()))})},`${Xa()}-${o}`)]})});import{jsx as or,jsxs as Qc}from"react/jsx-runtime";var Ja=({filter:e,id:t,form:r,onClear:o})=>Qc("div",{children:[(()=>{switch(e.type){case"input":return or(ja,{filter:e,id:t,form:r});case"drop-down":return or(Za,{filter:e,id:t,form:r});case"radio":return or(qa,{filter:e,id:t,form:r});case"date":return or(Ga,{filter:e,id:t,form:r});default:return null}})(),o&&or($a,{id:t,fieldKey:e.key,form:r,onClear:o})]},e.key);import{useEffect as ed}from"react";var Qa=(e,t)=>{ed(()=>{if(!t)return;let r=e(o=>{t(o)});return()=>r.unsubscribe()},[t,e])};import{useEffect as td,useRef as rd}from"react";var ei=(e,{getValues:t,setValue:r})=>{let o=rd(void 0);td(()=>{if(!e)return;let a=t(),n=o.current||{};console.log("useFormSync:",{values:e,prevValues:n,currentValues:a}),Object.entries(e).forEach(([i,l])=>{l!==n[i]&&l!==a[i]&&r(i,l,{shouldValidate:!0,shouldDirty:!0})}),Object.keys(n).forEach(i=>{!(i in e)&&a[i]&&r(i,"",{shouldValidate:!0,shouldDirty:!0})}),o.current=e},[e,t,r])};import{jsx as Nr,jsxs as ri}from"react/jsx-runtime";var oi=({filters:e,values:t,onChange:r,onApply:o,onReset:a,onClearApplied:n,setAppliedFilters:i,id:l="filter-popover"})=>{let f=nd({defaultValues:t||{},mode:"all"});ei(t,f),Qa(f.watch,r);let c=g=>{let C=St.cleanFilters(g);o?.(C),i?.(C)},m=()=>{f.reset({}),r?.({}),c({}),a?.()},u=g=>c(g),d=od(g=>{f.setValue(g,"",{shouldValidate:!0,shouldDirty:!0});let C={...f.watch()};delete C[g],r?.(C),n?.(g)},[f,r,n]);return ri("form",{onSubmit:f.handleSubmit(u),children:[Nr("div",{className:"space-y-2 max-h-[350px] overflow-y-auto pr-2 -mr-2",children:e.map(g=>Nr(Ja,{filter:g,id:l,form:f,onClear:d},g.key))}),ri("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[Nr(ti,{onClick:m,className:s(ce({variant:"outlined",size:"sm"})),type:"button",id:`${l}-reset-button`,children:"Reset"}),Nr(ti,{className:s(ce({size:"sm"})),type:"submit",id:`${l}-submit-button`,children:"Submit"})]})]})};import{create as ad}from"zustand";var Pr="filter_",id=e=>{ni();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(r=>{t.set(`${Pr}${r}`,e[r])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},ni=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((r,o)=>{o.startsWith(Pr)&&t.push(o)}),t.forEach(r=>e.delete(r)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},sd=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((r,o)=>{o.startsWith(Pr)&&(t[o.replace(Pr,"")]=r)}),t},ld=()=>ad()(e=>({filters:sd(),resetFilters:()=>{e({filters:null}),ni()},upDateFilter:t=>e(r=>{let o;return typeof t=="function"?o=t(r.filters):o={...r?.filters,...t},id(o),{filters:o}})})),vo=()=>ld();import{jsx as kt,jsxs as pd}from"react/jsx-runtime";var bo=({filters:e,setAppliedFilters:t,isOpen:r=!1,onChange:o,values:a,id:n="filter-popover"})=>{let{mounted:i}=Oa(),l=vo(),{filters:f,upDateFilter:c,resetFilters:m}=l(),[u,d]=ud({});dd(()=>{if(f&&Object.keys(f).length>0){let h={...a,...f};d(h),t?.(h),o?.(h);return}a&&Object.keys(u).length===0&&d(a)},[]);let g=h=>{d(h),c(h),t?.(h)},C=()=>{d({}),m(),t?.({})},v=h=>{let p={...u};delete p[h],d(p),c(()=>p),t?.(p)};return i?kt("div",{className:"",children:kt(De,{id:`${n}-filter-popover`,defaultOpen:r,trigger:pd("button",{title:"Filter",className:s("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",ce({variant:"outlined",size:"sm"})),type:"button",children:[kt("span",{className:"!px-[10px] !py-[8px]",children:kt(cd,{className:"w-4 h-4",size:5})}),kt(Va,{count:Object.keys(u).length})]}),contentClassName:"!border border-gray-200 pt-2",children:kt(oi,{filters:e,values:a??u,setAppliedFilters:t,id:n,onChange:o,onApply:g,onReset:C,onClearApplied:v})})}):null};import{Fragment as hd,jsx as ue,jsxs as Dr}from"react/jsx-runtime";var yo=({onRefetch:e,search:t,FilterMenu:r,ExtraNode:o,onExport:a,download:n,isRefetching:i,filterListOptions:l=[],filterValues:f,setAppliedFilters:c,onFilterChange:m,id:u="table-toolbar"})=>{let d=C=>{t?.onSearch?.(C)},g=()=>{try{e?.()}catch(C){console.error("Error while refetching data",C)}};return ue(hd,{children:(e||t?.enabled||r||o||a)&&Dr("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[ue("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:Dr("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&ue("section",{className:"sm:w-56",children:ue(Xr,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:d,debounce:t?.debounceRate,id:`${u}-search-input`})}),Dr("div",{className:" flex gap-2",children:[e&&ue(oe,{onClick:g,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${u}-refetch-button`,children:ue(gd,{className:s("w-4 h-4",{"animate-spin":i}),size:5})}),l?.length?ue(bo,{setAppliedFilters:c,filters:l,values:f,id:`${u}-filter-popover`,onChange:m}):null,r&&ue(De,{id:`${u}-deprecated-filter-popover`,trigger:ue("button",{title:"Filter",className:s("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ce({variant:"outlined",size:"sm"})),children:ue(fd,{className:"w-4 h-4",size:5})}),children:r})]})]})}),ue("div",{className:"flex items-start flex-col gap-2 justify-center",children:ue("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:Dr("div",{className:"flex gap-2",children:[o&&o,a&&ue(oe,{variant:"primary",onClick:a,size:"sm",id:`${u}-export-button`,children:"Export"}),n?.enabled&&ue(oe,{variant:"primary",leftNode:ue(md,{className:"w-4 h-5",size:5}),onClick:n?.onDownload,id:n.buttonId,size:"sm",isLoading:n?.isDownloading,children:n?.buttonText})]})})})]})})};import{jsx as $e,jsxs as ai}from"react/jsx-runtime";var bd=({table:e,isMobile:t=!1,onRowClick:r,id:o="table",onRefetch:a,isRefetching:n,FilterMenu:i,ExtraNode:l,onExport:f,search:c={enabled:!1,debounceRate:700},download:m={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:d,filterListOptions:g,filterValues:C,setAppliedFilters:v,onFilterChange:h,tableBulkActions:p,emptyDataMessage:x})=>{let P=p&&Array.isArray(p.selectedRows)&&p.selectedRows.length>0;return ai("div",{className:s("relative w-full rounded-b border-0 overflow-x-auto"),children:[$e(yo,{onRefetch:a,search:c,FilterMenu:i,ExtraNode:l,onExport:f,download:m,isRefetching:n,filterListOptions:g,filterValues:C,setAppliedFilters:v,id:o,onFilterChange:h}),P&&p?.actions?.length&&$e(Aa,{tableBulkActions:p.actions,selectedRows:p.selectedRows??[],isMobile:t,id:`${o}-bulk-actions`}),$e("main",{className:"w-full overflow-x-auto mt-5",children:u?ai("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[$e(vd,{size:20,className:"animate-spin"}),$e("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?$e("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:x||$e("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):$e("div",{className:"flex flex-col gap-2",children:$e(Ba,{table:e,isMobile:t,onRowClick:r,id:o})})}),!u&&d?.enabled&&e.getRowModel().rows.length>0&&$e(mo,{...d,currentPage:d?.currentPage??1,totalPages:d?.totalPages??Math.ceil((d?.totalItems??0)/Math.max(d?.itemsPerPage??1,1))??1,onPageChange:y=>d?.onPageChange?.(y),id:o})]})};import{Fragment as ii,jsx as si}from"react/jsx-runtime";var yd=({permission:e,children:t})=>{let{hasPermission:r}=rr(e);return e?si(ii,{children:r?t:null}):si(ii,{children:t})};import*as it from"@radix-ui/react-tabs";import{jsx as pt,jsxs as wo}from"react/jsx-runtime";function wd({tabs:e,defaultValue:t,onChange:r}){return wo(it.Root,{defaultValue:t,onValueChange:r,className:"flex flex-col items-start justify-start gap-2.5",children:[wo(Le,{className:"w-full",children:[pt(pr,{className:"z-[1000]",orientation:"horizontal"}),pt(it.List,{className:"my-2 border-b border-gray-300 items-center flex",children:e.map(o=>wo(it.Trigger,{className:"flex items-center gap-2 whitespace-nowrap rounded-t-md px-5 py-2 relative transition-all group hover:!bg-gray-200/50 dark:hover:!bg-gray-200/10 data-[state=active]:dark:hover:!bg-gray-200 data-[state=active]:hover:!bg-gray-200 data-[state=active]:bg-gray-200 before:absolute before:bottom-[0px] before:left-0 before:h-[2px] dark:before:h-[0px] before:w-full before:rounded-sm data-[state=active]:before:!bg-texts-50 before:content-['']",value:o?.key,children:[pt("p",{className:"text-center text-sm leading-5 font-normal text-gray-500 group-data-[state=active]:font-medium group-data-[state=active]:text-gray-800",children:pt("span",{children:o.title})}),o.count&&pt("div",{className:"bg-gray-300 group-data-[state=active]:bg-texts-50 group-data-[state=active]:text-white text-texts-50 text-xs font-medium me-2 px-2.5 py-0.5 rounded-full",children:pt("span",{children:o.count})})]},o?.key))})]}),e.map(o=>pt(it.Content,{value:o?.key,className:"w-full",children:o.content},o?.key))]})}import{BiInfoCircle as xd,BiX as ui}from"react-icons/bi";import{cva as Cd}from"class-variance-authority";var ci=Cd("relative rounded-lg border px-4 py-4 text-sm",{variants:{variant:{default:"border-blue-200 bg-blue-50 text-blue-800",danger:"border-red-200 bg-red-50 text-red-800",success:"border-green-200 bg-green-50 text-green-800",pending:"border-yellow-200 bg-yellow-50 text-yellow-800"}},defaultVariants:{variant:"default"}}),li={default:{primary:"",outlined:""},danger:{primary:"bg-red-600 hover:bg-red-600/80 text-white border-red-600",outlined:"border-red-600 text-red-600 hover:bg-red-50"},success:{primary:"bg-green-600 hover:bg-green-600/80 text-white border-green-600",outlined:"border-green-600 text-green-600 hover:bg-green-50"},pending:{primary:"bg-yellow-600 hover:bg-yellow-600/80 text-white border-yellow-600",outlined:"border-yellow-600 text-yellow-600 hover:bg-yellow-50"}},di=(e,t)=>(li[e]??li.default)[t];import{jsx as Ke,jsxs as nr}from"react/jsx-runtime";var Rd=({title:e,message:t,variant:r="default",icon:o,action:a,dismissible:n=!1,onDismiss:i,isOpen:l=!0,align:f="start",classNames:c})=>{if(!l)return null;let m=a?.variant??"primary",u=di(r??"default",m),d=f==="center";return nr("div",{className:s(ci({variant:r}),c?.root),children:[n&&Ke("button",{type:"button",onClick:i,className:"absolute top-3 right-3 opacity-60 transition-opacity hover:opacity-100 sm:hidden","aria-label":"Dismiss",id:"feature_banner_dismiss_button_mobile",children:Ke(ui,{size:20})}),nr("div",{className:s("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",d&&"sm:items-center"),id:"feature_banner_container",children:[nr("div",{className:s("flex items-start gap-3 pr-6 sm:pr-0",d&&"sm:items-center"),id:"feature_banner_content_wrapper",children:[Ke("span",{className:s("shrink-0 mt-0.5",d&&"sm:mt-0",c?.icon),id:"feature_banner_icon",children:o??Ke(xd,{size:18})}),nr("div",{className:"min-w-0",id:"feature_banner_content",children:[Ke("p",{className:s("font-semibold",c?.title),id:"feature_banner_title",children:e}),t&&Ke("p",{id:"feature_banner_message",className:s("mt-1 text-sm opacity-90 break-words",c?.message),children:t})]})]}),(a||n)&&nr("div",{className:s("flex flex-col items-end gap-3 sm:flex-row sm:items-center",d&&"sm:items-center"),id:"feature_banner_actions_wrapper",children:[a&&Ke(oe,{variant:m,type:"button",onClick:a.onClick,className:s(u,c?.action),id:"feature_banner_action_button",children:a.label}),n&&Ke("button",{type:"button",onClick:i,className:"hidden sm:flex opacity-60 transition-opacity hover:opacity-100","aria-label":"Dismiss",id:"feature_banner_dismiss_button",children:Ke(ui,{size:20})})]})]})]})};import zd from"@tiptap/extension-font-family";import Wd from"@tiptap/extension-link";import Gd from"@tiptap/extension-underline";import{EditorContent as Ud,useEditor as Zd}from"@tiptap/react";import Kd from"@tiptap/starter-kit";import Ro from"clsx";import $d from"clsx";import{Bold as Nd,Italic as Pd,List as Dd,ListOrdered as Sd,Quote as Ld,Strikethrough as kd,Underline as Td}from"lucide-react";import{jsx as Fd}from"react/jsx-runtime";var Ed=()=>Fd("span",{className:"text-sm font-semibold",children:"H1"}),mt={bold:{icon:Nd,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),title:"Bold"},italic:{icon:Pd,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),title:"Italic"},underline:{icon:Td,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),title:"Underline"},strike:{icon:kd,action:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),title:"Strikethrough"},heading1:{icon:Ed,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1}),title:"Heading 1"},bulletList:{icon:Dd,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),title:"Bullet List"},orderedList:{icon:Sd,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),title:"Numbered List"},blockquote:{icon:Ld,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),title:"Quote"},textStyle:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Text Style"},link:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Link"}};import Ad from"clsx";import{jsx as pi}from"react/jsx-runtime";var mi=({editor:e,icon:t,action:r,isActive:o,disabled:a,title:n,className:i})=>pi("button",{type:"button",onClick:()=>r(e),disabled:a??!e.can().chain().focus().run(),title:n,className:Ad("p-2 rounded hover:bg-gray-100 transition",{"opacity-100 text-black":o(e),"opacity-40 text-gray-500":!o(e),"cursor-not-allowed":a},i),children:pi(t,{width:18,height:18})});import Md from"clsx";import{Link as Id}from"lucide-react";import{useCallback as Sr,useMemo as Co,useState as fi}from"react";import{Fragment as Bd,jsx as je,jsxs as xo}from"react/jsx-runtime";var gi=({editor:e})=>{let[t,r]=fi(!1),[o,a]=fi(""),n=Co(()=>!e.state.selection.empty,[e.state.selection]),i=Co(()=>e.isActive("link"),[e]),l=Co(()=>n||i,[n,i]),f=Sr(()=>{o.trim()&&(e.chain().focus().extendMarkRange("link").setLink({href:o.trim()}).run(),r(!1),a(""))},[e,o]),c=Sr(()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),r(!1),a("")},[e]),m=Sr(d=>{let g=e.getAttributes("link").href;a(g||""),r(d)},[l,e]),u=Sr(d=>{d.key==="Enter"&&(d.preventDefault(),f()),d.key==="Escape"&&r(!1)},[f]);return je(De,{open:t,onOpenChange:m,trigger:je("div",{className:Md("",{"opacity-100 text-black":t,"opacity-40 text-gray-500":!t}),title:l?e.isActive("link")?"Edit link":"Add link":"Select text to add a link",children:je(Id,{width:18,height:18})}),contentClassName:"w-80 p-4",align:"start",children:je("div",{className:"space-y-4",children:!n&&!i?je("div",{className:"text-sm text-gray-500 bg-gray-50 rounded p-3 border border-gray-200",children:"Please select some text in the editor to apply a link."}):xo(Bd,{children:[xo("div",{children:[je("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Link URL"}),je(ae,{type:"url",value:o,onChange:d=>a(d.target.value),placeholder:"https://example.com",autoFocus:!0,onKeyDown:u})]}),xo("div",{className:"flex justify-between space-x-2",children:[je(oe,{type:"button",onClick:f,disabled:!o.trim(),variant:"primary",size:"sm",className:"flex-1",children:e.isActive("link")?"Update Link":"Add Link"}),e.isActive("link")&&je(oe,{type:"button",onClick:c,variant:"neutral",size:"sm",className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition text-sm font-medium",children:"Remove"})]})]})})})};import Od from"clsx";import{ChevronDown as Vd}from"lucide-react";import{useState as Hd}from"react";import{jsx as Tt,jsxs as hi}from"react/jsx-runtime";var vi=({editor:e})=>{let[t,r]=Hd(!1),o=()=>e.isActive("heading",{level:1})?"Heading 1":e.isActive("heading",{level:2})?"Heading 2":e.isActive("heading",{level:3})?"Heading 3":"Normal",a=[{label:"Normal",action:()=>e.chain().focus().setParagraph().run(),isActive:!e.isActive("heading")},{label:"Heading 1",action:()=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e.isActive("heading",{level:1})},{label:"Heading 2",action:()=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e.isActive("heading",{level:2})},{label:"Heading 3",action:()=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e.isActive("heading",{level:3})}];return Tt(De,{open:t,onOpenChange:r,trigger:hi("button",{type:"button",className:"flex items-center space-x-1 p-2 rounded hover:bg-gray-100 transition min-w-[110px] justify-between text-gray-600",children:[Tt("span",{className:"text-base ",children:o()}),Tt(Vd,{width:16,height:16})]}),contentClassName:"w-48 w-auto- p-1",align:"start",children:Tt("div",{className:"space-y-1",children:a.map((n,i)=>hi("div",{children:[i===1&&Tt("div",{className:"border-b border-gray-200 my-1"}),Tt("button",{type:"button",onClick:()=>{n.action(),r(!1)},className:Od("w-full text-left px-3 py-2 rounded text-sm hover:bg-gray-100 transition",{"bg-gray-100 font-medium":n.isActive}),children:n.label})]},n.label))})})};import{jsx as Lr,jsxs as _d}from"react/jsx-runtime";var bi=({editor:e,controls:t=["textStyle","bold","italic","underline","strike","link","bulletList","orderedList","blockquote"],className:r,extraNodes:o})=>{let a=Array.isArray(t)?t:[];return _d("div",{className:$d("sticky top-0 z-10 flex w-full flex-wrap items-center space-x-1 border-b bg-white/80 backdrop-blur-md p-2",r),children:[a.map(n=>n==="textStyle"||n==="link"||mt&&mt[n]?Lr("div",{className:"flex items-center",children:n==="textStyle"?Lr(vi,{editor:e}):n==="link"?Lr(gi,{editor:e}):Lr(mi,{editor:e,icon:mt[n].icon,action:mt[n].action,isActive:mt[n].isActive,title:mt[n].title})},n):null),o]})};import{jsx as Et,jsxs as kr}from"react/jsx-runtime";var jd=({label:e,helpText:t,error:r,value:o="",onChange:a,optional:n,isRequired:i,extensions:l=[],editorClassName:f,wrapperClassName:c,controls:m,extraMenuNodes:u,placeholder:d})=>{let g=Zd({immediatelyRender:!1,content:o,editorProps:{attributes:{class:"px-3 h-40"}},extensions:[Kd,Gd,zd,Wd.configure({openOnClick:!1,HTMLAttributes:{class:"text-blue-600 underline hover:text-blue-800"}}),...l],onFocus:({event:C})=>{C.preventDefault(),C.stopPropagation()},onUpdate:({editor:C})=>{let v=C.getHTML();a?.(C.isEmpty?"":v)}});return g?kr("div",{className:Ro("flex flex-col w-full",c),children:[e&&kr("div",{className:"flex justify-between mb-1",children:[kr("label",{className:"text-sm font-medium text-gray-900 flex items-center",htmlFor:"editor-id",children:[e,i&&Et("span",{className:"ml-1 text-red-500",children:"*"})]}),n&&Et("span",{className:"text-sm text-gray-400",children:"Optional"})]}),kr("div",{className:Ro("relative border-none rounded-md overflow-hidden",r?"ring-1 ring-red-300 focus-within:ring-red-500":"ring-1 ring-gray-300 focus-within:ring-primary-main"),children:[Et(bi,{editor:g,controls:m,extraNodes:u}),Et(Ud,{editor:g,className:Ro("overflow-y-auto p-3 h-full bg-white",f),placeholder:d})]}),r&&Et("p",{className:"mt-2 text-sm text-red-600",id:"editor-error",children:r}),t&&Et("p",{className:"mt-2 text-sm text-gray-500",id:"editor-helptext",children:t})]}):null};import{Search as Xd,X as wi}from"lucide-react";import*as J from"react";import{jsx as H,jsxs as Xe}from"react/jsx-runtime";var yi={success:"bg-green-500/20 text-green-500 ring-1 ring-inset ring-current",failed:"bg-red-500/20 text-red-500 ring-1 ring-inset ring-current",pending:"bg-yellow-500/20 text-yellow-500 ring-1 ring-inset ring-current",default:"bg-gray-100 text-gray-700"},Ci=J.memo(({tag:e,onRemove:t})=>Xe("p",{className:s("text-xs p-1.5 py-1 rounded-md flex items-center gap-1",yi[e.variant??"default"]??yi.default),children:[H("span",{children:e.label}),H("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t()},children:H(wi,{size:12})})]}));Ci.displayName="SelectedChip";var xi=J.memo(({option:e,isChecked:t,onSelect:r,renderOption:o,disabled:a})=>H("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1",onClick:()=>!a&&r(e),children:H("div",{className:"w-full h-[20px] flex flex-row items-center dark:!text-white",children:H(Ut,{onCheckedChange:()=>!a&&r(e),disabled:a,value:e.value,label:o?o(e,t):H("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",checked:t})})}));xi.displayName="OptionItem";var Yd=({value:e,onChange:t,options:r=[],label:o,error:a,placeholder:n="Add tag...",description:i,showAsterisk:l,disabled:f,isLoading:c,allowCreate:m=!0,renderTag:u,renderOption:d,validateTag:g,onCreate:C,maxTags:v})=>{let[h,p]=J.useState(""),x=J.useRef(null),[P,y]=J.useState();J.useLayoutEffect(()=>{if(!x.current)return;let N=()=>y(x.current?.getBoundingClientRect().width);N();let w=new ResizeObserver(N);return w.observe(x.current),()=>w.disconnect()},[]);let k=J.useMemo(()=>new Set(e.map(N=>N.value)),[e]),F=J.useMemo(()=>{let N=h.trim().toLowerCase();return N?r.filter(w=>w.label.toLowerCase().includes(N)):r},[r,h]),b=J.useCallback(N=>t(e.filter(w=>w.value!==N)),[e,t]),S=J.useCallback(N=>{k.has(N.value)||v&&e.length>=v||t([...e,N])},[e,t,k,v]),D=J.useCallback(N=>{let w=N.trim();if(!w||!(g?g(w):!0))return;let z=r.find(Q=>Q.value.toLowerCase()===w.toLowerCase()||Q.label.toLowerCase()===w.toLowerCase());if(z){S(z),p("");return}m&&(S(C?.(w)??{value:w,label:w}),p(""))},[r,m,C,g,S]),M=N=>{N.key==="Enter"&&(N.preventDefault(),D(h)),N.key==="Backspace"&&!h&&e.length&&b(e[e.length-1].value)},T=!c&&m&&h.trim()&&!r.some(N=>N.value.toLowerCase()===h.trim().toLowerCase());return Xe("div",{className:"relative space-y-1",children:[H(Z,{showAsterisk:l,error:a,children:o}),Xe(ge,{children:[H("div",{ref:x,children:H(ee,{asChild:!0,disabled:f,children:Xe("div",{id:"tags_trigger_container",className:s(ne({status:a?"error":"default"}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-10 flex items-center justify-between w-full gap-2 p-2"),children:[Xe("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:[e.length>0&&e?.map(N=>{let w=()=>b(N.value);return u?H(J.Fragment,{children:Xe("div",{className:"flex items-center",children:[u(N),H("button",{type:"button",className:"pl-1",onClick:E=>{E.stopPropagation(),w()},children:H(wi,{size:12})})]})},N.value):H(Ci,{tag:N,onRemove:w},N.value)}),H("input",{value:h,disabled:f,readOnly:!m||void 0,placeholder:n,className:"flex-1 min-w-[80px] !border-none !outline-none bg-transparent text-sm p-0 h-auto !focus-visible:ring-0 placeholder:text-[#79818C] placeholder:text-sm",onChange:N=>p(N.target.value),onKeyDown:M})]}),H("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:H("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"})})]})})}),Xe(de,{align:"start",className:"min-w-[200px] p-0 mt-1",style:{width:P?`${P}px`:void 0},children:[H("div",{className:"w-full",children:H("div",{className:s("w-full mt-1 h-10 flex items-center justify-start mb-[5px] px-2 pt-2",{"mt-3":a}),children:H(ae,{error:a,leftNode:H(Xd,{className:"text-gray-400"}),value:h,placeholder:"Type to search or create",type:"text",disabled:c,rightNode:c?H(Fe,{colour:"secondary"}):void 0,onChange:N=>p(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),D(h))}})})}),Xe(Le,{viewPortClassName:"max-h-[225px] px",className:"pb-1 mt-3",children:[c&&H("div",{className:"py-7 flex justify-center",children:H(Fe,{})}),!c&&F.map(N=>H(xi,{option:N,isChecked:k.has(N.value),disabled:N.disabled,onSelect:w=>k.has(w.value)?b(w.value):S(w),renderOption:d},N.value)),T&&Xe("button",{type:"button",className:s("w-full text-left px-3 py-2 text-sm border-t border-t-gray-300 hover:bg-gray-50 mt-1",{"mt-3":a}),onClick:()=>D(h),children:['Create "',h.trim(),'"']})]})]})]}),i&&!a&&H("div",{className:"text-sm text-gray-500",children:i}),H(me,{error:a})]})};export{_s as Accordion,Io as AmountAction,Us as Banner,oe as Button,go as CalendarInput,Js as CopyableLabel,As as Country,Mo as CurrencySymbolMap,Bo as DateAction,Xr as DebouncedInput,ol as DevBanner,Wr as Dialog,zl as Drawer,Hl as DrawerClose,oo as DrawerRoot,Rd as FeatureBanner,bo as FilterPopover,We as FlagComponent,Z as FormLabel,yd as HasResourcePermission,ae as Input,Fe as Loader,Yl as LocaleSelector,jr as MultiSelect,Kr as MultiSelectTrigger,Hs as OTPInput,yo as PageDataToolbar,mo as Pagination,ln as PasswordInput,br as PermissionsContext,mc as PermissionsProvider,Nn as PhoneInput,De as Popover,de as PopoverContent,ge as PopoverRoot,ee as PopoverTrigger,xr as RadioGroup,Rr as RadioGroupItem,jd as RichTextEditor,Le as ScrollArea,ot as Select,Lc as Sidebar,Ko as SplitButton,Tc as Status,Br as StringAction,bd as Table,wd as Tabs,Yd as TagsInput,wt as TextOverflow,cn as Textarea,cr as Tooltip,Or as TooltipContent,Ho as TooltipProvider,$o as TooltipRoot,_o as TooltipTrigger,ce as buttonVariants,s as cn,vo as useFilterStore,rr as useHasPermission,La as usePermissions};
|
|
15
|
+
focus:border-purplring-purple-200 focus:!ring-primary-main focus:!ring-status-success-bg focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-purple-200 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:Cr(at.Indicator,{className:"rounded-full flex items-center justify-center",children:Cr("div",{className:"h-2 w-2 bg-current text-current rounded-full transition"})})}));Rr.displayName=at.Item.displayName;import{Fragment as ed,jsx as Lt,jsxs as Qa}from"react/jsx-runtime";var Ja=({filter:e,id:t,form:r})=>Lt(Jc,{name:e.key,control:r.control,render:({field:{value:o,onChange:a}})=>Qa(ed,{children:[Lt(Z,{className:"block text-sm font-medium mb-2 text-pallet-text-white-black",children:e?.label}),Lt(xr,{onValueChange:a,defaultValue:o,"aria-label":e?.label,id:`${t}-${e.key}`,children:Lt("div",{className:"flex items-center gap-2",children:e?.options?.map(n=>Qa("div",{className:"flex items-center space-x-2",children:[Lt(Rr,{value:n?.value,id:`${t}-${e.key}-${n?.value}`}),Lt("label",{htmlFor:`${t}-${e.key}-${n?.value}`,className:"text-xs",children:n?.label})]},qa()))})},`${qa()}-${o}`)]})});import{jsx as or,jsxs as td}from"react/jsx-runtime";var ei=({filter:e,id:t,form:r,onClear:o})=>td("div",{children:[(()=>{switch(e.type){case"input":return or(Ya,{filter:e,id:t,form:r});case"drop-down":return or(ja,{filter:e,id:t,form:r});case"radio":return or(Ja,{filter:e,id:t,form:r});case"date":return or(Za,{filter:e,id:t,form:r});default:return null}})(),o&&or($a,{id:t,fieldKey:e.key,form:r,onClear:o})]},e.key);import{useEffect as rd}from"react";var ti=(e,t)=>{rd(()=>{if(!t)return;let r=e(o=>{t(o)});return()=>r.unsubscribe()},[t,e])};import{useEffect as od,useRef as nd}from"react";var ri=(e,{getValues:t,setValue:r})=>{let o=nd(void 0);od(()=>{if(!e)return;let a=t(),n=o.current||{};console.log("useFormSync:",{values:e,prevValues:n,currentValues:a}),Object.entries(e).forEach(([i,l])=>{l!==n[i]&&l!==a[i]&&r(i,l,{shouldValidate:!0,shouldDirty:!0})}),Object.keys(n).forEach(i=>{!(i in e)&&a[i]&&r(i,"",{shouldValidate:!0,shouldDirty:!0})}),o.current=e},[e,t,r])};import{jsx as Nr,jsxs as ni}from"react/jsx-runtime";var ai=({filters:e,values:t,onChange:r,onApply:o,onReset:a,onClearApplied:n,setAppliedFilters:i,id:l="filter-popover"})=>{let f=id({defaultValues:t||{},mode:"all"});ri(t,f),ti(f.watch,r);let c=g=>{let C=St.cleanFilters(g);o?.(C),i?.(C)},m=()=>{f.reset({}),r?.({}),c({}),a?.()},d=g=>c(g),u=ad(g=>{f.setValue(g,"",{shouldValidate:!0,shouldDirty:!0});let C={...f.watch()};delete C[g],r?.(C),n?.(g)},[f,r,n]);return ni("form",{onSubmit:f.handleSubmit(d),children:[Nr("div",{className:"space-y-2 max-h-[350px] overflow-y-auto pr-2 -mr-2",children:e.map(g=>Nr(ei,{filter:g,id:l,form:f,onClear:u},g.key))}),ni("div",{style:{marginTop:28},className:"grid grid-cols-2 gap-2",children:[Nr(oi,{onClick:m,className:s(ce({variant:"outlined",size:"sm"})),type:"button",id:`${l}-reset-button`,children:"Reset"}),Nr(oi,{className:s(ce({size:"sm"})),type:"submit",id:`${l}-submit-button`,children:"Submit"})]})]})};import{create as sd}from"zustand";var Pr="filter_",ld=e=>{ii();let t=new URLSearchParams(window?.location?.search);Object.keys(e).forEach(r=>{t.set(`${Pr}${r}`,e[r])}),console.log("params",t.toString()),window.history.replaceState({},"",`${window.location.pathname}?${t}`)},ii=()=>{let e=new URLSearchParams(window.location.search),t=[];e.forEach((r,o)=>{o.startsWith(Pr)&&t.push(o)}),t.forEach(r=>e.delete(r)),window.history.replaceState({},"",`${window.location.pathname}?${e}`)},cd=()=>{if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((r,o)=>{o.startsWith(Pr)&&(t[o.replace(Pr,"")]=r)}),t},dd=()=>sd()(e=>({filters:cd(),resetFilters:()=>{e({filters:null}),ii()},upDateFilter:t=>e(r=>{let o;return typeof t=="function"?o=t(r.filters):o={...r?.filters,...t},ld(o),{filters:o}})})),vo=()=>dd();import{jsx as kt,jsxs as fd}from"react/jsx-runtime";var yo=({filters:e,setAppliedFilters:t,isOpen:r=!1,onChange:o,values:a,id:n="filter-popover"})=>{let{mounted:i}=Oa(),l=vo(),{filters:f,upDateFilter:c,resetFilters:m}=l(),[d,u]=md({});pd(()=>{if(f&&Object.keys(f).length>0){let h={...a,...f};u(h),t?.(h),o?.(h);return}a&&Object.keys(d).length===0&&u(a)},[]);let g=h=>{u(h),c(h),t?.(h)},C=()=>{u({}),m(),t?.({})},v=h=>{let p={...d};delete p[h],u(p),c(()=>p),t?.(p)};return i?kt("div",{className:"",children:kt(De,{id:`${n}-filter-popover`,defaultOpen:r,trigger:fd("button",{title:"Filter",className:s("!border-[#DEDEDE] !text-gray-800 !p-0 flex items-center",ce({variant:"outlined",size:"sm"})),type:"button",children:[kt("span",{className:"!px-[10px] !py-[8px]",children:kt(ud,{className:"w-4 h-4",size:5})}),kt(Va,{count:Object.keys(d).length})]}),contentClassName:"!border border-gray-200 pt-2",children:kt(ai,{filters:e,values:a??d,setAppliedFilters:t,id:n,onChange:o,onApply:g,onReset:C,onClearApplied:v})})}):null};import{Fragment as yd,jsx as ue,jsxs as Dr}from"react/jsx-runtime";var bo=({onRefetch:e,search:t,FilterMenu:r,ExtraNode:o,onExport:a,download:n,isRefetching:i,filterListOptions:l=[],filterValues:f,setAppliedFilters:c,onFilterChange:m,id:d="table-toolbar"})=>{let u=C=>{t?.onSearch?.(C)},g=()=>{try{e?.()}catch(C){console.error("Error while refetching data",C)}};return ue(yd,{children:(e||t?.enabled||r||o||a)&&Dr("div",{className:"w-full flex flex-col sm:!flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[ue("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:Dr("div",{className:" w-full flex gap-x-3",children:[t?.enabled&&ue("section",{className:"sm:w-56",children:ue(Xr,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:u,debounce:t?.debounceRate,id:`${d}-search-input`})}),Dr("div",{className:" flex gap-2",children:[e&&ue(oe,{onClick:g,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",id:`${d}-refetch-button`,children:ue(vd,{className:s("w-4 h-4",{"animate-spin":i}),size:5})}),l?.length?ue(yo,{setAppliedFilters:c,filters:l,values:f,id:`${d}-filter-popover`,onChange:m}):null,r&&ue(De,{id:`${d}-deprecated-filter-popover`,trigger:ue("button",{title:"Filter",className:s("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ce({variant:"outlined",size:"sm"})),children:ue(hd,{className:"w-4 h-4",size:5})}),children:r})]})]})}),ue("div",{className:"flex items-start flex-col gap-2 justify-center",children:ue("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:Dr("div",{className:"flex gap-2",children:[o&&o,a&&ue(oe,{variant:"primary",onClick:a,size:"sm",id:`${d}-export-button`,children:"Export"}),n?.enabled&&ue(oe,{variant:"primary",leftNode:ue(gd,{className:"w-4 h-5",size:5}),onClick:n?.onDownload,id:n.buttonId,size:"sm",isLoading:n?.isDownloading,children:n?.buttonText})]})})})]})})};import{jsx as $e,jsxs as si}from"react/jsx-runtime";var wd=({table:e,isMobile:t=!1,onRowClick:r,id:o="table",onRefetch:a,isRefetching:n,FilterMenu:i,ExtraNode:l,onExport:f,search:c={enabled:!1,debounceRate:700},download:m={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:d,pagination:u,filterListOptions:g,filterValues:C,setAppliedFilters:v,onFilterChange:h,tableBulkActions:p,emptyDataMessage:x})=>{let P=p&&Array.isArray(p.selectedRows)&&p.selectedRows.length>0;return si("div",{className:s("relative w-full rounded-b border-0 overflow-x-auto"),children:[$e(bo,{onRefetch:a,search:c,FilterMenu:i,ExtraNode:l,onExport:f,download:m,isRefetching:n,filterListOptions:g,filterValues:C,setAppliedFilters:v,id:o,onFilterChange:h}),P&&p?.actions?.length&&$e(Aa,{tableBulkActions:p.actions,selectedRows:p.selectedRows??[],isMobile:t,id:`${o}-bulk-actions`}),$e("main",{className:"w-full overflow-x-auto mt-5",children:d?si("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[$e(bd,{size:20,className:"animate-spin"}),$e("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?$e("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:x||$e("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):$e("div",{className:"flex flex-col gap-2",children:$e(Ba,{table:e,isMobile:t,onRowClick:r,id:o})})}),!d&&u?.enabled&&e.getRowModel().rows.length>0&&$e(mo,{...u,currentPage:u?.currentPage??1,totalPages:u?.totalPages??Math.ceil((u?.totalItems??0)/Math.max(u?.itemsPerPage??1,1))??1,onPageChange:b=>u?.onPageChange?.(b),id:o})]})};import{Fragment as li,jsx as ci}from"react/jsx-runtime";var Cd=({permission:e,children:t})=>{let{hasPermission:r}=rr(e);return e?ci(li,{children:r?t:null}):ci(li,{children:t})};import*as it from"@radix-ui/react-tabs";import{jsx as pt,jsxs as wo}from"react/jsx-runtime";function xd({tabs:e,defaultValue:t,onChange:r}){return wo(it.Root,{defaultValue:t,onValueChange:r,className:"flex flex-col items-start justify-start gap-2.5",children:[wo(Le,{className:"w-full",children:[pt(pr,{className:"z-[1000]",orientation:"horizontal"}),pt(it.List,{className:"my-2 border-b border-gray-300 items-center flex",children:e.map(o=>wo(it.Trigger,{className:"flex items-center gap-2 whitespace-nowrap rounded-t-md px-5 py-2 relative transition-all group hover:!bg-gray-200/50 dark:hover:!bg-gray-200/10 data-[state=active]:dark:hover:!bg-gray-200 data-[state=active]:hover:!bg-gray-200 data-[state=active]:bg-gray-200 before:absolute before:bottom-[0px] before:left-0 before:h-[2px] dark:before:h-[0px] before:w-full before:rounded-sm data-[state=active]:before:!bg-texts-50 before:content-['']",value:o?.key,children:[pt("p",{className:"text-center text-sm leading-5 font-normal text-gray-500 group-data-[state=active]:font-medium group-data-[state=active]:text-gray-800",children:pt("span",{children:o.title})}),o.count&&pt("div",{className:"bg-gray-300 group-data-[state=active]:bg-texts-50 group-data-[state=active]:text-white text-texts-50 text-xs font-medium me-2 px-2.5 py-0.5 rounded-full",children:pt("span",{children:o.count})})]},o?.key))})]}),e.map(o=>pt(it.Content,{value:o?.key,className:"w-full",children:o.content},o?.key))]})}import{BiInfoCircle as Nd,BiX as mi}from"react-icons/bi";import{cva as Rd}from"class-variance-authority";var ui=Rd("relative rounded-lg border px-4 py-4 text-sm",{variants:{variant:{default:"border-blue-200 bg-blue-50 text-blue-800",danger:"border-red-200 bg-red-50 text-red-800",success:"border-green-200 bg-green-50 text-green-800",pending:"border-yellow-200 bg-yellow-50 text-yellow-800"}},defaultVariants:{variant:"default"}}),di={default:{primary:"",outlined:""},danger:{primary:"bg-red-600 hover:bg-red-600/80 text-white border-red-600",outlined:"border-red-600 text-red-600 hover:bg-red-50"},success:{primary:"bg-green-600 hover:bg-green-600/80 text-white border-green-600",outlined:"border-green-600 text-green-600 hover:bg-green-50"},pending:{primary:"bg-yellow-600 hover:bg-yellow-600/80 text-white border-yellow-600",outlined:"border-yellow-600 text-yellow-600 hover:bg-yellow-50"}},pi=(e,t)=>(di[e]??di.default)[t];import{jsx as Ke,jsxs as nr}from"react/jsx-runtime";var Pd=({title:e,message:t,variant:r="default",icon:o,action:a,dismissible:n=!1,onDismiss:i,isOpen:l=!0,align:f="start",classNames:c})=>{if(!l)return null;let m=a?.variant??"primary",d=pi(r??"default",m),u=f==="center";return nr("div",{className:s(ui({variant:r}),c?.root),children:[n&&Ke("button",{type:"button",onClick:i,className:"absolute top-3 right-3 opacity-60 transition-opacity hover:opacity-100 sm:hidden","aria-label":"Dismiss",id:"feature_banner_dismiss_button_mobile",children:Ke(mi,{size:20})}),nr("div",{className:s("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",u&&"sm:items-center"),id:"feature_banner_container",children:[nr("div",{className:s("flex items-start gap-3 pr-6 sm:pr-0",u&&"sm:items-center"),id:"feature_banner_content_wrapper",children:[Ke("span",{className:s("shrink-0 mt-0.5",u&&"sm:mt-0",c?.icon),id:"feature_banner_icon",children:o??Ke(Nd,{size:18})}),nr("div",{className:"min-w-0",id:"feature_banner_content",children:[Ke("p",{className:s("font-semibold",c?.title),id:"feature_banner_title",children:e}),t&&Ke("p",{id:"feature_banner_message",className:s("mt-1 text-sm opacity-90 break-words",c?.message),children:t})]})]}),(a||n)&&nr("div",{className:s("flex flex-col items-end gap-3 sm:flex-row sm:items-center",u&&"sm:items-center"),id:"feature_banner_actions_wrapper",children:[a&&Ke(oe,{variant:m,type:"button",onClick:a.onClick,className:s(d,c?.action),id:"feature_banner_action_button",children:a.label}),n&&Ke("button",{type:"button",onClick:i,className:"hidden sm:flex opacity-60 transition-opacity hover:opacity-100","aria-label":"Dismiss",id:"feature_banner_dismiss_button",children:Ke(mi,{size:20})})]})]})]})};import Gd from"@tiptap/extension-font-family";import Ud from"@tiptap/extension-link";import Zd from"@tiptap/extension-underline";import{EditorContent as Kd,useEditor as jd}from"@tiptap/react";import Xd from"@tiptap/starter-kit";import Ro from"clsx";import zd from"clsx";import{Bold as Dd,Italic as Sd,List as Ld,ListOrdered as kd,Quote as Td,Strikethrough as Fd,Underline as Ed}from"lucide-react";import{jsx as Md}from"react/jsx-runtime";var Ad=()=>Md("span",{className:"text-sm font-semibold",children:"H1"}),mt={bold:{icon:Dd,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),title:"Bold"},italic:{icon:Sd,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),title:"Italic"},underline:{icon:Ed,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),title:"Underline"},strike:{icon:Fd,action:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),title:"Strikethrough"},heading1:{icon:Ad,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1}),title:"Heading 1"},bulletList:{icon:Ld,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),title:"Bullet List"},orderedList:{icon:kd,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),title:"Numbered List"},blockquote:{icon:Td,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),title:"Quote"},textStyle:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Text Style"},link:{icon:()=>null,action:()=>!0,isActive:()=>!1,title:"Link"}};import Id from"clsx";import{jsx as fi}from"react/jsx-runtime";var gi=({editor:e,icon:t,action:r,isActive:o,disabled:a,title:n,className:i})=>fi("button",{type:"button",onClick:()=>r(e),disabled:a??!e.can().chain().focus().run(),title:n,className:Id("p-2 rounded hover:bg-gray-100 transition",{"opacity-100 text-black":o(e),"opacity-40 text-gray-500":!o(e),"cursor-not-allowed":a},i),children:fi(t,{width:18,height:18})});import Bd from"clsx";import{Link as Od}from"lucide-react";import{useCallback as Sr,useMemo as Co,useState as hi}from"react";import{Fragment as Vd,jsx as je,jsxs as xo}from"react/jsx-runtime";var vi=({editor:e})=>{let[t,r]=hi(!1),[o,a]=hi(""),n=Co(()=>!e.state.selection.empty,[e.state.selection]),i=Co(()=>e.isActive("link"),[e]),l=Co(()=>n||i,[n,i]),f=Sr(()=>{o.trim()&&(e.chain().focus().extendMarkRange("link").setLink({href:o.trim()}).run(),r(!1),a(""))},[e,o]),c=Sr(()=>{e.chain().focus().extendMarkRange("link").unsetLink().run(),r(!1),a("")},[e]),m=Sr(u=>{let g=e.getAttributes("link").href;a(g||""),r(u)},[l,e]),d=Sr(u=>{u.key==="Enter"&&(u.preventDefault(),f()),u.key==="Escape"&&r(!1)},[f]);return je(De,{open:t,onOpenChange:m,trigger:je("div",{className:Bd("",{"opacity-100 text-black":t,"opacity-40 text-gray-500":!t}),title:l?e.isActive("link")?"Edit link":"Add link":"Select text to add a link",children:je(Od,{width:18,height:18})}),contentClassName:"w-80 p-4",align:"start",children:je("div",{className:"space-y-4",children:!n&&!i?je("div",{className:"text-sm text-gray-500 bg-gray-50 rounded p-3 border border-gray-200",children:"Please select some text in the editor to apply a link."}):xo(Vd,{children:[xo("div",{children:[je("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Link URL"}),je(ae,{type:"url",value:o,onChange:u=>a(u.target.value),placeholder:"https://example.com",autoFocus:!0,onKeyDown:d})]}),xo("div",{className:"flex justify-between space-x-2",children:[je(oe,{type:"button",onClick:f,disabled:!o.trim(),variant:"primary",size:"sm",className:"flex-1",children:e.isActive("link")?"Update Link":"Add Link"}),e.isActive("link")&&je(oe,{type:"button",onClick:c,variant:"neutral",size:"sm",className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition text-sm font-medium",children:"Remove"})]})]})})})};import Hd from"clsx";import{ChevronDown as $d}from"lucide-react";import{useState as _d}from"react";import{jsx as Tt,jsxs as yi}from"react/jsx-runtime";var bi=({editor:e})=>{let[t,r]=_d(!1),o=()=>e.isActive("heading",{level:1})?"Heading 1":e.isActive("heading",{level:2})?"Heading 2":e.isActive("heading",{level:3})?"Heading 3":"Normal",a=[{label:"Normal",action:()=>e.chain().focus().setParagraph().run(),isActive:!e.isActive("heading")},{label:"Heading 1",action:()=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e.isActive("heading",{level:1})},{label:"Heading 2",action:()=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e.isActive("heading",{level:2})},{label:"Heading 3",action:()=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e.isActive("heading",{level:3})}];return Tt(De,{open:t,onOpenChange:r,trigger:yi("button",{type:"button",className:"flex items-center space-x-1 p-2 rounded hover:bg-gray-100 transition min-w-[110px] justify-between text-gray-600",children:[Tt("span",{className:"text-base ",children:o()}),Tt($d,{width:16,height:16})]}),contentClassName:"w-48 w-auto- p-1",align:"start",children:Tt("div",{className:"space-y-1",children:a.map((n,i)=>yi("div",{children:[i===1&&Tt("div",{className:"border-b border-gray-200 my-1"}),Tt("button",{type:"button",onClick:()=>{n.action(),r(!1)},className:Hd("w-full text-left px-3 py-2 rounded text-sm hover:bg-gray-100 transition",{"bg-gray-100 font-medium":n.isActive}),children:n.label})]},n.label))})})};import{jsx as Lr,jsxs as Wd}from"react/jsx-runtime";var wi=({editor:e,controls:t=["textStyle","bold","italic","underline","strike","link","bulletList","orderedList","blockquote"],className:r,extraNodes:o})=>{let a=Array.isArray(t)?t:[];return Wd("div",{className:zd("sticky top-0 z-10 flex w-full flex-wrap items-center space-x-1 border-b bg-white/80 backdrop-blur-md p-2",r),children:[a.map(n=>n==="textStyle"||n==="link"||mt&&mt[n]?Lr("div",{className:"flex items-center",children:n==="textStyle"?Lr(bi,{editor:e}):n==="link"?Lr(vi,{editor:e}):Lr(gi,{editor:e,icon:mt[n].icon,action:mt[n].action,isActive:mt[n].isActive,title:mt[n].title})},n):null),o]})};import{jsx as Ft,jsxs as kr}from"react/jsx-runtime";var Yd=({label:e,helpText:t,error:r,value:o="",onChange:a,optional:n,isRequired:i,extensions:l=[],editorClassName:f,wrapperClassName:c,controls:m,extraMenuNodes:d,placeholder:u})=>{let g=jd({immediatelyRender:!1,content:o,editorProps:{attributes:{class:"px-3 h-40"}},extensions:[Xd,Zd,Gd,Ud.configure({openOnClick:!1,HTMLAttributes:{class:"text-blue-600 underline hover:text-blue-800"}}),...l],onFocus:({event:C})=>{C.preventDefault(),C.stopPropagation()},onUpdate:({editor:C})=>{let v=C.getHTML();a?.(C.isEmpty?"":v)}});return g?kr("div",{className:Ro("flex flex-col w-full",c),children:[e&&kr("div",{className:"flex justify-between mb-1",children:[kr("label",{className:"text-sm font-medium text-gray-900 flex items-center",htmlFor:"editor-id",children:[e,i&&Ft("span",{className:"ml-1 text-red-500",children:"*"})]}),n&&Ft("span",{className:"text-sm text-gray-400",children:"Optional"})]}),kr("div",{className:Ro("relative border-none rounded-md overflow-hidden",r?"ring-1 ring-red-300 focus-within:ring-red-500":"ring-1 ring-gray-300 focus-within:ring-primary-main"),children:[Ft(wi,{editor:g,controls:m,extraNodes:d}),Ft(Kd,{editor:g,className:Ro("overflow-y-auto p-3 h-full bg-white",f),placeholder:u})]}),r&&Ft("p",{className:"mt-2 text-sm text-red-600",id:"editor-error",children:r}),t&&Ft("p",{className:"mt-2 text-sm text-gray-500",id:"editor-helptext",children:t})]}):null};import{Search as qd,X as xi}from"lucide-react";import*as Q from"react";import{jsx as H,jsxs as Xe}from"react/jsx-runtime";var Ci={success:"bg-green-500/20 text-green-500 ring-1 ring-inset ring-current",failed:"bg-red-500/20 text-red-500 ring-1 ring-inset ring-current",pending:"bg-yellow-500/20 text-yellow-500 ring-1 ring-inset ring-current",default:"bg-gray-100 text-gray-700"},Ri=Q.memo(({tag:e,onRemove:t})=>Xe("p",{className:s("text-xs p-1.5 py-1 rounded-md flex items-center gap-1",Ci[e.variant??"default"]??Ci.default),children:[H("span",{children:e.label}),H("button",{type:"button",className:"pl-1",onClick:r=>{r.stopPropagation(),t()},children:H(xi,{size:12})})]}));Ri.displayName="SelectedChip";var Ni=Q.memo(({option:e,isChecked:t,onSelect:r,renderOption:o,disabled:a})=>H("article",{className:"cursor-pointer relative hover:bg-status-success-bg transition flex w-[calc(100%-0.375rem)] mx-auto rounded-md items-center py-1.5 px-2 text-sm outline-none focus:bg-status-success-bg dark:!text-[#DDDFE0] focus-visible:ring-1 focus-visible:ring-status-success-fill focus-visible:ring-offset-1",onClick:()=>!a&&r(e),children:H("div",{className:"w-full h-[20px] flex flex-row items-center dark:!text-white",children:H(Ut,{onCheckedChange:()=>!a&&r(e),disabled:a,value:e.value,label:o?o(e,t):H("span",{children:e.label}),bodyClassName:"w-full",labelWrapperClassName:"w-full",checked:t})})}));Ni.displayName="OptionItem";var Qd=({value:e,onChange:t,options:r=[],label:o,error:a,placeholder:n="Add tag...",description:i,showAsterisk:l,disabled:f,isLoading:c,allowCreate:m=!0,renderTag:d,renderOption:u,validateTag:g,onCreate:C,maxTags:v})=>{let[h,p]=Q.useState(""),x=Q.useRef(null),[P,b]=Q.useState();Q.useLayoutEffect(()=>{if(!x.current)return;let N=()=>b(x.current?.getBoundingClientRect().width);N();let w=new ResizeObserver(N);return w.observe(x.current),()=>w.disconnect()},[]);let k=Q.useMemo(()=>new Set(e.map(N=>N.value)),[e]),E=Q.useMemo(()=>{let N=h.trim().toLowerCase();return N?r.filter(w=>w.label.toLowerCase().includes(N)):r},[r,h]),y=Q.useCallback(N=>t(e.filter(w=>w.value!==N)),[e,t]),S=Q.useCallback(N=>{k.has(N.value)||v&&e.length>=v||t([...e,N])},[e,t,k,v]),D=Q.useCallback(N=>{let w=N.trim();if(!w||!(g?g(w):!0))return;let z=r.find(J=>J.value.toLowerCase()===w.toLowerCase()||J.label.toLowerCase()===w.toLowerCase());if(z){S(z),p("");return}m&&(S(C?.(w)??{value:w,label:w}),p(""))},[r,m,C,g,S]),M=N=>{N.key==="Enter"&&(N.preventDefault(),D(h)),N.key==="Backspace"&&!h&&e.length&&y(e[e.length-1].value)},T=!c&&m&&h.trim()&&!r.some(N=>N.value.toLowerCase()===h.trim().toLowerCase());return Xe("div",{className:"relative space-y-1",children:[H(Z,{showAsterisk:l,error:a,children:o}),Xe(ge,{children:[H("div",{ref:x,children:H(ee,{asChild:!0,disabled:f,children:Xe("div",{id:"tags_trigger_container",className:s(ne({status:a?"error":"default"}),"cursor-pointer [&>svg]:shrink-0 h-auto min-h-10 flex items-center justify-between w-full gap-2 p-2"),children:[Xe("div",{className:"w-full flex flex-row items-center gap-2 flex-wrap",children:[e.length>0&&e?.map(N=>{let w=()=>y(N.value);return d?H(Q.Fragment,{children:Xe("div",{className:"flex items-center",children:[d(N),H("button",{type:"button",className:"pl-1",onClick:F=>{F.stopPropagation(),w()},children:H(xi,{size:12})})]})},N.value):H(Ri,{tag:N,onRemove:w},N.value)}),H("input",{value:h,disabled:f,readOnly:!m||void 0,placeholder:n,className:"flex-1 min-w-[80px] !border-none !outline-none bg-transparent text-sm p-0 h-auto !focus-visible:ring-0 placeholder:text-[#79818C] placeholder:text-sm",onChange:N=>p(N.target.value),onKeyDown:M})]}),H("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:H("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"})})]})})}),Xe(de,{align:"start",className:"min-w-[200px] p-0 mt-1",style:{width:P?`${P}px`:void 0},children:[H("div",{className:"w-full",children:H("div",{className:s("w-full mt-1 h-10 flex items-center justify-start mb-[5px] px-2 pt-2",{"mt-3":a}),children:H(ae,{error:a,leftNode:H(qd,{className:"text-gray-400"}),value:h,placeholder:"Type to search or create",type:"text",disabled:c,rightNode:c?H(Ee,{colour:"secondary"}):void 0,onChange:N=>p(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),D(h))}})})}),Xe(Le,{viewPortClassName:"max-h-[225px] px",className:"pb-1 mt-3",children:[c&&H("div",{className:"py-7 flex justify-center",children:H(Ee,{})}),!c&&E.map(N=>H(Ni,{option:N,isChecked:k.has(N.value),disabled:N.disabled,onSelect:w=>k.has(w.value)?y(w.value):S(w),renderOption:u},N.value)),T&&Xe("button",{type:"button",className:s("w-full text-left px-3 py-2 text-sm border-t border-t-gray-300 hover:bg-gray-50 mt-1",{"mt-3":a}),onClick:()=>D(h),children:['Create "',h.trim(),'"']})]})]})]}),i&&!a&&H("div",{className:"text-sm text-gray-500",children:i}),H(me,{error:a})]})};export{Ws as Accordion,Io as AmountAction,Ks as Banner,oe as Button,go as CalendarInput,el as CopyableLabel,Is as Country,Mo as CurrencySymbolMap,Bo as DateAction,Xr as DebouncedInput,al as DevBanner,Wr as Dialog,Gl as Drawer,_l as DrawerClose,oo as DrawerRoot,Pd as FeatureBanner,yo as FilterPopover,We as FlagComponent,Z as FormLabel,Cd as HasResourcePermission,ae as Input,Ee as Loader,Ql as LocaleSelector,jr as MultiSelect,Kr as MultiSelectTrigger,_s as OTPInput,bo as PageDataToolbar,mo as Pagination,ln as PasswordInput,yr as PermissionsContext,gc as PermissionsProvider,Nn as PhoneInput,De as Popover,de as PopoverContent,ge as PopoverRoot,ee as PopoverTrigger,xr as RadioGroup,Rr as RadioGroupItem,Yd as RichTextEditor,Le as ScrollArea,ot as Select,Tc as Sidebar,Ko as SplitButton,Ec as Status,Br as StringAction,wd as Table,xd as Tabs,Qd as TagsInput,wt as TextOverflow,cn as Textarea,cr as Tooltip,Or as TooltipContent,Ho as TooltipProvider,$o as TooltipRoot,_o as TooltipTrigger,ce as buttonVariants,s as cn,vo as useFilterStore,rr as useHasPermission,La as usePermissions};
|
|
16
16
|
//# sourceMappingURL=index.mjs.map
|