@dub/ui 0.2.52 → 0.2.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/index.mjs +1 -1
- package/dist/chunk-2RFBACZ2.mjs +6 -0
- package/dist/chunk-2XFIELJ4.mjs +2 -0
- package/dist/chunk-3ILCXQBF.mjs +2 -0
- package/dist/chunk-4SID55H7.mjs +6 -0
- package/dist/chunk-5DVT5IH3.mjs +2 -0
- package/dist/chunk-6CIGOLAY.mjs +2 -0
- package/dist/chunk-7XHWUQ7Y.mjs +2 -0
- package/dist/chunk-7YCV7DGE.mjs +6 -0
- package/dist/chunk-ACB4ALEC.mjs +2 -0
- package/dist/chunk-ACYX32AW.mjs +2 -0
- package/dist/chunk-B4ZXRDPJ.mjs +2 -0
- package/dist/chunk-BL7PJ3YO.mjs +2 -0
- package/dist/chunk-CGRWWSFK.mjs +2 -0
- package/dist/chunk-EOJ7VMDE.mjs +2 -0
- package/dist/chunk-GKMSAOXX.mjs +2 -0
- package/dist/chunk-GKX26URX.mjs +2 -0
- package/dist/chunk-GUPZ2GXU.mjs +2 -0
- package/dist/chunk-HRMH46MA.mjs +2 -0
- package/dist/chunk-L2MKJWRY.mjs +2 -0
- package/dist/chunk-MA4H6TAT.mjs +2 -0
- package/dist/chunk-MDJTQ4TR.mjs +2 -0
- package/dist/chunk-RGNLJWV4.mjs +2 -0
- package/dist/chunk-RRZYDRZD.mjs +2 -0
- package/dist/chunk-RYEJPSEH.mjs +2 -0
- package/dist/chunk-S6EMBWCA.mjs +6 -0
- package/dist/chunk-SCKG6J35.mjs +2 -0
- package/dist/chunk-SI67TSHC.mjs +2 -0
- package/dist/chunk-VYX57Q2M.mjs +2 -0
- package/dist/chunk-WSLI5B4B.mjs +6 -0
- package/dist/chunk-XLOKEDPN.mjs +2 -0
- package/dist/chunk-XRZ5W3NY.mjs +6 -0
- package/dist/chunk-YUAQ65BH.mjs +2 -0
- package/dist/chunk-Z6GF57H3.mjs +6 -0
- package/dist/chunk-ZEW3Q2LO.mjs +2 -0
- package/dist/chunk-ZVOB4GIE.mjs +2 -0
- package/dist/icons/index.d.ts +17 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +41 -14
- package/dist/index.mjs +6 -6
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
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-TJ4JURNI.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=0,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=`
|
|
2
|
+
import{$ as bp,$a as xa,$b as Y0,$c as _f,$d as Ig,A as qu,Aa as Bp,Ab as T0,Ac as vf,Ad as lg,B as Xu,Ba as Wp,Bb as L0,Bc as Ia,Bd as cg,C as Ju,Ca as ua,Cb as rr,Cc as xf,Cd as dg,D as Jt,Da as $p,Db as M0,Dc as yf,Dd as mg,E as Qu,Ea as Up,Eb as D0,Ec as Aa,Ed as ug,F as Qt,Fa as pa,Fb as E0,Fc as Oa,Fd as pg,G as ep,Ga as Gp,Gb as I0,Gc as wf,Gd as fg,H as tp,Ha as Kp,Hb as A0,Hc as Nf,Hd as gg,I as rp,Ia as jp,Ib as Ca,Ic as Cf,Id as bg,J as op,Ja as Yp,Jb as O0,Jc as kf,Jd as hg,K as ia,Ka as Zp,Kb as z0,Kc as or,Kd as vg,L as sa,La as qp,Lb as H0,Lc as Pf,Ld as xg,M as la,Ma as Xp,Mb as V0,Mc as Sf,Md as yg,N as ca,Na as Jp,Nb as ka,Nc as Rf,Nd as wg,O as da,Oa as Qp,Ob as Pa,Oc as Tf,Od as Ng,P as ap,Pa as e0,Pb as Sa,Pc as Lf,Pd as Cg,Q as np,Qa as fa,Qb as Ra,Qc as Mf,Qd as kg,R as ip,Ra as tr,Rb as _0,Rc as Df,Rd as _a,S as sp,Sa as ga,Sb as F0,Sc as Ef,Sd as Fa,T as lp,Ta as ba,Tb as B0,Tc as If,Td as Pg,U as cp,Ua as t0,Ub as W0,Uc as Af,Ud as Sg,V as dp,Va as r0,Vb as $0,Vc as Of,Vd as Rg,W as mp,Wa as ha,Wb as U0,Wc as ar,Wd as Tg,X as up,Xa as o0,Xb as Ta,Xc as za,Xd as Lg,Y as pp,Ya as a0,Yb as G0,Yc as zf,Yd as Mg,Z as fp,Za as n0,Zb as K0,Zc as Hf,Zd as Dg,_ as gp,_a as va,_b as j0,_c as Vf,_d as Eg,a as Xo,aa as hp,ab as ya,ac as Z0,ad as Ff,ae as Ag,b as Bu,ba as vp,bb as i0,bc as q0,bd as Bf,be as Og,c as at,ca as xp,cb as s0,cc as X0,cd as Wf,ce as zg,d as Zt,da as yp,db as l0,dc as J0,dd as Ha,de as Hg,e as Wu,ea as wp,eb as c0,ec as Q0,ed as $f,ee as St,f as nt,fa as Np,fb as d0,fc as ef,fd as Uf,fe as Vg,g as it,ga as Cp,gb as Gr,gc as La,gd as Gf,ge as _g,h as Jo,ha as kp,hb as m0,hc as tf,hd as Kf,he as Fg,i as Qo,ia as Pp,ib as u0,ic as rf,id as jf,ie as Bg,j as $u,ja as Sp,jb as p0,jc as of,jd as Yf,je as Ba,k as Uu,ka as Rp,kb as wa,kc as Ma,kd as Zf,ke as Wg,l as ea,la as Tp,lb as f0,lc as af,ld as qf,le as $g,m as ta,ma as Lp,mb as g0,mc as nf,md as nr,me as Ug,n as ra,na as ma,nb as b0,nc as Da,nd as Xf,ne as Gg,o as oa,oa as Mp,ob as h0,oc as sf,od as Jf,oe as Kg,p as Pt,pa as Dp,pb as v0,pc as Ea,pd as Qf,pe as jg,q as Gu,qa as Ep,qb as x0,qc as lf,qd as eg,qe as Yg,r as Ne,ra as Ip,rb as y0,rc as cf,rd as tg,s as Ku,sa as Ap,sb as w0,sc as df,sd as Kr,t as qt,ta as Op,tb as N0,tc as mf,td as rg,u as ju,ua as zp,ub as C0,uc as uf,ud as og,v as Yu,va as Hp,vb as k0,vc as pf,vd as Va,w as Xt,wa as Vp,wb as P0,wc as ff,wd as ag,x as Zu,xa as er,xb as S0,xc as gf,xd as ng,y as aa,ya as _p,yb as Na,yc as bf,yd as ig,z as na,za as Fp,zb as R0,zc as hf,zd as sg}from"./chunk-ACYX32AW.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as $r,b as Nt,c as Wo,d as $o,e as Ct,f as Uo,g as Go,h as kt,i as Ur,j as Ko,k as V,l as we,m as jo,n as fe,o as jt,p as i,q as Yt,r as Yo,s as Zo,t as qo}from"./chunk-WSLI5B4B.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Ii}from"lucide-react";import*as sr from"react";import{jsx as ir,jsxs as Hi}from"react/jsx-runtime";var e1=ne.Root,Ai=sr.forwardRef(({className:e,...t},r)=>ir(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ai.displayName="AccordionItem";var Oi=sr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Ii:nr;return ir(ne.Header,{className:"flex",children:Hi(ne.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,ir(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Oi.displayName=ne.Trigger.displayName;var zi=sr.forwardRef(({className:e,children:t,...r},o)=>ir(ne.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));zi.displayName=ne.Content.displayName;import{cva as Vi}from"class-variance-authority";import*as lr from"react";import{jsx as jr}from"react/jsx-runtime";var _i=Vi("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"}}),Fi=lr.forwardRef(({className:e,variant:t,...r},o)=>jr("div",{ref:o,role:"alert",className:i(_i({variant:t}),e),...r}));Fi.displayName="Alert";var Bi=lr.forwardRef(({className:e,...t},r)=>jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Bi.displayName="AlertTitle";var Wi=lr.forwardRef(({className:e,...t},r)=>jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Wi.displayName="AlertDescription";import{sha256 as $i}from"js-sha256";import{useState as Ui}from"react";import{jsx as Yr}from"react/jsx-runtime";function Gi(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/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${$i(e.email)}?d=${t}`:t}function l1({user:e={},className:t}){if(!e)return Yr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ui(Gi(e));return Yr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function c1({id:e,className:t}){return Yr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ki}from"class-variance-authority";import{jsx as Yi}from"react/jsx-runtime";var ji=Ki("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 cr({className:e,variant:t,...r}){return Yi("span",{className:i(ji({variant:t}),e),...r})}import{cva as Qi}from"class-variance-authority";import{forwardRef as es}from"react";import*as ge from"@radix-ui/react-tooltip";import Zi from"linkify-react";import{HelpCircle as qi}from"lucide-react";import Xi from"next/link";import{useState as Ji}from"react";import{jsx as U,jsxs as st}from"react/jsx-runtime";function C1({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:c,delayDuration:d=0,...s}){let[m,l]=Ji(!1);return st(ge.Root,{open:o?!1:m,onOpenChange:l,delayDuration:d,disableHoverableContent:c,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:a,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...s,children:typeof t=="string"?U("span",{className:i("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:l}):t})})]})}function k1({title:e,cta:t,href:r,target:o,onClick:a}){return st("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(Xi,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ee,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function P1({title:e,cta:t,href:r}){return st("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 S1({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Zi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function R1(e){return U(J,{...e,children:U(qi,{className:"h-4 w-4 text-neutral-500"})})}function T1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:st("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[st("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Yt(e||0,{full:!0})," ",t]}),a&&st("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Go(a,{withAgo:!0})]})]}),children:o})}function L1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(cr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function M1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:i("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function dr({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as lt,jsxs as Wa}from"react/jsx-runtime";var ie=Qi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:i("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ee=es(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:d,shortcut:s,disabledTooltip:m,right:l,...n},u)=>m?lt(J,{content:m,children:Wa("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[d,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:s})]})}):Wa("button",{ref:u,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?lt(Ne,{}):d||null,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:s}),l]}));ee.displayName="Button";import{cva as ts}from"class-variance-authority";import{createContext as rs}from"react";import{jsx as $a}from"react/jsx-runtime";var os=ts("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"}}}),Rt=rs({variant:"loose",loading:!1});function Ua({variant:e="loose",loading:t=!1,className:r,children:o}){return $a("ul",{className:i(os({variant:e,loading:t}),r),"data-variant":e,children:$a(Rt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as as}from"class-variance-authority";import{createContext as ns,useContext as is,useEffect as ss,useRef as ls,useState as cs}from"react";import{jsx as Ga,jsxs as us}from"react/jsx-runtime";var ds=as("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"}}}),ms="w-full py-2.5 px-4",Zr=ns({hovered:!1});function Ka({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:d}){let{variant:s}=is(Rt),m=ls(null),[l,n]=cs(!1);ss(()=>{if(!l||!m.current)return;let p=setInterval(()=>{var b;((b=m.current)==null?void 0:b.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[l]);let u=p=>!(document.getElementById("modal-backdrop")||kt(p));return us("li",{ref:m,className:i(ds({variant:s}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[d,Ga("div",{className:i(ms,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Ga(Zr.Provider,{value:{hovered:l},children:r})})]})}var eb=Object.assign(Ua,{Card:Object.assign(Ka,{Context:Zr}),Context:Rt});import ps from"embla-carousel-autoplay";import fs from"embla-carousel-react";import{ArrowLeft as gs,ArrowRight as bs}from"lucide-react";import{createContext as hs,forwardRef as Lt,useCallback as Tt,useContext as vs,useEffect as qr,useState as Xr}from"react";import{jsx as Ce,jsxs as Za}from"react/jsx-runtime";var Jr=2e3,ja=hs(null);function be(){let e=vs(ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Ya(){let{api:e}=be(),[t,r]=Xr(0),o=Tt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var xs=Lt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:d,...s},m)=>{let[l,n]=fs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ps(typeof o=="object"?o:{delay:Jr})]:[],...a||[]]),[u,p]=Xr(!1),[b,f]=Xr(!1),x=Tt(P=>{!P||(p(P.canScrollPrev()),f(P.canScrollNext()))},[]),v=Tt(()=>{n==null||n.scrollPrev()},[n]),w=Tt(()=>{n==null||n.scrollNext()},[n]),y=Tt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),v()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[v,w]);return qr(()=>{!n||!r||r(n)},[n,r]),qr(()=>{if(!!n)return x(n),n.on("reInit",x),n.on("select",x),()=>{n==null||n.off("select",x)}},[n,x]),Ce(ja.Provider,{value:{carouselRef:l,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:w,canScrollPrev:u,canScrollNext:b},children:Ce("div",{ref:m,onKeyDownCapture:y,className:i("relative",c),role:"region","aria-roledescription":"carousel",...s,children:d})})});xs.displayName="Carousel";var ys=Lt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ys.displayName="CarouselContent";var ws=Lt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});ws.displayName="CarouselItem";var Ns=Lt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(gs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});Ns.displayName="CarouselPrevious";var Cs=Lt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(bs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});Cs.displayName="CarouselNext";import{cva as ks}from"class-variance-authority";import{motion as Ps}from"framer-motion";import{ChevronLeft as Ss,ChevronRight as Rs}from"lucide-react";import*as Me from"react";import{jsx as Ge,jsxs as Mt}from"react/jsx-runtime";var Ts=ks("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 "}}}),vb=({variant:e="simple",className:t})=>{var f;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:d}=be(),s=(f=d==null?void 0:d.plugins())==null?void 0:f.autoplay,[m,l]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(x=>{l((x==null?void 0:x.selectedScrollSnap())??0)},[]),b=Me.useCallback(x=>()=>{s&&s.isPlaying()&&s.stop(),x()},[s]);return Me.useEffect(()=>{!d||(p(d),u((s==null?void 0:s.isPlaying())??!1),d.on("reInit",p),d.on("select",p),d.on("autoplay:play",()=>u(!0)),d.on("autoplay:stop",()=>u(!1)))},[d,s,p]),Mt("div",{className:i(Ts({variant:e}),t),children:[e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:b(o),children:[Ge(Ss,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Previous slide"})]}),d!=null&&Ge("div",{className:"flex items-center gap-1",children:d.slideNodes().map((x,v)=>Mt("button",{onClick:b(()=>d.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ge("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",n&&v===m&&"w-6 bg-black/20"),children:n&&v===m&&Ge(Ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Mt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:b(r),children:[Ge(Rs,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Next slide"})]})]})};import Ls from"embla-carousel-react";import{forwardRef as Ms,useCallback as Ds,useEffect as Es}from"react";import{jsx as mr}from"react/jsx-runtime";var Rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ls({dragFree:!0}),c=Ds(d=>{!d||!a||a==null||a.scrollTo(d.selectedScrollSnap())},[a]);return Es(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),mr("div",{className:"overflow-hidden",ref:o,children:mr("div",{className:i("mx-4 flex gap-4",e),...t})})},Tb=Ms(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Ya();return mr("div",{ref:o,children:mr("button",{type:"button",onClick:()=>{var s;if(!a)return;let d=(s=a.plugins())==null?void 0:s.autoplay;d&&d.isPlaying()&&d.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Dt from"@radix-ui/react-checkbox";import{forwardRef as Is}from"react";import{jsx as Qr,jsxs as As}from"react/jsx-runtime";var ct=Is(({className:e,...t},r)=>Qr(Dt.Root,{ref:r,className:i("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500 data-[state=indeterminate]:bg-blue-500",e),...t,children:As(Dt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[Qr(tr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),Qr(za,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ct.displayName=Dt.Root.displayName;import{Command as It,CommandInput as Pl,CommandItem as Sl,useCommandState as Rl}from"cmdk";import{ChevronDown as Tl}from"lucide-react";import{forwardRef as Ll,isValidElement as Ml,useCallback as Dl,useEffect as gr,useRef as El,useState as Et}from"react";import{motion as Nl}from"framer-motion";import{forwardRef as Cl,useRef as kl}from"react";import eo from"js-cookie";import{useEffect as Os,useState as zs}from"react";function zb(e,t,r){let[o,a]=zs(()=>{let d=eo.get(e);return d?JSON.parse(d):t});return Os(()=>{let d=()=>{let s=eo.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[e]),[o,d=>{a(d),eo.set(e,JSON.stringify(d),r)}]}import{useCallback as Hs,useEffect as Vs,useRef as _s,useState as Fs}from"react";var dt=(e=3e3)=>{let t=_s(null),[r,o]=Fs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Hs(async(d,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof d=="string"?await navigator.clipboard.writeText(d):d instanceof ClipboardItem&&await navigator.clipboard.write([d]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),m)throw l}},[e]);return Vs(()=>()=>a(),[]),[r,c]};import{useEffect as Bs,useState as Ws}from"react";function Bb(){let[e,t]=Ws(null);return Bs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,b;let m=s[0];if(!m)return;let l=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let f=1;f<s.length;f++){let x=s[f];if(!x)break;(x.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=x)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>l;)n=(b=c.get(n))==null?void 0:b.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as $s}from"react";function Gb(e){return{handleKeyDown:$s(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 Us,useState as Gs}from"react";function Zb(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Gs(o??!1);return Us(()=>{let d=()=>{let m=e.current;if(!m)return;let l=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",d),window.addEventListener("resize",d);let s=null;return e.current&&(s=new IntersectionObserver(d),s.observe(e.current)),d(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",d),window.removeEventListener("resize",d),s==null||s.disconnect()}},[e,r]),a}import{useEffect as Ks,useState as js}from"react";function Jb(){let[e,t]=js(!1);return Ks(()=>{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 Ys,useState as Zs}from"react";function rh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,d]=Zs(),s=(c==null?void 0:c.isIntersecting)&&a,m=([l])=>{d(l)};return Ys(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),c}import{createContext as qs,useCallback as Xs,useContext as Js,useEffect as qa,useId as Qs,useState as el}from"react";import{jsx as tl}from"react/jsx-runtime";var Xa=qs({listeners:[],setListeners:()=>{}});function lh({children:e}){let[t,r]=el([]);return tl(Xa.Provider,{value:{listeners:t,setListeners:r},children:e})}function De(e,t,r={}){let o=Qs(),{listeners:a,setListeners:c}=Js(Xa),d=Xs(s=>{if(r.enabled===!1)return;let m=s.target,l=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!l!=!!r.modal||!!n!=!!r.sheet)return;let u=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(f=>f.enabled!==!1&&!!l==!!f.modal&&!!n==!!f.sheet&&(Array.isArray(f.key)?f.key.includes(u):f.key===u));!p.length||Uo(p,(f,x)=>(x.priority??0)-(f.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);qa(()=>(document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)),[d]),qa(()=>(c(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as rl,useState as ol}from"react";function Ja(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function mh(e,t){let[r,o]=ol(Ja(e)??t);return rl(()=>{let c=Ja(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as al}from"sonner";import nl from"swr";function bh(e,t){let{data:r,isLoading:o,mutate:a}=nl(e,fe);return{data:r,isLoading:o,update:async(c,d)=>al.promise(a(c(r),{optimisticData:d,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 rn,useMemo as ml}from"react";import{useEffect as Qa,useState as il}from"react";function en({pageSize:e,page:t,onPageChange:r}){let[o,a]=il({pageIndex:t,pageSize:e});return Qa(()=>{a(c=>({...c,pageIndex:t}))},[t]),Qa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as sl,useRouter as ll,useSearchParams as cl}from"next/navigation";import{useCallback as dl}from"react";function tn(){let e=sl(),t=ll(),r=cl(),o=Object.fromEntries(r),a=(d,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var b;(b=s.include)!=null&&b.includes(p)&&n.set(p,u)}),m=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>m.delete(n)),d&&Object.entries(d).forEach(([n,u])=>m.set(n,u));let l=m.toString();return l.length>0?`?${l}`:""},c=dl(({set:d,del:s,replace:m,scroll:l=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);d&&Object.entries(d).forEach(([x,v])=>p.set(x,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(x=>p.delete(x)):p.delete(s));let b=p.toString(),f=`${e}${b.length>0?`?${b}`:""}`;if(n)return f;m?t.replace(f,{scroll:!1}):t.push(f,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Th(e=Zo){let{searchParams:t,queryParams:r}=tn(),o=ml(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=en({pageSize:e,page:o,onPageChange:d=>{r(d===1?{del:"page",scroll:!1}:{set:{page:d.toString()},scroll:!1})}});return rn(()=>{let d=parseInt(t.get("page")||"1")||1;c(s=>({...s,pageIndex:d}))},[t.get("page")]),rn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as ul}from"react";function Dh(){ul(()=>{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 pl,useState as fl}from"react";function ur(e){let[t,r]=fl(),o=([a])=>{r(a)};return pl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as gl,useEffect as on,useState as bl}from"react";function an(e,{container:t}={}){let[r,o]=bl(!1),a=gl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return on(()=>{let c=(t==null?void 0:t.current)??window;return c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)},[a]),on(()=>{a()},[a]),r}import{useCallback as hl,useEffect as vl,useState as xl}from"react";function Ee(e){let[t,r]=xl(1),o=hl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:d,clientHeight:s}=e.current;r(d===s?1:Math.min(c/(d-s),1))},[]),a=ur(e);return vl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as yl}from"react";import{toast as sn}from"sonner";import{jsx as pr,jsxs as nn}from"react/jsx-runtime";function wl({id:e,message:t,undo:r}){let o=()=>{r(),sn.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return yl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),nn("div",{className:"flex w-full items-center justify-between space-x-2",children:[nn("div",{className:"flex items-center space-x-2",children:[pr(ra,{}),pr("p",{className:"font-medium",children:t})]}),pr("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 Kh(){return({id:t,message:r,undo:o,duration:a})=>sn(pr(wl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ln}from"react/jsx-runtime";var ke=Cl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},d)=>{var l,n;let s=kl(null),m=ur(s);return ln(Nl.div,{ref:d,className:i("overflow-hidden",r),animate:{width:e?((l=m==null?void 0:m.contentRect)==null?void 0:l.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...c,children:ln("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ie from"@radix-ui/react-popover";import{Drawer as mt}from"vaul";import{jsx as Pe,jsxs as fr}from"react/jsx-runtime";function Ae({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:d,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:l,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:b}=Y();return d||b?fr(mt.Root,{open:a,onOpenChange:c,children:[Pe(mt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),fr(mt.Portal,{children:[Pe(mt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),fr(mt.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:f=>{f.target instanceof Element&&f.target.closest("[data-sonner-toast]")&&f.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(mt.Overlay,{})]})]}):fr(Ie.Root,{open:a,onOpenChange:c,children:[Pe(Ie.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ie.Portal,{children:Pe(Ie.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:n,collisionBoundary:l,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as br,jsx as E,jsxs as Se}from"react/jsx-runtime";function Il(e,t){return e===!0}function wv({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:d="Search...",emptyState:s,createLabel:m,onCreate:l,buttonProps:n,shortcutHint:u,caret:p,side:b,open:f,onOpenChange:x,onSearchChange:v,shouldFilter:w=!0,inputRight:y,inputClassName:P,optionRight:N,optionClassName:C,matchTriggerWidth:W,hideSearch:M=!1,children:D}){let L=Il(e,r),S=Array.isArray(t)?t:t?[t]:[],{isMobile:h}=Y(),[R,G]=Et(!1),k=f??R,ue=x??G,[$,Fr]=Et(""),[_o,Br]=Et(!1),[Wr,Mi]=Et(void 0),[Di,Fo]=Et(!1),Ei=H=>{var ot;if(L){let $e=S.some(({value:Ue})=>Ue===H.value);r($e?S.filter(({value:Ue})=>Ue!==H.value):[...S,H])}else r(S.length&&((ot=S[0])==null?void 0:ot.value)===H.value?null:H),ue(!1)},Bo=Dl((H,ot)=>ot===""?[...H.filter($e=>$e.first&&!S.some(Ue=>Ue.value===$e.value)),...S,...H.filter($e=>!$e.first&&!S.some(Ue=>Ue.value===$e.value))]:H,[S]);return gr(()=>{_o&&(Mi(o&&Bo(o,$)),Br(!1))},[_o,o,Bo,$]),gr(()=>{Br(!0)},[o]),gr(()=>{k||(Fr(""),Br(!0))},[k]),gr(()=>v==null?void 0:v($),[$]),E(Ae,{openPopover:k,setOpenPopover:ue,align:"start",side:b,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!h&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(It,{loop:!0,shouldFilter:w,children:[!M&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Pl,{placeholder:d,value:$,onValueChange:Fr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",P),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),y&&E("div",{className:"mr-2",children:y}),u&&E("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})]}),E(Al,{children:E(It.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Wr!==void 0?Se(br,{children:[Wr.map(H=>E(Ol,{option:H,multiple:L,selected:S.some(({value:ot})=>ot===H.value),onSelect:()=>Ei(H),right:N==null?void 0:N(H),className:C},`${H.label}, ${H.value}`)),$.length>0&&l&&Se(Sl,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",C),onSelect:async()=>{Fo(!0),await(l==null?void 0:l($))&&(Fr(""),ue(!1)),Fo(!1)},children:[Di?E(Ne,{className:"size-4 shrink-0"}):E(nr,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),w?E(Hl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Wr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(It.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ne,{})})})})})]})}),children:E(ee,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(br,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:D||S.map(H=>H.label).join(", ")||c}),p&&(p===!0?E(Tl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?cn(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var Al=({children:e})=>{let t=El(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Se(br,{children:[E("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),E("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 Ol({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Se(br,{children:[E(zl,{disabledTooltip:e.disabledTooltip,children:Se(It.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(ga,{className:"size-4 text-neutral-600"}):E(ba,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:cn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(tr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(It.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var zl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,cn=e=>Ml(e),Hl=Ll((e,t)=>Rl(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as hr,format as Vl,isSameMonth as _l}from"date-fns";import{ChevronLeft as dn,ChevronRight as mn,ChevronsLeft as Fl,ChevronsRight as Bl}from"lucide-react";import{forwardRef as Wl,useRef as $l}from"react";import{DayPicker as Ul,useDayPicker as Gl,useDayRender as Kl,useNavigation as jl}from"react-day-picker";import{Fragment as Yl,jsx as re,jsxs as vr}from"react/jsx-runtime";var At=Wl(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));At.displayName="NavigationButton";function un({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:d,classNames:s,...m}){return re(Ul,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:d,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(dn,{className:"h-4 w-4"}),IconRight:()=>re(mn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:b,displayMonths:f}=jl(),{numberOfMonths:x,fromDate:v,toDate:w}=Gl(),y=f.findIndex(L=>_l(l.displayMonth,L)),P=y===0,N=y===f.length-1,C=x>1&&(P||!N),W=x>1&&(N||!P),M=()=>{let L=hr(b,-1);p&&(!v||L.getTime()>=v.getTime())&&n(L)},D=()=>{let L=hr(b,1);u&&(!w||L.getTime()<=w.getTime())&&n(L)};return vr("div",{className:"flex items-center justify-between",children:[vr("div",{className:"flex items-center gap-1",children:[o&&!W&&re(At,{disabled:a||!p||v&&hr(b,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:M,icon:Fl}),!W&&re(At,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:dn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Vl(l.displayMonth,"LLLL yyy",{locale:c})}),vr("div",{className:"flex items-center gap-1",children:[!C&&re(At,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:mn}),o&&!C&&re(At,{disabled:a||!u||w&&hr(b,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:D,icon:Bl})]})]})},Day:({date:l,displayMonth:n})=>{let u=$l(null),{activeModifiers:p,buttonProps:b,divProps:f,isButton:x,isHidden:v}=Kl(l,n,u),{selected:w,today:y,disabled:P,range_middle:N}=p;if(v)return re(Yl,{});if(!x)return re("div",{...f,className:i("flex items-center justify-center",f.className)});let{children:C,...W}=b;return vr("button",{ref:u,...W,type:"button",children:[C,y&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!w,"!bg-white":w,"!bg-blue-400":w&&N,"text-neutral-400":P})})]})}},...m})}import{enUS as nc}from"date-fns/locale";import{useEffect as io,useMemo as fn,useRef as ic,useState as yr}from"react";import{Command as to}from"cmdk";import{Lock as Zl}from"lucide-react";import{jsx as Ke,jsxs as ql}from"react/jsx-runtime";var ro=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,c=l=>"date"in l,d=(l,n)=>l.getDate()===n.getDate()&&l.getMonth()===n.getMonth()&&l.getFullYear()===n.getFullYear(),s=(l,n)=>{let u=l.from,p=n.from,b=!1;u&&p&&d(u,p)&&(b=!0);let f=l.to,x=n.to,v=!1;return f&&x&&d(f,x)&&(v=!0),b&&v},m=l=>{if(o)return o===l.id;if(a(l)){let n=r;return n&&s(n,l.dateRange)}else if(c(l)){let n=r;return n&&d(n,l.date)}return!1};return Ke(to,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ke(to.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,n)=>ql(to.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(l)&&"font-semibold text-neutral-800"),children:[Ke("span",{children:l.label}),l.requiresUpgrade?Ke(Zl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?Ke("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:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&Ke(J,{side:"bottom",content:l.tooltipContent,children:Ke("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};ro.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as Xl}from"react";var oo=Xl({isOpen:!1,setIsOpen:()=>{}}),Jl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},ao=(e,t,r=!1)=>{let o=!Jl(),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},pn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:d,toDay:s}=t;if(e&&e.length>0){let m=o,l=r;e.forEach(n=>{var u,p,b,f,x,v;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 ${l}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(d&&n.date.getDate()<d.getDate())throw new Error(`Preset ${n.label} is before fromDay ${d}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),y=(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(y&&r&&y>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${l}.`);if(a){let P=(b=n.dateRange.from)==null?void 0:b.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let P=(f=n.dateRange.to)==null?void 0:f.getMonth();if(P&&P>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(d){let P=(x=n.dateRange.from)==null?void 0:x.getDate();if(P&&P<d.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(d,"MMM dd, yyyy")}.`)}if(s){let P=(v=n.dateRange.to)==null?void 0:v.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as Ql}from"class-variance-authority";import{Calendar as ec,ChevronDown as tc}from"lucide-react";import{forwardRef as rc}from"react";import{jsx as xr,jsxs as ac}from"react/jsx-runtime";var oc=Ql(["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"}}}),no=rc(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>ac("button",{ref:c,className:i(oc({hasError:o}),e),...a,children:[xr(ec,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),xr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?xr("span",{className:"text-neutral-400",children:r}):null)}),xr(tc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));no.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as gn}from"react/jsx-runtime";var sc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:d,disabledDays:s,showYearNavigation:m=!1,locale:l=nc,placeholder:n="Select date range",hasError:u,align:p="center",className:b,...f})=>{let{isDesktop:x}=Y(),[v,w]=yr(!1),[y,P]=yr(a&&r?a==null?void 0:a.find(({id:k})=>k===r):void 0),[N,C]=yr((y==null?void 0:y.dateRange)??e??t??void 0),[W,M]=yr(N==null?void 0:N.to),D=fn(()=>N,[v]);io(()=>{C(e)},[e]),io(()=>{let k=a==null?void 0:a.find(({id:ue})=>ue===r);P(k),C((k==null?void 0:k.dateRange)??e??t)},[a,r]),io(()=>{v?N&&M(N.to):M(N==null?void 0:N.to)},[v]);let L=(k,ue)=>{let $=(N==null?void 0:N.from)&&(N==null?void 0:N.to)?{from:ue}:k;C($),P(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),w(!1))},S=k=>{C(k.dateRange),P(k),o==null||o(k.dateRange,k),w(!1)},h=()=>{C(D),w(!1)},R=k=>{k||h(),w(k)},G=fn(()=>N?`${N.from?ao(N.from,l):""} - ${N.to?ao(N.to,l):""}`:null,[N,l]);return De((a==null?void 0:a.filter(k=>k.shortcut).map(k=>k.shortcut))??[],k=>{let ue=a==null?void 0:a.find($=>$.shortcut===k.key);ue&&S(ue)}),oe(oo.Provider,{value:{isOpen:v,setIsOpen:w},children:oe(Ae,{align:p,openPopover:v,setOpenPopover:R,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:gn("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(lc,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(ro,{currentPresetId:r,currentValue:N,presets:a,onSelect:S})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(un,{mode:"range",selected:N,onSelect:L,month:W,onMonthChange:M,numberOfMonths:x?2:1,disabled:s,disableNavigation:d,showYearNavigation:m,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...f})})]})}),children:oe(no,{placeholder:n,disabled:c,className:b,hasError:u,"aria-required":f.required||f["aria-required"],"aria-invalid":f["aria-invalid"],"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],children:(y==null?void 0:y.label)??G})})})};function nx({presets:e,...t}){return e&&pn(e,t),oe(sc,{presets:e,...t})}function lc({children:e}){let t=ic(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return gn("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),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{useId as cc}from"react";import{jsx as wr,jsxs as dc}from"react/jsx-runtime";function px({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=cc();return dc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[wr("defs",{children:wr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:wr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),wr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import mc from"next/link";import{useEffect as uc,useState as bn}from"react";import pc from"swr";import{jsx as so,jsxs as hn}from"react/jsx-runtime";function vn({className:e}){let{data:t}=pc("https://status.dub.co/api/v1/summary",fe),[r,o]=bn("bg-neutral-200"),[a,c]=bn("Loading status...");return uc(()=>{if(!t)return;let{ongoing_incidents:d}=t;if(d.length>0){let{current_worst_impact:s,name:m}=d[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(l)}else c("All systems operational"),o("bg-green-500")},[t]),hn(mc,{href:"https://status.dub.co",target:"_blank",className:i("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[hn("div",{className:"relative size-2",children:[so("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),so("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),so("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Nr,jsxs as xn}from"react/jsx-runtime";function wx({icon:e,title:t,description:r,learnMore:o,children:a}){return xn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Nr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Nr(e,{className:"size-6 text-neutral-800"})}),Nr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&xn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Nr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as fc}from"class-variance-authority";import{useState as yn}from"react";import{toast as wn}from"sonner";import{Fragment as bc,jsx as he,jsxs as co}from"react/jsx-runtime";var Nn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],lo={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:Nn,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:[...Nn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},gc=fc("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 Ex({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:d,icon:s=wa,customPreview:m,accept:l="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:b=!0,content:f,maxFileSizeMB:x=0,targetResolution:v,accessibilityLabel:w="File upload",disabled:y=!1}){let[P,N]=yn(!1),[C,W]=yn(null),M=async D=>{let L="dataTransfer"in D?D.dataTransfer.files&&D.dataTransfer.files[0]:D.target.files&&D.target.files[0];if(!L)return;if(W(L.name),x>0&&L.size/1024/1024>x){wn.error(`File size too big (max ${x} MB)`);return}let S=lo[l].types;if(S.length&&!S.includes(L.type)){wn.error(lo[l].errorMessage??"File type not supported");return}let h=L;if(v&&L.type.startsWith("image/"))try{let R=await $o(L,v),G=await fetch(R).then(k=>k.blob());h=new File([G],L.name,{type:L.type})}catch(R){console.error("Error resizing image:",R)}if(t){let R=new FileReader;R.onload=G=>{var k;return r==null?void 0:r({src:(k=G.target)==null?void 0:k.result,file:h})},R.readAsDataURL(h);return}r==null||r({file:h})};return co("label",{className:i(gc({variant:o}),y?"cursor-not-allowed":i(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(Pt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragEnter:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragLeave:D=>{D.preventDefault(),D.stopPropagation(),N(!1)},onDrop:async D=>{D.preventDefault(),D.stopPropagation(),M(D),N(!1)}}),co("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",y&&"bg-neutral-50",P&&!y&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",b&&!y&&"group-hover:opacity-100"):i(!y&&"group-hover:bg-neutral-50")),children:[he(s,{className:i("size-7 transition-all duration-75",y?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),c)}),f!==null&&he("div",{className:i("mt-2 text-center text-sm text-neutral-500",y&&"text-neutral-400"),children:f??he(bc,{children:co("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:w})]}),n&&(m??he("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",d)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:lo[l].types.join(","),onChange:M,disabled:y},C)})]})}import{AnimatePresence as hc,motion as Cn}from"framer-motion";import{X as vc}from"lucide-react";import xc from"next/link";import{isValidElement as yc}from"react";import{Fragment as wc,jsx as Q,jsxs as Ot}from"react/jsx-runtime";function Pn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return De("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Ot("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(hc,{children:t==null?void 0:t.map(({key:c,value:d})=>{if(c==="loader")return Q(Cn.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-${d}`);let s=e.find(m=>m.key===c);return s?(s.multiple&&Array.isArray(d)?d:[d]).map(m=>{var b,f,x,v;let l=(b=s.options)==null?void 0:b.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.value===m),n=(l==null?void 0:l.icon)??((f=s.getOptionIcon)==null?void 0:f.call(s,m,{key:s.key,option:l}))??s.icon,u=(l==null?void 0:l.label)??((x=s.getOptionLabel)==null?void 0:x.call(s,m,{key:s.key,option:l}))??m,p=(l==null?void 0:l.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return Ot(Cn.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:[Ot("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(s.icon)?s.icon:Q(s.icon,{className:"h-4 w-4"})}),s.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:s.options?Ot(wc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(xc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Ct(u,30)}):Ct(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(c,m),children:Q(vc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Ot("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 kn=e=>yc(e);import{Command as ze,useCommandState as Nc}from"cmdk";import{ChevronDown as Cc,ListFilter as kc}from"lucide-react";import{Fragment as Pc,forwardRef as Sc,isValidElement as Rn,useCallback as Cr,useEffect as kr,useImperativeHandle as Rc,useRef as uo,useState as mo}from"react";import{Fragment as Ic,jsx as _,jsxs as ve}from"react/jsx-runtime";function Tn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:d,askAI:s,children:m,emptyState:l,className:n}){var L,S;let{isMobile:u}=Y(),p=uo(null),b=uo(),[f,x]=mo(!1);De("f",()=>x(!0),{enabled:!f});let[v,w]=mo(""),[y,P]=mo(null),N=Cr(()=>{w(""),P(null)},[]);kr(()=>{f||N()},[f]);let C=y?e.find(({key:h})=>h===y):null,W=Cr(h=>{p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(h),o==null||o(h)},[]),M=Cr(h=>{if(!C||!d)return!1;let R=d.find(({key:G})=>G===y);return(R==null?void 0:R.value)===h||R&&C.multiple&&Array.isArray(R.value)&&R.value.includes(h)},[C]),D=Cr(h=>{C&&(M(h)?r(C.key,h):t(C.key,h),C.multiple||x(!1))},[d,C,s]);return kr(()=>{a==null||a(v)},[v]),kr(()=>{c==null||c(y)},[y]),kr(()=>{(C==null?void 0:C.options)&&p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),_(Ae,{openPopover:f,setOpenPopover:x,onEscapeKeyDown:h=>{y&&(h.preventDefault(),N())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(ze,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Lc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:w,onKeyDown:h=>{(h.key==="Escape"||h.key==="Backspace"&&!v)&&(h.preventDefault(),h.stopPropagation(),y?N():x(!1))},emptySubmit:h=>{h.preventDefault(),h.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),x(!1)):D(v)}}),!C&&_("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"})]}),_(Mc,{ref:p,children:ve(ze.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((S=(L=C.options)==null?void 0:L.filter(h=>!v||!h.hideDuringSearch))==null?void 0:S.map(h=>{let R=M(h.value);return _(Sn,{filter:C,option:h,right:R?_(fa,{className:"h-4 w-4"}):h.right,onSelect:()=>D(h.value)},h.value)}))??_(ze.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(Ne,{})})}):e.filter(h=>!h.hideInFilterDropdown).map(h=>ve(Pc,{children:[_(Sn,{filter:h,onSelect:()=>W(h.key)}),h.separatorAfter&&_(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},h.key)),(!C||C.options)&&_(Dc,{search:v,askAI:s,children:l?Tc(l)?(l==null?void 0:l[y??"default"])??"No matches":l:"No matches"})]})},y)]})}),children:ve("button",{type:"button",className:i("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(kc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),d!=null&&d.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:d.length}):_(Cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Tc(e){return typeof e=="object"&&e!==null&&!Rn(e)}var Lc=e=>{let t=Nc(r=>r.filtered.count===0);return _(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"})},Mc=Sc(({children:e},t)=>{let r=uo(null);Rc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return ve(Ic,{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 Sn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),c=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,d=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(ze.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:d+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:Ec(c)?c:_(c,{className:"h-4 w-4"})}),Ct(d,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Dc=({search:e,askAI:t,children:r})=>t&&e?ve(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Qo,{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,'"']})]})]}):_(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Ec=e=>Rn(e);var o2={Select:Tn,List:Pn};import{useMemo as Ac,useState as Ln}from"react";import{jsx as je,jsxs as Pr}from"react/jsx-runtime";function d2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:d}){let[s,m]=Ln(r.defaultValue),[l,n]=Ln(!1),u=Ac(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Pr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await d({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Pr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Pr("div",{className:"flex flex-col space-y-3",children:[je("h2",{className:"text-xl font-medium",children:e}),je("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?je("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:p=>m(p.target.value),className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":c})}):je("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Pr("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"?je("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,je("div",{className:"shrink-0",children:je(ee,{text:a,loading:l,disabled:u,disabledTooltip:c})})]})]})}import{useId as Oc}from"react";import{jsx as Sr,jsxs as zc}from"react/jsx-runtime";function Ye({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Oc();return zc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Sr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Sr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Hc}from"lucide-react";import Vc,{useCallback as _c,useState as Fc}from"react";import{jsx as Ze,jsxs as po}from"react/jsx-runtime";var Bc=Vc.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Fc(!1),d=_c(()=>c(!a),[a,c]);return po("div",{children:[po("div",{className:"relative flex",children:[Ze("input",{type:a?"text":t,className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),po("div",{className:"group",children:[r.error&&Ze("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ze(Hc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ze("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>d(),"aria-label":a?"Hide password":"Show Password",children:a?Ze(Pa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ze(Sa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ze("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Bc.displayName="Input";import{flip as Kc,offset as jc,size as Yc,useDismiss as Zc,useFloating as qc,useInteractions as Xc}from"@floating-ui/react";import{Command as Re,useCommandState as Jc}from"cmdk";import{Check as Qc,ChevronDown as ed,Search as td,X as rd}from"lucide-react";import{createContext as od,forwardRef as An,useContext as ho,useEffect as fo,useMemo as Dn,useRef as En,useState as go}from"react";import{Drawer as ut}from"vaul";import Wc from"next/image";import{memo as $c,useEffect as Uc,useState as Mn}from"react";import{jsx as Gc}from"react/jsx-runtime";var zt=$c(e=>{let[t,r]=Mn(!0),[o,a]=Mn(e.src);Uc(()=>a(e.src),[e.src]);let c=d=>{r(!1);let s=d.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Gc(Wc,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as A,jsxs as se}from"react/jsx-runtime";var Rr=od({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function F2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:d,inputAttrs:s,noItemsElement:m}){let{isMobile:l}=Y(),n=En(null),[u,p]=go(!1),[b,f]=go(""),[x,v]=go(!1);fo(()=>{u&&v(!1)},[u]),fo(()=>v(!0),[b]),fo(()=>{t&&f(t.value)},[t]);let w=Dn(()=>{let R=b.toLowerCase();return x?e.filter(G=>G.value.toLowerCase().includes(R)):b?e.sort((G,k)=>(k.value.toLowerCase().includes(R)?1:0)-(G.value.toLowerCase().includes(R)?1:0)):e},[x,b,e]),{refs:y,floatingStyles:P,context:N}=qc({open:u,onOpenChange:p,middleware:[jc(8),Yc({apply({elements:{floating:R},availableHeight:G}){Object.assign(R.style,{maxHeight:`${Math.max(75,Math.min(G,290))}px`})},padding:8}),Kc({fallbackStrategy:"initialPlacement",padding:8})]}),C=Zc(N,{enabled:!l||!c}),{getReferenceProps:W,getFloatingProps:M}=Xc([C]),D=En(null),{scrollProgress:L,updateScrollProgress:S}=Ee(D),h=Dn(()=>t&&t.icon?t.icon:t&&t.image?A(zt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):d||A(td,{className:"size-4 text-neutral-400"}),[t,d]);return A(Rr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:b,setInputValue:f,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&c?se(ut.Root,{open:u,onOpenChange:p,children:[A(ut.Trigger,{className:"sm:hidden",asChild:!0,children:A(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:A(bo,{className:o,iconElement:h})})}),A(ut.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ut.Portal,{children:[A(ut.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:R=>{R.target instanceof Element&&R.target.closest("[data-sonner-toast]")&&R.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A("div",{className:"p-2",children:A(bo,{className:o,iconElement:h})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),A(In,{items:w})]})]})}),A(ut.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A(bo,{className:o,iconElement:h,ref:y.setReference,...W()}),u&&se("div",{ref:y.setFloating,style:P,...M(),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:D,onScroll:S,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),A(In,{items:w})]}),A("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(L,2)}})]})]})})}var bo=An(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:i("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[A("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[A(ad,{}),A(nd,{})]})]})),ad=An((e,t)=>{let r=Jc(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:d,setInputValue:s,disabled:m}=ho(Rr);return A(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:d,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),c(!1)):l.key==="Enter"&&r?c(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&c(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function nd(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=ho(Rr);return A("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?A(rd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):A(ed,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function In({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=ho(Rr);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&&A(zt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),A("p",{className:i("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&A(cr,{className:"text-xs",variant:"neutral",children:a.label})]}),A(Qc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as vo from"@radix-ui/react-label";import{cva as id}from"class-variance-authority";import*as On from"react";import{jsx as cd}from"react/jsx-runtime";var sd=id("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ld=On.forwardRef(({className:e,...t},r)=>cd(vo.Root,{ref:r,className:i(sd(),e),...t}));ld.displayName=vo.Root.displayName;import{cva as dd}from"class-variance-authority";import{isValidElement as md}from"react";import{jsx as zn,jsxs as Hn}from"react/jsx-runtime";var ud=dd(["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 J2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...d}){return Hn(e||"button",{...e==="button"?{type:"button"}:{},className:i(ud({variant:t}),c),...d,children:[Hn("div",{className:"flex grow items-center gap-2",children:[o&&(pd(o)?o:zn(o,{className:"size-4"})),r]}),a&&zn("kbd",{className:i("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var pd=e=>md(e);import{curveNatural as Vn}from"@visx/curve";import{LinearGradient as _n}from"@visx/gradient";import{Group as fd}from"@visx/group";import{ParentSize as gd}from"@visx/responsive";import{scaleLinear as bd,scaleUtc as hd}from"@visx/scale";import{Area as vd,AreaClosed as xd}from"@visx/shape";import{motion as Fn}from"framer-motion";import{useId as yd,useMemo as Bn}from"react";import{jsx as xe,jsxs as xo}from"react/jsx-runtime";var wd={top:8,right:2,bottom:2,left:2};function l4(e){return xe(gd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(Nd,{...{width:t,height:r,...e}})})}function Nd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let d={...wd,...c},s=yd(),m=Bn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:l,xScale:n}=Bn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),b=r.map(({date:v})=>v.getTime()),f=new Date(Math.min(...b)),x=new Date(Math.max(...b));return{yScale:bd({domain:[-2,Math.max(p,2)],range:[t-d.top-d.bottom,0],nice:!0,clamp:!0}),xScale:hd({domain:[f,x],range:[0,e-d.left-d.right],nice:!0})}},[r,t,e]);return xo("svg",{width:e,height:t,children:[xo("defs",{children:[xe(_n,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-d.left-d.right,gradientUnits:"userSpaceOnUse"}),xe(_n,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),xo(fd,{left:d.left,top:d.top,children:[xe(vd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),xe(xd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,yScale:l,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as yo from"@radix-ui/react-visually-hidden";import{useRouter as Cd}from"next/navigation";import{Drawer as qe}from"vaul";import{jsx as ae,jsxs as pt}from"react/jsx-runtime";function f4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:d,drawerRootProps:s}){let m=Cd(),l=({dragged:u}={})=>{d&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=Y();return n&&!c?ae(qe.Root,{open:o?r:!0,onOpenChange:u=>{u||l({dragged:!0})},...s,children:pt(qe.Portal,{children:[ae(qe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(qe.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:pt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[pt(yo.Root,{children:[ae(qe.Title,{children:"Modal"}),ae(qe.Description,{children:"This is a modal"})]}),ae(kd,{}),e]})}),ae(qe.Overlay,{})]})}):ae(le.Root,{open:o?r:!0,onOpenChange:u=>{u||l()},children:pt(le.Portal,{children:[ae(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),pt(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:i("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[pt(yo.Root,{children:[ae(le.Title,{children:"Modal"}),ae(le.Description,{children:"This is a modal"})]}),e]})]})})}function kd(){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 Pd,jsx as Tr,jsxs as ft}from"react/jsx-runtime";var Wn=i("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function h4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:c,showTotalCount:d=!0}){return ft("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ft("div",{className:"flex items-center gap-2",children:[ft("div",{children:[Tr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ft(Pd,{children:[ft("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",d&&"of "]}),d&&Tr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),c]}),ft("div",{className:"flex items-center gap-2",children:[Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Sd}from"lucide-react";import*as wo from"react";import{jsx as Lr}from"react/jsx-runtime";var Rd=wo.forwardRef(({className:e,...t},r)=>Lr(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Rd.displayName=He.Root.displayName;var Td=wo.forwardRef(({className:e,...t},r)=>Lr(He.Item,{ref:r,className:i("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Lr(He.Indicator,{className:"flex items-center justify-center",children:Lr(Sd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Td.displayName=He.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Xe,jsxs as Id}from"react/jsx-runtime";function Ld({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Xe(a,{direction:"right",handleOnly:!0,...o,children:Id(Ve.Portal,{children:[Xe(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Xe(Ve.Content,{...t,onPointerDownOutside:c=>{var d;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(d=t==null?void 0:t.onPointerDownOutside)==null||d.call(t,c)},className:i("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Xe("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Md({className:e,...t}){return Xe(Ve.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Dd(e){return Xe(Ve.Description,{...e})}function Ed(e){return Xe(Ve.Close,{...e})}var P4=Object.assign(Ld,{Title:Md,Description:Dd,Close:Ed});import{useEffect as Ad,useRef as Od,useState as zd}from"react";import{jsx as $n}from"react/jsx-runtime";var Hd=`
|
|
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
|
+
`,Vd=`
|
|
10
10
|
precision mediump float;
|
|
11
11
|
|
|
12
12
|
uniform vec2 resolution;
|
|
@@ -39,14 +39,14 @@ void main(void) {
|
|
|
39
39
|
|
|
40
40
|
gl_FragColor = fragColor;
|
|
41
41
|
}
|
|
42
|
-
`,kd=60,Pd=1e3/kd;function 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%),
|
|
42
|
+
`,_d=60,Fd=1e3/_d;function L4({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Od(null),[c,d]=zd(!1);return Ad(()=>{let s=a.current;if(!s||!s.parentElement)return;let m=s.parentElement,l=window.devicePixelRatio||1;s.width=m.clientWidth*l,s.height=m.clientHeight*l;let n=s.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 M=0;M<2;++M){let D=M===0?Hd:Vd,L=n.createShader(M===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!L){console.error("Failed to create shader");return}n.shaderSource(L,D),n.compileShader(L),n.getShaderParameter(L,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(L)),n.attachShader(u,L),n.linkProgram(u)}n.getProgramParameter(u,n.LINK_STATUS)||console.error(n.getProgramInfoLog(u));let p=n.getAttribLocation(u,"position"),b=n.getUniformLocation(u,"time"),f=n.getUniformLocation(u,"resolution"),x=n.getUniformLocation(u,"dotSize"),v=n.getUniformLocation(u,"cellSize"),w=n.getUniformLocation(u,"speed");n.useProgram(u);let y=[1,1,-1,1,1,-1,-1,-1],P=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,P),n.bufferData(n.ARRAY_BUFFER,new Float32Array(y),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(x,e*window.devicePixelRatio),n.uniform1f(v,t*window.devicePixelRatio),n.uniform1f(w,r);let N,C=0;function W(M){if(M-C<Fd){N=requestAnimationFrame(W);return}C=M,n&&s&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(b,M/1e3),n.uniform2f(f,s.width,s.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),N=requestAnimationFrame(W)}return N=requestAnimationFrame(W),s.addEventListener("webglcontextlost",M=>{M.preventDefault(),d(!0),cancelAnimationFrame(N)}),()=>{cancelAnimationFrame(N),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),$n("div",{className:i("absolute inset-0",o,c&&"opacity-0"),children:$n("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import*as _e from"@radix-ui/react-slider";import{jsx as Je,jsxs as Mr}from"react/jsx-runtime";function E4({value:e,onChange:t,min:r,max:o,step:a=1,marks:c,className:d,hint:s,disabled:m}){let l=c||[r,r+(o-r)/3,r+2*(o-r)/3,o];return Je("div",{className:i("relative z-0",d),children:Mr("div",{className:"w-full",children:[Mr(_e.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([n])=>t(n),disabled:m,"aria-label":"Slider",children:[Mr(_e.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[Je("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Mr("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[Je(_e.Range,{className:"absolute h-4 bg-black"}),l.map(n=>{let u=(n-r)/(o-r)*100,p=n<=e;return Je("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},n)})]})]}),Je(_e.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:Je("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),Je("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as Bd,useId as Wd,useRef as $d}from"react";import{jsx as Dr,jsxs as Un}from"react/jsx-runtime";function z4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:d=!1}){let s=Wd(),m=$d(null);return Bd(()=>{m.current&&d&&setTimeout(()=>{var l;(l=m.current)==null||l.focus()},10)},[d]),Un("div",{className:a,children:[r&&Dr("div",{className:"flex items-center gap-2",children:Dr("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Un("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:[Dr("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?Nt(e):"",onBlur:l=>{if(l.target.value.length>0){let n=$r(l.target.value);n&&(t(n),l.target.value=Nt(n))}},onKeyDown:l=>{if(l.key==="Enter"&&m.current){l.preventDefault();let n=$r(m.current.value);n&&(t(n),m.current.value=Nt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Dr("input",{type:"datetime-local",id:`${s}-datetime-local`,required:c,value:e?Wo(e):"",onChange:l=>{let n=new Date(l.target.value);t(n),m.current&&(m.current.value=Nt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Ud}from"class-variance-authority";import{jsx as Gn,jsxs as jd}from"react/jsx-runtime";var Gd=Ud("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"}}),Kd={neutral:ya,new:va,success:ha,pending:xa,warning:Gr,error:Gr};function $4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...d}){let s=r!==null?r??Kd[t??"neutral"]:null;return Gn(dr,{tooltipProps:{content:o},children:jd("span",{className:i(Gd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...d,children:[s&&Gn(s,{className:"h-3 w-3 shrink-0"}),c]})})}import*as Ir from"@radix-ui/react-switch";import{useMemo as Yd}from"react";import{jsx as Er}from"react/jsx-runtime";function X4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:d=!0,loading:s=!1,disabled:m=!1,disabledTooltip:l}){let n=Yd(()=>l?!0:m||s,[l,m,s]),u=Er(Ir.Root,{checked:s?!1:d,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:i("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:Er(Ir.Thumb,{className:i(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:c})});return l?Er(J,{content:l,children:Er("div",{className:"inline-block leading-none",children:u})}):u}import{Command as No}from"cmdk";import{useState as Zd}from"react";import{jsx as gt,jsxs as qd}from"react/jsx-runtime";function ny({table:e}){let[t,r]=Zd(!1);return gt(Ae,{openPopover:t,setOpenPopover:r,content:gt(No,{tabIndex:0,loop:!0,children:gt(No.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[130px]",children:e.getAllColumns().filter(o=>o.getCanHide()).map(o=>{var a;return qd(No.Item,{className:i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5","data-[selected=true]:bg-neutral-100"),onSelect:()=>o.toggleVisibility(),children:[gt("input",{checked:o.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),(a=o.columnDef.header)==null?void 0:a.toString()]},o.id)})})}),align:"end",children:gt(ee,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:gt(La,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Co,getCoreRowModel as Qd,useReactTable as em}from"@tanstack/react-table";import{AnimatePresence as tm,motion as rm}from"framer-motion";import{memo as om,useEffect as Ht,useMemo as Zn,useState as Yn}from"react";import{useEffect as Xd,useState as Jd}from"react";import{jsx as Ar,jsxs as Kn}from"react/jsx-runtime";function jn({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,c]=Jd(0);return Xd(()=>{o!==0&&c(o)},[o]),De("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Ar("div",{className:i("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",o>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",r),...{inert:o>0?void 0:""},children:Kn("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Ar("div",{className:"flex w-6 items-center justify-center",children:Ar(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:e.getIsAllRowsSelected()?!0:e.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>e.toggleAllRowsSelected(),title:"Select all"})}),Kn("span",{className:i("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:[a," selected"]}),Ar("div",{className:i("flex items-center gap-2 transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:t==null?void 0:t(e)})]})})}import{Fragment as im,jsx as z,jsxs as ce}from"react/jsx-runtime";var ko=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="select"&&"py-0 pr-0 pl-2",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),am=i(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function Ty(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:d,onPaginationChange:s,getRowId:m,enableColumnResizing:l=!1,columnResizeMode:n="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,b]=Yn(e.columnVisibility??{}),[f,x]=Yn(e.selectedRows??{});Ht(()=>{if(!m||!t)return;let y=Object.entries(f);if(y.length>0){let P=y.filter(([N])=>t.find(C=>(m==null?void 0:m(C))===N));P.length!==y.length&&x(Object.fromEntries(P))}},[t,f,m]),Ht(()=>{e.selectedRows&&!Ur(e.selectedRows,f)&&x(e.selectedRows??{})},[e.selectedRows]),Ht(()=>{var y;(y=e.onRowSelectionChange)==null||y.call(e,w.getSelectedRowModel().rows)},[f]),Ht(()=>{e.columnVisibility&&!Ur(e.columnVisibility,p)&&b(e.columnVisibility??{})},[e.columnVisibility]),Ht(()=>{var y;(y=e.onColumnVisibilityChange)==null||y.call(e,p)},[p]);let v=Zn(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:y})=>z("div",{className:"flex size-full items-center justify-center",children:z(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsAllRowsSelected()?!0:y.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>y.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:y})=>z("div",{className:"flex size-full items-center justify-center",children:z(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsSelected(),onCheckedChange:y.getToggleSelectedHandler(),title:"Select"})})}]:[],...o],[u,o]),w=em({data:t,rowCount:r,columns:v,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:l,...a},getCoreRowModel:Qd(),onPaginationChange:s,onColumnVisibilityChange:y=>b(y),onRowSelectionChange:x,state:{pagination:d,columnVisibility:p,columnPinning:{left:[],right:[],...c},rowSelection:f},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:l,columnResizeMode:n});return{...e,columnVisibility:p,table:w,enableColumnResizing:l}}var nm=om(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:c,table:d}){let{className:s,...m}=o||{};return z("tr",{className:i("group/row",r&&"cursor-pointer select-none",d.getRowModel().rows.length>8&&t.index===d.getRowModel().rows.length-1&&"[&_td]:border-b-0",s),onClick:r?l=>{kt(l)||r(t,l)}:void 0,"data-selected":t.getIsSelected(),...m,children:t.getVisibleCells().map(l=>z("td",{className:i(ko(l.column.id,!!r),"text-content-default group",Po(l.column,t.index===d.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id):c),style:{width:l.column.getSize(),...So(l.column)},children:ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Co(l.column.columnDef.cell,l.getContext())}),a==null?void 0:a(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function Ly({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:c,sortOrder:d,onSortChange:s,sortableColumns:m=[],className:l,containerClassName:n,scrollWrapperClassName:u,thClassName:p,tdClassName:b,table:f,pagination:x,resourceName:v,onRowClick:w,onRowSelectionChange:y,selectionControls:P,rowProps:N,rowCount:C,children:W,enableColumnResizing:M=!1}){let D=!!y||!!P,L=Zn(()=>M?f.getVisibleLeafColumns().reduce((S,h)=>S+h.getSize(),0):"100%",[M,f.getVisibleLeafColumns()]);return ce("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",n),children:[!r&&!!(e!=null&&e.length)||t?ce(im,{children:[D&&z(jn,{table:f,controls:P,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),ce("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[ce("table",{className:i(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",M&&"[&_th]:group/resize"],l),style:{width:"100%",tableLayout:M?"fixed":"auto",minWidth:L},children:[z("thead",{className:"relative",children:f.getHeaderGroups().map(S=>z("tr",{children:S.headers.map(h=>{let R=m.includes(h.column.id),G=R?"button":"div";return ce("th",{colSpan:h.colSpan,className:i(ko(h.id),"text-content-emphasis select-none font-medium",Po(h.column,!f.getRowModel().rows.length),typeof p=="function"?p(h.column.id):p,M&&"relative"),style:{width:h.getSize(),...So(h.column)},children:[z("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ce(G,{className:i("flex items-center gap-2",h.column.id==="select"&&"size-full"),...R&&{type:"button",disabled:!R,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:h.column.id,sortOrder:c!==h.column.id||d==="asc"?"desc":"asc"})},children:[h.isPlaceholder?null:Co(h.column.columnDef.header,h.getContext()),R&&c===h.column.id&&z(ta,{className:"h-3 w-3 shrink-0",order:d||"desc"})]})}),M&&h.column.getCanResize()&&!["select","menu"].includes(h.column.id)&&z("div",{onMouseDown:h.getResizeHandler(),onTouchStart:h.getResizeHandler(),onClick:k=>k.stopPropagation(),className:am})]},h.id)})},S.id))}),z("tbody",{children:f.getRowModel().rows.map(S=>{let h=typeof N=="function"?N(S):N,{className:R,...G}=h||{};return M?z(nm,{row:S,onRowClick:w,rowProps:h,cellRight:a,tdClassName:b,table:f},`${S.id}-${f.getVisibleLeafColumns().map(k=>k.id).join(",")}`):z("tr",{className:i("group/row",w&&"cursor-pointer select-none",f.getRowModel().rows.length>8&&S.index===f.getRowModel().rows.length-1&&"[&_td]:border-b-0",R),onClick:w?k=>{kt(k)||w(S,k)}:void 0,"data-selected":S.getIsSelected(),...G,children:S.getVisibleCells().map(k=>z("td",{className:i(ko(k.column.id,!!w),"text-content-default group",Po(k.column,S.index===f.getRowModel().rows.length-1),typeof b=="function"?b(k.column.id):b),style:{minWidth:k.column.columnDef.minSize,maxWidth:k.column.columnDef.maxSize,width:k.column.columnDef.size||"auto",...So(k.column)},children:ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Co(k.column.columnDef.cell,k.getContext())}),a==null?void 0:a(k)]})},k.id))},S.id)})})]}),W]})]}):z("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:r||o||`No ${(v==null?void 0:v(!0))||"items"} found.`}),x&&!r&&!!(e!=null&&e.length)&&!!C&&ce("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:[ce("div",{children:[z("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ce("span",{className:"font-medium",children:[((x.pageIndex-1)*x.pageSize+1).toLocaleString(),"-",Math.min((x.pageIndex-1)*x.pageSize+x.pageSize,f.getRowCount()).toLocaleString()]})," ","of"," ",z("span",{className:"font-medium",children:f.getRowCount().toLocaleString()})," ",(v==null?void 0:v(f.getRowCount()!==1))||"items"]}),ce("div",{className:"flex items-center gap-2",children:[z(ee,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>f.previousPage(),disabled:x.pageIndex===1}),z(ee,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>f.nextPage(),disabled:x.pageIndex===f.getPageCount()})]})]}),z(tm,{children:t&&z(rm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:z("div",{className:"flex h-[75vh] w-full items-center justify-center",children:z(Ne,{})})})})]})}var Po=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},So=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 sm,motion as qn}from"framer-motion";import lm from"next/link";import{useId as cm}from"react";import{jsx as Or,jsxs as dm}from"react/jsx-runtime";function Oy({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:d}){let s=cm();return Or(sm,{id:s,children:Or(qn.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:d,children:e.map(m=>{let l=m.value===t,n=m.href?lm:"button";return dm(n,{...m.href?{href:m.href}:{type:"button"},"data-selected":l,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!l&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?Or("p",{children:m.label}):m.label,m.badge,l&&Or(qn.div,{layoutId:s,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},m.value)})})})}import{useEffect as mm,useId as um,useRef as pm,useState as fm}from"react";import{jsx as pe,jsxs as Ro}from"react/jsx-runtime";var gm=[{key:"utm_source",icon:Da,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Va,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ta,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Oa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ha,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Ma,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function $y({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:d}=Y(),s=um(),[m,l]=fm(!1),n=pm(null);return mm(()=>{n.current&&!d&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",c),children:gm.map(({key:u,icon:p,label:b,placeholder:f,description:x},v)=>pe("div",{className:"group relative",children:Ro("div",{className:"relative z-10 flex",children:[pe(J,{content:Ro("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:x}),pe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Ro("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>l(w=>!w),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?pe("span",{className:"font-mono text-xs",children:u}):b})]})}),pe("div",{className:"min-w-0 grow",children:pe(dr,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${s}-${u}`,ref:v===0?n:void 0,placeholder:f,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 To,jsxs as bm}from"react/jsx-runtime";function Gy(){return bm("div",{style:zr.backgroundMain,children:[To("div",{style:zr.backgroundMainBefore}),To("div",{style:zr.backgroundMainAfter}),To("div",{style:zr.backgroundContent})]})}var zr={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 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">
|
|
48
|
+
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import iu from"next/image";import Be from"next/link";import{useParams as su}from"next/navigation";import{jsx as Xn}from"react/jsx-runtime";function Jn(e){return Xn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Xn("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 Qn}from"react/jsx-runtime";function Vt({className:e}){return Qn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:Qn("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 Hr=[{title:"Dub Links",description:"Short links with superpowers",icon:nt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:it,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:at,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Zt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Fa,href:"/integrations"}],e3=[{icon:na,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:aa,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Jn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Lo=[{icon:da,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:la,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ia,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ca,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:sa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ei=[{icon:rr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:ar,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:St,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Lo}],_t=[{icon:or,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:er,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:St,title:"About",description:"Company, values, and team",href:"/about"},{icon:ua,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Ra,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:pa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Vt,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:ka,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ti=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],ri=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],t3=[{name:"X (Twitter)",icon:Jt,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Xt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Qt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as hm}from"react/jsx-runtime";function Vr({className:e,children:t}){return hm("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Fe from"@radix-ui/react-popover";import{BoxSelect as Zm,Home as qm,LayoutGrid as Xm,Type as Jm}from"lucide-react";import{useParams as Qm}from"next/navigation";import{useCallback as eu,useContext as tu,useState as ru}from"react";import{toast as ou}from"sonner";import*as me from"@radix-ui/react-navigation-menu";import{LayoutGroup as Im}from"framer-motion";import Ut from"next/link";import{useParams as Am,usePathname as Om}from"next/navigation";import{createContext as zm,useId as Hm}from"react";import Vm from"swr";import{Link as li}from"@radix-ui/react-navigation-menu";import ci from"next/image";import di from"next/link";import{Link2 as vm}from"lucide-react";import{jsx as Z,jsxs as X}from"react/jsx-runtime";var oi={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 ai({className:e}){return X("div",{className:i("pointer-events-none relative size-full",e),children:[X("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"})]}),X("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[X("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[X("div",{className:"p-1.5",children:[X("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(vm,{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=>X("div",{className:"flex items-center justify-between gap-2",children:[X("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:oi[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:jt(t)})]}),X("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",oi[t].value]})]},t))})]}),Z("div",{className:"relative",children:X("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[X("div",{className:"px-3 py-2.5",children:[X("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+"%"}}),X("div",{className:"flex flex-col items-end gap-1",children:[X("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(Na,{className:"text-content-default size-3.5"}),Qe.origin]}),X("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])=>X("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 xm}from"react";import{jsx as g,jsxs as de}from"react/jsx-runtime";function ni(e){let t=xm();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:i("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:[g("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),g("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),g("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),g("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("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:[g("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"}),g("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"})]}),g("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:[g("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),g("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),g("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("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:[g("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"}),g("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"})]}),g("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:[g("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),g("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),g("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"}),g("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"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("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:[g("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"}),g("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"})]}),g("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:[g("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),g("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),de("defs",{children:[g("clipPath",{id:`${t}-b`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),g("clipPath",{id:`${t}-c`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),g("clipPath",{id:`${t}-d`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),g("clipPath",{id:`${t}-f`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),g("clipPath",{id:`${t}-g`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),g("clipPath",{id:`${t}-h`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),g("clipPath",{id:`${t}-j`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),g("clipPath",{id:`${t}-k`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),g("clipPath",{id:`${t}-l`,children:g("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:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("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:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("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:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as wm,jsx as Te,jsxs as Ft}from"react/jsx-runtime";var ym=[{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 ii({className:e}){return Te("div",{className:i("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:ym.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&&Ft(wm,{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),Ft("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ft("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)=>Ft("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[Te("span",{className:"text-content-muted text-[6px] font-medium",children:jt(o)}),Ft("span",{className:"text-content-default text-[9px] font-medium",children:["$",Yt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Nm}from"@radix-ui/react-navigation-menu";import Cm from"next/link";import{jsx as Bt,jsxs as si}from"react/jsx-runtime";var et="text-xs uppercase text-neutral-500 dark:text-white/60",km="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 Wt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...d}){return Bt(Nm,{asChild:!0,children:Bt(Cm,{className:i(km,a),...d,children:si("div",{className:"flex items-center justify-between gap-3",children:[e,si("div",{className:"flex-1",children:[Bt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Bt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&Bt(Jo,{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 O,jsxs as $t}from"react/jsx-runtime";var Pm=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(nt,{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(ni,{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(at,{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(ai,{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(it,{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(ii,{})}],Sm=[{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(ci,{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(ci,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function mi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:Pm.map(({title:t,description:r,icon:o,href:a,color:c,graphicsContainerClassName:d,graphic:s})=>O(li,{asChild:!0,children:$t(di,{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:[O(Ye,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("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:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",d),children:O("div",{className:"relative size-full",children:s})})}),O("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":c}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:Sm.map(({title:t,description:r,href:o,graphic:a})=>O(li,{asChild:!0,children:$t(di,{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:[O(Ye,{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:$t("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 Rm}from"@radix-ui/react-navigation-menu";import Tm from"next/link";import{jsx as K,jsxs as tt}from"react/jsx-runtime";var Lm=[{icon:or,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:er,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function ui({domain:e}){return tt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[tt("div",{className:"flex h-full flex-col p-4",children:[K("p",{className:i(et,"mb-4 ml-2"),children:"Explore"}),K("div",{className:"grid grow grid-cols-2 gap-4",children:Lm.map(({icon:t,title:r,description:o,href:a})=>K(Rm,{asChild:!0,children:tt(Tm,{href:V(a,e,ye({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[tt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[K("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:K(Ye,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),K("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),K(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),tt("div",{className:"relative",children:[K("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),K("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),tt("div",{className:"px-6 py-4",children:[K("p",{className:i(et,"mb-2"),children:"Company"}),K("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Wt,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:K("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:K(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),tt("div",{className:"px-6 py-4",children:[K("p",{className:i(et,"mb-2"),children:"Updates"}),K("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Wt,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:K("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:K(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 Dm from"next/link";import{jsx as te,jsxs as bt}from"react/jsx-runtime";var Em=[{icon:rr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:ar,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:St,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function pi({domain:e}){return bt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[bt("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:i(et,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:Em.map(({icon:t,title:r,description:o,href:a})=>te(Mm,{asChild:!0,children:bt(Dm,{href:V(a,e,ye({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[bt("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(Ye,{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:i("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"}),bt("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))})]}),bt("div",{className:"px-6 py-4",children:[te("p",{className:i(et,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:Lo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Wt,{className:"-mx-2",href:V(a,e,ye({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:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Bm,jsx as F,jsxs as ht}from"react/jsx-runtime";var Mo=zm({theme:"light"}),Do=[{name:"Product",content:mi,childItems:Hr,segments:["/home","/partners","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:pi,childItems:ei,segments:["/solutions","/sdks"]},{name:"Resources",content:ui,childItems:_t,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"]}],fi=i("relative group/item flex items-center rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function dw({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Am();t&&(o=t);let a=Hm(),c=an(40),d=Om(),{data:s,isLoading:m}=Vm(o.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return F(Mo.Provider,{value:{theme:e},children:F(Im,{id:a,children:ht("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[F("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),F(Vr,{className:i("relative",r),children:ht("div",{className:"flex h-14 items-center justify-between",children:[F("div",{className:"grow basis-0",children:F(Ut,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:F(_r,{})})}),ht(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[F(me.List,{className:"group relative z-0 flex",children:Do.map(({name:l,href:n,segments:u,content:p})=>{let b=u.some(f=>d==null?void 0:d.startsWith(f));return ht(me.Item,{children:[F(Fm,{trigger:!!p,children:n!==void 0?F(Ut,{id:`nav-${n}`,href:V(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:l}),className:fi,"data-active":b,children:l}):ht("button",{className:fi,"data-active":b,children:[l,F(_m,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&F(me.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:F(p,{domain:o})})]},l)})}),F("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:F(me.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),F("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?F(Ut,{href:we,className:i(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:ht(Bm,{children:[F(Ut,{href:"https://app.dub.co/login",className:i(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),F(Ut,{href:"https://app.dub.co/register",className:i(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 _m(e){return F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:F("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Fm({trigger:e,children:t}){return e?F(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Wm,Menu as $m,X as Um}from"lucide-react";import vt from"next/link";import{useParams as Ao}from"next/navigation";import{useEffect as Gm,useState as bi}from"react";import Km from"swr";import{Fragment as Ym,jsx as T,jsxs as Le}from"react/jsx-runtime";var Eo={"Dub Links":T("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:T(nt,{className:"size-3 text-orange-900"})}),"Dub Partners":T("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:T(it,{className:"size-3 text-violet-900"})}),"Dub Analytics":T("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:T(at,{className:"size-3 text-green-900"})}),"Dub API":T("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:T(Zt,{className:"size-3 text-neutral-900"})})};function Pw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Ao();t&&(r=t);let[o,a]=bi(!1);Gm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c,isLoading:d}=Km(r.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return Le("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?T(Io,{href:we,className:"max-[280px]:hidden",children:"Dashboard"}):d?null:Le("div",{className:"flex gap-2 max-[280px]:hidden",children:[T(Io,{variant:"secondary",href:`${we}/login`,children:"Log in"}),T(Io,{href:`${we}/register`,children:"Sign Up"})]}),T("button",{onClick:()=>a(!o),className:i("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?T(Um,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):T($m,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),T("nav",{className:i("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:[Do.map(({name:s,href:m,childItems:l},n)=>T(jm,{name:s,href:m,childItems:l,setOpen:a},n)),c&&Object.keys(c).length>0?T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:we,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Le(Ym,{children:[T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:`${we}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:`${we}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var jm=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Ao(),[c,d]=bi(!1);return r?T("li",{className:"py-3",children:Le(ke,{height:!0,children:[Le("button",{className:"flex w-full justify-between",onClick:()=>d(!c),children:[T("p",{className:"font-semibold",children:e}),T(Wm,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&T("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?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:s.label}),s.items.map((l,n)=>T(gi,{item:l,setOpen:o,size:"small"},n))]},m):T(gi,{item:s,setOpen:o},m))})]})}):t?T("li",{className:"py-3",children:T(vt,{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},gi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:d="dub.co"}=Ao(),s=Eo==null?void 0:Eo[e];return Le(vt,{href:V(r,d,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:d,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[T("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:s??T(o,{className:i("size-5 text-neutral-700 grayscale",c==="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 Io({variant:e,className:t,...r}){return T(vt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as hi}from"react/jsx-runtime";function vi({className:e}){return hi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:hi("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 q,jsxs as xi}from"react/jsx-runtime";var au=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
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>`,nu=`<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 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};
|
|
52
|
+
</svg>`;function _r({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Qm(),{theme:a}=tu(Mo),[c,d]=ru(!1),s=eu(n=>{n.preventDefault(),d(!0)},[]),[,m]=dt();function l(n){ou.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return xi(Fe.Root,{open:c,onOpenChange:d,children:[q(Fe.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(vi,{className:r}):q(Vt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Fe.Portal,{children:q(Fe.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),d(!1)},children:xi("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:[q(Gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>l(au),icon:q(Vt,{className:"h-4 w-4"})}),q(Gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>l(nu),icon:q(Jm,{strokeWidth:2,className:"h-4 w-4"})}),q(Gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(Zm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(qm,{strokeWidth:2,className:"h-4 w-4"})}):q(Gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(Xm,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Gt({className:e,...t}){return q(ee,{className:i("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as I,jsxs as B}from"react/jsx-runtime";var lu=[{name:"Twitter",icon:Jt,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Xt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Qt,href:"https://www.youtube.com/@dubdotco"}],xt={product:[...Hr.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:ti.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:ri.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:qo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},yt="text-sm font-medium text-neutral-900",wt="flex flex-col mt-2.5 gap-3.5",rt="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Xw({staticDomain:e,className:t}){let{domain:r="dub.co"}=su();return e&&(r=e),I(Vr,{className:i("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:B("footer",{children:[B("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[B("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:B(Be,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[B("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),I(_r,{className:"h-8 text-neutral-800"})]})}),I("div",{className:"flex items-center gap-3",children:lu.map(({name:o,icon:a,href:c})=>B("a",{href:c,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:o}),I(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),B("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[I("h3",{className:yt,children:"Product"}),I("ul",{role:"list",className:wt,children:xt.product.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:rt,children:o.name})},o.name))})]}),B("div",{children:[I("h3",{className:yt,children:"Solutions"}),I("ul",{role:"list",className:wt,children:xt.solutions.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:rt,children:o.name})},o.name))})]})]}),B("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:yt,children:"Resources"}),I("ul",{role:"list",className:wt,children:xt.resources.map(o=>I("li",{children:B(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:rt,children:[o.name,o.target&&I(Kr,{className:"size-3.5"})]})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[I("h3",{className:yt,children:"Compare"}),I("ul",{role:"list",className:wt,children:xt.compare.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:rt,children:o.name})},o.name))})]}),B("div",{children:[I("h3",{className:yt,children:"Legal"}),B("ul",{role:"list",className:wt,children:[xt.legal.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:rt,children:o.name})},o.name)),I("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:rt,children:["Trust Center ",I(Kr,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:yt,children:"Tools"}),I("ul",{role:"list",className:wt,children:xt.tools.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:rt,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(vn,{}),I(Be,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(iu,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),B("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as cu,motion as du}from"framer-motion";import{useEffect as mu,useState as uu}from"react";import{jsx as yi}from"react/jsx-runtime";var wi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=uu(!1);mu(()=>{c(!0)},[]);let d=r?du.div:"div";return yi(cu,{children:a?yi(d,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as pu}from"class-variance-authority";import{toast as fu}from"sonner";import{jsx as Oo,jsxs as bu}from"react/jsx-runtime";var gu=pu("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 c6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,d]=dt(),s=o||Xo;return bu("button",{onClick:m=>{m.stopPropagation(),fu.promise(d(t),{success:a||"Copied to clipboard!"})},className:i(gu({variant:e}),r),type:"button",children:[Oo("span",{className:"sr-only",children:"Copy"}),c?Oo(oa,{className:"h-3.5 w-3.5"}):Oo(s,{className:"h-3.5 w-3.5"})]})}import{toast as hu}from"sonner";import{jsx as vu}from"react/jsx-runtime";function f6({value:e,children:t,className:r,successMessage:o}){let[a,c]=dt();return vu("button",{onClick:d=>{d.stopPropagation(),hu.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as xu,jsxs as yu}from"react/jsx-runtime";function b6({icon:e,text:t}){return yu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,xu("p",{className:"truncate text-sm",children:t})]})}import{jsx as wu}from"react/jsx-runtime";var v6=({children:e})=>wu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as zo}from"react/jsx-runtime";function C6({apexDomain:e,className:t,imageProps:r}){return e?zo(zt,{src:`${Yo}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):zo("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:zo(Ea,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ni}from"lucide-react";import{useSearchParams as Nu}from"next/navigation";import{useEffect as Cu,useMemo as ku,useRef as Pu}from"react";import Su from"swr";import{useDebounce as Ru}from"use-debounce";import{Fragment as Ci,jsx as j,jsxs as We}from"react/jsx-runtime";function I6({defaultUrl:e}){let t=Nu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Ru(Ko(r),500),a=ku(()=>jo(o||""),[o]),{data:c,isValidating:d}=Su(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,fe,{revalidateOnFocus:!1}),{title:s,description:m,image:l}=c||{},n=Pu(null);Cu(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=Y();return We(Ci,{children:[!e&&We("div",{className:"relative flex items-center",children:[j(Ni,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),We("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[d&&j("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:j(Pt,{})}),l?j("img",{src:l,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):We("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(ea,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),We("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?j("p",{className:"text-sm text-[#536471]",children:a}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):We("div",{className:"grid gap-2",children:[j("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),j("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function A6({defaultUrl:e}){return We(Ci,{children:[We("div",{className:"relative flex items-center",children:[j(Ni,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),j("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:j("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:j(Pt,{})})})]})}import{AnimatePresence as Tu}from"framer-motion";import ki from"js-cookie";import{createContext as Lu,useState as Mu}from"react";import{jsx as Ho}from"react/jsx-runtime";var Du=Lu({hidePopup:()=>{}});function B6({children:e,hiddenCookieId:t}){let[r,o]=Mu(ki.get(t)==="1"),a=()=>{o(!0),ki.set(t,"1")};return Ho(wi,{children:Ho(Du.Provider,{value:{hidePopup:a},children:Ho(Tu,{children:!r&&e})})})}import{motion as Eu}from"framer-motion";import{jsx as Pi}from"react/jsx-runtime";function G6({value:e=0,max:t=100,className:r}){return Pi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Pi(Eu.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 Ri}from"class-variance-authority";import{LayoutGroup as Iu,motion as Au}from"framer-motion";import Ou from"next/link";import{useId as zu}from"react";import{jsx as Kt,jsxs as Si}from"react/jsx-runtime";var Hu=Ri("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"}}),Vu=Ri("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function rN({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=zu();return Kt("div",{className:i("flex text-sm",a),children:Kt(Iu,{id:c,children:t.map(({id:d,label:s,href:m,target:l})=>{let n=d===r;return Si(m?Ou:"div",{className:"relative",href:m??"#",target:l??void 0,children:[Si("button",{type:"button",...o&&!m&&{onClick:()=>o(d)},className:i(Hu({variant:e}),l==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[s,l==="_blank"&&Kt(ma,{className:"size-2.5"})]}),n&&Kt(Au.div,{layoutId:"indicator",transition:{duration:.1},className:Vu({variant:e}),children:Kt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},d)})})})}import{jsx as Vo,jsxs as Ti}from"react/jsx-runtime";var _u=[{icon:Ba,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ca,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Aa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:_a,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ia,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function nN(){return Ti("div",{className:"p-3",children:[Vo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Vo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:_u.map(({text:e,icon:t,href:r})=>Ti("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Vo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Li,jsxs as Fu}from"react/jsx-runtime";function lN({className:e}){return Fu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Li("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"}),Li("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{Jr as AUTOPLAY_DEFAULT_DELAY,e1 as Accordion,zi as AccordionContent,Ai as AccordionItem,Oi as AccordionTrigger,nN as AdvancedLinkFeaturesTooltip,ap as Africa,bp as Airtm,Fi as Alert,Wi as AlertDescription,Bi as AlertTitle,dp as Amazon,Cp as AndroidLogo,ke as AnimatedSizeContainer,kp as AppleLogo,Pp as ArrowBoldUp,Sp as ArrowRight,Rp as ArrowTrendUp,Tp as ArrowTurnLeft,Lp as ArrowTurnRight2,ma as ArrowUpRight,Mp as ArrowsOppositeDirectionX,Dp as ArrowsOppositeDirectionY,np as Asia,Io as AuthButton,l1 as Avatar,Gy as Background,cr as Badge,Ep as BadgeCheck,Ip as BadgeCheck2Fill,L1 as BadgeTooltip,Ap as Blog,zt as BlurImage,Op as Bolt,zp as BoltFill,Vp as Book2,er as Book2Fill,_p as Book2Small,Hp as BookOpen,Fp as Books2,Bp as BoxArchive,Wp as BracketsCurly,ua as BriefcaseFill,$p as Brush,Up as BulletList,pa as BulletListFill,ee as Button,M1 as ButtonTooltip,ti as COMPARE_PAGES,e3 as CUSTOMER_STORIES,Gp as Calculator,un as Calendar,Zp as Calendar6,jp as CalendarDays,Kp as CalendarIcon,Yp as CalendarRefresh,ep as CardAmex,tp as CardDiscover,eb as CardList,rp as CardMastercard,op as CardVisa,qp as Cards,Xp as CaretUpFill,xs as Carousel,ys as CarouselContent,ws as CarouselItem,vb as CarouselNavBar,Cs as CarouselNext,Ns as CarouselPrevious,Tb as CarouselThumbnail,Rb as CarouselThumbnails,hp as CashApp,Jp as ChartActivity2,Qp as ChartArea2,e0 as ChartLine,mp as ChatGPT,fa as Check,tr as Check2,ct as Checkbox,ga as CheckboxCheckedFill,ba as CheckboxUnchecked,t0 as ChevronLeft,r0 as ChevronRight,ha as CircleCheck,o0 as CircleCheckFill,a0 as CircleDollar,n0 as CircleDotted,va as CircleHalfDottedCheck,xa as CircleHalfDottedClock,ya as CircleInfo,i0 as CirclePercentage,s0 as CirclePlay,l0 as CirclePlayFill,c0 as CircleQuestion,d0 as CircleUser,Gr as CircleWarning,m0 as CircleXmark,u0 as Circles,p0 as Circles3,wi as ClientOnly,wa as CloudUpload,f0 as Code,g0 as ColorPalette2,wv as Combobox,lN as CompositeLogo,b0 as ConnectedDots,v0 as ConnectedDots4,h0 as ConnectedDotsFill,x0 as Connections3,Xo as Copy,c6 as CopyButton,f6 as CopyText,y0 as CreditCard,w0 as Crosshairs3,N0 as Crown,Bu as CrownSmall,C0 as Cube,k0 as CubeSettings,P0 as CubeSettingsFill,S0 as CurrencyDollar,Na as CursorRays,R0 as DatabaseKey,oo as DatePickerContext,nx as DateRangePicker,T0 as Desktop,L0 as DiamondTurnRight,rr as DiamondTurnRightFill,M0 as Directions,D0 as Discount,E0 as Dots,px as DotsPattern,I0 as Download,at as DubAnalyticsIcon,Zt as DubApiIcon,Wu as DubCraftedShield,nt as DubLinksIcon,it as DubPartnersIcon,vn as DubStatusBadge,A0 as Duplicate,dr as DynamicTooltipWrapper,Ca as Earth,O0 as EarthPosition,ny as EditColumnsButton,wx as EmptyState,z0 as Envelope,H0 as EnvelopeAlert,V0 as EnvelopeArrowRight,ka as EnvelopeFill,ip as Europe,Jo as ExpandingArrow,Pa as Eye,Sa as EyeSlash,Hr as FEATURES_LIST,Ku as Facebook,Ra as FeatherFill,up as Figma,_0 as FileContent,Ex as FileUpload,F0 as FileZip2,o2 as Filter,W0 as Filter2,B0 as FilterBars,U0 as Flag2,Ta as Flag6,$0 as FlagWavy,G0 as Flask,K0 as FlaskSmall,j0 as Folder,J0 as Folder5,Y0 as FolderBookmark,Z0 as FolderLock,q0 as FolderPlus,X0 as FolderShield,Xw as Footer,d2 as Form,Q0 as GamingConsole,ef as Gauge6,La as Gear,tf as Gear2,rf as Gear3,of as Gem,Ma as Gift,af as GiftFill,pp as GitHubEnhanced,qt as Github,nf as Globe,Ea as Globe2,Da as GlobePointer,sf as GlobeSearch,ia as Go,ju as Google,fp as GoogleEnhanced,lf as GreekTemple,Ye as Grid,cf as GridIcon,df as GridLayoutRows,mf as GridPlus,uf as GripDotsVertical,pf as Headset,ff as HeartFill,gf as HexadecagonStar,bf as History,hf as Hyperlink,b6 as IconMenu,vf as Icosahedron,Ia as Incognito,R1 as InfoTooltip,v6 as InlineSnippet,Bc as Input,xf as InputField,yf as InputPassword,Aa as InputPasswordPointer,Oa as InputSearch,F2 as InputSelect,Yu as Instagram,wf as InvoiceDollar,Nf as Key,Xa as KeyboardShortcutContext,lh as KeyboardShortcutProvider,ri as LEGAL_PAGES,ld as Label,Cf as LayoutSidebar,kf as License,or as LifeRing,Pf as LinesY,Rf as Link4,Sf as LinkBroken,C6 as LinkLogo,I6 as LinkPreview,A6 as LinkPreviewPlaceholder,Xt as LinkedIn,S1 as LinkifyTooltipContent,Pt as LoadingCircle,Gu as LoadingDots,Ne as LoadingSpinner,Tf as LocationPin,Lf as Lock,Mf as LockFill,Vt as Logo,Qo as Magic,Df as Magnifier,Ef as MapPosition,$u as MarkdownIcon,If as MarketingTarget,Uu as MatrixLines,Vr as MaxWidthWrapper,Af as Menu3,J2 as MenuItem,Of as MessageSmile,ar as MicrophoneFill,l4 as MiniAreaChart,za as Minus,zf as MobilePhone,f4 as Modal,Hf as MoneyBill,Vf as MoneyBill2,_f as MoneyBills2,Ff as Msgs,dw as Nav,Mo as NavContext,Pw as NavMobile,_r as NavWordmark,sp as NorthAmerica,Bf as Note,Zf as NucleoPhoto,T1 as NumberTooltip,lp as Oceania,Wf as OfficeBuilding,Yg as PLAN_FEATURE_ICONS,Ha as Page2,h4 as PaginationControls,$f as Paintbrush,Uf as Palette2,Gf as PaperPlane,vp as Payoneer,xp as Paypal,jf as Pen2,Kf as PenWriting,Yf as PercentageArrowDown,ea as Photo,sa as Php,qf as Plug2,nr as Plus,Xf as Plus2,Ae as Popover,B6 as Popup,Du as PopupContext,Jf as Post,Zu as Prisma,aa as ProductHunt,G6 as ProgressBar,Qf as Pyramid,la as Python,eg as QRCode,_t as RESOURCES,Rd as RadioGroup,Td as RadioGroupItem,na as Raycast,tg as Receipt2,Kr as ReferredVia,rg as Refresh2,og as Robot,ca as Ruby,Lo as SDKS,t3 as SOCIAL_LINKS,ei as SOLUTIONS,Va as SatelliteDish,ag as ScanText,ng as Scribble,P4 as Sheet,ig as ShieldAlert,sg as ShieldCheck,lg as ShieldKeyhole,cg as ShieldSlash,dg as ShieldUser,L4 as ShimmerDots,mg as Shuffle,P1 as SimpleTooltipContent,qu as Slack,E4 as Slider,ug as Sliders,z4 as SmartDateTimePicker,ta as SortOrder,cp as SouthAmerica,pg as Sparkle3,gp as Spotify,fg as SquareChart,gg as SquareLayoutGrid5,bg as SquareLayoutGrid6,hg as SquareUserSparkle2,vg as SquareXmark,xg as Stars2,$4 as StatusBadge,yp as Stripe,wp as StripeLink,ra as Success,X4 as Switch,Tg as TV,rN as TabSelect,Ly as Table,yg as TableIcon,wg as TableRows2,Ng as Tablet,Cg as Tag,kg as Tags,oa as Tick,Xu as TikTok,_a as Timer2,Ju as Tinybird,Fa as Toggle2Fill,Oy as ToggleGroup,Pg as Toggles,c1 as TokenAvatar,J as Tooltip,k1 as TooltipContent,C1 as TooltipProvider,Sg as Trash,Rg as TriangleWarning,Jt as Twitter,da as Typescript,$y as UTMBuilder,gm as UTM_PARAMETERS,Lg as UiCard,Qu as Unsplash,Mg as User,Dg as UserCheck,Eg as UserCrown,Ig as UserDelete,Ag as UserFocus,Og as UserPlus,zg as UserXmark,Hg as Users,_g as Users2,Fg as Users6,St as UsersFill,Vg as UsersSettings,Np as Venmo,Bg as Versions2,Ba as Views,Wg as Watch,$g as Webhook,Ug as Window,Gg as WindowSearch,Kg as WindowSettings,vi as Wordmark,jg as Xmark,Qt as YouTube,ji as badgeVariants,ie as buttonVariants,Gi as getUserAvatarUrl,Do as navItems,Gd as statusBadgeVariants,be as useCarousel,Ya as useCarouselActiveIndex,zb as useCookies,dt as useCopyToClipboard,Bb as useCurrentAnchor,Gb as useEnterSubmit,Zb as useInViewport,Jb as useInputFocused,rh as useIntersectionObserver,De as useKeyboardShortcut,mh as useLocalStorage,Y as useMediaQuery,bh as useOptimisticUpdate,Th as usePagination,Dh as useRemoveGAParams,ur as useResizeObserver,tn as useRouterStuff,an as useScroll,Ee as useScrollProgress,Ty as useTable,en as useTablePagination,Kh as useToastWithUndo};
|