@dub/ui 0.2.49 → 0.2.51
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/chunk-AYE4PTQQ.mjs +2 -0
- package/dist/chunk-DCXMLT66.mjs +2 -0
- package/dist/chunk-ITQ6LPW2.mjs +2 -0
- package/dist/chunk-OHAW364M.mjs +2 -0
- package/dist/chunk-QR4ROYQG.mjs +2 -0
- package/dist/icons/index.d.ts +7 -3
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as op,$a as Kp,$b as _0,$c as Rf,$d as Ea,A as _u,Aa as Tp,Ab as g0,Ac as Ta,Ad as Xf,B as Hu,Ba as Lp,Bb as h0,Bc as rf,Bd as Jf,C as Ut,Ca as Mp,Cb as b0,Cc as of,Cd as Qf,D as Vu,Da as aa,Db as v0,Dc as af,Dd as e1,E as Gt,Ea as Dp,Eb as ga,Ec as nf,Ed as t1,F as Wu,Fa as Ip,Fb as x0,Fc as sf,Fd as r1,G as Fu,Ga as Ep,Gb as y0,Gc as lf,Gd as o1,H as Bu,Ha as Ap,Hb as w0,Hc as cf,Hd as a1,I as $u,Ia as Op,Ib as N0,Ic as df,Id as Da,J as Xo,Ja as zp,Jb as ha,Jc as mf,Jd as Ia,K as Jo,Ka as _p,Kb as ba,Kc as uf,Kd as n1,L as Qo,La as Hp,Lb as va,Lc as pf,Ld as i1,M as ea,Ma as Vp,Mb as k0,Mc as ff,Md as s1,N as ta,Na as Wp,Nb as C0,Nc as gf,Nd as l1,O as Uu,Oa as na,Ob as P0,Oc as hf,Od as c1,P as Gu,Pa as ia,Pb as S0,Pc as jt,Pd as d1,Q as Ku,Qa as sa,Qb as R0,Qc as bf,Qd as m1,R as ju,Ra as la,Rb as T0,Rc as vf,Rd as u1,S as Zu,Sa as ca,Sb as xa,Sc as xf,Sd as p1,T as Yu,Ta as Fp,Tb as L0,Tc as yf,Td as f1,U as qu,Ua as Bp,Ub as M0,Uc as wf,Ud as g1,V as Xu,Va as $p,Vb as D0,Vc as Nf,Vd as h1,W as Ju,Wa as da,Wb as I0,Wc as kf,Wd as Yt,X as Qu,Xa as ma,Xb as E0,Xc as La,Xd as b1,Y as ep,Ya as ua,Yb as A0,Yc as Cf,Yd as v1,Z as tp,Za as Up,Zb as O0,Zc as Pf,Zd as x1,_ as rp,_a as Gp,_b as z0,_c as Sf,_d as y1,a as Bo,aa as ap,ab as jp,ac as H0,ad as Tf,ae as w1,b as Tu,ba as np,bb as Zp,bc as V0,bd as Lf,be as N1,c as et,ca as ip,cb as Or,cc as W0,cd as Mf,ce as k1,d as Ft,da as sp,db as Yp,dc as F0,dd as Df,de as C1,e as Lu,ea as lp,eb as qp,ec as B0,ed as Zt,ee as P1,f as tt,fa as cp,fb as Xp,fc as ya,fd as If,fe as S1,g as rt,ga as dp,gb as pa,gc as $0,gd as Ef,ge as R1,h as $o,ha as mp,hb as Jp,hc as U0,hd as Af,i as Uo,ia as up,ib as Qp,ic as wa,id as Of,j as Mu,ja as pp,jb as e0,jc as G0,jd as zf,k as Go,ka as fp,kb as t0,kc as Na,kd as zr,l as Ko,la as gp,lb as r0,lc as K0,ld as _f,m as jo,ma as ra,mb as o0,mc as j0,md as Hf,n as Zo,na as hp,nb as a0,nc as Z0,nd as Ma,o as Nt,oa as bp,ob as n0,oc as Y0,od as Vf,p as Du,pa as vp,pb as i0,pc as q0,pd as Wf,q as Ce,qa as xp,qb as s0,qc as X0,qd as Ff,r as Iu,ra as yp,rb as l0,rc as ka,rd as Bf,s as Bt,sa as wp,sb as c0,sc as Ca,sd as $f,t as Eu,ta as Np,tb as d0,tc as Pa,td as Uf,u as Au,ua as kp,ub as fa,uc as J0,ud as Gf,v as $t,va as Cp,vb as m0,vc as Q0,vd as Kf,w as Ou,wa as oa,wb as u0,wc as ef,wd as jf,x as Yo,xa as Pp,xb as p0,xc as Sa,xd as Zf,y as qo,ya as Sp,yb as Kt,yc as tf,yd as Yf,z as zu,za as Rp,zb as f0,zc as Ra,zd as qf}from"./chunk-M2V54OBW.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as xt,b as Eo,c as Er,d as yt,e as Ao,f as Oo,g as zo,h as wt,i as Ar,j as _o,k as V,l as ke,m as Ho,n as ge,o as Vt,p as s,q as Wt,r as Vo,s as Wo,t as Fo}from"./chunk-LVO2QIFF.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 E1=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 l=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(l,{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 Hi=Jt.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Hi.displayName="AlertDescription";import{sha256 as Vi}from"js-sha256";import{useState as Wi}from"react";import{jsx as Hr}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/${Vi(e.email)}?d=${encodeURIComponent(r)}`:t}function F1({user:e={},className:t}){if(!e)return Hr("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 Hr("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 B1({id:e,className:t}){return Hr("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 ot}from"react/jsx-runtime";function rg({children:e}){return G(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Zi(!1);return ot(he.Root,{open:i,onOpenChange:m,delayDuration:l,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,...c,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 og({title:e,cta:t,href:r,target:o,onClick:a}){return ot("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 ag({title:e,cta:t,href:r}){return ot("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 ng({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 ig(e){return G(J,{...e,children:G(Ki,{className:"h-4 w-4 text-neutral-500"})})}function sg({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:G(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Wt(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function lg({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 cg({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 at,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:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(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:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("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||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ce,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("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"}}}),kt=Ji({variant:"loose",loading:!1});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(kt.Provider,{value:{variant:e,loading:t},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",Vr=ts({hovered:!1});function Ha({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=rs(kt),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")||wt(p));return ls("li",{ref:m,className:s(is({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,_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(Vr.Provider,{value:{hovered:d},children:r})})]})}var Eg=Object.assign(za,{Card:Object.assign(Ha,{Context:Vr}),Context:kt});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 Pt,useCallback as Ct,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,Va=ps(null);function be(){let e=fs(Va);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=Ct(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=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...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=Ct(T=>{!T||(p(T.canScrollPrev()),b(T.canScrollNext()))},[]),g=Ct(()=>{n==null||n.scrollPrev()},[n]),w=Ct(()=>{n==null||n.scrollNext()},[n]),N=Ct(T=>{T.key==="ArrowLeft"?(T.preventDefault(),g()):T.key==="ArrowRight"&&(T.preventDefault(),w())},[g,w]);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(Va.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:w,canScrollPrev:u,canScrollNext:v},children:Pe("div",{ref:m,onKeyDownCapture:N,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});gs.displayName="Carousel";var hs=Pt(({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=Pt(({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=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=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:!l,onClick:a,...t,children:[Pe(ms,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});vs.displayName="CarouselPrevious";var xs=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=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:!l,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 St}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 "}}}),Xg=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(b=c==null?void 0:c.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(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(Cs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[Ue(Ns,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ue("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,g)=>St("button",{onClick:v(()=>c.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"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("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 ih=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ps({dragFree:!0}),l=Rs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Ts(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),tr("div",{className:"overflow-hidden",ref:o,children:tr("div",{className:s("mx-4 flex gap-4",e),...t})})},sh=Ss(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Wa();return tr("div",{ref:o,children:tr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt 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(Rt.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(Rt.Indicator,{className:"flex items-center justify-center",children:$r(Ls,{className:"h-3 w-3 text-white"})})}));Ms.displayName=Rt.Root.displayName;import{Command as Lt,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 Tt}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 fh(e,t,r){let[o,a]=Is(()=>{let c=Ur.get(e);return c?JSON.parse(c):t});return Ds(()=>{let c=()=>{let i=Ur.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Ur.set(e,JSON.stringify(c),r)}]}import{useCallback as Es,useEffect as As,useRef as Os,useState as zs}from"react";var nt=(e=3e3)=>{let t=Os(null),[r,o]=zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Es(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),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,l]};import{useEffect as _s,useState as Hs}from"react";function xh(){let[e,t]=Hs(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=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=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 Vs}from"react";function kh(e){return{handleKeyDown:Vs(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 Rh(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Fs(o??!1);return Ws(()=>{let c=()=>{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};l(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",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as Bs,useState as $s}from"react";function Mh(){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 Ah(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Gs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(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]),l}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 Wh({children:e}){let[t,r]=qs([]);return Xs(Ua.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Ys(),{listeners:a,setListeners:l}=Zs(Ua),c=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",c),()=>document.removeEventListener("keydown",c)),[c]),$a(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(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 $h(e,t){let[r,o]=Qs(Ga(e)??t);return Js(()=>{let l=Ga(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as el}from"sonner";import tl from"swr";function Zh(e,t){let{data:r,isLoading:o,mutate:a}=tl(e,ge);return{data:r,isLoading:o,update:async(l,c)=>el.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as 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(l=>({...l,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=(c,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)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=il(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).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:l,getQueryString:a}}function ib(e=Wo){let{searchParams:t,queryParams:r}=Za(),o=sl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=ja({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return Ya(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),Ya(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as ll}from"react";function cb(){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 l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ml,useEffect as qa,useState as ul}from"react";function Xa(e,{container:t}={}){let[r,o]=ul(!1),a=ml(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return qa(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),qa(()=>{a()},[a]),r}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:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-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=l=>{l.key==="z"&&(l.ctrlKey||l.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 Cb(){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,...l},c)=>{var d,n;let i=yl(null),m=rr(i);return en(vl.div,{ref:c,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},...l,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 st}from"vaul";import{jsx as Re,jsxs as ar}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?ar(st.Root,{open:a,onOpenChange:l,children:[Re(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),ar(st.Portal,{children:[Re(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),ar(st.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(st.Overlay,{})]})]}):ar(Ae.Root,{open:a,onOpenChange:l,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 Qb({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:b,onOpenChange:h,onSearchChange:g,shouldFilter:w=!0,inputRight:N,inputClassName:T,optionRight:C,optionClassName:P,matchTriggerWidth:_,hideSearch:z=!1,children:R}){let y=Ll(e,r),A=Array.isArray(t)?t:t?[t]:[],{isMobile:k}=j(),[S,X]=Tt(!1),I=b??S,ue=h??X,[U,Mr]=Tt(""),[Mo,Dr]=Tt(!1),[Ir,Si]=Tt(void 0),[Ri,Do]=Tt(!1),Ti=H=>{var Qe;if(y){let Be=A.some(({value:$e})=>$e===H.value);r(Be?A.filter(({value:$e})=>$e!==H.value):[...A,H])}else r(A.length&&((Qe=A[0])==null?void 0:Qe.value)===H.value?null:H),ue(!1)},Io=Rl((H,Qe)=>Qe===""?[...H.filter(Be=>Be.first&&!A.some($e=>$e.value===Be.value)),...A,...H.filter(Be=>!Be.first&&!A.some($e=>$e.value===Be.value))]:H,[A]);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(lt,{openPopover:I,setOpenPopover:ue,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(_&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!k&&!_,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Lt,{loop:!0,shouldFilter:w,children:[!z&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(wl,{placeholder:c,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",T),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!U)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),N&&M("div",{className:"mr-2",children:N}),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(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ir!==void 0?Te(ir,{children:[Ir.map(H=>M(Dl,{option:H,multiple:y,selected:A.some(({value:Qe})=>Qe===H.value),onSelect:()=>Ti(H),right:C==null?void 0:C(H),className:P},`${H.label}, ${H.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",P),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}"`})]}),w?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(Lt.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:R||A.map(H=>H.label).join(", ")||l}),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:l}){return Te(ir,{children:[M(Il,{disabledTooltip:e.disabledTooltip,children:Te(Lt.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",l),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(Lt.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 Hl,useRef as Vl}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 Mt=Hl(({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"})}));Mt.displayName="NavigationButton";function an({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return re(Wl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-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:w}=Fl(),N=b.findIndex(y=>Ol(d.displayMonth,y)),T=N===0,C=N===b.length-1,P=h>1&&(T||!C),_=h>1&&(C||!T),z=()=>{let y=sr(v,-1);p&&(!g||y.getTime()>=g.getTime())&&n(y)},R=()=>{let y=sr(v,1);u&&(!w||y.getTime()<=w.getTime())&&n(y)};return lr("div",{className:"flex items-center justify-between",children:[lr("div",{className:"flex items-center gap-1",children:[o&&!_&&re(Mt,{disabled:a||!p||g&&sr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:z,icon:zl}),!_&&re(Mt,{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:l})}),lr("div",{className:"flex items-center gap-1",children:[!P&&re(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:on}),o&&!P&&re(Mt,{disabled:a||!u||w&&sr(v,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:R,icon:_l})]})]})},Day:({date:d,displayMonth:n})=>{let u=Vl(null),{activeModifiers:p,buttonProps:v,divProps:b,isButton:h,isHidden:g}=Bl(d,n,u),{selected:w,today:N,disabled:T,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:P,..._}=v;return lr("button",{ref:u,..._,type:"button",children:[P,N&&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":!w,"!bg-white":w,"!bg-blue-400":w&&C,"text-neutral-400":T})})]})}},...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,l=d=>"date"in d,c=(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&&c(u,p)&&(v=!0);let b=d.to,h=n.to,g=!1;return b&&h&&c(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(l(d)){let n=r;return n&&c(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:l,fromDay:c,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 w=n.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&w>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(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);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 w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),N=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(N&&r&&N>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let T=(v=n.dateRange.from)==null?void 0:v.getMonth();if(T&&T<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(l){let T=(b=n.dateRange.to)==null?void 0:b.getMonth();if(T&&T>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(l,"MMM, yyyy")}.`)}if(c){let T=(h=n.dateRange.from)==null?void 0:h.getDate();if(T&&T<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(c,"MMM dd, yyyy")}.`)}if(i){let T=(g=n.dateRange.to)==null?void 0:g.getDate();if(T&&T>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},l)=>ec("button",{ref:l,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:l,disableNavigation:c,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,w]=dr(!1),[N,T]=dr(a&&r?a==null?void 0:a.find(({id:I})=>I===r):void 0),[C,P]=dr((N==null?void 0:N.dateRange)??e??t??void 0),[_,z]=dr(C==null?void 0:C.to),R=sn(()=>C,[g]);qr(()=>{P(e)},[e]),qr(()=>{let I=a==null?void 0:a.find(({id:ue})=>ue===r);T(I),P((I==null?void 0:I.dateRange)??e??t)},[a,r]),qr(()=>{g?C&&z(C.to):z(C==null?void 0:C.to)},[g]);let y=(I,ue)=>{let U=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:ue}:I;P(U),T(void 0),(U==null?void 0:U.from)&&(U==null?void 0:U.to)&&(o==null||o(U),w(!1))},A=I=>{P(I.dateRange),T(I),o==null||o(I.dateRange,I),w(!1)},k=()=>{P(R),w(!1)},S=I=>{I||k(),w(I)},X=sn(()=>C?`${C.from?Zr(C.from,d):""} - ${C.to?Zr(C.to,d):""}`:null,[C,d]);return it((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&&A(ue)}),oe(jr.Provider,{value:{isOpen:g,setIsOpen:w},children:oe(lt,{align:p,openPopover:g,setOpenPopover:S,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:A})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(an,{mode:"range",selected:C,onSelect:y,month:_,onMonthChange:z,numberOfMonths:h?2:1,disabled:i,disableNavigation:c,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:l,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:(N==null?void 0:N.label)??X})})})};function _v({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,l]=cn("Loading status...");return ic(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("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 Yv({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","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp 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 i2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,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:w="File upload",disabled:N=!1}){let[T,C]=pn(!1),[P,_]=pn(null),z=async R=>{let y="dataTransfer"in R?R.dataTransfer.files&&R.dataTransfer.files[0]:R.target.files&&R.target.files[0];if(!y)return;if(_(y.name),h>0&&y.size/1024/1024>h){fn.error(`File size too big (max ${h} MB)`);return}let A=Jr[d].types;if(A.length&&!A.includes(y.type)){fn.error(Jr[d].errorMessage??"File type not supported");return}let k=y;if(g&&y.type.startsWith("image/"))try{let S=await zo(y,g),X=await fetch(S).then(I=>I.blob());k=new File([X],y.name,{type:y.type})}catch(S){console.error("Error resizing image:",S)}if(t){let S=new FileReader;S.onload=X=>{var I;return r==null?void 0:r({src:(I=X.target)==null?void 0:I.result,file:k})},S.readAsDataURL(k);return}r==null||r({file:k})};return Qr("label",{className:s(cc({variant:o}),N?"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(Nt,{})}),ve("div",{className:"absolute inset-0 z-[5]",onDragOver:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragEnter:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragLeave:R=>{R.preventDefault(),R.stopPropagation(),C(!1)},onDrop:async R=>{R.preventDefault(),R.stopPropagation(),z(R),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",N&&"bg-neutral-50",T&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!N&&"group-hover:opacity-100"):s(!N&&"group-hover:bg-neutral-50")),children:[ve(i,{className:s("size-7 transition-all duration-75",N?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",T?"scale-110":"scale-100"),l)}),b!==null&&ve("div",{className:s("mt-2 text-center text-sm text-neutral-500",N&&"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:w})]}),n&&(m??ve("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Jr[d].types.join(","),onChange:z,disabled:N},P)})]})}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 Dt}from"react/jsx-runtime";function vn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("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:l,value:c})=>{if(l==="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-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,b,h,g;let d=(v=i.options)==null?void 0:v.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.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 Dt(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:[Dt("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?Dt(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:yt(u,30)}):yt(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(l,m),children:Q(uc,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-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 W,jsxs as xe}from"react/jsx-runtime";function wn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var y,A;let{isMobile:u}=j(),p=to(null),v=to(),[b,h]=eo(!1);it("f",()=>h(!0),{enabled:!b});let[g,w]=eo(""),[N,T]=eo(null),C=ur(()=>{w(""),T(null)},[]);pr(()=>{b||C()},[b]);let P=N?e.find(({key:k})=>k===N):null,_=ur(k=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),T(k),o==null||o(k)},[]),z=ur(k=>{if(!P||!c)return!1;let S=c.find(({key:X})=>X===N);return(S==null?void 0:S.value)===k||S&&P.multiple&&Array.isArray(S.value)&&S.value.includes(k)},[P]),R=ur(k=>{P&&(z(k)?r(P.key,k):t(P.key,k),P.multiple||h(!1))},[c,P,i]);return pr(()=>{a==null||a(g)},[g]),pr(()=>{l==null||l(N)},[N]),pr(()=>{(P==null?void 0:P.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[P==null?void 0:P.options]),W(lt,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:k=>{N&&(k.preventDefault(),C())},content:W(Se,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!P||P.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[W(kc,{placeholder:`${(P==null?void 0:P.label)||"Filter"}...`,value:g,onValueChange:w,onKeyDown:k=>{(k.key==="Escape"||k.key==="Backspace"&&!g)&&(k.preventDefault(),k.stopPropagation(),N?C():h(!1))},emptySubmit:k=>{k.preventDefault(),k.stopPropagation(),i?(t("ai",P?`${P.label} ${g}`:g),h(!1)):R(g)}}),!P&&W("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"})]}),W(Cc,{ref:p,children:xe(ze.List,{className:s("flex w-full flex-col gap-1 p-1",P?"min-w-[100px]":"min-w-[180px]"),children:[P?((A=(y=P.options)==null?void 0:y.filter(k=>!g||!k.hideDuringSearch))==null?void 0:A.map(k=>{let S=z(k.value);return W(xn,{filter:P,option:k,right:S?W(na,{className:"h-4 w-4"}):k.right,onSelect:()=>R(k.value)},k.value)}))??W(ze.Loading,{children:W("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:W(Ce,{})})}):e.filter(k=>!k.hideInFilterDropdown).map(k=>xe(xc,{children:[W(xn,{filter:k,onSelect:()=>_(k.key)}),k.separatorAfter&&W(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},k.key)),(!P||P.options)&&W(Pc,{search:g,askAI:i,children:d?Nc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),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:[W(vc,{className:"size-4 shrink-0"}),W("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?W("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):W(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 W(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:[W("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),W("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(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=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:c+(t==null?void 0:t.value),children:[W("span",{className:"shrink-0 text-neutral-600",children:Sc(l)?l:W(l,{className:"h-4 w-4"})}),yt(c,48),W("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:[W(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,'"']})]})]}):W(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Sc=e=>yn(e);var D2={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 H2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){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 c({[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:!!l,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":l})}):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:l})})]})]})}import{useId as Lc}from"react";import{jsx as gr,jsxs as Mc}from"react/jsx-runtime";function It({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,l]=Ac(!1),c=Ec(()=>l(!a),[a,l]);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:()=>c(),"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 Vc,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 ct}from"vaul";import zc from"next/image";import{useEffect as _c,useState as kn}from"react";import{jsx as Hc}from"react/jsx-runtime";function Et(e){let[t,r]=kn(!0),[o,a]=kn(e.src);_c(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Hc(zc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,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 fx({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,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 w=Cn(()=>{let S=v.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(S)):v?e.sort((X,I)=>(I.value.toLowerCase().includes(S)?1:0)-(X.value.toLowerCase().includes(S)?1:0)):e},[h,v,e]),{refs:N,floatingStyles:T,context:C}=$c({open:u,onOpenChange:p,middleware:[Wc(8),Fc({apply({elements:{floating:S},availableHeight:X}){Object.assign(S.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Vc({fallbackStrategy:"initialPlacement",padding:8})]}),P=Bc(C,{enabled:!d||!l}),{getReferenceProps:_,getFloatingProps:z}=Uc([P]),R=Pn(null),{scrollProgress:y,updateScrollProgress:A}=Ee(R),k=Cn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Zc,{className:"size-4 text-neutral-400"}),[t,c]);return E(hr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?le(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(no,{className:o,iconElement:k})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:S=>{S.target instanceof Element&&S.target.closest("[data-sonner-toast]")&&S.preventDefault()},children:le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(no,{className:o,iconElement:k})}),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:w})]})]})}),E(ct.Overlay,{})]})]}):le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(no,{className:o,iconElement:k,ref:N.setReference,..._()}),u&&le("div",{ref:N.setFloating,style:T,...z(),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:R,onScroll:A,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:w})]}),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(y,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:l,inputValue:c,setInputValue:i,disabled:m}=io(hr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!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(l=>!l),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(Et,{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 cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function Sx({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Mn(e||"button",{...e==="button"?{type:"button"}:{},className:s(nd({variant:t}),l),...c,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 zx(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:l}){let c={...fd,...l},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-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:dd({domain:[b,h],range:[0,e-c.left-c.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-c.left-c.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:c.left,top:c.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 dt}from"react/jsx-runtime";function Bx({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=hd(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?ae(Ze.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(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:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(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:dt(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"}),dt(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:[dt(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 mt}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 Gx({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[br("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(vd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&br("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("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 He}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?He.NestedRoot:He.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:Sd(He.Portal,{children:[Ye(He.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(He.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className: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(He.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function Cd(e){return Ye(He.Description,{...e})}function Pd(e){return Ye(He.Close,{...e})}var Qx=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=`
|
|
2
|
+
import{$ as Xu,$a as _p,$b as L0,$c as wf,$d as gg,A as Du,Aa as Np,Ab as l0,Ac as Pa,Ad as Gf,B as Eu,Ba as oa,Bb as c0,Bc as Sa,Bd as Kf,C as jt,Ca as Cp,Cb as d0,Cc as J0,Cd as jf,D as Iu,Da as kp,Db as m0,Dc as Q0,Dd as Yf,E as Yt,Ea as aa,Eb as u0,Ec as ef,Ed as Zf,F as Au,Fa as Pp,Fb as ga,Fc as tf,Fd as qf,G as Ou,Ga as Sp,Gb as p0,Gc as Xt,Gd as Xf,H as zu,Ha as Rp,Hb as f0,Hc as rf,Hd as Jf,I as Hu,Ia as Tp,Ib as g0,Ic as of,Id as Qf,J as Xo,Ja as Lp,Jb as b0,Jc as af,Jd as eg,K as Jo,Ka as Mp,Kb as ba,Kc as nf,Kd as La,L as Qo,La as Dp,Lb as ha,Lc as sf,Ld as Ma,M as ea,Ma as Ep,Mb as va,Mc as lf,Md as tg,N as ta,Na as Ip,Nb as xa,Nc as cf,Nd as rg,O as Vu,Oa as Ap,Ob as h0,Oc as df,Od as og,P as _u,Pa as na,Pb as v0,Pc as mf,Pd as ag,Q as Fu,Qa as ia,Qb as x0,Qc as uf,Qd as ng,R as Bu,Ra as sa,Rb as y0,Rc as Jt,Rd as ig,S as Wu,Sa as la,Sb as w0,Sc as pf,Sd as sg,T as $u,Ta as ca,Tb as N0,Tc as ff,Td as lg,U as Uu,Ua as Op,Ub as ya,Uc as gf,Ud as cg,V as Gu,Va as zp,Vb as C0,Vc as bf,Vd as dg,W as Ku,Wa as Hp,Wb as k0,Wc as hf,Wd as mg,X as ju,Xa as da,Xb as P0,Xc as vf,Xd as ug,Y as Yu,Ya as ma,Yb as S0,Yc as xf,Yd as Nt,Z as Zu,Za as ua,Zb as R0,Zc as Ra,Zd as pg,_ as qu,_a as Vp,_b as T0,_c as yf,_d as fg,a as Wo,aa as Ju,ab as Fp,ac as M0,ad as Nf,ae as bg,b as Nu,ba as Qu,bb as Bp,bc as D0,bd as Cf,be as Da,c as et,ca as ep,cb as Wp,cc as E0,cd as kf,ce as hg,d as Ut,da as tp,db as Hr,dc as I0,dd as Pf,de as vg,e as Cu,ea as rp,eb as $p,ec as A0,ed as Sf,ee as xg,f as tt,fa as op,fb as Up,fc as O0,fd as Rf,fe as yg,g as rt,ga as ap,gb as Gp,gc as z0,gd as Qt,ge as wg,h as $o,ha as np,hb as pa,hc as wa,hd as Tf,he as Ng,i as Uo,ia as ip,ib as Kp,ic as H0,id as Lf,ie as Cg,j as ku,ja as sp,jb as jp,jc as V0,jd as Mf,k as Go,ka as lp,kb as Yp,kc as Na,kd as Df,l as Ko,la as cp,lb as Zp,lc as _0,ld as Ef,m as jo,ma as ra,mb as qp,mc as Ca,md as Vr,n as Yo,na as dp,nb as Xp,nc as F0,nd as If,o as wt,oa as mp,ob as Jp,oc as B0,od as Af,p as Pu,pa as up,pb as Qp,pc as W0,pd as Ta,q as Ne,qa as pp,qb as e0,qc as $0,qd as Of,r as Su,ra as fp,rb as t0,rc as U0,rd as zf,s as Gt,sa as gp,sb as r0,sc as G0,sd as Hf,t as Ru,ta as bp,tb as o0,tc as K0,td as Vf,u as Tu,ua as hp,ub as a0,uc as j0,ud as _f,v as Kt,va as vp,vb as fa,vc as Y0,vd as Ff,w as Lu,wa as Zt,wb as n0,wc as Z0,wd as Bf,x as Zo,xa as xp,xb as i0,xc as q0,xd as Wf,y as qo,ya as yp,yb as s0,yc as ka,yd as $f,z as Mu,za as wp,zb as qt,zc as X0,zd as Uf}from"./chunk-ITQ6LPW2.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as vt,b as Io,c as Or,d as xt,e as Ao,f as Oo,g as zo,h as yt,i as zr,j as Ho,k as V,l as we,m as Vo,n as fe,o as Wt,p as s,q as $t,r as _o,s as Fo,t as Bo}from"./chunk-LVO2QIFF.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as wi}from"lucide-react";import*as tr from"react";import{jsx as er,jsxs as Pi}from"react/jsx-runtime";var Lg=ae.Root,Ni=tr.forwardRef(({className:e,...t},r)=>er(ae.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var Ci=tr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?wi:Qt;return er(ae.Header,{className:"flex",children:Pi(ae.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,er(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ae.Trigger.displayName;var ki=tr.forwardRef(({className:e,children:t,...r},o)=>er(ae.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}));ki.displayName=ae.Content.displayName;import{cva as Si}from"class-variance-authority";import*as rr from"react";import{jsx as _r}from"react/jsx-runtime";var Ri=Si("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"}}),Ti=rr.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Ri({variant:t}),e),...r}));Ti.displayName="Alert";var Li=rr.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Li.displayName="AlertTitle";var Mi=rr.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Mi.displayName="AlertDescription";import{sha256 as Di}from"js-sha256";import{useState as Ei}from"react";import{jsx as Fr}from"react/jsx-runtime";function Ii(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/${Di(e.email)}?d=${encodeURIComponent(r)}`:t}function Hg({user:e={},className:t}){if(!e)return Fr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ii(e));return Fr("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 Vg({id:e,className:t}){return Fr("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 Ai}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Oi=Ai("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 or({className:e,variant:t,...r}){return zi("span",{className:s(Oi({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as ge from"@radix-ui/react-tooltip";import Hi from"linkify-react";import{HelpCircle as Vi}from"lucide-react";import _i from"next/link";import{useState as Fi}from"react";import{jsx as U,jsxs as ot}from"react/jsx-runtime";function Jg({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Fi(!1);return ot(ge.Root,{open:i,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),U(ge.Portal,{children:U(ge.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,...c,children:typeof t=="string"?U("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 Qg({title:e,cta:t,href:r,target:o,onClick:a}){return ot("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(_i,{href:r,...o?{target:o}:{},className:s(ne({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return ot("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",U("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 t1({children:e,className:t,tooltipClassName:r}){return U("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:U(Hi,{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 r1(e){return U(J,{...e,children:U(Vi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,$t(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(or,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("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 ar({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as at,jsxs as Ea}from"react/jsx-runtime";var ne=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: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"}}),ie=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Ea("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:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("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})]})}):Ea("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||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ne({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ne,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("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]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as Ia}from"react/jsx-runtime";var Gi=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Ct=Ui({variant:"loose",loading:!1});function Aa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ia("ul",{className:s(Gi({variant:e,loading:t}),r),"data-variant":e,children:Ia(Ct.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as Ki}from"class-variance-authority";import{createContext as ji,useContext as Yi,useEffect as Zi,useRef as qi,useState as Xi}from"react";import{jsx as Oa,jsxs as es}from"react/jsx-runtime";var Ji=Ki("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"}}}),Qi="w-full py-2.5 px-4",Br=ji({hovered:!1});function za({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=Yi(Ct),m=qi(null),[d,n]=Xi(!1);Zi(()=>{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")||yt(p));return es("li",{ref:m,className:s(Ji({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,Oa("div",{className:s(Qi,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Oa(Br.Provider,{value:{hovered:d},children:r})})]})}var L1=Object.assign(Aa,{Card:Object.assign(za,{Context:Br}),Context:Ct});import ts from"embla-carousel-autoplay";import rs from"embla-carousel-react";import{ArrowLeft as os,ArrowRight as as}from"lucide-react";import{createContext as ns,forwardRef as Pt,useCallback as kt,useContext as is,useEffect as Wr,useState as $r}from"react";import{jsx as Ce,jsxs as _a}from"react/jsx-runtime";var Ur=2e3,Ha=ns(null);function be(){let e=is(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Va(){let{api:e}=be(),[t,r]=$r(0),o=kt(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 ss=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...i},m)=>{let[d,n]=rs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ts(typeof o=="object"?o:{delay:Ur})]:[],...a||[]]),[u,p]=$r(!1),[v,h]=$r(!1),b=kt(R=>{!R||(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),g=kt(()=>{n==null||n.scrollPrev()},[n]),y=kt(()=>{n==null||n.scrollNext()},[n]),w=kt(R=>{R.key==="ArrowLeft"?(R.preventDefault(),g()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[g,y]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n==null||n.off("select",b)}},[n,b]),Ce(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:w,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});ss.displayName="Carousel";var ls=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ls.displayName="CarouselContent";var cs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("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})});cs.displayName="CarouselItem";var ds=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=be();return _a("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",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(os,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});ds.displayName="CarouselPrevious";var ms=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=be();return _a("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",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(as,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ms.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ps}from"framer-motion";import{ChevronLeft as fs,ChevronRight as gs}from"lucide-react";import*as Me from"react";import{jsx as We,jsxs as St}from"react/jsx-runtime";var bs=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 "}}}),j1=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[m,d]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(b=>{d((b==null?void 0:b.selectedScrollSnap())??0)},[]),v=Me.useCallback(b=>()=>{i&&i.isPlaying()&&i.stop(),b()},[i]);return Me.useEffect(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(bs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[We(fs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&We("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>St("button",{onClick:v(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[We("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&&We(ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Ur)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[We(gs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as xs,useEffect as ys}from"react";import{jsx as nr}from"react/jsx-runtime";var rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=hs({dragFree:!0}),l=xs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ys(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),nr("div",{className:"overflow-hidden",ref:o,children:nr("div",{className:s("mx-4 flex gap-4",e),...t})})},ob=vs(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Va();return nr("div",{ref:o,children:nr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as ws}from"lucide-react";import*as Fa from"react";import{jsx as Gr}from"react/jsx-runtime";var Ns=Fa.forwardRef(({className:e,...t},r)=>Gr(Rt.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:Gr(Rt.Indicator,{className:"flex items-center justify-center",children:Gr(ws,{className:"h-3 w-3 text-white"})})}));Ns.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as pl,CommandItem as fl,useCommandState as gl}from"cmdk";import{ChevronDown as bl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as xl,useEffect as cr,useRef as yl,useState as Tt}from"react";import{motion as dl}from"framer-motion";import{forwardRef as ml,useRef as ul}from"react";import Kr from"js-cookie";import{useEffect as Cs,useState as ks}from"react";function db(e,t,r){let[o,a]=ks(()=>{let c=Kr.get(e);return c?JSON.parse(c):t});return Cs(()=>{let c=()=>{let i=Kr.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Kr.set(e,JSON.stringify(c),r)}]}import{useCallback as Ps,useEffect as Ss,useRef as Rs,useState as Ts}from"react";var nt=(e=3e3)=>{let t=Rs(null),[r,o]=Ts(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Ps(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),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 Ss(()=>()=>a(),[]),[r,l]};import{useEffect as Ls,useState as Ms}from"react";function gb(){let[e,t]=Ms(null);return Ls(()=>{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 h=1;h<i.length;h++){let b=i[h];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=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 Ds}from"react";function xb(e){return{handleKeyDown:Ds(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 Is}from"react";function Cb(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Is(o??!1);return Es(()=>{let c=()=>{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};l(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",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as As,useState as Os}from"react";function Sb(){let[e,t]=Os(!1);return As(()=>{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 Hs}from"react";function Mb(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Hs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return zs(()=>{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]),l}import{createContext as Vs,useCallback as _s,useContext as Fs,useEffect as Ba,useId as Bs,useState as Ws}from"react";import{jsx as $s}from"react/jsx-runtime";var Wa=Vs({listeners:[],setListeners:()=>{}});function zb({children:e}){let[t,r]=Ws([]);return $s(Wa.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Bs(),{listeners:a,setListeners:l}=Fs(Wa),c=_s(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(h=>h.enabled!==!1&&!!d==!!h.modal&&!!n==!!h.sheet&&(Array.isArray(h.key)?h.key.includes(u):h.key===u));!p.length||Ao(p,(h,b)=>(b.priority??0)-(h.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ba(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function $a(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function _b(e,t){let[r,o]=Gs($a(e)??t);return Us(()=>{let l=$a(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ks}from"sonner";import js from"swr";function Ub(e,t){let{data:r,isLoading:o,mutate:a}=js(e,fe);return{data:r,isLoading:o,update:async(l,c)=>Ks.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ja,useMemo as Qs}from"react";import{useEffect as Ua,useState as Ys}from"react";function Ga({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ys({pageIndex:t,pageSize:e});return Ua(()=>{a(l=>({...l,pageIndex:t}))},[t]),Ua(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Zs,useRouter as qs,useSearchParams as Xs}from"next/navigation";import{useCallback as Js}from"react";function Ka(){let e=Zs(),t=qs(),r=Xs(),o=Object.fromEntries(r),a=(c,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)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=Js(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>p.set(b,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(b=>p.delete(b)):p.delete(i));let v=p.toString(),h=`${e}${v.length>0?`?${v}`:""}`;if(n)return h;m?t.replace(h,{scroll:!1}):t.push(h,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function rh(e=Fo){let{searchParams:t,queryParams:r}=Ka(),o=Qs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ga({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ja(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),ja(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as el}from"react";function nh(){el(()=>{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 tl,useState as rl}from"react";function ir(e){let[t,r]=rl(),o=([a])=>{r(a)};return tl(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ol,useEffect as Ya,useState as al}from"react";function Za(e,{container:t}={}){let[r,o]=al(!1),a=ol(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ya(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),Ya(()=>{a()},[a]),r}import{useCallback as nl,useEffect as il,useState as sl}from"react";function De(e){let[t,r]=sl(1),o=nl(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-i),1))},[]),a=ir(e);return il(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ll}from"react";import{toast as Xa}from"sonner";import{jsx as sr,jsxs as qa}from"react/jsx-runtime";function cl({id:e,message:t,undo:r}){let o=()=>{r(),Xa.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ll(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),qa("div",{className:"flex w-full items-center justify-between space-x-2",children:[qa("div",{className:"flex items-center space-x-2",children:[sr(jo,{}),sr("p",{className:"font-medium",children:t})]}),sr("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 yh(){return({id:t,message:r,undo:o,duration:a})=>Xa(sr(cl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ja}from"react/jsx-runtime";var ke=ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let i=ul(null),m=ir(i);return Ja(dl.div,{ref:c,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},...l,children:Ja("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ee from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Pe,jsxs as lr}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?lr(st.Root,{open:a,onOpenChange:l,children:[Pe(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),lr(st.Portal,{children:[Pe(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),lr(st.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:h=>{h.target instanceof Element&&h.target.closest("[data-sonner-toast]")&&h.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("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})]}),Pe(st.Overlay,{})]})]}):lr(Ee.Root,{open:a,onOpenChange:l,children:[Pe(Ee.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ee.Portal,{children:Pe(Ee.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 dr,jsx as L,jsxs as Se}from"react/jsx-runtime";function wl(e,t){return e===!0}function Zh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:y=!0,inputRight:w,inputClassName:R,optionRight:C,optionClassName:k,matchTriggerWidth:z,hideSearch:O=!1,children:S}){let x=wl(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:N}=j(),[P,X]=Tt(!1),D=h??P,me=b??X,[$,Er]=Tt(""),[Mo,Ir]=Tt(!1),[Ar,vi]=Tt(void 0),[xi,Do]=Tt(!1),yi=H=>{var Qe;if(x){let Fe=I.some(({value:Be})=>Be===H.value);r(Fe?I.filter(({value:Be})=>Be!==H.value):[...I,H])}else r(I.length&&((Qe=I[0])==null?void 0:Qe.value)===H.value?null:H),me(!1)},Eo=xl((H,Qe)=>Qe===""?[...H.filter(Fe=>Fe.first&&!I.some(Be=>Be.value===Fe.value)),...I,...H.filter(Fe=>!Fe.first&&!I.some(Be=>Be.value===Fe.value))]:H,[I]);return cr(()=>{Mo&&(vi(o&&Eo(o,$)),Ir(!1))},[Mo,o,Eo,$]),cr(()=>{Ir(!0)},[o]),cr(()=>{D||(Er(""),Ir(!0))},[D]),cr(()=>g==null?void 0:g($),[$]),L(lt,{openPopover:D,setOpenPopover:me,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(z&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(ke,{width:!N&&!z,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(Lt,{loop:!0,shouldFilter:y,children:[!O&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(pl,{placeholder:c,value:$,onValueChange:Er,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),me(!1))}}),w&&L("div",{className:"mr-2",children:w}),u&&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:u})]}),L(Nl,{children:L(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ar!==void 0?Se(dr,{children:[Ar.map(H=>L(Cl,{option:H,multiple:x,selected:I.some(({value:Qe})=>Qe===H.value),onSelect:()=>yi(H),right:C==null?void 0:C(H),className:k},`${H.label}, ${H.value}`)),$.length>0&&d&&Se(fl,{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",k),onSelect:async()=>{Do(!0),await(d==null?void 0:d($))&&(Er(""),me(!1)),Do(!1)},children:[xi?L(Ne,{className:"size-4 shrink-0"}):L(Qt,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),y?L(Pl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ar.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):L(Lt.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(ie,{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:Se(dr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:S||I.map(H=>H.label).join(", ")||l}),p&&(p===!0?L(bl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?Qa(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var Nl=({children:e})=>{let t=yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return Se(dr,{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:l}){return Se(dr,{children:[L(kl,{disabledTooltip:e.disabledTooltip,children:Se(Lt.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",l),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(sa,{className:"size-4 text-neutral-600"}):L(la,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Qa(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var kl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Qa=e=>vl(e),Pl=hl((e,t)=>gl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as mr,format as Sl,isSameMonth as Rl}from"date-fns";import{ChevronLeft as en,ChevronRight as tn,ChevronsLeft as Tl,ChevronsRight as Ll}from"lucide-react";import{forwardRef as Ml,useRef as Dl}from"react";import{DayPicker as El,useDayPicker as Il,useDayRender as Al,useNavigation as Ol}from"react-day-picker";import{Fragment as zl,jsx as te,jsxs as ur}from"react/jsx-runtime";var Mt=Ml(({onClick:e,icon:t,disabled:r,...o},a)=>te("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:te(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function rn({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return te(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-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:()=>te(en,{className:"h-4 w-4"}),IconRight:()=>te(tn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:h}=Ol(),{numberOfMonths:b,fromDate:g,toDate:y}=Il(),w=h.findIndex(x=>Rl(d.displayMonth,x)),R=w===0,C=w===h.length-1,k=b>1&&(R||!C),z=b>1&&(C||!R),O=()=>{let x=mr(v,-1);p&&(!g||x.getTime()>=g.getTime())&&n(x)},S=()=>{let x=mr(v,1);u&&(!y||x.getTime()<=y.getTime())&&n(x)};return ur("div",{className:"flex items-center justify-between",children:[ur("div",{className:"flex items-center gap-1",children:[o&&!z&&te(Mt,{disabled:a||!p||g&&mr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Tl}),!z&&te(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:en})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sl(d.displayMonth,"LLLL yyy",{locale:l})}),ur("div",{className:"flex items-center gap-1",children:[!k&&te(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:tn}),o&&!k&&te(Mt,{disabled:a||!u||y&&mr(v,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:S,icon:Ll})]})]})},Day:({date:d,displayMonth:n})=>{let u=Dl(null),{activeModifiers:p,buttonProps:v,divProps:h,isButton:b,isHidden:g}=Al(d,n,u),{selected:y,today:w,disabled:R,range_middle:C}=p;if(g)return te(zl,{});if(!b)return te("div",{...h,className:s("flex items-center justify-center",h.className)});let{children:k,...z}=v;return ur("button",{ref:u,...z,type:"button",children:[k,w&&te("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":!y,"!bg-white":y,"!bg-blue-400":y&&C,"text-neutral-400":R})})]})}},...m})}import{enUS as jl}from"date-fns/locale";import{useEffect as Jr,useMemo as an,useRef as Yl,useState as fr}from"react";import{Command as jr}from"cmdk";import{Lock as Hl}from"lucide-react";import{jsx as $e,jsxs as Vl}from"react/jsx-runtime";var Yr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(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&&c(u,p)&&(v=!0);let h=d.to,b=n.to,g=!1;return h&&b&&c(h,b)&&(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(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(jr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(jr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Vl(jr.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:[$e("span",{children:d.label}),d.requiresUpgrade?$e(Hl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("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&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Yr.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as _l}from"react";var Zr=_l({isOpen:!1,setIsOpen:()=>{}}),Fl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},qr=(e,t,r=!1)=>{let o=!Fl(),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},on=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,h,b,g;if("date"in n){let y=n.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&y>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(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let y=(u=n.dateRange.from)==null?void 0:u.getFullYear(),w=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let R=(h=n.dateRange.to)==null?void 0:h.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let R=(b=n.dateRange.from)==null?void 0:b.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(i){let R=(g=n.dateRange.to)==null?void 0:g.getDate();if(R&&R>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as $l}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as pr,jsxs as Kl}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"}}}),Xr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Kl("button",{ref:l,className:s(Gl({hasError:o}),e),...a,children:[pr(Wl,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),pr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?pr("span",{className:"text-neutral-400",children:r}):null)}),pr($l,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Xr.displayName="DatePicker.Trigger";import{jsx as re,jsxs as nn}from"react/jsx-runtime";var Zl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:i,showYearNavigation:m=!1,locale:d=jl,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...h})=>{let{isDesktop:b}=j(),[g,y]=fr(!1),[w,R]=fr(a&&r?a==null?void 0:a.find(({id:D})=>D===r):void 0),[C,k]=fr((w==null?void 0:w.dateRange)??e??t??void 0),[z,O]=fr(C==null?void 0:C.to),S=an(()=>C,[g]);Jr(()=>{k(e)},[e]),Jr(()=>{let D=a==null?void 0:a.find(({id:me})=>me===r);R(D),k((D==null?void 0:D.dateRange)??e??t)},[a,r]),Jr(()=>{g?C&&O(C.to):O(C==null?void 0:C.to)},[g]);let x=(D,me)=>{let $=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:me}:D;k($),R(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),y(!1))},I=D=>{k(D.dateRange),R(D),o==null||o(D.dateRange,D),y(!1)},N=()=>{k(S),y(!1)},P=D=>{D||N(),y(D)},X=an(()=>C?`${C.from?qr(C.from,d):""} - ${C.to?qr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(D=>D.shortcut).map(D=>D.shortcut))??[],D=>{let me=a==null?void 0:a.find($=>$.shortcut===D.key);me&&I(me)}),re(Zr.Provider,{value:{isOpen:g,setIsOpen:y},children:re(lt,{align:p,openPopover:g,setOpenPopover:P,popoverContentClassName:"rounded-xl",content:re("div",{className:"flex w-full",children:nn("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&&re(ql,{children:re("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:re("div",{className:"sm:py-3",children:re(Yr,{currentPresetId:r,currentValue:C,presets:a,onSelect:I})})})}),re("div",{className:"scrollbar-hide overflow-x-scroll",children:re(rn,{mode:"range",selected:C,onSelect:x,month:z,onMonthChange:O,numberOfMonths:b?2:1,disabled:i,disableNavigation:c,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"},...h})})]})}),children:re(Xr,{placeholder:n,disabled:l,className:v,hasError:u,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(w==null?void 0:w.label)??X})})})};function Iv({presets:e,...t}){return e&&on(e,t),re(Zl,{presets:e,...t})}function ql({children:e}){let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return nn("div",{className:"relative sm:h-full",children:[re("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}),re("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 Xl from"next/link";import{useEffect as Jl,useState as sn}from"react";import Ql from"swr";import{jsx as Qr,jsxs as ln}from"react/jsx-runtime";function cn({className:e}){let{data:t}=Ql("https://status.dub.co/api/v1/summary",fe),[r,o]=sn("bg-neutral-200"),[a,l]=sn("Loading status...");return Jl(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("All systems operational"),o("bg-green-500")},[t]),ln(Xl,{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:[ln("div",{className:"relative size-2",children:[Qr("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")}),Qr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Qr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as gr,jsxs as dn}from"react/jsx-runtime";function Gv({icon:e,title:t,description:r,learnMore:o,children:a}){return dn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[gr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:gr(e,{className:"size-6 text-neutral-800"})}),gr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&dn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&gr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as ec}from"class-variance-authority";import{useState as mn}from"react";import{toast as un}from"sonner";import{Fragment as rc,jsx as he,jsxs as to}from"react/jsx-runtime";var pn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],eo={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:pn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...pn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},tc=ec("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 rx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:h,maxFileSizeMB:b=0,targetResolution:g,accessibilityLabel:y="File upload",disabled:w=!1}){let[R,C]=mn(!1),[k,z]=mn(null),O=async S=>{let x="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!x)return;if(z(x.name),b>0&&x.size/1024/1024>b){un.error(`File size too big (max ${b} MB)`);return}let I=eo[d].types;if(I.length&&!I.includes(x.type)){un.error(eo[d].errorMessage??"File type not supported");return}let N=x;if(g&&x.type.startsWith("image/"))try{let P=await zo(x,g),X=await fetch(P).then(D=>D.blob());N=new File([X],x.name,{type:x.type})}catch(P){console.error("Error resizing image:",P)}if(t){let P=new FileReader;P.onload=X=>{var D;return r==null?void 0:r({src:(D=X.target)==null?void 0:D.result,file:N})},P.readAsDataURL(N);return}r==null||r({file:N})};return to("label",{className:s(tc({variant:o}),w?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(wt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),C(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),O(S),C(!1)}}),to("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",w&&"bg-neutral-50",R&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!w&&"group-hover:opacity-100"):s(!w&&"group-hover:bg-neutral-50")),children:[he(i,{className:s("size-7 transition-all duration-75",w?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),h!==null&&he("div",{className:s("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:h??he(rc,{children:to("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:y})]}),n&&(m??he("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:eo[d].types.join(","),onChange:O,disabled:w},k)})]})}import{AnimatePresence as oc,motion as fn}from"framer-motion";import{X as ac}from"lucide-react";import nc from"next/link";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function bn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("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(oc,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return Q(fn.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-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,h,b,g;let d=(v=i.options)==null?void 0:v.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),n=(d==null?void 0:d.icon)??((h=i.getOptionIcon)==null?void 0:h.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((b=i.getOptionLabel)==null?void 0:b.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 Dt(fn.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:[Dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(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?Dt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(nc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:xt(u,30)}):xt(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(l,m),children:Q(ac,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-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 gn=e=>ic(e);import{Command as Ae,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as mc,forwardRef as uc,isValidElement as vn,useCallback as br,useEffect as hr,useImperativeHandle as pc,useRef as oo,useState as ro}from"react";import{Fragment as xc,jsx as _,jsxs as ve}from"react/jsx-runtime";function xn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var x,I;let{isMobile:u}=j(),p=oo(null),v=oo(),[h,b]=ro(!1);it("f",()=>b(!0),{enabled:!h});let[g,y]=ro(""),[w,R]=ro(null),C=br(()=>{y(""),R(null)},[]);hr(()=>{h||C()},[h]);let k=w?e.find(({key:N})=>N===w):null,z=br(N=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),R(N),o==null||o(N)},[]),O=br(N=>{if(!k||!c)return!1;let P=c.find(({key:X})=>X===w);return(P==null?void 0:P.value)===N||P&&k.multiple&&Array.isArray(P.value)&&P.value.includes(N)},[k]),S=br(N=>{k&&(O(N)?r(k.key,N):t(k.key,N),k.multiple||b(!1))},[c,k,i]);return hr(()=>{a==null||a(g)},[g]),hr(()=>{l==null||l(w)},[w]),hr(()=>{(k==null?void 0:k.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),_(lt,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:N=>{w&&(N.preventDefault(),C())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ae,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:g,onValueChange:y,onKeyDown:N=>{(N.key==="Escape"||N.key==="Backspace"&&!g)&&(N.preventDefault(),N.stopPropagation(),w?C():b(!1))},emptySubmit:N=>{N.preventDefault(),N.stopPropagation(),i?(t("ai",k?`${k.label} ${g}`:g),b(!1)):S(g)}}),!k&&_("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"})]}),_(bc,{ref:p,children:ve(Ae.List,{className:s("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((I=(x=k.options)==null?void 0:x.filter(N=>!g||!N.hideDuringSearch))==null?void 0:I.map(N=>{let P=O(N.value);return _(hn,{filter:k,option:N,right:P?_(na,{className:"h-4 w-4"}):N.right,onSelect:()=>S(N.value)},N.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(Ne,{})})}):e.filter(N=>!N.hideInFilterDropdown).map(N=>ve(mc,{children:[_(hn,{filter:N,onSelect:()=>z(N.key)}),N.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},N.key)),(!k||k.options)&&_(hc,{search:g,askAI:i,children:d?fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:ve("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:[_(dc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(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&&!vn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return _(Ae.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"})},bc=uc(({children:e},t)=>{let r=oo(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=De(r);return ve(xc,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function hn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ae.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:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:vc(l)?l:_(l,{className:"h-4 w-4"})}),xt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var hc=({search:e,askAI:t,children:r})=>t&&e?ve(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Uo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),vc=e=>vn(e);var Rx={Select:xn,List:bn};import{useMemo as yc,useState as yn}from"react";import{jsx as Ue,jsxs as vr}from"react/jsx-runtime";function Ax({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[i,m]=yn(r.defaultValue),[d,n]=yn(!1),u=yc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return vr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await c({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[vr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[vr("div",{className:"flex flex-col space-y-3",children:[Ue("h2",{className:"text-xl font-medium",children:e}),Ue("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ue("input",{...r,type:r.type||"text",required:!0,disabled:!!l,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":l})}):Ue("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),vr("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"?Ue("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,Ue("div",{className:"shrink-0",children:Ue(ie,{text:a,loading:d,disabled:u,disabledTooltip:l})})]})]})}import{useId as wc}from"react";import{jsx as xr,jsxs as Nc}from"react/jsx-runtime";function Ge({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[xr("defs",{children:xr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:xr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),xr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Cc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as ao}from"react/jsx-runtime";var Rc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Sc(!1),c=Pc(()=>l(!a),[a,l]);return ao("div",{children:[ao("div",{className:"relative flex",children:[Ke("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}),ao("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(Cc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("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:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(va,{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})]})});Rc.displayName="Input";import{flip as Dc,offset as Ec,size as Ic,useDismiss as Ac,useFloating as Oc,useInteractions as zc}from"@floating-ui/react";import{Command as Re,useCommandState as Hc}from"cmdk";import{Check as Vc,ChevronDown as _c,Search as Fc,X as Bc}from"lucide-react";import{createContext as Wc,forwardRef as Pn,useContext as lo,useEffect as no,useMemo as Nn,useRef as Cn,useState as io}from"react";import{Drawer as ct}from"vaul";import Tc from"next/image";import{useEffect as Lc,useState as wn}from"react";import{jsx as Mc}from"react/jsx-runtime";function Et(e){let[t,r]=wn(!0),[o,a]=wn(e.src);Lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Mc(Tc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as se}from"react/jsx-runtime";var yr=Wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function d2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Cn(null),[u,p]=io(!1),[v,h]=io(""),[b,g]=io(!1);no(()=>{u&&g(!1)},[u]),no(()=>g(!0),[v]),no(()=>{t&&h(t.value)},[t]);let y=Nn(()=>{let P=v.toLowerCase();return b?e.filter(X=>X.value.toLowerCase().includes(P)):v?e.sort((X,D)=>(D.value.toLowerCase().includes(P)?1:0)-(X.value.toLowerCase().includes(P)?1:0)):e},[b,v,e]),{refs:w,floatingStyles:R,context:C}=Oc({open:u,onOpenChange:p,middleware:[Ec(8),Ic({apply({elements:{floating:P},availableHeight:X}){Object.assign(P.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Dc({fallbackStrategy:"initialPlacement",padding:8})]}),k=Ac(C,{enabled:!d||!l}),{getReferenceProps:z,getFloatingProps:O}=zc([k]),S=Cn(null),{scrollProgress:x,updateScrollProgress:I}=De(S),N=Nn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Fc,{className:"size-4 text-neutral-400"}),[t,c]);return E(yr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:h,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(so,{className:o,iconElement:N})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:P=>{P.target instanceof Element&&P.target.closest("[data-sonner-toast]")&&P.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(so,{className:o,iconElement:N})}),u&&se(Re.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(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(kn,{items:y})]})]})}),E(ct.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(so,{className:o,iconElement:N,ref:w.setReference,...z()}),u&&se("div",{ref:w.setFloating,style:R,...O(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:S,onScroll:I,className:"grow overflow-y-auto p-2",children:[se(Re.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(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(kn,{items:y})]}),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(x,2)}})]})]})})}var so=Pn(({iconElement:e,className:t,...r},o)=>se("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}),se("div",{className:"flex h-10 grow",children:[E($c,{}),E(Uc,{})]})]})),$c=Pn((e,t)=>{let r=Hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:i,disabled:m}=lo(yr);return E(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!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 Uc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=lo(yr);return E("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Bc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(_c,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function kn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=lo(yr);return e.map(a=>se(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:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Et,{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(or,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as co from"@radix-ui/react-label";import{cva as Gc}from"class-variance-authority";import*as Sn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=Gc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=Sn.forwardRef(({className:e,...t},r)=>Yc(co.Root,{ref:r,className:s(Kc(),e),...t}));jc.displayName=co.Root.displayName;import{cva as Zc}from"class-variance-authority";import{isValidElement as qc}from"react";import{jsx as Rn,jsxs as Tn}from"react/jsx-runtime";var Xc=Zc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function N2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Tn(e||"button",{...e==="button"?{type:"button"}:{},className:s(Xc({variant:t}),l),...c,children:[Tn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Rn(o,{className:"size-4"})),r]}),a&&Rn("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 Jc=e=>qc(e);import{curveNatural as Ln}from"@visx/curve";import{LinearGradient as Mn}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 Dn}from"framer-motion";import{useId as nd,useMemo as En}from"react";import{jsx as xe,jsxs as mo}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function E2(e){return xe(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:l}){let c={...id,...l},i=nd(),m=En(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=En(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),h=new Date(Math.min(...v)),b=new Date(Math.max(...v));return{yScale:td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[h,b],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return mo("svg",{width:e,height:t,children:[mo("defs",{children:[xe(Mn,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),xe(Mn,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),mo(Qc,{left:c.left,top:c.top,children:[xe(od,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),xe(ad,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.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 le from"@radix-ui/react-dialog";import*as uo from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as oe,jsxs as dt}from"react/jsx-runtime";function V2({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=ld(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?oe(je.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(je.Portal,{children:[oe(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(je.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:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(uo.Root,{children:[oe(je.Title,{children:"Modal"}),oe(je.Description,{children:"This is a modal"})]}),oe(cd,{}),e]})}),oe(je.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(le.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:[dt(uo.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as wr,jsxs as mt}from"react/jsx-runtime";var In=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 B2({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[wr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(dd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&wr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("div",{className:"flex items-center gap-2",children:[wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),wr("button",{type:"button",className:In,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 md}from"lucide-react";import*as po from"react";import{jsx as Nr}from"react/jsx-runtime";var ud=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Root,{className:s("grid gap-2",e),...t,ref:r}));ud.displayName=Oe.Root.displayName;var pd=po.forwardRef(({className:e,...t},r)=>Nr(Oe.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:Nr(Oe.Indicator,{className:"flex items-center justify-center",children:Nr(md,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ye,jsxs as vd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:vd(ze.Portal,{children:[Ye(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className: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 gd({className:e,...t}){return Ye(ze.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function bd(e){return Ye(ze.Description,{...e})}function hd(e){return Ye(ze.Close,{...e})}var Z2=Object.assign(fd,{Title:gd,Description:bd,Close:hd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Nd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,Cd=`
|
|
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
|
-
`,Id=60,Ed=1e3/Id;function o4({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Td(null),[l,c]=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 z=0;z<2;++z){let R=z===0?Md:Dd,y=n.createShader(z===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!y){console.error("Failed to create shader");return}n.shaderSource(y,R),n.compileShader(y),n.getShaderParameter(y,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(y)),n.attachShader(u,y),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"),w=n.getUniformLocation(u,"speed");n.useProgram(u);let N=[1,1,-1,1,1,-1,-1,-1],T=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,T),n.bufferData(n.ARRAY_BUFFER,new Float32Array(N),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(w,r);let C,P=0;function _(z){if(z-P<Ed){C=requestAnimationFrame(_);return}P=z,n&&i&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,z/1e3),n.uniform2f(b,i.width,i.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),C=requestAnimationFrame(_)}return C=requestAnimationFrame(_),i.addEventListener("webglcontextlost",z=>{z.preventDefault(),c(!0),cancelAnimationFrame(C)}),()=>{cancelAnimationFrame(C),i.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),zn("div",{className:s("absolute inset-0",o,l&&"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 s4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:l,autoFocus:c=!1}){let i=Od(),m=zd(null);return Ad(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),_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?xt(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Er(d.target.value);n&&(t(n),d.target.value=xt(n))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let n=Er(m.current.value);n&&(t(n),m.current.value=xt(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:l,value:e?Eo(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),m.current&&(m.current.value=xt(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 Hn,jsxs as Wd}from"react/jsx-runtime";var Hd=_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"}}),Vd={neutral:ua,new:da,success:ca,pending:ma,warning:Or,error:Or};function f4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:l,...c}){let i=r!==null?r??Vd[t??"neutral"]:null;return Hn(er,{tooltipProps:{content:o},children:Wd("span",{className:s(Hd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...c,children:[i&&Hn(i,{className:"h-3 w-3 shrink-0"}),l]})})}import*as wr from"@radix-ui/react-switch";import{useMemo as Fd}from"react";import{jsx as yr}from"react/jsx-runtime";function N4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:l,checked:c=!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:c,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:l})});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 Vn}from"react";import{jsx as F,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 j4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:i,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[u,p]=Vn(e.columnVisibility??{}),[v,b]=Vn(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:c,columnVisibility:u,columnPinning:{left:[],right:[],...l},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,rowProps:o,cellRight:a,tdClassName:l,table:c}){let{className:i,...m}=o||{};return F("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",i),onClick:r?d=>{wt(d)||r(t,d)}:void 0,...m,children:t.getVisibleCells().map(d=>F("td",{className:s(po(d.column.id,!!r),"text-content-default group",fo(d.column,t.index===c.getRowModel().rows.length-1),typeof l=="function"?l(d.column.id):l),style:{width:d.column.getSize(),...go(d.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:uo(d.column.columnDef.cell,d.getContext())}),a==null?void 0:a(d)]})},d.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:l,sortBy:c,sortOrder:i,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:u,scrollWrapperClassName:p,thClassName:v,tdClassName:b,table:h,pagination:g,resourceName:w,onRowClick:N,rowProps:T,rowCount:C,children:P,enableColumnResizing:_=!1}){let z=jd(()=>_?h.getVisibleLeafColumns().reduce((R,y)=>R+y.getSize(),0):"100%",[_,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",_&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:_?"fixed":"auto",minWidth:z},children:[F("thead",{children:h.getHeaderGroups().map(R=>F("tr",{children:R.headers.map(y=>{let A=d.includes(y.column.id),k=A?"button":"div";return pe("th",{colSpan:y.colSpan,className:s(po(y.id),"text-content-emphasis select-none font-medium",fo(y.column,!h.getRowModel().rows.length),typeof v=="function"?v(y.column.id):v,_&&"relative"),style:{width:y.getSize(),...go(y.column)},children:[F("div",{className:"flex items-center justify-between gap-6 !pr-0",children:pe(k,{className:"flex items-center gap-2",...A&&{type:"button",disabled:!A,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:y.column.id,sortOrder:c!==y.column.id||i==="asc"?"desc":"asc"})},children:[y.isPlaceholder?null:uo(y.column.columnDef.header,y.getContext()),A&&c===y.column.id&&F(Ko,{className:"h-3 w-3 shrink-0",order:i||"desc"})]})}),_&&y.column.getCanResize()&&y.column.id!=="menu"&&F("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:S=>S.stopPropagation(),className:Zd})]},y.id)})},R.id))}),F("tbody",{children:h.getRowModel().rows.map(R=>{let y=typeof T=="function"?T(R):T,{className:A,...k}=y||{};return _?F(Yd,{row:R,onRowClick:N,rowProps:y,cellRight:l,tdClassName:b,table:h},`${R.id}-${h.getVisibleLeafColumns().map(S=>S.id).join(",")}`):F("tr",{className:s("group/row",N&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&R.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",A),onClick:N?S=>{wt(S)||N(R,S)}:void 0,...k,children:R.getVisibleCells().map(S=>F("td",{className:s(po(S.column.id,!!N),"text-content-default group",fo(S.column,R.index===h.getRowModel().rows.length-1),typeof b=="function"?b(S.column.id):b),style:{minWidth:S.column.columnDef.minSize,maxWidth:S.column.columnDef.maxSize,width:S.column.columnDef.size||"auto",...go(S.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:uo(S.column.columnDef.cell,S.getContext())}),l==null?void 0:l(S)]})},S.id))},R.id)})})]}),P]}):F("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(w==null?void 0:w(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!C&&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:[F("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",pe("span",{className:"font-medium",children:[((g.pageIndex-1)*g.pageSize+1).toLocaleString(),"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",F("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(w==null?void 0:w(h.getRowCount()!==1))||"items"]}),pe("div",{className:"flex items-center gap-2",children:[F(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),F(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),F(Ud,{children:r&&F(Gd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:F("div",{className:"flex h-[75vh] w-full items-center justify-center",children:F(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 Xd from"next/link";import{useId as Jd}from"react";import{jsx as kr,jsxs as Qd}from"react/jsx-runtime";function e3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let i=Jd();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:c,children:e.map(m=>{let d=m.value===t,n=m.href?Xd:"button";return Qd(n,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:s("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!d&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?kr("p",{children:m.label}):m.label,m.badge,d&&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",l),transition:{duration:.25}})]},m.value)})})})}import{useEffect as em,useId as tm,useRef as rm,useState as om}from"react";import{jsx as fe,jsxs as ho}from"react/jsx-runtime";var am=[{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 l3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=j(),i=tm(),[m,d]=om(!1),n=rm(null);return em(()=>{n.current&&!c&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:s("grid gap-y-3",l),children:am.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(w=>!w),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:w=>t(u,w.target.value)})})})]})},u))})}import{jsx as bo,jsxs as nm}from"react/jsx-runtime";function d3(){return nm("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%),
|
|
42
|
+
`,kd=60,Pd=1e3/kd;function Q2({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=yd(null),[l,c]=wd(!1);return xd(()=>{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 O=0;O<2;++O){let S=O===0?Nd:Cd,x=n.createShader(O===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!x){console.error("Failed to create shader");return}n.shaderSource(x,S),n.compileShader(x),n.getShaderParameter(x,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(x)),n.attachShader(u,x),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"),h=n.getUniformLocation(u,"resolution"),b=n.getUniformLocation(u,"dotSize"),g=n.getUniformLocation(u,"cellSize"),y=n.getUniformLocation(u,"speed");n.useProgram(u);let w=[1,1,-1,1,1,-1,-1,-1],R=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,R),n.bufferData(n.ARRAY_BUFFER,new Float32Array(w),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(b,e*window.devicePixelRatio),n.uniform1f(g,t*window.devicePixelRatio),n.uniform1f(y,r);let C,k=0;function z(O){if(O-k<Pd){C=requestAnimationFrame(z);return}k=O,n&&i&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,O/1e3),n.uniform2f(h,i.width,i.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),C=requestAnimationFrame(z)}return C=requestAnimationFrame(z),i.addEventListener("webglcontextlost",O=>{O.preventDefault(),c(!0),cancelAnimationFrame(C)}),()=>{cancelAnimationFrame(C),i.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),An("div",{className:s("absolute inset-0",o,l&&"opacity-0"),children:An("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{useEffect as Sd,useId as Rd,useRef as Td}from"react";import{jsx as Cr,jsxs as On}from"react/jsx-runtime";function o4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:l,autoFocus:c=!1}){let i=Rd(),m=Td(null);return Sd(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),On("div",{className:a,children:[r&&Cr("div",{className:"flex items-center gap-2",children:Cr("label",{htmlFor:`${i}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),On("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:[Cr("input",{ref:m,id:`${i}-datetime`,type:"text",placeholder:o,defaultValue:e?vt(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Or(d.target.value);n&&(t(n),d.target.value=vt(n))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let n=Or(m.current.value);n&&(t(n),m.current.value=vt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Cr("input",{type:"datetime-local",id:`${i}-datetime-local`,required:l,value:e?Io(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),m.current&&(m.current.value=vt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Ld}from"class-variance-authority";import{jsx as zn,jsxs as Ed}from"react/jsx-runtime";var Md=Ld("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"}}),Dd={neutral:ua,new:da,success:ca,pending:ma,warning:Hr,error:Hr};function d4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:l,...c}){let i=r!==null?r??Dd[t??"neutral"]:null;return zn(ar,{tooltipProps:{content:o},children:Ed("span",{className:s(Md({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...c,children:[i&&zn(i,{className:"h-3 w-3 shrink-0"}),l]})})}import*as Pr from"@radix-ui/react-switch";import{useMemo as Id}from"react";import{jsx as kr}from"react/jsx-runtime";function v4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:l,checked:c=!0,loading:i=!1,disabled:m=!1,disabledTooltip:d}){let n=Id(()=>d?!0:m||i,[d,m,i]),u=kr(Pr.Root,{checked:i?!1:c,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:kr(Pr.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:l})});return d?kr(J,{content:d,children:kr("div",{className:"inline-block leading-none",children:u})}):u}import{flexRender as fo,getCoreRowModel as Ad,useReactTable as Od}from"@tanstack/react-table";import{AnimatePresence as zd,motion as Hd}from"framer-motion";import{memo as Vd,useEffect as Sr,useMemo as _d,useState as Hn}from"react";import{jsx as F,jsxs as ue}from"react/jsx-runtime";var go=(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"]),Fd=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 $4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:i,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[u,p]=Hn(e.columnVisibility??{}),[v,h]=Hn(e.selectedRows??{});Sr(()=>{e.selectedRows&&!zr(e.selectedRows,v)&&h(e.selectedRows??{})},[e.selectedRows]),Sr(()=>{var g;(g=e.onRowSelectionChange)==null||g.call(e,b.getSelectedRowModel().rows)},[v]),Sr(()=>{e.columnVisibility&&!zr(e.columnVisibility,u)&&p(e.columnVisibility??{})},[e.columnVisibility]),Sr(()=>{var g;(g=e.onColumnVisibilityChange)==null||g.call(e,u)},[u]);let b=Od({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:Ad(),onPaginationChange:i,onColumnVisibilityChange:g=>p(g),onRowSelectionChange:h,state:{pagination:c,columnVisibility:u,columnPinning:{left:[],right:[],...l},rowSelection:v},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:u,table:b,enableColumnResizing:d}}var Bd=Vd(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:l,table:c}){let{className:i,...m}=o||{};return F("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",i),onClick:r?d=>{yt(d)||r(t,d)}:void 0,...m,children:t.getVisibleCells().map(d=>F("td",{className:s(go(d.column.id,!!r),"text-content-default group",bo(d.column,t.index===c.getRowModel().rows.length-1),typeof l=="function"?l(d.column.id):l),style:{width:d.column.getSize(),...ho(d.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:fo(d.column.columnDef.cell,d.getContext())}),a==null?void 0:a(d)]})},d.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function U4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:i,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:u,scrollWrapperClassName:p,thClassName:v,tdClassName:h,table:b,pagination:g,resourceName:y,onRowClick:w,rowProps:R,rowCount:C,children:k,enableColumnResizing:z=!1}){let O=_d(()=>z?b.getVisibleLeafColumns().reduce((S,x)=>S+x.getSize(),0):"100%",[z,b.getVisibleLeafColumns()]);return ue("div",{className:s("border-border-subtle bg-bg-default relative rounded-xl border",u),children:[!o&&!!(t!=null&&t.length)||r?ue("div",{className:s("relative min-h-[400px] overflow-x-auto rounded-[inherit]",p),children:[ue("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",z&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:z?"fixed":"auto",minWidth:O},children:[F("thead",{children:b.getHeaderGroups().map(S=>F("tr",{children:S.headers.map(x=>{let I=d.includes(x.column.id),N=I?"button":"div";return ue("th",{colSpan:x.colSpan,className:s(go(x.id),"text-content-emphasis select-none font-medium",bo(x.column,!b.getRowModel().rows.length),typeof v=="function"?v(x.column.id):v,z&&"relative"),style:{width:x.getSize(),...ho(x.column)},children:[F("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ue(N,{className:"flex items-center gap-2",...I&&{type:"button",disabled:!I,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:x.column.id,sortOrder:c!==x.column.id||i==="asc"?"desc":"asc"})},children:[x.isPlaceholder?null:fo(x.column.columnDef.header,x.getContext()),I&&c===x.column.id&&F(Ko,{className:"h-3 w-3 shrink-0",order:i||"desc"})]})}),z&&x.column.getCanResize()&&x.column.id!=="menu"&&F("div",{onMouseDown:x.getResizeHandler(),onTouchStart:x.getResizeHandler(),onClick:P=>P.stopPropagation(),className:Fd})]},x.id)})},S.id))}),F("tbody",{children:b.getRowModel().rows.map(S=>{let x=typeof R=="function"?R(S):R,{className:I,...N}=x||{};return z?F(Bd,{row:S,onRowClick:w,rowProps:x,cellRight:l,tdClassName:h,table:b},`${S.id}-${b.getVisibleLeafColumns().map(P=>P.id).join(",")}`):F("tr",{className:s("group/row",w&&"cursor-pointer select-none",b.getRowModel().rows.length>8&&S.index===b.getRowModel().rows.length-1&&"[&_td]:border-b-0",I),onClick:w?P=>{yt(P)||w(S,P)}:void 0,...N,children:S.getVisibleCells().map(P=>F("td",{className:s(go(P.column.id,!!w),"text-content-default group",bo(P.column,S.index===b.getRowModel().rows.length-1),typeof h=="function"?h(P.column.id):h),style:{minWidth:P.column.columnDef.minSize,maxWidth:P.column.columnDef.maxSize,width:P.column.columnDef.size||"auto",...ho(P.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:fo(P.column.columnDef.cell,P.getContext())}),l==null?void 0:l(P)]})},P.id))},S.id)})})]}),k]}):F("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(y==null?void 0:y(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!C&&ue("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:[ue("div",{children:[F("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ue("span",{className:"font-medium",children:[((g.pageIndex-1)*g.pageSize+1).toLocaleString(),"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,b.getRowCount()).toLocaleString()]})," ","of"," ",F("span",{className:"font-medium",children:b.getRowCount().toLocaleString()})," ",(y==null?void 0:y(b.getRowCount()!==1))||"items"]}),ue("div",{className:"flex items-center gap-2",children:[F(ie,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>b.previousPage(),disabled:g.pageIndex===1}),F(ie,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>b.nextPage(),disabled:g.pageIndex===b.getPageCount()})]})]}),F(zd,{children:r&&F(Hd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:F("div",{className:"flex h-[75vh] w-full items-center justify-center",children:F(Ne,{})})})})]})}var bo=(e,t)=>{let r=e.getIsPinned();return s(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},ho=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 Wd,motion as Vn}from"framer-motion";import $d from"next/link";import{useId as Ud}from"react";import{jsx as Rr,jsxs as Gd}from"react/jsx-runtime";function q4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let i=Ud();return Rr(Wd,{id:i,children:Rr(Vn.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:c,children:e.map(m=>{let d=m.value===t,n=m.href?$d:"button";return Gd(n,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:s("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!d&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?Rr("p",{children:m.label}):m.label,m.badge,d&&Rr(Vn.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",l),transition:{duration:.25}})]},m.value)})})})}import{useEffect as Kd,useId as jd,useRef as Yd,useState as Zd}from"react";import{jsx as pe,jsxs as vo}from"react/jsx-runtime";var qd=[{key:"utm_source",icon:Na,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ta,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:ya,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Sa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ra,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:wa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function ay({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=j(),i=jd(),[m,d]=Zd(!1),n=Yd(null);return Kd(()=>{n.current&&!c&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),pe("div",{className:s("grid gap-y-3",l),children:qd.map(({key:u,icon:p,label:v,placeholder:h,description:b},g)=>pe("div",{className:"group relative",children:vo("div",{className:"relative z-10 flex",children:[pe(J,{content:vo("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:b}),pe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:vo("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(y=>!y),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${i}-${u}`,className:"select-none text-sm",children:m?pe("span",{className:"font-mono text-xs",children:u}):v})]})}),pe("div",{className:"min-w-0 grow",children:pe(ar,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${i}-${u}`,ref:g===0?n:void 0,placeholder:h,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:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as xo,jsxs as Xd}from"react/jsx-runtime";function iy(){return Xd("div",{style:Tr.backgroundMain,children:[xo("div",{style:Tr.backgroundMainBefore}),xo("div",{style:Tr.backgroundMainAfter}),xo("div",{style:Tr.backgroundContent})]})}var Tr={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 jm from"next/image";import We from"next/link";import{useParams as Zm}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:tt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:rt,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:et,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"}],h3=[{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"}],b3=[{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 im}from"react/jsx-runtime";function Rr({className:e,children:t}){return im("div",{className:s("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ve from"@radix-ui/react-popover";import{BoxSelect as zm,Home as _m,LayoutGrid as Hm,Type as Vm}from"lucide-react";import{useParams as Wm}from"next/navigation";import{useCallback as Fm,useContext as Bm,useState as $m}from"react";import{toast as Um}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 ym}from"framer-motion";import zt from"next/link";import{useParams as wm,usePathname as Nm}from"next/navigation";import{createContext as km,useId as Cm}from"react";import Pm 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 sm}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(sm,{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:Vt(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 lm}from"react";import{jsx as f,jsxs as de}from"react/jsx-runtime";function Yn(e){let t=lm();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 dm,jsx as Me,jsxs as At}from"react/jsx-runtime";var cm=[{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:cm.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&&At(dm,{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),At("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[At("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)=>At("div",{className:s("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:Vt(o)}),At("span",{className:"text-content-default text-[9px] font-medium",children:["$",Wt(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",mm="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:l,...c}){return we(Xn,{asChild:!0,children:we(Jn,{className:s(mm,a),...c,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})]}),l&&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 Ot}from"react/jsx-runtime";var um=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(tt,{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(et,{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(rt,{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,{})}],pm=[{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 Ot("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:um.map(({title:t,description:r,icon:o,href:a,color:l,graphicsContainerClassName:c,graphic:i})=>O(ti,{asChild:!0,children:Ot(oi,{href:V(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(It,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Ot("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)]",c),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":l}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:pm.map(({title:t,description:r,href:o,graphic:a})=>O(ti,{asChild:!0,children:Ot(oi,{href:V(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(It,{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:Ot("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 gm from"next/image";import si from"next/link";import{useId as fm}from"react";import{jsx as x,jsxs as ut}from"react/jsx-runtime";function ni({className:e,...t}){let r=fm();return ut("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:s("",e),...t,children:[x("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"}),ut("g",{opacity:"0.5",children:[x("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:x("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),x("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:x("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"})})]}),x("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:x("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"})}),x("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"}),x("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),ut("defs",{children:[ut("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#fff",stopOpacity:"0"}),x("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),ut("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#5B5B5B"}),x("stop",{offset:"1",stopColor:"#757575"})]}),ut("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[x("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),x("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),x("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),x("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"}),x("feOffset",{dx:"-0.991",dy:"0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),x("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),x("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"}),x("feOffset",{dx:"0.991",dy:"-0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("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"}),x("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),x("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as ee,jsxs as Xe}from"react/jsx-runtime";var hm=[{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:hm.map(({title:t,description:r,thumbnail:o,href:a})=>ee(ii,{asChild:!0,children:Xe(si,{href:V(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(gm,{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:V(a,e,Ne({domain:e,utm_content:t}))},t)),ee(ii,{asChild:!0,children:Xe(si,{href:V("/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 bm}from"@radix-ui/react-navigation-menu";import vm from"next/link";import{jsx as te,jsxs as pt}from"react/jsx-runtime";var xm=[{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 pt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[pt("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:xm.map(({icon:t,title:r,description:o,href:a})=>te(bm,{asChild:!0,children:pt(vm,{href:V(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:[pt("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(It,{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"}),pt("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))})]}),pt("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:V(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 Tm,jsx as B,jsxs as ft}from"react/jsx-runtime";var wo=km({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 I6({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=wm();t&&(o=t);let a=Cm(),l=Xa(40),c=Nm(),{data:i,isLoading:m}=Pm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return B(wo.Provider,{value:{theme:e},children:B(ym,{id:a,children:ft("div",{className:s("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:s("absolute inset-0 block border-b border-transparent transition-all",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(Rr,{className:s("relative",r),children:ft("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(zt,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(Lr,{})})}),ft(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(me.List,{className:"group relative z-0 flex",children:No.map(({name:d,href:n,segments:u,content:p})=>{let v=u.some(b=>c==null?void 0:c.startsWith(b));return ft(me.Item,{children:[B(Rm,{trigger:!!p,children:n!==void 0?B(zt,{id:`nav-${n}`,href:V(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:di,"data-active":v,children:d}):ft("button",{className:di,"data-active":v,children:[d,B(Sm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(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:B(p,{domain:o})})]},d)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(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]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:i&&Object.keys(i).length>0?B(zt,{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:ft(Tm,{children:[B(zt,{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"}),B(zt,{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 Sm(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("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 Rm({trigger:e,children:t}){return e?B(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Lm,Menu as Mm,X as Dm}from"lucide-react";import gt from"next/link";import{useParams as Po}from"next/navigation";import{useEffect as Im,useState as ui}from"react";import Em from"swr";import{Fragment as Om,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(tt,{className:"size-3 text-orange-900"})}),"Dub Partners":L("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:L(rt,{className:"size-3 text-violet-900"})}),"Dub Analytics":L("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:L(et,{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 j6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Po();t&&(r=t);let[o,a]=ui(!1);Im(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l,isLoading:c}=Em(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:[l&&Object.keys(l).length>0?L(Co,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):c?null: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(Dm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):L(Mm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),L("nav",{className:s("fixed inset-0 z-20 hidden max-h-screen w-full overflow-y-auto 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:i,href:m,childItems:d},n)=>L(Am,{name:i,href:m,childItems:d,setOpen:a},n)),l&&Object.keys(l).length>0?L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(Om,{children:[L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Am=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Po(),[l,c]=ui(!1);return r?L("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[L("p",{className:"font-semibold",children:e}),L(Lm,{className:s("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&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(gt,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},mi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:l="normal"})=>{let{domain:c="dub.co"}=Po(),i=ko==null?void 0:ko[e];return De(gt,{href:V(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,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",l==="small"&&"size-8"),children:i??L(o,{className:s("size-5 text-neutral-700 grayscale",l==="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(gt,{...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 Gm=`<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 Bm from"next/image";import Ve from"next/link";import{useParams as Wm}from"next/navigation";import{jsx as _n}from"react/jsx-runtime";function Fn(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"})})}import{jsx as Bn}from"react/jsx-runtime";function It({className:e}){return Bn("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:Bn("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"})})}var Lr=[{title:"Dub Links",description:"Short links with superpowers",icon:tt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:rt,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:et,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Ut,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ma,href:"/integrations"}],gy=[{icon:qo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Zo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Fn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],yo=[{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"}],Wn=[{icon:qt,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:Nt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:yo}],At=[{icon:Xt,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:Zt,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Nt,title:"About",description:"Company, values, and team",href:"/about"},{icon:oa,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:xa,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:aa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:It,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:ba,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],$n=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Un=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],by=[{name:"X (Twitter)",icon:jt,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Kt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Gt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Yt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Jd}from"react/jsx-runtime";function Mr({className:e,children:t}){return Jd("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 Mm,Home as Dm,LayoutGrid as Em,Type as Im}from"lucide-react";import{useParams as Am}from"next/navigation";import{useCallback as Om,useContext as zm,useState as Hm}from"react";import{toast as Vm}from"sonner";import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as fm}from"framer-motion";import _t from"next/link";import{useParams as gm,usePathname as bm}from"next/navigation";import{createContext as hm,useId as vm}from"react";import xm from"swr";import{Link as qn}from"@radix-ui/react-navigation-menu";import Xn from"next/image";import Jn from"next/link";import{Link2 as Qd}from"lucide-react";import{jsx as Y,jsxs as q}from"react/jsx-runtime";var Gn={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},Ze={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 Kn({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:[Y("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"}),Y("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Y("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:[Y(Qd,{className:"size-3 rotate-90"}),"d.to/try"]}),Y("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Y("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:[Y("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:Gn[t].color}}),Y("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"?"$":"",Gn[t].value]})]},t))})]}),Y("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:[Y("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:Ze.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:[Y(fa,{className:"text-content-default size-3.5"}),Ze.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:[Y("img",{src:`https://flag.vercel.app/m/${Ze.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),Ze.country]})]})]}),Y("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:Ze.name}),Y("div",{className:"text-content-subtle mt-px text-xs",children:Ze.email})]}),Y("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(Ze.details).map(([t,r])=>q("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Y("span",{className:"text-content-muted truncate font-medium",children:t}),Y("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as em}from"react";import{jsx as f,jsxs as ce}from"react/jsx-runtime";function jn(e){let t=em();return ce("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:[ce("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"})}),ce("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"}),ce("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"})}),ce("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"}),ce("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"})}),ce("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"}),ce("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"})}),ce("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)"})}),ce("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"})]}),ce("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"})]}),ce("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 rm,jsx as Te,jsxs as Ot}from"react/jsx-runtime";var tm=[{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 Yn({className:e}){return Te("div",{className:s("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Te("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:tm.map((t,r)=>Te("div",{className:"h-[60px] w-[180px] p-[3px]",children:Te("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Ot(rm,{children:[Te("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:[Te("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"}),Te("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Te("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:[Te("span",{className:"text-content-muted text-[6px] font-medium",children:Wt(o)}),Ot("span",{className:"text-content-default text-[9px] font-medium",children:["$",$t(t[o])]})]},o))})]})]})})},r))})})}import{Link as om}from"@radix-ui/react-navigation-menu";import am from"next/link";import{jsx as zt,jsxs as Zn}from"react/jsx-runtime";var qe="text-xs uppercase text-neutral-500 dark:text-white/60",nm="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",ye=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Ht({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return zt(om,{asChild:!0,children:zt(am,{className:s(nm,a),...c,children:Zn("div",{className:"flex items-center justify-between gap-3",children:[e,Zn("div",{className:"flex-1",children:[zt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&zt("p",{className:s("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&zt($o,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}import{jsx as A,jsxs as Vt}from"react/jsx-runtime";var im=[{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:A(tt,{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:A(jn,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:A(et,{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:A(Kn,{className:"absolute bottom-0 left-0 size-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:A(rt,{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:A(Yn,{})}],sm=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:A("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:A(Xn,{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:A("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:A(Xn,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function Qn({domain:e}){return Vt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[A("div",{className:"grid grid-cols-3 gap-4",children:im.map(({title:t,description:r,icon:o,href:a,color:l,graphicsContainerClassName:c,graphic:i})=>A(qn,{asChild:!0,children:Vt(Jn,{href:V(a,e,ye({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:[A(Ge,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Vt("div",{className:"relative p-5 pb-0",children:[o,A("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),A("div",{className:"relative mt-10 h-40 grow",children:A("div",{className:s("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:A("div",{className:"relative size-full",children:i})})}),A("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":l}})]})},t))}),A("div",{className:"grid grow grid-cols-2 gap-4",children:sm.map(({title:t,description:r,href:o,graphic:a})=>A(qn,{asChild:!0,children:Vt(Jn,{href:V(o,e,ye({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:[A(Ge,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),A("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),A("div",{className:"relative flex items-center justify-between px-5 py-4",children:Vt("div",{children:[A("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as lm}from"@radix-ui/react-navigation-menu";import cm from"next/link";import{jsx as G,jsxs as Xe}from"react/jsx-runtime";var dm=[{icon:Xt,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:Zt,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function ei({domain:e}){return Xe("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Xe("div",{className:"flex h-full flex-col p-4",children:[G("p",{className:s(qe,"mb-4 ml-2"),children:"Explore"}),G("div",{className:"grid grow grid-cols-2 gap-4",children:dm.map(({icon:t,title:r,description:o,href:a})=>G(lm,{asChild:!0,children:Xe(cm,{href:V(a,e,ye({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:[Xe("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[G("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:G(Ge,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),G("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)]")})]}),G(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),Xe("div",{className:"relative",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),G("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),Xe("div",{className:"px-6 py-4",children:[G("p",{className:s(qe,"mb-2"),children:"Company"}),G("div",{className:"flex flex-col gap-0.5",children:At.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Ht,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),Xe("div",{className:"px-6 py-4",children:[G("p",{className:s(qe,"mb-2"),children:"Updates"}),G("div",{className:"flex flex-col gap-0.5",children:At.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Ht,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as mm}from"@radix-ui/react-navigation-menu";import um from"next/link";import{jsx as ee,jsxs as ut}from"react/jsx-runtime";var pm=[{icon:qt,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:Nt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function ti({domain:e}){return ut("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ut("div",{className:"flex h-full flex-col p-4",children:[ee("p",{className:s(qe,"mb-4 ml-2"),children:"Use case"}),ee("div",{className:"grid grow grid-cols-3 gap-4",children:pm.map(({icon:t,title:r,description:o,href:a})=>ee(mm,{asChild:!0,children:ut(um,{href:V(a,e,ye({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:[ut("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[ee("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:ee(Ge,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),ee("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)]")})]}),ee(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ut("div",{className:"relative",children:[ee("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),ee("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ut("div",{className:"px-6 py-4",children:[ee("p",{className:s(qe,"mb-2"),children:"SDKs"}),ee("div",{className:"flex flex-col gap-0.5",children:yo.map(({icon:t,iconClassName:r,title:o,href:a})=>ee(Ht,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:o})),icon:ee("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:ee(t,{className:s("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Nm,jsx as B,jsxs as pt}from"react/jsx-runtime";var wo=hm({theme:"light"}),No=[{name:"Product",content:Qn,childItems:Lr,segments:["/home","/partners","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:ti,childItems:Wn,segments:["/solutions","/sdks"]},{name:"Resources",content:ei,childItems:At,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],ri=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 P3({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=gm();t&&(o=t);let a=vm(),l=Za(40),c=bm(),{data:i,isLoading:m}=xm(o.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return B(wo.Provider,{value:{theme:e},children:B(fm,{id:a,children:pt("div",{className:s("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:s("absolute inset-0 block border-b border-transparent transition-all",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(Mr,{className:s("relative",r),children:pt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(_t,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(Dr,{})})}),pt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(de.List,{className:"group relative z-0 flex",children:No.map(({name:d,href:n,segments:u,content:p})=>{let v=u.some(h=>c==null?void 0:c.startsWith(h));return pt(de.Item,{children:[B(wm,{trigger:!!p,children:n!==void 0?B(_t,{id:`nav-${n}`,href:V(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:ri,"data-active":v,children:d}):pt("button",{className:ri,"data-active":v,children:[d,B(ym,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(de.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:B(p,{domain:o})})]},d)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(de.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]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:i&&Object.keys(i).length>0?B(_t,{href:we,className:s(ne({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:pt(Nm,{children:[B(_t,{href:"https://app.dub.co/login",className:s(ne({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"}),B(_t,{href:"https://app.dub.co/register",className:s(ne({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 ym(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("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 wm({trigger:e,children:t}){return e?B(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Cm,Menu as km,X as Pm}from"lucide-react";import ft from"next/link";import{useParams as Po}from"next/navigation";import{useEffect as Sm,useState as ai}from"react";import Rm from"swr";import{Fragment as Lm,jsx as T,jsxs as Le}from"react/jsx-runtime";var Co={"Dub Links":T("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:T(tt,{className:"size-3 text-orange-900"})}),"Dub Partners":T("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:T(rt,{className:"size-3 text-violet-900"})}),"Dub Analytics":T("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:T(et,{className:"size-3 text-green-900"})}),"Dub API":T("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:T(Ut,{className:"size-3 text-neutral-900"})})};function F3({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Po();t&&(r=t);let[o,a]=ai(!1);Sm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l,isLoading:c}=Rm(r.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return Le("div",{className:s("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[l&&Object.keys(l).length>0?T(ko,{href:we,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Le("div",{className:"flex gap-2 max-[280px]:hidden",children:[T(ko,{variant:"secondary",href:`${we}/login`,children:"Log in"}),T(ko,{href:`${we}/register`,children:"Sign Up"})]}),T("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?T(Pm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):T(km,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),T("nav",{className:s("fixed inset-0 z-20 hidden max-h-screen w-full overflow-y-auto 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:[No.map(({name:i,href:m,childItems:d},n)=>T(Tm,{name:i,href:m,childItems:d,setOpen:a},n)),l&&Object.keys(l).length>0?T("li",{className:"py-3 min-[281px]:hidden",children:T(ft,{href:we,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Le(Lm,{children:[T("li",{className:"py-3 min-[281px]:hidden",children:T(ft,{href:`${we}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),T("li",{className:"py-3 min-[281px]:hidden",children:T(ft,{href:`${we}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Tm=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Po(),[l,c]=ai(!1);return r?T("li",{className:"py-3",children:Le(ke,{height:!0,children:[Le("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[T("p",{className:"font-semibold",children:e}),T(Cm,{className:s("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&T("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((i,m)=>"items"in i?Le("div",{className:"grid grid-cols-1 gap-3",children:[T("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:i.label}),i.items.map((d,n)=>T(oi,{item:d,setOpen:o,size:"small"},n))]},m):T(oi,{item:i,setOpen:o},m))})]})}):t?T("li",{className:"py-3",children:T(ft,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},oi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:l="normal"})=>{let{domain:c="dub.co"}=Po(),i=Co==null?void 0:Co[e];return Le(ft,{href:V(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[T("div",{className:s("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",l==="small"&&"size-8"),children:i??T(o,{className:s("size-5 text-neutral-700 grayscale",l==="small"&&"size-4")})}),Le("div",{children:[T("div",{className:"flex items-center gap-2",children:T("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&T("p",{className:"text-sm text-neutral-500",children:t})]})]})};function ko({variant:e,className:t,...r}){return T(ft,{...r,className:s("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ne({variant:e}),t)})}import{jsx as ni}from"react/jsx-runtime";function ii({className:e}){return ni("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:ni("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 si}from"react/jsx-runtime";var _m=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
|
|
50
|
-
</svg>`,
|
|
50
|
+
</svg>`,Fm=`<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 Lr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Wm(),{theme:a}=Bm(wo),[l,c]=$m(!1),i=Fm(n=>{n.preventDefault(),c(!0)},[]),[,m]=nt();function d(n){Um.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return gi(Ve.Root,{open:l,onOpenChange:c,children:[Y(Ve.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(Ve.Portal,{children:Y(Ve.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!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(_t,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Gm),icon:Y(xo,{className:"h-4 w-4"})}),Y(_t,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Km),icon:Y(Vm,{strokeWidth:2,className:"h-4 w-4"})}),Y(_t,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(zm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(_t,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(_m,{strokeWidth:2,className:"h-4 w-4"})}):Y(_t,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(Hm,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function _t({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 $}from"react/jsx-runtime";var Ym=[{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"}],ht={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:"Careers",href:"/careers"},{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}`}))},bt="text-sm font-medium text-neutral-900",vt="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 x5({staticDomain:e,className:t}){let{domain:r="dub.co"}=Zm();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:$("footer",{children:[$("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[$("div",{className:"flex flex-col gap-6",children:[D("div",{className:"grow",children:$(We,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[$("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:Ym.map(({name:o,icon:a,href:l})=>$("a",{href:l,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))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[D("h3",{className:bt,children:"Product"}),D("ul",{role:"list",className:vt,children:ht.product.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),$("div",{children:[D("h3",{className:bt,children:"Solutions"}),D("ul",{role:"list",className:vt,children:ht.solutions.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:bt,children:"Resources"}),D("ul",{role:"list",className:vt,children:ht.resources.map(o=>D("li",{children:$(We,{href:V(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))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[D("h3",{className:bt,children:"Compare"}),D("ul",{role:"list",className:vt,children:ht.compare.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),$("div",{children:[D("h3",{className:bt,children:"Legal"}),$("ul",{role:"list",className:vt,children:[ht.legal.map(o=>D("li",{children:D(We,{href:V(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:$("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",D(zr,{className:"size-3.5"})]})})]})]})]}),$("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:bt,children:"Tools"}),D("ul",{role:"list",className:vt,children:ht.tools.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(mn,{}),D(We,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:D(jm,{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"})}),$("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as qm,motion as Xm}from"framer-motion";import{useEffect as Jm,useState as Qm}from"react";import{jsx as hi}from"react/jsx-runtime";var bi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=Qm(!1);Jm(()=>{l(!0)},[]);let c=r?Xm.div:"div";return hi(qm,{children:a?hi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as eu}from"class-variance-authority";import{toast as tu}from"sonner";import{jsx as So,jsxs as ou}from"react/jsx-runtime";var ru=eu("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 D5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=nt(),i=o||Bo;return ou("button",{onClick:m=>{m.stopPropagation(),tu.promise(c(t),{success:a||"Copied to clipboard!"})},className:s(ru({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),l?So(Zo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as au}from"sonner";import{jsx as nu}from"react/jsx-runtime";function z5({value:e,children:t,className:r,successMessage:o}){let[a,l]=nt();return nu("button",{onClick:c=>{c.stopPropagation(),au.promise(l(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 iu,jsxs as su}from"react/jsx-runtime";function H5({icon:e,text:t}){return su("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,iu("p",{className:"truncate text-sm",children:t})]})}import{jsx as lu}from"react/jsx-runtime";var W5=({children:e})=>lu("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 G5({apexDomain:e,className:t,imageProps:r}){return e?Ro(Et,{src:`${Vo}${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 cu}from"next/navigation";import{useEffect as du,useMemo as mu,useRef as uu}from"react";import pu from"swr";import{useDebounce as fu}from"use-debounce";import{Fragment as xi,jsx as K,jsxs as Fe}from"react/jsx-runtime";function ty({defaultUrl:e}){let t=cu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=fu(_o(r),500),a=mu(()=>Ho(o||""),[o]),{data:l,isValidating:c}=pu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=l||{},n=uu(null);du(()=>{!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:[c&&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(Nt,{})}),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 ry({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(Nt,{})})})]})}import{AnimatePresence as gu}from"framer-motion";import yi from"js-cookie";import{createContext as hu,useState as bu}from"react";import{jsx as To}from"react/jsx-runtime";var vu=hu({hidePopup:()=>{}});function cy({children:e,hiddenCookieId:t}){let[r,o]=bu(yi.get(t)==="1"),a=()=>{o(!0),yi.set(t,"1")};return To(bi,{children:To(vu.Provider,{value:{hidePopup:a},children:To(gu,{children:!r&&e})})})}import{motion as xu}from"framer-motion";import{jsx as wi}from"react/jsx-runtime";function py({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(xu.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 yu,motion as wu}from"framer-motion";import Nu from"next/link";import{useId as ku}from"react";import{jsx as Ht,jsxs as Ni}from"react/jsx-runtime";var Cu=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"}}),Pu=ki("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function Cy({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=ku();return Ht("div",{className:s("flex text-sm",a),children:Ht(yu,{id:l,children:t.map(({id:c,label:i,href:m,target:d})=>{let n=c===r;return Ni(m?Nu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ni("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:s(Cu({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(wu.div,{layoutId:"indicator",transition:{duration:.1},className:Pu({variant:e}),children:Ht("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Lo,jsxs as Ci}from"react/jsx-runtime";var Su=[{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 Ry(){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:Su.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 Ru}from"react/jsx-runtime";function My({className:e}){return Ru("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,E1 as Accordion,Ii as AccordionContent,Mi as AccordionItem,Di as AccordionTrigger,Ry as AdvancedLinkFeaturesTooltip,Uu as Africa,rp as Airtm,zi as Alert,Hi as AlertDescription,_i as AlertTitle,qu as Amazon,cp as AndroidLogo,Se as AnimatedSizeContainer,dp as AppleLogo,mp as ArrowBoldUp,up as ArrowRight,pp as ArrowTrendUp,fp as ArrowTurnLeft,gp as ArrowTurnRight2,ra as ArrowUpRight,hp as ArrowsOppositeDirectionX,bp as ArrowsOppositeDirectionY,Gu as Asia,Co as AuthButton,F1 as Avatar,d3 as Background,Qt as Badge,vp as BadgeCheck,xp as BadgeCheck2Fill,lg as BadgeTooltip,yp as Blog,Et as BlurImage,wp as Bolt,Np as BoltFill,Cp as Book2,oa as Book2Fill,Pp as Book2Small,kp as BookOpen,Sp as Books2,Rp as BoxArchive,Tp as BracketsCurly,Lp as Brush,Mp as BulletList,aa as BulletListFill,se as Button,cg as ButtonTooltip,Un as COMPARE_PAGES,h3 as CUSTOMER_STORIES,Dp as Calculator,an as Calendar,Op as Calendar6,Ep as CalendarDays,Ip as CalendarIcon,Ap as CalendarRefresh,Wu as CardAmex,Fu as CardDiscover,Eg as CardList,Bu as CardMastercard,$u as CardVisa,zp as Cards,_p as CaretUpFill,gs as Carousel,hs as CarouselContent,bs as CarouselItem,Xg as CarouselNavBar,xs as CarouselNext,vs as CarouselPrevious,sh as CarouselThumbnail,ih as CarouselThumbnails,op as CashApp,Hp as ChartActivity2,Vp as ChartArea2,Wp as ChartLine,Xu as ChatGPT,na as Check,ia as Check2,Ms as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Fp as CircleCheckFill,Bp as CircleDollar,$p as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Up as CirclePercentage,Gp as CirclePlay,Kp as CirclePlayFill,jp as CircleQuestion,Zp as CircleUser,Or as CircleWarning,Yp as CircleXmark,qp as Circles,Xp as Circles3,bi as ClientOnly,pa as CloudUpload,Jp as Code,Qp as ColorPalette2,Qb as Combobox,My as CompositeLogo,e0 as ConnectedDots,r0 as ConnectedDots4,t0 as ConnectedDotsFill,o0 as Connections3,Bo as Copy,D5 as CopyButton,z5 as CopyText,a0 as CreditCard,n0 as Crosshairs3,i0 as Crown,Tu as CrownSmall,s0 as Cube,l0 as CubeSettings,c0 as CubeSettingsFill,d0 as CurrencyDollar,fa as CursorRays,m0 as DatabaseKey,jr as DatePickerContext,_v as DateRangePicker,u0 as Desktop,p0 as DiamondTurnRight,Kt as DiamondTurnRightFill,f0 as Directions,g0 as Discount,h0 as Dots,b0 as Download,et as DubAnalyticsIcon,Ft as DubApiIcon,Lu as DubCraftedShield,tt as DubLinksIcon,rt as DubPartnersIcon,mn as DubStatusBadge,v0 as Duplicate,er as DynamicTooltipWrapper,ga as Earth,x0 as EarthPosition,Yv as EmptyState,y0 as Envelope,w0 as EnvelopeAlert,N0 as EnvelopeArrowRight,Ku as Europe,$o as ExpandingArrow,ha as Eye,ba as EyeSlash,Pr as FEATURES_LIST,Iu as Facebook,va as FeatherFill,Ju as Figma,k0 as FileContent,i2 as FileUpload,C0 as FileZip2,D2 as Filter,S0 as Filter2,P0 as FilterBars,T0 as Flag2,xa as Flag6,R0 as FlagWavy,L0 as Flask,M0 as FlaskSmall,D0 as Folder,z0 as Folder5,I0 as FolderBookmark,E0 as FolderLock,A0 as FolderPlus,O0 as FolderShield,x5 as Footer,H2 as Form,_0 as GamingConsole,H0 as Gauge6,V0 as Gear,W0 as Gear2,F0 as Gear3,B0 as Gem,ya as Gift,$0 as GiftFill,Qu as GitHubEnhanced,Bt as Github,U0 as Globe,Na as Globe2,wa as GlobePointer,G0 as GlobeSearch,Xo as Go,Eu as Google,ep as GoogleEnhanced,K0 as GreekTemple,It as Grid,j0 as GridIcon,Z0 as GridLayoutRows,Y0 as GridPlus,q0 as GripDotsVertical,X0 as Headset,ka as HeadsetFill,Ca as HeartFill,Pa as HexadecagonStar,J0 as History,Q0 as Hyperlink,H5 as IconMenu,ef as Icosahedron,Sa as Incognito,ig as InfoTooltip,W5 as InlineSnippet,Oc as Input,tf as InputPassword,Ra as InputPasswordPointer,Ta as InputSearch,fx as InputSelect,Au as Instagram,rf as InvoiceDollar,of as Key,Ua as KeyboardShortcutContext,Wh as KeyboardShortcutProvider,Gn as LEGAL_PAGES,td as Label,af as LayoutSidebar,nf as License,sf as LinesY,cf as Link4,lf as LinkBroken,G5 as LinkLogo,ty as LinkPreview,ry as LinkPreviewPlaceholder,$t as LinkedIn,ng as LinkifyTooltipContent,Nt as LoadingCircle,Du as LoadingDots,Ce as LoadingSpinner,df as LocationPin,mf as LockFill,xo as Logo,Uo as Magic,uf as Magnifier,pf as MapPosition,ff as MarketingTarget,Mu as MatrixLines,Rr as MaxWidthWrapper,gf as Menu3,Sx as MenuItem,hf as MessageSmile,jt as MicrophoneFill,zx as MiniAreaChart,bf as MobilePhone,Bx as Modal,vf as MoneyBill,xf as MoneyBill2,yf as MoneyBills2,wf as Msgs,I6 as Nav,wo as NavContext,j6 as NavMobile,Lr as NavWordmark,ju as NorthAmerica,Nf as Note,Mf as NucleoPhoto,sg as NumberTooltip,Zu as Oceania,kf as OfficeBuilding,R1 as PLAN_FEATURE_ICONS,La as Page2,Gx as PaginationControls,Cf as Paintbrush,Pf as Palette2,Sf as PaperPlane,ap as Payoneer,np as Paypal,Tf as Pen2,Rf as PenWriting,Lf as PercentageArrowDown,Go as Photo,Jo as Php,Df as Plug2,Zt as Plus,If as Plus2,lt as Popover,cy as Popup,vu as PopupContext,Ef as Post,Ou as Prisma,Yo as ProductHunt,py as ProgressBar,Af as Pyramid,Qo as Python,Of as QRCode,Sr as RESOURCES,yd as RadioGroup,wd as RadioGroupItem,qo as Raycast,zf as Receipt2,zr as ReferredVia,_f as Refresh2,Hf as Robot,ea as Ruby,vo as SDKS,b3 as SOCIAL_LINKS,$n as SOLUTIONS,Ma as SatelliteDish,Vf as ScanText,Wf as Scribble,Qx as Sheet,Ff as ShieldAlert,Bf as ShieldCheck,$f as ShieldKeyhole,Uf as ShieldSlash,Gf as ShieldUser,o4 as ShimmerDots,Kf as Shuffle,ag as SimpleTooltipContent,zu as Slack,jf as Sliders,s4 as SmartDateTimePicker,Ko as SortOrder,Yu as SouthAmerica,Zf as Sparkle3,tp as Spotify,Yf as SquareChart,qf as SquareLayoutGrid5,Xf as SquareLayoutGrid6,Jf as SquareXmark,Qf as Stars2,f4 as StatusBadge,ip as Stripe,sp as StripeLink,jo as Success,N4 as Switch,l1 as TV,Cy as TabSelect,Z4 as Table,e1 as TableIcon,t1 as TableRows2,r1 as Tablet,o1 as Tag,a1 as Tags,Zo as Tick,_u as TikTok,Da as Timer2,Hu as Tinybird,Ia as Toggle2Fill,e3 as ToggleGroup,n1 as Toggles,B1 as TokenAvatar,J as Tooltip,og as TooltipContent,rg as TooltipProvider,i1 as Trash,s1 as TriangleWarning,Ut as Twitter,ta as Typescript,l3 as UTMBuilder,am as UTM_PARAMETERS,c1 as UiCard,Vu as Unsplash,d1 as User,m1 as UserCheck,u1 as UserCrown,p1 as UserDelete,f1 as UserFocus,g1 as UserPlus,h1 as Users,v1 as Users2,x1 as Users6,Yt as UsersFill,b1 as UsersSettings,lp as Venmo,y1 as Versions2,Ea as Views,w1 as Watch,N1 as Webhook,k1 as Window,C1 as WindowSearch,P1 as WindowSettings,fi as Wordmark,S1 as Xmark,Gt as YouTube,$i as badgeVariants,ie as buttonVariants,Fi as getUserAvatarUrl,No as navItems,Hd as statusBadgeVariants,be as useCarousel,Wa as useCarouselActiveIndex,fh as useCookies,nt as useCopyToClipboard,xh as useCurrentAnchor,kh as useEnterSubmit,Rh as useInViewport,Mh as useInputFocused,Ah as useIntersectionObserver,it as useKeyboardShortcut,$h as useLocalStorage,j as useMediaQuery,Zh as useOptimisticUpdate,ib as usePagination,cb as useRemoveGAParams,rr as useResizeObserver,Za as useRouterStuff,Xa as useScroll,Ee as useScrollProgress,j4 as useTable,ja as useTablePagination,Cb as useToastWithUndo};
|
|
52
|
+
</svg>`;function Dr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Am(),{theme:a}=zm(wo),[l,c]=Hm(!1),i=Om(n=>{n.preventDefault(),c(!0)},[]),[,m]=nt();function d(n){Vm.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return si(He.Root,{open:l,onOpenChange:c,children:[Z(He.Anchor,{asChild:!0,children:Z("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Z(ii,{className:r}):Z(It,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Z(He.Portal,{children:Z(He.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:si("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(Ft,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(_m),icon:Z(It,{className:"h-4 w-4"})}),Z(Ft,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Fm),icon:Z(Im,{strokeWidth:2,className:"h-4 w-4"})}),Z(Ft,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Z(Mm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Z(Ft,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Z(Dm,{strokeWidth:2,className:"h-4 w-4"})}):Z(Ft,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Z(Em,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Ft({className:e,...t}){return Z(ie,{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 M,jsxs as W}from"react/jsx-runtime";var $m=[{name:"Twitter",icon:jt,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Kt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Gt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Yt,href:"https://www.youtube.com/@dubdotco"}],gt={product:[...Lr.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:"Careers",href:"/careers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:$n.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Un.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Bo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},bt="text-sm font-medium text-neutral-900",ht="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 u6({staticDomain:e,className:t}){let{domain:r="dub.co"}=Wm();return e&&(r=e),M(Mr,{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:W("footer",{children:[W("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[W("div",{className:"flex flex-col gap-6",children:[M("div",{className:"grow",children:W(Ve,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[W("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),M(Dr,{className:"h-8 text-neutral-800"})]})}),M("div",{className:"flex items-center gap-3",children:$m.map(({name:o,icon:a,href:l})=>W("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[M("span",{className:"sr-only",children:o}),M(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),W("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Product"}),M("ul",{role:"list",className:ht,children:gt.product.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Solutions"}),M("ul",{role:"list",className:ht,children:gt.solutions.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Resources"}),M("ul",{role:"list",className:ht,children:gt.resources.map(o=>M("li",{children:W(Ve,{href:V(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&&M(Vr,{className:"size-3.5"})]})},o.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Compare"}),M("ul",{role:"list",className:ht,children:gt.compare.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Legal"}),W("ul",{role:"list",className:ht,children:[gt.legal.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),M("li",{children:W("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",M(Vr,{className:"size-3.5"})]})})]})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Tools"}),M("ul",{role:"list",className:ht,children:gt.tools.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[M(cn,{}),M(Ve,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:M(Bm,{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"})}),W("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Um,motion as Gm}from"framer-motion";import{useEffect as Km,useState as jm}from"react";import{jsx as li}from"react/jsx-runtime";var ci=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=jm(!1);Km(()=>{l(!0)},[]);let c=r?Gm.div:"div";return li(Um,{children:a?li(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Ym}from"class-variance-authority";import{toast as Zm}from"sonner";import{jsx as So,jsxs as Xm}from"react/jsx-runtime";var qm=Ym("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 k6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=nt(),i=o||Wo;return Xm("button",{onClick:m=>{m.stopPropagation(),Zm.promise(c(t),{success:a||"Copied to clipboard!"})},className:s(qm({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),l?So(Yo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as Jm}from"sonner";import{jsx as Qm}from"react/jsx-runtime";function L6({value:e,children:t,className:r,successMessage:o}){let[a,l]=nt();return Qm("button",{onClick:c=>{c.stopPropagation(),Jm.promise(l(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 eu,jsxs as tu}from"react/jsx-runtime";function D6({icon:e,text:t}){return tu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,eu("p",{className:"truncate text-sm",children:t})]})}import{jsx as ru}from"react/jsx-runtime";var I6=({children:e})=>ru("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 V6({apexDomain:e,className:t,imageProps:r}){return e?Ro(Et,{src:`${_o}${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(Ca,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as di}from"lucide-react";import{useSearchParams as ou}from"next/navigation";import{useEffect as au,useMemo as nu,useRef as iu}from"react";import su from"swr";import{useDebounce as lu}from"use-debounce";import{Fragment as mi,jsx as K,jsxs as _e}from"react/jsx-runtime";function Y6({defaultUrl:e}){let t=ou(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=lu(Ho(r),500),a=nu(()=>Vo(o||""),[o]),{data:l,isValidating:c}=su(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,fe,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=l||{},n=iu(null);au(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return _e(mi,{children:[!e&&_e("div",{className:"relative flex items-center",children:[K(di,{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"})]}),_e("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&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(wt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):_e("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."})]}),_e("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}):_e("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 Z6({defaultUrl:e}){return _e(mi,{children:[_e("div",{className:"relative flex items-center",children:[K(di,{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(wt,{})})})]})}import{AnimatePresence as cu}from"framer-motion";import ui from"js-cookie";import{createContext as du,useState as mu}from"react";import{jsx as To}from"react/jsx-runtime";var uu=du({hidePopup:()=>{}});function rw({children:e,hiddenCookieId:t}){let[r,o]=mu(ui.get(t)==="1"),a=()=>{o(!0),ui.set(t,"1")};return To(ci,{children:To(uu.Provider,{value:{hidePopup:a},children:To(cu,{children:!r&&e})})})}import{motion as pu}from"framer-motion";import{jsx as pi}from"react/jsx-runtime";function iw({value:e=0,max:t=100,className:r}){return pi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:pi(pu.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 gi}from"class-variance-authority";import{LayoutGroup as fu,motion as gu}from"framer-motion";import bu from"next/link";import{useId as hu}from"react";import{jsx as Bt,jsxs as fi}from"react/jsx-runtime";var vu=gi("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"}}),xu=gi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function hw({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=hu();return Bt("div",{className:s("flex text-sm",a),children:Bt(fu,{id:l,children:t.map(({id:c,label:i,href:m,target:d})=>{let n=c===r;return fi(m?bu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[fi("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:s(vu({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Bt(ra,{className:"size-2.5"})]}),n&&Bt(gu.div,{layoutId:"indicator",transition:{duration:.1},className:xu({variant:e}),children:Bt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Lo,jsxs as bi}from"react/jsx-runtime";var yu=[{icon:Da,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:Pa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:La,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:ka,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function yw(){return bi("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:yu.map(({text:e,icon:t,href:r})=>bi("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 hi,jsxs as wu}from"react/jsx-runtime";function Cw({className:e}){return wu("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:[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{Ur as AUTOPLAY_DEFAULT_DELAY,Lg as Accordion,ki as AccordionContent,Ni as AccordionItem,Ci as AccordionTrigger,yw as AdvancedLinkFeaturesTooltip,Vu as Africa,qu as Airtm,Ti as Alert,Mi as AlertDescription,Li as AlertTitle,Uu as Amazon,op as AndroidLogo,ke as AnimatedSizeContainer,ap as AppleLogo,np as ArrowBoldUp,ip as ArrowRight,sp as ArrowTrendUp,lp as ArrowTurnLeft,cp as ArrowTurnRight2,ra as ArrowUpRight,dp as ArrowsOppositeDirectionX,mp as ArrowsOppositeDirectionY,_u as Asia,ko as AuthButton,Hg as Avatar,iy as Background,or as Badge,up as BadgeCheck,pp as BadgeCheck2Fill,a1 as BadgeTooltip,fp as Blog,Et as BlurImage,gp as Bolt,bp as BoltFill,vp as Book2,Zt as Book2Fill,xp as Book2Small,hp as BookOpen,yp as Books2,wp as BoxArchive,Np as BracketsCurly,oa as BriefcaseFill,Cp as Brush,kp as BulletList,aa as BulletListFill,ie as Button,n1 as ButtonTooltip,$n as COMPARE_PAGES,gy as CUSTOMER_STORIES,Pp as Calculator,rn as Calendar,Lp as Calendar6,Rp as CalendarDays,Sp as CalendarIcon,Tp as CalendarRefresh,Au as CardAmex,Ou as CardDiscover,L1 as CardList,zu as CardMastercard,Hu as CardVisa,Mp as Cards,Dp as CaretUpFill,ss as Carousel,ls as CarouselContent,cs as CarouselItem,j1 as CarouselNavBar,ms as CarouselNext,ds as CarouselPrevious,ob as CarouselThumbnail,rb as CarouselThumbnails,Xu as CashApp,Ep as ChartActivity2,Ip as ChartArea2,Ap as ChartLine,Gu as ChatGPT,na as Check,ia as Check2,Ns as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Op as CircleCheckFill,zp as CircleDollar,Hp as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Vp as CirclePercentage,_p as CirclePlay,Fp as CirclePlayFill,Bp as CircleQuestion,Wp as CircleUser,Hr as CircleWarning,$p as CircleXmark,Up as Circles,Gp as Circles3,ci as ClientOnly,pa as CloudUpload,Kp as Code,jp as ColorPalette2,Zh as Combobox,Cw as CompositeLogo,Yp as ConnectedDots,qp as ConnectedDots4,Zp as ConnectedDotsFill,Xp as Connections3,Wo as Copy,k6 as CopyButton,L6 as CopyText,Jp as CreditCard,Qp as Crosshairs3,e0 as Crown,Nu as CrownSmall,t0 as Cube,r0 as CubeSettings,o0 as CubeSettingsFill,a0 as CurrencyDollar,fa as CursorRays,n0 as DatabaseKey,Zr as DatePickerContext,Iv as DateRangePicker,i0 as Desktop,s0 as DiamondTurnRight,qt as DiamondTurnRightFill,l0 as Directions,c0 as Discount,d0 as Dots,m0 as Download,et as DubAnalyticsIcon,Ut as DubApiIcon,Cu as DubCraftedShield,tt as DubLinksIcon,rt as DubPartnersIcon,cn as DubStatusBadge,u0 as Duplicate,ar as DynamicTooltipWrapper,ga as Earth,p0 as EarthPosition,Gv as EmptyState,f0 as Envelope,g0 as EnvelopeAlert,b0 as EnvelopeArrowRight,ba as EnvelopeFill,Fu as Europe,$o as ExpandingArrow,ha as Eye,va as EyeSlash,Lr as FEATURES_LIST,Su as Facebook,xa as FeatherFill,Ku as Figma,h0 as FileContent,rx as FileUpload,v0 as FileZip2,Rx as Filter,y0 as Filter2,x0 as FilterBars,N0 as Flag2,ya as Flag6,w0 as FlagWavy,C0 as Flask,k0 as FlaskSmall,P0 as Folder,M0 as Folder5,S0 as FolderBookmark,R0 as FolderLock,T0 as FolderPlus,L0 as FolderShield,u6 as Footer,Ax as Form,D0 as GamingConsole,E0 as Gauge6,I0 as Gear,A0 as Gear2,O0 as Gear3,z0 as Gem,wa as Gift,H0 as GiftFill,ju as GitHubEnhanced,Gt as Github,V0 as Globe,Ca as Globe2,Na as GlobePointer,_0 as GlobeSearch,Xo as Go,Ru as Google,Yu as GoogleEnhanced,F0 as GreekTemple,Ge as Grid,B0 as GridIcon,W0 as GridLayoutRows,$0 as GridPlus,U0 as GripDotsVertical,G0 as Headset,K0 as HeartFill,j0 as HexadecagonStar,Y0 as History,Z0 as Hyperlink,D6 as IconMenu,q0 as Icosahedron,ka as Incognito,r1 as InfoTooltip,I6 as InlineSnippet,Rc as Input,X0 as InputPassword,Pa as InputPasswordPointer,Sa as InputSearch,d2 as InputSelect,Tu as Instagram,J0 as InvoiceDollar,Q0 as Key,Wa as KeyboardShortcutContext,zb as KeyboardShortcutProvider,Un as LEGAL_PAGES,jc as Label,ef as LayoutSidebar,tf as License,Xt as LifeRing,rf as LinesY,af as Link4,of as LinkBroken,V6 as LinkLogo,Y6 as LinkPreview,Z6 as LinkPreviewPlaceholder,Kt as LinkedIn,t1 as LinkifyTooltipContent,wt as LoadingCircle,Pu as LoadingDots,Ne as LoadingSpinner,nf as LocationPin,sf as LockFill,It as Logo,Uo as Magic,lf as Magnifier,cf as MapPosition,df as MarketingTarget,ku as MatrixLines,Mr as MaxWidthWrapper,mf as Menu3,N2 as MenuItem,uf as MessageSmile,Jt as MicrophoneFill,E2 as MiniAreaChart,pf as MobilePhone,V2 as Modal,ff as MoneyBill,gf as MoneyBill2,bf as MoneyBills2,hf as Msgs,P3 as Nav,wo as NavContext,F3 as NavMobile,Dr as NavWordmark,Bu as NorthAmerica,vf as Note,Sf as NucleoPhoto,o1 as NumberTooltip,Wu as Oceania,xf as OfficeBuilding,Cg as PLAN_FEATURE_ICONS,Ra as Page2,B2 as PaginationControls,yf as Paintbrush,wf as Palette2,Nf as PaperPlane,Ju as Payoneer,Qu as Paypal,kf as Pen2,Cf as PenWriting,Pf as PercentageArrowDown,Go as Photo,Jo as Php,Rf as Plug2,Qt as Plus,Tf as Plus2,lt as Popover,rw as Popup,uu as PopupContext,Lf as Post,Lu as Prisma,Zo as ProductHunt,iw as ProgressBar,Mf as Pyramid,Qo as Python,Df as QRCode,At as RESOURCES,ud as RadioGroup,pd as RadioGroupItem,qo as Raycast,Ef as Receipt2,Vr as ReferredVia,If as Refresh2,Af as Robot,ea as Ruby,yo as SDKS,by as SOCIAL_LINKS,Wn as SOLUTIONS,Ta as SatelliteDish,Of as ScanText,zf as Scribble,Z2 as Sheet,Hf as ShieldAlert,Vf as ShieldCheck,_f as ShieldKeyhole,Ff as ShieldSlash,Bf as ShieldUser,Q2 as ShimmerDots,Wf as Shuffle,e1 as SimpleTooltipContent,Mu as Slack,$f as Sliders,o4 as SmartDateTimePicker,Ko as SortOrder,$u as SouthAmerica,Uf as Sparkle3,Zu as Spotify,Gf as SquareChart,Kf as SquareLayoutGrid5,jf as SquareLayoutGrid6,Yf as SquareXmark,Zf as Stars2,d4 as StatusBadge,ep as Stripe,tp as StripeLink,jo as Success,v4 as Switch,ag as TV,hw as TabSelect,U4 as Table,qf as TableIcon,Xf as TableRows2,Jf as Tablet,Qf as Tag,eg as Tags,Yo as Tick,Du as TikTok,La as Timer2,Eu as Tinybird,Ma as Toggle2Fill,q4 as ToggleGroup,tg as Toggles,Vg as TokenAvatar,J as Tooltip,Qg as TooltipContent,Jg as TooltipProvider,rg as Trash,og as TriangleWarning,jt as Twitter,ta as Typescript,ay as UTMBuilder,qd as UTM_PARAMETERS,ng as UiCard,Iu as Unsplash,ig as User,sg as UserCheck,lg as UserCrown,cg as UserDelete,dg as UserFocus,mg as UserPlus,ug as Users,fg as Users2,gg as Users6,Nt as UsersFill,pg as UsersSettings,rp as Venmo,bg as Versions2,Da as Views,hg as Watch,vg as Webhook,xg as Window,yg as WindowSearch,wg as WindowSettings,ii as Wordmark,Ng as Xmark,Yt as YouTube,Oi as badgeVariants,ne as buttonVariants,Ii as getUserAvatarUrl,No as navItems,Md as statusBadgeVariants,be as useCarousel,Va as useCarouselActiveIndex,db as useCookies,nt as useCopyToClipboard,gb as useCurrentAnchor,xb as useEnterSubmit,Cb as useInViewport,Sb as useInputFocused,Mb as useIntersectionObserver,it as useKeyboardShortcut,_b as useLocalStorage,j as useMediaQuery,Ub as useOptimisticUpdate,rh as usePagination,nh as useRemoveGAParams,ir as useResizeObserver,Ka as useRouterStuff,Za as useScroll,De as useScrollProgress,$4 as useTable,Ga as useTablePagination,yh as useToastWithUndo};
|