@dub/ui 0.2.14 → 0.2.15
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/charts/index.mjs +1 -1
- package/dist/chunk-2ZY2XZRF.mjs +2 -0
- package/dist/chunk-4MFIEVU7.mjs +2 -0
- package/dist/chunk-65MLUNBH.mjs +2 -0
- package/dist/chunk-6KGANRN2.mjs +2 -0
- package/dist/chunk-7VMMFHSX.mjs +2 -0
- package/dist/chunk-ETTCESDB.mjs +2 -0
- package/dist/chunk-KPGZJ6U3.mjs +2 -0
- package/dist/chunk-TGLDQXCR.mjs +2 -0
- package/dist/chunk-U6VDA3UV.mjs +2 -0
- package/dist/chunk-YHIELB32.mjs +2 -0
- package/dist/icons/index.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as Cm,$a as lu,$b as Zu,A as wo,Aa as Eo,Ab as Mu,Ac as yp,B as Zd,Ba as To,Bb as Lu,Bc as xp,C as Qd,Ca as Bm,Cb as Eu,Cc as wp,D as Jd,Da as Wm,Db as Tu,Dc as Cp,E as Xd,Ea as cr,Eb as Au,Ec as Np,F as em,Fa as Um,Fb as Fo,Fc as kp,G as tm,Ga as $m,Gb as Bo,Gc as Pp,H as rm,Ha as Gm,Hb as Wo,Hc as Sp,I as om,Ia as Ao,Ib as Du,Ic as Rp,J as am,Ja as Km,Jb as Iu,Jc as Mp,K as im,Ka as jm,Kb as zu,Kc as Lp,L as nm,La as Ym,Lb as Uo,Lc as Ep,M as sm,Ma as kt,Mb as Ou,Mc as Tp,N as lm,Na as qm,Nb as Vu,Nc as Ap,O as cm,Oa as Zm,Ob as _u,Oc as Dp,P as dm,Pa as Qm,Pb as Hu,Pc as Ip,Q as mm,Qa as Jm,Qb as $o,Qc as zp,R as um,Ra as Xm,Rb as Fu,Rc as Op,S as pm,Sa as eu,Sb as Bu,Sc as Vp,T as fm,Ta as tu,Tb as Wu,Tc as _p,U as gm,Ua as Pt,Ub as Uu,Uc as Hp,V as hm,Va as ru,Vb as $u,Vc as Fp,W as vm,Wa as ou,Wb as Gu,Wc as Bp,X as bm,Xa as au,Xb as Ku,Xc as Wp,Y as ym,Ya as iu,Yb as ju,Yc as Up,Z as xm,Za as nu,Zb as Yu,_ as wm,_a as su,_b as qu,a as oo,aa as Nm,ab as cu,ac as Qu,b as ao,ba as km,bb as du,bc as Go,c as io,ca as Pm,cb as mu,cc as Ju,d as Ud,da as Sm,db as Do,dc as Xu,e as no,ea as Rm,eb as Io,ec as ep,f as so,fa as Co,fb as zo,fc as tp,g as lo,ga as Mm,gb as uu,gc as rp,h as co,ha as Lm,hb as pu,hc as op,i as it,ia as Em,ib as fu,ic as ap,j as $d,ja as No,jb as gu,jc as St,k as be,ka as Tm,kb as hu,kc as ip,l as Gd,la as Am,lb as Oo,lc as np,m as mo,ma as Dm,mb as vu,mc as sp,n as Kd,na as Im,nb as bu,nc as lp,o as uo,oa as zm,ob as yu,oc as Ko,p as jd,pa as Om,pb as xu,pc as cp,q as po,qa as Vm,qb as wu,qc as dp,r as fo,ra as ko,rb as Cu,rc as jo,s as Yd,sa as Po,sb as Nu,sc as mp,t as go,ta as So,tb as ku,tc as up,u as qd,ua as Ro,ub as Vo,uc as pp,v as ho,va as Mo,vb as Pu,vc as fp,w as vo,wa as _m,wb as Su,wc as gp,x as bo,xa as Hm,xb as _o,xc as hp,y as yo,ya as Fm,yb as Ru,yc as vp,z as xo,za as Lo,zb as Ho,zc as bp}from"./chunk-AEEIAOKR.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as qr,b as V,c as xt,d as wt,e as Zr,f as Ue,g as Qr,h as Jr,i as Ct,j as Xr,k as eo,l as Nt,m as to,n as me,o as n,p as ro}from"./chunk-LPRQFZ6K.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as Ci}from"lucide-react";import*as Mt from"react";import{jsx as Rt,jsxs as Si}from"react/jsx-runtime";var qp=ae.Root,Ni=Mt.forwardRef(({className:e,...t},r)=>Rt(ae.Item,{ref:r,className:n("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var ki=Mt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?Ci:St;return Rt(ae.Header,{className:"flex",children:Si(ae.Trigger,{ref:a,className:n("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,Rt(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});ki.displayName=ae.Trigger.displayName;var Pi=Mt.forwardRef(({className:e,children:t,...r},o)=>Rt(ae.Content,{ref:o,className:n("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-gray-500 transition-all sm:text-base",e),...r,children:t}));Pi.displayName=ae.Content.displayName;import{cva as Ri}from"class-variance-authority";import*as Lt from"react";import{jsx as dr}from"react/jsx-runtime";var Mi=Ri("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Li=Lt.forwardRef(({className:e,variant:t,...r},o)=>dr("div",{ref:o,role:"alert",className:n(Mi({variant:t}),e),...r}));Li.displayName="Alert";var Ei=Lt.forwardRef(({className:e,...t},r)=>dr("h5",{ref:r,className:n("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Ei.displayName="AlertTitle";var Ti=Lt.forwardRef(({className:e,...t},r)=>dr("div",{ref:r,className:n("text-sm [&_p]:leading-relaxed",e),...t}));Ti.displayName="AlertDescription";import{sha256 as Ai}from"js-sha256";import{useState as Di}from"react";import{jsx as mr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Ai(e.email)}?d=${encodeURIComponent(r)}`:t}function o0({user:e={},className:t}){if(!e)return mr("div",{className:n("h-10 w-10 animate-pulse rounded-full border border-gray-300 bg-gray-100",t)});let[r,o]=Di(Ii(e));return mr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:n("h-10 w-10 rounded-full border border-gray-300",t),draggable:!1,onError:()=>{o(`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function a0({id:e,className:t}){return mr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:n("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as zi}from"class-variance-authority";import{jsx as Vi}from"react/jsx-runtime";var Oi=zi("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-gray-400 text-gray-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-gray-200 bg-gray-100 text-gray-800",neutral:"border-gray-400 text-gray-500",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function Et({className:e,variant:t,...r}){return Vi("span",{className:n(Oi({variant:t}),e),...r})}import{cva as Wi}from"class-variance-authority";import{forwardRef as Ui}from"react";import*as ue from"@radix-ui/react-tooltip";import _i from"linkify-react";import{HelpCircle as Hi}from"lucide-react";import Fi from"next/link";import{useState as Bi}from"react";import{jsx as U,jsxs as $e}from"react/jsx-runtime";function b0({children:e}){return U(ue.Provider,{delayDuration:150,children:e})}function te({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,...l}){let[c,s]=Bi(!1);return $e(ue.Root,{open:c,onOpenChange:s,delayDuration:0,disableHoverableContent:a,children:[U(ue.Trigger,{asChild:!0,onClick:()=>{s(!0)},onBlur:()=>{s(!1)},children:e}),U(ue.Portal,{children:U(ue.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",collisionPadding:0,...l,children:typeof t=="string"?U("span",{className:n("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-gray-700",r),children:t}):typeof t=="function"?t({setOpen:s}):t})})]})}function y0({title:e,cta:t,href:r,target:o,onClick:a}){return $e("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-gray-700",children:e}),t&&(r?U(Fi,{href:r,...o?{target:o}:{},className:n(pe({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function x0({title:e,cta:t,href:r}){return $e("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:t})]})}function w0({children:e}){return U("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-gray-700",children:U(_i,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-gray-400 hover:text-gray-700"},children:e})})}function C0(e){return U(te,{...e,children:U(Hi,{className:"h-4 w-4 text-gray-500"})})}function N0({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(te,{content:$e("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[$e("p",{className:"text-sm font-semibold text-gray-700",children:[r,xt(e||0,{full:!0})," ",t]}),a&&$e("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",eo(a,{withAgo:!0})]})]}),children:o})}function k0({children:e,content:t,...r}){return U(te,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(Et,{variant:"gray",className:"border-gray-300 transition-all hover:bg-gray-200",children:e})})})}function P0({children:e,tooltipProps:t,...r}){return U(te,{...t,children:U("button",{type:"button",...r,className:n("flex h-6 w-6 items-center justify-center rounded-md text-gray-500 transition-colors duration-75 hover:bg-gray-100 active:bg-gray-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}import{jsx as Ge,jsxs as Yo}from"react/jsx-runtime";var pe=Wi("transition-all",{variants:{variant:{primary:"border-black bg-black text-white hover:bg-gray-800 hover:ring-4 hover:ring-gray-200",secondary:n("border-gray-200 bg-white text-gray-900 hover:bg-gray-50 focus-visible:border-gray-500 outline-none","data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"),outline:"border-transparent text-neutral-600 hover:bg-neutral-100",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Ui(({text:e,variant:t="primary",className:r,textWrapperClassName:o,loading:a,icon:l,shortcut:c,disabledTooltip:s,right:d,...m},i)=>s?Ge(te,{content:s,children:Yo("div",{className:n("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[l,e&&Ge("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Ge("kbd",{className:n("hidden rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-400 md:inline-block",{"bg-gray-100":t==null?void 0:t.endsWith("outline")}),children:c})]})}):Yo("button",{ref:i,type:m.onClick?"button":"submit",className:n("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",m.disabled||a?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400 outline-none":pe({variant:t}),r),disabled:m.disabled||a,...m,children:[a?Ge(be,{}):l||null,e&&Ge("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Ge("kbd",{className:n("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-gray-700 text-gray-400 group-hover:bg-gray-600 group-hover:text-gray-300":t==="primary","bg-gray-200 text-gray-400 group-hover:bg-gray-100 group-hover:text-gray-500":t==="secondary","bg-gray-100 text-gray-500 group-hover:bg-gray-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"}),children:c}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Gi}from"react";import{jsx as qo}from"react/jsx-runtime";var Ki=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),nt=Gi({variant:"loose"});function Zo({variant:e="loose",loading:t=!1,className:r,children:o}){return qo("ul",{className:n(Ki({variant:e,loading:t}),r),"data-variant":e,children:qo(nt.Provider,{value:{variant:e},children:o})})}import{cva as ji}from"class-variance-authority";import{createContext as Yi,useContext as qi,useEffect as Zi,useRef as Qi,useState as Ji}from"react";import{jsx as ur}from"react/jsx-runtime";var Xi=ji("w-full group/card border-gray-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-gray-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),en="w-full py-2.5 px-4",pr=Yi({hovered:!1});function Qo({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0}){let{variant:l}=qi(nt),c=Qi(null),[s,d]=Ji(!1);return Zi(()=>{if(!s||!c.current)return;let m=setInterval(()=>{var i;((i=c.current)==null?void 0:i.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(m)},[s]),ur("li",{ref:c,className:n(Xi({variant:l}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:ur("div",{className:n(en,t),onClick:o?m=>{document.getElementById("modal-backdrop")||Nt(m)||o()}:void 0,children:ur(pr.Provider,{value:{hovered:s},children:r})})})}var q0=Object.assign(Zo,{Card:Object.assign(Qo,{Context:pr}),Context:nt});import{cva as tn}from"class-variance-authority";import rn from"embla-carousel-autoplay";import on from"embla-carousel-react";import{motion as an}from"framer-motion";import{ArrowLeft as nn,ArrowRight as sn,ChevronLeft as ln,ChevronRight as cn}from"lucide-react";import*as T from"react";import{jsx as Z,jsxs as ze}from"react/jsx-runtime";var Jo=2e3,Xo=T.createContext(null);function Ke(){let e=T.useContext(Xo);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function nf(){let{api:e}=Ke(),[t,r]=T.useState(0),o=T.useCallback(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return T.useEffect(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var dn=T.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},d)=>{let[m,i]=on({...t,axis:e==="horizontal"?"x":"y"},[...o?[rn(typeof o=="object"?o:{delay:Jo})]:[],...a||[]]),[p,f]=T.useState(!1),[b,y]=T.useState(!1),h=T.useCallback(S=>{!S||(f(S.canScrollPrev()),y(S.canScrollNext()))},[]),g=T.useCallback(()=>{i==null||i.scrollPrev()},[i]),C=T.useCallback(()=>{i==null||i.scrollNext()},[i]),P=T.useCallback(S=>{S.key==="ArrowLeft"?(S.preventDefault(),g()):S.key==="ArrowRight"&&(S.preventDefault(),C())},[g,C]);return T.useEffect(()=>{!i||!r||r(i)},[i,r]),T.useEffect(()=>{if(!!i)return h(i),i.on("reInit",h),i.on("select",h),()=>{i==null||i.off("select",h)}},[i,h]),Z(Xo.Provider,{value:{carouselRef:m,api:i,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:C,canScrollPrev:p,canScrollNext:b},children:Z("div",{ref:d,onKeyDownCapture:P,className:n("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});dn.displayName="Carousel";var mn=T.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=Ke();return Z("div",{ref:o,className:"overflow-hidden",children:Z("div",{ref:r,className:n("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});mn.displayName="CarouselContent";var un=T.forwardRef(({className:e,...t},r)=>{let{orientation:o}=Ke();return Z("div",{ref:r,role:"group","aria-roledescription":"slide",className:n("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});un.displayName="CarouselItem";var pn=T.forwardRef(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=Ke();return ze("button",{ref:r,className:n("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Z(nn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Previous slide"})]})});pn.displayName="CarouselPrevious";var fn=T.forwardRef(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=Ke();return ze("button",{ref:r,className:n("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Z(sn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Next slide"})]})});fn.displayName="CarouselNext";var gn=tn("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-gray-800/10 bg-white sm:bottom-6 "}}}),sf=({variant:e="simple",className:t})=>{var y;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=Ke(),s=(y=c==null?void 0:c.plugins())==null?void 0:y.autoplay,[d,m]=T.useState(0),[i,p]=T.useState(!1),f=T.useCallback(h=>{m((h==null?void 0:h.selectedScrollSnap())??0)},[]),b=T.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return T.useEffect(()=>{!c||(f(c),p((s==null?void 0:s.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,s,f]),ze("div",{className:n(gn({variant:e}),t),children:[e!=="simple"&&ze("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!l,onClick:b(o),children:[Z(ln,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Z("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,g)=>ze("button",{onClick:b(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-gray-100 active:bg-gray-200 sm:p-1.5",children:[Z("div",{className:n("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===d?"bg-black":"bg-black/20",i&&g===d&&"w-6 bg-black/20"),children:i&&g===d&&Z(an.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jo)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),ze("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&ze("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!a,onClick:b(r),children:[Z(cn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Next slide"})]})]})};import*as st from"@radix-ui/react-checkbox";import{Check as hn}from"lucide-react";import*as ea from"react";import{jsx as fr}from"react/jsx-runtime";var vn=ea.forwardRef(({className:e,...t},r)=>fr(st.Root,{ref:r,className:n("peer h-5 w-5 shrink-0 rounded-md border border-gray-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:fr(st.Indicator,{className:"flex items-center justify-center",children:fr(hn,{className:"h-3 w-3 text-white"})})}));vn.displayName=st.Root.displayName;import{Command as zt,CommandInput as is,CommandItem as ns,useCommandState as ss}from"cmdk";import{ChevronDown as ls}from"lucide-react";import{forwardRef as cs,isValidElement as ds,useCallback as ms,useEffect as It,useRef as us,useState as lt}from"react";import{motion as rs}from"framer-motion";import{forwardRef as os,useRef as as}from"react";import gr from"js-cookie";import{useEffect as bn,useState as yn}from"react";function ff(e,t,r){let[o,a]=yn(()=>{let c=gr.get(e);return c?JSON.parse(c):t});return bn(()=>{let c=()=>{let s=gr.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),gr.set(e,JSON.stringify(c),r)}]}import{useCallback as xn,useEffect as wn,useRef as Cn,useState as Nn}from"react";var je=(e=3e3)=>{let t=Cn(null),[r,o]=Nn(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=xn(async c=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(s){console.error("Failed to copy: ",s)}},[e]);return wn(()=>()=>a(),[]),[r,l]};import{useEffect as kn,useState as Pn}from"react";function yf(){let[e,t]=Pn(null);return kn(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var p,f,b;let d=s[0];if(!d)return;let m=(((p=d.rootBounds)==null?void 0:p.height)||0)*.3+o;for(let y=1;y<s.length;y++){let h=s[y];if(!h)break;(h.boundingClientRect.top<d.boundingClientRect.top||d.boundingClientRect.bottom<o)&&(d=h)}let i=d.target;for(;i&&i.getBoundingClientRect().bottom<o;)i=(f=l.get(i))==null?void 0:f.next;for(;i&&i.getBoundingClientRect().top>m;)i=(b=l.get(i))==null?void 0:b.prev;i&&t(i.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function wf(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as Sn,useState as Rn}from"react";function Pf(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Rn(o??!1);return Sn(()=>{let c=()=>{let d=e.current;if(!d)return;let m=r==null?void 0:r.current,i=d.getBoundingClientRect(),p=m?m.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(i.top<p.bottom&&i.bottom>p.top&&i.left<p.right&&i.right>p.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as Mn,useState as Ln}from"react";function Mf(){let[e,t]=Ln(!1);return Mn(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as En,useState as Tn}from"react";function Af(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}){let[l,c]=Tn(),s=(l==null?void 0:l.isIntersecting)&&a,d=([m])=>{c(m)};return En(()=>{let m=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!m)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(d,p);return f.observe(m),()=>f.disconnect()},[e,JSON.stringify(t),r,o,s]),l}import{createContext as An,useCallback as Dn,useContext as In,useEffect as ta,useId as zn,useState as On}from"react";import{jsx as Vn}from"react/jsx-runtime";var ra=An({listeners:[],setListeners:()=>{}});function _f({children:e}){let[t,r]=On([]);return Vn(ra.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ye(e,t,r={}){let o=zn(),{listeners:a,setListeners:l}=In(ra),c=Dn(s=>{let d=s.target,m=document.getElementById("modal-backdrop");if(s.metaKey||s.ctrlKey||d.tagName==="INPUT"||d.tagName==="TEXTAREA"||!!m!=!!r.modal||(Array.isArray(e)?!e.includes(s.key):s.key!==e))return;let i=a.filter(f=>f.enabled!==!1&&(Array.isArray(f.key)?f.key.includes(s.key):f.key===s.key));!i.length||Xr(i,(f,b)=>(b.priority??0)-(f.priority??0)).slice(-1)[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t]);ta(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),ta(()=>(l(s=>[...s.filter(d=>d.id!==o),{id:o,key:e,...r}]),()=>l(s=>s.filter(d=>d.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as _n,useState as Hn}from"react";function oa(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Bf(e,t){let[r,o]=Hn(oa(e)??t);return _n(()=>{let l=oa(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Fn}from"sonner";import Bn from"swr";function Kf(e,t){let{data:r,isLoading:o,mutate:a}=Bn(e,me);return{data:r,isLoading:o,update:async(l,c)=>Fn.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as sa,useMemo as Kn}from"react";import{useEffect as aa,useState as Wn}from"react";function ia({pageSize:e,page:t,onPageChange:r}){let[o,a]=Wn({pageIndex:t,pageSize:e});return aa(()=>{a(l=>({...l,pageIndex:t}))},[t]),aa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Un,useRouter as $n,useSearchParams as Gn}from"next/navigation";function na(){let e=Un(),t=$n(),r=Gn(),o=Object.fromEntries(r);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:({set:c,del:s,replace:d,scroll:m=!0,getNewPath:i,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,g])=>f.set(h,Array.isArray(g)?g.join(p):g)),s&&(Array.isArray(s)?s.forEach(h=>f.delete(h)):f.delete(s));let b=f.toString(),y=`${e}${b.length>0?`?${b}`:""}`;if(i)return y;d?t.replace(y,{scroll:!1}):t.push(y,{scroll:m})},getQueryString:(c,s)=>{let d=new URLSearchParams(r);c&&Object.entries(c).forEach(([i,p])=>d.set(i,p)),s!=null&&s.ignore&&s.ignore.forEach(i=>d.delete(i));let m=d.toString();return m.length>0?`?${m}`:""}}}function rg(e=Zr){let{searchParams:t,queryParams:r}=na(),o=Kn(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=ia({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return sa(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),sa(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as jn,useState as Yn}from"react";function Tt(e){let[t,r]=Yn(),o=([a])=>{r(a)};return jn(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as qn,useEffect as la,useState as Zn}from"react";function ca(e){let[t,r]=Zn(!1),o=qn(()=>{r(window.scrollY>e)},[e]);return la(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),la(()=>{o()},[o]),t}import{useCallback as Qn,useEffect as Jn,useState as Xn}from"react";function qe(e){let[t,r]=Xn(1),o=Qn(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=Tt(e);return Jn(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as es}from"react";import{toast as ma}from"sonner";import{jsx as At,jsxs as da}from"react/jsx-runtime";function ts({id:e,message:t,undo:r}){let o=()=>{r(),ma.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return es(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),da("div",{className:"flex w-full items-center justify-between space-x-2",children:[da("div",{className:"flex items-center space-x-2",children:[At(lo,{}),At("p",{className:"font-medium",children:t})]}),At("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function hg(){return({id:t,message:r,undo:o,duration:a})=>ma(At(ts,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ua}from"react/jsx-runtime";var ye=os(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var m,i;let s=as(null),d=Tt(s);return ua(rs.div,{ref:c,className:n("overflow-hidden",r),animate:{width:e?((m=d==null?void 0:d.contentRect)==null?void 0:m.width)??"auto":"auto",height:t?((i=d==null?void 0:d.contentRect)==null?void 0:i.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:ua("div",{ref:s,className:n(t&&"h-max",e&&"w-max"),children:a})})});ye.displayName="AnimatedSizeContainer";import*as Ne from"@radix-ui/react-popover";import{Drawer as Ze}from"vaul";import{jsx as xe,jsxs as Dt}from"react/jsx-runtime";function Qe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:s,collisionBoundary:d,sticky:m,onEscapeKeyDown:i,onWheel:p}){let{isMobile:f}=j();return c||f?Dt(Ze.Root,{open:a,onOpenChange:l,children:[xe(Ze.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Dt(Ze.Portal,{children:[xe(Ze.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),Dt(Ze.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",onEscapeKeyDown:i,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[xe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:xe("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),xe("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:t})]}),xe(Ze.Overlay,{})]})]}):Dt(Ne.Root,{open:a,onOpenChange:l,children:[xe(Ne.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),xe(Ne.Portal,{children:xe(Ne.Content,{sideOffset:8,align:r,side:o,className:n("animate-slide-up-fade z-50 items-center rounded-lg border border-gray-200 bg-white drop-shadow-lg sm:block",s),sticky:m,collisionBoundary:d,onEscapeKeyDown:i,onWheel:p,children:t})})]})}import{Fragment as hr,jsx as A,jsxs as ke}from"react/jsx-runtime";function ps(e,t){return e===!0}function $g({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:d,onCreate:m,buttonProps:i,shortcutHint:p,caret:f,side:b,open:y,onOpenChange:h,onSearchChange:g,shouldFilter:C=!0,inputClassName:P,optionRight:S,optionClassName:k,matchTriggerWidth:x,children:v}){let R=ps(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:D}=j(),[q,w]=lt(!1),z=y??q,ce=h??w,[L,de]=lt(""),[ee,nr]=lt(!1),[sr,yi]=lt(void 0),[xi,jr]=lt(!1),wi=O=>{var We;if(R){let lr=I.some(({value:at})=>at===O.value);r(lr?I.filter(({value:at})=>at!==O.value):[...I,O])}else r(I.length&&((We=I[0])==null?void 0:We.value)===O.value?null:O),ce(!1)},Yr=ms((O,We)=>We===""?[...I,...O.filter(lr=>I.findIndex(at=>at.value===lr.value)===-1)]:O,[I]);return It(()=>{ee&&(yi(o&&Yr(o,L)),nr(!1))},[ee,o,Yr,L]),It(()=>{nr(!0)},[o]),It(()=>{z||(de(""),nr(!0))},[z]),It(()=>g==null?void 0:g(L),[L]),A(Qe,{openPopover:z,setOpenPopover:ce,align:"start",side:b,onWheel:O=>{O.stopPropagation()},popoverContentClassName:n(x&&"sm:w-[var(--radix-popover-trigger-width)]"),content:A(ye,{width:!D&&!x,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:ke(zt,{loop:!0,shouldFilter:C,children:[ke("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[A(is,{placeholder:c,value:L,onValueChange:de,className:n("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-400 focus:ring-0 sm:text-sm",P),onKeyDown:O=>{(O.key==="Escape"||O.key==="Backspace"&&!L)&&(O.preventDefault(),O.stopPropagation(),ce(!1))}}),p&&A("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:p})]}),A(fs,{children:A(zt.List,{className:n("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:sr!==void 0?ke(hr,{children:[sr.map(O=>A(gs,{option:O,multiple:R,selected:I.some(({value:We})=>We===O.value),onSelect:()=>wi(O),right:S==null?void 0:S(O),className:k},`${O.label}, ${O.value}`)),L.length>0&&m&&ke(ns,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-gray-700","data-[selected=true]:bg-gray-100",k),onSelect:async()=>{jr(!0),await(m==null?void 0:m(L))&&(de(""),ce(!1)),jr(!1)},children:[xi?A(be,{className:"size-4 shrink-0"}):A(St,{className:"size-4 shrink-0"}),A("div",{className:"grow truncate",children:(d==null?void 0:d(L))||`Create "${L}"`})]}),C?A(hs,{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:s||"No matches"}):sr.length===0?A("div",{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:s||"No matches"}):null]}):A(zt.Loading,{children:A("div",{className:"flex h-12 items-center justify-center",children:A(be,{})})})})})]})}),children:A(ie,{variant:"secondary",...i,className:n(i==null?void 0:i.className,"flex gap-2"),textWrapperClassName:n(i==null?void 0:i.textWrapperClassName,"w-full flex items-center justify-start"),text:ke(hr,{children:[A("div",{className:"min-w-0 grow truncate text-left",children:v||I.map(O=>O.label).join(", ")||l}),f&&A(ls,{className:"ml-1 size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}),icon:a?pa(a)?a:A(a,{className:"size-4 shrink-0"}):void 0})})}var fs=({children:e})=>{let t=us(null),{scrollProgress:r,updateScrollProgress:o}=qe(t);return ke(hr,{children:[A("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),A("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function gs({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return ke(zt.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100",l),onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&A("div",{className:"shrink-0 text-gray-600",children:o?A(So,{className:"size-4 text-gray-600"}):A(Ro,{className:"size-4 text-gray-400"})}),ke("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&A("span",{className:"shrink-0 text-gray-600",children:pa(e.icon)?e.icon:A(e.icon,{className:"h-4 w-4"})}),A("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&A(Po,{className:"size-4 shrink-0 text-gray-600"})]})}var pa=e=>ds(e),hs=cs((e,t)=>ss(o=>o.filtered.count===0)?A("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Ot,format as vs,isSameMonth as bs}from"date-fns";import{ChevronLeft as fa,ChevronRight as ga,ChevronsLeft as ys,ChevronsRight as xs}from"lucide-react";import{forwardRef as ws,useRef as Cs}from"react";import{DayPicker as Ns,useDayPicker as ks,useDayRender as Ps,useNavigation as Ss}from"react-day-picker";import{Fragment as Rs,jsx as re,jsxs as Vt}from"react/jsx-runtime";var ct=ws(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:n("flex h-7 w-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-gray-200 text-gray-600 hover:text-gray-800","hover:bg-gray-50 active:bg-gray-100","disabled:pointer-events-none disabled:text-gray-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));ct.displayName="NavigationButton";function ha({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...d}){return re(Ns,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-gray-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-gray-900",day:n("relative h-10 w-full sm:h-9 sm:w-9 rounded-md text-sm text-gray-900","hover:bg-gray-100 active:bg-gray-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-gray-300 line-through disabled:hover:bg-transparent",day_outside:"text-gray-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(fa,{className:"h-4 w-4"}),IconRight:()=>re(ga,{className:"h-4 w-4"}),Caption:({...m})=>{let{goToMonth:i,nextMonth:p,previousMonth:f,currentMonth:b,displayMonths:y}=Ss(),{numberOfMonths:h,fromDate:g,toDate:C}=ks(),P=y.findIndex(D=>bs(m.displayMonth,D)),S=P===0,k=P===y.length-1,x=h>1&&(S||!k),v=h>1&&(k||!S),R=()=>{let D=Ot(b,-1);f&&(!g||D.getTime()>=g.getTime())&&i(D)},I=()=>{let D=Ot(b,1);p&&(!C||D.getTime()<=C.getTime())&&i(D)};return Vt("div",{className:"flex items-center justify-between",children:[Vt("div",{className:"flex items-center gap-1",children:[o&&!v&&re(ct,{disabled:a||!f||g&&Ot(b,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:ys}),!v&&re(ct,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&i(f),icon:fa})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-gray-900",children:vs(m.displayMonth,"LLLL yyy",{locale:l})}),Vt("div",{className:"flex items-center gap-1",children:[!x&&re(ct,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&i(p),icon:ga}),o&&!x&&re(ct,{disabled:a||!p||C&&Ot(b,1).getTime()>C.getTime(),"aria-label":"Go to next year",onClick:I,icon:xs})]})]})},Day:({date:m,displayMonth:i})=>{let p=Cs(null),{activeModifiers:f,buttonProps:b,divProps:y,isButton:h,isHidden:g}=Ps(m,i,p),{selected:C,today:P,disabled:S,range_middle:k}=f;if(g)return re(Rs,{});if(!h)return re("div",{...y,className:n("flex items-center justify-center",y.className)});let{children:x,...v}=b;return Vt("button",{ref:p,...v,type:"button",children:[x,P&&re("span",{className:n("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!C,"!bg-white":C,"!bg-blue-400":C&&k,"text-gray-400":S})})]})}},...d})}import{enUS as _s}from"date-fns/locale";import{useEffect as Cr,useMemo as ba,useState as Ht}from"react";import{Command as vr}from"cmdk";import{Lock as Ms}from"lucide-react";import{jsx as Oe,jsxs as Ls}from"react/jsx-runtime";var br=({presets:e,onSelect:t,currentValue:r})=>{let o=d=>"dateRange"in d,a=d=>"date"in d,l=(d,m)=>d.getDate()===m.getDate()&&d.getMonth()===m.getMonth()&&d.getFullYear()===m.getFullYear(),c=(d,m)=>{let i=d.from,p=m.from,f=!1;i&&p&&l(i,p)&&(f=!0);let b=d.to,y=m.to,h=!1;return b&&y&&l(b,y)&&(h=!0),f&&h},s=d=>{if(o(d)){let m=r;return m&&c(m,d.dateRange)}else if(a(d)){let m=r;return m&&l(m,d.date)}return!1};return Oe(vr,{className:"w-full rounded ring-gray-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Oe(vr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,m)=>Ls(vr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:n("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-gray-200","px-2.5 py-1.5 text-left text-sm text-gray-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-gray-100",s(d)&&"font-semibold text-gray-800"),children:[Oe("span",{children:d.label}),d.requiresUpgrade?Oe(Ms,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Oe("kbd",{className:"text-gray-4000 hidden rounded bg-gray-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-gray-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&Oe(te,{side:"bottom",content:d.tooltipContent,children:Oe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},m))})})};br.displayName="DatePicker.Presets";import{format as Pe}from"date-fns";import{createContext as Es}from"react";var yr=Es({isOpen:!1,setIsOpen:()=>{}}),Ts=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},xr=(e,t,r=!1)=>{let o=!Ts(),a;return r?a=o?Pe(e,"d MMM, yyyy h:mm a",{locale:t}):Pe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Pe(e,"d MMM, yyyy",{locale:t}),a},va=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:s}=t;if(e&&e.length>0){let d=o,m=r;e.forEach(i=>{var p,f,b,y,h,g;if("date"in i){let C=i.date.getFullYear();if(o&&C<o)throw new Error(`Preset ${i.label} is before fromYear ${d}.`);if(r&&C>r)throw new Error(`Preset ${i.label} is after toYear ${m}.`);if(a&&i.date.getMonth()<a.getMonth())throw new Error(`Preset ${i.label} is before fromMonth ${a}.`);if(l&&i.date.getMonth()>l.getMonth())throw new Error(`Preset ${i.label} is after toMonth ${l}.`);if(c&&i.date.getDate()<c.getDate())throw new Error(`Preset ${i.label} is before fromDay ${c}.`);if(s&&i.date.getDate()>s.getDate())throw new Error(`Preset ${i.label} is after toDay ${Pe(s,"MMM dd, yyyy")}.`)}if("dateRange"in i){let C=(p=i.dateRange.from)==null?void 0:p.getFullYear(),P=(f=i.dateRange.to)==null?void 0:f.getFullYear();if(C&&o&&C<o)throw new Error(`Preset ${i.label}'s 'from' is before fromYear ${d}.`);if(P&&r&&P>r)throw new Error(`Preset ${i.label}'s 'to' is after toYear ${m}.`);if(a){let S=(b=i.dateRange.from)==null?void 0:b.getMonth();if(S&&S<a.getMonth())throw new Error(`Preset ${i.label}'s 'from' is before fromMonth ${Pe(a,"MMM, yyyy")}.`)}if(l){let S=(y=i.dateRange.to)==null?void 0:y.getMonth();if(S&&S>l.getMonth())throw new Error(`Preset ${i.label}'s 'to' is after toMonth ${Pe(l,"MMM, yyyy")}.`)}if(c){let S=(h=i.dateRange.from)==null?void 0:h.getDate();if(S&&S<c.getDate())throw new Error(`Preset ${i.dateRange.from}'s 'from' is before fromDay ${Pe(c,"MMM dd, yyyy")}.`)}if(s){let S=(g=i.dateRange.to)==null?void 0:g.getDate();if(S&&S>s.getDate())throw new Error(`Preset ${i.label}'s 'to' is after toDay ${Pe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as As}from"class-variance-authority";import{Calendar as Ds,ChevronDown as Is}from"lucide-react";import{forwardRef as zs}from"react";import{jsx as _t,jsxs as Vs}from"react/jsx-runtime";var Os=As(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-gray-200 text-gray-900 placeholder-gray-400 transition-all","disabled:pointer-events-none disabled:bg-gray-100 disabled:text-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),wr=zs(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Vs("button",{ref:l,className:n(Os({hasError:o}),e),...a,children:[_t(Ds,{className:n("h-4 w-4 shrink-0 text-gray-400",!!t&&"text-gray-900")}),_t("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:t||(r?_t("span",{className:"text-gray-400",children:r}):null)}),_t(Is,{className:"h-4 w-4 flex-shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));wr.displayName="DatePicker.Trigger";import{jsx as fe,jsxs as Fs}from"react/jsx-runtime";var Hs=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:d=!1,locale:m=_s,placeholder:i="Select date range",hasError:p,align:f="center",className:b,...y})=>{let{isDesktop:h}=j(),[g,C]=Ht(!1),[P,S]=Ht(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,x]=Ht((P==null?void 0:P.dateRange)??e??t??void 0),[v,R]=Ht(k==null?void 0:k.to),I=ba(()=>k,[g]);Cr(()=>{x(e)},[e]),Cr(()=>{let L=a==null?void 0:a.find(({id:de})=>de===r);S(L),x((L==null?void 0:L.dateRange)??e??t)},[a,r]),Cr(()=>{g?k&&R(k.to):R(k==null?void 0:k.to)},[g]);let D=(L,de)=>{let ee=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:de}:L;x(ee),S(void 0),(ee==null?void 0:ee.from)&&(ee==null?void 0:ee.to)&&(o==null||o(ee),C(!1))},q=L=>{x(L.dateRange),S(L),o==null||o(L.dateRange,L),C(!1)},w=()=>{x(I),C(!1)},z=L=>{L||w(),C(L)},ce=ba(()=>k?`${k.from?xr(k.from,m):""} - ${k.to?xr(k.to,m):""}`:null,[k,m]);return Ye((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let de=a==null?void 0:a.find(ee=>ee.shortcut===L.key);de&&q(de)}),fe(yr.Provider,{value:{isOpen:g,setIsOpen:C},children:fe(Qe,{align:f,openPopover:g,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:fe("div",{className:"flex w-full",children:Fs("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&fe("div",{className:n("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-gray-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:fe("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:fe(br,{currentValue:k,presets:a,onSelect:q})})}),fe("div",{className:"scrollbar-hide overflow-x-scroll",children:fe(ha,{mode:"range",selected:k,onSelect:D,month:v,onMonthChange:R,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:d,locale:m,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-gray-200 overflow-x-scroll scrollbar-hide"},...y})})]})}),children:fe(wr,{placeholder:i,disabled:l,className:b,hasError:p,"aria-required":y.required||y["aria-required"],"aria-invalid":y["aria-invalid"],"aria-label":y["aria-label"],"aria-labelledby":y["aria-labelledby"],children:(P==null?void 0:P.label)??ce})})})};function Rh({presets:e,...t}){return e&&va(e,t),fe(Hs,{presets:e,...t})}import{jsx as Ft,jsxs as ya}from"react/jsx-runtime";function Dh({icon:e,title:t,description:r,learnMore:o,children:a}){return ya("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Ft("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-gray-200 bg-gray-50",children:Ft(e,{className:"size-6 text-gray-800"})}),Ft("p",{className:"text-center text-base font-medium text-gray-950",children:t}),r&&ya("p",{className:"max-w-sm text-balance text-center text-sm text-gray-500",children:[r," ",o&&Ft("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-gray-800",children:"Learn more \u2197"})]}),a]})}import{cva as Bs}from"class-variance-authority";import{useState as xa}from"react";import{toast as wa}from"sonner";import{Fragment as Us,jsx as ge,jsxs as kr}from"react/jsx-runtime";var Nr={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"}},Ws=Bs("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-gray-50",{variants:{variant:{default:"rounded-md border border-gray-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function Uh({readFile:e,onChange:t,variant:r,className:o,iconClassName:a,previewClassName:l,customPreview:c,accept:s="any",imageSrc:d,loading:m=!1,clickToUpload:i=!0,showHoverOverlay:p=!0,content:f,maxFileSizeMB:b=0,targetResolution:y,accessibilityLabel:h="File upload",disabled:g=!1}){let[C,P]=xa(!1),[S,k]=xa(null),x=async v=>{let R="dataTransfer"in v?v.dataTransfer.files&&v.dataTransfer.files[0]:v.target.files&&v.target.files[0];if(!R)return;if(k(R.name),b>0&&R.size/1024/1024>b){wa.error(`File size too big (max ${b} MB)`);return}let I=Nr[s].types;if(I.length&&!I.includes(R.type)){wa.error(Nr[s].errorMessage??"File type not supported");return}let D=R;if(y&&R.type.startsWith("image/"))try{let q=await Jr(R,y),w=await fetch(q).then(z=>z.blob());D=new File([w],R.name,{type:R.type})}catch(q){console.error("Error resizing image:",q)}if(e){let q=new FileReader;q.onload=w=>{var z;return t==null?void 0:t({src:(z=w.target)==null?void 0:z.result,file:D})},q.readAsDataURL(D);return}t==null||t({file:D})};return kr("label",{className:n(Ws({variant:r}),g?"cursor-not-allowed":n(i&&"cursor-pointer"),o),children:[m&&ge("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ge(it,{})}),ge("div",{className:"absolute inset-0 z-[5]",onDragOver:v=>{v.preventDefault(),v.stopPropagation(),P(!0)},onDragEnter:v=>{v.preventDefault(),v.stopPropagation(),P(!0)},onDragLeave:v=>{v.preventDefault(),v.stopPropagation(),P(!1)},onDrop:async v=>{v.preventDefault(),v.stopPropagation(),x(v),P(!1)}}),kr("div",{className:n("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",g&&"bg-gray-50",C&&!g&&"cursor-copy border-black bg-gray-50 opacity-100",d?n("opacity-0",p&&!g&&"group-hover:opacity-100"):n(!g&&"group-hover:bg-gray-50")),children:[ge(Ao,{className:n("size-7 transition-all duration-75",g?"text-gray-400":n("text-gray-500 group-hover:scale-110 group-active:scale-95",C?"scale-110":"scale-100"),a)}),f!==null&&ge("div",{className:n("mt-2 text-center text-sm text-gray-500",g&&"text-gray-400"),children:f??ge(Us,{children:kr("p",{children:["Drag and drop ",i&&"or click"," to upload."]})})}),ge("span",{className:"sr-only",children:h})]}),d&&(c??ge("img",{src:d,alt:"Preview",className:n("h-full w-full rounded-[inherit] object-cover",l)})),i&&ge("div",{className:"sr-only mt-1 flex shadow-sm",children:ge("input",{type:"file",accept:Nr[s].types.join(","),onChange:x,disabled:g},S)})]})}import{AnimatePresence as $s,motion as Ca}from"framer-motion";import{X as Gs}from"lucide-react";import{isValidElement as Ks}from"react";import{Fragment as js,jsx as X,jsxs as dt}from"react/jsx-runtime";function ka({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ye("Escape",o,{priority:1}),X(ye,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:dt("div",{className:n("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[X("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:X($s,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return X(Ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-gray-200 bg-white"},`loader-${c}`);let s=e.find(d=>d.key===l);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(d=>{var f,b,y;let m=(f=s.options)==null?void 0:f.find(h=>typeof h.value=="string"&&typeof d=="string"?h.value.toLowerCase()===d.toLowerCase():h.value===d),i=(m==null?void 0:m.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,d,{key:s.key,option:m}))??s.icon,p=(m==null?void 0:m.label)??((y=s.getOptionLabel)==null?void 0:y.call(s,d,{key:s.key,option:m}))??d;return dt(Ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-gray-200 bg-white text-sm text-black",children:[dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[X("span",{className:"shrink-0 text-gray-600",children:Na(s.icon)?s.icon:X(s.icon,{className:"h-4 w-4"})}),s.label]}),X("div",{className:"px-3 py-2 text-gray-500",children:"is"}),X("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?dt(js,{children:[X("span",{className:"shrink-0 text-gray-600",children:Na(i)?i:X(i,{className:"h-4 w-4"})}),Ct(p,30)]}):X("div",{className:"h-5 w-12 animate-pulse rounded-md bg-gray-200"})}),X("button",{type:"button",className:"h-full rounded-r-md p-2 text-gray-500 ring-inset ring-gray-500 hover:bg-gray-100 hover:text-gray-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,d),children:X(Gs,{className:"h-3.5 w-3.5"})})]},`${l}-${d}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-gray-500 ring-inset ring-gray-500 transition-colors hover:border-gray-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",X("kbd",{className:"rounded-md border border-gray-200 px-1.5 py-0.5 text-xs text-gray-950 group-hover:bg-gray-50",children:"ESC"})]})]})})}var Na=e=>Ks(e);import{Command as Se,useCommandState as Ys}from"cmdk";import{ChevronDown as qs,ListFilter as Zs}from"lucide-react";import{Fragment as Qs,forwardRef as Js,isValidElement as Sa,useCallback as Bt,useEffect as Wt,useImperativeHandle as Xs,useRef as Sr,useState as Pr}from"react";import{Fragment as il,jsx as _,jsxs as he}from"react/jsx-runtime";function Ra({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:d,emptyState:m,className:i}){var D,q;let{isMobile:p}=j(),f=Sr(null),b=Sr(),[y,h]=Pr(!1);Ye("f",()=>h(!0),{enabled:!y});let[g,C]=Pr(""),[P,S]=Pr(null),k=Bt(()=>{C(""),S(null)},[]);Wt(()=>{y||k()},[y]);let x=P?e.find(({key:w})=>w===P):null,v=Bt(w=>{f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight}),C(""),S(w),o==null||o(w)},[]),R=Bt(w=>{if(!x||!c)return!1;let z=c.find(({key:ce})=>ce===P);return(z==null?void 0:z.value)===w||z&&x.multiple&&Array.isArray(z.value)&&z.value.includes(w)},[x]),I=Bt(w=>{x&&(R(w)?r(x.key,w):t(x.key,w),x.multiple||h(!1))},[c,x,s]);return Wt(()=>{a==null||a(g)},[g]),Wt(()=>{l==null||l(P)},[P]),Wt(()=>{(x==null?void 0:x.options)&&f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight})},[x==null?void 0:x.options]),_(Qe,{openPopover:y,setOpenPopover:h,onEscapeKeyDown:w=>{P&&(w.preventDefault(),k())},content:_(ye,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:he(Se,{loop:!0,shouldFilter:!x||x.shouldFilter!==!1,children:[he("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[_(tl,{placeholder:`${(x==null?void 0:x.label)||"Filter"}...`,value:g,onValueChange:C,onKeyDown:w=>{(w.key==="Escape"||w.key==="Backspace"&&!g)&&(w.preventDefault(),w.stopPropagation(),P?k():h(!1))},emptySubmit:w=>{w.preventDefault(),w.stopPropagation(),s?(t("ai",x?`${x.label} ${g}`:g),h(!1)):I(g)}}),!x&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:"F"})]}),_(rl,{ref:f,children:he(Se.List,{className:n("flex w-full flex-col gap-1 p-1",x?"min-w-[100px]":"min-w-[180px]"),children:[x?((q=(D=x.options)==null?void 0:D.filter(w=>!g||!w.hideDuringSearch))==null?void 0:q.map(w=>{let z=R(w.value);return _(Pa,{filter:x,option:w,right:z?_(ko,{className:"h-4 w-4"}):w.right,onSelect:()=>I(w.value)},w.value)}))??_(Se.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(be,{})})}):e.map(w=>he(Qs,{children:[_(Pa,{filter:w,onSelect:()=>v(w.key)}),w.separatorAfter&&_(Se.Separator,{className:"-mx-1 my-1 border-b border-gray-200"})]},w.key)),(!x||x.options)&&_(ol,{search:g,askAI:s,children:m?el(m)?(m==null?void 0:m[P??"default"])??"No matches":m:"No matches"})]})},P)]})}),children:he("button",{type:"button",className:n("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-gray-200 bg-white text-gray-900 placeholder-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",i),children:[_(Zs,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:d??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(qs,{className:"size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function el(e){return typeof e=="object"&&e!==null&&!Sa(e)}var tl=e=>{let t=Ys(r=>r.filtered.count===0);return _(Se.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},rl=Js(({children:e},t)=>{let r=Sr(null);Xs(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=qe(r);return he(il,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Pa({filter:e,option:t,right:r,onSelect:o}){var s,d;let{isMobile:a}=j(),l=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((d=e.getOptionLabel)==null?void 0:d.call(e,t.value,{key:e.key,option:t})):e.label;return he(Se.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100"),onPointerDown:m=>{m.preventDefault()},onPointerUp:m=>{m.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-gray-600",children:al(l)?l:_(l,{className:"h-4 w-4"})}),Ct(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-gray-500",children:r})]})}var ol=({search:e,askAI:t,children:r})=>t&&e?he(Se.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-gray-100 px-3 py-2",children:[_(io,{className:"h-4 w-4"}),he("p",{className:"text-center text-sm text-gray-600",children:["Ask AI ",he("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Se.Empty,{className:"p-2 text-center text-sm text-gray-400",children:r}),al=e=>Sa(e);var p1={Select:Ra,List:ka};import{useMemo as nl,useState as Ma}from"react";import{jsx as Ve,jsxs as Ut}from"react/jsx-runtime";function x1({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,d]=Ma(r.defaultValue),[m,i]=Ma(!1),p=nl(()=>m||!s||s===r.defaultValue,[m,s,r.defaultValue]);return Ut("form",{onSubmit:async f=>{f.preventDefault(),i(!0),await c({[r.name]:s}),i(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[Ut("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Ut("div",{className:"flex flex-col space-y-3",children:[Ve("h2",{className:"text-xl font-medium",children:e}),Ve("p",{className:"text-sm text-gray-500",children:t})]}),typeof r.defaultValue=="string"?Ve("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:f=>d(f.target.value),className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":l})}):Ve("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),Ut("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[typeof o=="string"?Ve("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ve("div",{className:"shrink-0",children:Ve(ie,{text:a,loading:m,disabled:p,disabledTooltip:l})})]})]})}import{useId as sl}from"react";import{jsx as $t,jsxs as ll}from"react/jsx-runtime";function La({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=sl();return ll("svg",{className:n("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[$t("defs",{children:$t("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:$t("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),$t("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as cl}from"lucide-react";import dl,{useCallback as ml,useState as ul}from"react";import{jsx as _e,jsxs as Rr}from"react/jsx-runtime";var pl=dl.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=ul(!1),c=ml(()=>l(!a),[a,l]);return Rr("div",{children:[Rr("div",{className:"relative flex",children:[_e("input",{type:a?"text":t,className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Rr("div",{className:"group",children:[r.error&&_e("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:_e(cl,{className:n("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&_e("button",{className:n("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?_e(Do,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0}):_e(Io,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0})})]})]}),r.error&&_e("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});pl.displayName="Input";import{flip as vl,offset as bl,size as yl,useDismiss as xl,useFloating as wl,useInteractions as Cl}from"@floating-ui/react";import{Command as we,useCommandState as Nl}from"cmdk";import{Check as kl,ChevronDown as Pl,Search as Mr,X as Sl}from"lucide-react";import{createContext as Rl,forwardRef as Ml,useContext as Dr,useEffect as Lr,useMemo as Ll,useRef as Ta,useState as Er}from"react";import{Drawer as Je}from"vaul";import fl from"next/image";import{useEffect as gl,useState as Ea}from"react";import{jsx as hl}from"react/jsx-runtime";function Gt(e){let[t,r]=Ea(!0),[o,a]=Ea(e.src);gl(()=>a(e.src),[e.src]);let l=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return hl(fl,{...e,src:o,alt:e.alt,className:n(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as M,jsxs as Q}from"react/jsx-runtime";var Kt=Rl({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function q1({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:d}){let m=Ta(null),[i,p]=Er(!1),[f,b]=Er(""),[y,h]=Er(!1);Lr(()=>{i&&h(!1)},[i]),Lr(()=>h(!0),[f]),Lr(()=>{t&&b(t.value)},[t]);let g=Ll(()=>{let w=f.toLowerCase();return y?e.filter(z=>z.value.toLowerCase().includes(w)):f?e.sort((z,ce)=>(ce.value.toLowerCase().includes(w)?1:0)-(z.value.toLowerCase().includes(w)?1:0)):e},[y,f,e]),{refs:C,floatingStyles:P,context:S}=wl({open:i,onOpenChange:p,middleware:[bl(8),yl({apply({elements:{floating:w},availableHeight:z}){Object.assign(w.style,{maxHeight:`${Math.max(75,Math.min(z,290))}px`})},padding:8}),vl({fallbackStrategy:"initialPlacement",padding:8})]}),k=xl(S),{getReferenceProps:x,getFloatingProps:v}=Cl([k]),R=Ta(null),{scrollProgress:I,updateScrollProgress:D}=qe(R),{isMobile:q}=j();return M(Kt.Provider,{value:{inputAttrs:s||{},openCommandList:i,setOpenCommandList:p,inputValue:f,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:q&&l?Q(Je.Root,{open:i,onOpenChange:p,children:[M(Je.Trigger,{className:"sm:hidden",asChild:!0,children:M(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:Q("div",{className:n("group relative rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500 md:min-w-[140px]",o),children:[M("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{}),M(Ar,{})]})]})})}),M(Je.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),Q(Je.Portal,{children:[M(Je.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-gray-200 bg-white",onPointerDownOutside:w=>{w.target instanceof Element&&w.target.closest("[data-sonner-toast]")&&w.preventDefault()},children:Q(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group relative mb-2 rounded-t-md border-b border-gray-300 bg-white p-1 sm:border sm:py-0 sm:focus-within:border-gray-500 sm:focus-within:ring-1 sm:focus-within:ring-gray-200",o),children:[M("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{}),M(Ar,{})]})]}),i&&Q(we.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(d?M("div",{children:d}):M("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&M(we.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."}),M(Aa,{items:g})]})]})}),M(Je.Overlay,{})]})]}):Q(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group rounded-md border border-gray-200 bg-white px-1 transition-all focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-200",o),children:[M("div",{onClick:()=>p(w=>!w),className:"absolute inset-y-0 left-0 flex cursor-pointer items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{ref:C.setReference,...x()}),M(Ar,{})]})]}),i&&Q("div",{ref:C.setFloating,style:P,...v(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-gray-200 bg-white shadow-md",children:[Q("div",{ref:R,onScroll:D,className:"grow overflow-y-auto p-2",children:[Q(we.List,{children:[e.length===0&&f===""&&(d?M("div",{children:d}):M("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&M(we.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."})]}),M(Aa,{items:g})]}),M("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(I,2)}})]})]})})}var Tr=Ml((e,t)=>{let r=Nl(m=>m.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:d}=Dr(Kt);return M(we.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:s,onKeyDown:m=>{m.key==="Escape"?(m.preventDefault(),l(!1)):m.key==="Enter"&&r?l(!1):m.key.match(/^[a-z0-9]$/i)&&!m.metaKey&&l(!0)},disabled:d,className:"block w-full truncate rounded-md border-none px-0 text-base text-gray-900 placeholder-gray-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Ar(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Dr(Kt);return M("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?M(Sl,{className:"h-4 w-4 text-gray-400 transition-all hover:text-gray-700"}):M(Pl,{className:n("h-4 w-4 text-gray-400 transition-all hover:text-gray-700",{"rotate-180 transform":t})})})}function Aa({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Dr(Kt);return e.map(a=>Q(we.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-gray-100 aria-selected:text-gray-900",children:[Q("div",{className:"flex items-center space-x-2",children:[a.image&&M(Gt,{src:a.image,alt:a.value,className:"h-4 w-4 rounded-full",width:16,height:16}),M("p",{className:n("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&M(Et,{className:"text-xs",variant:"neutral",children:a.label})]}),M(kl,{className:"invisible h-5 w-5 text-gray-500 aria-selected:visible"})]},a.id))}import*as Ir from"@radix-ui/react-label";import{cva as El}from"class-variance-authority";import*as Da from"react";import{jsx as Dl}from"react/jsx-runtime";var Tl=El("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Al=Da.forwardRef(({className:e,...t},r)=>Dl(Ir.Root,{ref:r,className:n(Tl(),e),...t}));Al.displayName=Ir.Root.displayName;import{curveNatural as Ia}from"@visx/curve";import{LinearGradient as za}from"@visx/gradient";import{Group as Il}from"@visx/group";import{ParentSize as zl}from"@visx/responsive";import{scaleLinear as Ol,scaleUtc as Vl}from"@visx/scale";import{Area as _l,AreaClosed as Hl}from"@visx/shape";import{motion as Oa}from"framer-motion";import{useId as Fl,useMemo as Va}from"react";import{jsx as ve,jsxs as zr}from"react/jsx-runtime";function lv(e){return ve(zl,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ve(Bl,{...{width:t,height:r,...e}})})}var Re={top:8,right:2,bottom:2,left:2};function Bl({width:e,height:t,data:r,curve:o=!0,color:a}){let l=Fl(),c=Va(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:s,xScale:d}=Va(()=>{let m=r.map(({value:y})=>y),i=Math.max(...m),p=r.map(({date:y})=>y.getTime()),f=new Date(Math.min(...p)),b=new Date(Math.max(...p));return{yScale:Ol({domain:[-2,Math.max(i,2)],range:[t-Re.top-Re.bottom,0],nice:!0,clamp:!0}),xScale:Vl({domain:[f,b],range:[0,e-Re.left-Re.right],nice:!0})}},[r,t,e]);return zr("svg",{width:e,height:t,children:[zr("defs",{children:[ve(za,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-Re.left-Re.right,gradientUnits:"userSpaceOnUse"}),ve(za,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ve("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:ve("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),zr(Il,{left:Re.left,top:Re.top,children:[ve(_l,{data:r,x:({date:m})=>d(m),y:({value:m})=>s(m)??0,curve:o?Ia:void 0,children:({path:m})=>ve(Oa.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),ve(Hl,{data:r,x:({date:m})=>d(m),y:({value:m})=>s(m)??0,yScale:s,curve:o?Ia:void 0,children:({path:m})=>ve(Oa.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as ne from"@radix-ui/react-dialog";import*as Or from"@radix-ui/react-visually-hidden";import{useRouter as Wl}from"next/navigation";import{Drawer as He}from"vaul";import{jsx as oe,jsxs as Xe}from"react/jsx-runtime";function fv({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let d=Wl(),m=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):d.back())},{isMobile:i}=j();return i&&!l?oe(He.Root,{open:o?r:!0,onOpenChange:p=>{p||m({dragged:!0})},...s,children:Xe(He.Portal,{children:[oe(He.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),oe(He.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-gray-200 bg-white",t),children:Xe("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[Xe(Or.Root,{children:[oe(He.Title,{children:"Modal"}),oe(He.Description,{children:"This is a modal"})]}),oe(Ul,{}),e]})}),oe(He.Overlay,{})]})}):oe(ne.Root,{open:o?r:!0,onOpenChange:p=>{p||m()},children:Xe(ne.Portal,{children:[oe(ne.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),Xe(ne.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-gray-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[Xe(Or.Root,{children:[oe(ne.Title,{children:"Modal"}),oe(ne.Description,{children:"This is a modal"})]}),e]})]})})}function Ul(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})})}import{Fragment as $l,jsx as jt,jsxs as et}from"react/jsx-runtime";var _a=n("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-gray-200 bg-white px-2 text-sm text-gray-600","outline-none hover:bg-gray-50 focus-visible:border-gray-500","disabled:cursor-not-allowed disabled:border-gray-200 disabled:text-gray-400 disabled:bg-gray-100");function vv({pagination:e,setPagination:t,totalCount:r,unit:o=c=>`item${c?"s":""}`,className:a,children:l}){return et("div",{className:n("flex items-center justify-between gap-2 text-sm leading-6 text-gray-600",a),children:[et("div",{className:"flex items-center gap-2",children:[et("div",{children:[jt("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&et($l,{children:[et("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ","of"," "]}),jt("span",{className:"font-medium",children:xt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),et("div",{className:"flex items-center gap-2",children:[jt("button",{type:"button",className:_a,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),jt("button",{type:"button",className:_a,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Me from"@radix-ui/react-radio-group";import{Circle as Gl}from"lucide-react";import*as Vr from"react";import{jsx as Yt}from"react/jsx-runtime";var Kl=Vr.forwardRef(({className:e,...t},r)=>Yt(Me.Root,{className:n("grid gap-2",e),...t,ref:r}));Kl.displayName=Me.Root.displayName;var jl=Vr.forwardRef(({className:e,...t},r)=>Yt(Me.Item,{ref:r,className:n("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Yt(Me.Indicator,{className:"flex items-center justify-center",children:Yt(Gl,{className:"h-2.5 w-2.5 fill-current text-current"})})}));jl.displayName=Me.Item.displayName;import{Drawer as Le}from"vaul";import{jsx as Fe,jsxs as Jl}from"react/jsx-runtime";function Yl({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Le.NestedRoot:Le.Root;return Fe(a,{direction:"right",handleOnly:!0,...o,children:Jl(Le.Portal,{children:[Fe(Le.Overlay,{className:"fixed inset-0 bg-black/20"}),Fe(Le.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:n("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Fe("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function ql({className:e,...t}){return Fe(Le.Title,{className:n("text-xl font-medium text-zinc-900",e),...t})}function Zl(e){return Fe(Le.Description,{...e})}function Ql(e){return Fe(Le.Close,{...e})}var Pv=Object.assign(Yl,{Title:ql,Description:Zl,Close:Ql});import{useEffect as Xl,useRef as ec,useState as tc}from"react";import{jsx as Ha}from"react/jsx-runtime";var rc=`
|
|
2
|
+
import{$ as Nm,$a as cu,$b as Qu,A as wo,Aa as Eo,Ab as Lu,Ac as xp,B as Qd,Ba as To,Bb as Eu,Bc as wp,C as Jd,Ca as Wm,Cb as Tu,Cc as Cp,D as Xd,Da as Um,Db as Au,Dc as Np,E as em,Ea as cr,Eb as Du,Ec as kp,F as tm,Fa as $m,Fb as Fo,Fc as Pp,G as rm,Ga as Gm,Gb as Bo,Gc as Sp,H as om,Ha as Km,Hb as Wo,Hc as Rp,I as am,Ia as Ao,Ib as Iu,Ic as Mp,J as im,Ja as jm,Jb as zu,Jc as Lp,K as nm,Ka as Ym,Kb as Ou,Kc as Ep,L as sm,La as qm,Lb as Uo,Lc as Tp,M as lm,Ma as kt,Mb as Vu,Mc as Ap,N as cm,Na as Zm,Nb as _u,Nc as Dp,O as dm,Oa as Qm,Ob as Hu,Oc as Ip,P as mm,Pa as Jm,Pb as Fu,Pc as zp,Q as um,Qa as Xm,Qb as $o,Qc as Op,R as pm,Ra as eu,Rb as Bu,Rc as Vp,S as fm,Sa as tu,Sb as Wu,Sc as _p,T as gm,Ta as ru,Tb as Uu,Tc as Hp,U as hm,Ua as Pt,Ub as $u,Uc as Fp,V as vm,Va as ou,Vb as Gu,Vc as Bp,W as bm,Wa as au,Wb as Ku,Wc as Wp,X as ym,Xa as iu,Xb as ju,Xc as Up,Y as xm,Ya as nu,Yb as Yu,Yc as $p,Z as wm,Za as su,Zb as qu,_ as Cm,_a as lu,_b as Zu,a as oo,aa as km,ab as du,ac as Ju,b as ao,ba as Pm,bb as mu,bc as Go,c as io,ca as Sm,cb as uu,cc as Xu,d as $d,da as Rm,db as Do,dc as ep,e as no,ea as Mm,eb as Io,ec as tp,f as so,fa as Co,fb as zo,fc as rp,g as lo,ga as Lm,gb as pu,gc as op,h as co,ha as Em,hb as fu,hc as ap,i as it,ia as Tm,ib as gu,ic as ip,j as Gd,ja as No,jb as hu,jc as St,k as be,ka as Am,kb as vu,kc as np,l as Kd,la as Dm,lb as Oo,lc as sp,m as mo,ma as Im,mb as bu,mc as lp,n as jd,na as zm,nb as yu,nc as cp,o as uo,oa as Om,ob as xu,oc as Ko,p as Yd,pa as Vm,pb as wu,pc as dp,q as po,qa as _m,qb as Cu,qc as mp,r as fo,ra as ko,rb as Nu,rc as jo,s as qd,sa as Po,sb as ku,sc as up,t as go,ta as So,tb as Pu,tc as pp,u as Zd,ua as Ro,ub as Vo,uc as fp,v as ho,va as Mo,vb as Su,vc as gp,w as vo,wa as Hm,wb as Ru,wc as hp,x as bo,xa as Fm,xb as _o,xc as vp,y as yo,ya as Bm,yb as Mu,yc as bp,z as xo,za as Lo,zb as Ho,zc as yp}from"./chunk-6KGANRN2.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as qr,b as V,c as xt,d as wt,e as Zr,f as Ue,g as Qr,h as Jr,i as Ct,j as Xr,k as eo,l as Nt,m as to,n as me,o as n,p as ro}from"./chunk-ETTCESDB.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as Ci}from"lucide-react";import*as Mt from"react";import{jsx as Rt,jsxs as Si}from"react/jsx-runtime";var Zp=ae.Root,Ni=Mt.forwardRef(({className:e,...t},r)=>Rt(ae.Item,{ref:r,className:n("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var ki=Mt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?Ci:St;return Rt(ae.Header,{className:"flex",children:Si(ae.Trigger,{ref:a,className:n("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,Rt(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});ki.displayName=ae.Trigger.displayName;var Pi=Mt.forwardRef(({className:e,children:t,...r},o)=>Rt(ae.Content,{ref:o,className:n("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-gray-500 transition-all sm:text-base",e),...r,children:t}));Pi.displayName=ae.Content.displayName;import{cva as Ri}from"class-variance-authority";import*as Lt from"react";import{jsx as dr}from"react/jsx-runtime";var Mi=Ri("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Li=Lt.forwardRef(({className:e,variant:t,...r},o)=>dr("div",{ref:o,role:"alert",className:n(Mi({variant:t}),e),...r}));Li.displayName="Alert";var Ei=Lt.forwardRef(({className:e,...t},r)=>dr("h5",{ref:r,className:n("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Ei.displayName="AlertTitle";var Ti=Lt.forwardRef(({className:e,...t},r)=>dr("div",{ref:r,className:n("text-sm [&_p]:leading-relaxed",e),...t}));Ti.displayName="AlertDescription";import{sha256 as Ai}from"js-sha256";import{useState as Di}from"react";import{jsx as mr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Ai(e.email)}?d=${encodeURIComponent(r)}`:t}function a0({user:e={},className:t}){if(!e)return mr("div",{className:n("h-10 w-10 animate-pulse rounded-full border border-gray-300 bg-gray-100",t)});let[r,o]=Di(Ii(e));return mr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:n("h-10 w-10 rounded-full border border-gray-300",t),draggable:!1,onError:()=>{o(`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function i0({id:e,className:t}){return mr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:n("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as zi}from"class-variance-authority";import{jsx as Vi}from"react/jsx-runtime";var Oi=zi("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-gray-400 text-gray-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-gray-200 bg-gray-100 text-gray-800",neutral:"border-gray-400 text-gray-500",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function Et({className:e,variant:t,...r}){return Vi("span",{className:n(Oi({variant:t}),e),...r})}import{cva as Wi}from"class-variance-authority";import{forwardRef as Ui}from"react";import*as ue from"@radix-ui/react-tooltip";import _i from"linkify-react";import{HelpCircle as Hi}from"lucide-react";import Fi from"next/link";import{useState as Bi}from"react";import{jsx as U,jsxs as $e}from"react/jsx-runtime";function y0({children:e}){return U(ue.Provider,{delayDuration:150,children:e})}function te({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,...l}){let[c,s]=Bi(!1);return $e(ue.Root,{open:c,onOpenChange:s,delayDuration:0,disableHoverableContent:a,children:[U(ue.Trigger,{asChild:!0,onClick:()=>{s(!0)},onBlur:()=>{s(!1)},children:e}),U(ue.Portal,{children:U(ue.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",collisionPadding:0,...l,children:typeof t=="string"?U("span",{className:n("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-gray-700",r),children:t}):typeof t=="function"?t({setOpen:s}):t})})]})}function x0({title:e,cta:t,href:r,target:o,onClick:a}){return $e("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-gray-700",children:e}),t&&(r?U(Fi,{href:r,...o?{target:o}:{},className:n(pe({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function w0({title:e,cta:t,href:r}){return $e("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:t})]})}function C0({children:e}){return U("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-gray-700",children:U(_i,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-gray-400 hover:text-gray-700"},children:e})})}function N0(e){return U(te,{...e,children:U(Hi,{className:"h-4 w-4 text-gray-500"})})}function k0({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(te,{content:$e("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[$e("p",{className:"text-sm font-semibold text-gray-700",children:[r,xt(e||0,{full:!0})," ",t]}),a&&$e("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",eo(a,{withAgo:!0})]})]}),children:o})}function P0({children:e,content:t,...r}){return U(te,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(Et,{variant:"gray",className:"border-gray-300 transition-all hover:bg-gray-200",children:e})})})}function S0({children:e,tooltipProps:t,...r}){return U(te,{...t,children:U("button",{type:"button",...r,className:n("flex h-6 w-6 items-center justify-center rounded-md text-gray-500 transition-colors duration-75 hover:bg-gray-100 active:bg-gray-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}import{jsx as Ge,jsxs as Yo}from"react/jsx-runtime";var pe=Wi("transition-all",{variants:{variant:{primary:"border-black bg-black text-white hover:bg-gray-800 hover:ring-4 hover:ring-gray-200",secondary:n("border-gray-200 bg-white text-gray-900 hover:bg-gray-50 focus-visible:border-gray-500 outline-none","data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"),outline:"border-transparent text-neutral-600 hover:bg-neutral-100",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Ui(({text:e,variant:t="primary",className:r,textWrapperClassName:o,loading:a,icon:l,shortcut:c,disabledTooltip:s,right:d,...m},i)=>s?Ge(te,{content:s,children:Yo("div",{className:n("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[l,e&&Ge("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Ge("kbd",{className:n("hidden rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-400 md:inline-block",{"bg-gray-100":t==null?void 0:t.endsWith("outline")}),children:c})]})}):Yo("button",{ref:i,type:m.onClick?"button":"submit",className:n("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",m.disabled||a?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400 outline-none":pe({variant:t}),r),disabled:m.disabled||a,...m,children:[a?Ge(be,{}):l||null,e&&Ge("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Ge("kbd",{className:n("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-gray-700 text-gray-400 group-hover:bg-gray-600 group-hover:text-gray-300":t==="primary","bg-gray-200 text-gray-400 group-hover:bg-gray-100 group-hover:text-gray-500":t==="secondary","bg-gray-100 text-gray-500 group-hover:bg-gray-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"}),children:c}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Gi}from"react";import{jsx as qo}from"react/jsx-runtime";var Ki=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),nt=Gi({variant:"loose"});function Zo({variant:e="loose",loading:t=!1,className:r,children:o}){return qo("ul",{className:n(Ki({variant:e,loading:t}),r),"data-variant":e,children:qo(nt.Provider,{value:{variant:e},children:o})})}import{cva as ji}from"class-variance-authority";import{createContext as Yi,useContext as qi,useEffect as Zi,useRef as Qi,useState as Ji}from"react";import{jsx as ur}from"react/jsx-runtime";var Xi=ji("w-full group/card border-gray-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-gray-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),en="w-full py-2.5 px-4",pr=Yi({hovered:!1});function Qo({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0}){let{variant:l}=qi(nt),c=Qi(null),[s,d]=Ji(!1);return Zi(()=>{if(!s||!c.current)return;let m=setInterval(()=>{var i;((i=c.current)==null?void 0:i.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(m)},[s]),ur("li",{ref:c,className:n(Xi({variant:l}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:ur("div",{className:n(en,t),onClick:o?m=>{document.getElementById("modal-backdrop")||Nt(m)||o()}:void 0,children:ur(pr.Provider,{value:{hovered:s},children:r})})})}var Z0=Object.assign(Zo,{Card:Object.assign(Qo,{Context:pr}),Context:nt});import{cva as tn}from"class-variance-authority";import rn from"embla-carousel-autoplay";import on from"embla-carousel-react";import{motion as an}from"framer-motion";import{ArrowLeft as nn,ArrowRight as sn,ChevronLeft as ln,ChevronRight as cn}from"lucide-react";import*as T from"react";import{jsx as Z,jsxs as ze}from"react/jsx-runtime";var Jo=2e3,Xo=T.createContext(null);function Ke(){let e=T.useContext(Xo);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function sf(){let{api:e}=Ke(),[t,r]=T.useState(0),o=T.useCallback(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return T.useEffect(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var dn=T.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},d)=>{let[m,i]=on({...t,axis:e==="horizontal"?"x":"y"},[...o?[rn(typeof o=="object"?o:{delay:Jo})]:[],...a||[]]),[p,f]=T.useState(!1),[b,y]=T.useState(!1),h=T.useCallback(S=>{!S||(f(S.canScrollPrev()),y(S.canScrollNext()))},[]),g=T.useCallback(()=>{i==null||i.scrollPrev()},[i]),C=T.useCallback(()=>{i==null||i.scrollNext()},[i]),P=T.useCallback(S=>{S.key==="ArrowLeft"?(S.preventDefault(),g()):S.key==="ArrowRight"&&(S.preventDefault(),C())},[g,C]);return T.useEffect(()=>{!i||!r||r(i)},[i,r]),T.useEffect(()=>{if(!!i)return h(i),i.on("reInit",h),i.on("select",h),()=>{i==null||i.off("select",h)}},[i,h]),Z(Xo.Provider,{value:{carouselRef:m,api:i,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:C,canScrollPrev:p,canScrollNext:b},children:Z("div",{ref:d,onKeyDownCapture:P,className:n("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});dn.displayName="Carousel";var mn=T.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=Ke();return Z("div",{ref:o,className:"overflow-hidden",children:Z("div",{ref:r,className:n("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});mn.displayName="CarouselContent";var un=T.forwardRef(({className:e,...t},r)=>{let{orientation:o}=Ke();return Z("div",{ref:r,role:"group","aria-roledescription":"slide",className:n("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});un.displayName="CarouselItem";var pn=T.forwardRef(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=Ke();return ze("button",{ref:r,className:n("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Z(nn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Previous slide"})]})});pn.displayName="CarouselPrevious";var fn=T.forwardRef(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=Ke();return ze("button",{ref:r,className:n("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Z(sn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Next slide"})]})});fn.displayName="CarouselNext";var gn=tn("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-gray-800/10 bg-white sm:bottom-6 "}}}),lf=({variant:e="simple",className:t})=>{var y;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=Ke(),s=(y=c==null?void 0:c.plugins())==null?void 0:y.autoplay,[d,m]=T.useState(0),[i,p]=T.useState(!1),f=T.useCallback(h=>{m((h==null?void 0:h.selectedScrollSnap())??0)},[]),b=T.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return T.useEffect(()=>{!c||(f(c),p((s==null?void 0:s.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,s,f]),ze("div",{className:n(gn({variant:e}),t),children:[e!=="simple"&&ze("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!l,onClick:b(o),children:[Z(ln,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Z("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,g)=>ze("button",{onClick:b(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-gray-100 active:bg-gray-200 sm:p-1.5",children:[Z("div",{className:n("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===d?"bg-black":"bg-black/20",i&&g===d&&"w-6 bg-black/20"),children:i&&g===d&&Z(an.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jo)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),ze("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&ze("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!a,onClick:b(r),children:[Z(cn,{className:"h-4 w-4"}),Z("span",{className:"sr-only",children:"Next slide"})]})]})};import*as st from"@radix-ui/react-checkbox";import{Check as hn}from"lucide-react";import*as ea from"react";import{jsx as fr}from"react/jsx-runtime";var vn=ea.forwardRef(({className:e,...t},r)=>fr(st.Root,{ref:r,className:n("peer h-5 w-5 shrink-0 rounded-md border border-gray-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:fr(st.Indicator,{className:"flex items-center justify-center",children:fr(hn,{className:"h-3 w-3 text-white"})})}));vn.displayName=st.Root.displayName;import{Command as zt,CommandInput as ns,CommandItem as ss,useCommandState as ls}from"cmdk";import{ChevronDown as cs}from"lucide-react";import{forwardRef as ds,isValidElement as ms,useCallback as us,useEffect as It,useRef as ps,useState as lt}from"react";import{motion as os}from"framer-motion";import{forwardRef as as,useRef as is}from"react";import gr from"js-cookie";import{useEffect as bn,useState as yn}from"react";function gf(e,t,r){let[o,a]=yn(()=>{let c=gr.get(e);return c?JSON.parse(c):t});return bn(()=>{let c=()=>{let s=gr.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),gr.set(e,JSON.stringify(c),r)}]}import{useCallback as xn,useEffect as wn,useRef as Cn,useState as Nn}from"react";var je=(e=3e3)=>{let t=Cn(null),[r,o]=Nn(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=xn(async c=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(s){console.error("Failed to copy: ",s)}},[e]);return wn(()=>()=>a(),[]),[r,l]};import{useEffect as kn,useState as Pn}from"react";function xf(){let[e,t]=Pn(null);return kn(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var p,f,b;let d=s[0];if(!d)return;let m=(((p=d.rootBounds)==null?void 0:p.height)||0)*.3+o;for(let y=1;y<s.length;y++){let h=s[y];if(!h)break;(h.boundingClientRect.top<d.boundingClientRect.top||d.boundingClientRect.bottom<o)&&(d=h)}let i=d.target;for(;i&&i.getBoundingClientRect().bottom<o;)i=(f=l.get(i))==null?void 0:f.next;for(;i&&i.getBoundingClientRect().top>m;)i=(b=l.get(i))==null?void 0:b.prev;i&&t(i.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function Cf(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as Sn,useState as Rn}from"react";function Sf(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Rn(o??!1);return Sn(()=>{let c=()=>{let d=e.current;if(!d)return;let m=r==null?void 0:r.current,i=d.getBoundingClientRect(),p=m?m.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(i.top<p.bottom&&i.bottom>p.top&&i.left<p.right&&i.right>p.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as Mn,useState as Ln}from"react";function Lf(){let[e,t]=Ln(!1);return Mn(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as En,useState as Tn}from"react";function Df(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}){let[l,c]=Tn(),s=(l==null?void 0:l.isIntersecting)&&a,d=([m])=>{c(m)};return En(()=>{let m=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!m)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(d,p);return f.observe(m),()=>f.disconnect()},[e,JSON.stringify(t),r,o,s]),l}import{createContext as An,useCallback as Dn,useContext as In,useEffect as ta,useId as zn,useState as On}from"react";import{jsx as Vn}from"react/jsx-runtime";var ra=An({listeners:[],setListeners:()=>{}});function Hf({children:e}){let[t,r]=On([]);return Vn(ra.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ye(e,t,r={}){let o=zn(),{listeners:a,setListeners:l}=In(ra),c=Dn(s=>{let d=s.target,m=document.getElementById("modal-backdrop");if(s.metaKey||s.ctrlKey||d.tagName==="INPUT"||d.tagName==="TEXTAREA"||!!m!=!!r.modal||(Array.isArray(e)?!e.includes(s.key):s.key!==e))return;let i=a.filter(f=>f.enabled!==!1&&(Array.isArray(f.key)?f.key.includes(s.key):f.key===s.key));!i.length||Xr(i,(f,b)=>(b.priority??0)-(f.priority??0)).slice(-1)[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t]);ta(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),ta(()=>(l(s=>[...s.filter(d=>d.id!==o),{id:o,key:e,...r}]),()=>l(s=>s.filter(d=>d.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as _n,useState as Hn}from"react";function oa(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Wf(e,t){let[r,o]=Hn(oa(e)??t);return _n(()=>{let l=oa(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Fn}from"sonner";import Bn from"swr";function jf(e,t){let{data:r,isLoading:o,mutate:a}=Bn(e,me);return{data:r,isLoading:o,update:async(l,c)=>Fn.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as sa,useMemo as Kn}from"react";import{useEffect as aa,useState as Wn}from"react";function ia({pageSize:e,page:t,onPageChange:r}){let[o,a]=Wn({pageIndex:t,pageSize:e});return aa(()=>{a(l=>({...l,pageIndex:t}))},[t]),aa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Un,useRouter as $n,useSearchParams as Gn}from"next/navigation";function na(){let e=Un(),t=$n(),r=Gn(),o=Object.fromEntries(r);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:({set:c,del:s,replace:d,scroll:m=!0,getNewPath:i,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,g])=>f.set(h,Array.isArray(g)?g.join(p):g)),s&&(Array.isArray(s)?s.forEach(h=>f.delete(h)):f.delete(s));let b=f.toString(),y=`${e}${b.length>0?`?${b}`:""}`;if(i)return y;d?t.replace(y,{scroll:!1}):t.push(y,{scroll:m})},getQueryString:(c,s)=>{let d=new URLSearchParams(r);c&&Object.entries(c).forEach(([i,p])=>d.set(i,p)),s!=null&&s.ignore&&s.ignore.forEach(i=>d.delete(i));let m=d.toString();return m.length>0?`?${m}`:""}}}function og(e=Zr){let{searchParams:t,queryParams:r}=na(),o=Kn(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=ia({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return sa(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),sa(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as jn}from"react";function ng(){jn(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useEffect as Yn,useState as qn}from"react";function Tt(e){let[t,r]=qn(),o=([a])=>{r(a)};return Yn(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as Zn,useEffect as la,useState as Qn}from"react";function ca(e){let[t,r]=Qn(!1),o=Zn(()=>{r(window.scrollY>e)},[e]);return la(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),la(()=>{o()},[o]),t}import{useCallback as Jn,useEffect as Xn,useState as es}from"react";function qe(e){let[t,r]=es(1),o=Jn(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=Tt(e);return Xn(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ts}from"react";import{toast as ma}from"sonner";import{jsx as At,jsxs as da}from"react/jsx-runtime";function rs({id:e,message:t,undo:r}){let o=()=>{r(),ma.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ts(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),da("div",{className:"flex w-full items-center justify-between space-x-2",children:[da("div",{className:"flex items-center space-x-2",children:[At(lo,{}),At("p",{className:"font-medium",children:t})]}),At("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function xg(){return({id:t,message:r,undo:o,duration:a})=>ma(At(rs,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ua}from"react/jsx-runtime";var ye=as(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var m,i;let s=is(null),d=Tt(s);return ua(os.div,{ref:c,className:n("overflow-hidden",r),animate:{width:e?((m=d==null?void 0:d.contentRect)==null?void 0:m.width)??"auto":"auto",height:t?((i=d==null?void 0:d.contentRect)==null?void 0:i.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:ua("div",{ref:s,className:n(t&&"h-max",e&&"w-max"),children:a})})});ye.displayName="AnimatedSizeContainer";import*as Ne from"@radix-ui/react-popover";import{Drawer as Ze}from"vaul";import{jsx as xe,jsxs as Dt}from"react/jsx-runtime";function Qe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:s,collisionBoundary:d,sticky:m,onEscapeKeyDown:i,onWheel:p}){let{isMobile:f}=j();return c||f?Dt(Ze.Root,{open:a,onOpenChange:l,children:[xe(Ze.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Dt(Ze.Portal,{children:[xe(Ze.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),Dt(Ze.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",onEscapeKeyDown:i,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[xe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:xe("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),xe("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:t})]}),xe(Ze.Overlay,{})]})]}):Dt(Ne.Root,{open:a,onOpenChange:l,children:[xe(Ne.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),xe(Ne.Portal,{children:xe(Ne.Content,{sideOffset:8,align:r,side:o,className:n("animate-slide-up-fade z-50 items-center rounded-lg border border-gray-200 bg-white drop-shadow-lg sm:block",s),sticky:m,collisionBoundary:d,onEscapeKeyDown:i,onWheel:p,children:t})})]})}import{Fragment as hr,jsx as A,jsxs as ke}from"react/jsx-runtime";function fs(e,t){return e===!0}function Yg({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:d,onCreate:m,buttonProps:i,shortcutHint:p,caret:f,side:b,open:y,onOpenChange:h,onSearchChange:g,shouldFilter:C=!0,inputClassName:P,optionRight:S,optionClassName:k,matchTriggerWidth:x,children:v}){let R=fs(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:D}=j(),[q,w]=lt(!1),z=y??q,ce=h??w,[L,de]=lt(""),[ee,nr]=lt(!1),[sr,yi]=lt(void 0),[xi,jr]=lt(!1),wi=O=>{var We;if(R){let lr=I.some(({value:at})=>at===O.value);r(lr?I.filter(({value:at})=>at!==O.value):[...I,O])}else r(I.length&&((We=I[0])==null?void 0:We.value)===O.value?null:O),ce(!1)},Yr=us((O,We)=>We===""?[...I,...O.filter(lr=>I.findIndex(at=>at.value===lr.value)===-1)]:O,[I]);return It(()=>{ee&&(yi(o&&Yr(o,L)),nr(!1))},[ee,o,Yr,L]),It(()=>{nr(!0)},[o]),It(()=>{z||(de(""),nr(!0))},[z]),It(()=>g==null?void 0:g(L),[L]),A(Qe,{openPopover:z,setOpenPopover:ce,align:"start",side:b,onWheel:O=>{O.stopPropagation()},popoverContentClassName:n(x&&"sm:w-[var(--radix-popover-trigger-width)]"),content:A(ye,{width:!D&&!x,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:ke(zt,{loop:!0,shouldFilter:C,children:[ke("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[A(ns,{placeholder:c,value:L,onValueChange:de,className:n("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-400 focus:ring-0 sm:text-sm",P),onKeyDown:O=>{(O.key==="Escape"||O.key==="Backspace"&&!L)&&(O.preventDefault(),O.stopPropagation(),ce(!1))}}),p&&A("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:p})]}),A(gs,{children:A(zt.List,{className:n("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:sr!==void 0?ke(hr,{children:[sr.map(O=>A(hs,{option:O,multiple:R,selected:I.some(({value:We})=>We===O.value),onSelect:()=>wi(O),right:S==null?void 0:S(O),className:k},`${O.label}, ${O.value}`)),L.length>0&&m&&ke(ss,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-gray-700","data-[selected=true]:bg-gray-100",k),onSelect:async()=>{jr(!0),await(m==null?void 0:m(L))&&(de(""),ce(!1)),jr(!1)},children:[xi?A(be,{className:"size-4 shrink-0"}):A(St,{className:"size-4 shrink-0"}),A("div",{className:"grow truncate",children:(d==null?void 0:d(L))||`Create "${L}"`})]}),C?A(vs,{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:s||"No matches"}):sr.length===0?A("div",{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:s||"No matches"}):null]}):A(zt.Loading,{children:A("div",{className:"flex h-12 items-center justify-center",children:A(be,{})})})})})]})}),children:A(ie,{variant:"secondary",...i,className:n(i==null?void 0:i.className,"flex gap-2"),textWrapperClassName:n(i==null?void 0:i.textWrapperClassName,"w-full flex items-center justify-start"),text:ke(hr,{children:[A("div",{className:"min-w-0 grow truncate text-left",children:v||I.map(O=>O.label).join(", ")||l}),f&&A(cs,{className:"ml-1 size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}),icon:a?pa(a)?a:A(a,{className:"size-4 shrink-0"}):void 0})})}var gs=({children:e})=>{let t=ps(null),{scrollProgress:r,updateScrollProgress:o}=qe(t);return ke(hr,{children:[A("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),A("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function hs({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return ke(zt.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100",l),onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&A("div",{className:"shrink-0 text-gray-600",children:o?A(So,{className:"size-4 text-gray-600"}):A(Ro,{className:"size-4 text-gray-400"})}),ke("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&A("span",{className:"shrink-0 text-gray-600",children:pa(e.icon)?e.icon:A(e.icon,{className:"h-4 w-4"})}),A("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&A(Po,{className:"size-4 shrink-0 text-gray-600"})]})}var pa=e=>ms(e),vs=ds((e,t)=>ls(o=>o.filtered.count===0)?A("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Ot,format as bs,isSameMonth as ys}from"date-fns";import{ChevronLeft as fa,ChevronRight as ga,ChevronsLeft as xs,ChevronsRight as ws}from"lucide-react";import{forwardRef as Cs,useRef as Ns}from"react";import{DayPicker as ks,useDayPicker as Ps,useDayRender as Ss,useNavigation as Rs}from"react-day-picker";import{Fragment as Ms,jsx as re,jsxs as Vt}from"react/jsx-runtime";var ct=Cs(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:n("flex h-7 w-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-gray-200 text-gray-600 hover:text-gray-800","hover:bg-gray-50 active:bg-gray-100","disabled:pointer-events-none disabled:text-gray-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));ct.displayName="NavigationButton";function ha({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...d}){return re(ks,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-gray-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-gray-900",day:n("relative h-10 w-full sm:h-9 sm:w-9 rounded-md text-sm text-gray-900","hover:bg-gray-100 active:bg-gray-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-gray-300 line-through disabled:hover:bg-transparent",day_outside:"text-gray-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(fa,{className:"h-4 w-4"}),IconRight:()=>re(ga,{className:"h-4 w-4"}),Caption:({...m})=>{let{goToMonth:i,nextMonth:p,previousMonth:f,currentMonth:b,displayMonths:y}=Rs(),{numberOfMonths:h,fromDate:g,toDate:C}=Ps(),P=y.findIndex(D=>ys(m.displayMonth,D)),S=P===0,k=P===y.length-1,x=h>1&&(S||!k),v=h>1&&(k||!S),R=()=>{let D=Ot(b,-1);f&&(!g||D.getTime()>=g.getTime())&&i(D)},I=()=>{let D=Ot(b,1);p&&(!C||D.getTime()<=C.getTime())&&i(D)};return Vt("div",{className:"flex items-center justify-between",children:[Vt("div",{className:"flex items-center gap-1",children:[o&&!v&&re(ct,{disabled:a||!f||g&&Ot(b,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:xs}),!v&&re(ct,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&i(f),icon:fa})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-gray-900",children:bs(m.displayMonth,"LLLL yyy",{locale:l})}),Vt("div",{className:"flex items-center gap-1",children:[!x&&re(ct,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&i(p),icon:ga}),o&&!x&&re(ct,{disabled:a||!p||C&&Ot(b,1).getTime()>C.getTime(),"aria-label":"Go to next year",onClick:I,icon:ws})]})]})},Day:({date:m,displayMonth:i})=>{let p=Ns(null),{activeModifiers:f,buttonProps:b,divProps:y,isButton:h,isHidden:g}=Ss(m,i,p),{selected:C,today:P,disabled:S,range_middle:k}=f;if(g)return re(Ms,{});if(!h)return re("div",{...y,className:n("flex items-center justify-center",y.className)});let{children:x,...v}=b;return Vt("button",{ref:p,...v,type:"button",children:[x,P&&re("span",{className:n("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!C,"!bg-white":C,"!bg-blue-400":C&&k,"text-gray-400":S})})]})}},...d})}import{enUS as Hs}from"date-fns/locale";import{useEffect as Cr,useMemo as ba,useState as Ht}from"react";import{Command as vr}from"cmdk";import{Lock as Ls}from"lucide-react";import{jsx as Oe,jsxs as Es}from"react/jsx-runtime";var br=({presets:e,onSelect:t,currentValue:r})=>{let o=d=>"dateRange"in d,a=d=>"date"in d,l=(d,m)=>d.getDate()===m.getDate()&&d.getMonth()===m.getMonth()&&d.getFullYear()===m.getFullYear(),c=(d,m)=>{let i=d.from,p=m.from,f=!1;i&&p&&l(i,p)&&(f=!0);let b=d.to,y=m.to,h=!1;return b&&y&&l(b,y)&&(h=!0),f&&h},s=d=>{if(o(d)){let m=r;return m&&c(m,d.dateRange)}else if(a(d)){let m=r;return m&&l(m,d.date)}return!1};return Oe(vr,{className:"w-full rounded ring-gray-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Oe(vr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,m)=>Es(vr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:n("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-gray-200","px-2.5 py-1.5 text-left text-sm text-gray-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-gray-100",s(d)&&"font-semibold text-gray-800"),children:[Oe("span",{children:d.label}),d.requiresUpgrade?Oe(Ls,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Oe("kbd",{className:"text-gray-4000 hidden rounded bg-gray-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-gray-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&Oe(te,{side:"bottom",content:d.tooltipContent,children:Oe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},m))})})};br.displayName="DatePicker.Presets";import{format as Pe}from"date-fns";import{createContext as Ts}from"react";var yr=Ts({isOpen:!1,setIsOpen:()=>{}}),As=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},xr=(e,t,r=!1)=>{let o=!As(),a;return r?a=o?Pe(e,"d MMM, yyyy h:mm a",{locale:t}):Pe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Pe(e,"d MMM, yyyy",{locale:t}),a},va=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:s}=t;if(e&&e.length>0){let d=o,m=r;e.forEach(i=>{var p,f,b,y,h,g;if("date"in i){let C=i.date.getFullYear();if(o&&C<o)throw new Error(`Preset ${i.label} is before fromYear ${d}.`);if(r&&C>r)throw new Error(`Preset ${i.label} is after toYear ${m}.`);if(a&&i.date.getMonth()<a.getMonth())throw new Error(`Preset ${i.label} is before fromMonth ${a}.`);if(l&&i.date.getMonth()>l.getMonth())throw new Error(`Preset ${i.label} is after toMonth ${l}.`);if(c&&i.date.getDate()<c.getDate())throw new Error(`Preset ${i.label} is before fromDay ${c}.`);if(s&&i.date.getDate()>s.getDate())throw new Error(`Preset ${i.label} is after toDay ${Pe(s,"MMM dd, yyyy")}.`)}if("dateRange"in i){let C=(p=i.dateRange.from)==null?void 0:p.getFullYear(),P=(f=i.dateRange.to)==null?void 0:f.getFullYear();if(C&&o&&C<o)throw new Error(`Preset ${i.label}'s 'from' is before fromYear ${d}.`);if(P&&r&&P>r)throw new Error(`Preset ${i.label}'s 'to' is after toYear ${m}.`);if(a){let S=(b=i.dateRange.from)==null?void 0:b.getMonth();if(S&&S<a.getMonth())throw new Error(`Preset ${i.label}'s 'from' is before fromMonth ${Pe(a,"MMM, yyyy")}.`)}if(l){let S=(y=i.dateRange.to)==null?void 0:y.getMonth();if(S&&S>l.getMonth())throw new Error(`Preset ${i.label}'s 'to' is after toMonth ${Pe(l,"MMM, yyyy")}.`)}if(c){let S=(h=i.dateRange.from)==null?void 0:h.getDate();if(S&&S<c.getDate())throw new Error(`Preset ${i.dateRange.from}'s 'from' is before fromDay ${Pe(c,"MMM dd, yyyy")}.`)}if(s){let S=(g=i.dateRange.to)==null?void 0:g.getDate();if(S&&S>s.getDate())throw new Error(`Preset ${i.label}'s 'to' is after toDay ${Pe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as Ds}from"class-variance-authority";import{Calendar as Is,ChevronDown as zs}from"lucide-react";import{forwardRef as Os}from"react";import{jsx as _t,jsxs as _s}from"react/jsx-runtime";var Vs=Ds(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-gray-200 text-gray-900 placeholder-gray-400 transition-all","disabled:pointer-events-none disabled:bg-gray-100 disabled:text-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),wr=Os(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>_s("button",{ref:l,className:n(Vs({hasError:o}),e),...a,children:[_t(Is,{className:n("h-4 w-4 shrink-0 text-gray-400",!!t&&"text-gray-900")}),_t("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:t||(r?_t("span",{className:"text-gray-400",children:r}):null)}),_t(zs,{className:"h-4 w-4 flex-shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));wr.displayName="DatePicker.Trigger";import{jsx as fe,jsxs as Bs}from"react/jsx-runtime";var Fs=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:d=!1,locale:m=Hs,placeholder:i="Select date range",hasError:p,align:f="center",className:b,...y})=>{let{isDesktop:h}=j(),[g,C]=Ht(!1),[P,S]=Ht(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,x]=Ht((P==null?void 0:P.dateRange)??e??t??void 0),[v,R]=Ht(k==null?void 0:k.to),I=ba(()=>k,[g]);Cr(()=>{x(e)},[e]),Cr(()=>{let L=a==null?void 0:a.find(({id:de})=>de===r);S(L),x((L==null?void 0:L.dateRange)??e??t)},[a,r]),Cr(()=>{g?k&&R(k.to):R(k==null?void 0:k.to)},[g]);let D=(L,de)=>{let ee=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:de}:L;x(ee),S(void 0),(ee==null?void 0:ee.from)&&(ee==null?void 0:ee.to)&&(o==null||o(ee),C(!1))},q=L=>{x(L.dateRange),S(L),o==null||o(L.dateRange,L),C(!1)},w=()=>{x(I),C(!1)},z=L=>{L||w(),C(L)},ce=ba(()=>k?`${k.from?xr(k.from,m):""} - ${k.to?xr(k.to,m):""}`:null,[k,m]);return Ye((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let de=a==null?void 0:a.find(ee=>ee.shortcut===L.key);de&&q(de)}),fe(yr.Provider,{value:{isOpen:g,setIsOpen:C},children:fe(Qe,{align:f,openPopover:g,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:fe("div",{className:"flex w-full",children:Bs("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&fe("div",{className:n("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-gray-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:fe("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:fe(br,{currentValue:k,presets:a,onSelect:q})})}),fe("div",{className:"scrollbar-hide overflow-x-scroll",children:fe(ha,{mode:"range",selected:k,onSelect:D,month:v,onMonthChange:R,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:d,locale:m,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-gray-200 overflow-x-scroll scrollbar-hide"},...y})})]})}),children:fe(wr,{placeholder:i,disabled:l,className:b,hasError:p,"aria-required":y.required||y["aria-required"],"aria-invalid":y["aria-invalid"],"aria-label":y["aria-label"],"aria-labelledby":y["aria-labelledby"],children:(P==null?void 0:P.label)??ce})})})};function Th({presets:e,...t}){return e&&va(e,t),fe(Fs,{presets:e,...t})}import{jsx as Ft,jsxs as ya}from"react/jsx-runtime";function Vh({icon:e,title:t,description:r,learnMore:o,children:a}){return ya("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Ft("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-gray-200 bg-gray-50",children:Ft(e,{className:"size-6 text-gray-800"})}),Ft("p",{className:"text-center text-base font-medium text-gray-950",children:t}),r&&ya("p",{className:"max-w-sm text-balance text-center text-sm text-gray-500",children:[r," ",o&&Ft("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-gray-800",children:"Learn more \u2197"})]}),a]})}import{cva as Ws}from"class-variance-authority";import{useState as xa}from"react";import{toast as wa}from"sonner";import{Fragment as $s,jsx as ge,jsxs as kr}from"react/jsx-runtime";var Nr={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"}},Us=Ws("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-gray-50",{variants:{variant:{default:"rounded-md border border-gray-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function jh({readFile:e,onChange:t,variant:r,className:o,iconClassName:a,previewClassName:l,customPreview:c,accept:s="any",imageSrc:d,loading:m=!1,clickToUpload:i=!0,showHoverOverlay:p=!0,content:f,maxFileSizeMB:b=0,targetResolution:y,accessibilityLabel:h="File upload",disabled:g=!1}){let[C,P]=xa(!1),[S,k]=xa(null),x=async v=>{let R="dataTransfer"in v?v.dataTransfer.files&&v.dataTransfer.files[0]:v.target.files&&v.target.files[0];if(!R)return;if(k(R.name),b>0&&R.size/1024/1024>b){wa.error(`File size too big (max ${b} MB)`);return}let I=Nr[s].types;if(I.length&&!I.includes(R.type)){wa.error(Nr[s].errorMessage??"File type not supported");return}let D=R;if(y&&R.type.startsWith("image/"))try{let q=await Jr(R,y),w=await fetch(q).then(z=>z.blob());D=new File([w],R.name,{type:R.type})}catch(q){console.error("Error resizing image:",q)}if(e){let q=new FileReader;q.onload=w=>{var z;return t==null?void 0:t({src:(z=w.target)==null?void 0:z.result,file:D})},q.readAsDataURL(D);return}t==null||t({file:D})};return kr("label",{className:n(Us({variant:r}),g?"cursor-not-allowed":n(i&&"cursor-pointer"),o),children:[m&&ge("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ge(it,{})}),ge("div",{className:"absolute inset-0 z-[5]",onDragOver:v=>{v.preventDefault(),v.stopPropagation(),P(!0)},onDragEnter:v=>{v.preventDefault(),v.stopPropagation(),P(!0)},onDragLeave:v=>{v.preventDefault(),v.stopPropagation(),P(!1)},onDrop:async v=>{v.preventDefault(),v.stopPropagation(),x(v),P(!1)}}),kr("div",{className:n("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",g&&"bg-gray-50",C&&!g&&"cursor-copy border-black bg-gray-50 opacity-100",d?n("opacity-0",p&&!g&&"group-hover:opacity-100"):n(!g&&"group-hover:bg-gray-50")),children:[ge(Ao,{className:n("size-7 transition-all duration-75",g?"text-gray-400":n("text-gray-500 group-hover:scale-110 group-active:scale-95",C?"scale-110":"scale-100"),a)}),f!==null&&ge("div",{className:n("mt-2 text-center text-sm text-gray-500",g&&"text-gray-400"),children:f??ge($s,{children:kr("p",{children:["Drag and drop ",i&&"or click"," to upload."]})})}),ge("span",{className:"sr-only",children:h})]}),d&&(c??ge("img",{src:d,alt:"Preview",className:n("h-full w-full rounded-[inherit] object-cover",l)})),i&&ge("div",{className:"sr-only mt-1 flex shadow-sm",children:ge("input",{type:"file",accept:Nr[s].types.join(","),onChange:x,disabled:g},S)})]})}import{AnimatePresence as Gs,motion as Ca}from"framer-motion";import{X as Ks}from"lucide-react";import{isValidElement as js}from"react";import{Fragment as Ys,jsx as X,jsxs as dt}from"react/jsx-runtime";function ka({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ye("Escape",o,{priority:1}),X(ye,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:dt("div",{className:n("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[X("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:X(Gs,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return X(Ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-gray-200 bg-white"},`loader-${c}`);let s=e.find(d=>d.key===l);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(d=>{var f,b,y;let m=(f=s.options)==null?void 0:f.find(h=>typeof h.value=="string"&&typeof d=="string"?h.value.toLowerCase()===d.toLowerCase():h.value===d),i=(m==null?void 0:m.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,d,{key:s.key,option:m}))??s.icon,p=(m==null?void 0:m.label)??((y=s.getOptionLabel)==null?void 0:y.call(s,d,{key:s.key,option:m}))??d;return dt(Ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-gray-200 bg-white text-sm text-black",children:[dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[X("span",{className:"shrink-0 text-gray-600",children:Na(s.icon)?s.icon:X(s.icon,{className:"h-4 w-4"})}),s.label]}),X("div",{className:"px-3 py-2 text-gray-500",children:"is"}),X("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?dt(Ys,{children:[X("span",{className:"shrink-0 text-gray-600",children:Na(i)?i:X(i,{className:"h-4 w-4"})}),Ct(p,30)]}):X("div",{className:"h-5 w-12 animate-pulse rounded-md bg-gray-200"})}),X("button",{type:"button",className:"h-full rounded-r-md p-2 text-gray-500 ring-inset ring-gray-500 hover:bg-gray-100 hover:text-gray-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,d),children:X(Ks,{className:"h-3.5 w-3.5"})})]},`${l}-${d}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-gray-500 ring-inset ring-gray-500 transition-colors hover:border-gray-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",X("kbd",{className:"rounded-md border border-gray-200 px-1.5 py-0.5 text-xs text-gray-950 group-hover:bg-gray-50",children:"ESC"})]})]})})}var Na=e=>js(e);import{Command as Se,useCommandState as qs}from"cmdk";import{ChevronDown as Zs,ListFilter as Qs}from"lucide-react";import{Fragment as Js,forwardRef as Xs,isValidElement as Sa,useCallback as Bt,useEffect as Wt,useImperativeHandle as el,useRef as Sr,useState as Pr}from"react";import{Fragment as nl,jsx as _,jsxs as he}from"react/jsx-runtime";function Ra({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:d,emptyState:m,className:i}){var D,q;let{isMobile:p}=j(),f=Sr(null),b=Sr(),[y,h]=Pr(!1);Ye("f",()=>h(!0),{enabled:!y});let[g,C]=Pr(""),[P,S]=Pr(null),k=Bt(()=>{C(""),S(null)},[]);Wt(()=>{y||k()},[y]);let x=P?e.find(({key:w})=>w===P):null,v=Bt(w=>{f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight}),C(""),S(w),o==null||o(w)},[]),R=Bt(w=>{if(!x||!c)return!1;let z=c.find(({key:ce})=>ce===P);return(z==null?void 0:z.value)===w||z&&x.multiple&&Array.isArray(z.value)&&z.value.includes(w)},[x]),I=Bt(w=>{x&&(R(w)?r(x.key,w):t(x.key,w),x.multiple||h(!1))},[c,x,s]);return Wt(()=>{a==null||a(g)},[g]),Wt(()=>{l==null||l(P)},[P]),Wt(()=>{(x==null?void 0:x.options)&&f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight})},[x==null?void 0:x.options]),_(Qe,{openPopover:y,setOpenPopover:h,onEscapeKeyDown:w=>{P&&(w.preventDefault(),k())},content:_(ye,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:he(Se,{loop:!0,shouldFilter:!x||x.shouldFilter!==!1,children:[he("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[_(rl,{placeholder:`${(x==null?void 0:x.label)||"Filter"}...`,value:g,onValueChange:C,onKeyDown:w=>{(w.key==="Escape"||w.key==="Backspace"&&!g)&&(w.preventDefault(),w.stopPropagation(),P?k():h(!1))},emptySubmit:w=>{w.preventDefault(),w.stopPropagation(),s?(t("ai",x?`${x.label} ${g}`:g),h(!1)):I(g)}}),!x&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:"F"})]}),_(ol,{ref:f,children:he(Se.List,{className:n("flex w-full flex-col gap-1 p-1",x?"min-w-[100px]":"min-w-[180px]"),children:[x?((q=(D=x.options)==null?void 0:D.filter(w=>!g||!w.hideDuringSearch))==null?void 0:q.map(w=>{let z=R(w.value);return _(Pa,{filter:x,option:w,right:z?_(ko,{className:"h-4 w-4"}):w.right,onSelect:()=>I(w.value)},w.value)}))??_(Se.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(be,{})})}):e.map(w=>he(Js,{children:[_(Pa,{filter:w,onSelect:()=>v(w.key)}),w.separatorAfter&&_(Se.Separator,{className:"-mx-1 my-1 border-b border-gray-200"})]},w.key)),(!x||x.options)&&_(al,{search:g,askAI:s,children:m?tl(m)?(m==null?void 0:m[P??"default"])??"No matches":m:"No matches"})]})},P)]})}),children:he("button",{type:"button",className:n("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-gray-200 bg-white text-gray-900 placeholder-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",i),children:[_(Qs,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:d??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(Zs,{className:"size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function tl(e){return typeof e=="object"&&e!==null&&!Sa(e)}var rl=e=>{let t=qs(r=>r.filtered.count===0);return _(Se.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},ol=Xs(({children:e},t)=>{let r=Sr(null);el(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=qe(r);return he(nl,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Pa({filter:e,option:t,right:r,onSelect:o}){var s,d;let{isMobile:a}=j(),l=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((d=e.getOptionLabel)==null?void 0:d.call(e,t.value,{key:e.key,option:t})):e.label;return he(Se.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100"),onPointerDown:m=>{m.preventDefault()},onPointerUp:m=>{m.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-gray-600",children:il(l)?l:_(l,{className:"h-4 w-4"})}),Ct(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-gray-500",children:r})]})}var al=({search:e,askAI:t,children:r})=>t&&e?he(Se.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-gray-100 px-3 py-2",children:[_(io,{className:"h-4 w-4"}),he("p",{className:"text-center text-sm text-gray-600",children:["Ask AI ",he("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Se.Empty,{className:"p-2 text-center text-sm text-gray-400",children:r}),il=e=>Sa(e);var v1={Select:Ra,List:ka};import{useMemo as sl,useState as Ma}from"react";import{jsx as Ve,jsxs as Ut}from"react/jsx-runtime";function k1({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,d]=Ma(r.defaultValue),[m,i]=Ma(!1),p=sl(()=>m||!s||s===r.defaultValue,[m,s,r.defaultValue]);return Ut("form",{onSubmit:async f=>{f.preventDefault(),i(!0),await c({[r.name]:s}),i(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[Ut("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Ut("div",{className:"flex flex-col space-y-3",children:[Ve("h2",{className:"text-xl font-medium",children:e}),Ve("p",{className:"text-sm text-gray-500",children:t})]}),typeof r.defaultValue=="string"?Ve("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:f=>d(f.target.value),className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":l})}):Ve("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),Ut("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[typeof o=="string"?Ve("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ve("div",{className:"shrink-0",children:Ve(ie,{text:a,loading:m,disabled:p,disabledTooltip:l})})]})]})}import{useId as ll}from"react";import{jsx as $t,jsxs as cl}from"react/jsx-runtime";function La({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=ll();return cl("svg",{className:n("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[$t("defs",{children:$t("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:$t("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),$t("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as dl}from"lucide-react";import ml,{useCallback as ul,useState as pl}from"react";import{jsx as _e,jsxs as Rr}from"react/jsx-runtime";var fl=ml.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=pl(!1),c=ul(()=>l(!a),[a,l]);return Rr("div",{children:[Rr("div",{className:"relative flex",children:[_e("input",{type:a?"text":t,className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Rr("div",{className:"group",children:[r.error&&_e("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:_e(dl,{className:n("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&_e("button",{className:n("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?_e(Do,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0}):_e(Io,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0})})]})]}),r.error&&_e("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});fl.displayName="Input";import{flip as bl,offset as yl,size as xl,useDismiss as wl,useFloating as Cl,useInteractions as Nl}from"@floating-ui/react";import{Command as we,useCommandState as kl}from"cmdk";import{Check as Pl,ChevronDown as Sl,Search as Mr,X as Rl}from"lucide-react";import{createContext as Ml,forwardRef as Ll,useContext as Dr,useEffect as Lr,useMemo as El,useRef as Ta,useState as Er}from"react";import{Drawer as Je}from"vaul";import gl from"next/image";import{useEffect as hl,useState as Ea}from"react";import{jsx as vl}from"react/jsx-runtime";function Gt(e){let[t,r]=Ea(!0),[o,a]=Ea(e.src);hl(()=>a(e.src),[e.src]);let l=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return vl(gl,{...e,src:o,alt:e.alt,className:n(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as M,jsxs as Q}from"react/jsx-runtime";var Kt=Ml({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function X1({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:d}){let m=Ta(null),[i,p]=Er(!1),[f,b]=Er(""),[y,h]=Er(!1);Lr(()=>{i&&h(!1)},[i]),Lr(()=>h(!0),[f]),Lr(()=>{t&&b(t.value)},[t]);let g=El(()=>{let w=f.toLowerCase();return y?e.filter(z=>z.value.toLowerCase().includes(w)):f?e.sort((z,ce)=>(ce.value.toLowerCase().includes(w)?1:0)-(z.value.toLowerCase().includes(w)?1:0)):e},[y,f,e]),{refs:C,floatingStyles:P,context:S}=Cl({open:i,onOpenChange:p,middleware:[yl(8),xl({apply({elements:{floating:w},availableHeight:z}){Object.assign(w.style,{maxHeight:`${Math.max(75,Math.min(z,290))}px`})},padding:8}),bl({fallbackStrategy:"initialPlacement",padding:8})]}),k=wl(S),{getReferenceProps:x,getFloatingProps:v}=Nl([k]),R=Ta(null),{scrollProgress:I,updateScrollProgress:D}=qe(R),{isMobile:q}=j();return M(Kt.Provider,{value:{inputAttrs:s||{},openCommandList:i,setOpenCommandList:p,inputValue:f,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:q&&l?Q(Je.Root,{open:i,onOpenChange:p,children:[M(Je.Trigger,{className:"sm:hidden",asChild:!0,children:M(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:Q("div",{className:n("group relative rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500 md:min-w-[140px]",o),children:[M("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{}),M(Ar,{})]})]})})}),M(Je.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),Q(Je.Portal,{children:[M(Je.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-gray-200 bg-white",onPointerDownOutside:w=>{w.target instanceof Element&&w.target.closest("[data-sonner-toast]")&&w.preventDefault()},children:Q(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group relative mb-2 rounded-t-md border-b border-gray-300 bg-white p-1 sm:border sm:py-0 sm:focus-within:border-gray-500 sm:focus-within:ring-1 sm:focus-within:ring-gray-200",o),children:[M("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{}),M(Ar,{})]})]}),i&&Q(we.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(d?M("div",{children:d}):M("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&M(we.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."}),M(Aa,{items:g})]})]})}),M(Je.Overlay,{})]})]}):Q(we,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group rounded-md border border-gray-200 bg-white px-1 transition-all focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-200",o),children:[M("div",{onClick:()=>p(w=>!w),className:"absolute inset-y-0 left-0 flex cursor-pointer items-center justify-center pl-3 text-gray-400",children:t&&t.image?M("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||M(Mr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[M(Tr,{ref:C.setReference,...x()}),M(Ar,{})]})]}),i&&Q("div",{ref:C.setFloating,style:P,...v(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-gray-200 bg-white shadow-md",children:[Q("div",{ref:R,onScroll:D,className:"grow overflow-y-auto p-2",children:[Q(we.List,{children:[e.length===0&&f===""&&(d?M("div",{children:d}):M("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&M(we.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."})]}),M(Aa,{items:g})]}),M("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(I,2)}})]})]})})}var Tr=Ll((e,t)=>{let r=kl(m=>m.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:d}=Dr(Kt);return M(we.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:s,onKeyDown:m=>{m.key==="Escape"?(m.preventDefault(),l(!1)):m.key==="Enter"&&r?l(!1):m.key.match(/^[a-z0-9]$/i)&&!m.metaKey&&l(!0)},disabled:d,className:"block w-full truncate rounded-md border-none px-0 text-base text-gray-900 placeholder-gray-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Ar(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Dr(Kt);return M("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?M(Rl,{className:"h-4 w-4 text-gray-400 transition-all hover:text-gray-700"}):M(Sl,{className:n("h-4 w-4 text-gray-400 transition-all hover:text-gray-700",{"rotate-180 transform":t})})})}function Aa({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Dr(Kt);return e.map(a=>Q(we.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-gray-100 aria-selected:text-gray-900",children:[Q("div",{className:"flex items-center space-x-2",children:[a.image&&M(Gt,{src:a.image,alt:a.value,className:"h-4 w-4 rounded-full",width:16,height:16}),M("p",{className:n("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&M(Et,{className:"text-xs",variant:"neutral",children:a.label})]}),M(Pl,{className:"invisible h-5 w-5 text-gray-500 aria-selected:visible"})]},a.id))}import*as Ir from"@radix-ui/react-label";import{cva as Tl}from"class-variance-authority";import*as Da from"react";import{jsx as Il}from"react/jsx-runtime";var Al=Tl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dl=Da.forwardRef(({className:e,...t},r)=>Il(Ir.Root,{ref:r,className:n(Al(),e),...t}));Dl.displayName=Ir.Root.displayName;import{curveNatural as Ia}from"@visx/curve";import{LinearGradient as za}from"@visx/gradient";import{Group as zl}from"@visx/group";import{ParentSize as Ol}from"@visx/responsive";import{scaleLinear as Vl,scaleUtc as _l}from"@visx/scale";import{Area as Hl,AreaClosed as Fl}from"@visx/shape";import{motion as Oa}from"framer-motion";import{useId as Bl,useMemo as Va}from"react";import{jsx as ve,jsxs as zr}from"react/jsx-runtime";function uv(e){return ve(Ol,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ve(Wl,{...{width:t,height:r,...e}})})}var Re={top:8,right:2,bottom:2,left:2};function Wl({width:e,height:t,data:r,curve:o=!0,color:a}){let l=Bl(),c=Va(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:s,xScale:d}=Va(()=>{let m=r.map(({value:y})=>y),i=Math.max(...m),p=r.map(({date:y})=>y.getTime()),f=new Date(Math.min(...p)),b=new Date(Math.max(...p));return{yScale:Vl({domain:[-2,Math.max(i,2)],range:[t-Re.top-Re.bottom,0],nice:!0,clamp:!0}),xScale:_l({domain:[f,b],range:[0,e-Re.left-Re.right],nice:!0})}},[r,t,e]);return zr("svg",{width:e,height:t,children:[zr("defs",{children:[ve(za,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-Re.left-Re.right,gradientUnits:"userSpaceOnUse"}),ve(za,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ve("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:ve("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),zr(zl,{left:Re.left,top:Re.top,children:[ve(Hl,{data:r,x:({date:m})=>d(m),y:({value:m})=>s(m)??0,curve:o?Ia:void 0,children:({path:m})=>ve(Oa.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),ve(Fl,{data:r,x:({date:m})=>d(m),y:({value:m})=>s(m)??0,yScale:s,curve:o?Ia:void 0,children:({path:m})=>ve(Oa.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as ne from"@radix-ui/react-dialog";import*as Or from"@radix-ui/react-visually-hidden";import{useRouter as Ul}from"next/navigation";import{Drawer as He}from"vaul";import{jsx as oe,jsxs as Xe}from"react/jsx-runtime";function bv({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let d=Ul(),m=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):d.back())},{isMobile:i}=j();return i&&!l?oe(He.Root,{open:o?r:!0,onOpenChange:p=>{p||m({dragged:!0})},...s,children:Xe(He.Portal,{children:[oe(He.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),oe(He.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-gray-200 bg-white",t),children:Xe("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[Xe(Or.Root,{children:[oe(He.Title,{children:"Modal"}),oe(He.Description,{children:"This is a modal"})]}),oe($l,{}),e]})}),oe(He.Overlay,{})]})}):oe(ne.Root,{open:o?r:!0,onOpenChange:p=>{p||m()},children:Xe(ne.Portal,{children:[oe(ne.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),Xe(ne.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-gray-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[Xe(Or.Root,{children:[oe(ne.Title,{children:"Modal"}),oe(ne.Description,{children:"This is a modal"})]}),e]})]})})}function $l(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})})}import{Fragment as Gl,jsx as jt,jsxs as et}from"react/jsx-runtime";var _a=n("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-gray-200 bg-white px-2 text-sm text-gray-600","outline-none hover:bg-gray-50 focus-visible:border-gray-500","disabled:cursor-not-allowed disabled:border-gray-200 disabled:text-gray-400 disabled:bg-gray-100");function wv({pagination:e,setPagination:t,totalCount:r,unit:o=c=>`item${c?"s":""}`,className:a,children:l}){return et("div",{className:n("flex items-center justify-between gap-2 text-sm leading-6 text-gray-600",a),children:[et("div",{className:"flex items-center gap-2",children:[et("div",{children:[jt("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&et(Gl,{children:[et("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ","of"," "]}),jt("span",{className:"font-medium",children:xt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),et("div",{className:"flex items-center gap-2",children:[jt("button",{type:"button",className:_a,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),jt("button",{type:"button",className:_a,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Me from"@radix-ui/react-radio-group";import{Circle as Kl}from"lucide-react";import*as Vr from"react";import{jsx as Yt}from"react/jsx-runtime";var jl=Vr.forwardRef(({className:e,...t},r)=>Yt(Me.Root,{className:n("grid gap-2",e),...t,ref:r}));jl.displayName=Me.Root.displayName;var Yl=Vr.forwardRef(({className:e,...t},r)=>Yt(Me.Item,{ref:r,className:n("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Yt(Me.Indicator,{className:"flex items-center justify-center",children:Yt(Kl,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Yl.displayName=Me.Item.displayName;import{Drawer as Le}from"vaul";import{jsx as Fe,jsxs as Xl}from"react/jsx-runtime";function ql({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Le.NestedRoot:Le.Root;return Fe(a,{direction:"right",handleOnly:!0,...o,children:Xl(Le.Portal,{children:[Fe(Le.Overlay,{className:"fixed inset-0 bg-black/20"}),Fe(Le.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:n("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Fe("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Zl({className:e,...t}){return Fe(Le.Title,{className:n("text-xl font-medium text-zinc-900",e),...t})}function Ql(e){return Fe(Le.Description,{...e})}function Jl(e){return Fe(Le.Close,{...e})}var Lv=Object.assign(ql,{Title:Zl,Description:Ql,Close:Jl});import{useEffect as ec,useRef as tc,useState as rc}from"react";import{jsx as Ha}from"react/jsx-runtime";var oc=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,ac=`
|
|
10
10
|
precision mediump float;
|
|
11
11
|
|
|
12
12
|
uniform vec2 resolution;
|
|
@@ -39,14 +39,14 @@ void main(void) {
|
|
|
39
39
|
|
|
40
40
|
gl_FragColor = fragColor;
|
|
41
41
|
}
|
|
42
|
-
`,ac=60,ic=1e3/ac;function Lv({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=ec(null),[l,c]=tc(!1);return Xl(()=>{let s=a.current;if(!s||!s.parentElement)return;let d=s.parentElement,m=window.devicePixelRatio||1;s.width=d.clientWidth*m,s.height=d.clientHeight*m;let i=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(i===null){alert("Failed to initialize WebGL");return}let p=i.createProgram();if(!p){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let I=R===0?rc:oc,D=i.createShader(R===0?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!D){console.error("Failed to create shader");return}i.shaderSource(D,I),i.compileShader(D),i.getShaderParameter(D,i.COMPILE_STATUS)||console.error(i.getShaderInfoLog(D)),i.attachShader(p,D),i.linkProgram(p)}i.getProgramParameter(p,i.LINK_STATUS)||console.error(i.getProgramInfoLog(p));let f=i.getAttribLocation(p,"position"),b=i.getUniformLocation(p,"time"),y=i.getUniformLocation(p,"resolution"),h=i.getUniformLocation(p,"dotSize"),g=i.getUniformLocation(p,"cellSize"),C=i.getUniformLocation(p,"speed");i.useProgram(p);let P=[1,1,-1,1,1,-1,-1,-1],S=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,S),i.bufferData(i.ARRAY_BUFFER,new Float32Array(P),i.STATIC_DRAW),i.enableVertexAttribArray(f),i.vertexAttribPointer(f,2,i.FLOAT,!1,0,0),i.uniform1f(h,e*window.devicePixelRatio),i.uniform1f(g,t*window.devicePixelRatio),i.uniform1f(C,r);let k,x=0;function v(R){if(R-x<ic){k=requestAnimationFrame(v);return}x=R,i&&s&&p&&(i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.uniform1f(b,R/1e3),i.uniform2f(y,s.width,s.height),i.drawArrays(i.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(v)}return k=requestAnimationFrame(v),s.addEventListener("webglcontextlost",R=>{R.preventDefault(),c(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Ha("div",{className:n("absolute inset-0",o,l&&"opacity-0"),children:Ha("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as nc}from"class-variance-authority";import{jsx as cc,jsxs as dc}from"react/jsx-runtime";var sc=nc("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-gray-500/[.15] text-gray-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),lc={neutral:To,new:Lo,success:Mo,pending:Eo,warning:cr,error:cr};function zv({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??lc[t??"neutral"]:null;return dc("span",{className:n(sc({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&cc(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as Zt from"@radix-ui/react-switch";import{useMemo as mc}from"react";import{jsx as qt}from"react/jsx-runtime";function Uv({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,checked:l=!0,loading:c=!1,disabled:s=!1,disabledTooltip:d}){let m=mc(()=>d?!0:s||c,[d,s,c]),i=qt(Zt.Root,{checked:c?!1:l,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:m,className:n("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:qt(Zt.Thumb,{className:n(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a)})});return d?qt(te,{content:d,children:qt("div",{children:i})}):i}import{flexRender as Fa,getCoreRowModel as uc,useReactTable as pc}from"@tanstack/react-table";import{AnimatePresence as fc,motion as gc}from"framer-motion";import{useEffect as Ba,useState as hc}from"react";import{jsx as K,jsxs as Ce}from"react/jsx-runtime";var Wa=(e,t)=>n(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-gray-200 px-4 relative","border-l border-b",e==="menu"&&"bg-white border-l-transparent py-0 px-1",t&&"group-hover/row:bg-neutral-50 transition-colors duration-75"]);function mb(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:s}=e,[d,m]=hc(e.columnVisibility??{});Ba(()=>{e.columnVisibility&&!to(e.columnVisibility,d)&&m(e.columnVisibility??{})},[e.columnVisibility]),Ba(()=>{var p;(p=e.onColumnVisibilityChange)==null||p.call(e,d)},[d]);let i=pc({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,...a},getCoreRowModel:uc(),onPaginationChange:s,onColumnVisibilityChange:p=>m(p),state:{pagination:c,columnVisibility:d,columnPinning:{left:[],right:[],...l}},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0});return{...e,columnVisibility:d,table:i}}function ub({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:s,onSortChange:d,sortableColumns:m=[],className:i,containerClassName:p,scrollWrapperClassName:f,thClassName:b,tdClassName:y,table:h,pagination:g,resourceName:C,onRowClick:P,rowCount:S,children:k}){return Ce("div",{className:n("relative rounded-xl border border-gray-200 bg-white",p),children:[!o&&!!(t!=null&&t.length)||r?Ce("div",{className:n("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[Ce("table",{className:n(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent"],i),children:[K("thead",{children:h.getHeaderGroups().map(x=>K("tr",{children:x.headers.map(v=>{let R=m.includes(v.column.id),I=R?"button":"div";return K("th",{className:n(Wa(v.id),"select-none font-medium",Ua(v.column,!h.getRowModel().rows.length),typeof b=="function"?b(v.column.id):b),style:{minWidth:v.column.columnDef.minSize,maxWidth:v.column.columnDef.maxSize,width:v.column.columnDef.size||"auto",...$a(v.column)},children:K("div",{className:"flex items-center justify-between gap-6 !pr-0",children:Ce(I,{className:"flex items-center gap-2",...R&&{type:"button",disabled:!R,"aria-label":"Sort by column",onClick:()=>d==null?void 0:d({sortBy:v.column.id,sortOrder:c!==v.column.id||s==="asc"?"desc":"asc"})},children:[K("span",{children:v.isPlaceholder?null:Fa(v.column.columnDef.header,v.getContext())}),R&&K(so,{order:c===v.column.id?s||"desc":null})]})})},v.id)})},x.id))}),K("tbody",{children:h.getRowModel().rows.map(x=>K("tr",{className:n("group/row",P&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&x.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:P?v=>{Nt(v)||P(x,v)}:void 0,children:x.getVisibleCells().map(v=>K("td",{className:n(Wa(v.column.id,!!P),"group text-gray-600",Ua(v.column,x.index===h.getRowModel().rows.length-1),typeof y=="function"?y(v.column.id):y),style:{minWidth:v.column.columnDef.minSize,maxWidth:v.column.columnDef.maxSize,width:v.column.columnDef.size||"auto",...$a(v.column)},children:Ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[K("div",{className:"min-w-0 shrink grow truncate",children:Fa(v.column.columnDef.cell,v.getContext())}),l==null?void 0:l(v)]})},v.id))},x.id))})]}),k]}):K("div",{className:"flex h-96 w-full items-center justify-center text-sm text-gray-500",children:o||a||`No ${(C==null?void 0:C(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!S&&Ce("div",{className:"sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t border-gray-200 bg-white px-4 py-3.5 text-sm leading-6 text-gray-600",children:[Ce("div",{children:[K("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",Ce("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount())]})," ","of"," ",K("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(C==null?void 0:C(h.getRowCount()!==1))||"items"]}),Ce("div",{className:"flex items-center gap-2",children:[K(ie,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),K(ie,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),K(fc,{children:r&&K(gc.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl bg-white/50",children:K(be,{})})})]})}var Ua=(e,t)=>{let r=e.getIsPinned();return n(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},$a=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as vc,motion as Ga}from"framer-motion";import{useId as bc}from"react";import{jsx as Qt,jsxs as yc}from"react/jsx-runtime";function vb({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=bc();return Qt(vc,{id:s,children:Qt(Ga.div,{layout:!0,className:n("relative inline-flex items-center gap-1 rounded-xl border border-gray-200 bg-white p-1",o),style:c,children:e.map(d=>yc("button",{type:"button",className:n("relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"z-[11] transition-colors hover:text-gray-500":d.value!==t},a),onClick:()=>r(d.value),children:[typeof d.label=="string"?Qt("p",{children:d.label}):d.label,d.badge,d.value===t&&Qt(Ga.div,{layoutId:s,className:n("absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border border-gray-200 bg-gray-50",l),transition:{duration:.25}})]},d.value))})})}import{useEffect as xc,useId as wc,useRef as Cc,useState as Nc}from"react";import{jsx as se,jsxs as _r}from"react/jsx-runtime";var kc=[{key:"utm_source",icon:_o,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:jo,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Oo,label:"Campaign",placeholder:"summer_sale",description:"The name of the campaign"},{key:"utm_term",icon:Uo,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Go,label:"Content",placeholder:"logolink",description:"The content of the campaign"},{key:"ref",icon:Vo,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Pb({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=j(),s=wc(),[d,m]=Nc(!1),i=Cc(null);return xc(()=>{i.current&&!c&&o&&setTimeout(()=>{var p;return(p=i.current)==null?void 0:p.focus()},10)},[]),se("div",{className:n("grid gap-y-3",l),children:kc.map(({key:p,icon:f,label:b,placeholder:y,description:h},g)=>se("div",{className:"group relative",children:_r("div",{className:"relative z-10 flex",children:[se(te,{content:_r("div",{className:"p-3 text-center text-xs",children:[se("p",{className:"text-gray-600",children:h}),se("span",{className:"font-mono text-gray-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:_r("div",{className:n("flex items-center gap-1.5 rounded-l-md border-y border-l border-gray-300 bg-gray-50 px-3 py-1.5 text-gray-700",d?"sm:min-w-36":"sm:min-w-28"),onClick:()=>m(C=>!C),children:[se(f,{className:"size-4 shrink-0"}),se("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:d?se("span",{className:"font-mono text-xs",children:p}):b})]})}),se("div",{className:"min-w-0 grow",children:se(Pc,{disabledTooltip:a,children:se("input",{type:"text",id:`${s}-${p}`,ref:g===0?i:void 0,placeholder:y,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-gray-300 placeholder-gray-400 focus:border-gray-500 focus:ring-gray-500 disabled:cursor-not-allowed sm:text-sm",value:e[p]||"",onChange:C=>t(p,C.target.value)})})})]})},p))})}function Pc({children:e,disabledTooltip:t}){return t?se(te,{content:t,disableHoverableContent:!0,children:e}):e}import{jsx as Hr,jsxs as Sc}from"react/jsx-runtime";function Rb(){return Sc("div",{style:Jt.backgroundMain,children:[Hr("div",{style:Jt.backgroundMainBefore}),Hr("div",{style:Jt.backgroundMainAfter}),Hr("div",{style:Jt.backgroundContent})]})}var Jt={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
42
|
+
`,ic=60,nc=1e3/ic;function Dv({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=tc(null),[l,c]=rc(!1);return ec(()=>{let s=a.current;if(!s||!s.parentElement)return;let d=s.parentElement,m=window.devicePixelRatio||1;s.width=d.clientWidth*m,s.height=d.clientHeight*m;let i=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(i===null){alert("Failed to initialize WebGL");return}let p=i.createProgram();if(!p){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let I=R===0?oc:ac,D=i.createShader(R===0?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!D){console.error("Failed to create shader");return}i.shaderSource(D,I),i.compileShader(D),i.getShaderParameter(D,i.COMPILE_STATUS)||console.error(i.getShaderInfoLog(D)),i.attachShader(p,D),i.linkProgram(p)}i.getProgramParameter(p,i.LINK_STATUS)||console.error(i.getProgramInfoLog(p));let f=i.getAttribLocation(p,"position"),b=i.getUniformLocation(p,"time"),y=i.getUniformLocation(p,"resolution"),h=i.getUniformLocation(p,"dotSize"),g=i.getUniformLocation(p,"cellSize"),C=i.getUniformLocation(p,"speed");i.useProgram(p);let P=[1,1,-1,1,1,-1,-1,-1],S=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,S),i.bufferData(i.ARRAY_BUFFER,new Float32Array(P),i.STATIC_DRAW),i.enableVertexAttribArray(f),i.vertexAttribPointer(f,2,i.FLOAT,!1,0,0),i.uniform1f(h,e*window.devicePixelRatio),i.uniform1f(g,t*window.devicePixelRatio),i.uniform1f(C,r);let k,x=0;function v(R){if(R-x<nc){k=requestAnimationFrame(v);return}x=R,i&&s&&p&&(i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.uniform1f(b,R/1e3),i.uniform2f(y,s.width,s.height),i.drawArrays(i.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(v)}return k=requestAnimationFrame(v),s.addEventListener("webglcontextlost",R=>{R.preventDefault(),c(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Ha("div",{className:n("absolute inset-0",o,l&&"opacity-0"),children:Ha("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as sc}from"class-variance-authority";import{jsx as dc,jsxs as mc}from"react/jsx-runtime";var lc=sc("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-gray-500/[.15] text-gray-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),cc={neutral:To,new:Lo,success:Mo,pending:Eo,warning:cr,error:cr};function Hv({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??cc[t??"neutral"]:null;return mc("span",{className:n(lc({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&dc(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as Zt from"@radix-ui/react-switch";import{useMemo as uc}from"react";import{jsx as qt}from"react/jsx-runtime";function jv({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,checked:l=!0,loading:c=!1,disabled:s=!1,disabledTooltip:d}){let m=uc(()=>d?!0:s||c,[d,s,c]),i=qt(Zt.Root,{checked:c?!1:l,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:m,className:n("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:qt(Zt.Thumb,{className:n(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a)})});return d?qt(te,{content:d,children:qt("div",{children:i})}):i}import{flexRender as Fa,getCoreRowModel as pc,useReactTable as fc}from"@tanstack/react-table";import{AnimatePresence as gc,motion as hc}from"framer-motion";import{useEffect as Ba,useState as vc}from"react";import{jsx as K,jsxs as Ce}from"react/jsx-runtime";var Wa=(e,t)=>n(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-gray-200 px-4 relative","border-l border-b",e==="menu"&&"bg-white border-l-transparent py-0 px-1",t&&"group-hover/row:bg-neutral-50 transition-colors duration-75"]);function gb(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:s}=e,[d,m]=vc(e.columnVisibility??{});Ba(()=>{e.columnVisibility&&!to(e.columnVisibility,d)&&m(e.columnVisibility??{})},[e.columnVisibility]),Ba(()=>{var p;(p=e.onColumnVisibilityChange)==null||p.call(e,d)},[d]);let i=fc({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,...a},getCoreRowModel:pc(),onPaginationChange:s,onColumnVisibilityChange:p=>m(p),state:{pagination:c,columnVisibility:d,columnPinning:{left:[],right:[],...l}},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0});return{...e,columnVisibility:d,table:i}}function hb({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:s,onSortChange:d,sortableColumns:m=[],className:i,containerClassName:p,scrollWrapperClassName:f,thClassName:b,tdClassName:y,table:h,pagination:g,resourceName:C,onRowClick:P,rowCount:S,children:k}){return Ce("div",{className:n("relative rounded-xl border border-gray-200 bg-white",p),children:[!o&&!!(t!=null&&t.length)||r?Ce("div",{className:n("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[Ce("table",{className:n(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent"],i),children:[K("thead",{children:h.getHeaderGroups().map(x=>K("tr",{children:x.headers.map(v=>{let R=m.includes(v.column.id),I=R?"button":"div";return K("th",{className:n(Wa(v.id),"select-none font-medium",Ua(v.column,!h.getRowModel().rows.length),typeof b=="function"?b(v.column.id):b),style:{minWidth:v.column.columnDef.minSize,maxWidth:v.column.columnDef.maxSize,width:v.column.columnDef.size||"auto",...$a(v.column)},children:K("div",{className:"flex items-center justify-between gap-6 !pr-0",children:Ce(I,{className:"flex items-center gap-2",...R&&{type:"button",disabled:!R,"aria-label":"Sort by column",onClick:()=>d==null?void 0:d({sortBy:v.column.id,sortOrder:c!==v.column.id||s==="asc"?"desc":"asc"})},children:[K("span",{children:v.isPlaceholder?null:Fa(v.column.columnDef.header,v.getContext())}),R&&K(so,{order:c===v.column.id?s||"desc":null})]})})},v.id)})},x.id))}),K("tbody",{children:h.getRowModel().rows.map(x=>K("tr",{className:n("group/row",P&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&x.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:P?v=>{Nt(v)||P(x,v)}:void 0,children:x.getVisibleCells().map(v=>K("td",{className:n(Wa(v.column.id,!!P),"group text-gray-600",Ua(v.column,x.index===h.getRowModel().rows.length-1),typeof y=="function"?y(v.column.id):y),style:{minWidth:v.column.columnDef.minSize,maxWidth:v.column.columnDef.maxSize,width:v.column.columnDef.size||"auto",...$a(v.column)},children:Ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[K("div",{className:"min-w-0 shrink grow truncate",children:Fa(v.column.columnDef.cell,v.getContext())}),l==null?void 0:l(v)]})},v.id))},x.id))})]}),k]}):K("div",{className:"flex h-96 w-full items-center justify-center text-sm text-gray-500",children:o||a||`No ${(C==null?void 0:C(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!S&&Ce("div",{className:"sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t border-gray-200 bg-white px-4 py-3.5 text-sm leading-6 text-gray-600",children:[Ce("div",{children:[K("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",Ce("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount())]})," ","of"," ",K("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(C==null?void 0:C(h.getRowCount()!==1))||"items"]}),Ce("div",{className:"flex items-center gap-2",children:[K(ie,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),K(ie,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),K(gc,{children:r&&K(hc.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl bg-white/50",children:K(be,{})})})]})}var Ua=(e,t)=>{let r=e.getIsPinned();return n(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},$a=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as bc,motion as Ga}from"framer-motion";import{useId as yc}from"react";import{jsx as Qt,jsxs as xc}from"react/jsx-runtime";function wb({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=yc();return Qt(bc,{id:s,children:Qt(Ga.div,{layout:!0,className:n("relative inline-flex items-center gap-1 rounded-xl border border-gray-200 bg-white p-1",o),style:c,children:e.map(d=>xc("button",{type:"button",className:n("relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"z-[11] transition-colors hover:text-gray-500":d.value!==t},a),onClick:()=>r(d.value),children:[typeof d.label=="string"?Qt("p",{children:d.label}):d.label,d.badge,d.value===t&&Qt(Ga.div,{layoutId:s,className:n("absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border border-gray-200 bg-gray-50",l),transition:{duration:.25}})]},d.value))})})}import{useEffect as wc,useId as Cc,useRef as Nc,useState as kc}from"react";import{jsx as se,jsxs as _r}from"react/jsx-runtime";var Pc=[{key:"utm_source",icon:_o,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:jo,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Oo,label:"Campaign",placeholder:"summer_sale",description:"The name of the campaign"},{key:"utm_term",icon:Uo,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Go,label:"Content",placeholder:"logolink",description:"The content of the campaign"},{key:"ref",icon:Vo,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Lb({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=j(),s=Cc(),[d,m]=kc(!1),i=Nc(null);return wc(()=>{i.current&&!c&&o&&setTimeout(()=>{var p;return(p=i.current)==null?void 0:p.focus()},10)},[]),se("div",{className:n("grid gap-y-3",l),children:Pc.map(({key:p,icon:f,label:b,placeholder:y,description:h},g)=>se("div",{className:"group relative",children:_r("div",{className:"relative z-10 flex",children:[se(te,{content:_r("div",{className:"p-3 text-center text-xs",children:[se("p",{className:"text-gray-600",children:h}),se("span",{className:"font-mono text-gray-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:_r("div",{className:n("flex items-center gap-1.5 rounded-l-md border-y border-l border-gray-300 bg-gray-50 px-3 py-1.5 text-gray-700",d?"sm:min-w-36":"sm:min-w-28"),onClick:()=>m(C=>!C),children:[se(f,{className:"size-4 shrink-0"}),se("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:d?se("span",{className:"font-mono text-xs",children:p}):b})]})}),se("div",{className:"min-w-0 grow",children:se(Sc,{disabledTooltip:a,children:se("input",{type:"text",id:`${s}-${p}`,ref:g===0?i:void 0,placeholder:y,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-gray-300 placeholder-gray-400 focus:border-gray-500 focus:ring-gray-500 disabled:cursor-not-allowed sm:text-sm",value:e[p]||"",onChange:C=>t(p,C.target.value)})})})]})},p))})}function Sc({children:e,disabledTooltip:t}){return t?se(te,{content:t,disableHoverableContent:!0,children:e}):e}import{jsx as Hr,jsxs as Rc}from"react/jsx-runtime";function Tb(){return Rc("div",{style:Jt.backgroundMain,children:[Hr("div",{style:Jt.backgroundMainBefore}),Hr("div",{style:Jt.backgroundMainAfter}),Hr("div",{style:Jt.backgroundContent})]})}var Jt={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
43
43
|
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
44
44
|
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
45
45
|
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
46
46
|
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
47
47
|
radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
|
|
48
|
-
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import id from"next/image";import De from"next/link";import{useParams as nd}from"next/navigation";import{useEffect as sd,useState as di}from"react";import ld from"swr";import{jsx as Ka}from"react/jsx-runtime";function ja(e){return Ka("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Ka("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}var Xt=[{title:"Dub Links",description:"Short links with superpowers",icon:Wo,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:$o,href:"/help/article/dub-analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Pt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:kt,href:"/docs/integrations"}],Ya=[{icon:fo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:po,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:ja,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],qa=[{icon:wo,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:yo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:vo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:xo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:bo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],er=[{icon:zo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:No,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Co,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Fo,title:"Help Center",description:"Answers to your questions",href:"/help"}],tr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Za=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}];import{jsx as Rc}from"react/jsx-runtime";function rr({className:e,children:t}){return Rc("div",{className:n("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ae from"@radix-ui/react-popover";import{BoxSelect as Yc,Home as qc,LayoutGrid as Zc,Type as Qc}from"lucide-react";import{useParams as Jc}from"next/navigation";import{useCallback as Xc,useContext as ed,useState as td}from"react";import{toast as rd}from"sonner";import{jsx as Qa}from"react/jsx-runtime";function Fr({className:e}){return Qa("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-10 w-10 text-black dark:text-white",e),children:Qa("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}import*as le from"@radix-ui/react-navigation-menu";import{LayoutGroup as Ac}from"framer-motion";import Dc from"js-cookie";import ut from"next/link";import{useParams as Ic,usePathname as zc}from"next/navigation";import{createContext as Oc,useId as Vc}from"react";import _c from"swr";import ti from"next/link";import{jsx as N,jsxs as Br}from"react/jsx-runtime";function Ja(e){return Br("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:n("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[Br("g",{className:"text-[var(--grid)]",children:[N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),N("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),N("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),N("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"232.909",children:"402"})}),N("g",{filter:"url(#a)",children:N("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),N("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),N("defs",{children:Br("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[N("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),N("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),N("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),N("feOffset",{dy:"2"}),N("feGaussianBlur",{stdDeviation:"1"}),N("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),N("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),N("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as Mc}from"react";import{jsx as u,jsxs as H}from"react/jsx-runtime";function Xa(e){let t=Mc();return H("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:n("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[H("g",{clipPath:`url(#${t}-a)`,children:[u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),u("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),u("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),u("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),u("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),u("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),u("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),u("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),u("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),u("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),u("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),u("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),u("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),u("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),u("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),H("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),u("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),u("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:u("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:u("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),H("g",{children:[u("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),u("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),u("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),u("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:u("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),u("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:u("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"251",y:"171.636",children:"51K"})})]}),H("defs",{children:[H("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),H("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),H("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#030712",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),H("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),H("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),u("clipPath",{id:`${t}-a`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),u("clipPath",{id:`${t}-y`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),u("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:u("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),u("image",{href:`${wt}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import ei from"next/link";import{jsx as Ee,jsxs as or}from"react/jsx-runtime";var mt="text-xs uppercase text-neutral-400 dark:text-white/60",Lc="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20";function tt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return Ee(ei,{className:n(Lc,a),...c,children:or("div",{className:"flex items-center justify-between gap-3",children:[e,or("div",{className:"flex-1",children:[Ee("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Ee("p",{className:n("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&Ee(ao,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})}function ar({icon:e,title:t,description:r,...o}){return Ee(ei,{...o,className:"group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:or("div",{className:"flex items-center justify-between px-5 py-4",children:[or("div",{children:[Ee("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),Ee("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),Ee(e,{className:"size-6 text-neutral-700 dark:text-neutral-200"})]})})}import{jsx as $,jsxs as Te}from"react/jsx-runtime";var Ec=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Pt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:kt,href:"/docs/integrations"}];function ri({domain:e}){return Te("div",{className:"grid w-[1020px] grid-cols-[repeat(2,minmax(0,1fr)),0.8fr] gap-4 p-5",children:[Te(ti,{href:V("/home",e),className:"group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[Te("div",{className:"p-5 pb-0",children:[$("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),$("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),$("div",{className:"relative grow overflow-hidden",children:$(Xa,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),$("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]}),Te("div",{className:"flex flex-col gap-4",children:[Te(ti,{href:V("/help/article/dub-analytics",e),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[$(Ja,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),$("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Te("div",{className:"h-56 p-5",children:[$("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),$("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]}),$("div",{className:"grid grow grid-rows-2 gap-4",children:Ec.map(({title:t,description:r,icon:o,href:a})=>$(ar,{title:t,description:r,icon:o,href:V(a,e)},t))})]}),Te("div",{className:"pl-2 pt-2",children:[$("p",{className:n(mt,"mb-2"),children:"Customer Stories"}),Te("div",{className:"grid grid-cols-1",children:[Ya.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>$(tt,{href:V(l,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:o}),className:"-mx-2",icon:$("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:$(t,{className:n("h-4 w-4 shrink-0 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),$(tt,{href:V("/customers",e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:"Customer Stories"}),title:"View all stories",showArrow:!0})]}),$("p",{className:n(mt,"mb-2 mt-5"),children:"Compare"}),$("div",{className:"flex flex-col",children:tr.map(({name:t,slug:r})=>$(tt,{href:V(`/compare/${r}`,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:`Dub vs. ${t}`}),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import Tc from"next/link";import{jsx as J,jsxs as rt}from"react/jsx-runtime";function oi({domain:e}){return rt("div",{className:"grid w-[584px] grid-cols-2 gap-4 p-5",children:[J("div",{children:J("div",{className:"flex flex-col gap-4",children:er.map(({icon:t,title:r,description:o,href:a})=>J(ar,{title:r,description:o,icon:t,href:V(a,e)},r))})}),rt("div",{className:"flex flex-col gap-4",children:[rt("div",{children:[J("p",{className:n(mt,"my-2"),children:"SDKs"}),J("div",{className:"flex flex-col gap-0.5",children:qa.map(({icon:t,iconClassName:r,title:o,href:a})=>J(tt,{href:V(a,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:o}),icon:J("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:J(t,{className:n("size-5 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),J("div",{className:"flex grow flex-col justify-end",children:rt(Tc,{href:V("/brand",e),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[J(La,{cellSize:20,patternOffset:[0,-5],className:"text-neutral-600 [mask-image:radial-gradient(75%_50%_at_50%_0,black,transparent)]"}),J("div",{className:"pointer-events-none absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:J("div",{className:n("absolute inset-[16%] rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),rt("div",{className:"relative flex items-center justify-between px-5 py-4",children:[rt("div",{children:[J("span",{className:"text-sm font-medium leading-none text-white",children:"Dub Brand"}),J("p",{className:"mt-1 text-sm text-white/70",children:"Logos, wordmark, etc."})]}),J(Bo,{className:"size-6 text-white"})]})]})})]})]})}import{Fragment as Fc,jsx as W,jsxs as pt}from"react/jsx-runtime";var Wr=Oc({theme:"light"}),Ur=[{name:"Product",content:ri,childItems:Xt,segments:["/features","/compare"]},{name:"Resources",content:oi,childItems:er,segments:["/solutions","/blog","/changelog","/docs","/help","/brand"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],ai=n("relative block rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function ky({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Ic();t&&(o=t);let a=Vc(),l=ca(40),c=zc(),{data:s,isLoading:d}=_c(o.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4}),m=!!(o==="dub.co"&&Dc.get("dub_id"));return W(Wr.Provider,{value:{theme:e},children:W(Ac,{id:a,children:pt("div",{className:n("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[W("div",{className:n("absolute inset-0 block border-b border-transparent transition-all",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),W(rr,{className:n("relative",r),children:pt("div",{className:"flex h-14 items-center justify-between",children:[W("div",{className:"grow basis-0",children:W(ut,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:W(ir,{})})}),pt(le.Root,{delayDuration:0,className:"relative hidden lg:block",children:[W(le.List,{className:"group relative z-0 flex",children:Ur.map(({name:i,href:p,segments:f,content:b})=>{let y=f.some(h=>c==null?void 0:c.startsWith(h));return pt(le.Item,{children:[W(Hc,{trigger:!!b,children:p!==void 0?W(ut,{id:`nav-${p}`,href:V(p,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:i}),className:ai,"data-active":y,children:i}):W("button",{className:ai,"data-active":y,children:i})}),b&&W(le.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:W(b,{domain:o})})]},i)})}),W("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:W(le.Viewport,{className:n("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-gray-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),W("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?W(ut,{href:Ue,className:n(pe({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):d?null:pt(Fc,{children:[W(ut,{href:m?"https://app.dub.co/login":"https://d.to/login",className:n(pe({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),W(ut,{href:m?"https://app.dub.co/register":"https://d.to/register",className:n(pe({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Hc({trigger:e,children:t}){return e?W(le.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Bc,Menu as Wc,X as Uc}from"lucide-react";import ft from"next/link";import{useParams as ii}from"next/navigation";import{useEffect as $c,useState as ni}from"react";import Gc from"swr";import{Fragment as jc,jsx as F,jsxs as Be}from"react/jsx-runtime";function zy({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=ii();t&&(r=t);let[o,a]=ni(!1);$c(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=Gc(r.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4});return Be("div",{className:n(e==="dark"&&"dark"),children:[F("button",{onClick:()=>a(!o),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-gray-100 active:bg-gray-200"),children:o?F(Uc,{className:"h-5 w-5 text-gray-600 dark:text-white/70"}):F(Wc,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),F("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Be("ul",{className:"grid divide-y divide-gray-200 dark:divide-white/[0.15]",children:[Ur.map(({name:c,href:s,childItems:d},m)=>F(Kc,{name:c,href:s,childItems:d,setOpen:a},m)),l&&Object.keys(l).length>0?F("li",{className:"py-3",children:F(ft,{href:Ue,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Be(jc,{children:[F("li",{className:"py-3",children:F(ft,{href:`${Ue}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),F("li",{className:"py-3",children:F(ft,{href:`${Ue}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Kc=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=ii(),[l,c]=ni(!1);return r?F("li",{className:"py-3",children:Be(ye,{height:!0,children:[Be("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[F("p",{className:"font-semibold",children:e}),F(Bc,{className:n("h-5 w-5 text-gray-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&F("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:s,href:d,icon:m,description:i})=>Be(ft,{href:V(d,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:s}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[F("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:F(m,{className:"size-5 text-neutral-700"})}),Be("div",{children:[F("div",{className:"flex items-center gap-2",children:F("h2",{className:"text-sm font-medium text-neutral-900",children:s})}),F("p",{className:"text-sm text-neutral-500",children:i})]})]},d))})]})}):t?F("li",{className:"py-3",children:F(ft,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null};import{jsx as si}from"react/jsx-runtime";function li({className:e}){return si("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-6 w-auto text-black dark:text-white",e),children:si("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as Y,jsxs as ci}from"react/jsx-runtime";var od=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
+
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import nd from"next/image";import De from"next/link";import{useParams as sd}from"next/navigation";import{useEffect as ld,useState as di}from"react";import cd from"swr";import{jsx as Ka}from"react/jsx-runtime";function ja(e){return Ka("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Ka("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}var Xt=[{title:"Dub Links",description:"Short links with superpowers",icon:Wo,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:$o,href:"/help/article/dub-analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Pt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:kt,href:"/docs/integrations"}],Ya=[{icon:fo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:po,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:ja,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],qa=[{icon:wo,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:yo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:vo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:xo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:bo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],er=[{icon:zo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:No,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Co,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Fo,title:"Help Center",description:"Answers to your questions",href:"/help"}],tr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Za=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}];import{jsx as Mc}from"react/jsx-runtime";function rr({className:e,children:t}){return Mc("div",{className:n("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ae from"@radix-ui/react-popover";import{BoxSelect as qc,Home as Zc,LayoutGrid as Qc,Type as Jc}from"lucide-react";import{useParams as Xc}from"next/navigation";import{useCallback as ed,useContext as td,useState as rd}from"react";import{toast as od}from"sonner";import{jsx as Qa}from"react/jsx-runtime";function Fr({className:e}){return Qa("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-10 w-10 text-black dark:text-white",e),children:Qa("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}import*as le from"@radix-ui/react-navigation-menu";import{LayoutGroup as Dc}from"framer-motion";import Ic from"js-cookie";import ut from"next/link";import{useParams as zc,usePathname as Oc}from"next/navigation";import{createContext as Vc,useId as _c}from"react";import Hc from"swr";import ti from"next/link";import{jsx as N,jsxs as Br}from"react/jsx-runtime";function Ja(e){return Br("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:n("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[Br("g",{className:"text-[var(--grid)]",children:[N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),N("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),N("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),N("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),N("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),N("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),N("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:N("tspan",{x:"157.667",y:"232.909",children:"402"})}),N("g",{filter:"url(#a)",children:N("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),N("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),N("defs",{children:Br("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[N("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),N("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),N("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),N("feOffset",{dy:"2"}),N("feGaussianBlur",{stdDeviation:"1"}),N("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),N("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),N("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as Lc}from"react";import{jsx as u,jsxs as H}from"react/jsx-runtime";function Xa(e){let t=Lc();return H("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:n("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[H("g",{clipPath:`url(#${t}-a)`,children:[u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),u("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),u("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),u("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),u("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),u("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),u("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),u("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),u("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),u("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),u("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),u("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),u("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),u("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),u("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),H("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),u("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),H("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),u("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:u("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:u("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),H("g",{children:[u("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),u("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),u("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),u("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:u("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),u("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:u("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"251",y:"171.636",children:"51K"})})]}),H("defs",{children:[H("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),H("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),H("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),H("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#030712",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),H("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),H("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),u("clipPath",{id:`${t}-a`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),u("clipPath",{id:`${t}-y`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),u("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:u("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),u("image",{href:`${wt}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import ei from"next/link";import{jsx as Ee,jsxs as or}from"react/jsx-runtime";var mt="text-xs uppercase text-neutral-400 dark:text-white/60",Ec="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20";function tt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return Ee(ei,{className:n(Ec,a),...c,children:or("div",{className:"flex items-center justify-between gap-3",children:[e,or("div",{className:"flex-1",children:[Ee("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Ee("p",{className:n("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&Ee(ao,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})}function ar({icon:e,title:t,description:r,...o}){return Ee(ei,{...o,className:"group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:or("div",{className:"flex items-center justify-between px-5 py-4",children:[or("div",{children:[Ee("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),Ee("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),Ee(e,{className:"size-6 text-neutral-700 dark:text-neutral-200"})]})})}import{jsx as $,jsxs as Te}from"react/jsx-runtime";var Tc=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Pt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:kt,href:"/docs/integrations"}];function ri({domain:e}){return Te("div",{className:"grid w-[1020px] grid-cols-[repeat(2,minmax(0,1fr)),0.8fr] gap-4 p-5",children:[Te(ti,{href:V("/home",e),className:"group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[Te("div",{className:"p-5 pb-0",children:[$("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),$("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),$("div",{className:"relative grow overflow-hidden",children:$(Xa,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),$("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]}),Te("div",{className:"flex flex-col gap-4",children:[Te(ti,{href:V("/help/article/dub-analytics",e),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[$(Ja,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),$("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Te("div",{className:"h-56 p-5",children:[$("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),$("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]}),$("div",{className:"grid grow grid-rows-2 gap-4",children:Tc.map(({title:t,description:r,icon:o,href:a})=>$(ar,{title:t,description:r,icon:o,href:V(a,e)},t))})]}),Te("div",{className:"pl-2 pt-2",children:[$("p",{className:n(mt,"mb-2"),children:"Customer Stories"}),Te("div",{className:"grid grid-cols-1",children:[Ya.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>$(tt,{href:V(l,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:o}),className:"-mx-2",icon:$("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:$(t,{className:n("h-4 w-4 shrink-0 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),$(tt,{href:V("/customers",e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:"Customer Stories"}),title:"View all stories",showArrow:!0})]}),$("p",{className:n(mt,"mb-2 mt-5"),children:"Compare"}),$("div",{className:"flex flex-col",children:tr.map(({name:t,slug:r})=>$(tt,{href:V(`/compare/${r}`,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:`Dub vs. ${t}`}),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import Ac from"next/link";import{jsx as J,jsxs as rt}from"react/jsx-runtime";function oi({domain:e}){return rt("div",{className:"grid w-[584px] grid-cols-2 gap-4 p-5",children:[J("div",{children:J("div",{className:"flex flex-col gap-4",children:er.map(({icon:t,title:r,description:o,href:a})=>J(ar,{title:r,description:o,icon:t,href:V(a,e)},r))})}),rt("div",{className:"flex flex-col gap-4",children:[rt("div",{children:[J("p",{className:n(mt,"my-2"),children:"SDKs"}),J("div",{className:"flex flex-col gap-0.5",children:qa.map(({icon:t,iconClassName:r,title:o,href:a})=>J(tt,{href:V(a,e,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,utm_content:o}),icon:J("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:J(t,{className:n("size-5 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),J("div",{className:"flex grow flex-col justify-end",children:rt(Ac,{href:V("/brand",e),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[J(La,{cellSize:20,patternOffset:[0,-5],className:"text-neutral-600 [mask-image:radial-gradient(75%_50%_at_50%_0,black,transparent)]"}),J("div",{className:"pointer-events-none absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:J("div",{className:n("absolute inset-[16%] rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),rt("div",{className:"relative flex items-center justify-between px-5 py-4",children:[rt("div",{children:[J("span",{className:"text-sm font-medium leading-none text-white",children:"Dub Brand"}),J("p",{className:"mt-1 text-sm text-white/70",children:"Logos, wordmark, etc."})]}),J(Bo,{className:"size-6 text-white"})]})]})})]})]})}import{Fragment as Bc,jsx as W,jsxs as pt}from"react/jsx-runtime";var Wr=Vc({theme:"light"}),Ur=[{name:"Product",content:ri,childItems:Xt,segments:["/features","/compare"]},{name:"Resources",content:oi,childItems:er,segments:["/solutions","/blog","/changelog","/docs","/help","/brand"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],ai=n("relative block rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function My({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=zc();t&&(o=t);let a=_c(),l=ca(40),c=Oc(),{data:s,isLoading:d}=Hc(o.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4}),m=!!(o==="dub.co"&&Ic.get("dub_id"));return W(Wr.Provider,{value:{theme:e},children:W(Dc,{id:a,children:pt("div",{className:n("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[W("div",{className:n("absolute inset-0 block border-b border-transparent transition-all",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),W(rr,{className:n("relative",r),children:pt("div",{className:"flex h-14 items-center justify-between",children:[W("div",{className:"grow basis-0",children:W(ut,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:W(ir,{})})}),pt(le.Root,{delayDuration:0,className:"relative hidden lg:block",children:[W(le.List,{className:"group relative z-0 flex",children:Ur.map(({name:i,href:p,segments:f,content:b})=>{let y=f.some(h=>c==null?void 0:c.startsWith(h));return pt(le.Item,{children:[W(Fc,{trigger:!!b,children:p!==void 0?W(ut,{id:`nav-${p}`,href:V(p,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:i}),className:ai,"data-active":y,children:i}):W("button",{className:ai,"data-active":y,children:i})}),b&&W(le.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:W(b,{domain:o})})]},i)})}),W("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:W(le.Viewport,{className:n("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-gray-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),W("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?W(ut,{href:Ue,className:n(pe({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):d?null:pt(Bc,{children:[W(ut,{href:m?"https://app.dub.co/login":"https://d.to/login",className:n(pe({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),W(ut,{href:m?"https://app.dub.co/register":"https://d.to/register",className:n(pe({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Fc({trigger:e,children:t}){return e?W(le.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Wc,Menu as Uc,X as $c}from"lucide-react";import ft from"next/link";import{useParams as ii}from"next/navigation";import{useEffect as Gc,useState as ni}from"react";import Kc from"swr";import{Fragment as Yc,jsx as F,jsxs as Be}from"react/jsx-runtime";function Hy({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=ii();t&&(r=t);let[o,a]=ni(!1);Gc(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=Kc(r.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4});return Be("div",{className:n(e==="dark"&&"dark"),children:[F("button",{onClick:()=>a(!o),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-gray-100 active:bg-gray-200"),children:o?F($c,{className:"h-5 w-5 text-gray-600 dark:text-white/70"}):F(Uc,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),F("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Be("ul",{className:"grid divide-y divide-gray-200 dark:divide-white/[0.15]",children:[Ur.map(({name:c,href:s,childItems:d},m)=>F(jc,{name:c,href:s,childItems:d,setOpen:a},m)),l&&Object.keys(l).length>0?F("li",{className:"py-3",children:F(ft,{href:Ue,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Be(Yc,{children:[F("li",{className:"py-3",children:F(ft,{href:`${Ue}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),F("li",{className:"py-3",children:F(ft,{href:`${Ue}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var jc=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=ii(),[l,c]=ni(!1);return r?F("li",{className:"py-3",children:Be(ye,{height:!0,children:[Be("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[F("p",{className:"font-semibold",children:e}),F(Wc,{className:n("h-5 w-5 text-gray-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&F("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:s,href:d,icon:m,description:i})=>Be(ft,{href:V(d,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:s}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[F("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:F(m,{className:"size-5 text-neutral-700"})}),Be("div",{children:[F("div",{className:"flex items-center gap-2",children:F("h2",{className:"text-sm font-medium text-neutral-900",children:s})}),F("p",{className:"text-sm text-neutral-500",children:i})]})]},d))})]})}):t?F("li",{className:"py-3",children:F(ft,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null};import{jsx as si}from"react/jsx-runtime";function li({className:e}){return si("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-6 w-auto text-black dark:text-white",e),children:si("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as Y,jsxs as ci}from"react/jsx-runtime";var ad=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
|
|
50
|
-
</svg>`,
|
|
50
|
+
</svg>`,id=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
51
51
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>
|
|
52
|
-
</svg>`;function ir({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Jc(),{theme:a}=ed(Wr),[l,c]=td(!1),s=Xc(i=>{i.preventDefault(),c(!0)},[]),[,d]=je();function m(i){rd.promise(d(i),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return ci(Ae.Root,{open:l,onOpenChange:c,children:[Y(Ae.Anchor,{asChild:!0,children:Y("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?Y(li,{className:r}):Y(Fr,{className:n("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Y(Ae.Portal,{children:Y(Ae.Content,{sideOffset:14,align:"start",className:n("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:i=>{i.stopPropagation(),c(!1)},children:ci("div",{className:"grid gap-1 rounded-lg border border-gray-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Y(gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>m(od),icon:Y(Fr,{className:"h-4 w-4"})}),Y(gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>m(ad),icon:Y(Qc,{strokeWidth:2,className:"h-4 w-4"})}),Y(gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(Yc,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(qc,{strokeWidth:2,className:"h-4 w-4"})}):Y(gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(Zc,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function gt({className:e,...t}){return Y(ie,{className:n("h-9 justify-start px-3 font-medium hover:text-gray-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as E,jsxs as B}from"react/jsx-runtime";var cd=[{name:"Twitter",icon:go,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:uo,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:mo,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ho,href:"https://www.youtube.com/@dubdotco"}],ht={features:Xt.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:tr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Za.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:ro.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},vt="text-sm font-medium text-neutral-900",bt="flex flex-col mt-2.5 gap-2.5",ot="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function lx({staticDomain:e,className:t}){let{domain:r="dub.co"}=nd();return e&&(r=e),E(rr,{className:n("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:B("footer",{children:[B("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[B("div",{className:"flex flex-col gap-6",children:[E("div",{className:"grow",children:B(De,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[B("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),E(ir,{className:"h-8 text-gray-800"})]})}),E("div",{className:"flex items-center gap-3",children:cd.map(({name:o,icon:a,href:l})=>B("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[E("span",{className:"sr-only",children:o}),E(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),B("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{children:[E("h3",{className:vt,children:"Product"}),E("ul",{role:"list",className:bt,children:ht.features.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:vt,children:"Resources"}),E("ul",{role:"list",className:bt,children:ht.product.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"flex flex-col space-y-8",children:[B("div",{children:[E("h3",{className:vt,children:"Compare"}),E("ul",{role:"list",className:bt,children:ht.compare.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{children:[E("h3",{className:vt,children:"Legal"}),B("ul",{role:"list",className:bt,children:[ht.legal.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name)),E("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:n(ot,"flex items-center gap-1"),children:["Trust Center ",E(Ko,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:vt,children:"Tools"}),E("ul",{role:"list",className:bt,children:ht.tools.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[E(dd,{}),E(De,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:E(id,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),B("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}function dd(){let{data:e}=ld("https://status.dub.co/api/v1/summary",me),[t,r]=di("bg-neutral-200"),[o,a]=di("Loading status...");return sd(()=>{if(!e)return;let{ongoing_incidents:l}=e;if(l.length>0){let{current_worst_impact:c,name:s}=l[0],d=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(s),r(d)}else a("All systems operational"),r("bg-green-500")},[e]),B(De,{href:"https://status.dub.co",target:"_blank",className:"group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",children:[B("div",{className:"relative size-2",children:[E("div",{className:n("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),E("div",{className:n("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),E("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as md,motion as ud}from"framer-motion";import{useEffect as pd,useState as fd}from"react";import{jsx as mi}from"react/jsx-runtime";var ui=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=fd(!1);pd(()=>{l(!0)},[]);let c=r?ud.div:"div";return mi(md,{children:a?mi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as gd}from"class-variance-authority";import{toast as hd}from"sonner";import{jsx as $r,jsxs as bd}from"react/jsx-runtime";var vd=gd("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-gray-100 active:bg-gray-200",neutral:"bg-transparent hover:bg-gray-100 active:bg-gray-200"}},defaultVariants:{variant:"default"}});function xx({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=je(),s=o||oo;return bd("button",{onClick:d=>{d.stopPropagation(),hd.promise(c(t),{success:a||"Copied to clipboard!"})},className:n(vd({variant:e}),r),type:"button",children:[$r("span",{className:"sr-only",children:"Copy"}),l?$r(co,{className:"h-3.5 w-3.5"}):$r(s,{className:"h-3.5 w-3.5"})]})}import{toast as yd}from"sonner";import{jsx as xd}from"react/jsx-runtime";function Px({value:e,children:t,className:r,successMessage:o}){let[a,l]=je();return xd("button",{onClick:c=>{c.stopPropagation(),yd.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:n("cursor-copy text-sm text-gray-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as wd,jsxs as Cd}from"react/jsx-runtime";function Rx({icon:e,text:t}){return Cd("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,wd("p",{className:"truncate text-sm",children:t})]})}import{jsx as Nd}from"react/jsx-runtime";var Lx=({children:e})=>Nd("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Gr}from"react/jsx-runtime";function Ix({apexDomain:e,className:t,imageProps:r}){return e?Gr(Gt,{src:`${wt}${e}`,alt:e,className:n("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Gr("div",{className:n("flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 px-0 sm:h-10 sm:w-10",t),children:Gr(Ho,{className:"h-4 w-4 text-gray-600 sm:h-5 sm:w-5"})})}import{Link2 as pi}from"lucide-react";import{useRouter as kd,useSearchParams as Pd}from"next/navigation";import{useEffect as Sd,useMemo as Rd,useRef as Md}from"react";import Ld from"swr";import{useDebounce as Ed}from"use-debounce";import{Fragment as fi,jsx as G,jsxs as Ie}from"react/jsx-runtime";function $x({defaultUrl:e}){let t=kd(),r=Pd(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=Ed(qr(o),500),l=Rd(()=>Qr(a||""),[a]),{data:c,isValidating:s}=Ld(a&&`/api/metatags?url=${encodeURIComponent(a)}`,me,{revalidateOnFocus:!1}),{title:d,description:m,image:i}=c||{},p=Md(null);Sd(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=j();return Ie(fi,{children:[!e&&Ie("div",{className:"relative flex items-center",children:[G(pi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),G("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:o,onChange:b=>t.replace(`/tools/metatags${b.target.value.length>0?`?url=${b.target.value}`:""}`),"aria-invalid":"true"})]}),Ie("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:[s&&G("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:G(it,{})}),i?G("img",{src:i,alt:"Preview",className:"h-[250px] w-full border-b border-gray-300 object-cover"}):Ie("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300",children:[G(no,{className:"h-8 w-8 text-gray-400"}),G("p",{className:"text-sm text-gray-400",children:"Enter a link to generate a preview."})]}),Ie("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?G("p",{className:"text-sm text-[#536471]",children:l}):G("div",{className:"mb-1 h-4 w-24 rounded-md bg-gray-100"}),d?G("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:d}):G("div",{className:"mb-1 h-4 w-full rounded-md bg-gray-100"}),m?G("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Ie("div",{className:"grid gap-2",children:[G("div",{className:"h-4 w-full rounded-md bg-gray-100"}),G("div",{className:"h-4 w-48 rounded-md bg-gray-100"})]})]})]})]})}function Gx({defaultUrl:e}){return Ie(fi,{children:[Ie("div",{className:"relative flex items-center",children:[G(pi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),G("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),G("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:G("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:G(it,{})})})]})}import{AnimatePresence as Td}from"framer-motion";import gi from"js-cookie";import{createContext as Ad,useState as Dd}from"react";import{jsx as Kr}from"react/jsx-runtime";var Id=Ad({hidePopup:()=>{}});function Jx({children:e,hiddenCookieId:t}){let[r,o]=Dd(gi.get(t)==="1"),a=()=>{o(!0),gi.set(t,"1")};return Kr(ui,{children:Kr(Id.Provider,{value:{hidePopup:a},children:Kr(Td,{children:!r&&e})})})}import{motion as zd}from"framer-motion";import{jsx as hi}from"react/jsx-runtime";function r2({value:e=0,max:t=100,className:r}){return hi("div",{className:n("h-3 w-full overflow-hidden rounded-full bg-gray-200",r),children:hi(zd.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as vi}from"class-variance-authority";import{LayoutGroup as Od,motion as Vd}from"framer-motion";import{useId as _d}from"react";import{jsx as yt,jsxs as Bd}from"react/jsx-runtime";var Hd=vi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-gray-400 data-[selected=true]:text-black data-[selected=false]:hover:text-gray-500",accent:"text-neutral-500 transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-neutral-700 data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Fd=vi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-black",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function m2({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=_d();return yt("div",{className:n("flex text-sm",a),children:yt(Od,{id:l,children:t.map(({id:c,label:s})=>Bd("div",{className:"relative",children:[yt("button",{type:"button",onClick:()=>o==null?void 0:o(c),className:Hd({variant:e}),"data-selected":c===r,"aria-selected":c===r,children:s}),c===r&&yt(Vd.div,{layoutId:"indicator",transition:{duration:.1},className:Fd({variant:e}),children:yt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c))})})}import{jsx as bi,jsxs as Wd}from"react/jsx-runtime";function f2({className:e}){return Wd("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-6 w-auto text-black dark:text-white",e),children:[bi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),bi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Jo as AUTOPLAY_DEFAULT_DELAY,qp as Accordion,Pi as AccordionContent,Ni as AccordionItem,ki as AccordionTrigger,Zd as Africa,lm as Airtm,Li as Alert,Ti as AlertDescription,Ei as AlertTitle,rm as Amazon,ye as AnimatedSizeContainer,fm as Apple,gm as ArrowBoldUp,hm as ArrowRight,vm as ArrowTrendUp,bm as ArrowTurnLeft,ym as ArrowTurnRight2,xm as ArrowUpRight,wm as ArrowsOppositeDirectionY,Qd as Asia,o0 as Avatar,Rb as Background,Et as Badge,Cm as BadgeCheck,k0 as BadgeTooltip,Nm as Blog,Gt as BlurImage,km as Bolt,Pm as BoltFill,Rm as Book2,Co as Book2Fill,Sm as BookOpen,Mm as Books2,Lm as BoxArchive,Em as BulletList,No as BulletListFill,ie as Button,P0 as ButtonTooltip,tr as COMPARE_PAGES,Ya as CUSTOMER_STORIES,ha as Calendar,Dm as Calendar6,Am as CalendarDays,Tm as CalendarIcon,q0 as CardList,Im as Cards,zm as CaretUpFill,dn as Carousel,mn as CarouselContent,un as CarouselItem,sf as CarouselNavBar,fn as CarouselNext,pn as CarouselPrevious,cm as CashApp,Om as ChartActivity2,Vm as ChartLine,om as ChatGPT,ko as Check,Po as Check2,vn as Checkbox,So as CheckboxCheckedFill,Ro as CheckboxUnchecked,Mo as CircleCheck,_m as CircleCheckFill,Hm as CircleDollar,Fm as CircleDotted,Lo as CircleHalfDottedCheck,Eo as CircleHalfDottedClock,To as CircleInfo,Bm as CirclePlayFill,Wm as CircleQuestion,cr as CircleWarning,Um as CircleXmark,$m as Circles,Gm as Circles3,ui as ClientOnly,Ao as CloudUpload,Km as Code,jm as ColorPalette2,$g as Combobox,f2 as CompositeLogo,Ym as ConnectedDots,qm as ConnectedDots4,kt as ConnectedDotsFill,Zm as Connections3,oo as Copy,xx as CopyButton,Px as CopyText,Qm as CreditCard,Jm as Crosshairs3,Xm as Crown,eu as Cube,tu as CubeSettings,Pt as CubeSettingsFill,ru as CurrencyDollar,ou as CursorRays,au as DatabaseKey,yr as DatePickerContext,Rh as DateRangePicker,iu as Desktop,nu as DiamondTurnRight,su as Dots,lu as Download,cu as Duplicate,du as EarthPosition,Dh as EmptyState,mu as EnvelopeArrowRight,Jd as Europe,ao as ExpandingArrow,Do as Eye,Io as EyeSlash,Xt as FEATURES_LIST,Gd as Facebook,zo as FeatherFill,am as Figma,Uh as FileUpload,uu as FileZip2,p1 as Filter,fu as Filter2,pu as FilterBars,hu as Flag2,Oo as Flag6,gu as FlagWavy,vu as Folder,bu as Folder5,lx as Footer,x1 as Form,yu as GamingConsole,xu as Gauge6,wu as Gear,Cu as Gear2,Nu as Gear3,ku as Gem,Vo as Gift,Pu as GiftFill,im as GitHubEnhanced,mo as Github,Su as Globe,Ho as Globe2,_o as GlobePointer,Ru as GlobeSearch,vo as Go,Kd as Google,nm as GoogleEnhanced,Mu as GreekTemple,La as Grid,Lu as GridIcon,Eu as GridLayoutRows,Tu as GridPlus,Au as Headset,Fo as HeadsetFill,Bo as HexadecagonStar,Wo as Hyperlink,Rx as IconMenu,Du as Icosahedron,Iu as Incognito,C0 as InfoTooltip,Lx as InlineSnippet,pl as Input,zu as InputPassword,Uo as InputSearch,q1 as InputSelect,Ou as InvoiceDollar,Vu as Key,ra as KeyboardShortcutContext,_f as KeyboardShortcutProvider,Za as LEGAL_PAGES,Al as Label,_u as LayoutSidebar,Hu as License,$o as LinesY,Bu as Link4,Fu as LinkBroken,Ix as LinkLogo,$x as LinkPreview,Gx as LinkPreviewPlaceholder,uo as LinkedIn,w0 as LinkifyTooltipContent,it as LoadingCircle,$d as LoadingDots,be as LoadingSpinner,Wu as LocationPin,Fr as Logo,io as Magic,Uu as Magnifier,$u as MapPosition,Ud as MatrixLines,rr as MaxWidthWrapper,Gu as Menu3,Ku as MessageSmile,lv as MiniAreaChart,ju as MobilePhone,fv as Modal,Yu as MoneyBill2,qu as MoneyBills2,ky as Nav,Wr as NavContext,zy as NavMobile,ir as NavWordmark,Xd as NorthAmerica,Zu as Note,op as NucleoPhoto,N0 as NumberTooltip,em as Oceania,Qu as OfficeBuilding,Go as Page2,vv as PaginationControls,Ju as Paintbrush,Xu as Palette2,dm as Payoneer,mm as Paypal,tp as Pen2,ep as PenWriting,rp as PercentageArrowDown,no as Photo,bo as Php,ap as Plug2,St as Plus,Qe as Popover,Jx as Popup,Id as PopupContext,ip as Post,jd as Prisma,po as ProductHunt,r2 as ProgressBar,np as Pyramid,yo as Python,sp as QRCode,er as RESOURCES,Kl as RadioGroup,jl as RadioGroupItem,fo as Raycast,lp as Receipt2,Ko as ReferredVia,cp as Refresh2,dp as Robot,xo as Ruby,qa as SDKS,jo as SatelliteDish,mp as ScanText,up as Scribble,Pv as Sheet,pp as ShieldAlert,fp as ShieldCheck,gp as ShieldKeyhole,Lv as ShimmerDots,hp as Shuffle,x0 as SimpleTooltipContent,vp as Sliders,so as SortOrder,tm as SouthAmerica,bp as Sparkle3,sm as Spotify,yp as SquareChart,xp as SquareLayoutGrid6,wp as Stars2,zv as StatusBadge,um as StripeLink,lo as Success,Uv as Switch,Lp as TV,m2 as TabSelect,ub as Table,Cp as TableIcon,Np as TableRows2,kp as Tablet,Pp as Tag,Sp as Tags,co as Tick,Yd as Tinybird,Rp as Toggle2Fill,vb as ToggleGroup,a0 as TokenAvatar,te as Tooltip,y0 as TooltipContent,b0 as TooltipProvider,Mp as Trash,go as Twitter,wo as Typescript,Pb as UTMBuilder,kc as UTM_PARAMETERS,qd as Unsplash,Ep as User,Tp as UserCheck,Ap as UserCrown,Dp as Users,zp as Users2,Op as Users6,Ip as UsersSettings,pm as Venmo,Vp as Versions2,_p as Watch,Hp as Webhook,Fp as Window,Bp as WindowSearch,Wp as WindowSettings,li as Wordmark,Up as Xmark,ho as YouTube,Oi as badgeVariants,pe as buttonVariants,Ii as getUserAvatarUrl,Ur as navItems,sc as statusBadgeVariants,Ke as useCarousel,nf as useCarouselActiveIndex,ff as useCookies,je as useCopyToClipboard,yf as useCurrentAnchor,wf as useEnterSubmit,Pf as useInViewport,Mf as useInputFocused,Af as useIntersectionObserver,Ye as useKeyboardShortcut,Bf as useLocalStorage,j as useMediaQuery,Kf as useOptimisticUpdate,rg as usePagination,Tt as useResizeObserver,na as useRouterStuff,ca as useScroll,qe as useScrollProgress,mb as useTable,ia as useTablePagination,hg as useToastWithUndo};
|
|
52
|
+
</svg>`;function ir({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Xc(),{theme:a}=td(Wr),[l,c]=rd(!1),s=ed(i=>{i.preventDefault(),c(!0)},[]),[,d]=je();function m(i){od.promise(d(i),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return ci(Ae.Root,{open:l,onOpenChange:c,children:[Y(Ae.Anchor,{asChild:!0,children:Y("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?Y(li,{className:r}):Y(Fr,{className:n("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Y(Ae.Portal,{children:Y(Ae.Content,{sideOffset:14,align:"start",className:n("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:i=>{i.stopPropagation(),c(!1)},children:ci("div",{className:"grid gap-1 rounded-lg border border-gray-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Y(gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>m(ad),icon:Y(Fr,{className:"h-4 w-4"})}),Y(gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>m(id),icon:Y(Jc,{strokeWidth:2,className:"h-4 w-4"})}),Y(gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(qc,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(Zc,{strokeWidth:2,className:"h-4 w-4"})}):Y(gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(Qc,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function gt({className:e,...t}){return Y(ie,{className:n("h-9 justify-start px-3 font-medium hover:text-gray-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as E,jsxs as B}from"react/jsx-runtime";var dd=[{name:"Twitter",icon:go,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:uo,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:mo,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ho,href:"https://www.youtube.com/@dubdotco"}],ht={features:Xt.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:tr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Za.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:ro.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},vt="text-sm font-medium text-neutral-900",bt="flex flex-col mt-2.5 gap-2.5",ot="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function ux({staticDomain:e,className:t}){let{domain:r="dub.co"}=sd();return e&&(r=e),E(rr,{className:n("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:B("footer",{children:[B("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[B("div",{className:"flex flex-col gap-6",children:[E("div",{className:"grow",children:B(De,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[B("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),E(ir,{className:"h-8 text-gray-800"})]})}),E("div",{className:"flex items-center gap-3",children:dd.map(({name:o,icon:a,href:l})=>B("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[E("span",{className:"sr-only",children:o}),E(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),B("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{children:[E("h3",{className:vt,children:"Product"}),E("ul",{role:"list",className:bt,children:ht.features.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:vt,children:"Resources"}),E("ul",{role:"list",className:bt,children:ht.product.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"flex flex-col space-y-8",children:[B("div",{children:[E("h3",{className:vt,children:"Compare"}),E("ul",{role:"list",className:bt,children:ht.compare.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{children:[E("h3",{className:vt,children:"Legal"}),B("ul",{role:"list",className:bt,children:[ht.legal.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name)),E("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:n(ot,"flex items-center gap-1"),children:["Trust Center ",E(Ko,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:vt,children:"Tools"}),E("ul",{role:"list",className:bt,children:ht.tools.map(o=>E("li",{children:E(De,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[E(md,{}),E(De,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:E(nd,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),B("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}function md(){let{data:e}=cd("https://status.dub.co/api/v1/summary",me),[t,r]=di("bg-neutral-200"),[o,a]=di("Loading status...");return ld(()=>{if(!e)return;let{ongoing_incidents:l}=e;if(l.length>0){let{current_worst_impact:c,name:s}=l[0],d=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(s),r(d)}else a("All systems operational"),r("bg-green-500")},[e]),B(De,{href:"https://status.dub.co",target:"_blank",className:"group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",children:[B("div",{className:"relative size-2",children:[E("div",{className:n("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),E("div",{className:n("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),E("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as ud,motion as pd}from"framer-motion";import{useEffect as fd,useState as gd}from"react";import{jsx as mi}from"react/jsx-runtime";var ui=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=gd(!1);fd(()=>{l(!0)},[]);let c=r?pd.div:"div";return mi(ud,{children:a?mi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as hd}from"class-variance-authority";import{toast as vd}from"sonner";import{jsx as $r,jsxs as yd}from"react/jsx-runtime";var bd=hd("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-gray-100 active:bg-gray-200",neutral:"bg-transparent hover:bg-gray-100 active:bg-gray-200"}},defaultVariants:{variant:"default"}});function kx({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=je(),s=o||oo;return yd("button",{onClick:d=>{d.stopPropagation(),vd.promise(c(t),{success:a||"Copied to clipboard!"})},className:n(bd({variant:e}),r),type:"button",children:[$r("span",{className:"sr-only",children:"Copy"}),l?$r(co,{className:"h-3.5 w-3.5"}):$r(s,{className:"h-3.5 w-3.5"})]})}import{toast as xd}from"sonner";import{jsx as wd}from"react/jsx-runtime";function Lx({value:e,children:t,className:r,successMessage:o}){let[a,l]=je();return wd("button",{onClick:c=>{c.stopPropagation(),xd.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:n("cursor-copy text-sm text-gray-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Cd,jsxs as Nd}from"react/jsx-runtime";function Tx({icon:e,text:t}){return Nd("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Cd("p",{className:"truncate text-sm",children:t})]})}import{jsx as kd}from"react/jsx-runtime";var Dx=({children:e})=>kd("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Gr}from"react/jsx-runtime";function _x({apexDomain:e,className:t,imageProps:r}){return e?Gr(Gt,{src:`${wt}${e}`,alt:e,className:n("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Gr("div",{className:n("flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 px-0 sm:h-10 sm:w-10",t),children:Gr(Ho,{className:"h-4 w-4 text-gray-600 sm:h-5 sm:w-5"})})}import{Link2 as pi}from"lucide-react";import{useRouter as Pd,useSearchParams as Sd}from"next/navigation";import{useEffect as Rd,useMemo as Md,useRef as Ld}from"react";import Ed from"swr";import{useDebounce as Td}from"use-debounce";import{Fragment as fi,jsx as G,jsxs as Ie}from"react/jsx-runtime";function Yx({defaultUrl:e}){let t=Pd(),r=Sd(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=Td(qr(o),500),l=Md(()=>Qr(a||""),[a]),{data:c,isValidating:s}=Ed(a&&`/api/metatags?url=${encodeURIComponent(a)}`,me,{revalidateOnFocus:!1}),{title:d,description:m,image:i}=c||{},p=Ld(null);Rd(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=j();return Ie(fi,{children:[!e&&Ie("div",{className:"relative flex items-center",children:[G(pi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),G("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:o,onChange:b=>t.replace(`/tools/metatags${b.target.value.length>0?`?url=${b.target.value}`:""}`),"aria-invalid":"true"})]}),Ie("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:[s&&G("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:G(it,{})}),i?G("img",{src:i,alt:"Preview",className:"h-[250px] w-full border-b border-gray-300 object-cover"}):Ie("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300",children:[G(no,{className:"h-8 w-8 text-gray-400"}),G("p",{className:"text-sm text-gray-400",children:"Enter a link to generate a preview."})]}),Ie("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?G("p",{className:"text-sm text-[#536471]",children:l}):G("div",{className:"mb-1 h-4 w-24 rounded-md bg-gray-100"}),d?G("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:d}):G("div",{className:"mb-1 h-4 w-full rounded-md bg-gray-100"}),m?G("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Ie("div",{className:"grid gap-2",children:[G("div",{className:"h-4 w-full rounded-md bg-gray-100"}),G("div",{className:"h-4 w-48 rounded-md bg-gray-100"})]})]})]})]})}function qx({defaultUrl:e}){return Ie(fi,{children:[Ie("div",{className:"relative flex items-center",children:[G(pi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),G("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),G("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:G("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:G(it,{})})})]})}import{AnimatePresence as Ad}from"framer-motion";import gi from"js-cookie";import{createContext as Dd,useState as Id}from"react";import{jsx as Kr}from"react/jsx-runtime";var zd=Dd({hidePopup:()=>{}});function r2({children:e,hiddenCookieId:t}){let[r,o]=Id(gi.get(t)==="1"),a=()=>{o(!0),gi.set(t,"1")};return Kr(ui,{children:Kr(zd.Provider,{value:{hidePopup:a},children:Kr(Ad,{children:!r&&e})})})}import{motion as Od}from"framer-motion";import{jsx as hi}from"react/jsx-runtime";function n2({value:e=0,max:t=100,className:r}){return hi("div",{className:n("h-3 w-full overflow-hidden rounded-full bg-gray-200",r),children:hi(Od.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as vi}from"class-variance-authority";import{LayoutGroup as Vd,motion as _d}from"framer-motion";import{useId as Hd}from"react";import{jsx as yt,jsxs as Wd}from"react/jsx-runtime";var Fd=vi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-gray-400 data-[selected=true]:text-black data-[selected=false]:hover:text-gray-500",accent:"text-neutral-500 transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-neutral-700 data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Bd=vi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-black",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function g2({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=Hd();return yt("div",{className:n("flex text-sm",a),children:yt(Vd,{id:l,children:t.map(({id:c,label:s})=>Wd("div",{className:"relative",children:[yt("button",{type:"button",onClick:()=>o==null?void 0:o(c),className:Fd({variant:e}),"data-selected":c===r,"aria-selected":c===r,children:s}),c===r&&yt(_d.div,{layoutId:"indicator",transition:{duration:.1},className:Bd({variant:e}),children:yt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c))})})}import{jsx as bi,jsxs as Ud}from"react/jsx-runtime";function b2({className:e}){return Ud("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-6 w-auto text-black dark:text-white",e),children:[bi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),bi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Jo as AUTOPLAY_DEFAULT_DELAY,Zp as Accordion,Pi as AccordionContent,Ni as AccordionItem,ki as AccordionTrigger,Qd as Africa,cm as Airtm,Li as Alert,Ti as AlertDescription,Ei as AlertTitle,om as Amazon,ye as AnimatedSizeContainer,gm as Apple,hm as ArrowBoldUp,vm as ArrowRight,bm as ArrowTrendUp,ym as ArrowTurnLeft,xm as ArrowTurnRight2,wm as ArrowUpRight,Cm as ArrowsOppositeDirectionY,Jd as Asia,a0 as Avatar,Tb as Background,Et as Badge,Nm as BadgeCheck,P0 as BadgeTooltip,km as Blog,Gt as BlurImage,Pm as Bolt,Sm as BoltFill,Mm as Book2,Co as Book2Fill,Rm as BookOpen,Lm as Books2,Em as BoxArchive,Tm as BulletList,No as BulletListFill,ie as Button,S0 as ButtonTooltip,tr as COMPARE_PAGES,Ya as CUSTOMER_STORIES,ha as Calendar,Im as Calendar6,Dm as CalendarDays,Am as CalendarIcon,Z0 as CardList,zm as Cards,Om as CaretUpFill,dn as Carousel,mn as CarouselContent,un as CarouselItem,lf as CarouselNavBar,fn as CarouselNext,pn as CarouselPrevious,dm as CashApp,Vm as ChartActivity2,_m as ChartLine,am as ChatGPT,ko as Check,Po as Check2,vn as Checkbox,So as CheckboxCheckedFill,Ro as CheckboxUnchecked,Mo as CircleCheck,Hm as CircleCheckFill,Fm as CircleDollar,Bm as CircleDotted,Lo as CircleHalfDottedCheck,Eo as CircleHalfDottedClock,To as CircleInfo,Wm as CirclePlayFill,Um as CircleQuestion,cr as CircleWarning,$m as CircleXmark,Gm as Circles,Km as Circles3,ui as ClientOnly,Ao as CloudUpload,jm as Code,Ym as ColorPalette2,Yg as Combobox,b2 as CompositeLogo,qm as ConnectedDots,Zm as ConnectedDots4,kt as ConnectedDotsFill,Qm as Connections3,oo as Copy,kx as CopyButton,Lx as CopyText,Jm as CreditCard,Xm as Crosshairs3,eu as Crown,tu as Cube,ru as CubeSettings,Pt as CubeSettingsFill,ou as CurrencyDollar,au as CursorRays,iu as DatabaseKey,yr as DatePickerContext,Th as DateRangePicker,nu as Desktop,su as DiamondTurnRight,lu as Dots,cu as Download,du as Duplicate,mu as EarthPosition,Vh as EmptyState,uu as EnvelopeArrowRight,Xd as Europe,ao as ExpandingArrow,Do as Eye,Io as EyeSlash,Xt as FEATURES_LIST,Kd as Facebook,zo as FeatherFill,im as Figma,jh as FileUpload,pu as FileZip2,v1 as Filter,gu as Filter2,fu as FilterBars,vu as Flag2,Oo as Flag6,hu as FlagWavy,bu as Folder,yu as Folder5,ux as Footer,k1 as Form,xu as GamingConsole,wu as Gauge6,Cu as Gear,Nu as Gear2,ku as Gear3,Pu as Gem,Vo as Gift,Su as GiftFill,nm as GitHubEnhanced,mo as Github,Ru as Globe,Ho as Globe2,_o as GlobePointer,Mu as GlobeSearch,vo as Go,jd as Google,sm as GoogleEnhanced,Lu as GreekTemple,La as Grid,Eu as GridIcon,Tu as GridLayoutRows,Au as GridPlus,Du as Headset,Fo as HeadsetFill,Bo as HexadecagonStar,Wo as Hyperlink,Tx as IconMenu,Iu as Icosahedron,zu as Incognito,N0 as InfoTooltip,Dx as InlineSnippet,fl as Input,Ou as InputPassword,Uo as InputSearch,X1 as InputSelect,Vu as InvoiceDollar,_u as Key,ra as KeyboardShortcutContext,Hf as KeyboardShortcutProvider,Za as LEGAL_PAGES,Dl as Label,Hu as LayoutSidebar,Fu as License,$o as LinesY,Wu as Link4,Bu as LinkBroken,_x as LinkLogo,Yx as LinkPreview,qx as LinkPreviewPlaceholder,uo as LinkedIn,C0 as LinkifyTooltipContent,it as LoadingCircle,Gd as LoadingDots,be as LoadingSpinner,Uu as LocationPin,Fr as Logo,io as Magic,$u as Magnifier,Gu as MapPosition,$d as MatrixLines,rr as MaxWidthWrapper,Ku as Menu3,ju as MessageSmile,uv as MiniAreaChart,Yu as MobilePhone,bv as Modal,qu as MoneyBill2,Zu as MoneyBills2,My as Nav,Wr as NavContext,Hy as NavMobile,ir as NavWordmark,em as NorthAmerica,Qu as Note,ap as NucleoPhoto,k0 as NumberTooltip,tm as Oceania,Ju as OfficeBuilding,Go as Page2,wv as PaginationControls,Xu as Paintbrush,ep as Palette2,mm as Payoneer,um as Paypal,rp as Pen2,tp as PenWriting,op as PercentageArrowDown,no as Photo,bo as Php,ip as Plug2,St as Plus,Qe as Popover,r2 as Popup,zd as PopupContext,np as Post,Yd as Prisma,po as ProductHunt,n2 as ProgressBar,sp as Pyramid,yo as Python,lp as QRCode,er as RESOURCES,jl as RadioGroup,Yl as RadioGroupItem,fo as Raycast,cp as Receipt2,Ko as ReferredVia,dp as Refresh2,mp as Robot,xo as Ruby,qa as SDKS,jo as SatelliteDish,up as ScanText,pp as Scribble,Lv as Sheet,fp as ShieldAlert,gp as ShieldCheck,hp as ShieldKeyhole,Dv as ShimmerDots,vp as Shuffle,w0 as SimpleTooltipContent,bp as Sliders,so as SortOrder,rm as SouthAmerica,yp as Sparkle3,lm as Spotify,xp as SquareChart,wp as SquareLayoutGrid6,Cp as Stars2,Hv as StatusBadge,pm as StripeLink,lo as Success,jv as Switch,Ep as TV,g2 as TabSelect,hb as Table,Np as TableIcon,kp as TableRows2,Pp as Tablet,Sp as Tag,Rp as Tags,co as Tick,qd as Tinybird,Mp as Toggle2Fill,wb as ToggleGroup,i0 as TokenAvatar,te as Tooltip,x0 as TooltipContent,y0 as TooltipProvider,Lp as Trash,go as Twitter,wo as Typescript,Lb as UTMBuilder,Pc as UTM_PARAMETERS,Zd as Unsplash,Tp as User,Ap as UserCheck,Dp as UserCrown,Ip as Users,Op as Users2,Vp as Users6,zp as UsersSettings,fm as Venmo,_p as Versions2,Hp as Watch,Fp as Webhook,Bp as Window,Wp as WindowSearch,Up as WindowSettings,li as Wordmark,$p as Xmark,ho as YouTube,Oi as badgeVariants,pe as buttonVariants,Ii as getUserAvatarUrl,Ur as navItems,lc as statusBadgeVariants,Ke as useCarousel,sf as useCarouselActiveIndex,gf as useCookies,je as useCopyToClipboard,xf as useCurrentAnchor,Cf as useEnterSubmit,Sf as useInViewport,Lf as useInputFocused,Df as useIntersectionObserver,Ye as useKeyboardShortcut,Wf as useLocalStorage,j as useMediaQuery,jf as useOptimisticUpdate,og as usePagination,ng as useRemoveGAParams,Tt as useResizeObserver,na as useRouterStuff,ca as useScroll,qe as useScrollProgress,gb as useTable,ia as useTablePagination,xg as useToastWithUndo};
|