@dub/ui 0.2.42 → 0.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client"
2
- import{$ as Ym,$a as Op,$b as fa,$c as ff,A as Rm,Aa as bp,Ab as a0,Ac as U0,Ad as Ma,B as _t,Ba as xp,Bb as n0,Bc as G0,Bd as Vf,C as Tm,Ca as yp,Cb as i0,Cc as $0,Cd as Bf,D as Ht,Da as wp,Db as da,Dc as K0,Dd as Wf,E as Lm,Ea as Cp,Eb as ua,Ec as j0,Ed as Ff,F as Em,Fa as Np,Fb as ma,Fc as Y0,Fd as Uf,G as Am,Ga as kp,Gb as s0,Gc as q0,Gd as Gf,H as Dm,Ha as Pp,Hb as l0,Hc as Z0,Hd as $f,I as Ko,Ia as ea,Ib as c0,Ic as Ft,Id as Kf,J as jo,Ja as ta,Jb as d0,Jc as X0,Jd as jf,K as Yo,Ka as ra,Kb as u0,Kc as J0,Kd as Yf,L as qo,La as oa,Lb as m0,Lc as Q0,Ld as qf,M as Zo,Ma as aa,Mb as pa,Mc as ef,Md as Gt,N as Im,Na as Sp,Nb as p0,Nc as tf,Nd as Zf,O as zm,Oa as Mp,Ob as f0,Oc as rf,Od as Xf,P as Om,Pa as Rp,Pb as g0,Pc as of,Pd as Jf,Q as _m,Qa as na,Qb as h0,Qc as Pa,Qd as Qf,R as Hm,Ra as ia,Rb as v0,Rc as af,Rd as Ra,S as Vm,Sa as sa,Sb as b0,Sc as nf,Sd as eg,T as Bm,Ta as Tp,Tb as x0,Tc as sf,Td as tg,U as Wm,Ua as Lp,Ub as y0,Uc as lf,Ud as rg,V as Fm,Va as Ep,Vb as w0,Vc as cf,Vd as og,W as Um,Wa as Ap,Wb as C0,Wc as df,Wd as ag,X as Gm,Xa as Dp,Xb as N0,Xc as uf,Xd as ng,Y as $m,Ya as Ar,Yb as k0,Yc as mf,Yd as ig,Z as Km,Za as Ip,Zb as P0,Zc as Ut,_ as jm,_a as zp,_b as S0,_c as pf,a as _o,aa as qm,ab as la,ac as M0,ad as gf,b as gm,ba as Zm,bb as _p,bc as R0,bd as hf,c as hm,ca as Xm,cb as Hp,cc as ga,cd as Dr,d as vm,da as Jm,db as Vp,dc as T0,dd as vf,e as bm,ea as Qm,eb as Vt,ec as ha,ed as bf,f as xm,fa as ep,fb as Bp,fc as L0,fd as Sa,g as Ho,ga as tp,gb as Wp,gc as E0,gd as xf,h as Vo,ha as rp,hb as Fp,hc as A0,hd as yf,i as ym,ia as op,ib as Up,ic as D0,id as wf,j as Bo,ja as ap,jb as Gp,jc as I0,jd as Cf,k as Wo,ka as Xo,kb as $p,kc as va,kd as Nf,l as Fo,la as np,lb as Kp,lc as ba,ld as kf,m as Uo,ma as ip,mb as Bt,mc as xa,md as Pf,n as xt,na as sp,nb as jp,nc as z0,nd as Sf,o as wm,oa as lp,ob as Yp,oc as ya,od as Mf,p as Ne,pa as cp,pb as qp,pc as O0,pd as Rf,q as Cm,qa as dp,qb as Zp,qc as wa,qd as Tf,r as zt,ra as up,rb as Xp,rc as _0,rd as Lf,s as Nm,sa as mp,sb as Wt,sc as Ca,sd as Ef,t as km,ta as Jo,tb as Jp,tc as Na,td as Af,u as Ot,ua as pp,ub as Qp,uc as H0,ud as Df,v as Pm,va as fp,vb as e0,vc as V0,vd as If,w as Go,wa as gp,wb as t0,wc as B0,wd as zf,x as $o,xa as hp,xb as r0,xc as W0,xd as Of,y as Sm,ya as Qo,yb as ca,yc as ka,yd as _f,z as Mm,za as vp,zb as o0,zc as F0,zd as Hf}from"./chunk-3FNBGYZZ.mjs";import{a as q}from"./chunk-NWME2ANF.mjs";import{a as ht,b as To,c as Lr,d as Lo,e as Eo,f as Ao,g as vt,h as bt,i as Er,j as Do,k as z,l as Ce,m as Io,n as ge,o as i,p as Dt,q as It,r as zo,s as Oo}from"./chunk-53UBH4V2.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as yi}from"lucide-react";import*as Kt from"react";import{jsx as $t,jsxs as ki}from"react/jsx-runtime";var mg=ie.Root,wi=Kt.forwardRef(({className:e,...t},r)=>$t(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));wi.displayName="AccordionItem";var Ci=Kt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?yi:Ut;return $t(ie.Header,{className:"flex",children:ki(ie.Trigger,{ref:a,className:i("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,$t(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ie.Trigger.displayName;var Ni=Kt.forwardRef(({className:e,children:t,...r},o)=>$t(ie.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));Ni.displayName=ie.Content.displayName;import{cva as Pi}from"class-variance-authority";import*as jt from"react";import{jsx as Ir}from"react/jsx-runtime";var Si=Pi("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"}}),Mi=jt.forwardRef(({className:e,variant:t,...r},o)=>Ir("div",{ref:o,role:"alert",className:i(Si({variant:t}),e),...r}));Mi.displayName="Alert";var Ri=jt.forwardRef(({className:e,...t},r)=>Ir("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Ri.displayName="AlertTitle";var Ti=jt.forwardRef(({className:e,...t},r)=>Ir("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Ti.displayName="AlertDescription";import{sha256 as Li}from"js-sha256";import{useState as Ei}from"react";import{jsx as zr}from"react/jsx-runtime";function Ai(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Li(e.email)}?d=${encodeURIComponent(r)}`:t}function yg({user:e={},className:t}){if(!e)return zr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ai(e));return zr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function wg({id:e,className:t}){return zr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Di}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Ii=Di("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",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 Yt({className:e,variant:t,...r}){return zi("span",{className:i(Ii({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as he from"@radix-ui/react-tooltip";import Oi from"linkify-react";import{HelpCircle as _i}from"lucide-react";import Hi from"next/link";import{useState as Vi}from"react";import{jsx as K,jsxs as Je}from"react/jsx-runtime";function zg({children:e}){return K(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:c=0,...s}){let[l,u]=Vi(!1);return Je(he.Root,{open:l,onOpenChange:u,delayDuration:c,disableHoverableContent:a,children:[K(he.Trigger,{asChild:!0,onClick:()=>{u(!0)},onBlur:()=>{u(!1)},children:e}),K(he.Portal,{children:K(he.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...s,children:typeof t=="string"?K("span",{className:i("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:u}):t})})]})}function Og({title:e,cta:t,href:r,target:o,onClick:a}){return Je("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[K("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?K(Hi,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?K(le,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function _g({title:e,cta:t,href:r}){return Je("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",K("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function Hg({children:e,className:t,tooltipClassName:r}){return K("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:K(Oi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function Vg(e){return K(J,{...e,children:K(_i,{className:"h-4 w-4 text-neutral-500"})})}function Bg({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:K(J,{content:Je("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Je("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Dt(e||0,{full:!0})," ",t]}),a&&Je("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Eo(a,{withAgo:!0})]})]}),children:o})}function Wg({children:e,content:t,...r}){return K(J,{content:t,...r,children:K("div",{className:"flex cursor-pointer items-center",children:K(Yt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Fg({children:e,tooltipProps:t,...r}){return K(J,{...t,children:K("button",{type:"button",...r,className:i("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function qt({children:e,tooltipProps:t}){return t?K(J,{...t,children:K("div",{children:e})}):e}import{jsx as Qe,jsxs as Ta}from"react/jsx-runtime";var se=Bi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:i("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",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"}}),le=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:s,shortcut:l,disabledTooltip:u,right:d,...n},m)=>u?Qe(J,{content:u,children:Ta("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[s,e&&Qe("div",{className:i("min-w-0 truncate",l&&"flex-1 text-left",o),children:e}),l&&Qe("kbd",{className:i("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:l})]})}):Ta("button",{ref:m,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:n.disabled||c,...n,children:[c?Qe(Ne,{}):s||null,e&&Qe("div",{className:i("min-w-0 truncate",l&&"flex-1 text-left",o),children:e}),l&&Qe("kbd",{className:i("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:l}),d]}));le.displayName="Button";import{cva as Fi}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as La}from"react/jsx-runtime";var Gi=Fi("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"}}}),yt=Ui({variant:"loose"});function Ea({variant:e="loose",loading:t=!1,className:r,children:o}){return La("ul",{className:i(Gi({variant:e,loading:t}),r),"data-variant":e,children:La(yt.Provider,{value:{variant:e},children:o})})}import{cva as $i}from"class-variance-authority";import{createContext as Ki,useContext as ji,useEffect as Yi,useRef as qi,useState as Zi}from"react";import{jsx as Aa,jsxs as Qi}from"react/jsx-runtime";var Xi=$i("w-full group/card border-neutral-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-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Ji="w-full py-2.5 px-4",Or=Ki({hovered:!1});function Da({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:s}){let{variant:l}=ji(yt),u=qi(null),[d,n]=Zi(!1);Yi(()=>{if(!d||!u.current)return;let f=setInterval(()=>{var b;((b=u.current)==null?void 0:b.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(f)},[d]);let m=f=>!(document.getElementById("modal-backdrop")||bt(f));return Qi("li",{ref:u,className:i(Xi({variant:l}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[s,Aa("div",{className:i(Ji,t),onClick:o?f=>{m(f)&&o(f)}:void 0,onAuxClick:a?f=>{m(f)&&a(f)}:void 0,children:Aa(Or.Provider,{value:{hovered:d},children:r})})]})}var m1=Object.assign(Ea,{Card:Object.assign(Da,{Context:Or}),Context:yt});import es from"embla-carousel-autoplay";import ts from"embla-carousel-react";import{ArrowLeft as rs,ArrowRight as os}from"lucide-react";import{createContext as as,forwardRef as Ct,useCallback as wt,useContext as ns,useEffect as _r,useState as Hr}from"react";import{jsx as ke,jsxs as Oa}from"react/jsx-runtime";var Vr=2e3,Ia=as(null);function ve(){let e=ns(Ia);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function za(){let{api:e}=ve(),[t,r]=Hr(0),o=wt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return _r(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var is=Ct(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:s,...l},u)=>{let[d,n]=ts({...t,axis:e==="horizontal"?"x":"y"},[...o?[es(typeof o=="object"?o:{delay:Vr})]:[],...a||[]]),[m,f]=Hr(!1),[b,v]=Hr(!1),h=wt(M=>{!M||(f(M.canScrollPrev()),v(M.canScrollNext()))},[]),g=wt(()=>{n==null||n.scrollPrev()},[n]),C=wt(()=>{n==null||n.scrollNext()},[n]),N=wt(M=>{M.key==="ArrowLeft"?(M.preventDefault(),g()):M.key==="ArrowRight"&&(M.preventDefault(),C())},[g,C]);return _r(()=>{!n||!r||r(n)},[n,r]),_r(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),ke(Ia.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:C,canScrollPrev:m,canScrollNext:b},children:ke("div",{ref:u,onKeyDownCapture:N,className:i("relative",c),role:"region","aria-roledescription":"carousel",...l,children:s})})});is.displayName="Carousel";var ss=Ct(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return ke("div",{ref:o,className:"overflow-hidden",children:ke("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ss.displayName="CarouselContent";var ls=Ct(({className:e,...t},r)=>{let{orientation:o}=ve();return ke("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});ls.displayName="CarouselItem";var cs=Ct(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=ve();return Oa("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[ke(rs,{className:"h-4 w-4"}),ke("span",{className:"sr-only",children:"Previous slide"})]})});cs.displayName="CarouselPrevious";var ds=Ct(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=ve();return Oa("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[ke(os,{className:"h-4 w-4"}),ke("span",{className:"sr-only",children:"Next slide"})]})});ds.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ms}from"framer-motion";import{ChevronLeft as ps,ChevronRight as fs}from"lucide-react";import*as Ee from"react";import{jsx as Ue,jsxs as Nt}from"react/jsx-runtime";var gs=us("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-neutral-800/10 bg-white sm:bottom-6 "}}}),L1=({variant:e="simple",className:t})=>{var v;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:s}=ve(),l=(v=s==null?void 0:s.plugins())==null?void 0:v.autoplay,[u,d]=Ee.useState(0),[n,m]=Ee.useState(!1),f=Ee.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),b=Ee.useCallback(h=>()=>{l&&l.isPlaying()&&l.stop(),h()},[l]);return Ee.useEffect(()=>{!s||(f(s),m((l==null?void 0:l.isPlaying())??!1),s.on("reInit",f),s.on("select",f),s.on("autoplay:play",()=>m(!0)),s.on("autoplay:stop",()=>m(!1)))},[s,l,f]),Nt("div",{className:i(gs({variant:e}),t),children:[e!=="simple"&&Nt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:b(o),children:[Ue(ps,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),s!=null&&Ue("div",{className:"flex items-center gap-1",children:s.slideNodes().map((h,g)=>Nt("button",{onClick:b(()=>s.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ue("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===u?"bg-black":"bg-black/20",n&&g===u&&"w-6 bg-black/20"),children:n&&g===u&&Ue(ms.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((l==null?void 0:l.options.delay)??Vr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Nt("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&Nt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:b(r),children:[Ue(fs,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as bs,useEffect as xs}from"react";import{jsx as Zt}from"react/jsx-runtime";var V1=({className:e,...t})=>{let{api:r}=ve(),[o,a]=hs({dragFree:!0}),c=bs(s=>{!s||!a||a==null||a.scrollTo(s.selectedScrollSnap())},[a]);return xs(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),Zt("div",{className:"overflow-hidden",ref:o,children:Zt("div",{className:i("mx-4 flex gap-4",e),...t})})},B1=vs(({index:e,className:t,...r},o)=>{let{api:a}=ve(),c=za();return Zt("div",{ref:o,children:Zt("button",{type:"button",onClick:()=>{var l;if(!a)return;let s=(l=a.plugins())==null?void 0:l.autoplay;s&&s.isPlaying()&&s.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as kt from"@radix-ui/react-checkbox";import{Check as ys}from"lucide-react";import*as _a from"react";import{jsx as Br}from"react/jsx-runtime";var ws=_a.forwardRef(({className:e,...t},r)=>Br(kt.Root,{ref:r,className:i("peer h-5 w-5 shrink-0 rounded-md border border-neutral-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:Br(kt.Indicator,{className:"flex items-center justify-center",children:Br(ys,{className:"h-3 w-3 text-white"})})}));ws.displayName=kt.Root.displayName;import{Command as St,CommandInput as ml,CommandItem as pl,useCommandState as fl}from"cmdk";import{ChevronDown as gl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as bl,useEffect as er,useRef as xl,useState as Pt}from"react";import{motion as cl}from"framer-motion";import{forwardRef as dl,useRef as ul}from"react";import Wr from"js-cookie";import{useEffect as Cs,useState as Ns}from"react";function j1(e,t,r){let[o,a]=Ns(()=>{let s=Wr.get(e);return s?JSON.parse(s):t});return Cs(()=>{let s=()=>{let l=Wr.get(e);l&&a(JSON.parse(l))};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e]),[o,s=>{a(s),Wr.set(e,JSON.stringify(s),r)}]}import{useCallback as ks,useEffect as Ps,useRef as Ss,useState as Ms}from"react";var et=(e=3e3)=>{let t=Ss(null),[r,o]=Ms(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=ks(async(s,{onSuccess:l,throwOnError:u}={})=>{a();try{typeof s=="string"?await navigator.clipboard.writeText(s):s instanceof ClipboardItem&&await navigator.clipboard.write([s]),o(!0),l==null||l(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),u)throw d}},[e]);return Ps(()=>()=>a(),[]),[r,c]};import{useEffect as Rs,useState as Ts}from"react";function J1(){let[e,t]=Ts(null);return Rs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(l=>{var m,f,b;let u=l[0];if(!u)return;let d=(((m=u.rootBounds)==null?void 0:m.height)||0)*.3+o;for(let v=1;v<l.length;v++){let h=l[v];if(!h)break;(h.boundingClientRect.top<u.boundingClientRect.top||u.boundingClientRect.bottom<o)&&(u=h)}let n=u.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(f=c.get(n))==null?void 0:f.next;for(;n&&n.getBoundingClientRect().top>d;)n=(b=c.get(n))==null?void 0:b.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(l=>a.observe(l)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Ls}from"react";function rh(e){return{handleKeyDown:Ls(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Es,useState as As}from"react";function ih(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=As(o??!1);return Es(()=>{let s=()=>{let u=e.current;if(!u)return;let d=r==null?void 0:r.current,n=u.getBoundingClientRect(),m=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(n.top<m.bottom&&n.bottom>m.top&&n.left<m.right&&n.right>m.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",s),window.addEventListener("resize",s);let l=null;return e.current&&(l=new IntersectionObserver(s),l.observe(e.current)),s(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",s),window.removeEventListener("resize",s),l==null||l.disconnect()}},[e,r]),a}import{useEffect as Ds,useState as Is}from"react";function ch(){let[e,t]=Is(!1);return Ds(()=>{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 zs,useState as Os}from"react";function ph(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,s]=Os(),l=(c==null?void 0:c.isIntersecting)&&a,u=([d])=>{s(d)};return zs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||l||!d)return;let m={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(u,m);return f.observe(d),()=>f.disconnect()},[e,JSON.stringify(t),r,o,l]),c}import{createContext as _s,useCallback as Hs,useContext as Vs,useEffect as Ha,useId as Bs,useState as Ws}from"react";import{jsx as Fs}from"react/jsx-runtime";var Va=_s({listeners:[],setListeners:()=>{}});function xh({children:e}){let[t,r]=Ws([]);return Fs(Va.Provider,{value:{listeners:t,setListeners:r},children:e})}function tt(e,t,r={}){let o=Bs(),{listeners:a,setListeners:c}=Vs(Va),s=Hs(l=>{if(r.enabled===!1)return;let u=l.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(u.tagName==="INPUT"||u.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let m=[...l.metaKey?["meta"]:[],...l.ctrlKey?["ctrl"]:[],...l.altKey?["alt"]:[],l.key].join("+");if(Array.isArray(e)?!e.includes(m):m!==e)return;let f=a.filter(v=>v.enabled!==!1&&!!d==!!v.modal&&!!n==!!v.sheet&&(Array.isArray(v.key)?v.key.includes(m):v.key===m));!f.length||Lo(f,(v,h)=>(h.priority??0)-(v.priority??0))[0].id!==o||(l.preventDefault(),t(l))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ha(()=>(document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)),[s]),Ha(()=>(c(l=>[...l.filter(u=>u.id!==o),{id:o,key:e,...r}]),()=>c(l=>l.filter(u=>u.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function Ba(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Ch(e,t){let[r,o]=Gs(Ba(e)??t);return Us(()=>{let c=Ba(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as $s}from"sonner";import Ks from"swr";function Mh(e,t){let{data:r,isLoading:o,mutate:a}=Ks(e,ge);return{data:r,isLoading:o,update:async(c,s)=>$s.promise(a(c(r),{optimisticData:s,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 Ga,useMemo as Js}from"react";import{useEffect as Wa,useState as js}from"react";function Fa({pageSize:e,page:t,onPageChange:r}){let[o,a]=js({pageIndex:t,pageSize:e});return Wa(()=>{a(c=>({...c,pageIndex:t}))},[t]),Wa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Ys,useRouter as qs,useSearchParams as Zs}from"next/navigation";import{useCallback as Xs}from"react";function Ua(){let e=Ys(),t=qs(),r=Zs(),o=Object.fromEntries(r),a=(s,l)=>{let u=new URLSearchParams(r);if((l==null?void 0:l.include)&&Array.isArray(l.include)){let n=new URLSearchParams;r.forEach((m,f)=>{var b;(b=l.include)!=null&&b.includes(f)&&n.set(f,m)}),u=n}(l==null?void 0:l.exclude)&&Array.isArray(l.exclude)&&l.exclude.forEach(n=>u.delete(n)),s&&Object.entries(s).forEach(([n,m])=>u.set(n,m));let d=u.toString();return d.length>0?`?${d}`:""},c=Xs(({set:s,del:l,replace:u,scroll:d=!0,getNewPath:n,arrayDelimiter:m=","})=>{let f=new URLSearchParams(r);s&&Object.entries(s).forEach(([h,g])=>f.set(h,Array.isArray(g)?g.join(m):g)),l&&(Array.isArray(l)?l.forEach(h=>f.delete(h)):f.delete(l));let b=f.toString(),v=`${e}${b.length>0?`?${b}`:""}`;if(n)return v;u?t.replace(v,{scroll:!1}):t.push(v,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Vh(e=zo){let{searchParams:t,queryParams:r}=Ua(),o=Js(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=Fa({pageSize:e,page:o,onPageChange:s=>{r(s===1?{del:"page",scroll:!1}:{set:{page:s.toString()},scroll:!1})}});return Ga(()=>{let s=parseInt(t.get("page")||"1")||1;c(l=>({...l,pageIndex:s}))},[t.get("page")]),Ga(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as Qs}from"react";function Fh(){Qs(()=>{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 el,useState as tl}from"react";function Xt(e){let[t,r]=tl(),o=([a])=>{r(a)};return el(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as rl,useEffect as $a,useState as ol}from"react";function Ka(e){let[t,r]=ol(!1),o=rl(()=>{r(window.scrollY>e)},[e]);return $a(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),$a(()=>{o()},[o]),t}import{useCallback as al,useEffect as nl,useState as il}from"react";function Ae(e){let[t,r]=il(1),o=al(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:s,clientHeight:l}=e.current;r(s===l?1:Math.min(c/(s-l),1))},[]),a=Xt(e);return nl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as sl}from"react";import{toast as Ya}from"sonner";import{jsx as Jt,jsxs as ja}from"react/jsx-runtime";function ll({id:e,message:t,undo:r}){let o=()=>{r(),Ya.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return sl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),ja("div",{className:"flex w-full items-center justify-between space-x-2",children:[ja("div",{className:"flex items-center space-x-2",children:[Jt(Fo,{}),Jt("p",{className:"font-medium",children:t})]}),Jt("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 rv(){return({id:t,message:r,undo:o,duration:a})=>Ya(Jt(ll,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as qa}from"react/jsx-runtime";var Pe=dl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},s)=>{var d,n;let l=ul(null),u=Xt(l);return qa(cl.div,{ref:s,className:i("overflow-hidden",r),animate:{width:e?((d=u==null?void 0:u.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=u==null?void 0:u.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...c,children:qa("div",{ref:l,className:i(t&&"h-max",e&&"w-max"),children:a})})});Pe.displayName="AnimatedSizeContainer";import*as De from"@radix-ui/react-popover";import{Drawer as rt}from"vaul";import{jsx as Se,jsxs as Qt}from"react/jsx-runtime";function ot({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:s,popoverContentClassName:l,onOpenAutoFocus:u,collisionBoundary:d,sticky:n,onEscapeKeyDown:m,onWheel:f}){let{isMobile:b}=q();return s||b?Qt(rt.Root,{open:a,onOpenChange:c,children:[Se(rt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Qt(rt.Portal,{children:[Se(rt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),Qt(rt.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:m,onPointerDownOutside:v=>{v.target instanceof Element&&v.target.closest("[data-sonner-toast]")&&v.preventDefault()},children:[Se("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Se("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Se("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Se(rt.Overlay,{})]})]}):Qt(De.Root,{open:a,onOpenChange:c,children:[Se(De.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Se(De.Portal,{children:Se(De.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",l),sticky:n,collisionBoundary:d,onOpenAutoFocus:u,onEscapeKeyDown:m,onWheel:f,children:t})})]})}import{Fragment as tr,jsx as L,jsxs as Me}from"react/jsx-runtime";function yl(e,t){return e===!0}function Ev({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:l,createLabel:u,onCreate:d,buttonProps:n,shortcutHint:m,caret:f,side:b,open:v,onOpenChange:h,onSearchChange:g,shouldFilter:C=!0,inputRight:N,inputClassName:M,optionRight:k,optionClassName:w,matchTriggerWidth:G,hideSearch:R=!1,children:x}){let T=yl(e,r),B=Array.isArray(t)?t:t?[t]:[],{isMobile:P}=q(),[I,X]=Pt(!1),A=v??I,me=h??X,[$,Mr]=Pt(""),[So,Rr]=Pt(!1),[Tr,vi]=Pt(void 0),[bi,Mo]=Pt(!1),xi=_=>{var Xe;if(T){let We=B.some(({value:Fe})=>Fe===_.value);r(We?B.filter(({value:Fe})=>Fe!==_.value):[...B,_])}else r(B.length&&((Xe=B[0])==null?void 0:Xe.value)===_.value?null:_),me(!1)},Ro=bl((_,Xe)=>Xe===""?[..._.filter(We=>We.first&&!B.some(Fe=>Fe.value===We.value)),...B,..._.filter(We=>!We.first&&!B.some(Fe=>Fe.value===We.value))]:_,[B]);return er(()=>{So&&(vi(o&&Ro(o,$)),Rr(!1))},[So,o,Ro,$]),er(()=>{Rr(!0)},[o]),er(()=>{A||(Mr(""),Rr(!0))},[A]),er(()=>g==null?void 0:g($),[$]),L(ot,{openPopover:A,setOpenPopover:me,align:"start",side:b,onWheel:_=>{_.stopPropagation()},popoverContentClassName:i(G&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(Pe,{width:!P&&!G,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Me(St,{loop:!0,shouldFilter:C,children:[!R&&Me("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(ml,{placeholder:s,value:$,onValueChange:Mr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",M),onKeyDown:_=>{(_.key==="Escape"||_.key==="Backspace"&&!$)&&(_.preventDefault(),_.stopPropagation(),me(!1))}}),N&&L("div",{className:"mr-2",children:N}),m&&L("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:m})]}),L(wl,{children:L(St.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Tr!==void 0?Me(tr,{children:[Tr.map(_=>L(Cl,{option:_,multiple:T,selected:B.some(({value:Xe})=>Xe===_.value),onSelect:()=>xi(_),right:k==null?void 0:k(_),className:w},`${_.label}, ${_.value}`)),$.length>0&&d&&Me(pl,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",w),onSelect:async()=>{Mo(!0),await(d==null?void 0:d($))&&(Mr(""),me(!1)),Mo(!1)},children:[bi?L(Ne,{className:"size-4 shrink-0"}):L(Ut,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(u==null?void 0:u($))||`Create "${$}"`})]}),C?L(kl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:l||"No matches"}):Tr.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:l||"No matches"}):null]}):L(St.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(le,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Me(tr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:x||B.map(_=>_.label).join(", ")||c}),f&&(f===!0?L(gl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:a?Za(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var wl=({children:e})=>{let t=xl(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Me(tr,{children:[L("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),L("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 Cl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Me(tr,{children:[L(Nl,{disabledTooltip:e.disabledTooltip,children:Me(St.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&L("div",{className:"shrink-0 text-neutral-600",children:o?L(ra,{className:"size-4 text-neutral-600"}):L(oa,{className:"size-4 text-neutral-400"})}),Me("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Za(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ta,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(St.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Nl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Za=e=>vl(e),kl=hl((e,t)=>fl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as rr,format as Pl,isSameMonth as Sl}from"date-fns";import{ChevronLeft as Xa,ChevronRight as Ja,ChevronsLeft as Ml,ChevronsRight as Rl}from"lucide-react";import{forwardRef as Tl,useRef as Ll}from"react";import{DayPicker as El,useDayPicker as Al,useDayRender as Dl,useNavigation as Il}from"react-day-picker";import{Fragment as zl,jsx as oe,jsxs as or}from"react/jsx-runtime";var Mt=Tl(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:oe(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function Qa({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:s,classNames:l,...u}){return oe(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:s,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-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-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-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-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",...l},components:{IconLeft:()=>oe(Xa,{className:"h-4 w-4"}),IconRight:()=>oe(Ja,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:m,previousMonth:f,currentMonth:b,displayMonths:v}=Il(),{numberOfMonths:h,fromDate:g,toDate:C}=Al(),N=v.findIndex(T=>Sl(d.displayMonth,T)),M=N===0,k=N===v.length-1,w=h>1&&(M||!k),G=h>1&&(k||!M),R=()=>{let T=rr(b,-1);f&&(!g||T.getTime()>=g.getTime())&&n(T)},x=()=>{let T=rr(b,1);m&&(!C||T.getTime()<=C.getTime())&&n(T)};return or("div",{className:"flex items-center justify-between",children:[or("div",{className:"flex items-center gap-1",children:[o&&!G&&oe(Mt,{disabled:a||!f||g&&rr(b,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:Ml}),!G&&oe(Mt,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&n(f),icon:Xa})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Pl(d.displayMonth,"LLLL yyy",{locale:c})}),or("div",{className:"flex items-center gap-1",children:[!w&&oe(Mt,{disabled:a||!m,"aria-label":"Go to next month",onClick:()=>m&&n(m),icon:Ja}),o&&!w&&oe(Mt,{disabled:a||!m||C&&rr(b,1).getTime()>C.getTime(),"aria-label":"Go to next year",onClick:x,icon:Rl})]})]})},Day:({date:d,displayMonth:n})=>{let m=Ll(null),{activeModifiers:f,buttonProps:b,divProps:v,isButton:h,isHidden:g}=Dl(d,n,m),{selected:C,today:N,disabled:M,range_middle:k}=f;if(g)return oe(zl,{});if(!h)return oe("div",{...v,className:i("flex items-center justify-center",v.className)});let{children:w,...G}=b;return or("button",{ref:m,...G,type:"button",children:[w,N&&oe("span",{className:i("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-neutral-400":M})})]})}},...u})}import{enUS as Kl}from"date-fns/locale";import{useEffect as jr,useMemo as tn,useRef as jl,useState as nr}from"react";import{Command as Fr}from"cmdk";import{Lock as Ol}from"lucide-react";import{jsx as Ge,jsxs as _l}from"react/jsx-runtime";var Ur=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,c=d=>"date"in d,s=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),l=(d,n)=>{let m=d.from,f=n.from,b=!1;m&&f&&s(m,f)&&(b=!0);let v=d.to,h=n.to,g=!1;return v&&h&&s(v,h)&&(g=!0),b&&g},u=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&l(n,d.dateRange)}else if(c(d)){let n=r;return n&&s(n,d.date)}return!1};return Ge(Fr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ge(Fr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>_l(Fr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-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-neutral-100",u(d)&&"font-semibold text-neutral-800"),children:[Ge("span",{children:d.label}),d.requiresUpgrade?Ge(Ol,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ge("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&Ge(J,{side:"bottom",content:d.tooltipContent,children:Ge("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Ur.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as Hl}from"react";var Gr=Hl({isOpen:!1,setIsOpen:()=>{}}),Vl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},$r=(e,t,r=!1)=>{let o=!Vl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},en=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:s,toDay:l}=t;if(e&&e.length>0){let u=o,d=r;e.forEach(n=>{var m,f,b,v,h,g;if("date"in n){let C=n.date.getFullYear();if(o&&C<o)throw new Error(`Preset ${n.label} is before fromYear ${u}.`);if(r&&C>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(s&&n.date.getDate()<s.getDate())throw new Error(`Preset ${n.label} is before fromDay ${s}.`);if(l&&n.date.getDate()>l.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(l,"MMM dd, yyyy")}.`)}if("dateRange"in n){let C=(m=n.dateRange.from)==null?void 0:m.getFullYear(),N=(f=n.dateRange.to)==null?void 0:f.getFullYear();if(C&&o&&C<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${u}.`);if(N&&r&&N>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let M=(b=n.dateRange.from)==null?void 0:b.getMonth();if(M&&M<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(c){let M=(v=n.dateRange.to)==null?void 0:v.getMonth();if(M&&M>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(c,"MMM, yyyy")}.`)}if(s){let M=(h=n.dateRange.from)==null?void 0:h.getDate();if(M&&M<s.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(s,"MMM dd, yyyy")}.`)}if(l){let M=(g=n.dateRange.to)==null?void 0:g.getDate();if(M&&M>l.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(l,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as Fl}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as ar,jsxs as $l}from"react/jsx-runtime";var Gl=Bl(["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-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Kr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>$l("button",{ref:c,className:i(Gl({hasError:o}),e),...a,children:[ar(Wl,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),ar("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?ar("span",{className:"text-neutral-400",children:r}):null)}),ar(Fl,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Kr.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as rn}from"react/jsx-runtime";var Yl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:s,disabledDays:l,showYearNavigation:u=!1,locale:d=Kl,placeholder:n="Select date range",hasError:m,align:f="center",className:b,...v})=>{let{isDesktop:h}=q(),[g,C]=nr(!1),[N,M]=nr(a&&r?a==null?void 0:a.find(({id:A})=>A===r):void 0),[k,w]=nr((N==null?void 0:N.dateRange)??e??t??void 0),[G,R]=nr(k==null?void 0:k.to),x=tn(()=>k,[g]);jr(()=>{w(e)},[e]),jr(()=>{let A=a==null?void 0:a.find(({id:me})=>me===r);M(A),w((A==null?void 0:A.dateRange)??e??t)},[a,r]),jr(()=>{g?k&&R(k.to):R(k==null?void 0:k.to)},[g]);let T=(A,me)=>{let $=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:me}:A;w($),M(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),C(!1))},B=A=>{w(A.dateRange),M(A),o==null||o(A.dateRange,A),C(!1)},P=()=>{w(x),C(!1)},I=A=>{A||P(),C(A)},X=tn(()=>k?`${k.from?$r(k.from,d):""} - ${k.to?$r(k.to,d):""}`:null,[k,d]);return tt((a==null?void 0:a.filter(A=>A.shortcut).map(A=>A.shortcut))??[],A=>{let me=a==null?void 0:a.find($=>$.shortcut===A.key);me&&B(me)}),ae(Gr.Provider,{value:{isOpen:g,setIsOpen:C},children:ae(ot,{align:f,openPopover:g,setOpenPopover:I,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:rn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&ae(ql,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(Ur,{currentPresetId:r,currentValue:k,presets:a,onSelect:B})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(Qa,{mode:"range",selected:k,onSelect:T,month:G,onMonthChange:R,numberOfMonths:h?2:1,disabled:l,disableNavigation:s,showYearNavigation:u,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...v})})]})}),children:ae(Kr,{placeholder:n,disabled:c,className:b,hasError:m,"aria-required":v.required||v["aria-required"],"aria-invalid":v["aria-invalid"],"aria-label":v["aria-label"],"aria-labelledby":v["aria-labelledby"],children:(N==null?void 0:N.label)??X})})})};function gb({presets:e,...t}){return e&&en(e,t),ae(Yl,{presets:e,...t})}function ql({children:e}){let t=jl(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return rn("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),ae("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)}})]})}import Zl from"next/link";import{useEffect as Xl,useState as on}from"react";import Jl from"swr";import{jsx as Yr,jsxs as an}from"react/jsx-runtime";function nn({className:e}){let{data:t}=Jl("https://status.dub.co/api/v1/summary",ge),[r,o]=on("bg-neutral-200"),[a,c]=on("Loading status...");return Xl(()=>{if(!t)return;let{ongoing_incidents:s}=t;if(s.length>0){let{current_worst_impact:l,name:u}=s[0],d=l==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(u),o(d)}else c("All systems operational"),o("bg-green-500")},[t]),an(Zl,{href:"https://status.dub.co",target:"_blank",className:i("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",e),children:[an("div",{className:"relative size-2",children:[Yr("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Yr("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Yr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as ir,jsxs as sn}from"react/jsx-runtime";function Mb({icon:e,title:t,description:r,learnMore:o,children:a}){return sn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[ir("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:ir(e,{className:"size-6 text-neutral-800"})}),ir("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&sn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&ir("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Ql}from"class-variance-authority";import{useState as ln}from"react";import{toast as cn}from"sonner";import{Fragment as tc,jsx as be,jsxs as Zr}from"react/jsx-runtime";var dn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],qr={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)"},documents:{types:dn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg"],errorMessage:"File type not supported (.svg., .png, or .jpg only)"},programResourceFiles:{types:[...dn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},ec=Ql("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function Hb({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:s,icon:l=la,customPreview:u,accept:d="any",imageSrc:n,loading:m=!1,clickToUpload:f=!0,showHoverOverlay:b=!0,content:v,maxFileSizeMB:h=0,targetResolution:g,accessibilityLabel:C="File upload",disabled:N=!1}){let[M,k]=ln(!1),[w,G]=ln(null),R=async x=>{let T="dataTransfer"in x?x.dataTransfer.files&&x.dataTransfer.files[0]:x.target.files&&x.target.files[0];if(!T)return;if(G(T.name),h>0&&T.size/1024/1024>h){cn.error(`File size too big (max ${h} MB)`);return}let B=qr[d].types;if(B.length&&!B.includes(T.type)){cn.error(qr[d].errorMessage??"File type not supported");return}let P=T;if(g&&T.type.startsWith("image/"))try{let I=await Ao(T,g),X=await fetch(I).then(A=>A.blob());P=new File([X],T.name,{type:T.type})}catch(I){console.error("Error resizing image:",I)}if(t){let I=new FileReader;I.onload=X=>{var A;return r==null?void 0:r({src:(A=X.target)==null?void 0:A.result,file:P})},I.readAsDataURL(P);return}r==null||r({file:P})};return Zr("label",{className:i(ec({variant:o}),N?"cursor-not-allowed":i(f&&"cursor-pointer"),a),children:[m&&be("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:be(xt,{})}),be("div",{className:"absolute inset-0 z-[5]",onDragOver:x=>{x.preventDefault(),x.stopPropagation(),k(!0)},onDragEnter:x=>{x.preventDefault(),x.stopPropagation(),k(!0)},onDragLeave:x=>{x.preventDefault(),x.stopPropagation(),k(!1)},onDrop:async x=>{x.preventDefault(),x.stopPropagation(),R(x),k(!1)}}),Zr("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",N&&"bg-neutral-50",M&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",b&&!N&&"group-hover:opacity-100"):i(!N&&"group-hover:bg-neutral-50")),children:[be(l,{className:i("size-7 transition-all duration-75",N?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",M?"scale-110":"scale-100"),c)}),v!==null&&be("div",{className:i("mt-2 text-center text-sm text-neutral-500",N&&"text-neutral-400"),children:v??be(tc,{children:Zr("p",{children:["Drag and drop ",f&&"or click"," to upload."]})})}),be("span",{className:"sr-only",children:C})]}),n&&(u??be("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",s)})),f&&be("div",{className:"sr-only mt-1 flex shadow-sm",children:be("input",{id:e,type:"file",accept:qr[d].types.join(","),onChange:R,disabled:N},w)})]})}import{AnimatePresence as rc,motion as un}from"framer-motion";import{X as oc}from"lucide-react";import ac from"next/link";import{useParams as nc}from"next/navigation";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Rt}from"react/jsx-runtime";function pn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){let{slug:c}=nc();return tt("Escape",o,{priority:1}),Q(Pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Rt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(rc,{children:t==null?void 0:t.map(({key:s,value:l})=>{if(s==="loader")return Q(un.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${l}`);let u=e.find(n=>n.key===s);if(!u)return console.error("Filter.List received an activeFilter without a corresponding filter"),null;let d=c&&s==="link"?`/${c}/links/${l}`:void 0;return(u.multiple&&Array.isArray(l)?l:[l]).map(n=>{var v,h,g;let m=(v=u.options)==null?void 0:v.find(C=>typeof C.value=="string"&&typeof n=="string"?C.value.toLowerCase()===n.toLowerCase():C.value===n),f=(m==null?void 0:m.icon)??((h=u.getOptionIcon)==null?void 0:h.call(u,n,{key:u.key,option:m}))??u.icon,b=(m==null?void 0:m.label)??((g=u.getOptionLabel)==null?void 0:g.call(u,n,{key:u.key,option:m}))??n;return Rt(un.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Rt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:mn(u.icon)?u.icon:Q(u.icon,{className:"h-4 w-4"})}),u.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:u.options?Rt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:mn(f)?f:Q(f,{className:"h-4 w-4"})}),d?Q(ac,{href:d,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:vt(b,30)}):vt(b,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(s,n),children:Q(oc,{className:"h-3.5 w-3.5"})})]},`${s}-${n}`)})})})}),(t==null?void 0:t.length)!==0&&Rt("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-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var mn=e=>ic(e);import{Command as ze,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as uc,forwardRef as mc,isValidElement as gn,useCallback as sr,useEffect as lr,useImperativeHandle as pc,useRef as Jr,useState as Xr}from"react";import{Fragment as xc,jsx as H,jsxs as xe}from"react/jsx-runtime";function hn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:s,askAI:l,children:u,emptyState:d,className:n}){var T,B;let{isMobile:m}=q(),f=Jr(null),b=Jr(),[v,h]=Xr(!1);tt("f",()=>h(!0),{enabled:!v});let[g,C]=Xr(""),[N,M]=Xr(null),k=sr(()=>{C(""),M(null)},[]);lr(()=>{v||k()},[v]);let w=N?e.find(({key:P})=>P===N):null,G=sr(P=>{f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight}),C(""),M(P),o==null||o(P)},[]),R=sr(P=>{if(!w||!s)return!1;let I=s.find(({key:X})=>X===N);return(I==null?void 0:I.value)===P||I&&w.multiple&&Array.isArray(I.value)&&I.value.includes(P)},[w]),x=sr(P=>{w&&(R(P)?r(w.key,P):t(w.key,P),w.multiple||h(!1))},[s,w,l]);return lr(()=>{a==null||a(g)},[g]),lr(()=>{c==null||c(N)},[N]),lr(()=>{(w==null?void 0:w.options)&&f.current&&(b.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),H(ot,{openPopover:v,setOpenPopover:h,onEscapeKeyDown:P=>{N&&(P.preventDefault(),k())},content:H(Pe,{width:!m,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[H(gc,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:g,onValueChange:C,onKeyDown:P=>{(P.key==="Escape"||P.key==="Backspace"&&!g)&&(P.preventDefault(),P.stopPropagation(),N?k():h(!1))},emptySubmit:P=>{P.preventDefault(),P.stopPropagation(),l?(t("ai",w?`${w.label} ${g}`:g),h(!1)):x(g)}}),!w&&H("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),H(hc,{ref:f,children:xe(ze.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((B=(T=w.options)==null?void 0:T.filter(P=>!g||!P.hideDuringSearch))==null?void 0:B.map(P=>{let I=R(P.value);return H(fn,{filter:w,option:P,right:I?H(ea,{className:"h-4 w-4"}):P.right,onSelect:()=>x(P.value)},P.value)}))??H(ze.Loading,{children:H("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:H(Ne,{})})}):e.map(P=>xe(uc,{children:[H(fn,{filter:P,onSelect:()=>G(P.key)}),P.separatorAfter&&H(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},P.key)),(!w||w.options)&&H(vc,{search:g,askAI:l,children:d?fc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),children:xe("button",{type:"button",className:i("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-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[H(dc,{className:"size-4 shrink-0"}),H("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),s!=null&&s.length?H("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:s.length}):H(cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function fc(e){return typeof e=="object"&&e!==null&&!gn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return H(ze.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-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"})},hc=mc(({children:e},t)=>{let r=Jr(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return xe(xc,{children:[H("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),H("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 fn({filter:e,option:t,right:r,onSelect:o}){var l,u;let{isMobile:a}=q(),c=t?t.icon??((l=e.getOptionIcon)==null?void 0:l.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,s=t?t.label??((u=e.getOptionLabel)==null?void 0:u.call(e,t.value,{key:e.key,option:t})):e.label;return xe(ze.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:s+(t==null?void 0:t.value),children:[H("span",{className:"shrink-0 text-neutral-600",children:bc(c)?c:H(c,{className:"h-4 w-4"})}),vt(s,48),H("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var vc=({search:e,askAI:t,children:r})=>t&&e?xe(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[H(Vo,{className:"h-4 w-4"}),xe("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",xe("span",{className:"text-black",children:['"',e,'"']})]})]}):H(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),bc=e=>gn(e);var d2={Select:hn,List:pn};import{useMemo as yc,useState as vn}from"react";import{jsx as $e,jsxs as cr}from"react/jsx-runtime";function v2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:s}){let[l,u]=vn(r.defaultValue),[d,n]=vn(!1),m=yc(()=>d||!l||l===r.defaultValue,[d,l,r.defaultValue]);return cr("form",{onSubmit:async f=>{f.preventDefault(),n(!0),await s({[r.name]:l}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[cr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[cr("div",{className:"flex flex-col space-y-3",children:[$e("h2",{className:"text-xl font-medium",children:e}),$e("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?$e("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:f=>u(f.target.value),className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":c})}):$e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),cr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?$e("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,$e("div",{className:"shrink-0",children:$e(le,{text:a,loading:d,disabled:m,disabledTooltip:c})})]})]})}import{useId as wc}from"react";import{jsx as dr,jsxs as Cc}from"react/jsx-runtime";function bn({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Cc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[dr("defs",{children:dr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:dr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),dr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Nc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as Qr}from"react/jsx-runtime";var Mc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Sc(!1),s=Pc(()=>c(!a),[a,c]);return Qr("div",{children:[Qr("div",{className:"relative flex",children:[Ke("input",{type:a?"text":t,className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Qr("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(Nc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>s(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(da,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(ua,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Mc.displayName="Input";import{flip as Ec,offset as Ac,size as Dc,useDismiss as Ic,useFloating as zc,useInteractions as Oc}from"@floating-ui/react";import{Command as Re,useCommandState as _c}from"cmdk";import{Check as Hc,ChevronDown as Vc,Search as Bc,X as Wc}from"lucide-react";import{createContext as Fc,forwardRef as Nn,useContext as oo,useEffect as eo,useMemo as yn,useRef as wn,useState as to}from"react";import{Drawer as at}from"vaul";import Rc from"next/image";import{useEffect as Tc,useState as xn}from"react";import{jsx as Lc}from"react/jsx-runtime";function Tt(e){let[t,r]=xn(!0),[o,a]=xn(e.src);Tc(()=>a(e.src),[e.src]);let c=s=>{r(!1);let l=s.target;l.naturalWidth<=16&&l.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Lc(Rc,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as D,jsxs as ce}from"react/jsx-runtime";var ur=Fc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function j2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:s,inputAttrs:l,noItemsElement:u}){let{isMobile:d}=q(),n=wn(null),[m,f]=to(!1),[b,v]=to(""),[h,g]=to(!1);eo(()=>{m&&g(!1)},[m]),eo(()=>g(!0),[b]),eo(()=>{t&&v(t.value)},[t]);let C=yn(()=>{let I=b.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(I)):b?e.sort((X,A)=>(A.value.toLowerCase().includes(I)?1:0)-(X.value.toLowerCase().includes(I)?1:0)):e},[h,b,e]),{refs:N,floatingStyles:M,context:k}=zc({open:m,onOpenChange:f,middleware:[Ac(8),Dc({apply({elements:{floating:I},availableHeight:X}){Object.assign(I.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Ec({fallbackStrategy:"initialPlacement",padding:8})]}),w=Ic(k,{enabled:!d||!c}),{getReferenceProps:G,getFloatingProps:R}=Oc([w]),x=wn(null),{scrollProgress:T,updateScrollProgress:B}=Ae(x),P=yn(()=>t&&t.icon?t.icon:t&&t.image?D(Tt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):s||D(Bc,{className:"size-4 text-neutral-400"}),[t,s]);return D(ur.Provider,{value:{inputAttrs:l||{},openCommandList:m,setOpenCommandList:f,inputValue:b,setInputValue:v,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&c?ce(at.Root,{open:m,onOpenChange:f,children:[D(at.Trigger,{className:"sm:hidden",asChild:!0,children:D(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:D(ro,{className:o,iconElement:P})})}),D(at.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ce(at.Portal,{children:[D(at.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:I=>{I.target instanceof Element&&I.target.closest("[data-sonner-toast]")&&I.preventDefault()},children:ce(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[D("div",{className:"p-2",children:D(ro,{className:o,iconElement:P})}),m&&ce(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&b===""&&(u?D("div",{children:u}):D("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&D(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),D(Cn,{items:C})]})]})}),D(at.Overlay,{})]})]}):ce(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[D(ro,{className:o,iconElement:P,ref:N.setReference,...G()}),m&&ce("div",{ref:N.setFloating,style:M,...R(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[ce("div",{ref:x,onScroll:B,className:"grow overflow-y-auto p-2",children:[ce(Re.List,{children:[e.length===0&&b===""&&(u?D("div",{children:u}):D("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&D(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),D(Cn,{items:C})]}),D("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(T,2)}})]})]})})}var ro=Nn(({iconElement:e,className:t,...r},o)=>ce("label",{ref:o,className:i("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[D("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),ce("div",{className:"flex h-10 grow",children:[D(Uc,{}),D(Gc,{})]})]})),Uc=Nn((e,t)=>{let r=_c(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:s,setInputValue:l,disabled:u}=oo(ur);return D(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:s,onValueChange:l,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),c(!1)):d.key==="Enter"&&r?c(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&c(!0)},disabled:u,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Gc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=oo(ur);return D("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?D(Wc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):D(Vc,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Cn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=oo(ur);return e.map(a=>ce(Re.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-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[ce("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&D(Tt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),D("p",{className:i("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&&D(Yt,{className:"text-xs",variant:"neutral",children:a.label})]}),D(Hc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as ao from"@radix-ui/react-label";import{cva as $c}from"class-variance-authority";import*as kn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=$c("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=kn.forwardRef(({className:e,...t},r)=>Yc(ao.Root,{ref:r,className:i(Kc(),e),...t}));jc.displayName=ao.Root.displayName;import{cva as qc}from"class-variance-authority";import{isValidElement as Zc}from"react";import{jsx as Pn,jsxs as Sn}from"react/jsx-runtime";var Xc=qc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors","whitespace-nowrap text-sm font-medium text-content-default hover:bg-bg-subtle transition-colors"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function nx({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...s}){return Sn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Xc({variant:t}),c),...s,children:[Sn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Pn(o,{className:"size-4"})),r]}),a&&Pn("kbd",{className:i("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var Jc=e=>Zc(e);import{curveNatural as Mn}from"@visx/curve";import{LinearGradient as Rn}from"@visx/gradient";import{Group as Qc}from"@visx/group";import{ParentSize as ed}from"@visx/responsive";import{scaleLinear as td,scaleUtc as rd}from"@visx/scale";import{Area as od,AreaClosed as ad}from"@visx/shape";import{motion as Tn}from"framer-motion";import{useId as nd,useMemo as Ln}from"react";import{jsx as ye,jsxs as no}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function gx(e){return ye(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ye(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let s={...id,...c},l=nd(),u=Ln(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:d,xScale:n}=Ln(()=>{let m=r.map(({value:g})=>g),f=Math.max(...m),b=r.map(({date:g})=>g.getTime()),v=new Date(Math.min(...b)),h=new Date(Math.max(...b));return{yScale:td({domain:[-2,Math.max(f,2)],range:[t-s.top-s.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[v,h],range:[0,e-s.left-s.right],nice:!0})}},[r,t,e]);return no("svg",{width:e,height:t,children:[no("defs",{children:[ye(Rn,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-s.left-s.right,gradientUnits:"userSpaceOnUse"}),ye(Rn,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ye("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:ye("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),no(Qc,{left:s.left,top:s.top,children:[ye(od,{data:r,x:({date:m})=>n(m),y:({value:m})=>d(m)??0,curve:o?Mn:void 0,children:({path:m})=>ye(Tn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),ye(ad,{data:r,x:({date:m})=>n(m),y:({value:m})=>d(m)??0,yScale:d,curve:o?Mn:void 0,children:({path:m})=>ye(Tn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as de from"@radix-ui/react-dialog";import*as io from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as ne,jsxs as nt}from"react/jsx-runtime";function wx({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:s,drawerRootProps:l}){let u=ld(),d=({dragged:m}={})=>{s&&!m||(a&&a(),o?o(!1):u.back())},{isMobile:n}=q();return n&&!c?ne(je.Root,{open:o?r:!0,onOpenChange:m=>{m||d({dragged:!0})},...l,children:nt(je.Portal,{children:[ne(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(je.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:nt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[nt(io.Root,{children:[ne(je.Title,{children:"Modal"}),ne(je.Description,{children:"This is a modal"})]}),ne(cd,{}),e]})}),ne(je.Overlay,{})]})}):ne(de.Root,{open:o?r:!0,onOpenChange:m=>{m||d()},children:nt(de.Portal,{children:[ne(de.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),nt(de.Content,{onOpenAutoFocus:m=>m.preventDefault(),onCloseAutoFocus:m=>m.preventDefault(),onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[nt(io.Root,{children:[ne(de.Title,{children:"Modal"}),ne(de.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as mr,jsxs as it}from"react/jsx-runtime";var En=i("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function kx({pagination:e,setPagination:t,totalCount:r,unit:o=l=>`item${l?"s":""}`,className:a,children:c,showTotalCount:s=!0}){return it("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[it("div",{className:"flex items-center gap-2",children:[it("div",{children:[mr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&it(dd,{children:[it("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",s&&"of "]}),s&&mr("span",{className:"font-medium",children:Dt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),c]}),it("div",{className:"flex items-center gap-2",children:[mr("button",{type:"button",className:En,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),mr("button",{type:"button",className:En,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Oe from"@radix-ui/react-radio-group";import{Circle as ud}from"lucide-react";import*as so from"react";import{jsx as pr}from"react/jsx-runtime";var md=so.forwardRef(({className:e,...t},r)=>pr(Oe.Root,{className:i("grid gap-2",e),...t,ref:r}));md.displayName=Oe.Root.displayName;var pd=so.forwardRef(({className:e,...t},r)=>pr(Oe.Item,{ref:r,className:i("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:pr(Oe.Indicator,{className:"flex items-center justify-center",children:pr(ud,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as _e}from"vaul";import{jsx as Ye,jsxs as bd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?_e.NestedRoot:_e.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:bd(_e.Portal,{children:[Ye(_e.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(_e.Content,{...t,onPointerDownOutside:c=>{var s;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(s=t==null?void 0:t.onPointerDownOutside)==null||s.call(t,c)},className:i("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:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function gd({className:e,...t}){return Ye(_e.Title,{className:i("text-xl font-medium text-zinc-900",e),...t})}function hd(e){return Ye(_e.Description,{...e})}function vd(e){return Ye(_e.Close,{...e})}var Ax=Object.assign(fd,{Title:gd,Description:hd,Close:vd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Cd=`
2
+ import{$ as rp,$a as Up,$b as z0,$c as Pf,A as zu,Aa as Sp,Ab as p0,Ac as ef,Ad as qf,B as _u,Ba as Rp,Bb as f0,Bc as tf,Bd as Da,C as Ut,Ca as Tp,Cb as g0,Cc as rf,Cd as Ia,D as Vu,Da as Lp,Db as h0,Dc as of,Dd as Xf,E as Gt,Ea as Mp,Eb as ha,Ec as af,Ed as Jf,F as Hu,Fa as Dp,Fb as ba,Fc as nf,Fd as Qf,G as Wu,Ga as Ip,Gb as va,Gc as sf,Gd as e1,H as Fu,Ha as Ep,Hb as b0,Hc as lf,Hd as t1,I as Bu,Ia as Ap,Ib as v0,Ic as cf,Id as r1,J as Xo,Ja as na,Jb as x0,Jc as jt,Jd as o1,K as Jo,Ka as ia,Kb as y0,Kc as df,Kd as a1,L as Qo,La as sa,Lb as w0,Lc as mf,Ld as n1,M as ea,Ma as la,Mb as N0,Mc as uf,Md as i1,N as ta,Na as ca,Nb as xa,Nc as pf,Nd as Yt,O as $u,Oa as Op,Ob as k0,Oc as ff,Od as s1,P as Uu,Pa as zp,Pb as C0,Pc as gf,Pd as l1,Q as Gu,Qa as _p,Qb as P0,Qc as hf,Qd as c1,R as Ku,Ra as da,Rb as S0,Rc as La,Rd as d1,S as ju,Sa as ma,Sb as R0,Sc as bf,Sd as Ea,T as Zu,Ta as ua,Tb as T0,Tc as vf,Td as m1,U as Yu,Ua as Vp,Ub as L0,Uc as xf,Ud as u1,V as qu,Va as Hp,Vb as M0,Vc as yf,Vd as p1,W as Xu,Wa as Wp,Wb as D0,Wc as wf,Wd as f1,X as Ju,Xa as Fp,Xb as I0,Xc as Nf,Xd as g1,Y as Qu,Ya as Bp,Yb as E0,Yc as kf,Yd as h1,Z as ep,Za as Or,Zb as A0,Zc as Cf,Zd as b1,_ as tp,_a as $p,_b as O0,_c as Zt,a as Bo,aa as op,ab as Gp,ac as ya,ad as Sf,b as Ru,ba as ap,bb as pa,bc as _0,bd as Rf,c as tt,ca as np,cb as Kp,cc as V0,cd as Tf,d as Ft,da as ip,db as jp,dc as wa,dd as zr,e as Tu,ea as sp,eb as Zp,ec as H0,ed as Lf,f as rt,fa as lp,fb as Yp,fc as Na,fd as Mf,g as ot,ga as cp,gb as qp,gc as W0,gd as Ma,h as $o,ha as dp,hb as Xp,hc as F0,hd as Df,i as Uo,ia as mp,ib as Jp,ic as B0,id as If,j as Lu,ja as up,jb as Qp,jc as $0,jd as Ef,k as Go,ka as pp,kb as e0,kc as U0,kd as Af,l as Ko,la as ra,lb as t0,lc as ka,ld as Of,m as jo,ma as fp,mb as r0,mc as Ca,md as zf,n as Zo,na as gp,nb as o0,nc as Pa,nd as _f,o as kt,oa as hp,ob as a0,oc as G0,od as Vf,p as Mu,pa as bp,pb as fa,pc as K0,pd as Hf,q as Ce,qa as vp,qb as n0,qc as j0,qd as Wf,r as Du,ra as xp,rb as i0,rc as Sa,rd as Ff,s as Bt,sa as yp,sb as s0,sc as Z0,sd as Bf,t as Iu,ta as wp,tb as Kt,tc as Ra,td as $f,u as Eu,ua as oa,ub as l0,uc as Ta,ud as Uf,v as $t,va as Np,vb as c0,vc as Y0,vd as Gf,w as Au,wa as kp,wb as d0,wc as q0,wd as Kf,x as Yo,xa as Cp,xb as m0,xc as X0,xd as jf,y as qo,ya as Pp,yb as u0,yc as J0,yd as Zf,z as Ou,za as aa,zb as ga,zc as Q0,zd as Yf}from"./chunk-JT2BA727.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as yt,b as Eo,c as Er,d as Ao,e as Oo,f as zo,g as wt,h as Nt,i as Ar,j as _o,k as _,l as ke,m as Vo,n as ge,o as Wt,p as s,q as et,r as Ho,s as Wo,t as Fo}from"./chunk-SDEKJEW5.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Li}from"lucide-react";import*as Xt from"react";import{jsx as qt,jsxs as Ei}from"react/jsx-runtime";var k1=ne.Root,Mi=Xt.forwardRef(({className:e,...t},r)=>qt(ne.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Mi.displayName="AccordionItem";var Di=Xt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Li:Zt;return qt(ne.Header,{className:"flex",children:Ei(ne.Trigger,{ref:a,className:s("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,qt(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Di.displayName=ne.Trigger.displayName;var Ii=Xt.forwardRef(({className:e,children:t,...r},o)=>qt(ne.Content,{ref:o,className:s("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));Ii.displayName=ne.Content.displayName;import{cva as Ai}from"class-variance-authority";import*as Jt from"react";import{jsx as _r}from"react/jsx-runtime";var Oi=Ai("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"}}),zi=Jt.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Oi({variant:t}),e),...r}));zi.displayName="Alert";var _i=Jt.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));_i.displayName="AlertTitle";var Vi=Jt.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Vi.displayName="AlertDescription";import{sha256 as Hi}from"js-sha256";import{useState as Wi}from"react";import{jsx as Vr}from"react/jsx-runtime";function Fi(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Hi(e.email)}?d=${encodeURIComponent(r)}`:t}function D1({user:e={},className:t}){if(!e)return Vr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Wi(Fi(e));return Vr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:s("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function I1({id:e,className:t}){return Vr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:s("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Bi}from"class-variance-authority";import{jsx as Ui}from"react/jsx-runtime";var $i=Bi("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",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 Qt({className:e,variant:t,...r}){return Ui("span",{className:s($i({variant:t}),e),...r})}import{cva as Yi}from"class-variance-authority";import{forwardRef as qi}from"react";import*as he from"@radix-ui/react-tooltip";import Gi from"linkify-react";import{HelpCircle as Ki}from"lucide-react";import ji from"next/link";import{useState as Zi}from"react";import{jsx as G,jsxs as at}from"react/jsx-runtime";function K1({children:e}){return G(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:c=0,...l}){let[i,m]=Zi(!1);return at(he.Root,{open:i,onOpenChange:m,delayDuration:c,disableHoverableContent:a,children:[G(he.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),G(he.Portal,{children:G(he.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...l,children:typeof t=="string"?G("span",{className:s("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function j1({title:e,cta:t,href:r,target:o,onClick:a}){return at("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[G("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?G(ji,{href:r,...o?{target:o}:{},className:s(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?G(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Z1({title:e,cta:t,href:r}){return at("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",G("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function Y1({children:e,className:t,tooltipClassName:r}){return G("div",{className:s("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:G(Gi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:s("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function q1(e){return G(J,{...e,children:G(Ki,{className:"h-4 w-4 text-neutral-500"})})}function X1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:G(J,{content:at("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[at("p",{className:"text-sm font-semibold text-neutral-700",children:[r,et(e||0,{full:!0})," ",t]}),a&&at("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function J1({children:e,content:t,...r}){return G(J,{content:t,...r,children:G("div",{className:"flex cursor-pointer items-center",children:G(Qt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Q1({children:e,tooltipProps:t,...r}){return G(J,{...t,children:G("button",{type:"button",...r,className:s("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function er({children:e,tooltipProps:t}){return t?G(J,{...t,children:G("div",{children:e})}):e}import{jsx as nt,jsxs as Aa}from"react/jsx-runtime";var ie=Yi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:s("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",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"}}),se=qi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:l,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?nt(J,{content:m,children:Aa("div",{className:s("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[l,e&&nt("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&nt("kbd",{className:s("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:i})]})}):Aa("button",{ref:u,type:n.onClick?"button":"submit",className:s("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?nt(Ce,{}):l||null,e&&nt("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&nt("kbd",{className:s("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:i}),d]}));se.displayName="Button";import{cva as Xi}from"class-variance-authority";import{createContext as Ji}from"react";import{jsx as Oa}from"react/jsx-runtime";var Qi=Xi("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"}}}),Ct=Ji({variant:"loose"});function za({variant:e="loose",loading:t=!1,className:r,children:o}){return Oa("ul",{className:s(Qi({variant:e,loading:t}),r),"data-variant":e,children:Oa(Ct.Provider,{value:{variant:e},children:o})})}import{cva as es}from"class-variance-authority";import{createContext as ts,useContext as rs,useEffect as os,useRef as as,useState as ns}from"react";import{jsx as _a,jsxs as ls}from"react/jsx-runtime";var is=es("w-full group/card border-neutral-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-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),ss="w-full py-2.5 px-4",Hr=ts({hovered:!1});function Va({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:l}){let{variant:i}=rs(Ct),m=as(null),[d,n]=ns(!1);os(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var v;((v=m.current)==null?void 0:v.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||Nt(p));return ls("li",{ref:m,className:s(is({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[l,_a("div",{className:s(ss,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:_a(Hr.Provider,{value:{hovered:d},children:r})})]})}var kg=Object.assign(za,{Card:Object.assign(Va,{Context:Hr}),Context:Ct});import cs from"embla-carousel-autoplay";import ds from"embla-carousel-react";import{ArrowLeft as ms,ArrowRight as us}from"lucide-react";import{createContext as ps,forwardRef as St,useCallback as Pt,useContext as fs,useEffect as Wr,useState as Fr}from"react";import{jsx as Pe,jsxs as Fa}from"react/jsx-runtime";var Br=2e3,Ha=ps(null);function be(){let e=fs(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Wa(){let{api:e}=be(),[t,r]=Fr(0),o=Pt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Wr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var gs=St(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:l,...i},m)=>{let[d,n]=ds({...t,axis:e==="horizontal"?"x":"y"},[...o?[cs(typeof o=="object"?o:{delay:Br})]:[],...a||[]]),[u,p]=Fr(!1),[v,b]=Fr(!1),h=Pt(S=>{!S||(p(S.canScrollPrev()),b(S.canScrollNext()))},[]),g=Pt(()=>{n==null||n.scrollPrev()},[n]),N=Pt(()=>{n==null||n.scrollNext()},[n]),k=Pt(S=>{S.key==="ArrowLeft"?(S.preventDefault(),g()):S.key==="ArrowRight"&&(S.preventDefault(),N())},[g,N]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),Pe(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:N,canScrollPrev:u,canScrollNext:v},children:Pe("div",{ref:m,onKeyDownCapture:k,className:s("relative",c),role:"region","aria-roledescription":"carousel",...i,children:l})})});gs.displayName="Carousel";var hs=St(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});hs.displayName="CarouselContent";var bs=St(({className:e,...t},r)=>{let{orientation:o}=be();return Pe("div",{ref:r,role:"group","aria-roledescription":"slide",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});bs.displayName="CarouselItem";var vs=St(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Fa("button",{ref:r,className:s("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(ms,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});vs.displayName="CarouselPrevious";var xs=St(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Fa("button",{ref:r,className:s("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(us,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});xs.displayName="CarouselNext";import{cva as ys}from"class-variance-authority";import{motion as ws}from"framer-motion";import{ChevronLeft as Ns,ChevronRight as ks}from"lucide-react";import*as Ie from"react";import{jsx as Ue,jsxs as Rt}from"react/jsx-runtime";var Cs=ys("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-neutral-800/10 bg-white sm:bottom-6 "}}}),Fg=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:l}=be(),i=(b=l==null?void 0:l.plugins())==null?void 0:b.autoplay,[m,d]=Ie.useState(0),[n,u]=Ie.useState(!1),p=Ie.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),v=Ie.useCallback(h=>()=>{i&&i.isPlaying()&&i.stop(),h()},[i]);return Ie.useEffect(()=>{!l||(p(l),u((i==null?void 0:i.isPlaying())??!1),l.on("reInit",p),l.on("select",p),l.on("autoplay:play",()=>u(!0)),l.on("autoplay:stop",()=>u(!1)))},[l,i,p]),Rt("div",{className:s(Cs({variant:e}),t),children:[e!=="simple"&&Rt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:v(o),children:[Ue(Ns,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),l!=null&&Ue("div",{className:"flex items-center gap-1",children:l.slideNodes().map((h,g)=>Rt("button",{onClick:v(()=>l.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ue("div",{className:s("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===m?"bg-black":"bg-black/20",n&&g===m&&"w-6 bg-black/20"),children:n&&g===m&&Ue(ws.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Br)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Rt("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&Rt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[Ue(ks,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Next slide"})]})]})};import Ps from"embla-carousel-react";import{forwardRef as Ss,useCallback as Rs,useEffect as Ts}from"react";import{jsx as tr}from"react/jsx-runtime";var qg=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ps({dragFree:!0}),c=Rs(l=>{!l||!a||a==null||a.scrollTo(l.selectedScrollSnap())},[a]);return Ts(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),tr("div",{className:"overflow-hidden",ref:o,children:tr("div",{className:s("mx-4 flex gap-4",e),...t})})},Xg=Ss(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Wa();return tr("div",{ref:o,children:tr("button",{type:"button",onClick:()=>{var i;if(!a)return;let l=(i=a.plugins())==null?void 0:i.autoplay;l&&l.isPlaying()&&l.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Tt from"@radix-ui/react-checkbox";import{Check as Ls}from"lucide-react";import*as Ba from"react";import{jsx as $r}from"react/jsx-runtime";var Ms=Ba.forwardRef(({className:e,...t},r)=>$r(Tt.Root,{ref:r,className:s("peer h-5 w-5 shrink-0 rounded-md border border-neutral-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:$r(Tt.Indicator,{className:"flex items-center justify-center",children:$r(Ls,{className:"h-3 w-3 text-white"})})}));Ms.displayName=Tt.Root.displayName;import{Command as Mt,CommandInput as wl,CommandItem as Nl,useCommandState as kl}from"cmdk";import{ChevronDown as Cl}from"lucide-react";import{forwardRef as Pl,isValidElement as Sl,useCallback as Rl,useEffect as nr,useRef as Tl,useState as Lt}from"react";import{motion as vl}from"framer-motion";import{forwardRef as xl,useRef as yl}from"react";import Ur from"js-cookie";import{useEffect as Ds,useState as Is}from"react";function ah(e,t,r){let[o,a]=Is(()=>{let l=Ur.get(e);return l?JSON.parse(l):t});return Ds(()=>{let l=()=>{let i=Ur.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}},[e]),[o,l=>{a(l),Ur.set(e,JSON.stringify(l),r)}]}import{useCallback as Es,useEffect as As,useRef as Os,useState as zs}from"react";var it=(e=3e3)=>{let t=Os(null),[r,o]=zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Es(async(l,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof l=="string"?await navigator.clipboard.writeText(l):l instanceof ClipboardItem&&await navigator.clipboard.write([l]),o(!0),i==null||i(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return As(()=>()=>a(),[]),[r,c]};import{useEffect as _s,useState as Vs}from"react";function ch(){let[e,t]=Vs(null);return _s(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(i=>{var u,p,v;let m=i[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let b=1;b<i.length;b++){let h=i[b];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=c.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(i=>a.observe(i)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Hs}from"react";function ph(e){return{handleKeyDown:Hs(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Ws,useState as Fs}from"react";function bh(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Fs(o??!1);return Ws(()=>{let l=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",l),window.addEventListener("resize",l);let i=null;return e.current&&(i=new IntersectionObserver(l),i.observe(e.current)),l(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",l),window.removeEventListener("resize",l),i==null||i.disconnect()}},[e,r]),a}import{useEffect as Bs,useState as $s}from"react";function yh(){let[e,t]=$s(!1);return Bs(()=>{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 Us,useState as Gs}from"react";function Ch(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,l]=Gs(),i=(c==null?void 0:c.isIntersecting)&&a,m=([d])=>{l(d)};return Us(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,i]),c}import{createContext as Ks,useCallback as js,useContext as Zs,useEffect as $a,useId as Ys,useState as qs}from"react";import{jsx as Xs}from"react/jsx-runtime";var Ua=Ks({listeners:[],setListeners:()=>{}});function Mh({children:e}){let[t,r]=qs([]);return Xs(Ua.Provider,{value:{listeners:t,setListeners:r},children:e})}function st(e,t,r={}){let o=Ys(),{listeners:a,setListeners:c}=Zs(Ua),l=js(i=>{if(r.enabled===!1)return;let m=i.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let u=[...i.metaKey?["meta"]:[],...i.ctrlKey?["ctrl"]:[],...i.altKey?["alt"]:[],i.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(b=>b.enabled!==!1&&!!d==!!b.modal&&!!n==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||Ao(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);$a(()=>(document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)),[l]),$a(()=>(c(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Js,useState as Qs}from"react";function Ga(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Eh(e,t){let[r,o]=Qs(Ga(e)??t);return Js(()=>{let c=Ga(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as el}from"sonner";import tl from"swr";function Vh(e,t){let{data:r,isLoading:o,mutate:a}=tl(e,ge);return{data:r,isLoading:o,update:async(c,l)=>el.promise(a(c(r),{optimisticData:l,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 Ya,useMemo as sl}from"react";import{useEffect as Ka,useState as rl}from"react";function ja({pageSize:e,page:t,onPageChange:r}){let[o,a]=rl({pageIndex:t,pageSize:e});return Ka(()=>{a(c=>({...c,pageIndex:t}))},[t]),Ka(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ol,useRouter as al,useSearchParams as nl}from"next/navigation";import{useCallback as il}from"react";function Za(){let e=ol(),t=al(),r=nl(),o=Object.fromEntries(r),a=(l,i)=>{let m=new URLSearchParams(r);if((i==null?void 0:i.include)&&Array.isArray(i.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var v;(v=i.include)!=null&&v.includes(p)&&n.set(p,u)}),m=n}(i==null?void 0:i.exclude)&&Array.isArray(i.exclude)&&i.exclude.forEach(n=>m.delete(n)),l&&Object.entries(l).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},c=il(({set:l,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);l&&Object.entries(l).forEach(([h,g])=>p.set(h,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(h=>p.delete(h)):p.delete(i));let v=p.toString(),b=`${e}${v.length>0?`?${v}`:""}`;if(n)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function qh(e=Wo){let{searchParams:t,queryParams:r}=Za(),o=sl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=ja({pageSize:e,page:o,onPageChange:l=>{r(l===1?{del:"page",scroll:!1}:{set:{page:l.toString()},scroll:!1})}});return Ya(()=>{let l=parseInt(t.get("page")||"1")||1;c(i=>({...i,pageIndex:l}))},[t.get("page")]),Ya(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as ll}from"react";function Qh(){ll(()=>{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 cl,useState as dl}from"react";function rr(e){let[t,r]=dl(),o=([a])=>{r(a)};return cl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as ml,useEffect as qa,useState as ul}from"react";function Xa(e){let[t,r]=ul(!1),o=ml(()=>{r(window.scrollY>e)},[e]);return qa(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),qa(()=>{o()},[o]),t}import{useCallback as pl,useEffect as fl,useState as gl}from"react";function Ee(e){let[t,r]=gl(1),o=pl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:l,clientHeight:i}=e.current;r(l===i?1:Math.min(c/(l-i),1))},[]),a=rr(e);return fl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as hl}from"react";import{toast as Qa}from"sonner";import{jsx as or,jsxs as Ja}from"react/jsx-runtime";function bl({id:e,message:t,undo:r}){let o=()=>{r(),Qa.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return hl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Ja("div",{className:"flex w-full items-center justify-between space-x-2",children:[Ja("div",{className:"flex items-center space-x-2",children:[or(jo,{}),or("p",{className:"font-medium",children:t})]}),or("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 pb(){return({id:t,message:r,undo:o,duration:a})=>Qa(or(bl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as en}from"react/jsx-runtime";var Se=xl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},l)=>{var d,n;let i=yl(null),m=rr(i);return en(vl.div,{ref:l,className:s("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...c,children:en("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Ae from"@radix-ui/react-popover";import{Drawer as lt}from"vaul";import{jsx as Re,jsxs as ar}from"react/jsx-runtime";function ct({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:l,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return l||v?ar(lt.Root,{open:a,onOpenChange:c,children:[Re(lt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),ar(lt.Portal,{children:[Re(lt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),ar(lt.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Re("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Re("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Re("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Re(lt.Overlay,{})]})]}):ar(Ae.Root,{open:a,onOpenChange:c,children:[Re(Ae.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Ae.Portal,{children:Re(Ae.Content,{sideOffset:8,align:r,side:o,className:s("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",i),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as ir,jsx as M,jsxs as Te}from"react/jsx-runtime";function Ll(e,t){return e===!0}function Bb({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:l="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:b,onOpenChange:h,onSearchChange:g,shouldFilter:N=!0,inputRight:k,inputClassName:S,optionRight:C,optionClassName:w,matchTriggerWidth:$,hideSearch:R=!1,children:x}){let T=Ll(e,r),H=Array.isArray(t)?t:t?[t]:[],{isMobile:P}=j(),[A,X]=Lt(!1),I=b??A,ue=h??X,[U,Mr]=Lt(""),[Mo,Dr]=Lt(!1),[Ir,Si]=Lt(void 0),[Ri,Do]=Lt(!1),Ti=z=>{var Qe;if(T){let Be=H.some(({value:$e})=>$e===z.value);r(Be?H.filter(({value:$e})=>$e!==z.value):[...H,z])}else r(H.length&&((Qe=H[0])==null?void 0:Qe.value)===z.value?null:z),ue(!1)},Io=Rl((z,Qe)=>Qe===""?[...z.filter(Be=>Be.first&&!H.some($e=>$e.value===Be.value)),...H,...z.filter(Be=>!Be.first&&!H.some($e=>$e.value===Be.value))]:z,[H]);return nr(()=>{Mo&&(Si(o&&Io(o,U)),Dr(!1))},[Mo,o,Io,U]),nr(()=>{Dr(!0)},[o]),nr(()=>{I||(Mr(""),Dr(!0))},[I]),nr(()=>g==null?void 0:g(U),[U]),M(ct,{openPopover:I,setOpenPopover:ue,align:"start",side:v,onWheel:z=>{z.stopPropagation()},popoverContentClassName:s($&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!P&&!$,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Mt,{loop:!0,shouldFilter:N,children:[!R&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(wl,{placeholder:l,value:U,onValueChange:Mr,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",S),onKeyDown:z=>{(z.key==="Escape"||z.key==="Backspace"&&!U)&&(z.preventDefault(),z.stopPropagation(),ue(!1))}}),k&&M("div",{className:"mr-2",children:k}),u&&M("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),M(Ml,{children:M(Mt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ir!==void 0?Te(ir,{children:[Ir.map(z=>M(Dl,{option:z,multiple:T,selected:H.some(({value:Qe})=>Qe===z.value),onSelect:()=>Ti(z),right:C==null?void 0:C(z),className:w},`${z.label}, ${z.value}`)),U.length>0&&d&&Te(Nl,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",w),onSelect:async()=>{Do(!0),await(d==null?void 0:d(U))&&(Mr(""),ue(!1)),Do(!1)},children:[Ri?M(Ce,{className:"size-4 shrink-0"}):M(Zt,{className:"size-4 shrink-0"}),M("div",{className:"grow truncate",children:(m==null?void 0:m(U))||`Create "${U}"`})]}),N?M(El,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ir.length===0?M("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):M(Mt.Loading,{children:M("div",{className:"flex h-12 items-center justify-center",children:M(Ce,{})})})})})]})}),children:M(se,{variant:"secondary",...n,className:s(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:s(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Te(ir,{children:[M("div",{className:"min-w-0 grow truncate text-left",children:x||H.map(z=>z.label).join(", ")||c}),p&&(p===!0?M(Cl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?tn(a)?a:M(a,{className:"size-4 shrink-0"}):void 0})})}var Ml=({children:e})=>{let t=Tl(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Te(ir,{children:[M("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),M("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 Dl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Te(ir,{children:[M(Il,{disabledTooltip:e.disabledTooltip,children:Te(Mt.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&M("div",{className:"shrink-0 text-neutral-600",children:o?M(sa,{className:"size-4 text-neutral-600"}):M(la,{className:"size-4 text-neutral-400"})}),Te("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&M("span",{className:"shrink-0 text-neutral-600",children:tn(e.icon)?e.icon:M(e.icon,{className:"h-4 w-4"})}),M("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&M(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&M(Mt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Il=({children:e,disabledTooltip:t})=>t?M(J,{content:t,children:M("div",{children:e})}):e,tn=e=>Sl(e),El=Pl((e,t)=>kl(o=>o.filtered.count===0)?M("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as sr,format as Al,isSameMonth as Ol}from"date-fns";import{ChevronLeft as rn,ChevronRight as on,ChevronsLeft as zl,ChevronsRight as _l}from"lucide-react";import{forwardRef as Vl,useRef as Hl}from"react";import{DayPicker as Wl,useDayPicker as Fl,useDayRender as Bl,useNavigation as $l}from"react-day-picker";import{Fragment as Ul,jsx as re,jsxs as lr}from"react/jsx-runtime";var Dt=Vl(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:s("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));Dt.displayName="NavigationButton";function an({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:l,classNames:i,...m}){return re(Wl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:l,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-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:s("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-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-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-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",...i},components:{IconLeft:()=>re(rn,{className:"h-4 w-4"}),IconRight:()=>re(on,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:b}=$l(),{numberOfMonths:h,fromDate:g,toDate:N}=Fl(),k=b.findIndex(T=>Ol(d.displayMonth,T)),S=k===0,C=k===b.length-1,w=h>1&&(S||!C),$=h>1&&(C||!S),R=()=>{let T=sr(v,-1);p&&(!g||T.getTime()>=g.getTime())&&n(T)},x=()=>{let T=sr(v,1);u&&(!N||T.getTime()<=N.getTime())&&n(T)};return lr("div",{className:"flex items-center justify-between",children:[lr("div",{className:"flex items-center gap-1",children:[o&&!$&&re(Dt,{disabled:a||!p||g&&sr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:zl}),!$&&re(Dt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:rn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Al(d.displayMonth,"LLLL yyy",{locale:c})}),lr("div",{className:"flex items-center gap-1",children:[!w&&re(Dt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:on}),o&&!w&&re(Dt,{disabled:a||!u||N&&sr(v,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:x,icon:_l})]})]})},Day:({date:d,displayMonth:n})=>{let u=Hl(null),{activeModifiers:p,buttonProps:v,divProps:b,isButton:h,isHidden:g}=Bl(d,n,u),{selected:N,today:k,disabled:S,range_middle:C}=p;if(g)return re(Ul,{});if(!h)return re("div",{...b,className:s("flex items-center justify-center",b.className)});let{children:w,...$}=v;return lr("button",{ref:u,...$,type:"button",children:[w,k&&re("span",{className:s("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!N,"!bg-white":N,"!bg-blue-400":N&&C,"text-neutral-400":S})})]})}},...m})}import{enUS as tc}from"date-fns/locale";import{useEffect as qr,useMemo as sn,useRef as rc,useState as dr}from"react";import{Command as Gr}from"cmdk";import{Lock as Gl}from"lucide-react";import{jsx as Ge,jsxs as Kl}from"react/jsx-runtime";var Kr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,c=d=>"date"in d,l=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),i=(d,n)=>{let u=d.from,p=n.from,v=!1;u&&p&&l(u,p)&&(v=!0);let b=d.to,h=n.to,g=!1;return b&&h&&l(b,h)&&(g=!0),v&&g},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&i(n,d.dateRange)}else if(c(d)){let n=r;return n&&l(n,d.date)}return!1};return Ge(Gr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ge(Gr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Kl(Gr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:s("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-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-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[Ge("span",{children:d.label}),d.requiresUpgrade?Ge(Gl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ge("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&Ge(J,{side:"bottom",content:d.tooltipContent,children:Ge("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Kr.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as jl}from"react";var jr=jl({isOpen:!1,setIsOpen:()=>{}}),Zl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Zr=(e,t,r=!1)=>{let o=!Zl(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},nn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:l,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,b,h,g;if("date"in n){let N=n.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&N>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(l&&n.date.getDate()<l.getDate())throw new Error(`Preset ${n.label} is before fromDay ${l}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let N=(u=n.dateRange.from)==null?void 0:u.getFullYear(),k=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(k&&r&&k>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let S=(v=n.dateRange.from)==null?void 0:v.getMonth();if(S&&S<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let S=(b=n.dateRange.to)==null?void 0:b.getMonth();if(S&&S>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(l){let S=(h=n.dateRange.from)==null?void 0:h.getDate();if(S&&S<l.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(l,"MMM dd, yyyy")}.`)}if(i){let S=(g=n.dateRange.to)==null?void 0:g.getDate();if(S&&S>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Yl}from"class-variance-authority";import{Calendar as ql,ChevronDown as Xl}from"lucide-react";import{forwardRef as Jl}from"react";import{jsx as cr,jsxs as ec}from"react/jsx-runtime";var Ql=Yl(["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-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Yr=Jl(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>ec("button",{ref:c,className:s(Ql({hasError:o}),e),...a,children:[cr(ql,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),cr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?cr("span",{className:"text-neutral-400",children:r}):null)}),cr(Xl,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Yr.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as ln}from"react/jsx-runtime";var oc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:l,disabledDays:i,showYearNavigation:m=!1,locale:d=tc,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...b})=>{let{isDesktop:h}=j(),[g,N]=dr(!1),[k,S]=dr(a&&r?a==null?void 0:a.find(({id:I})=>I===r):void 0),[C,w]=dr((k==null?void 0:k.dateRange)??e??t??void 0),[$,R]=dr(C==null?void 0:C.to),x=sn(()=>C,[g]);qr(()=>{w(e)},[e]),qr(()=>{let I=a==null?void 0:a.find(({id:ue})=>ue===r);S(I),w((I==null?void 0:I.dateRange)??e??t)},[a,r]),qr(()=>{g?C&&R(C.to):R(C==null?void 0:C.to)},[g]);let T=(I,ue)=>{let U=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:ue}:I;w(U),S(void 0),(U==null?void 0:U.from)&&(U==null?void 0:U.to)&&(o==null||o(U),N(!1))},H=I=>{w(I.dateRange),S(I),o==null||o(I.dateRange,I),N(!1)},P=()=>{w(x),N(!1)},A=I=>{I||P(),N(I)},X=sn(()=>C?`${C.from?Zr(C.from,d):""} - ${C.to?Zr(C.to,d):""}`:null,[C,d]);return st((a==null?void 0:a.filter(I=>I.shortcut).map(I=>I.shortcut))??[],I=>{let ue=a==null?void 0:a.find(U=>U.shortcut===I.key);ue&&H(ue)}),oe(jr.Provider,{value:{isOpen:g,setIsOpen:N},children:oe(ct,{align:p,openPopover:g,setOpenPopover:A,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:ln("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&oe(ac,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(Kr,{currentPresetId:r,currentValue:C,presets:a,onSelect:H})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(an,{mode:"range",selected:C,onSelect:T,month:$,onMonthChange:R,numberOfMonths:h?2:1,disabled:i,disableNavigation:l,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:oe(Yr,{placeholder:n,disabled:c,className:v,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(k==null?void 0:k.label)??X})})})};function Sv({presets:e,...t}){return e&&nn(e,t),oe(oc,{presets:e,...t})}function ac({children:e}){let t=rc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return ln("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:s("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),oe("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)}})]})}import nc from"next/link";import{useEffect as ic,useState as cn}from"react";import sc from"swr";import{jsx as Xr,jsxs as dn}from"react/jsx-runtime";function mn({className:e}){let{data:t}=sc("https://status.dub.co/api/v1/summary",ge),[r,o]=cn("bg-neutral-200"),[a,c]=cn("Loading status...");return ic(()=>{if(!t)return;let{ongoing_incidents:l}=t;if(l.length>0){let{current_worst_impact:i,name:m}=l[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(d)}else c("All systems operational"),o("bg-green-500")},[t]),dn(nc,{href:"https://status.dub.co",target:"_blank",className:s("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",e),children:[dn("div",{className:"relative size-2",children:[Xr("div",{className:s("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Xr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Xr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as mr,jsxs as un}from"react/jsx-runtime";function Vv({icon:e,title:t,description:r,learnMore:o,children:a}){return un("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[mr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:mr(e,{className:"size-6 text-neutral-800"})}),mr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&un("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&mr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as lc}from"class-variance-authority";import{useState as pn}from"react";import{toast as fn}from"sonner";import{Fragment as dc,jsx as ve,jsxs as Qr}from"react/jsx-runtime";var gn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Jr={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)"},documents:{types:gn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg"],errorMessage:"File type not supported (.svg., .png, or .jpg only)"},programResourceFiles:{types:[...gn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},cc=lc("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function Yv({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:l,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:b,maxFileSizeMB:h=0,targetResolution:g,accessibilityLabel:N="File upload",disabled:k=!1}){let[S,C]=pn(!1),[w,$]=pn(null),R=async x=>{let T="dataTransfer"in x?x.dataTransfer.files&&x.dataTransfer.files[0]:x.target.files&&x.target.files[0];if(!T)return;if($(T.name),h>0&&T.size/1024/1024>h){fn.error(`File size too big (max ${h} MB)`);return}let H=Jr[d].types;if(H.length&&!H.includes(T.type)){fn.error(Jr[d].errorMessage??"File type not supported");return}let P=T;if(g&&T.type.startsWith("image/"))try{let A=await zo(T,g),X=await fetch(A).then(I=>I.blob());P=new File([X],T.name,{type:T.type})}catch(A){console.error("Error resizing image:",A)}if(t){let A=new FileReader;A.onload=X=>{var I;return r==null?void 0:r({src:(I=X.target)==null?void 0:I.result,file:P})},A.readAsDataURL(P);return}r==null||r({file:P})};return Qr("label",{className:s(cc({variant:o}),k?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(kt,{})}),ve("div",{className:"absolute inset-0 z-[5]",onDragOver:x=>{x.preventDefault(),x.stopPropagation(),C(!0)},onDragEnter:x=>{x.preventDefault(),x.stopPropagation(),C(!0)},onDragLeave:x=>{x.preventDefault(),x.stopPropagation(),C(!1)},onDrop:async x=>{x.preventDefault(),x.stopPropagation(),R(x),C(!1)}}),Qr("div",{className:s("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",k&&"bg-neutral-50",S&&!k&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!k&&"group-hover:opacity-100"):s(!k&&"group-hover:bg-neutral-50")),children:[ve(i,{className:s("size-7 transition-all duration-75",k?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",S?"scale-110":"scale-100"),c)}),b!==null&&ve("div",{className:s("mt-2 text-center text-sm text-neutral-500",k&&"text-neutral-400"),children:b??ve(dc,{children:Qr("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:N})]}),n&&(m??ve("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",l)})),p&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Jr[d].types.join(","),onChange:R,disabled:k},w)})]})}import{AnimatePresence as mc,motion as hn}from"framer-motion";import{X as uc}from"lucide-react";import pc from"next/link";import{isValidElement as fc}from"react";import{Fragment as gc,jsx as Q,jsxs as It}from"react/jsx-runtime";function vn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return st("Escape",o,{priority:1}),Q(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:It("div",{className:s("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(mc,{children:t==null?void 0:t.map(({key:c,value:l})=>{if(c==="loader")return Q(hn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${l}`);let i=e.find(m=>m.key===c);return i?(i.multiple&&Array.isArray(l)?l:[l]).map(m=>{var v,b,h,g;let d=(v=i.options)==null?void 0:v.find(N=>typeof N.value=="string"&&typeof m=="string"?N.value.toLowerCase()===m.toLowerCase():N.value===m),n=(d==null?void 0:d.icon)??((b=i.getOptionIcon)==null?void 0:b.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((h=i.getOptionLabel)==null?void 0:h.call(i,m,{key:i.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((g=i.getOptionPermalink)==null?void 0:g.call(i,m))??null;return It(hn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[It("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:bn(i.icon)?i.icon:Q(i.icon,{className:"h-4 w-4"})}),i.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:i.options?It(gc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:bn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(pc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:wt(u,30)}):wt(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(c,m),children:Q(uc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&It("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-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var bn=e=>fc(e);import{Command as ze,useCommandState as hc}from"cmdk";import{ChevronDown as bc,ListFilter as vc}from"lucide-react";import{Fragment as xc,forwardRef as yc,isValidElement as yn,useCallback as ur,useEffect as pr,useImperativeHandle as wc,useRef as to,useState as eo}from"react";import{Fragment as Rc,jsx as V,jsxs as xe}from"react/jsx-runtime";function wn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:l,askAI:i,children:m,emptyState:d,className:n}){var T,H;let{isMobile:u}=j(),p=to(null),v=to(),[b,h]=eo(!1);st("f",()=>h(!0),{enabled:!b});let[g,N]=eo(""),[k,S]=eo(null),C=ur(()=>{N(""),S(null)},[]);pr(()=>{b||C()},[b]);let w=k?e.find(({key:P})=>P===k):null,$=ur(P=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),N(""),S(P),o==null||o(P)},[]),R=ur(P=>{if(!w||!l)return!1;let A=l.find(({key:X})=>X===k);return(A==null?void 0:A.value)===P||A&&w.multiple&&Array.isArray(A.value)&&A.value.includes(P)},[w]),x=ur(P=>{w&&(R(P)?r(w.key,P):t(w.key,P),w.multiple||h(!1))},[l,w,i]);return pr(()=>{a==null||a(g)},[g]),pr(()=>{c==null||c(k)},[k]),pr(()=>{(w==null?void 0:w.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[w==null?void 0:w.options]),V(ct,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:P=>{k&&(P.preventDefault(),C())},content:V(Se,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[V(kc,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:g,onValueChange:N,onKeyDown:P=>{(P.key==="Escape"||P.key==="Backspace"&&!g)&&(P.preventDefault(),P.stopPropagation(),k?C():h(!1))},emptySubmit:P=>{P.preventDefault(),P.stopPropagation(),i?(t("ai",w?`${w.label} ${g}`:g),h(!1)):x(g)}}),!w&&V("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),V(Cc,{ref:p,children:xe(ze.List,{className:s("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((H=(T=w.options)==null?void 0:T.filter(P=>!g||!P.hideDuringSearch))==null?void 0:H.map(P=>{let A=R(P.value);return V(xn,{filter:w,option:P,right:A?V(na,{className:"h-4 w-4"}):P.right,onSelect:()=>x(P.value)},P.value)}))??V(ze.Loading,{children:V("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:V(Ce,{})})}):e.filter(P=>!P.hideInFilterDropdown).map(P=>xe(xc,{children:[V(xn,{filter:P,onSelect:()=>$(P.key)}),P.separatorAfter&&V(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},P.key)),(!w||w.options)&&V(Pc,{search:g,askAI:i,children:d?Nc(d)?(d==null?void 0:d[k??"default"])??"No matches":d:"No matches"})]})},k)]})}),children:xe("button",{type:"button",className:s("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-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[V(vc,{className:"size-4 shrink-0"}),V("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),l!=null&&l.length?V("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:l.length}):V(bc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Nc(e){return typeof e=="object"&&e!==null&&!yn(e)}var kc=e=>{let t=hc(r=>r.filtered.count===0);return V(ze.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-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"})},Cc=yc(({children:e},t)=>{let r=to(null);wc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return xe(Rc,{children:[V("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),V("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 xn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),c=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,l=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return xe(ze.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:l+(t==null?void 0:t.value),children:[V("span",{className:"shrink-0 text-neutral-600",children:Sc(c)?c:V(c,{className:"h-4 w-4"})}),wt(l,48),V("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Pc=({search:e,askAI:t,children:r})=>t&&e?xe(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[V(Uo,{className:"h-4 w-4"}),xe("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",xe("span",{className:"text-black",children:['"',e,'"']})]})]}):V(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Sc=e=>yn(e);var y2={Select:wn,List:vn};import{useMemo as Tc,useState as Nn}from"react";import{jsx as Ke,jsxs as fr}from"react/jsx-runtime";function R2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:l}){let[i,m]=Nn(r.defaultValue),[d,n]=Nn(!1),u=Tc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return fr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await l({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[fr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[fr("div",{className:"flex flex-col space-y-3",children:[Ke("h2",{className:"text-xl font-medium",children:e}),Ke("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ke("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:p=>m(p.target.value),className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":c})}):Ke("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),fr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ke("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ke("div",{className:"shrink-0",children:Ke(se,{text:a,loading:d,disabled:u,disabledTooltip:c})})]})]})}import{useId as Lc}from"react";import{jsx as gr,jsxs as Mc}from"react/jsx-runtime";function Et({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Lc();return Mc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[gr("defs",{children:gr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:gr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),gr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Dc}from"lucide-react";import Ic,{useCallback as Ec,useState as Ac}from"react";import{jsx as je,jsxs as ro}from"react/jsx-runtime";var Oc=Ic.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Ac(!1),l=Ec(()=>c(!a),[a,c]);return ro("div",{children:[ro("div",{className:"relative flex",children:[je("input",{type:a?"text":t,className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),ro("div",{className:"group",children:[r.error&&je("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:je(Dc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&je("button",{className:s("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>l(),"aria-label":a?"Hide password":"Show Password",children:a?je(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):je(ba,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&je("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Oc.displayName="Input";import{flip as Hc,offset as Wc,size as Fc,useDismiss as Bc,useFloating as $c,useInteractions as Uc}from"@floating-ui/react";import{Command as Le,useCommandState as Gc}from"cmdk";import{Check as Kc,ChevronDown as jc,Search as Zc,X as Yc}from"lucide-react";import{createContext as qc,forwardRef as Rn,useContext as io,useEffect as oo,useMemo as Cn,useRef as Pn,useState as ao}from"react";import{Drawer as dt}from"vaul";import zc from"next/image";import{useEffect as _c,useState as kn}from"react";import{jsx as Vc}from"react/jsx-runtime";function At(e){let[t,r]=kn(!0),[o,a]=kn(e.src);_c(()=>a(e.src),[e.src]);let c=l=>{r(!1);let i=l.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Vc(zc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as le}from"react/jsx-runtime";var hr=qc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function ox({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:l,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Pn(null),[u,p]=ao(!1),[v,b]=ao(""),[h,g]=ao(!1);oo(()=>{u&&g(!1)},[u]),oo(()=>g(!0),[v]),oo(()=>{t&&b(t.value)},[t]);let N=Cn(()=>{let A=v.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(A)):v?e.sort((X,I)=>(I.value.toLowerCase().includes(A)?1:0)-(X.value.toLowerCase().includes(A)?1:0)):e},[h,v,e]),{refs:k,floatingStyles:S,context:C}=$c({open:u,onOpenChange:p,middleware:[Wc(8),Fc({apply({elements:{floating:A},availableHeight:X}){Object.assign(A.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Hc({fallbackStrategy:"initialPlacement",padding:8})]}),w=Bc(C,{enabled:!d||!c}),{getReferenceProps:$,getFloatingProps:R}=Uc([w]),x=Pn(null),{scrollProgress:T,updateScrollProgress:H}=Ee(x),P=Cn(()=>t&&t.icon?t.icon:t&&t.image?E(At,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):l||E(Zc,{className:"size-4 text-neutral-400"}),[t,l]);return E(hr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&c?le(dt.Root,{open:u,onOpenChange:p,children:[E(dt.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(no,{className:o,iconElement:P})})}),E(dt.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(dt.Portal,{children:[E(dt.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:A=>{A.target instanceof Element&&A.target.closest("[data-sonner-toast]")&&A.preventDefault()},children:le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(no,{className:o,iconElement:P})}),u&&le(Le.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(Sn,{items:N})]})]})}),E(dt.Overlay,{})]})]}):le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(no,{className:o,iconElement:P,ref:k.setReference,...$()}),u&&le("div",{ref:k.setFloating,style:S,...R(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:x,onScroll:H,className:"grow overflow-y-auto p-2",children:[le(Le.List,{children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(Sn,{items:N})]}),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(T,2)}})]})]})})}var no=Rn(({iconElement:e,className:t,...r},o)=>le("label",{ref:o,className:s("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[E("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[E(Xc,{}),E(Jc,{})]})]})),Xc=Rn((e,t)=>{let r=Gc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:l,setInputValue:i,disabled:m}=io(hr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:l,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),c(!1)):d.key==="Enter"&&r?c(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&c(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Jc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=io(hr);return E("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Yc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(jc,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Sn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=io(hr);return e.map(a=>le(Le.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-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(At,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:s("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&&E(Qt,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Kc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as so from"@radix-ui/react-label";import{cva as Qc}from"class-variance-authority";import*as Tn from"react";import{jsx as rd}from"react/jsx-runtime";var ed=Qc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),td=Tn.forwardRef(({className:e,...t},r)=>rd(so.Root,{ref:r,className:s(ed(),e),...t}));td.displayName=so.Root.displayName;import{cva as od}from"class-variance-authority";import{isValidElement as ad}from"react";import{jsx as Ln,jsxs as Mn}from"react/jsx-runtime";var nd=od(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors","whitespace-nowrap text-sm font-medium text-content-default hover:bg-bg-subtle transition-colors"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function gx({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...l}){return Mn(e||"button",{...e==="button"?{type:"button"}:{},className:s(nd({variant:t}),c),...l,children:[Mn("div",{className:"flex grow items-center gap-2",children:[o&&(id(o)?o:Ln(o,{className:"size-4"})),r]}),a&&Ln("kbd",{className:s("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var id=e=>ad(e);import{curveNatural as Dn}from"@visx/curve";import{LinearGradient as In}from"@visx/gradient";import{Group as sd}from"@visx/group";import{ParentSize as ld}from"@visx/responsive";import{scaleLinear as cd,scaleUtc as dd}from"@visx/scale";import{Area as md,AreaClosed as ud}from"@visx/shape";import{motion as En}from"framer-motion";import{useId as pd,useMemo as An}from"react";import{jsx as ye,jsxs as lo}from"react/jsx-runtime";var fd={top:8,right:2,bottom:2,left:2};function Px(e){return ye(ld,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ye(gd,{...{width:t,height:r,...e}})})}function gd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let l={...fd,...c},i=pd(),m=An(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=An(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),b=new Date(Math.min(...v)),h=new Date(Math.max(...v));return{yScale:cd({domain:[-2,Math.max(p,2)],range:[t-l.top-l.bottom,0],nice:!0,clamp:!0}),xScale:dd({domain:[b,h],range:[0,e-l.left-l.right],nice:!0})}},[r,t,e]);return lo("svg",{width:e,height:t,children:[lo("defs",{children:[ye(In,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-l.left-l.right,gradientUnits:"userSpaceOnUse"}),ye(In,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ye("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:ye("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),lo(sd,{left:l.left,top:l.top,children:[ye(md,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Dn:void 0,children:({path:u})=>ye(En.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),ye(ud,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Dn:void 0,children:({path:u})=>ye(En.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${i}-color-gradient)`,mask:`url(#${i}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as co from"@radix-ui/react-visually-hidden";import{useRouter as hd}from"next/navigation";import{Drawer as Ze}from"vaul";import{jsx as ae,jsxs as mt}from"react/jsx-runtime";function Dx({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:l,drawerRootProps:i}){let m=hd(),d=({dragged:u}={})=>{l&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!c?ae(Ze.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:mt(Ze.Portal,{children:[ae(Ze.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Ze.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:mt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[mt(co.Root,{children:[ae(Ze.Title,{children:"Modal"}),ae(Ze.Description,{children:"This is a modal"})]}),ae(bd,{}),e]})}),ae(Ze.Overlay,{})]})}):ae(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:mt(ce.Portal,{children:[ae(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),mt(ce.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[mt(co.Root,{children:[ae(ce.Title,{children:"Modal"}),ae(ce.Description,{children:"This is a modal"})]}),e]})]})})}function bd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as vd,jsx as br,jsxs as ut}from"react/jsx-runtime";var On=s("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function Ax({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:c,showTotalCount:l=!0}){return ut("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ut("div",{className:"flex items-center gap-2",children:[ut("div",{children:[br("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ut(vd,{children:[ut("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",l&&"of "]}),l&&br("span",{className:"font-medium",children:et(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),c]}),ut("div",{className:"flex items-center gap-2",children:[br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as xd}from"lucide-react";import*as mo from"react";import{jsx as vr}from"react/jsx-runtime";var yd=mo.forwardRef(({className:e,...t},r)=>vr(_e.Root,{className:s("grid gap-2",e),...t,ref:r}));yd.displayName=_e.Root.displayName;var wd=mo.forwardRef(({className:e,...t},r)=>vr(_e.Item,{ref:r,className:s("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:vr(_e.Indicator,{className:"flex items-center justify-center",children:vr(xd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));wd.displayName=_e.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Ye,jsxs as Sd}from"react/jsx-runtime";function Nd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:Sd(Ve.Portal,{children:[Ye(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(Ve.Content,{...t,onPointerDownOutside:c=>{var l;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(l=t==null?void 0:t.onPointerDownOutside)==null||l.call(t,c)},className:s("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:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function kd({className:e,...t}){return Ye(Ve.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function Cd(e){return Ye(Ve.Description,{...e})}function Pd(e){return Ye(Ve.Close,{...e})}var Bx=Object.assign(Nd,{Title:kd,Description:Cd,Close:Pd});import{useEffect as Rd,useRef as Td,useState as Ld}from"react";import{jsx as zn}from"react/jsx-runtime";var Md=`
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
- `,Nd=`
9
+ `,Dd=`
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
- `,kd=60,Pd=1e3/kd;function Ox({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=yd(null),[c,s]=wd(!1);return xd(()=>{let l=a.current;if(!l||!l.parentElement)return;let u=l.parentElement,d=window.devicePixelRatio||1;l.width=u.clientWidth*d,l.height=u.clientHeight*d;let n=l.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let m=n.createProgram();if(!m){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let x=R===0?Cd:Nd,T=n.createShader(R===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!T){console.error("Failed to create shader");return}n.shaderSource(T,x),n.compileShader(T),n.getShaderParameter(T,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(T)),n.attachShader(m,T),n.linkProgram(m)}n.getProgramParameter(m,n.LINK_STATUS)||console.error(n.getProgramInfoLog(m));let f=n.getAttribLocation(m,"position"),b=n.getUniformLocation(m,"time"),v=n.getUniformLocation(m,"resolution"),h=n.getUniformLocation(m,"dotSize"),g=n.getUniformLocation(m,"cellSize"),C=n.getUniformLocation(m,"speed");n.useProgram(m);let N=[1,1,-1,1,1,-1,-1,-1],M=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,M),n.bufferData(n.ARRAY_BUFFER,new Float32Array(N),n.STATIC_DRAW),n.enableVertexAttribArray(f),n.vertexAttribPointer(f,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(g,t*window.devicePixelRatio),n.uniform1f(C,r);let k,w=0;function G(R){if(R-w<Pd){k=requestAnimationFrame(G);return}w=R,n&&l&&m&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(b,R/1e3),n.uniform2f(v,l.width,l.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(G)}return k=requestAnimationFrame(G),l.addEventListener("webglcontextlost",R=>{R.preventDefault(),s(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),l.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),An("div",{className:i("absolute inset-0",o,c&&"opacity-0"),children:An("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{useEffect as Sd,useId as Md,useRef as Rd}from"react";import{jsx as fr,jsxs as Dn}from"react/jsx-runtime";function Bx({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:s=!1}){let l=Md(),u=Rd(null);return Sd(()=>{u.current&&s&&setTimeout(()=>{var d;(d=u.current)==null||d.focus()},10)},[s]),Dn("div",{className:a,children:[r&&fr("div",{className:"flex items-center gap-2",children:fr("label",{htmlFor:`${l}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Dn("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[fr("input",{ref:u,id:`${l}-datetime`,type:"text",placeholder:o,defaultValue:e?ht(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Lr(d.target.value);n&&(t(n),d.target.value=ht(n))}},onKeyDown:d=>{if(d.key==="Enter"&&u.current){d.preventDefault();let n=Lr(u.current.value);n&&(t(n),u.current.value=ht(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),fr("input",{type:"datetime-local",id:`${l}-datetime-local`,required:c,value:e?To(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),u.current&&(u.current.value=ht(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Td}from"class-variance-authority";import{jsx as In,jsxs as Ad}from"react/jsx-runtime";var Ld=Td("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-neutral-500/[.15] text-neutral-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"}}),Ed={neutral:sa,new:na,success:aa,pending:ia,warning:Ar,error:Ar};function jx({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...s}){let l=r!==null?r??Ed[t??"neutral"]:null;return In(qt,{tooltipProps:{content:o},children:Ad("span",{className:i(Ld({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...s,children:[l&&In(l,{className:"h-3 w-3 shrink-0"}),c]})})}import*as hr from"@radix-ui/react-switch";import{useMemo as Dd}from"react";import{jsx as gr}from"react/jsx-runtime";function t4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:s=!0,loading:l=!1,disabled:u=!1,disabledTooltip:d}){let n=Dd(()=>d?!0:u||l,[d,u,l]),m=gr(hr.Root,{checked:l?!1:s,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:i("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-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:gr(hr.Thumb,{className:i(`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),children:c})});return d?gr(J,{content:d,children:gr("div",{className:"inline-block leading-none",children:m})}):m}import{flexRender as lo,getCoreRowModel as Id,useReactTable as zd}from"@tanstack/react-table";import{AnimatePresence as Od,motion as _d}from"framer-motion";import{memo as Hd,useEffect as vr,useMemo as Vd,useState as zn}from"react";import{jsx as W,jsxs as pe}from"react/jsx-runtime";var co=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),Bd=i(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function P4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:s,onPaginationChange:l,getRowId:u,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[m,f]=zn(e.columnVisibility??{}),[b,v]=zn(e.selectedRows??{});vr(()=>{e.selectedRows&&!Er(e.selectedRows,b)&&v(e.selectedRows??{})},[e.selectedRows]),vr(()=>{var g;(g=e.onRowSelectionChange)==null||g.call(e,h.getSelectedRowModel().rows)},[b]),vr(()=>{e.columnVisibility&&!Er(e.columnVisibility,m)&&f(e.columnVisibility??{})},[e.columnVisibility]),vr(()=>{var g;(g=e.onColumnVisibilityChange)==null||g.call(e,m)},[m]);let h=zd({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:Id(),onPaginationChange:l,onColumnVisibilityChange:g=>f(g),onRowSelectionChange:v,state:{pagination:s,columnVisibility:m,columnPinning:{left:[],right:[],...c},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:u,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:m,table:h,enableColumnResizing:d}}var Wd=Hd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:c}){return W("tr",{className:i("group/row",r&&"cursor-pointer select-none",c.getRowModel().rows.length>8&&t.index===c.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?s=>{bt(s)||r(t,s)}:void 0,children:t.getVisibleCells().map(s=>W("td",{className:i(co(s.column.id,!!r),"text-content-default group",uo(s.column,t.index===c.getRowModel().rows.length-1),typeof a=="function"?a(s.column.id):a),style:{width:s.column.getSize(),...mo(s.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:lo(s.column.columnDef.cell,s.getContext())}),o==null?void 0:o(s)]})},s.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function S4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:c,sortBy:s,sortOrder:l,onSortChange:u,sortableColumns:d=[],className:n,containerClassName:m,scrollWrapperClassName:f,thClassName:b,tdClassName:v,table:h,pagination:g,resourceName:C,onRowClick:N,rowCount:M,children:k,enableColumnResizing:w=!1}){let G=Vd(()=>w?h.getVisibleLeafColumns().reduce((R,x)=>R+x.getSize(),0):"100%",[w,h.getVisibleLeafColumns()]);return pe("div",{className:i("border-border-subtle bg-bg-default relative rounded-xl border",m),children:[!o&&!!(t!=null&&t.length)||r?pe("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[pe("table",{className:i(["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","[&_th]:relative [&_th]:select-none",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",minWidth:G},children:[W("thead",{children:h.getHeaderGroups().map(R=>W("tr",{children:R.headers.map(x=>{let T=d.includes(x.column.id),B=T?"button":"div";return pe("th",{colSpan:x.colSpan,className:i(co(x.id),"text-content-emphasis select-none font-medium",uo(x.column,!h.getRowModel().rows.length),typeof b=="function"?b(x.column.id):b,w&&"relative"),style:{width:x.getSize(),...mo(x.column)},children:[W("div",{className:"flex items-center justify-between gap-6 !pr-0",children:pe(B,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>u==null?void 0:u({sortBy:x.column.id,sortOrder:s!==x.column.id||l==="asc"?"desc":"asc"})},children:[x.isPlaceholder?null:lo(x.column.columnDef.header,x.getContext()),T&&s===x.column.id&&W(Wo,{className:"h-3 w-3 shrink-0",order:l||"desc"})]})}),w&&x.column.getCanResize()&&x.column.id!=="menu"&&W("div",{onMouseDown:x.getResizeHandler(),onTouchStart:x.getResizeHandler(),onClick:P=>P.stopPropagation(),className:Bd})]},x.id)})},R.id))}),W("tbody",{children:h.getRowModel().rows.map(R=>w?W(Wd,{row:R,onRowClick:N,cellRight:c,tdClassName:v,table:h},`${R.id}-${h.getVisibleLeafColumns().map(x=>x.id).join(",")}`):W("tr",{className:i("group/row",N&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&R.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:N?x=>{bt(x)||N(R,x)}:void 0,children:R.getVisibleCells().map(x=>W("td",{className:i(co(x.column.id,!!N),"text-content-default group",uo(x.column,R.index===h.getRowModel().rows.length-1),typeof v=="function"?v(x.column.id):v),style:{minWidth:x.column.columnDef.minSize,maxWidth:x.column.columnDef.maxSize,width:x.column.columnDef.size||"auto",...mo(x.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:lo(x.column.columnDef.cell,x.getContext())}),c==null?void 0:c(x)]})},x.id))},R.id))})]}),k]}):W("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(C==null?void 0:C(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!M&&pe("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[pe("div",{children:[W("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",pe("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount())]})," ","of"," ",W("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(C==null?void 0:C(h.getRowCount()!==1))||"items"]}),pe("div",{className:"flex items-center gap-2",children:[W(le,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),W(le,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),W(Od,{children:r&&W(_d.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:W("div",{className:"flex h-[75vh] w-full items-center justify-center",children:W(Ne,{})})})})]})}var uo=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},mo=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 Fd,motion as On}from"framer-motion";import{useId as Ud}from"react";import{jsx as br,jsxs as Gd}from"react/jsx-runtime";function E4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:s}){let l=Ud();return br(Fd,{id:l,children:br(On.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:s,children:e.map(u=>Gd("button",{type:"button","data-selected":u.value===t,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":u.value!==t},a),onClick:()=>r(u.value),children:[typeof u.label=="string"?br("p",{children:u.label}):u.label,u.badge,u.value===t&&br(On.div,{layoutId:l,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},u.value))})})}import{useEffect as $d,useId as Kd,useRef as jd,useState as Yd}from"react";import{jsx as fe,jsxs as po}from"react/jsx-runtime";var qd=[{key:"utm_source",icon:ga,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Sa,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:pa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Na,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Pa,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:fa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function V4({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:s}=q(),l=Kd(),[u,d]=Yd(!1),n=jd(null);return $d(()=>{n.current&&!s&&o&&setTimeout(()=>{var m;return(m=n.current)==null?void 0:m.focus()},10)},[]),fe("div",{className:i("grid gap-y-3",c),children:qd.map(({key:m,icon:f,label:b,placeholder:v,description:h},g)=>fe("div",{className:"group relative",children:po("div",{className:"relative z-10 flex",children:[fe(J,{content:po("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:m})]}),sideOffset:4,disableHoverableContent:!0,children:po("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",u?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(C=>!C),children:[fe(f,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${l}-${m}`,className:"select-none text-sm",children:u?fe("span",{className:"font-mono text-xs",children:m}):b})]})}),fe("div",{className:"min-w-0 grow",children:fe(qt,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${l}-${m}`,ref:g===0?n:void 0,placeholder:v,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[m]||"",onChange:C=>t(m,C.target.value)})})})]})},m))})}import{jsx as fo,jsxs as Zd}from"react/jsx-runtime";function W4(){return Zd("div",{style:xr.backgroundMain,children:[fo("div",{style:xr.backgroundMainBefore}),fo("div",{style:xr.backgroundMainAfter}),fo("div",{style:xr.backgroundContent})]})}var xr={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
+ `,Id=60,Ed=1e3/Id;function Kx({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Td(null),[c,l]=Ld(!1);return Rd(()=>{let i=a.current;if(!i||!i.parentElement)return;let m=i.parentElement,d=window.devicePixelRatio||1;i.width=m.clientWidth*d,i.height=m.clientHeight*d;let n=i.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let u=n.createProgram();if(!u){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let x=R===0?Md:Dd,T=n.createShader(R===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!T){console.error("Failed to create shader");return}n.shaderSource(T,x),n.compileShader(T),n.getShaderParameter(T,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(T)),n.attachShader(u,T),n.linkProgram(u)}n.getProgramParameter(u,n.LINK_STATUS)||console.error(n.getProgramInfoLog(u));let p=n.getAttribLocation(u,"position"),v=n.getUniformLocation(u,"time"),b=n.getUniformLocation(u,"resolution"),h=n.getUniformLocation(u,"dotSize"),g=n.getUniformLocation(u,"cellSize"),N=n.getUniformLocation(u,"speed");n.useProgram(u);let k=[1,1,-1,1,1,-1,-1,-1],S=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,S),n.bufferData(n.ARRAY_BUFFER,new Float32Array(k),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(g,t*window.devicePixelRatio),n.uniform1f(N,r);let C,w=0;function $(R){if(R-w<Ed){C=requestAnimationFrame($);return}w=R,n&&i&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,R/1e3),n.uniform2f(b,i.width,i.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),C=requestAnimationFrame($)}return C=requestAnimationFrame($),i.addEventListener("webglcontextlost",R=>{R.preventDefault(),l(!0),cancelAnimationFrame(C)}),()=>{cancelAnimationFrame(C),i.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),zn("div",{className:s("absolute inset-0",o,c&&"opacity-0"),children:zn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{useEffect as Ad,useId as Od,useRef as zd}from"react";import{jsx as xr,jsxs as _n}from"react/jsx-runtime";function qx({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:l=!1}){let i=Od(),m=zd(null);return Ad(()=>{m.current&&l&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[l]),_n("div",{className:a,children:[r&&xr("div",{className:"flex items-center gap-2",children:xr("label",{htmlFor:`${i}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),_n("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[xr("input",{ref:m,id:`${i}-datetime`,type:"text",placeholder:o,defaultValue:e?yt(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Er(d.target.value);n&&(t(n),d.target.value=yt(n))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let n=Er(m.current.value);n&&(t(n),m.current.value=yt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),xr("input",{type:"datetime-local",id:`${i}-datetime-local`,required:c,value:e?Eo(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),m.current&&(m.current.value=yt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as _d}from"class-variance-authority";import{jsx as Vn,jsxs as Wd}from"react/jsx-runtime";var Vd=_d("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-neutral-500/[.15] text-neutral-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"}}),Hd={neutral:ua,new:da,success:ca,pending:ma,warning:Or,error:Or};function o4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...l}){let i=r!==null?r??Hd[t??"neutral"]:null;return Vn(er,{tooltipProps:{content:o},children:Wd("span",{className:s(Vd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...l,children:[i&&Vn(i,{className:"h-3 w-3 shrink-0"}),c]})})}import*as wr from"@radix-ui/react-switch";import{useMemo as Fd}from"react";import{jsx as yr}from"react/jsx-runtime";function m4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:l=!0,loading:i=!1,disabled:m=!1,disabledTooltip:d}){let n=Fd(()=>d?!0:m||i,[d,m,i]),u=yr(wr.Root,{checked:i?!1:l,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:s("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-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:yr(wr.Thumb,{className:s(`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),children:c})});return d?yr(J,{content:d,children:yr("div",{className:"inline-block leading-none",children:u})}):u}import{flexRender as uo,getCoreRowModel as Bd,useReactTable as $d}from"@tanstack/react-table";import{AnimatePresence as Ud,motion as Gd}from"framer-motion";import{memo as Kd,useEffect as Nr,useMemo as jd,useState as Hn}from"react";import{jsx as W,jsxs as pe}from"react/jsx-runtime";var po=(e,t)=>s(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),Zd=s(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function O4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:l,onPaginationChange:i,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[u,p]=Hn(e.columnVisibility??{}),[v,b]=Hn(e.selectedRows??{});Nr(()=>{e.selectedRows&&!Ar(e.selectedRows,v)&&b(e.selectedRows??{})},[e.selectedRows]),Nr(()=>{var g;(g=e.onRowSelectionChange)==null||g.call(e,h.getSelectedRowModel().rows)},[v]),Nr(()=>{e.columnVisibility&&!Ar(e.columnVisibility,u)&&p(e.columnVisibility??{})},[e.columnVisibility]),Nr(()=>{var g;(g=e.onColumnVisibilityChange)==null||g.call(e,u)},[u]);let h=$d({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:Bd(),onPaginationChange:i,onColumnVisibilityChange:g=>p(g),onRowSelectionChange:b,state:{pagination:l,columnVisibility:u,columnPinning:{left:[],right:[],...c},rowSelection:v},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:u,table:h,enableColumnResizing:d}}var Yd=Kd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:c}){return W("tr",{className:s("group/row",r&&"cursor-pointer select-none",c.getRowModel().rows.length>8&&t.index===c.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?l=>{Nt(l)||r(t,l)}:void 0,children:t.getVisibleCells().map(l=>W("td",{className:s(po(l.column.id,!!r),"text-content-default group",fo(l.column,t.index===c.getRowModel().rows.length-1),typeof a=="function"?a(l.column.id):a),style:{width:l.column.getSize(),...go(l.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:uo(l.column.columnDef.cell,l.getContext())}),o==null?void 0:o(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function z4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:c,sortBy:l,sortOrder:i,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:u,scrollWrapperClassName:p,thClassName:v,tdClassName:b,table:h,pagination:g,resourceName:N,onRowClick:k,rowCount:S,children:C,enableColumnResizing:w=!1}){let $=jd(()=>w?h.getVisibleLeafColumns().reduce((R,x)=>R+x.getSize(),0):"100%",[w,h.getVisibleLeafColumns()]);return pe("div",{className:s("border-border-subtle bg-bg-default relative rounded-xl border",u),children:[!o&&!!(t!=null&&t.length)||r?pe("div",{className:s("relative min-h-[400px] overflow-x-auto rounded-[inherit]",p),children:[pe("table",{className:s(["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","[&_th]:relative [&_th]:select-none",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",minWidth:$},children:[W("thead",{children:h.getHeaderGroups().map(R=>W("tr",{children:R.headers.map(x=>{let T=d.includes(x.column.id),H=T?"button":"div";return pe("th",{colSpan:x.colSpan,className:s(po(x.id),"text-content-emphasis select-none font-medium",fo(x.column,!h.getRowModel().rows.length),typeof v=="function"?v(x.column.id):v,w&&"relative"),style:{width:x.getSize(),...go(x.column)},children:[W("div",{className:"flex items-center justify-between gap-6 !pr-0",children:pe(H,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:x.column.id,sortOrder:l!==x.column.id||i==="asc"?"desc":"asc"})},children:[x.isPlaceholder?null:uo(x.column.columnDef.header,x.getContext()),T&&l===x.column.id&&W(Ko,{className:"h-3 w-3 shrink-0",order:i||"desc"})]})}),w&&x.column.getCanResize()&&x.column.id!=="menu"&&W("div",{onMouseDown:x.getResizeHandler(),onTouchStart:x.getResizeHandler(),onClick:P=>P.stopPropagation(),className:Zd})]},x.id)})},R.id))}),W("tbody",{children:h.getRowModel().rows.map(R=>w?W(Yd,{row:R,onRowClick:k,cellRight:c,tdClassName:b,table:h},`${R.id}-${h.getVisibleLeafColumns().map(x=>x.id).join(",")}`):W("tr",{className:s("group/row",k&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&R.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:k?x=>{Nt(x)||k(R,x)}:void 0,children:R.getVisibleCells().map(x=>W("td",{className:s(po(x.column.id,!!k),"text-content-default group",fo(x.column,R.index===h.getRowModel().rows.length-1),typeof b=="function"?b(x.column.id):b),style:{minWidth:x.column.columnDef.minSize,maxWidth:x.column.columnDef.maxSize,width:x.column.columnDef.size||"auto",...go(x.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:uo(x.column.columnDef.cell,x.getContext())}),c==null?void 0:c(x)]})},x.id))},R.id))})]}),C]}):W("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!S&&pe("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[pe("div",{children:[W("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",pe("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount())]})," ","of"," ",W("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(N==null?void 0:N(h.getRowCount()!==1))||"items"]}),pe("div",{className:"flex items-center gap-2",children:[W(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),W(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),W(Ud,{children:r&&W(Gd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:W("div",{className:"flex h-[75vh] w-full items-center justify-center",children:W(Ce,{})})})})]})}var fo=(e,t)=>{let r=e.getIsPinned();return s(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},go=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 qd,motion as Wn}from"framer-motion";import{useId as Xd}from"react";import{jsx as kr,jsxs as Jd}from"react/jsx-runtime";function F4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:l}){let i=Xd();return kr(qd,{id:i,children:kr(Wn.div,{layout:!0,className:s("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:l,children:e.map(m=>Jd("button",{type:"button","data-selected":m.value===t,className:s("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":m.value!==t},a),onClick:()=>r(m.value),children:[typeof m.label=="string"?kr("p",{children:m.label}):m.label,m.badge,m.value===t&&kr(Wn.div,{layoutId:i,className:s("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},m.value))})})}import{useEffect as Qd,useId as em,useRef as tm,useState as rm}from"react";import{jsx as fe,jsxs as ho}from"react/jsx-runtime";var om=[{key:"utm_source",icon:wa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ma,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:xa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ta,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:La,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:ya,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Y4({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:l}=j(),i=em(),[m,d]=rm(!1),n=tm(null);return Qd(()=>{n.current&&!l&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:s("grid gap-y-3",c),children:om.map(({key:u,icon:p,label:v,placeholder:b,description:h},g)=>fe("div",{className:"group relative",children:ho("div",{className:"relative z-10 flex",children:[fe(J,{content:ho("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:ho("div",{className:s("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(N=>!N),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${i}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):v})]})}),fe("div",{className:"min-w-0 grow",children:fe(er,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${i}-${u}`,ref:g===0?n:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:N=>t(u,N.target.value)})})})]})},u))})}import{jsx as bo,jsxs as am}from"react/jsx-runtime";function X4(){return am("div",{style:Cr.backgroundMain,children:[bo("div",{style:Cr.backgroundMainBefore}),bo("div",{style:Cr.backgroundMainAfter}),bo("div",{style:Cr.backgroundContent})]})}var Cr={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 Iu from"next/image";import Ve from"next/link";import{useParams as zu}from"next/navigation";import{jsx as _n}from"react/jsx-runtime";function Hn(e){return _n("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:_n("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 yr=[{title:"Dub Links",description:"Short links with superpowers",icon:ya,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:ka,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Vt,href:"/integrations"}],Vn=[{icon:$o,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Go,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Hn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],go=[{icon:Zo,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:Yo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:Ko,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:qo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:jo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],Bn=[{icon:Wt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:Ft,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Gt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:go}],wr=[{icon:Jo,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:va,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ba,title:"About",description:"Company, values, and team",href:"/about"},{icon:ma,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Qo,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:xa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],Cr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Wn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],K4=[{name:"X (Twitter)",icon:_t,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Ht,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Xd}from"react/jsx-runtime";function Nr({className:e,children:t}){return Xd("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as He from"@radix-ui/react-popover";import{BoxSelect as Nu,Home as ku,LayoutGrid as Pu,Type as Su}from"lucide-react";import{useParams as Mu}from"next/navigation";import{useCallback as Ru,useContext as Tu,useState as Lu}from"react";import{toast as Eu}from"sonner";import{jsx as Fn}from"react/jsx-runtime";function ho({className:e}){return Fn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:Fn("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 ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as su}from"framer-motion";import Lt from"next/link";import{useParams as lu,usePathname as cu}from"next/navigation";import{createContext as du,useId as uu}from"react";import mu from"swr";import{Link as jn}from"@radix-ui/react-navigation-menu";import Yn from"next/link";import{jsx as S,jsxs as vo}from"react/jsx-runtime";function Un(e){return vo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:i("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[vo("g",{className:"text-[var(--grid)]",children:[S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),S("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),S("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),S("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),S("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),S("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),S("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),S("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:S("tspan",{x:"157.667",y:"232.909",children:"402"})}),S("g",{filter:"url(#a)",children:S("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),S("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),S("defs",{children:vo("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[S("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),S("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),S("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"}),S("feOffset",{dy:"2"}),S("feGaussianBlur",{stdDeviation:"1"}),S("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),S("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),S("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as Jd}from"react";import{jsx as p,jsxs as V}from"react/jsx-runtime";function Gn(e){let t=Jd();return V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[V("g",{clipPath:`url(#${t}-a)`,children:[p("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"}),p("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),p("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),p("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),p("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),p("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),p("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),p("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),p("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),p("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),p("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),p("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),p("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),p("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),p("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),p("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),p("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),p("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),p("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),p("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),p("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),p("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),p("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),p("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),p("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),V("g",{children:[p("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"}),p("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"}),p("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"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),p("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"})]}),V("g",{children:[p("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),p("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"}),p("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),p("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:p("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),p("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:p("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),p("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),p("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),V("g",{children:[p("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),p("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),p("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),p("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:p("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),p("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),p("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),p("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:p("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),p("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"}),p("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"}),p("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:p("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"})}),p("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:p("tspan",{x:"251",y:"171.636",children:"51K"})})]}),V("defs",{children:[V("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EA580C"}),p("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),p("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EAB308",stopOpacity:"0"}),p("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#EAB308",stopOpacity:"0"}),p("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[p("stop",{stopColor:"#030712",stopOpacity:"0"}),p("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),V("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[p("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),p("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),p("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),V("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[p("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),p("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),p("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),p("clipPath",{id:`${t}-a`,children:p("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),p("clipPath",{id:`${t}-y`,children:p("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),p("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:p("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),p("image",{href:`${It}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import{Link as $n}from"@radix-ui/react-navigation-menu";import Kn from"next/link";import{jsx as we,jsxs as kr}from"react/jsx-runtime";var st="text-xs uppercase text-neutral-500 dark:text-white/60",Qd="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",te=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function lt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...s}){return we($n,{asChild:!0,children:we(Kn,{className:i(Qd,a),...s,children:kr("div",{className:"flex items-center justify-between gap-3",children:[e,kr("div",{className:"flex-1",children:[we("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&we("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&we(Ho,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function Pr({icon:e,title:t,description:r,iconClassName:o,...a}){return we($n,{asChild:!0,children:we(Kn,{...a,className:"group relative flex flex-col justify-center 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:kr("div",{className:"flex items-center justify-between px-5 py-4",children:[kr("div",{children:[we("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),we("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),we(e,{className:i("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as j,jsxs as Te}from"react/jsx-runtime";var eu=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Vt,href:"/integrations"}];function qn({domain:e}){return Te("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Te("div",{className:"grid grid-cols-2 gap-4 p-4",children:[j(jn,{asChild:!0,children:Te(Yn,{href:z("/home",e,te({domain:e,utm_content:"Dub Links"})),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:[Te("div",{className:"p-5 pb-0",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),j("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"})]}),j("div",{className:"relative grow overflow-hidden",children:j(Gn,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),j("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:[j(jn,{asChild:!0,children:Te(Yn,{href:z("/analytics",e,te({domain:e,utm_content:"Dub Analytics"})),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:[j(Un,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),j("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:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),j("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),j("div",{className:"grid grow grid-rows-2 gap-4",children:eu.map(({title:t,description:r,icon:o,href:a})=>j(Pr,{title:t,description:r,icon:o,href:z(a,e,te({domain:e,utm_content:t}))},t))})]})]}),Te("div",{className:"px-6 py-4",children:[j("p",{className:i(st,"mb-2"),children:"Customer Stories"}),Te("div",{className:"grid grid-cols-1",children:[Vn.map(({icon:t,iconClassName:r,title:o,description:a,href:c})=>j(lt,{className:"-mx-2",href:z(c,e,te({domain:e,utm_content:o})),icon:j("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:j(t,{className:i("h-4 w-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},c)),j(lt,{className:"-mx-2",href:z("/customers",e,te({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),j("p",{className:i(st,"mb-2 mt-5"),children:"Compare"}),j("div",{className:"flex flex-col",children:Cr.map(({name:t,slug:r})=>j(lt,{className:"-mx-2",href:z(`/compare/${r}`,e,te({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as Xn}from"@radix-ui/react-navigation-menu";import ru from"next/image";import Jn from"next/link";import{useId as tu}from"react";import{jsx as y,jsxs as ct}from"react/jsx-runtime";function Zn({className:e,...t}){let r=tu();return ct("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:i("",e),...t,children:[y("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),ct("g",{opacity:"0.5",children:[y("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:y("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),y("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:y("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),y("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:y("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),y("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),y("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),ct("defs",{children:[ct("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#fff",stopOpacity:"0"}),y("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),ct("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#5B5B5B"}),y("stop",{offset:"1",stopColor:"#757575"})]}),ct("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[y("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),y("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),y("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),y("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),y("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"}),y("feOffset",{dx:"-0.991",dy:"0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),y("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),y("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"}),y("feOffset",{dx:"0.991",dy:"-0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),y("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),y("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as ee,jsxs as qe}from"react/jsx-runtime";var ou=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function Qn({domain:e}){return qe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ee("div",{className:"grid grid-cols-2 gap-4 p-4",children:ou.map(({title:t,description:r,thumbnail:o,href:a})=>ee(Xn,{asChild:!0,children:qe(Jn,{href:z(a,e,te({domain:e,utm_content:t})),className:i("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[qe("div",{className:"p-5 pb-0",children:[ee("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),ee("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ee("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:ee("div",{className:i("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:ee(ru,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)},t))}),qe("div",{className:"flex flex-col gap-4 p-4",children:[wr.filter(({title:t})=>!["Docs","Help Center","Dub Brand"].includes(t)).map(({title:t,description:r,icon:o,href:a})=>ee(Pr,{title:t,description:r,icon:o,iconClassName:"size-5",href:z(a,e,te({domain:e,utm_content:t}))},t)),ee(Xn,{asChild:!0,children:qe(Jn,{href:z("/brand",e,te({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[qe("div",{className:"pointer-events-none absolute inset-0",children:[ee("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:ee("div",{className:i("absolute inset-0 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)]")})}),ee(Zn,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),ee("div",{className:"relative flex items-center justify-between px-5 py-4",children:qe("div",{children:[ee("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),ee("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})]})]})}import{Link as au}from"@radix-ui/react-navigation-menu";import nu from"next/link";import{jsx as re,jsxs as dt}from"react/jsx-runtime";var iu=[{icon:Wt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:Ft,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Gt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function ei({domain:e}){return dt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[dt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(st,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:iu.map(({icon:t,title:r,description:o,href:a})=>re(au,{asChild:!0,children:dt(nu,{href:z(a,e,te({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[dt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(bn,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),dt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),dt("div",{className:"px-6 py-4",children:[re("p",{className:i(st,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:go.map(({icon:t,iconClassName:r,title:o,href:a})=>re(lt,{className:"-mx-2",href:z(a,e,te({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as gu,jsx as F,jsxs as ut}from"react/jsx-runtime";var bo=du({theme:"light"}),xo=[{name:"Product",content:qn,childItems:yr,segments:["/home","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:ei,childItems:Bn,segments:["/solutions","/sdks"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Resources",content:Qn,childItems:wr,segments:["/docs","/help","/brand","/blog","/changelog"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],ti=i("relative group/item flex items-center 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 t8({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=lu();t&&(o=t);let a=uu(),c=Ka(40),s=cu(),{data:l,isLoading:u}=mu(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return F(bo.Provider,{value:{theme:e},children:F(su,{id:a,children:ut("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[F("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),F(Nr,{className:i("relative",r),children:ut("div",{className:"flex h-14 items-center justify-between",children:[F("div",{className:"grow basis-0",children:F(Lt,{className:"block w-fit py-2 pr-2",href:z("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:F(Sr,{})})}),ut(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[F(ue.List,{className:"group relative z-0 flex",children:xo.map(({name:d,href:n,segments:m,content:f})=>{let b=m.some(v=>s==null?void 0:s.startsWith(v));return ut(ue.Item,{children:[F(fu,{trigger:!!f,children:n!==void 0?F(Lt,{id:`nav-${n}`,href:z(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:ti,"data-active":b,children:d}):ut("button",{className:ti,"data-active":b,children:[d,F(pu,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),f&&F(ue.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:F(f,{domain:o})})]},d)})}),F("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:F(ue.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-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]")})})]}),F("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:l&&Object.keys(l).length>0?F(Lt,{href:Ce,className:i(se({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"}):u?null:ut(gu,{children:[F(Lt,{href:"https://app.dub.co/login",className:i(se({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"}),F(Lt,{href:"https://app.dub.co/register",className:i(se({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 pu(e){return F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:F("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function fu({trigger:e,children:t}){return e?F(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as hu,Menu as vu,X as bu}from"lucide-react";import mt from"next/link";import{useParams as wo}from"next/navigation";import{useEffect as xu,useState as oi}from"react";import yu from"swr";import{Fragment as Cu,jsx as O,jsxs as Le}from"react/jsx-runtime";function f8({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=wo();t&&(r=t);let[o,a]=oi(!1);xu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c}=yu(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return Le("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?O(yo,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):Le("div",{className:"flex gap-2 max-[280px]:hidden",children:[O(yo,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),O(yo,{href:`${Ce}/register`,children:"Sign Up"})]}),O("button",{onClick:()=>a(!o),className:i("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?O(bu,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):O(vu,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),O("nav",{className:i("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:Le("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[xo.map(({name:s,href:l,childItems:u},d)=>O(wu,{name:s,href:l,childItems:u,setOpen:a},d)),c&&Object.keys(c).length>0?O("li",{className:"py-3 min-[281px]:hidden",children:O(mt,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Le(Cu,{children:[O("li",{className:"py-3 min-[281px]:hidden",children:O(mt,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),O("li",{className:"py-3 min-[281px]:hidden",children:O(mt,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var wu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=wo(),[c,s]=oi(!1);return r?O("li",{className:"py-3",children:Le(Pe,{height:!0,children:[Le("button",{className:"flex w-full justify-between",onClick:()=>s(!c),children:[O("p",{className:"font-semibold",children:e}),O(hu,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&O("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((l,u)=>"items"in l?Le("div",{className:"grid grid-cols-1 gap-3",children:[O("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:l.label}),l.items.map((d,n)=>O(ri,{item:d,setOpen:o,size:"small"},n))]},u):O(ri,{item:l,setOpen:o},u))})]})}):t?O("li",{className:"py-3",children:O(mt,{href:z(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},ri=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:s="dub.co"}=wo();return Le(mt,{href:z(r,s,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:s,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[O("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:O(o,{className:i("size-5 text-neutral-700 grayscale",c==="small"&&"size-4")})}),Le("div",{children:[O("div",{className:"flex items-center gap-2",children:O("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&O("p",{className:"text-sm text-neutral-500",children:t})]})]})};function yo({variant:e,className:t,...r}){return O(mt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as ai}from"react/jsx-runtime";function ni({className:e}){return ai("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:ai("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 Z,jsxs as ii}from"react/jsx-runtime";var Au=`<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 Km from"next/image";import We from"next/link";import{useParams as jm}from"next/navigation";import{jsx as Fn}from"react/jsx-runtime";function Bn(e){return Fn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Fn("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 Pr=[{title:"Dub Links",description:"Short links with superpowers",icon:rt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:ot,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:tt,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Ft,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ia,href:"/integrations"}],o3=[{icon:qo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Yo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Bn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],vo=[{icon:ta,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:Qo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:Xo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ea,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:Jo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],$n=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:vo}],Sr=[{icon:oa,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ka,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:Ca,title:"About",description:"Company, values, and team",href:"/about"},{icon:va,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:aa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Pa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],Un=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Gn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],a3=[{name:"X (Twitter)",icon:Ut,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as nm}from"react/jsx-runtime";function Rr({className:e,children:t}){return nm("div",{className:s("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as He from"@radix-ui/react-popover";import{BoxSelect as Om,Home as zm,LayoutGrid as _m,Type as Vm}from"lucide-react";import{useParams as Hm}from"next/navigation";import{useCallback as Wm,useContext as Fm,useState as Bm}from"react";import{toast as $m}from"sonner";import{jsx as Kn}from"react/jsx-runtime";function xo({className:e}){return Kn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-10 w-10 text-black dark:text-white",e),children:Kn("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 me from"@radix-ui/react-navigation-menu";import{LayoutGroup as xm}from"framer-motion";import _t from"next/link";import{useParams as ym,usePathname as wm}from"next/navigation";import{createContext as Nm,useId as km}from"react";import Cm from"swr";import{Link as ti}from"@radix-ui/react-navigation-menu";import ri from"next/image";import oi from"next/link";import{Link2 as im}from"lucide-react";import{jsx as Z,jsxs as q}from"react/jsx-runtime";var jn={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},qe={name:"Danielle Wilson",email:"danielle@dub.co",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}};function Zn({className:e}){return q("div",{className:s("pointer-events-none relative size-full",e),children:[q("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 339 168",className:"h-auto w-full [mask-image:linear-gradient(90deg,transparent,black_10%,black_90%,transparent)]",children:[Z("path",{stroke:"#00BBA7",strokeWidth:"2",d:"m345 1-60.533 76.487a8 8 0 0 1-9.732 2.25l-25.53-12.241a8 8 0 0 0-9.214 1.657l-62.736 64.993a8 8 0 0 1-6.695 2.388L67.303 124.331a8 8 0 0 0-5.193 1.17L-3.166 166.5"}),Z("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Z("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),q("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[q("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[q("div",{className:"p-1.5",children:[q("div",{className:"bg-bg-subtle border-border-subtle text-content-default hidden items-center gap-2 rounded border p-2 text-xs font-medium leading-none sm:flex",children:[Z(im,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>q("div",{className:"flex items-center justify-between gap-2",children:[q("div",{className:"flex items-center gap-2",children:[Z("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:jn[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Wt(t)})]}),q("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",jn[t].value]})]},t))})]}),Z("div",{className:"relative",children:q("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[q("div",{className:"px-3 py-2.5",children:[q("div",{className:"flex justify-between gap-2",children:[Z("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:qe.avatarIndex*100+"%"}}),q("div",{className:"flex flex-col items-end gap-1",children:[q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z(fa,{className:"text-content-default size-3.5"}),qe.origin]}),q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z("img",{src:`https://flag.vercel.app/m/${qe.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),qe.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:qe.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:qe.email})]}),Z("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(qe.details).map(([t,r])=>q("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Z("span",{className:"text-content-muted truncate font-medium",children:t}),Z("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as sm}from"react";import{jsx as f,jsxs as de}from"react/jsx-runtime";function Yn(e){let t=sm();return de("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"300",height:"180",fill:"none",viewBox:"0 0 300 180",...e,className:s("pointer-events-none text-[var(--fg)] [--bg:white] [--border:#e5e5e5] [--fg:#171717] [--muted:#404040] dark:[--bg:black] dark:[--border:#fff3] dark:[--fg:#fffa] dark:[--muted:#fff7]",e.className),children:[de("defs",{children:[f("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),f("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),f("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),f("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 23c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[f("path",{d:"M84.47 26.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M82.05 24a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.14-1.13h3.98c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M106.87 23.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[f("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),f("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),f("path",{className:"fill-[var(--bg)]",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:f("path",{d:"m209.95 29.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),f("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 83c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[f("path",{d:"M126.47 86.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M124.05 84a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.13-1.13h3.99c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M148.87 83.66h-1.28a.85.85 0 0 0-.86.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[f("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),f("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:f("path",{d:"m215.95 89.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),f("path",{className:"fill-[var(--bg)]",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 143c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[f("path",{d:"M102.47 146.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M100.05 144a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.14 1.13-1.14h3.99c.48 0 .89.3 1.06.72"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M124.87 143.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[f("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),f("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:f("path",{d:"m212.95 149.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.17.17 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),de("defs",{children:[f("clipPath",{id:`${t}-b`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),f("clipPath",{id:`${t}-c`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),f("clipPath",{id:`${t}-d`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),f("clipPath",{id:`${t}-f`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),f("clipPath",{id:`${t}-g`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),f("clipPath",{id:`${t}-h`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),f("clipPath",{id:`${t}-j`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),f("clipPath",{id:`${t}-k`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),f("clipPath",{id:`${t}-l`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),de("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as cm,jsx as Me,jsxs as Ot}from"react/jsx-runtime";var lm=[{name:"Lauren Anderson",country:"US",revenue:1800,payouts:550},{name:"Mia Taylor",country:"US",revenue:22600,payouts:6800},{name:"Sophie Laurent",country:"CA",revenue:11e3,payouts:3300},{name:"Hiroshi Tanaka",country:"JP",revenue:19200,payouts:5700},{name:"Elias Weber",country:"DE",revenue:783,payouts:235},{name:"Liam Carter",country:"US",revenue:3e4,payouts:9200}];function qn({className:e}){return Me("div",{className:s("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Me("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:lm.map((t,r)=>Me("div",{className:"h-[60px] w-[180px] p-[3px]",children:Me("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Ot(cm,{children:[Me("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-r%14)*100+"%"}},r),Ot("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ot("div",{className:"flex items-center gap-1.5",children:[Me("img",{alt:"US Flag",src:`https://flag.vercel.app/m/${t.country}.svg`,className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),Me("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Me("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Ot("div",{className:s("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:Wt(o)}),Ot("span",{className:"text-content-default text-[9px] font-medium",children:["$",et(t[o])]})]},o))})]})]})})},r))})})}import{Link as Xn}from"@radix-ui/react-navigation-menu";import Jn from"next/link";import{jsx as we,jsxs as Tr}from"react/jsx-runtime";var yo="text-xs uppercase text-neutral-500 dark:text-white/60",dm="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",Ne=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Qn({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...l}){return we(Xn,{asChild:!0,children:we(Jn,{className:s(dm,a),...l,children:Tr("div",{className:"flex items-center justify-between gap-3",children:[e,Tr("div",{className:"flex-1",children:[we("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&we("p",{className:s("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&we($o,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function ei({icon:e,title:t,description:r,iconClassName:o,...a}){return we(Xn,{asChild:!0,children:we(Jn,{...a,className:"group relative flex flex-col justify-center 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:Tr("div",{className:"flex items-center justify-between px-5 py-4",children:[Tr("div",{children:[we("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),we("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),we(e,{className:s("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as O,jsxs as zt}from"react/jsx-runtime";var mm=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(rt,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/home",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:O(Yn,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:O(tt,{className:"size-2.5 text-green-900"})}),title:"Dub Analytics",description:"Powerful analytics delivered instantly.",href:"/analytics",color:"#36D78F",graphicsContainerClassName:"h-[170%] bottom-0 top-[unset]",graphic:O(Zn,{className:"absolute bottom-0 left-0 size-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:O(ot,{className:"size-2.5 text-violet-900"})}),title:"Dub Partners",description:"Grow your revenue on auto-pilot with partnerships.",href:"/partners",color:"#818cf8",graphicsContainerClassName:"pl-2",graphic:O(qn,{})}],um=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:O("div",{className:"absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:O(ri,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:O("div",{className:"absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60",children:O(ri,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function ai({domain:e}){return zt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:mm.map(({title:t,description:r,icon:o,href:a,color:c,graphicsContainerClassName:l,graphic:i})=>O(ti,{asChild:!0,children:zt(oi,{href:_(a,e,Ne({domain:e,utm_content:t})),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:[O(Et,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),zt("div",{className:"relative p-5 pb-0",children:[o,O("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),O("div",{className:"relative mt-10 h-40 grow",children:O("div",{className:s("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",l),children:O("div",{className:"relative size-full",children:i})})}),O("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":c}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:um.map(({title:t,description:r,href:o,graphic:a})=>O(ti,{asChild:!0,children:zt(oi,{href:_(o,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col justify-center 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:[O(Et,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),O("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),O("div",{className:"relative flex items-center justify-between px-5 py-4",children:zt("div",{children:[O("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as ii}from"@radix-ui/react-navigation-menu";import fm from"next/image";import si from"next/link";import{useId as pm}from"react";import{jsx as y,jsxs as pt}from"react/jsx-runtime";function ni({className:e,...t}){let r=pm();return pt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:s("",e),...t,children:[y("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),pt("g",{opacity:"0.5",children:[y("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:y("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),y("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:y("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),y("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:y("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),y("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),y("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),pt("defs",{children:[pt("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#fff",stopOpacity:"0"}),y("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),pt("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#5B5B5B"}),y("stop",{offset:"1",stopColor:"#757575"})]}),pt("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[y("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),y("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),y("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),y("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),y("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"}),y("feOffset",{dx:"-0.991",dy:"0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),y("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),y("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"}),y("feOffset",{dx:"0.991",dy:"-0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),y("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),y("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as ee,jsxs as Xe}from"react/jsx-runtime";var gm=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function li({domain:e}){return Xe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ee("div",{className:"grid grid-cols-2 gap-4 p-4",children:gm.map(({title:t,description:r,thumbnail:o,href:a})=>ee(ii,{asChild:!0,children:Xe(si,{href:_(a,e,Ne({domain:e,utm_content:t})),className:s("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[Xe("div",{className:"p-5 pb-0",children:[ee("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),ee("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ee("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:ee("div",{className:s("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:ee(fm,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)},t))}),Xe("div",{className:"flex flex-col gap-4 p-4",children:[Sr.filter(({title:t})=>!["Docs","Help Center","Dub Brand"].includes(t)).map(({title:t,description:r,icon:o,href:a})=>ee(ei,{title:t,description:r,icon:o,iconClassName:"size-5",href:_(a,e,Ne({domain:e,utm_content:t}))},t)),ee(ii,{asChild:!0,children:Xe(si,{href:_("/brand",e,Ne({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[Xe("div",{className:"pointer-events-none absolute inset-0",children:[ee("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:ee("div",{className:s("absolute inset-0 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)]")})}),ee(ni,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),ee("div",{className:"relative flex items-center justify-between px-5 py-4",children:Xe("div",{children:[ee("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),ee("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})]})]})}import{Link as hm}from"@radix-ui/react-navigation-menu";import bm from"next/link";import{jsx as te,jsxs as ft}from"react/jsx-runtime";var vm=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function ci({domain:e}){return ft("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ft("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:s(yo,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:vm.map(({icon:t,title:r,description:o,href:a})=>te(hm,{asChild:!0,children:ft(bm,{href:_(a,e,Ne({domain:e,utm_content:r})),className:s("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[ft("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[te("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:te(Et,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),te("div",{className:s("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),te(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ft("div",{className:"relative",children:[te("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),te("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ft("div",{className:"px-6 py-4",children:[te("p",{className:s(yo,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:vo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Qn,{className:"-mx-2",href:_(a,e,Ne({domain:e,utm_content:o})),icon:te("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:te(t,{className:s("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Rm,jsx as F,jsxs as gt}from"react/jsx-runtime";var wo=Nm({theme:"light"}),No=[{name:"Product",content:ai,childItems:Pr,segments:["/home","/partners","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:ci,childItems:$n,segments:["/solutions","/sdks"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Resources",content:li,childItems:Sr,segments:["/docs","/help","/brand","/blog","/changelog"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],di=s("relative group/item flex items-center 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 x6({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=ym();t&&(o=t);let a=km(),c=Xa(40),l=wm(),{data:i,isLoading:m}=Cm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return F(wo.Provider,{value:{theme:e},children:F(xm,{id:a,children:gt("div",{className:s("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[F("div",{className:s("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),F(Rr,{className:s("relative",r),children:gt("div",{className:"flex h-14 items-center justify-between",children:[F("div",{className:"grow basis-0",children:F(_t,{className:"block w-fit py-2 pr-2",href:_("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:F(Lr,{})})}),gt(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[F(me.List,{className:"group relative z-0 flex",children:No.map(({name:d,href:n,segments:u,content:p})=>{let v=u.some(b=>l==null?void 0:l.startsWith(b));return gt(me.Item,{children:[F(Sm,{trigger:!!p,children:n!==void 0?F(_t,{id:`nav-${n}`,href:_(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:di,"data-active":v,children:d}):gt("button",{className:di,"data-active":v,children:[d,F(Pm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&F(me.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:F(p,{domain:o})})]},d)})}),F("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:F(me.Viewport,{className:s("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-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]")})})]}),F("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:i&&Object.keys(i).length>0?F(_t,{href:ke,className:s(ie({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"}):m?null:gt(Rm,{children:[F(_t,{href:"https://app.dub.co/login",className:s(ie({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"}),F(_t,{href:"https://app.dub.co/register",className:s(ie({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 Pm(e){return F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:F("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Sm({trigger:e,children:t}){return e?F(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Tm,Menu as Lm,X as Mm}from"lucide-react";import ht from"next/link";import{useParams as Po}from"next/navigation";import{useEffect as Dm,useState as ui}from"react";import Im from"swr";import{Fragment as Am,jsx as L,jsxs as De}from"react/jsx-runtime";var ko={"Dub Links":L("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:L(rt,{className:"size-3 text-orange-900"})}),"Dub Partners":L("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:L(ot,{className:"size-3 text-violet-900"})}),"Dub Analytics":L("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:L(tt,{className:"size-3 text-green-900"})}),"Dub API":L("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:L(Ft,{className:"size-3 text-neutral-900"})})};function A6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Po();t&&(r=t);let[o,a]=ui(!1);Dm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c}=Im(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:s("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?L(Co,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):De("div",{className:"flex gap-2 max-[280px]:hidden",children:[L(Co,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),L(Co,{href:`${ke}/register`,children:"Sign Up"})]}),L("button",{onClick:()=>a(!o),className:s("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?L(Mm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):L(Lm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),L("nav",{className:s("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:De("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[No.map(({name:l,href:i,childItems:m},d)=>L(Em,{name:l,href:i,childItems:m,setOpen:a},d)),c&&Object.keys(c).length>0?L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(Am,{children:[L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Em=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Po(),[c,l]=ui(!1);return r?L("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>l(!c),children:[L("p",{className:"font-semibold",children:e}),L(Tm,{className:s("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&L("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((i,m)=>"items"in i?De("div",{className:"grid grid-cols-1 gap-3",children:[L("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:i.label}),i.items.map((d,n)=>L(mi,{item:d,setOpen:o,size:"small"},n))]},m):L(mi,{item:i,setOpen:o},m))})]})}):t?L("li",{className:"py-3",children:L(ht,{href:_(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},mi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:l="dub.co"}=Po(),i=ko==null?void 0:ko[e];return De(ht,{href:_(r,l,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:l,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[L("div",{className:s("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:i??L(o,{className:s("size-5 text-neutral-700 grayscale",c==="small"&&"size-4")})}),De("div",{children:[L("div",{className:"flex items-center gap-2",children:L("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&L("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Co({variant:e,className:t,...r}){return L(ht,{...r,className:s("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as pi}from"react/jsx-runtime";function fi({className:e}){return pi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:pi("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 gi}from"react/jsx-runtime";var Um=`<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>`,Du=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
50
+ </svg>`,Gm=`<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 Sr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Mu(),{theme:a}=Tu(bo),[c,s]=Lu(!1),l=Ru(n=>{n.preventDefault(),s(!0)},[]),[,u]=et();function d(n){Eu.promise(u(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return ii(He.Root,{open:c,onOpenChange:s,children:[Z(He.Anchor,{asChild:!0,children:Z("div",{onContextMenu:l,className:"max-w-fit",children:e==="full"?Z(ni,{className:r}):Z(ho,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Z(He.Portal,{children:Z(He.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),s(!1)},children:ii("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Z(Et,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Au),icon:Z(ho,{className:"h-4 w-4"})}),Z(Et,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Du),icon:Z(Su,{strokeWidth:2,className:"h-4 w-4"})}),Z(Et,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Z(Nu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Z(Et,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Z(ku,{strokeWidth:2,className:"h-4 w-4"})}):Z(Et,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Z(Pu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Et({className:e,...t}){return Z(le,{className:i("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as E,jsxs as U}from"react/jsx-runtime";var Ou=[{name:"Twitter",icon:_t,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Ht,href:"https://www.youtube.com/@dubdotco"}],pt={product:[...yr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:Cr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Wn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Oo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},ft="text-sm font-medium text-neutral-900",gt="flex flex-col mt-2.5 gap-3.5",Ze="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function B8({staticDomain:e,className:t}){let{domain:r="dub.co"}=zu();return e&&(r=e),E(Nr,{className:i("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:U("footer",{children:[U("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[U("div",{className:"flex flex-col gap-6",children:[E("div",{className:"grow",children:U(Ve,{href:z("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[U("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),E(Sr,{className:"h-8 text-neutral-800"})]})}),E("div",{className:"flex items-center gap-3",children:Ou.map(({name:o,icon:a,href:c})=>U("a",{href:c,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))})]}),U("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[U("div",{className:"md:grid md:grid-cols-2",children:[U("div",{className:"grid gap-8",children:[U("div",{children:[E("h3",{className:ft,children:"Product"}),E("ul",{role:"list",className:gt,children:pt.product.map(o=>E("li",{children:E(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Ze,children:o.name})},o.name))})]}),U("div",{children:[E("h3",{className:ft,children:"Solutions"}),E("ul",{role:"list",className:gt,children:pt.solutions.map(o=>E("li",{children:E(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Ze,children:o.name})},o.name))})]})]}),U("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:ft,children:"Resources"}),E("ul",{role:"list",className:gt,children:pt.resources.map(o=>E("li",{children:U(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Ze,children:[o.name,o.target&&E(Dr,{className:"size-3.5"})]})},o.name))})]})]}),U("div",{className:"md:grid md:grid-cols-2",children:[U("div",{className:"grid gap-8",children:[U("div",{children:[E("h3",{className:ft,children:"Compare"}),E("ul",{role:"list",className:gt,children:pt.compare.map(o=>E("li",{children:E(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Ze,children:o.name})},o.name))})]}),U("div",{children:[E("h3",{className:ft,children:"Legal"}),U("ul",{role:"list",className:gt,children:[pt.legal.map(o=>E("li",{children:E(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Ze,children:o.name})},o.name)),E("li",{children:U("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Ze,children:["Trust Center ",E(Dr,{className:"size-3.5"})]})})]})]})]}),U("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:ft,children:"Tools"}),E("ul",{role:"list",className:gt,children:pt.tools.map(o=>E("li",{children:E(Ve,{href:z(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Ze,children:o.name})},o.name))})]})]})]})]}),U("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[E(nn,{}),E(Ve,{href:z("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:E(Iu,{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"})}),U("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as _u,motion as Hu}from"framer-motion";import{useEffect as Vu,useState as Bu}from"react";import{jsx as si}from"react/jsx-runtime";var li=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=Bu(!1);Vu(()=>{c(!0)},[]);let s=r?Hu.div:"div";return si(_u,{children:a?si(s,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Wu}from"class-variance-authority";import{toast as Fu}from"sonner";import{jsx as Co,jsxs as Gu}from"react/jsx-runtime";var Uu=Wu("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function J8({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,s]=et(),l=o||_o;return Gu("button",{onClick:u=>{u.stopPropagation(),Fu.promise(s(t),{success:a||"Copied to clipboard!"})},className:i(Uu({variant:e}),r),type:"button",children:[Co("span",{className:"sr-only",children:"Copy"}),c?Co(Uo,{className:"h-3.5 w-3.5"}):Co(l,{className:"h-3.5 w-3.5"})]})}import{toast as $u}from"sonner";import{jsx as Ku}from"react/jsx-runtime";function o6({value:e,children:t,className:r,successMessage:o}){let[a,c]=et();return Ku("button",{onClick:s=>{s.stopPropagation(),$u.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as ju,jsxs as Yu}from"react/jsx-runtime";function n6({icon:e,text:t}){return Yu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,ju("p",{className:"truncate text-sm",children:t})]})}import{jsx as qu}from"react/jsx-runtime";var s6=({children:e})=>qu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as No}from"react/jsx-runtime";function m6({apexDomain:e,className:t,imageProps:r}){return e?No(Tt,{src:`${It}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):No("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:No(ha,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as ci}from"lucide-react";import{useSearchParams as Zu}from"next/navigation";import{useEffect as Xu,useMemo as Ju,useRef as Qu}from"react";import em from"swr";import{useDebounce as tm}from"use-debounce";import{Fragment as di,jsx as Y,jsxs as Be}from"react/jsx-runtime";function C6({defaultUrl:e}){let t=Zu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=tm(Do(r),500),a=Ju(()=>Io(o||""),[o]),{data:c,isValidating:s}=em(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:l,description:u,image:d}=c||{},n=Qu(null);Xu(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:m}=q();return Be(di,{children:[!e&&Be("div",{className:"relative flex items-center",children:[Y(ci,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Y("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!m,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),Be("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[s&&Y("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:Y(xt,{})}),d?Y("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Be("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[Y(Bo,{className:"h-8 w-8 text-neutral-400"}),Y("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Be("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?Y("p",{className:"text-sm text-[#536471]",children:a}):Y("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),l?Y("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:l}):Y("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),u?Y("p",{className:"line-clamp-2 text-sm text-[#536471]",children:u}):Be("div",{className:"grid gap-2",children:[Y("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),Y("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function N6({defaultUrl:e}){return Be(di,{children:[Be("div",{className:"relative flex items-center",children:[Y(ci,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Y("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),Y("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:Y("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:Y(xt,{})})})]})}import{AnimatePresence as rm}from"framer-motion";import ui from"js-cookie";import{createContext as om,useState as am}from"react";import{jsx as ko}from"react/jsx-runtime";var nm=om({hidePopup:()=>{}});function L6({children:e,hiddenCookieId:t}){let[r,o]=am(ui.get(t)==="1"),a=()=>{o(!0),ui.set(t,"1")};return ko(li,{children:ko(nm.Provider,{value:{hidePopup:a},children:ko(rm,{children:!r&&e})})})}import{motion as im}from"framer-motion";import{jsx as mi}from"react/jsx-runtime";function I6({value:e=0,max:t=100,className:r}){return mi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:mi(im.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 fi}from"class-variance-authority";import{LayoutGroup as sm,motion as lm}from"framer-motion";import cm from"next/link";import{useId as dm}from"react";import{jsx as At,jsxs as pi}from"react/jsx-runtime";var um=fi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),mm=fi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function $6({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=dm();return At("div",{className:i("flex text-sm",a),children:At(sm,{id:c,children:t.map(({id:s,label:l,href:u,target:d})=>{let n=s===r;return pi(u?cm:"div",{className:"relative",href:u??"#",target:d??void 0,children:[pi("button",{type:"button",...o&&!u&&{onClick:()=>o(s)},className:i(um({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[l,d==="_blank"&&At(Xo,{className:"size-2.5"})]}),n&&At(lm.div,{layoutId:"indicator",transition:{duration:.1},className:mm({variant:e}),children:At("div",{className:"h-0.5 rounded-t-full bg-current"})})]},s)})})})}import{jsx as Po,jsxs as gi}from"react/jsx-runtime";var pm=[{icon:Ra,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ca,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ca,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Ma,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:wa,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function Y6(){return gi("div",{className:"p-3",children:[Po("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Po("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:pm.map(({text:e,icon:t,href:r})=>gi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Po(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as hi,jsxs as fm}from"react/jsx-runtime";function X6({className:e}){return fm("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[hi("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"}),hi("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{Vr as AUTOPLAY_DEFAULT_DELAY,mg as Accordion,Ni as AccordionContent,wi as AccordionItem,Ci as AccordionTrigger,Y6 as AdvancedLinkFeaturesTooltip,Im as Africa,Km as Airtm,Mi as Alert,Ti as AlertDescription,Ri as AlertTitle,Bm as Amazon,Jm as AndroidLogo,Pe as AnimatedSizeContainer,Qm as AppleLogo,ep as ArrowBoldUp,tp as ArrowRight,rp as ArrowTrendUp,op as ArrowTurnLeft,ap as ArrowTurnRight2,Xo as ArrowUpRight,np as ArrowsOppositeDirectionY,zm as Asia,yo as AuthButton,yg as Avatar,W4 as Background,Yt as Badge,ip as BadgeCheck,sp as BadgeCheck2Fill,Wg as BadgeTooltip,lp as Blog,Tt as BlurImage,cp as Bolt,dp as BoltFill,mp as Book2,Jo as Book2Fill,pp as Book2Small,up as BookOpen,fp as Books2,gp as BoxArchive,hp as BulletList,Qo as BulletListFill,le as Button,Fg as ButtonTooltip,Cr as COMPARE_PAGES,Vn as CUSTOMER_STORIES,Qa as Calendar,yp as Calendar6,bp as CalendarDays,vp as CalendarIcon,xp as CalendarRefresh,Lm as CardAmex,Em as CardDiscover,m1 as CardList,Am as CardMastercard,Dm as CardVisa,wp as Cards,Cp as CaretUpFill,is as Carousel,ss as CarouselContent,ls as CarouselItem,L1 as CarouselNavBar,ds as CarouselNext,cs as CarouselPrevious,B1 as CarouselThumbnail,V1 as CarouselThumbnails,jm as CashApp,Np as ChartActivity2,kp as ChartArea2,Pp as ChartLine,Wm as ChatGPT,ea as Check,ta as Check2,ws as Checkbox,ra as CheckboxCheckedFill,oa as CheckboxUnchecked,aa as CircleCheck,Sp as CircleCheckFill,Mp as CircleDollar,Rp as CircleDotted,na as CircleHalfDottedCheck,ia as CircleHalfDottedClock,sa as CircleInfo,Tp as CirclePercentage,Lp as CirclePlay,Ep as CirclePlayFill,Ap as CircleQuestion,Dp as CircleUser,Ar as CircleWarning,Ip as CircleXmark,zp as Circles,Op as Circles3,li as ClientOnly,la as CloudUpload,_p as Code,Hp as ColorPalette2,Ev as Combobox,X6 as CompositeLogo,Vp as ConnectedDots,Bp as ConnectedDots4,Vt as ConnectedDotsFill,Wp as Connections3,_o as Copy,J8 as CopyButton,o6 as CopyText,Fp as CreditCard,Up as Crosshairs3,Gp as Crown,gm as CrownSmall,$p as Cube,Kp as CubeSettings,Bt as CubeSettingsFill,jp as CurrencyDollar,Yp as CursorRays,qp as DatabaseKey,Gr as DatePickerContext,gb as DateRangePicker,Zp as Desktop,Xp as DiamondTurnRight,Wt as DiamondTurnRightFill,Jp as Directions,Qp as Discount,e0 as Dots,t0 as Download,hm as DubAnalyticsIcon,vm as DubCraftedShield,bm as DubLinksIcon,xm as DubPartnersIcon,nn as DubStatusBadge,r0 as Duplicate,qt as DynamicTooltipWrapper,ca as Earth,o0 as EarthPosition,Mb as EmptyState,a0 as Envelope,n0 as EnvelopeAlert,i0 as EnvelopeArrowRight,Om as Europe,Ho as ExpandingArrow,da as Eye,ua as EyeSlash,yr as FEATURES_LIST,Cm as Facebook,ma as FeatherFill,Fm as Figma,s0 as FileContent,Hb as FileUpload,l0 as FileZip2,d2 as Filter,d0 as Filter2,c0 as FilterBars,m0 as Flag2,pa as Flag6,u0 as FlagWavy,p0 as Flask,f0 as FlaskSmall,g0 as Folder,y0 as Folder5,h0 as FolderBookmark,v0 as FolderLock,b0 as FolderPlus,x0 as FolderShield,B8 as Footer,v2 as Form,w0 as GamingConsole,C0 as Gauge6,N0 as Gear,k0 as Gear2,P0 as Gear3,S0 as Gem,fa as Gift,M0 as GiftFill,Um as GitHubEnhanced,zt as Github,R0 as Globe,ha as Globe2,ga as GlobePointer,T0 as GlobeSearch,Ko as Go,Nm as Google,Gm as GoogleEnhanced,L0 as GreekTemple,bn as Grid,E0 as GridIcon,A0 as GridLayoutRows,D0 as GridPlus,I0 as Headset,va as HeadsetFill,ba as HeartFill,xa as HexadecagonStar,z0 as History,ya as Hyperlink,n6 as IconMenu,O0 as Icosahedron,wa as Incognito,Vg as InfoTooltip,s6 as InlineSnippet,Mc as Input,_0 as InputPassword,Ca as InputPasswordPointer,Na as InputSearch,j2 as InputSelect,km as Instagram,H0 as InvoiceDollar,V0 as Key,Va as KeyboardShortcutContext,xh as KeyboardShortcutProvider,Wn as LEGAL_PAGES,jc as Label,B0 as LayoutSidebar,W0 as License,ka as LinesY,U0 as Link4,F0 as LinkBroken,m6 as LinkLogo,C6 as LinkPreview,N6 as LinkPreviewPlaceholder,Ot as LinkedIn,Hg as LinkifyTooltipContent,xt as LoadingCircle,wm as LoadingDots,Ne as LoadingSpinner,G0 as LocationPin,$0 as LockFill,ho as Logo,Vo as Magic,K0 as Magnifier,j0 as MapPosition,Y0 as MarketingTarget,ym as MatrixLines,Nr as MaxWidthWrapper,q0 as Menu3,nx as MenuItem,Z0 as MessageSmile,Ft as MicrophoneFill,gx as MiniAreaChart,X0 as MobilePhone,wx as Modal,J0 as MoneyBill,Q0 as MoneyBill2,ef as MoneyBills2,tf as Msgs,t8 as Nav,bo as NavContext,f8 as NavMobile,Sr as NavWordmark,_m as NorthAmerica,rf as Note,uf as NucleoPhoto,Bg as NumberTooltip,Hm as Oceania,of as OfficeBuilding,ig as PLAN_FEATURE_ICONS,Pa as Page2,kx as PaginationControls,af as Paintbrush,nf as Palette2,sf as PaperPlane,Ym as Payoneer,qm as Paypal,cf as Pen2,lf as PenWriting,df as PercentageArrowDown,Bo as Photo,jo as Php,mf as Plug2,Ut as Plus,ot as Popover,L6 as Popup,nm as PopupContext,pf as Post,Pm as Prisma,Go as ProductHunt,I6 as ProgressBar,ff as Pyramid,Yo as Python,gf as QRCode,wr as RESOURCES,md as RadioGroup,pd as RadioGroupItem,$o as Raycast,hf as Receipt2,Dr as ReferredVia,vf as Refresh2,bf as Robot,qo as Ruby,go as SDKS,K4 as SOCIAL_LINKS,Bn as SOLUTIONS,Sa as SatelliteDish,xf as ScanText,yf as Scribble,Ax as Sheet,wf as ShieldAlert,Cf as ShieldCheck,Nf as ShieldKeyhole,kf as ShieldSlash,Pf as ShieldUser,Ox as ShimmerDots,Sf as Shuffle,_g as SimpleTooltipContent,Sm as Slack,Mf as Sliders,Bx as SmartDateTimePicker,Wo as SortOrder,Vm as SouthAmerica,Rf as Sparkle3,$m as Spotify,Tf as SquareChart,Lf as SquareLayoutGrid5,Ef as SquareLayoutGrid6,Af as SquareXmark,Df as Stars2,jx as StatusBadge,Zm as StripeLink,Fo as Success,t4 as Switch,Ff as TV,$6 as TabSelect,S4 as Table,If as TableIcon,zf as TableRows2,Of as Tablet,_f as Tag,Hf as Tags,Uo as Tick,Mm as TikTok,Ma as Timer2,Rm as Tinybird,Vf as Toggle2Fill,E4 as ToggleGroup,wg as TokenAvatar,J as Tooltip,Og as TooltipContent,zg as TooltipProvider,Bf as Trash,Wf as TriangleWarning,_t as Twitter,Zo as Typescript,V4 as UTMBuilder,qd as UTM_PARAMETERS,Uf as UiCard,Tm as Unsplash,Gf as User,$f as UserCheck,Kf as UserCrown,jf as UserDelete,Yf as UserPlus,qf as Users,Xf as Users2,Jf as Users6,Gt as UsersFill,Zf as UsersSettings,Xm as Venmo,Qf as Versions2,Ra as Views,eg as Watch,tg as Webhook,rg as Window,og as WindowSearch,ag as WindowSettings,ni as Wordmark,ng as Xmark,Ht as YouTube,Ii as badgeVariants,se as buttonVariants,Ai as getUserAvatarUrl,xo as navItems,Ld as statusBadgeVariants,ve as useCarousel,za as useCarouselActiveIndex,j1 as useCookies,et as useCopyToClipboard,J1 as useCurrentAnchor,rh as useEnterSubmit,ih as useInViewport,ch as useInputFocused,ph as useIntersectionObserver,tt as useKeyboardShortcut,Ch as useLocalStorage,q as useMediaQuery,Mh as useOptimisticUpdate,Vh as usePagination,Fh as useRemoveGAParams,Xt as useResizeObserver,Ua as useRouterStuff,Ka as useScroll,Ae as useScrollProgress,P4 as useTable,Fa as useTablePagination,rv as useToastWithUndo};
52
+ </svg>`;function Lr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Hm(),{theme:a}=Fm(wo),[c,l]=Bm(!1),i=Wm(n=>{n.preventDefault(),l(!0)},[]),[,m]=it();function d(n){$m.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return gi(He.Root,{open:c,onOpenChange:l,children:[Y(He.Anchor,{asChild:!0,children:Y("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Y(fi,{className:r}):Y(xo,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Y(He.Portal,{children:Y(He.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),l(!1)},children:gi("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Y(Vt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Um),icon:Y(xo,{className:"h-4 w-4"})}),Y(Vt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Gm),icon:Y(Vm,{strokeWidth:2,className:"h-4 w-4"})}),Y(Vt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(Om,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(Vt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(zm,{strokeWidth:2,className:"h-4 w-4"})}):Y(Vt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(_m,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Vt({className:e,...t}){return Y(se,{className:s("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as D,jsxs as B}from"react/jsx-runtime";var Zm=[{name:"Twitter",icon:Ut,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}],bt={product:[...Pr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:Un.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Gn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Fo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},vt="text-sm font-medium text-neutral-900",xt="flex flex-col mt-2.5 gap-3.5",Je="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function i5({staticDomain:e,className:t}){let{domain:r="dub.co"}=jm();return e&&(r=e),D(Rr,{className:s("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:[D("div",{className:"grow",children:B(We,{href:_("/",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"]}),D(Lr,{className:"h-8 text-neutral-800"})]})}),D("div",{className:"flex items-center gap-3",children:Zm.map(({name:o,icon:a,href:c})=>B("a",{href:c,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[D("span",{className:"sr-only",children:o}),D(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",{className:"grid gap-8",children:[B("div",{children:[D("h3",{className:vt,children:"Product"}),D("ul",{role:"list",className:xt,children:bt.product.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),B("div",{children:[D("h3",{className:vt,children:"Solutions"}),D("ul",{role:"list",className:xt,children:bt.solutions.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),B("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:vt,children:"Resources"}),D("ul",{role:"list",className:xt,children:bt.resources.map(o=>D("li",{children:B(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Je,children:[o.name,o.target&&D(zr,{className:"size-3.5"})]})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[D("h3",{className:vt,children:"Compare"}),D("ul",{role:"list",className:xt,children:bt.compare.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),B("div",{children:[D("h3",{className:vt,children:"Legal"}),B("ul",{role:"list",className:xt,children:[bt.legal.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),D("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",D(zr,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:vt,children:"Tools"}),D("ul",{role:"list",className:xt,children:bt.tools.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(mn,{}),D(We,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:D(Km,{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."]})]})]})})}import{AnimatePresence as Ym,motion as qm}from"framer-motion";import{useEffect as Xm,useState as Jm}from"react";import{jsx as hi}from"react/jsx-runtime";var bi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=Jm(!1);Xm(()=>{c(!0)},[]);let l=r?qm.div:"div";return hi(Ym,{children:a?hi(l,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Qm}from"class-variance-authority";import{toast as eu}from"sonner";import{jsx as So,jsxs as ru}from"react/jsx-runtime";var tu=Qm("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function v5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,l]=it(),i=o||Bo;return ru("button",{onClick:m=>{m.stopPropagation(),eu.promise(l(t),{success:a||"Copied to clipboard!"})},className:s(tu({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),c?So(Zo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as ou}from"sonner";import{jsx as au}from"react/jsx-runtime";function k5({value:e,children:t,className:r,successMessage:o}){let[a,c]=it();return au("button",{onClick:l=>{l.stopPropagation(),ou.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:s("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as nu,jsxs as iu}from"react/jsx-runtime";function P5({icon:e,text:t}){return iu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,nu("p",{className:"truncate text-sm",children:t})]})}import{jsx as su}from"react/jsx-runtime";var R5=({children:e})=>su("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Ro}from"react/jsx-runtime";function I5({apexDomain:e,className:t,imageProps:r}){return e?Ro(At,{src:`${Ho}${e}`,alt:e,className:s("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Ro("div",{className:s("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Ro(Na,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as vi}from"lucide-react";import{useSearchParams as lu}from"next/navigation";import{useEffect as cu,useMemo as du,useRef as mu}from"react";import uu from"swr";import{useDebounce as pu}from"use-debounce";import{Fragment as xi,jsx as K,jsxs as Fe}from"react/jsx-runtime";function B5({defaultUrl:e}){let t=lu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=pu(_o(r),500),a=du(()=>Vo(o||""),[o]),{data:c,isValidating:l}=uu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=c||{},n=mu(null);cu(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return Fe(xi,{children:[!e&&Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!u,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),Fe("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[l&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(kt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Fe("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(Go,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Fe("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),i?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:i}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Fe("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function $5({defaultUrl:e}){return Fe(xi,{children:[Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(kt,{})})})]})}import{AnimatePresence as fu}from"framer-motion";import yi from"js-cookie";import{createContext as gu,useState as hu}from"react";import{jsx as To}from"react/jsx-runtime";var bu=gu({hidePopup:()=>{}});function q5({children:e,hiddenCookieId:t}){let[r,o]=hu(yi.get(t)==="1"),a=()=>{o(!0),yi.set(t,"1")};return To(bi,{children:To(bu.Provider,{value:{hidePopup:a},children:To(fu,{children:!r&&e})})})}import{motion as vu}from"framer-motion";import{jsx as wi}from"react/jsx-runtime";function ey({value:e=0,max:t=100,className:r}){return wi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:wi(vu.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 ki}from"class-variance-authority";import{LayoutGroup as xu,motion as yu}from"framer-motion";import wu from"next/link";import{useId as Nu}from"react";import{jsx as Ht,jsxs as Ni}from"react/jsx-runtime";var ku=ki("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Cu=ki("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function my({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=Nu();return Ht("div",{className:s("flex text-sm",a),children:Ht(xu,{id:c,children:t.map(({id:l,label:i,href:m,target:d})=>{let n=l===r;return Ni(m?wu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ni("button",{type:"button",...o&&!m&&{onClick:()=>o(l)},className:s(ku({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Ht(ra,{className:"size-2.5"})]}),n&&Ht(yu.div,{layoutId:"indicator",transition:{duration:.1},className:Cu({variant:e}),children:Ht("div",{className:"h-0.5 rounded-t-full bg-current"})})]},l)})})})}import{jsx as Lo,jsxs as Ci}from"react/jsx-runtime";var Pu=[{icon:Ea,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ga,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ra,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Da,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Sa,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function fy(){return Ci("div",{className:"p-3",children:[Lo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Lo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Pu.map(({text:e,icon:t,href:r})=>Ci("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Lo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Pi,jsxs as Su}from"react/jsx-runtime";function by({className:e}){return Su("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:[Pi("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"}),Pi("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{Br as AUTOPLAY_DEFAULT_DELAY,k1 as Accordion,Ii as AccordionContent,Mi as AccordionItem,Di as AccordionTrigger,fy as AdvancedLinkFeaturesTooltip,$u as Africa,tp as Airtm,zi as Alert,Vi as AlertDescription,_i as AlertTitle,Yu as Amazon,sp as AndroidLogo,Se as AnimatedSizeContainer,lp as AppleLogo,cp as ArrowBoldUp,dp as ArrowRight,mp as ArrowTrendUp,up as ArrowTurnLeft,pp as ArrowTurnRight2,ra as ArrowUpRight,fp as ArrowsOppositeDirectionY,Uu as Asia,Co as AuthButton,D1 as Avatar,X4 as Background,Qt as Badge,gp as BadgeCheck,hp as BadgeCheck2Fill,J1 as BadgeTooltip,bp as Blog,At as BlurImage,vp as Bolt,xp as BoltFill,wp as Book2,oa as Book2Fill,Np as Book2Small,yp as BookOpen,kp as Books2,Cp as BoxArchive,Pp as BulletList,aa as BulletListFill,se as Button,Q1 as ButtonTooltip,Un as COMPARE_PAGES,o3 as CUSTOMER_STORIES,an as Calendar,Lp as Calendar6,Rp as CalendarDays,Sp as CalendarIcon,Tp as CalendarRefresh,Hu as CardAmex,Wu as CardDiscover,kg as CardList,Fu as CardMastercard,Bu as CardVisa,Mp as Cards,Dp as CaretUpFill,gs as Carousel,hs as CarouselContent,bs as CarouselItem,Fg as CarouselNavBar,xs as CarouselNext,vs as CarouselPrevious,Xg as CarouselThumbnail,qg as CarouselThumbnails,rp as CashApp,Ip as ChartActivity2,Ep as ChartArea2,Ap as ChartLine,qu as ChatGPT,na as Check,ia as Check2,Ms as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Op as CircleCheckFill,zp as CircleDollar,_p as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Vp as CirclePercentage,Hp as CirclePlay,Wp as CirclePlayFill,Fp as CircleQuestion,Bp as CircleUser,Or as CircleWarning,$p as CircleXmark,Up as Circles,Gp as Circles3,bi as ClientOnly,pa as CloudUpload,Kp as Code,jp as ColorPalette2,Bb as Combobox,by as CompositeLogo,Zp as ConnectedDots,qp as ConnectedDots4,Yp as ConnectedDotsFill,Xp as Connections3,Bo as Copy,v5 as CopyButton,k5 as CopyText,Jp as CreditCard,Qp as Crosshairs3,e0 as Crown,Ru as CrownSmall,t0 as Cube,r0 as CubeSettings,o0 as CubeSettingsFill,a0 as CurrencyDollar,fa as CursorRays,n0 as DatabaseKey,jr as DatePickerContext,Sv as DateRangePicker,i0 as Desktop,s0 as DiamondTurnRight,Kt as DiamondTurnRightFill,l0 as Directions,c0 as Discount,d0 as Dots,m0 as Download,tt as DubAnalyticsIcon,Ft as DubApiIcon,Tu as DubCraftedShield,rt as DubLinksIcon,ot as DubPartnersIcon,mn as DubStatusBadge,u0 as Duplicate,er as DynamicTooltipWrapper,ga as Earth,p0 as EarthPosition,Vv as EmptyState,f0 as Envelope,g0 as EnvelopeAlert,h0 as EnvelopeArrowRight,Gu as Europe,$o as ExpandingArrow,ha as Eye,ba as EyeSlash,Pr as FEATURES_LIST,Du as Facebook,va as FeatherFill,Xu as Figma,b0 as FileContent,Yv as FileUpload,v0 as FileZip2,y2 as Filter,y0 as Filter2,x0 as FilterBars,N0 as Flag2,xa as Flag6,w0 as FlagWavy,k0 as Flask,C0 as FlaskSmall,P0 as Folder,M0 as Folder5,S0 as FolderBookmark,R0 as FolderLock,T0 as FolderPlus,L0 as FolderShield,i5 as Footer,R2 as Form,D0 as GamingConsole,I0 as Gauge6,E0 as Gear,A0 as Gear2,O0 as Gear3,z0 as Gem,ya as Gift,_0 as GiftFill,Ju as GitHubEnhanced,Bt as Github,V0 as Globe,Na as Globe2,wa as GlobePointer,H0 as GlobeSearch,Xo as Go,Iu as Google,Qu as GoogleEnhanced,W0 as GreekTemple,Et as Grid,F0 as GridIcon,B0 as GridLayoutRows,$0 as GridPlus,U0 as Headset,ka as HeadsetFill,Ca as HeartFill,Pa as HexadecagonStar,G0 as History,K0 as Hyperlink,P5 as IconMenu,j0 as Icosahedron,Sa as Incognito,q1 as InfoTooltip,R5 as InlineSnippet,Oc as Input,Z0 as InputPassword,Ra as InputPasswordPointer,Ta as InputSearch,ox as InputSelect,Eu as Instagram,Y0 as InvoiceDollar,q0 as Key,Ua as KeyboardShortcutContext,Mh as KeyboardShortcutProvider,Gn as LEGAL_PAGES,td as Label,X0 as LayoutSidebar,J0 as License,Q0 as LinesY,tf as Link4,ef as LinkBroken,I5 as LinkLogo,B5 as LinkPreview,$5 as LinkPreviewPlaceholder,$t as LinkedIn,Y1 as LinkifyTooltipContent,kt as LoadingCircle,Mu as LoadingDots,Ce as LoadingSpinner,rf as LocationPin,of as LockFill,xo as Logo,Uo as Magic,af as Magnifier,nf as MapPosition,sf as MarketingTarget,Lu as MatrixLines,Rr as MaxWidthWrapper,lf as Menu3,gx as MenuItem,cf as MessageSmile,jt as MicrophoneFill,Px as MiniAreaChart,df as MobilePhone,Dx as Modal,mf as MoneyBill,uf as MoneyBill2,pf as MoneyBills2,ff as Msgs,x6 as Nav,wo as NavContext,A6 as NavMobile,Lr as NavWordmark,Ku as NorthAmerica,gf as Note,kf as NucleoPhoto,X1 as NumberTooltip,ju as Oceania,hf as OfficeBuilding,b1 as PLAN_FEATURE_ICONS,La as Page2,Ax as PaginationControls,bf as Paintbrush,vf as Palette2,xf as PaperPlane,op as Payoneer,ap as Paypal,wf as Pen2,yf as PenWriting,Nf as PercentageArrowDown,Go as Photo,Jo as Php,Cf as Plug2,Zt as Plus,ct as Popover,q5 as Popup,bu as PopupContext,Pf as Post,Au as Prisma,Yo as ProductHunt,ey as ProgressBar,Sf as Pyramid,Qo as Python,Rf as QRCode,Sr as RESOURCES,yd as RadioGroup,wd as RadioGroupItem,qo as Raycast,Tf as Receipt2,zr as ReferredVia,Lf as Refresh2,Mf as Robot,ea as Ruby,vo as SDKS,a3 as SOCIAL_LINKS,$n as SOLUTIONS,Ma as SatelliteDish,Df as ScanText,If as Scribble,Bx as Sheet,Ef as ShieldAlert,Af as ShieldCheck,Of as ShieldKeyhole,zf as ShieldSlash,_f as ShieldUser,Kx as ShimmerDots,Vf as Shuffle,Z1 as SimpleTooltipContent,Ou as Slack,Hf as Sliders,qx as SmartDateTimePicker,Ko as SortOrder,Zu as SouthAmerica,Wf as Sparkle3,ep as Spotify,Ff as SquareChart,Bf as SquareLayoutGrid5,$f as SquareLayoutGrid6,Uf as SquareXmark,Gf as Stars2,o4 as StatusBadge,np as StripeLink,jo as Success,m4 as Switch,Qf as TV,my as TabSelect,z4 as Table,Kf as TableIcon,jf as TableRows2,Zf as Tablet,Yf as Tag,qf as Tags,Zo as Tick,zu as TikTok,Da as Timer2,_u as Tinybird,Ia as Toggle2Fill,F4 as ToggleGroup,I1 as TokenAvatar,J as Tooltip,j1 as TooltipContent,K1 as TooltipProvider,Xf as Trash,Jf as TriangleWarning,Ut as Twitter,ta as Typescript,Y4 as UTMBuilder,om as UTM_PARAMETERS,e1 as UiCard,Vu as Unsplash,t1 as User,r1 as UserCheck,o1 as UserCrown,a1 as UserDelete,n1 as UserPlus,i1 as Users,l1 as Users2,c1 as Users6,Yt as UsersFill,s1 as UsersSettings,ip as Venmo,d1 as Versions2,Ea as Views,m1 as Watch,u1 as Webhook,p1 as Window,f1 as WindowSearch,g1 as WindowSettings,fi as Wordmark,h1 as Xmark,Gt as YouTube,$i as badgeVariants,ie as buttonVariants,Fi as getUserAvatarUrl,No as navItems,Vd as statusBadgeVariants,be as useCarousel,Wa as useCarouselActiveIndex,ah as useCookies,it as useCopyToClipboard,ch as useCurrentAnchor,ph as useEnterSubmit,bh as useInViewport,yh as useInputFocused,Ch as useIntersectionObserver,st as useKeyboardShortcut,Eh as useLocalStorage,j as useMediaQuery,Vh as useOptimisticUpdate,qh as usePagination,Qh as useRemoveGAParams,rr as useResizeObserver,Za as useRouterStuff,Xa as useScroll,Ee as useScrollProgress,O4 as useTable,ja as useTablePagination,pb as useToastWithUndo};