@dub/ui 0.2.65 → 0.2.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client"
2
- import{$ as Ap,$a as k0,$b as Ha,$c as ag,$d as qg,A as or,Aa as ir,Ab as j0,Ac as Of,Ad as Sg,B as gp,Ba as i0,Bb as Ea,Bc as zf,Bd as Ya,C as bp,Ca as s0,Cb as K0,Cc as Vf,Cd as Rg,D as hp,Da as l0,Db as Y0,Dc as Hf,Dd as Tg,E as vp,Ea as c0,Eb as Z0,Ec as _f,Ed as Lg,F as ar,Fa as Na,Fb as lr,Fc as Ff,Fd as Mg,G as xp,Ga as d0,Gb as q0,Gc as $a,Gd as Dg,H as nr,Ha as m0,Hb as X0,Hc as Wf,Hd as Eg,I as yp,Ia as wa,Ib as J0,Ic as Bf,Id as Ig,J as Np,Ja as u0,Jb as Q0,Jc as $f,Jd as Ag,K as wp,Ka as p0,Kb as ef,Kc as Ua,Kd as Og,L as Cp,La as f0,Lb as Ia,Lc as Ga,Ld as zg,M as ga,Ma as g0,Mb as tf,Mc as Uf,Md as Vg,N as ba,Na as b0,Nb as rf,Nc as Gf,Nd as Hg,O as ha,Oa as h0,Ob as of,Oc as jf,Od as _g,P as va,Pa as v0,Pb as af,Pc as Kf,Pd as Fg,Q as xa,Qa as x0,Qb as Aa,Qc as cr,Qd as Wg,R as kp,Ra as y0,Rb as Oa,Rc as Yf,Rd as Bg,S as Pp,Sa as N0,Sb as za,Sc as Zf,Sd as $g,T as Sp,Ta as Ca,Tb as nf,Tc as qf,Td as Ug,U as Rp,Ua as sr,Ub as Va,Uc as Xf,Ud as Gg,V as Tp,Va as ka,Vb as sf,Vc as Jf,Vd as jg,W as Lp,Wa as Pa,Wb as lf,Wc as Qf,Wd as Kg,X as Mp,Xa as w0,Xb as cf,Xc as eg,Xd as Za,Y as Dp,Ya as C0,Yb as df,Yc as tg,Yd as qa,Z as Ep,Za as Sa,Zb as mf,Zc as rg,Zd as Yg,_ as Ip,_a as Ra,_b as uf,_c as og,_d as Zg,a as ap,aa as Op,ab as P0,ac as pf,ad as dr,ae as Xg,b as la,ba as zp,bb as Ta,bc as ff,bd as mr,be as Jg,c as np,ca as Vp,cb as La,cc as gf,cd as ng,ce as Qg,d as lt,da as Hp,db as Ma,dc as bf,dd as ig,de as eb,e as tr,ea as _p,eb as S0,ec as hf,ed as sg,ee as tb,f as ip,fa as Fp,fb as R0,fc as vf,fd as lg,fe as rb,g as ct,ga as Wp,gb as T0,gc as xf,gd as cg,ge as ob,h as dt,ha as Bp,hb as L0,hc as yf,hd as dg,he as ab,i as qr,ia as $p,ib as M0,ic as Nf,id as mg,ie as nb,j as ca,ja as Up,jb as Xr,jc as wf,jd as ja,je as ib,k as sp,ka as Gp,kb as D0,kc as _a,kd as ug,ke as sb,l as da,la as jp,lb as E0,lc as Cf,ld as pg,le as lb,m as lp,ma as Kp,mb as I0,mc as kf,md as fg,me as Rt,n as cp,na as Yp,nb as Da,nc as Pf,nd as gg,ne as cb,o as ma,oa as Zp,ob as A0,oc as Fa,od as bg,oe as db,p as ua,pa as ya,pb as O0,pc as Sf,pd as hg,pe as mb,q as pa,qa as qp,qb as z0,qc as Rf,qd as vg,qe as ub,r as fa,ra as Xp,rb as V0,rc as Wa,rd as xg,re as Xa,s as St,sa as Jp,sb as H0,sc as Tf,sd as mt,se as pb,t as dp,ta as Qp,tb as _0,tc as Ba,td as yg,te as fb,u as Pe,ua as e0,ub as F0,uc as Lf,ud as Ng,ue as gb,v as mp,va as t0,vb as W0,vc as Mf,vd as wg,ve as bb,w as up,wa as r0,wb as B0,wc as Df,wd as Cg,we as hb,x as rr,xa as o0,xb as $0,xc as Ef,xd as kg,xe as vb,y as pp,ya as a0,yb as U0,yc as If,yd as Ka,ye as xb,z as fp,za as n0,zb as G0,zc as Af,zd as Pg}from"./chunk-WOETGI7J.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as Yr,b as kt,c as Xo,d as Jo,e as Pt,f as Qo,g as ea,h as be,i as Ke,j as i,k as Zr,l as ta,m as _,n as ra,o as ke,p as oa,q as aa,r as na,s as Qt,t as er,u as ia,v as sa}from"./chunk-UNJ5FMFD.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Bi}from"lucide-react";import*as pr from"react";import{jsx as ur,jsxs as ji}from"react/jsx-runtime";var Pb=ie.Root,$i=pr.forwardRef(({className:e,...t},r)=>ur(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));$i.displayName="AccordionItem";var Ui=pr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Bi:mt;return ur(ie.Header,{className:"flex",children:ji(ie.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,ur(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ui.displayName=ie.Trigger.displayName;var Gi=pr.forwardRef(({className:e,children:t,...r},o)=>ur(ie.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));Gi.displayName=ie.Content.displayName;import{cva as Ki}from"class-variance-authority";import*as fr from"react";import{jsx as Jr}from"react/jsx-runtime";var Yi=Ki("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Zi=fr.forwardRef(({className:e,variant:t,...r},o)=>Jr("div",{ref:o,role:"alert",className:i(Yi({variant:t}),e),...r}));Zi.displayName="Alert";var qi=fr.forwardRef(({className:e,...t},r)=>Jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));qi.displayName="AlertTitle";var Xi=fr.forwardRef(({className:e,...t},r)=>Jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Xi.displayName="AlertDescription";import{sha256 as Ji}from"js-sha256";import{useState as Qi}from"react";import{jsx as Qr}from"react/jsx-runtime";function es(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/${Ji(e.email)}?d=${t}`:t}function Ib({user:e={},className:t}){if(!e)return Qr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Qi(es(e));return Qr("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 Ab({id:e,className:t}){return Qr("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 ts}from"class-variance-authority";import{jsx as os}from"react/jsx-runtime";var rs=ts("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 gr({className:e,variant:t,...r}){return os("span",{className:i(rs({variant:t}),e),...r})}import{cva as cs}from"class-variance-authority";import{forwardRef as ds}from"react";import*as he from"@radix-ui/react-tooltip";import as from"linkify-react";import{HelpCircle as ns}from"lucide-react";import is from"next/link";import{useState as ss}from"react";import{Fragment as ls,jsx as U,jsxs as Ye}from"react/jsx-runtime";function Yb({children:e}){return U(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...s}){let[m,d]=ss(!1);return Ye(he.Root,{open:o?!1:m,onOpenChange:d,delayDuration:c,disableHoverableContent:n,children:[U(he.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),U(he.Portal,{children:U(he.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:d}):t})})]})}function Zb({title:e,cta:t,href:r,target:o,onClick:a}){return Ye("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(is,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(te,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function qb({title:e,cta:t,href:r}){return Ye("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ye(ls,{children:[" ",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 Xb({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(as,{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 Jb(e){return U(J,{...e,children:U(ns,{className:"h-4 w-4 text-neutral-500"})})}function Qb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:Ye("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ye("p",{className:"text-sm font-semibold text-neutral-700",children:[r,er(e||0,{full:!0})," ",t]}),a&&Ye("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",ea(a,{withAgo:!0})]})]}),children:o})}function e1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(gr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function t1({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 ut({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as pt,jsxs as Ja}from"react/jsx-runtime";var se=cs("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"}}),te=ds(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:m,right:d,...l},u)=>m?pt(J,{content:m,children:Ja("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:[c,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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})]})}):Ja("button",{ref:u,type:l.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",l.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:l.disabled||n,...l,children:[n?pt(Pe,{}):c||null,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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}),d]}));te.displayName="Button";import{cva as ms}from"class-variance-authority";import{createContext as us}from"react";import{jsx as Qa}from"react/jsx-runtime";var ps=ms("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"}}}),Tt=us({variant:"loose",loading:!1});function en({variant:e="loose",loading:t=!1,className:r,children:o}){return Qa("ul",{className:i(ps({variant:e,loading:t}),r),"data-variant":e,children:Qa(Tt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as fs}from"class-variance-authority";import{createContext as gs,useContext as bs,useEffect as hs,useRef as vs,useState as xs}from"react";import{jsx as tn,jsxs as ws}from"react/jsx-runtime";var ys=fs("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"}}}),Ns="w-full py-2.5 px-4",eo=gs({hovered:!1});function rn({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=bs(Tt),m=vs(null),[d,l]=xs(!1);hs(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var g;((g=m.current)==null?void 0:g.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||Ke(p));return ws("li",{ref:m,className:i(ys({variant:s}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,tn("div",{className:i(Ns,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:tn(eo.Provider,{value:{hovered:d},children:r})})]})}var P1=Object.assign(en,{Card:Object.assign(rn,{Context:eo}),Context:Tt});import{motion as pl}from"framer-motion";import{forwardRef as fl,useRef as gl}from"react";import{useEffect as Cs,useState as ks}from"react";function on(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function to(e,t){let[r,o]=ks(on(e)??t);return Cs(()=>{let n=on(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function Ps(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function M1(e,t){if(!Ps(t)){let o=t,a=m=>{let d=o[m];return Object.fromEntries(d.all.map(l=>[l,d.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,s]=to(e,n);return{columnVisibility:c,setColumnVisibility:(m,d)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(g=>[g,g in d?d[g]:u[g]??!1]));s({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=to(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let m=o.all,d=n||{},l=Object.fromEntries(m.map(u=>[u,u in s?s[u]:d[u]??!1]));c(l)}}}}import ro from"js-cookie";import{useEffect as Ss,useState as Rs}from"react";function A1(e,t,r){let[o,a]=Rs(()=>{let c=ro.get(e);return c?JSON.parse(c):t});return Ss(()=>{let c=()=>{let s=ro.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),ro.set(e,JSON.stringify(c),r)}]}import{useCallback as Ts,useEffect as Ls,useRef as Ms,useState as Ds}from"react";var ft=(e=3e3)=>{let t=Ms(null),[r,o]=Ds(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Ts(async(c,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),s==null||s(),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 Ls(()=>()=>a(),[]),[r,n]};import{useEffect as Es,useState as Is}from"react";function _1(){let[e,t]=Is(null);return Es(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,g;let m=s[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let b=1;b<s.length;b++){let f=s[b];if(!f)break;(f.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=f)}let l=m.target;for(;l&&l.getBoundingClientRect().bottom<o;)l=(p=n.get(l))==null?void 0:p.next;for(;l&&l.getBoundingClientRect().top>d;)l=(g=n.get(l))==null?void 0:g.prev;l&&t(l.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),n=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{useEffect as As,useState as Os}from"react";function $1(){let[e,t]=Os(null);return As(()=>{let r=window.location.hostname;ra.has(r)?t("app"):aa.has(r)?t("partners"):oa.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as zs}from"react";function K1(e){return{handleKeyDown:zs(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 Vs,useState as Hs}from"react";function X1(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=Hs(o??!1);return Vs(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(l.top<u.bottom&&l.bottom>u.top&&l.left<u.right&&l.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as _s,useState as Fs}from"react";function eh(){let[e,t]=Fs(!1);return _s(()=>{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 Ws,useState as Bs}from"react";function ah(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=Bs(),s=(n==null?void 0:n.isIntersecting)&&a,m=([d])=>{c(d)};return Ws(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!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,s]),n}import{createContext as $s,useCallback as Us,useContext as Gs,useEffect as an,useId as js,useState as Ks}from"react";import{jsx as Ys}from"react/jsx-runtime";var nn=$s({listeners:[],setListeners:()=>{}});function dh({children:e}){let[t,r]=Ks([]);return Ys(nn.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=js(),{listeners:a,setListeners:n}=Gs(nn),c=Us(s=>{if(r.enabled===!1)return;let m=s.target,d=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!l!=!!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(b=>b.enabled!==!1&&!!d==!!b.modal&&!!l==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||Qo(p,(b,f)=>(f.priority??0)-(b.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);an(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),an(()=>(n(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as Zs}from"sonner";import qs from"swr";function gh(e,t){let{data:r,isLoading:o,mutate:a}=qs(e,be);return{data:r,isLoading:o,update:async(n,c)=>Zs.promise(a(n(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 dn,useMemo as rl}from"react";import{useEffect as sn,useState as Xs}from"react";function ln({pageSize:e,page:t,onPageChange:r}){let[o,a]=Xs({pageIndex:t,pageSize:e});return sn(()=>{a(n=>({...n,pageIndex:t}))},[t]),sn(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Js,useRouter as Qs,useSearchParams as el}from"next/navigation";import{useCallback as tl}from"react";function cn(){let e=Js(),t=Qs(),r=el(),o=Object.fromEntries(r),a=(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var g;(g=s.include)!=null&&g.includes(p)&&l.set(p,u)}),m=l}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let d=m.toString();return d.length>0?`?${d}`:""},n=tl(({set:c,del:s,replace:m,scroll:d=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([f,v])=>p.set(f,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(f=>p.delete(f)):p.delete(s));let g=p.toString(),b=`${e}${g.length>0?`?${g}`:""}`;if(l)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Rh(e=sa){let{searchParams:t,queryParams:r}=cn(),o=rl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=ln({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return dn(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),dn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as ol}from"react";function Mh(){ol(()=>{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 al,useState as nl}from"react";function br(e){let[t,r]=nl(),o=([a])=>{r(a)};return al(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}import{useCallback as il,useEffect as mn,useState as sl}from"react";function un(e,{container:t}={}){let[r,o]=sl(!1),a=il(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return mn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),mn(()=>{a()},[a]),r}import{useCallback as ll,useEffect as cl,useState as dl}from"react";function Ae(e){let[t,r]=dl(1),o=ll(()=>{if(!e.current)return;let{scrollTop:n,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(n/(c-s),1))},[]),a=br(e);return cl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ml}from"react";import{toast as fn}from"sonner";import{jsx as hr,jsxs as pn}from"react/jsx-runtime";function ul({id:e,message:t,undo:r}){let o=()=>{r(),fn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return ml(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),pn("div",{className:"flex w-full items-center justify-between space-x-2",children:[pn("div",{className:"flex items-center space-x-2",children:[hr(pa,{}),hr("p",{className:"font-medium",children:t})]}),hr("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 Gh(){return({id:t,message:r,undo:o,duration:a})=>fn(hr(ul,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as gn}from"react/jsx-runtime";var pe=fl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var d,l;let s=gl(null),m=br(s);return gn(pl.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((l=m==null?void 0:m.contentRect)==null?void 0:l.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:gn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});pe.displayName="AnimatedSizeContainer";import{jsx as Se,jsxs as bn}from"react/jsx-runtime";function ov({options:e,value:t,onChange:r,className:o,gridCols:a="2",name:n,disabled:c=!1,animated:s=!0}){let m={1:"grid-cols-1",2:"grid-cols-1 lg:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}[a],d=Se("div",{className:i("grid gap-3",m),children:e.map(({key:l,label:u,description:p,icon:g})=>{let b=t===l;return bn("label",{className:i("relative flex w-full cursor-pointer items-start rounded-md border border-neutral-200 bg-white text-neutral-600 hover:bg-neutral-50","transition-all duration-150",b&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",c&&"cursor-not-allowed opacity-50",o),children:[Se("input",{type:"radio",name:n,value:l,className:"hidden",checked:b,disabled:c,onChange:f=>{f.target.checked&&r&&r(l)}}),g&&Se("div",{className:"flex-shrink-0 pt-0.5",children:g}),bn("div",{className:"flex grow flex-col p-3 pr-0",children:[Se("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Se("span",{className:"text-xs text-neutral-600",children:p})]}),Se(Ra,{className:i("mr-1.5 mt-1.5 flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",b&&"scale-100 opacity-100")})]},l)})});return s?Se("div",{className:"-m-1",children:Se(pe,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Se("div",{className:"p-1",children:d})})}):d}import bl from"embla-carousel-autoplay";import hl from"embla-carousel-react";import{ArrowLeft as vl,ArrowRight as xl}from"lucide-react";import{createContext as yl,forwardRef as Mt,useCallback as Lt,useContext as Nl,useEffect as oo,useState as ao}from"react";import{jsx as Re,jsxs as xn}from"react/jsx-runtime";var no=2e3,hn=yl(null);function ve(){let e=Nl(hn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function vn(){let{api:e}=ve(),[t,r]=ao(0),o=Lt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return oo(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var wl=Mt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},m)=>{let[d,l]=hl({...t,axis:e==="horizontal"?"x":"y"},[...o?[bl(typeof o=="object"?o:{delay:no})]:[],...a||[]]),[u,p]=ao(!1),[g,b]=ao(!1),f=Lt(x=>{!x||(p(x.canScrollPrev()),b(x.canScrollNext()))},[]),v=Lt(()=>{l==null||l.scrollPrev()},[l]),y=Lt(()=>{l==null||l.scrollNext()},[l]),N=Lt(x=>{x.key==="ArrowLeft"?(x.preventDefault(),v()):x.key==="ArrowRight"&&(x.preventDefault(),y())},[v,y]);return oo(()=>{!l||!r||r(l)},[l,r]),oo(()=>{if(!!l)return f(l),l.on("reInit",f),l.on("select",f),()=>{l==null||l.off("select",f)}},[l,f]),Re(hn.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:y,canScrollPrev:u,canScrollNext:g},children:Re("div",{ref:m,onKeyDownCapture:N,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});wl.displayName="Carousel";var Cl=Mt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return Re("div",{ref:o,className:"overflow-hidden",children:Re("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Cl.displayName="CarouselContent";var kl=Mt(({className:e,...t},r)=>{let{orientation:o}=ve();return Re("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})});kl.displayName="CarouselItem";var Pl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=ve();return xn("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Re(vl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Previous slide"})]})});Pl.displayName="CarouselPrevious";var Sl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=ve();return xn("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Re(xl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Next slide"})]})});Sl.displayName="CarouselNext";import{cva as Rl}from"class-variance-authority";import{motion as Tl}from"framer-motion";import{ChevronLeft as Ll,ChevronRight as Ml}from"lucide-react";import*as Oe from"react";import{jsx as Ze,jsxs as Dt}from"react/jsx-runtime";var Dl=Rl("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 "}}}),Nv=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=ve(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[m,d]=Oe.useState(0),[l,u]=Oe.useState(!1),p=Oe.useCallback(f=>{d((f==null?void 0:f.selectedScrollSnap())??0)},[]),g=Oe.useCallback(f=>()=>{s&&s.isPlaying()&&s.stop(),f()},[s]);return Oe.useEffect(()=>{!c||(p(c),u((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,s,p]),Dt("div",{className:i(Dl({variant:e}),t),children:[e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:g(o),children:[Ze(Ll,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ze("div",{className:"flex items-center gap-1",children:c.slideNodes().map((f,v)=>Dt("button",{onClick:g(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ze("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",l&&v===m&&"w-6 bg-black/20"),children:l&&v===m&&Ze(Tl.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??no)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Dt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:g(r),children:[Ze(Ml,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Next slide"})]})]})};import El from"embla-carousel-react";import{forwardRef as Il,useCallback as Al,useEffect as Ol}from"react";import{jsx as vr}from"react/jsx-runtime";var Mv=({className:e,...t})=>{let{api:r}=ve(),[o,a]=El({dragFree:!0}),n=Al(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Ol(()=>{if(!(!r||!a))return n(r),r.on("reInit",n),r.on("select",n),()=>{r==null||r.off("reInit",n),r==null||r.off("select",n)}},[r,a,n]),vr("div",{className:"overflow-hidden",ref:o,children:vr("div",{className:i("mx-4 flex gap-4",e),...t})})},Dv=Il(({index:e,className:t,...r},o)=>{let{api:a}=ve(),n=vn();return vr("div",{ref:o,children:vr("button",{type:"button",onClick:()=>{var s;if(!a)return;let c=(s=a.plugins())==null?void 0:s.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as Et from"@radix-ui/react-checkbox";import{forwardRef as zl}from"react";import{jsx as io,jsxs as Vl}from"react/jsx-runtime";var gt=zl(({className:e,...t},r)=>io(Et.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:Vl(Et.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[io(sr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),io(mr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));gt.displayName=Et.Root.displayName;import{Command as At,CommandInput as Hl,CommandItem as _l,useCommandState as Fl}from"cmdk";import{ChevronDown as Wl}from"lucide-react";import{forwardRef as Bl,isValidElement as $l,useCallback as Ul,useEffect as yr,useRef as Gl,useState as It}from"react";import*as ze from"@radix-ui/react-popover";import{Drawer as bt}from"vaul";import{jsx as Te,jsxs as xr}from"react/jsx-runtime";function xe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:l,onEscapeKeyDown:u,onWheel:p,sideOffset:g=8}){let{isMobile:b}=Y();return c||b?xr(bt.Root,{open:a,onOpenChange:n,children:[Te(bt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),xr(bt.Portal,{children:[Te(bt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),xr(bt.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:[Te("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Te("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Te("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})]}),Te(bt.Overlay,{})]})]}):xr(ze.Root,{open:a,onOpenChange:n,children:[Te(ze.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Te(ze.Portal,{children:Te(ze.Content,{sideOffset:g,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:l,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as Nr,jsx as E,jsxs as Le}from"react/jsx-runtime";function jl(e,t){return e===!0}function ox({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,trigger:n,icon:c,placeholder:s="Select...",searchPlaceholder:m="Search...",emptyState:d,createLabel:l,onCreate:u,buttonProps:p,shortcutHint:g,caret:b,side:f,open:v,onOpenChange:y,onSearchChange:N,shouldFilter:x=!0,inputRight:P,inputClassName:k,optionRight:A,optionClassName:W,matchTriggerWidth:T,hideSearch:S=!1,children:K}){let w=jl(e,r),C=Array.isArray(t)?t:t?[t]:[],{isMobile:R}=Y(),[L,ee]=It(!1),D=v??L,Jt=y??ee,[ge,Gr]=It(""),[Yo,jr]=It(!1),[Kr,_i]=It(void 0),[Fi,Zo]=It(!1),Wi=V=>{var st;if(o==null||o(V),!!r)if(w){let Ge=C.some(({value:je})=>je===V.value);r(Ge?C.filter(({value:je})=>je!==V.value):[...C,V])}else r(C.length&&((st=C[0])==null?void 0:st.value)===V.value?null:V),Jt(!1)},qo=Ul((V,st)=>st===""?[...V.filter(Ge=>Ge.first&&!C.some(je=>je.value===Ge.value)),...C,...V.filter(Ge=>!Ge.first&&!C.some(je=>je.value===Ge.value))]:V,[C]);return yr(()=>{Yo&&(_i(a&&qo(a,ge)),jr(!1))},[Yo,a,qo,ge]),yr(()=>{jr(!0)},[a]),yr(()=>{D||(Gr(""),jr(!0))},[D]),yr(()=>N==null?void 0:N(ge),[ge]),E(xe,{openPopover:D,setOpenPopover:Jt,align:"start",side:f,onWheel:V=>{V.stopPropagation()},popoverContentClassName:i(T&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(pe,{width:!R&&!T,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Le(At,{loop:!0,shouldFilter:x,children:[!S&&Le("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Hl,{placeholder:m,value:ge,onValueChange:Gr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",k),onKeyDown:V=>{(V.key==="Escape"||V.key==="Backspace"&&!ge)&&(V.preventDefault(),V.stopPropagation(),Jt(!1))}}),P&&E("div",{className:"mr-2",children:P}),g&&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:g})]}),E(Kl,{children:E(At.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Kr!==void 0?Le(Nr,{children:[Kr.map(V=>E(Yl,{option:V,multiple:w,selected:C.some(({value:st})=>st===V.value),onSelect:()=>Wi(V),right:A==null?void 0:A(V),className:W},`${V.label}, ${V.value}`)),ge.length>0&&u&&Le(_l,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",W),onSelect:async()=>{Zo(!0),await(u==null?void 0:u(ge))&&(Gr(""),Jt(!1)),Zo(!1)},children:[Fi?E(Pe,{className:"size-4 shrink-0"}):E(mt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(l==null?void 0:l(ge))||`Create "${ge}"`})]}),x?E(ql,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:d||"No matches"}):Kr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:d||"No matches"}):null]}):E(At.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Pe,{})})})})})]})}),children:n??E(te,{variant:"secondary",...p,className:i(p==null?void 0:p.className,"flex gap-2"),textWrapperClassName:i(p==null?void 0:p.textWrapperClassName,"w-full flex items-center justify-start"),text:Le(Nr,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:K||C.map(V=>V.label).join(", ")||s}),b&&(b===!0?E(Wl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):b)]}),icon:c?yn(c)?c:E(c,{className:"size-4 shrink-0"}):void 0})})}var Kl=({children:e})=>{let t=Gl(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Le(Nr,{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 Yl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Le(Nr,{children:[E(Zl,{disabledTooltip:e.disabledTooltip,children:Le(At.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",n),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(ka,{className:"size-4 text-neutral-600"}):E(Pa,{className:"size-4 text-neutral-400"})}),Le("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:yn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(sr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(At.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,yn=e=>$l(e),ql=Bl((e,t)=>Fl(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as wr,format as Xl,isSameMonth as Jl}from"date-fns";import{ChevronLeft as Nn,ChevronRight as wn,ChevronsLeft as Ql,ChevronsRight as ec}from"lucide-react";import{forwardRef as tc,useRef as rc}from"react";import{DayPicker as oc,useDayPicker as ac,useDayRender as nc,useNavigation as ic}from"react-day-picker";import{Fragment as sc,jsx as oe,jsxs as Cr}from"react/jsx-runtime";var Ot=tc(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:oe(t,{className:"h-full w-full shrink-0"})}));Ot.displayName="NavigationButton";function Cn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...m}){return oe(oc,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:n,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: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:()=>oe(Nn,{className:"h-4 w-4"}),IconRight:()=>oe(wn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:g,displayMonths:b}=ic(),{numberOfMonths:f,fromDate:v,toDate:y}=ac(),N=b.findIndex(S=>Jl(d.displayMonth,S)),x=N===0,P=N===b.length-1,k=f>1&&(x||!P),A=f>1&&(P||!x),W=()=>{let S=wr(g,-1);p&&(!v||S.getTime()>=v.getTime())&&l(S)},T=()=>{let S=wr(g,1);u&&(!y||S.getTime()<=y.getTime())&&l(S)};return Cr("div",{className:"flex items-center justify-between",children:[Cr("div",{className:"flex items-center gap-1",children:[o&&!A&&oe(Ot,{disabled:a||!p||v&&wr(g,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:W,icon:Ql}),!A&&oe(Ot,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:Nn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Xl(d.displayMonth,"LLLL yyy",{locale:n})}),Cr("div",{className:"flex items-center gap-1",children:[!k&&oe(Ot,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:wn}),o&&!k&&oe(Ot,{disabled:a||!u||y&&wr(g,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:T,icon:ec})]})]})},Day:({date:d,displayMonth:l})=>{let u=rc(null),{activeModifiers:p,buttonProps:g,divProps:b,isButton:f,isHidden:v}=nc(d,l,u),{selected:y,today:N,disabled:x,range_middle:P}=p;if(v)return oe(sc,{});if(!f)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:k,...A}=g;return Cr("button",{ref:u,...A,type:"button",children:[k,N&&oe("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&P,"text-neutral-400":x})})]})}},...m})}import{enUS as vc}from"date-fns/locale";import{useEffect as po,useMemo as Pn,useRef as xc,useState as Pr}from"react";import{Command as so}from"cmdk";import{Lock as lc}from"lucide-react";import{jsx as qe,jsxs as cc}from"react/jsx-runtime";var lo=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,n=d=>"date"in d,c=(d,l)=>d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear(),s=(d,l)=>{let u=d.from,p=l.from,g=!1;u&&p&&c(u,p)&&(g=!0);let b=d.to,f=l.to,v=!1;return b&&f&&c(b,f)&&(v=!0),g&&v},m=d=>{if(o)return o===d.id;if(a(d)){let l=r;return l&&s(l,d.dateRange)}else if(n(d)){let l=r;return l&&c(l,d.date)}return!1};return qe(so,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:qe(so.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,l)=>cc(so.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[qe("span",{children:d.label}),d.requiresUpgrade?qe(lc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?qe("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&&qe(J,{side:"bottom",content:d.tooltipContent,children:qe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};lo.displayName="DatePicker.Presets";import{format as Ve}from"date-fns";import{createContext as dc}from"react";var co=dc({isOpen:!1,setIsOpen:()=>{}}),mc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},mo=(e,t,r=!1)=>{let o=!mc(),a;return r?a=o?Ve(e,"d MMM, yyyy h:mm a",{locale:t}):Ve(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ve(e,"d MMM, yyyy",{locale:t}),a},kn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(l=>{var u,p,g,b,f,v;if("date"in l){let y=l.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${l.label} is after toYear ${d}.`);if(a&&l.date.getMonth()<a.getMonth())throw new Error(`Preset ${l.label} is before fromMonth ${a}.`);if(n&&l.date.getMonth()>n.getMonth())throw new Error(`Preset ${l.label} is after toMonth ${n}.`);if(c&&l.date.getDate()<c.getDate())throw new Error(`Preset ${l.label} is before fromDay ${c}.`);if(s&&l.date.getDate()>s.getDate())throw new Error(`Preset ${l.label} is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}if("dateRange"in l){let y=(u=l.dateRange.from)==null?void 0:u.getFullYear(),N=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(N&&r&&N>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${d}.`);if(a){let x=(g=l.dateRange.from)==null?void 0:g.getMonth();if(x&&x<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${Ve(a,"MMM, yyyy")}.`)}if(n){let x=(b=l.dateRange.to)==null?void 0:b.getMonth();if(x&&x>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${Ve(n,"MMM, yyyy")}.`)}if(c){let x=(f=l.dateRange.from)==null?void 0:f.getDate();if(x&&x<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${Ve(c,"MMM dd, yyyy")}.`)}if(s){let x=(v=l.dateRange.to)==null?void 0:v.getDate();if(x&&x>s.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}}})}};import{cva as uc}from"class-variance-authority";import{Calendar as pc,ChevronDown as fc}from"lucide-react";import{forwardRef as gc}from"react";import{jsx as kr,jsxs as hc}from"react/jsx-runtime";var bc=uc(["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"}}}),uo=gc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>hc("button",{ref:n,className:i(bc({hasError:o}),e),...a,children:[kr(pc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),kr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?kr("span",{className:"text-neutral-400",children:r}):null)}),kr(fc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));uo.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as Sn}from"react/jsx-runtime";var yc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=vc,placeholder:l="Select date range",hasError:u,align:p="center",className:g,...b})=>{let{isDesktop:f}=Y(),[v,y]=Pr(!1),[N,x]=Pr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[P,k]=Pr((N==null?void 0:N.dateRange)??e??t??void 0),[A,W]=Pr(P==null?void 0:P.to),T=Pn(()=>P,[v]);po(()=>{k(e)},[e]),po(()=>{let L=a==null?void 0:a.find(({id:ee})=>ee===r);x(L),k((L==null?void 0:L.dateRange)??e??t)},[a,r]),po(()=>{v?P&&W(P.to):W(P==null?void 0:P.to)},[v]);let S=(L,ee)=>{let D=(P==null?void 0:P.from)&&(P==null?void 0:P.to)?{from:ee}:L;k(D),x(void 0),(D==null?void 0:D.from)&&(D==null?void 0:D.to)&&(o==null||o(D),y(!1))},K=L=>{k(L.dateRange),x(L),o==null||o(L.dateRange,L),y(!1)},w=()=>{k(T),y(!1)},C=L=>{L||w(),y(L)},R=Pn(()=>P?`${P.from?mo(P.from,d):""} - ${P.to?mo(P.to,d):""}`:null,[P,d]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let ee=a==null?void 0:a.find(D=>D.shortcut===L.key);ee&&K(ee)}),ae(co.Provider,{value:{isOpen:v,setIsOpen:y},children:ae(xe,{align:p,openPopover:v,setOpenPopover:C,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:Sn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&ae(Nc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(lo,{currentPresetId:r,currentValue:P,presets:a,onSelect:K})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(Cn,{mode:"range",selected:P,onSelect:S,month:A,onMonthChange:W,numberOfMonths:f?2:1,disabled:s,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:ae(uo,{placeholder:l,disabled:n,className:g,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(N==null?void 0:N.label)??R})})})};function Wx({presets:e,...t}){return e&&kn(e,t),ae(yc,{presets:e,...t})}function Nc({children:e}){let t=xc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Sn("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),ae("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import{useId as wc}from"react";import{jsx as Sr,jsxs as Cc}from"react/jsx-runtime";function Zx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=wc();return Cc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:Sr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),Sr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import kc from"next/link";import{useEffect as Pc,useState as Rn}from"react";import Sc from"swr";import{jsx as fo,jsxs as Tn}from"react/jsx-runtime";function Ln({className:e}){let{data:t}=Sc("https://status.dub.co/api/v1/summary",be),[r,o]=Rn("bg-neutral-200"),[a,n]=Rn("Loading status...");return Pc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:m}=c[0],d=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(d)}else n("All systems operational"),o("bg-green-500")},[t]),Tn(kc,{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:[Tn("div",{className:"relative size-2",children:[fo("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")}),fo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),fo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Rr,jsxs as Mn}from"react/jsx-runtime";function o2({icon:e,title:t,description:r,learnMore:o,children:a}){return Mn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Rr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Rr(e,{className:"size-6 text-neutral-800"})}),Rr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Mn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Rr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Rc}from"class-variance-authority";import{useState as Dn}from"react";import{toast as En}from"sonner";import{Fragment as Lc,jsx as ye,jsxs as bo}from"react/jsx-runtime";var In=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],go={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:In,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:[...In,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Tc=Rc("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 f2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Da,customPreview:m,accept:d="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:g=!0,content:b,maxFileSizeMB:f=0,targetResolution:v,accessibilityLabel:y="File upload",disabled:N=!1}){let[x,P]=Dn(!1),[k,A]=Dn(null),W=async T=>{let S="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!S)return;if(A(S.name),f>0&&S.size/1024/1024>f){En.error(`File size too big (max ${f} MB)`);return}let K=go[d].types;if(K.length&&!K.includes(S.type)){En.error(go[d].errorMessage??"File type not supported");return}let w=S;if(v&&S.type.startsWith("image/"))try{let C=await Jo(S,v),R=await fetch(C).then(L=>L.blob());w=new File([R],S.name,{type:S.type})}catch(C){console.error("Error resizing image:",C)}if(t){let C=new FileReader;C.onload=R=>{var L;return r==null?void 0:r({src:(L=R.target)==null?void 0:L.result,file:w})},C.readAsDataURL(w);return}r==null||r({file:w})};return bo("label",{className:i(Tc({variant:o}),N?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&ye("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ye(St,{})}),ye("div",{className:"absolute inset-0 z-[5]",onDragOver:T=>{T.preventDefault(),T.stopPropagation(),P(!0)},onDragEnter:T=>{T.preventDefault(),T.stopPropagation(),P(!0)},onDragLeave:T=>{T.preventDefault(),T.stopPropagation(),P(!1)},onDrop:async T=>{T.preventDefault(),T.stopPropagation(),W(T),P(!1)}}),bo("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",N&&"bg-neutral-50",x&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",g&&!N&&"group-hover:opacity-100"):i(!N&&"group-hover:bg-neutral-50")),children:[ye(s,{className:i("size-7 transition-all duration-75",N?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",x?"scale-110":"scale-100"),n)}),b!==null&&ye("div",{className:i("mt-2 text-center text-sm text-neutral-500",N&&"text-neutral-400"),children:b??ye(Lc,{children:bo("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ye("span",{className:"sr-only",children:y})]}),l&&(m??ye("img",{src:l,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&ye("div",{className:"sr-only mt-1 flex shadow-sm",children:ye("input",{id:e,type:"file",accept:go[d].types.join(","),onChange:W,disabled:N},k)})]})}import{AnimatePresence as Mc,motion as An}from"framer-motion";import{X as Dc}from"lucide-react";import Ec from"next/link";import{isValidElement as Ic}from"react";import{Fragment as Ac,jsx as Q,jsxs as zt}from"react/jsx-runtime";function zn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),Q(pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:zt("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(Mc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return Q(An.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 s=e.find(m=>m.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var g,b,f,v;let d=(g=s.options)==null?void 0:g.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),l=(d==null?void 0:d.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,m,{key:s.key,option:d}))??s.icon,u=(d==null?void 0:d.label)??((f=s.getOptionLabel)==null?void 0:f.call(s,m,{key:s.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return zt(An.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:[zt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:On(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?zt(Ac,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:On(l)?l:Q(l,{className:"h-4 w-4"})}),p?Q(Ec,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Pt(u,30)}):Pt(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(n,m),children:Q(Dc,{className:"h-3.5 w-3.5"})})]},`${n}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&zt("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 On=e=>Ic(e);import{Command as He,useCommandState as Oc}from"cmdk";import{ChevronDown as zc,ListFilter as Vc}from"lucide-react";import{Fragment as Hc,forwardRef as _c,isValidElement as Hn,useCallback as Tr,useEffect as Lr,useImperativeHandle as Fc,useRef as vo,useState as ho}from"react";import{Fragment as jc,jsx as F,jsxs as Ne}from"react/jsx-runtime";function _n({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:m,emptyState:d,className:l}){var S,K;let{isMobile:u}=Y(),p=vo(null),g=vo(),[b,f]=ho(!1);Ie("f",()=>f(!0),{enabled:!b});let[v,y]=ho(""),[N,x]=ho(null),P=Tr(()=>{y(""),x(null)},[]);Lr(()=>{b||P()},[b]);let k=N?e.find(({key:w})=>w===N):null,A=Tr(w=>{p.current&&(g.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),x(w),o==null||o(w)},[]),W=Tr(w=>{if(!k||!c)return!1;let C=c.find(({key:R})=>R===N);return(C==null?void 0:C.value)===w||C&&k.multiple&&Array.isArray(C.value)&&C.value.includes(w)},[k]),T=Tr(w=>{k&&(W(w)?r(k.key,w):t(k.key,w),k.multiple||f(!1))},[c,k,s]);return Lr(()=>{a==null||a(v)},[v]),Lr(()=>{n==null||n(N)},[N]),Lr(()=>{(k==null?void 0:k.options)&&p.current&&(g.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),F(xe,{openPopover:b,setOpenPopover:f,onEscapeKeyDown:w=>{N&&(w.preventDefault(),P())},content:F(pe,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Ne(He,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[Ne("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[F(Bc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:v,onValueChange:y,onKeyDown:w=>{(w.key==="Escape"||w.key==="Backspace"&&!v)&&(w.preventDefault(),w.stopPropagation(),N?P():f(!1))},emptySubmit:w=>{w.preventDefault(),w.stopPropagation(),s?(t("ai",k?`${k.label} ${v}`:v),f(!1)):T(v)}}),!k&&F("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"})]}),F($c,{ref:p,children:Ne(He.List,{className:i("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((K=(S=k.options)==null?void 0:S.filter(w=>!v||!w.hideDuringSearch))==null?void 0:K.map(w=>{let C=W(w.value);return F(Vn,{filter:k,option:w,right:C?F(Ca,{className:"h-4 w-4"}):w.right,onSelect:()=>T(w.value)},w.value)}))??F(He.Loading,{children:F("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:F(Pe,{})})}):e.filter(w=>!w.hideInFilterDropdown).map(w=>Ne(Hc,{children:[F(Vn,{filter:w,onSelect:()=>A(w.key)}),w.separatorAfter&&F(He.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},w.key)),(!k||k.options)&&F(Uc,{search:v,askAI:s,children:d?Wc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),children:Ne("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",l),children:[F(Vc,{className:"size-4 shrink-0"}),F("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?F("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):F(zc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Wc(e){return typeof e=="object"&&e!==null&&!Hn(e)}var Bc=e=>{let t=Oc(r=>r.filtered.count===0);return F(He.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"})},$c=_c(({children:e},t)=>{let r=vo(null);Fc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return Ne(jc,{children:[F("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),F("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 Vn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),n=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return Ne(He.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[F("span",{className:"shrink-0 text-neutral-600",children:Gc(n)?n:F(n,{className:"h-4 w-4"})}),Pt(c,48),F("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Uc=({search:e,askAI:t,children:r})=>t&&e?Ne(He.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[F(da,{className:"h-4 w-4"}),Ne("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",Ne("span",{className:"text-black",children:['"',e,'"']})]})]}):F(He.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Gc=e=>Hn(e);var _2={Select:_n,List:zn};import{useMemo as Kc,useState as Fn}from"react";import{jsx as Xe,jsxs as Mr}from"react/jsx-runtime";function j2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,m]=Fn(r.defaultValue),[d,l]=Fn(!1),u=Kc(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return Mr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:s}),l(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Mr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Mr("div",{className:"flex flex-col space-y-3",children:[Xe("h2",{className:"text-xl font-medium",children:e}),Xe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Xe("input",{...r,type:r.type||"text",required:!0,disabled:!!n,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":n})}):Xe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Mr("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"?Xe("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,Xe("div",{className:"shrink-0",children:Xe(te,{text:a,loading:d,disabled:u,disabledTooltip:n})})]})]})}import{useId as Yc}from"react";import{jsx as Dr,jsxs as Zc}from"react/jsx-runtime";function Je({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Yc();return Zc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Dr("defs",{children:Dr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Dr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Dr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as qc}from"lucide-react";import Xc,{useCallback as Jc,useState as Qc}from"react";import{jsx as Qe,jsxs as xo}from"react/jsx-runtime";var ed=Xc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Qc(!1),c=Jc(()=>n(!a),[a,n]);return xo("div",{children:[xo("div",{className:"relative flex",children:[Qe("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}),xo("div",{className:"group",children:[r.error&&Qe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Qe(qc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Qe("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:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Qe(Oa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Qe(za,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Qe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});ed.displayName="Input";import{flip as nd,offset as id,size as sd,useDismiss as ld,useFloating as cd,useInteractions as dd}from"@floating-ui/react";import{Command as Me,useCommandState as md}from"cmdk";import{Check as ud,ChevronDown as pd,Search as fd,X as gd}from"lucide-react";import{createContext as bd,forwardRef as Gn,useContext as Co,useEffect as yo,useMemo as Bn,useRef as $n,useState as No}from"react";import{Drawer as ht}from"vaul";import td from"next/image";import{memo as rd,useEffect as od,useState as Wn}from"react";import{jsx as ad}from"react/jsx-runtime";var Vt=rd(e=>{let[t,r]=Wn(!0),[o,a]=Wn(e.src);od(()=>a(e.src),[e.src]);let n=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return ad(td,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:n,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as O,jsxs as le}from"react/jsx-runtime";var Er=bd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function wy({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=Y(),l=$n(null),[u,p]=No(!1),[g,b]=No(""),[f,v]=No(!1);yo(()=>{u&&v(!1)},[u]),yo(()=>v(!0),[g]),yo(()=>{t&&b(t.value)},[t]);let y=Bn(()=>{let C=g.toLowerCase();return f?e.filter(R=>R.value.toLowerCase().includes(C)):g?e.sort((R,L)=>(L.value.toLowerCase().includes(C)?1:0)-(R.value.toLowerCase().includes(C)?1:0)):e},[f,g,e]),{refs:N,floatingStyles:x,context:P}=cd({open:u,onOpenChange:p,middleware:[id(8),sd({apply({elements:{floating:C},availableHeight:R}){Object.assign(C.style,{maxHeight:`${Math.max(75,Math.min(R,290))}px`})},padding:8}),nd({fallbackStrategy:"initialPlacement",padding:8})]}),k=ld(P,{enabled:!d||!n}),{getReferenceProps:A,getFloatingProps:W}=dd([k]),T=$n(null),{scrollProgress:S,updateScrollProgress:K}=Ae(T),w=Bn(()=>t&&t.icon?t.icon:t&&t.image?O(Vt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||O(fd,{className:"size-4 text-neutral-400"}),[t,c]);return O(Er.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:g,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&n?le(ht.Root,{open:u,onOpenChange:p,children:[O(ht.Trigger,{className:"sm:hidden",asChild:!0,children:O(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:O(wo,{className:o,iconElement:w})})}),O(ht.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ht.Portal,{children:[O(ht.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:C=>{C.target instanceof Element&&C.target.closest("[data-sonner-toast]")&&C.preventDefault()},children:le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O("div",{className:"p-2",children:O(wo,{className:o,iconElement:w})}),u&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&g===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),O(Un,{items:y})]})]})}),O(ht.Overlay,{})]})]}):le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O(wo,{className:o,iconElement:w,ref:N.setReference,...A()}),u&&le("div",{ref:N.setFloating,style:x,...W(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:T,onScroll:K,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&g===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),O(Un,{items:y})]}),O("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(S,2)}})]})]})})}var wo=Gn(({iconElement:e,className:t,...r},o)=>le("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:[O("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[O(hd,{}),O(vd,{})]})]})),hd=Gn((e,t)=>{let r=md(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:m}=Co(Er);return O(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),n(!1)):d.key==="Enter"&&r?n(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&n(!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 vd(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Co(Er);return O("button",{type:"button",onClick:()=>{r(n=>!n),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?O(gd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):O(pd,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Un({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Co(Er);return e.map(a=>le(Me.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&O(Vt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),O("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&&O(gr,{className:"text-xs",variant:"neutral",children:a.label})]}),O(ud,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as ko from"@radix-ui/react-label";import{cva as xd}from"class-variance-authority";import*as jn from"react";import{jsx as wd}from"react/jsx-runtime";var yd=xd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nd=jn.forwardRef(({className:e,...t},r)=>wd(ko.Root,{ref:r,className:i(yd(),e),...t}));Nd.displayName=ko.Root.displayName;import{cva as Cd}from"class-variance-authority";import{isValidElement as kd}from"react";import{jsx as Po,jsxs as Kn}from"react/jsx-runtime";var So=Cd(["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"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function Oy({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,disabledTooltip:c,...s}){return Po(ut,{tooltipProps:{content:c},children:Kn(e||"button",{...e==="button"?{type:"button"}:{},className:i(So({variant:t,disabled:!!c}),n),disabled:c?!0:s.disabled,...s,children:[Kn("div",{className:"flex grow items-center gap-2",children:[o&&(Pd(o)?o:Po(o,{className:"size-4"})),r]}),a&&Po("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=>kd(e);import{curveNatural as Yn}from"@visx/curve";import{LinearGradient as Zn}from"@visx/gradient";import{Group as Sd}from"@visx/group";import{ParentSize as Rd}from"@visx/responsive";import{scaleLinear as Td,scaleUtc as Ld}from"@visx/scale";import{Area as Md,AreaClosed as Dd}from"@visx/shape";import{motion as qn}from"framer-motion";import{useId as Ed,useMemo as Xn}from"react";import{jsx as we,jsxs as Ro}from"react/jsx-runtime";var Id={top:8,right:2,bottom:2,left:2};function Gy(e){return we(Rd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Ad,{...{width:t,height:r,...e}})})}function Ad({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Id,...n},s=Ed(),m=Xn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:l}=Xn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),g=r.map(({date:v})=>v.getTime()),b=new Date(Math.min(...g)),f=new Date(Math.max(...g));return{yScale:Td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Ld({domain:[b,f],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return Ro("svg",{width:e,height:t,children:[Ro("defs",{children:[we(Zn,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Zn,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),Ro(Sd,{left:c.left,top:c.top,children:[we(Md,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,curve:o?Yn:void 0,children:({path:u})=>we(qn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Dd,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Yn:void 0,children:({path:u})=>we(qn.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 ce from"@radix-ui/react-dialog";import*as To from"@radix-ui/react-visually-hidden";import{useRouter as Od}from"next/navigation";import{Drawer as et}from"vaul";import{jsx as ne,jsxs as vt}from"react/jsx-runtime";function Xy({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let m=Od(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Y();return l&&!n?ne(et.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...s,children:vt(et.Portal,{children:[ne(et.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(et.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:vt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[vt(To.Root,{children:[ne(et.Title,{children:"Modal"}),ne(et.Description,{children:"This is a modal"})]}),ne(zd,{}),e]})}),ne(et.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:vt(ce.Portal,{children:[ne(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),vt(ce.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className: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:[vt(To.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function zd(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as Lo}from"react";import{jsx as Ht,jsxs as Vd}from"react/jsx-runtime";function a4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:m,decrementAriaLabel:d="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,g=typeof o=="number"?e<o:!0,b=Lo(y=>{let N=y;return typeof r=="number"&&(N=Math.max(r,N)),typeof o=="number"&&(N=Math.min(o,N)),N},[r,o]),f=Lo(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),v=Lo(()=>{n||!g||t(b(e+a))},[n,g,b,t,a,e]);return Vd("div",{id:s,role:"group","aria-disabled":n,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",n&&"opacity-60",c),...u,children:[Ht("button",{type:"button","aria-label":d,onClick:f,disabled:n||!p,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(n||!p)&&"hover:bg-neutral-50"),children:Ht(mr,{className:"block size-4"})}),Ht("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:y=>{n||((y.key==="ArrowLeft"||y.key==="ArrowDown")&&(y.preventDefault(),f()),(y.key==="ArrowRight"||y.key==="ArrowUp")&&(y.preventDefault(),v()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:m?m(e):e}),Ht("button",{type:"button","aria-label":l,onClick:v,disabled:n||!g,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(n||!g)&&"hover:bg-neutral-50"),children:Ht(mt,{className:"block size-4"})})]})}import{Fragment as Hd,jsx as Ir,jsxs as xt}from"react/jsx-runtime";var Jn=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 s4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return xt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[xt("div",{className:"flex items-center gap-2",children:[xt("div",{children:[Ir("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&xt(Hd,{children:[xt("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&&Ir("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),xt("div",{className:"flex items-center gap-2",children:[Ir("button",{type:"button",className:Jn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Ir("button",{type:"button",className:Jn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as Qn,jsxs as _d}from"react/jsx-runtime";function d4({progress:e,strokeWidth:t=16,className:r}){let o=Math.min(Math.max(e,0),1),a=(100-t)/2,n=a*Math.PI*2,c=o*n;return _d("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600",r),children:[Qn("circle",{cx:"50",cy:"50",r:a,stroke:"#e5e5e5",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round"}),o>0&&Qn("circle",{cx:"50",cy:"50",r:a,stroke:"currentColor",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",strokeDasharray:`${c} ${n-c}`,style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as Fd}from"lucide-react";import*as Mo from"react";import{jsx as Ar}from"react/jsx-runtime";var Wd=Mo.forwardRef(({className:e,...t},r)=>Ar(_e.Root,{className:i("grid gap-2",e),...t,ref:r}));Wd.displayName=_e.Root.displayName;var Bd=Mo.forwardRef(({className:e,...t},r)=>Ar(_e.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:Ar(_e.Indicator,{className:"flex items-center justify-center",children:Ar(Fd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Bd.displayName=_e.Item.displayName;import{Drawer as Fe}from"vaul";import{jsx as tt,jsxs as Kd}from"react/jsx-runtime";function $d({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Fe.NestedRoot:Fe.Root;return tt(a,{direction:"right",handleOnly:!0,...o,children:Kd(Fe.Portal,{children:[tt(Fe.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),tt(Fe.Content,{...t,onPointerDownOutside:n=>{var c;n.target instanceof Element&&n.target.closest("[data-sonner-toast]")&&n.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,n)},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)",userSelect:"auto",...t==null?void 0:t.style},children:tt("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Ud({className:e,...t}){return tt(Fe.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Gd(e){return tt(Fe.Description,{...e})}function jd(e){return tt(Fe.Close,{...e})}var v4=Object.assign($d,{Title:Ud,Description:Gd,Close:jd});import{useEffect as Yd,useRef as Zd,useState as qd}from"react";import{jsx as ei}from"react/jsx-runtime";var Xd=`
2
+ import{$ as Vp,$a as Ra,$b as bf,$c as sg,$d as tb,A as or,Aa as c0,Ab as Z0,Ac as Hf,Ad as Mg,Ae as kb,B as vp,Ba as ir,Bb as q0,Bc as _f,Bd as Dg,Be as Pb,C as xp,Ca as d0,Cb as X0,Cc as Ff,Cd as Eg,Ce as Sb,D as yp,Da as m0,Db as Ea,Dc as Wf,Dd as ja,De as Rb,E as Np,Ea as u0,Eb as J0,Ec as Bf,Ed as Ig,F as ar,Fa as p0,Fb as Q0,Fc as $f,Fd as Ag,G as wp,Ga as Na,Gb as ef,Gc as Uf,Gd as Ya,H as nr,Ha as f0,Hb as lr,Hc as Gf,Hd as Og,I as Cp,Ia as g0,Ib as tf,Ic as $a,Id as zg,J as kp,Ja as wa,Jb as rf,Jc as Kf,Jd as Vg,K as Pp,Ka as b0,Kb as of,Kc as jf,Kd as Hg,L as Sp,La as h0,Lb as af,Lc as Yf,Ld as _g,M as ga,Ma as v0,Mb as nf,Mc as Ua,Md as Fg,N as ba,Na as x0,Nb as Ia,Nc as Ga,Nd as Wg,O as ha,Oa as y0,Ob as sf,Oc as Zf,Od as Bg,P as va,Pa as N0,Pb as lf,Pc as qf,Pd as $g,Q as xa,Qa as w0,Qb as cf,Qc as Xf,Qd as Ug,R as Rp,Ra as C0,Rb as df,Rc as Jf,Rd as Gg,S as Tp,Sa as k0,Sb as Aa,Sc as Qf,Sd as Kg,T as Lp,Ta as P0,Tb as Oa,Tc as cr,Td as jg,U as Mp,Ua as Ca,Ub as za,Uc as eg,Ud as Yg,V as Dp,Va as sr,Vb as mf,Vc as tg,Vd as Zg,W as Ep,Wa as ka,Wb as Va,Wc as rg,Wd as qg,X as Ip,Xa as Pa,Xb as uf,Xc as og,Xd as Xg,Y as Ap,Ya as S0,Yb as pf,Yc as ag,Yd as Jg,Z as Op,Za as R0,Zb as ff,Zc as ng,Zd as Qg,_ as zp,_a as Sa,_b as gf,_c as ig,_d as eb,a as sp,aa as Hp,ab as T0,ac as hf,ad as lg,ae as Za,b as la,ba as _p,bb as L0,bc as Ha,bd as cg,be as qa,c as lp,ca as Fp,cb as Ta,cc as vf,cd as dg,ce as rb,d as lt,da as Wp,db as La,dc as xf,dd as dr,de as ob,e as tr,ea as Bp,eb as Ma,ec as yf,ed as mr,ee as ab,f as cp,fa as $p,fb as M0,fc as Nf,fd as mg,fe as nb,g as ct,ga as Up,gb as D0,gc as wf,gd as ug,ge as ib,h as dt,ha as Gp,hb as E0,hc as Cf,hd as pg,he as sb,i as qr,ia as Kp,ib as I0,ic as kf,id as fg,ie as lb,j as ca,ja as jp,jb as A0,jc as Pf,jd as gg,je as cb,k as dp,ka as Yp,kb as Xr,kc as Sf,kd as bg,ke as db,l as da,la as Zp,lb as O0,lc as Rf,ld as hg,le as mb,m as mp,ma as qp,mb as z0,mc as _a,md as vg,me as ub,n as up,na as Xp,nb as V0,nc as Tf,nd as xg,ne as pb,o as ma,oa as Jp,ob as H0,oc as Lf,od as Ka,oe as fb,p as ua,pa as Qp,pb as Da,pc as Mf,pd as yg,pe as gb,q as pa,qa as ya,qb as _0,qc as Fa,qd as Ng,qe as bb,r as fa,ra as e0,rb as F0,rc as Df,rd as wg,re as Rt,s as St,sa as t0,sb as W0,sc as Ef,sd as Cg,se as hb,t as pp,ta as r0,tb as B0,tc as Wa,td as kg,te as vb,u as Pe,ua as o0,ub as $0,uc as If,ud as Pg,ue as xb,v as fp,va as a0,vb as U0,vc as Ba,vd as Sg,ve as yb,w as gp,wa as n0,wb as G0,wc as Af,wd as Rg,we as Xa,x as rr,xa as i0,xb as K0,xc as Of,xd as mt,xe as Nb,y as bp,ya as s0,yb as j0,yc as zf,yd as Tg,ye as wb,z as hp,za as l0,zb as Y0,zc as Vf,zd as Lg,ze as Cb}from"./chunk-YVLGZWIK.mjs";import{a as Z}from"./chunk-NWME2ANF.mjs";import{a as Yr,b as kt,c as Xo,d as Jo,e as Pt,f as Qo,g as ea,h as be,i as je,j as i,k as Zr,l as ta,m as F,n as ra,o as ke,p as oa,q as aa,r as na,s as Qt,t as er,u as ia,v as sa}from"./chunk-TGYFM4WG.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Gi}from"lucide-react";import*as pr from"react";import{jsx as ur,jsxs as Zi}from"react/jsx-runtime";var Ib=ie.Root,Ki=pr.forwardRef(({className:e,...t},r)=>ur(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ki.displayName="AccordionItem";var ji=pr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Gi:mt;return ur(ie.Header,{className:"flex",children:Zi(ie.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,ur(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});ji.displayName=ie.Trigger.displayName;var Yi=pr.forwardRef(({className:e,children:t,...r},o)=>ur(ie.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));Yi.displayName=ie.Content.displayName;import{cva as qi}from"class-variance-authority";import*as fr from"react";import{jsx as Jr}from"react/jsx-runtime";var Xi=qi("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"}}),Ji=fr.forwardRef(({className:e,variant:t,...r},o)=>Jr("div",{ref:o,role:"alert",className:i(Xi({variant:t}),e),...r}));Ji.displayName="Alert";var Qi=fr.forwardRef(({className:e,...t},r)=>Jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Qi.displayName="AlertTitle";var es=fr.forwardRef(({className:e,...t},r)=>Jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));es.displayName="AlertDescription";import{sha256 as ts}from"js-sha256";import{useState as rs}from"react";import{jsx as Qr}from"react/jsx-runtime";function os(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/${ts(e.email)}?d=${t}`:t}function Wb({user:e={},className:t}){if(!e)return Qr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=rs(os(e));return Qr("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 Bb({id:e,className:t}){return Qr("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 as}from"class-variance-authority";import{jsx as is}from"react/jsx-runtime";var ns=as("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 gr({className:e,variant:t,...r}){return is("span",{className:i(ns({variant:t}),e),...r})}import{cva as us}from"class-variance-authority";import{forwardRef as ps}from"react";import*as he from"@radix-ui/react-tooltip";import ss from"linkify-react";import{HelpCircle as ls}from"lucide-react";import cs from"next/link";import{useState as ds}from"react";import{Fragment as ms,jsx as G,jsxs as Ye}from"react/jsx-runtime";function r1({children:e}){return G(he.Provider,{delayDuration:150,children:e})}function Q({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...s}){let[m,d]=ds(!1);return Ye(he.Root,{open:o?!1:m,onOpenChange:d,delayDuration:c,disableHoverableContent:n,children:[G(he.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),G(he.Portal,{children:G(he.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"?G("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:d}):t})})]})}function o1({title:e,cta:t,href:r,target:o,onClick:a}){return Ye("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[G("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?G(cs,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?G(te,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function a1({title:e,cta:t,href:r}){return Ye("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ye(ms,{children:[" ",G("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})]})}function n1({children:e,className:t,tooltipClassName:r}){return G("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:G(ss,{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 i1(e){return G(Q,{...e,children:G(ls,{className:"h-4 w-4 text-neutral-500"})})}function s1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:G(Q,{content:Ye("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ye("p",{className:"text-sm font-semibold text-neutral-700",children:[r,er(e||0,{full:!0})," ",t]}),a&&Ye("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",ea(a,{withAgo:!0})]})]}),children:o})}function l1({children:e,content:t,...r}){return G(Q,{content:t,...r,children:G("div",{className:"flex cursor-pointer items-center",children:G(gr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function c1({children:e,tooltipProps:t,...r}){return G(Q,{...t,children:G("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 ut({children:e,tooltipProps:t}){return t?G(Q,{...t,children:G("div",{children:e})}):e}import{jsx as pt,jsxs as Ja}from"react/jsx-runtime";var se=us("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"}}),te=ps(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:m,right:d,...l},u)=>m?pt(Q,{content:m,children:Ja("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:[c,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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})]})}):Ja("button",{ref:u,type:l.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",l.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:l.disabled||n,...l,children:[n?pt(Pe,{}):c||null,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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}),d]}));te.displayName="Button";import{cva as fs}from"class-variance-authority";import{createContext as gs}from"react";import{jsx as Qa}from"react/jsx-runtime";var bs=fs("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"}}}),Tt=gs({variant:"loose",loading:!1});function en({variant:e="loose",loading:t=!1,className:r,children:o}){return Qa("ul",{className:i(bs({variant:e,loading:t}),r),"data-variant":e,children:Qa(Tt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as hs}from"class-variance-authority";import{createContext as vs,useContext as xs,useEffect as ys,useRef as Ns,useState as ws}from"react";import{jsx as tn,jsxs as Ps}from"react/jsx-runtime";var Cs=hs("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"}}}),ks="w-full py-2.5 px-4",eo=vs({hovered:!1});function rn({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=xs(Tt),m=Ns(null),[d,l]=ws(!1);ys(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var g;((g=m.current)==null?void 0:g.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||je(p));return Ps("li",{ref:m,className:i(Cs({variant:s}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,tn("div",{className:i(ks,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:tn(eo.Provider,{value:{hovered:d},children:r})})]})}var I1=Object.assign(en,{Card:Object.assign(rn,{Context:eo}),Context:Tt});import{motion as bl}from"framer-motion";import{forwardRef as hl,useRef as vl}from"react";import{useEffect as Ss,useState as Rs}from"react";function on(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function to(e,t){let[r,o]=Rs(on(e)??t);return Ss(()=>{let n=on(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function Ts(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function H1(e,t){if(!Ts(t)){let o=t,a=m=>{let d=o[m];return Object.fromEntries(d.all.map(l=>[l,d.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,s]=to(e,n);return{columnVisibility:c,setColumnVisibility:(m,d)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(g=>[g,g in d?d[g]:u[g]??!1]));s({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=to(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let m=o.all,d=n||{},l=Object.fromEntries(m.map(u=>[u,u in s?s[u]:d[u]??!1]));c(l)}}}}import ro from"js-cookie";import{useEffect as Ls,useState as Ms}from"react";function B1(e,t,r){let[o,a]=Ms(()=>{let c=ro.get(e);return c?JSON.parse(c):t});return Ls(()=>{let c=()=>{let s=ro.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),ro.set(e,JSON.stringify(c),r)}]}import{useCallback as Ds,useEffect as Es,useRef as Is,useState as As}from"react";var ft=(e=3e3)=>{let t=Is(null),[r,o]=As(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Ds(async(c,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),s==null||s(),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 Es(()=>()=>a(),[]),[r,n]};import{useEffect as Os,useState as zs}from"react";function j1(){let[e,t]=zs(null);return Os(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,g;let m=s[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let b=1;b<s.length;b++){let f=s[b];if(!f)break;(f.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=f)}let l=m.target;for(;l&&l.getBoundingClientRect().bottom<o;)l=(p=n.get(l))==null?void 0:p.next;for(;l&&l.getBoundingClientRect().top>d;)l=(g=n.get(l))==null?void 0:g.prev;l&&t(l.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),n=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{useEffect as Vs,useState as Hs}from"react";function X1(){let[e,t]=Hs(null);return Vs(()=>{let r=window.location.hostname;ra.has(r)?t("app"):aa.has(r)?t("partners"):oa.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as _s}from"react";function th(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 Fs,useState as Ws}from"react";function nh(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=Ws(o??!1);return Fs(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(l.top<u.bottom&&l.bottom>u.top&&l.left<u.right&&l.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as Bs,useState as $s}from"react";function lh(){let[e,t]=$s(!1);return Bs(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as Us,useState as Gs}from"react";function uh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=Gs(),s=(n==null?void 0:n.isIntersecting)&&a,m=([d])=>{c(d)};return Us(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!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,s]),n}import{createContext as Ks,useCallback as js,useContext as Ys,useEffect as an,useId as Zs,useState as qs}from"react";import{jsx as Xs}from"react/jsx-runtime";var nn=Ks({listeners:[],setListeners:()=>{}});function vh({children:e}){let[t,r]=qs([]);return Xs(nn.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=Zs(),{listeners:a,setListeners:n}=Ys(nn),c=js(s=>{if(r.enabled===!1)return;let m=s.target,d=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!l!=!!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(b=>b.enabled!==!1&&!!d==!!b.modal&&!!l==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||Qo(p,(b,f)=>(f.priority??0)-(b.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);an(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),an(()=>(n(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as Js}from"sonner";import Qs from"swr";function Ch(e,t){let{data:r,isLoading:o,mutate:a}=Qs(e,be);return{data:r,isLoading:o,update:async(n,c)=>Js.promise(a(n(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 dn,useMemo as nl}from"react";import{useEffect as sn,useState as el}from"react";function ln({pageSize:e,page:t,onPageChange:r}){let[o,a]=el({pageIndex:t,pageSize:e});return sn(()=>{a(n=>({...n,pageIndex:t}))},[t]),sn(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as tl,useRouter as rl,useSearchParams as ol}from"next/navigation";import{useCallback as al}from"react";function cn(){let e=tl(),t=rl(),r=ol(),o=Object.fromEntries(r),a=(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var g;(g=s.include)!=null&&g.includes(p)&&l.set(p,u)}),m=l}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let d=m.toString();return d.length>0?`?${d}`:""},n=al(({set:c,del:s,replace:m,scroll:d=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([f,v])=>p.set(f,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(f=>p.delete(f)):p.delete(s));let g=p.toString(),b=`${e}${g.length>0?`?${g}`:""}`;if(l)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Oh(e=sa){let{searchParams:t,queryParams:r}=cn(),o=nl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=ln({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return dn(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),dn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as il}from"react";function Hh(){il(()=>{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 sl,useState as ll}from"react";function br(e){let[t,r]=ll(),o=([a])=>{r(a)};return sl(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}import{useCallback as cl,useEffect as mn,useState as dl}from"react";function un(e,{container:t}={}){let[r,o]=dl(!1),a=cl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return mn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),mn(()=>{a()},[a]),r}import{useCallback as ml,useEffect as ul,useState as pl}from"react";function Ae(e,{direction:t="vertical"}={}){let[r,o]=pl(1),a=ml(()=>{if(!e.current)return;let c=t==="vertical"?e.current.scrollTop:e.current.scrollLeft,s=t==="vertical"?e.current.scrollHeight:e.current.scrollWidth,m=t==="vertical"?e.current.clientHeight:e.current.clientWidth;o(s===m?1:Math.min(c/(s-m),1))},[t]),n=br(e);return ul(a,[n]),{scrollProgress:r,updateScrollProgress:a}}import{useEffect as fl}from"react";import{toast as fn}from"sonner";import{jsx as hr,jsxs as pn}from"react/jsx-runtime";function gl({id:e,message:t,undo:r}){let o=()=>{r(),fn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return fl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),pn("div",{className:"flex w-full items-center justify-between space-x-2",children:[pn("div",{className:"flex items-center space-x-2",children:[hr(pa,{}),hr("p",{className:"font-medium",children:t})]}),hr("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 Qh(){return({id:t,message:r,undo:o,duration:a})=>fn(hr(gl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as gn}from"react/jsx-runtime";var pe=hl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var d,l;let s=vl(null),m=br(s);return gn(bl.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((l=m==null?void 0:m.contentRect)==null?void 0:l.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:gn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});pe.displayName="AnimatedSizeContainer";import{jsx as Se,jsxs as bn}from"react/jsx-runtime";function mv({options:e,value:t,onChange:r,className:o,gridCols:a="2",name:n,disabled:c=!1,animated:s=!0}){let m={1:"grid-cols-1",2:"grid-cols-1 lg:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}[a],d=Se("div",{className:i("grid gap-3",m),children:e.map(({key:l,label:u,description:p,icon:g})=>{let b=t===l;return bn("label",{className:i("relative flex w-full cursor-pointer items-start rounded-md border border-neutral-200 bg-white text-neutral-600 hover:bg-neutral-50","transition-all duration-150",b&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",c&&"cursor-not-allowed opacity-50",o),children:[Se("input",{type:"radio",name:n,value:l,className:"hidden",checked:b,disabled:c,onChange:f=>{f.target.checked&&r&&r(l)}}),g&&Se("div",{className:"flex-shrink-0 pt-0.5",children:g}),bn("div",{className:"flex grow flex-col p-3 pr-0",children:[Se("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Se("span",{className:"text-xs text-neutral-600",children:p})]}),Se(Ra,{className:i("mr-1.5 mt-1.5 flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",b&&"scale-100 opacity-100")})]},l)})});return s?Se("div",{className:"-m-1",children:Se(pe,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Se("div",{className:"p-1",children:d})})}):d}import xl from"embla-carousel-autoplay";import yl from"embla-carousel-react";import{ArrowLeft as Nl,ArrowRight as wl}from"lucide-react";import{createContext as Cl,forwardRef as Mt,useCallback as Lt,useContext as kl,useEffect as oo,useState as ao}from"react";import{jsx as Re,jsxs as xn}from"react/jsx-runtime";var no=2e3,hn=Cl(null);function ve(){let e=kl(hn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function vn(){let{api:e}=ve(),[t,r]=ao(0),o=Lt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return oo(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Pl=Mt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},m)=>{let[d,l]=yl({...t,axis:e==="horizontal"?"x":"y"},[...o?[xl(typeof o=="object"?o:{delay:no})]:[],...a||[]]),[u,p]=ao(!1),[g,b]=ao(!1),f=Lt(x=>{!x||(p(x.canScrollPrev()),b(x.canScrollNext()))},[]),v=Lt(()=>{l==null||l.scrollPrev()},[l]),y=Lt(()=>{l==null||l.scrollNext()},[l]),N=Lt(x=>{x.key==="ArrowLeft"?(x.preventDefault(),v()):x.key==="ArrowRight"&&(x.preventDefault(),y())},[v,y]);return oo(()=>{!l||!r||r(l)},[l,r]),oo(()=>{if(!!l)return f(l),l.on("reInit",f),l.on("select",f),()=>{l==null||l.off("select",f)}},[l,f]),Re(hn.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:y,canScrollPrev:u,canScrollNext:g},children:Re("div",{ref:m,onKeyDownCapture:N,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Pl.displayName="Carousel";var Sl=Mt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return Re("div",{ref:o,className:"overflow-hidden",children:Re("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Sl.displayName="CarouselContent";var Rl=Mt(({className:e,...t},r)=>{let{orientation:o}=ve();return Re("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})});Rl.displayName="CarouselItem";var Tl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=ve();return xn("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Re(Nl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Previous slide"})]})});Tl.displayName="CarouselPrevious";var Ll=Mt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=ve();return xn("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Re(wl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Next slide"})]})});Ll.displayName="CarouselNext";import{cva as Ml}from"class-variance-authority";import{motion as Dl}from"framer-motion";import{ChevronLeft as El,ChevronRight as Il}from"lucide-react";import*as Oe from"react";import{jsx as Ze,jsxs as Dt}from"react/jsx-runtime";var Al=Ml("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 "}}}),Lv=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=ve(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[m,d]=Oe.useState(0),[l,u]=Oe.useState(!1),p=Oe.useCallback(f=>{d((f==null?void 0:f.selectedScrollSnap())??0)},[]),g=Oe.useCallback(f=>()=>{s&&s.isPlaying()&&s.stop(),f()},[s]);return Oe.useEffect(()=>{!c||(p(c),u((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,s,p]),Dt("div",{className:i(Al({variant:e}),t),children:[e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:g(o),children:[Ze(El,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ze("div",{className:"flex items-center gap-1",children:c.slideNodes().map((f,v)=>Dt("button",{onClick:g(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ze("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",l&&v===m&&"w-6 bg-black/20"),children:l&&v===m&&Ze(Dl.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??no)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Dt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:g(r),children:[Ze(Il,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Next slide"})]})]})};import Ol from"embla-carousel-react";import{forwardRef as zl,useCallback as Vl,useEffect as Hl}from"react";import{jsx as vr}from"react/jsx-runtime";var Hv=({className:e,...t})=>{let{api:r}=ve(),[o,a]=Ol({dragFree:!0}),n=Vl(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Hl(()=>{if(!(!r||!a))return n(r),r.on("reInit",n),r.on("select",n),()=>{r==null||r.off("reInit",n),r==null||r.off("select",n)}},[r,a,n]),vr("div",{className:"overflow-hidden",ref:o,children:vr("div",{className:i("mx-4 flex gap-4",e),...t})})},_v=zl(({index:e,className:t,...r},o)=>{let{api:a}=ve(),n=vn();return vr("div",{ref:o,children:vr("button",{type:"button",onClick:()=>{var s;if(!a)return;let c=(s=a.plugins())==null?void 0:s.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as Et from"@radix-ui/react-checkbox";import{forwardRef as _l}from"react";import{jsx as io,jsxs as Fl}from"react/jsx-runtime";var gt=_l(({className:e,...t},r)=>io(Et.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:Fl(Et.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[io(sr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),io(mr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));gt.displayName=Et.Root.displayName;import{Command as At,CommandInput as Wl,CommandItem as Bl,useCommandState as $l}from"cmdk";import{ChevronDown as Ul}from"lucide-react";import{forwardRef as Gl,isValidElement as Kl,useCallback as jl,useEffect as yr,useRef as Yl,useState as It}from"react";import*as ze from"@radix-ui/react-popover";import{Drawer as bt}from"vaul";import{jsx as Te,jsxs as xr}from"react/jsx-runtime";function xe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:l,onEscapeKeyDown:u,onWheel:p,sideOffset:g=8}){let{isMobile:b}=Z();return c||b?xr(bt.Root,{open:a,onOpenChange:n,children:[Te(bt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),xr(bt.Portal,{children:[Te(bt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),xr(bt.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:[Te("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Te("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Te("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})]}),Te(bt.Overlay,{})]})]}):xr(ze.Root,{open:a,onOpenChange:n,children:[Te(ze.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Te(ze.Portal,{children:Te(ze.Content,{sideOffset:g,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:l,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as Nr,jsx as E,jsxs as Le}from"react/jsx-runtime";function Zl(e,t){return e===!0}function mx({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,trigger:n,icon:c,placeholder:s="Select...",searchPlaceholder:m="Search...",emptyState:d,createLabel:l,onCreate:u,buttonProps:p,shortcutHint:g,caret:b,side:f,open:v,onOpenChange:y,onSearchChange:N,shouldFilter:x=!0,inputRight:P,inputClassName:k,optionRight:A,optionClassName:B,matchTriggerWidth:L,hideSearch:S=!1,children:Y}){let w=Zl(e,r),C=Array.isArray(t)?t:t?[t]:[],{isMobile:T}=Z(),[M,V]=It(!1),R=v??M,Jt=y??V,[ge,Gr]=It(""),[Yo,Kr]=It(!1),[jr,Bi]=It(void 0),[$i,Zo]=It(!1),Ui=H=>{var st;if(o==null||o(H),!!r)if(w){let Ge=C.some(({value:Ke})=>Ke===H.value);r(Ge?C.filter(({value:Ke})=>Ke!==H.value):[...C,H])}else r(C.length&&((st=C[0])==null?void 0:st.value)===H.value?null:H),Jt(!1)},qo=jl((H,st)=>st===""?[...H.filter(Ge=>Ge.first&&!C.some(Ke=>Ke.value===Ge.value)),...C,...H.filter(Ge=>!Ge.first&&!C.some(Ke=>Ke.value===Ge.value))]:H,[C]);return yr(()=>{Yo&&(Bi(a&&qo(a,ge)),Kr(!1))},[Yo,a,qo,ge]),yr(()=>{Kr(!0)},[a]),yr(()=>{R||(Gr(""),Kr(!0))},[R]),yr(()=>N==null?void 0:N(ge),[ge]),E(xe,{openPopover:R,setOpenPopover:Jt,align:"start",side:f,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(L&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(pe,{width:!T&&!L,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Le(At,{loop:!0,shouldFilter:x,children:[!S&&Le("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Wl,{placeholder:m,value:ge,onValueChange:Gr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",k),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!ge)&&(H.preventDefault(),H.stopPropagation(),Jt(!1))}}),P&&E("div",{className:"mr-2",children:P}),g&&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:g})]}),E(ql,{children:E(At.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:jr!==void 0?Le(Nr,{children:[jr.map(H=>E(Xl,{option:H,multiple:w,selected:C.some(({value:st})=>st===H.value),onSelect:()=>Ui(H),right:A==null?void 0:A(H),className:B},`${H.label}, ${H.value}`)),ge.length>0&&u&&Le(Bl,{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",B),onSelect:async()=>{Zo(!0),await(u==null?void 0:u(ge))&&(Gr(""),Jt(!1)),Zo(!1)},children:[$i?E(Pe,{className:"size-4 shrink-0"}):E(mt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(l==null?void 0:l(ge))||`Create "${ge}"`})]}),x?E(Ql,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:d||"No matches"}):jr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:d||"No matches"}):null]}):E(At.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Pe,{})})})})})]})}),children:n??E(te,{variant:"secondary",...p,className:i(p==null?void 0:p.className,"flex gap-2"),textWrapperClassName:i(p==null?void 0:p.textWrapperClassName,"w-full flex items-center justify-start"),text:Le(Nr,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:Y||C.map(H=>H.label).join(", ")||s}),b&&(b===!0?E(Ul,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):b)]}),icon:c?yn(c)?c:E(c,{className:"size-4 shrink-0"}):void 0})})}var ql=({children:e})=>{let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Le(Nr,{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 Xl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Le(Nr,{children:[E(Jl,{disabledTooltip:e.disabledTooltip,children:Le(At.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",n),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(ka,{className:"size-4 text-neutral-600"}):E(Pa,{className:"size-4 text-neutral-400"})}),Le("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:yn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(sr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(At.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Jl=({children:e,disabledTooltip:t})=>t?E(Q,{content:t,children:E("div",{children:e})}):e,yn=e=>Kl(e),Ql=Gl((e,t)=>$l(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as wr,format as ec,isSameMonth as tc}from"date-fns";import{ChevronLeft as Nn,ChevronRight as wn,ChevronsLeft as rc,ChevronsRight as oc}from"lucide-react";import{forwardRef as ac,useRef as nc}from"react";import{DayPicker as ic,useDayPicker as sc,useDayRender as lc,useNavigation as cc}from"react-day-picker";import{Fragment as dc,jsx as oe,jsxs as Cr}from"react/jsx-runtime";var Ot=ac(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:oe(t,{className:"h-full w-full shrink-0"})}));Ot.displayName="NavigationButton";function Cn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...m}){return oe(ic,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:n,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: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:()=>oe(Nn,{className:"h-4 w-4"}),IconRight:()=>oe(wn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:g,displayMonths:b}=cc(),{numberOfMonths:f,fromDate:v,toDate:y}=sc(),N=b.findIndex(S=>tc(d.displayMonth,S)),x=N===0,P=N===b.length-1,k=f>1&&(x||!P),A=f>1&&(P||!x),B=()=>{let S=wr(g,-1);p&&(!v||S.getTime()>=v.getTime())&&l(S)},L=()=>{let S=wr(g,1);u&&(!y||S.getTime()<=y.getTime())&&l(S)};return Cr("div",{className:"flex items-center justify-between",children:[Cr("div",{className:"flex items-center gap-1",children:[o&&!A&&oe(Ot,{disabled:a||!p||v&&wr(g,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:B,icon:rc}),!A&&oe(Ot,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:Nn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:ec(d.displayMonth,"LLLL yyy",{locale:n})}),Cr("div",{className:"flex items-center gap-1",children:[!k&&oe(Ot,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:wn}),o&&!k&&oe(Ot,{disabled:a||!u||y&&wr(g,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:L,icon:oc})]})]})},Day:({date:d,displayMonth:l})=>{let u=nc(null),{activeModifiers:p,buttonProps:g,divProps:b,isButton:f,isHidden:v}=lc(d,l,u),{selected:y,today:N,disabled:x,range_middle:P}=p;if(v)return oe(dc,{});if(!f)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:k,...A}=g;return Cr("button",{ref:u,...A,type:"button",children:[k,N&&oe("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&P,"text-neutral-400":x})})]})}},...m})}import{endOfDay as Pn,isSameDay as Sn,startOfDay as Rn}from"date-fns";import{enUS as Nc}from"date-fns/locale";import{useEffect as po,useMemo as Tn,useRef as wc,useState as Pr}from"react";import{Command as so}from"cmdk";import{Lock as mc}from"lucide-react";import{jsx as qe,jsxs as uc}from"react/jsx-runtime";var lo=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,n=d=>"date"in d,c=(d,l)=>d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear(),s=(d,l)=>{let u=d.from,p=l.from,g=!1;u&&p&&c(u,p)&&(g=!0);let b=d.to,f=l.to,v=!1;return b&&f&&c(b,f)&&(v=!0),g&&v},m=d=>{if(o)return o===d.id;if(a(d)){let l=r;return l&&s(l,d.dateRange)}else if(n(d)){let l=r;return l&&c(l,d.date)}return!1};return qe(so,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:qe(so.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,l)=>uc(so.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[qe("span",{children:d.label}),d.requiresUpgrade?qe(mc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?qe("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&&qe(Q,{side:"bottom",content:d.tooltipContent,children:qe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};lo.displayName="DatePicker.Presets";import{format as Ve}from"date-fns";import{createContext as pc}from"react";var co=pc({isOpen:!1,setIsOpen:()=>{}}),fc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},mo=(e,t,r=!1)=>{let o=!fc(),a;return r?a=o?Ve(e,"d MMM, yyyy h:mm a",{locale:t}):Ve(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ve(e,"d MMM, yyyy",{locale:t}),a},kn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(l=>{var u,p,g,b,f,v;if("date"in l){let y=l.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${l.label} is after toYear ${d}.`);if(a&&l.date.getMonth()<a.getMonth())throw new Error(`Preset ${l.label} is before fromMonth ${a}.`);if(n&&l.date.getMonth()>n.getMonth())throw new Error(`Preset ${l.label} is after toMonth ${n}.`);if(c&&l.date.getDate()<c.getDate())throw new Error(`Preset ${l.label} is before fromDay ${c}.`);if(s&&l.date.getDate()>s.getDate())throw new Error(`Preset ${l.label} is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}if("dateRange"in l){let y=(u=l.dateRange.from)==null?void 0:u.getFullYear(),N=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(N&&r&&N>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${d}.`);if(a){let x=(g=l.dateRange.from)==null?void 0:g.getMonth();if(x&&x<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${Ve(a,"MMM, yyyy")}.`)}if(n){let x=(b=l.dateRange.to)==null?void 0:b.getMonth();if(x&&x>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${Ve(n,"MMM, yyyy")}.`)}if(c){let x=(f=l.dateRange.from)==null?void 0:f.getDate();if(x&&x<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${Ve(c,"MMM dd, yyyy")}.`)}if(s){let x=(v=l.dateRange.to)==null?void 0:v.getDate();if(x&&x>s.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}}})}};import{cva as gc}from"class-variance-authority";import{Calendar as bc,ChevronDown as hc}from"lucide-react";import{forwardRef as vc}from"react";import{jsx as kr,jsxs as yc}from"react/jsx-runtime";var xc=gc(["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"}}}),uo=vc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>yc("button",{ref:n,className:i(xc({hasError:o}),e),...a,children:[kr(bc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),kr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?kr("span",{className:"text-neutral-400",children:r}):null)}),kr(hc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));uo.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as Ln}from"react/jsx-runtime";var Cc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=Nc,placeholder:l="Select date range",hasError:u,align:p="center",className:g,...b})=>{let{isDesktop:f}=Z(),[v,y]=Pr(!1),[N,x]=Pr(a&&r?a==null?void 0:a.find(({id:M})=>M===r):void 0),[P,k]=Pr((N==null?void 0:N.dateRange)??e??t??void 0),[A,B]=Pr(P==null?void 0:P.to),L=Tn(()=>P,[v]);po(()=>{k(e)},[e]),po(()=>{let M=a==null?void 0:a.find(({id:V})=>V===r);x(M),k((M==null?void 0:M.dateRange)??e??t)},[a,r]),po(()=>{v?P&&B(P.to):B(P==null?void 0:P.to)},[v]);let S=(M,V)=>{let R=(P==null?void 0:P.from)&&(P==null?void 0:P.to)?{from:V}:M;(R==null?void 0:R.from)&&(R==null?void 0:R.to)&&Sn(R.from,R.to)&&(R.from=Rn(R.from),R.to=Pn(R.to)),k(R),x(void 0),(R==null?void 0:R.from)&&(R==null?void 0:R.to)&&(o==null||o(R),y(!1))},Y=M=>{let V=M.dateRange;(V==null?void 0:V.from)&&(V==null?void 0:V.to)&&Sn(V.from,V.to)&&(V={from:Rn(V.from),to:Pn(V.to)}),k(V),x(M),o==null||o(V,M),y(!1)},w=()=>{k(L),y(!1)},C=M=>{M||w(),y(M)},T=Tn(()=>P?`${P.from?mo(P.from,d):""} - ${P.to?mo(P.to,d):""}`:null,[P,d]);return Ie((a==null?void 0:a.filter(M=>M.shortcut).map(M=>M.shortcut))??[],M=>{let V=a==null?void 0:a.find(R=>R.shortcut===M.key);V&&Y(V)}),ae(co.Provider,{value:{isOpen:v,setIsOpen:y},children:ae(xe,{align:p,openPopover:v,setOpenPopover:C,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:Ln("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&ae(kc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(lo,{currentPresetId:r,currentValue:P,presets:a,onSelect:Y})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(Cn,{mode:"range",selected:P,onSelect:S,month:A,onMonthChange:B,numberOfMonths:f?2:1,disabled:s,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:ae(uo,{placeholder:l,disabled:n,className:g,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(N==null?void 0:N.label)??T})})})};function qx({presets:e,...t}){return e&&kn(e,t),ae(Cc,{presets:e,...t})}function kc({children:e}){let t=wc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Ln("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),ae("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import{useId as Pc}from"react";import{jsx as Sr,jsxs as Sc}from"react/jsx-runtime";function a2({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=Pc();return Sc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:Sr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),Sr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import Rc from"next/link";import{useEffect as Tc,useState as Mn}from"react";import Lc from"swr";import{jsx as fo,jsxs as Dn}from"react/jsx-runtime";function En({className:e}){let{data:t}=Lc("https://status.dub.co/api/v1/summary",be),[r,o]=Mn("bg-neutral-200"),[a,n]=Mn("Loading status...");return Tc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:m}=c[0],d=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(d)}else n("All systems operational"),o("bg-green-500")},[t]),Dn(Rc,{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:[Dn("div",{className:"relative size-2",children:[fo("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")}),fo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),fo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Rr,jsxs as In}from"react/jsx-runtime";function u2({icon:e,title:t,description:r,learnMore:o,children:a}){return In("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Rr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Rr(e,{className:"size-6 text-neutral-800"})}),Rr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&In("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Rr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Mc}from"class-variance-authority";import{useState as An}from"react";import{toast as On}from"sonner";import{Fragment as Ec,jsx as ye,jsxs as bo}from"react/jsx-runtime";var zn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],go={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:zn,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:[...zn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Dc=Mc("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 C2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Da,customPreview:m,accept:d="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:g=!0,content:b,maxFileSizeMB:f=0,targetResolution:v,accessibilityLabel:y="File upload",disabled:N=!1}){let[x,P]=An(!1),[k,A]=An(null),B=async L=>{let S="dataTransfer"in L?L.dataTransfer.files&&L.dataTransfer.files[0]:L.target.files&&L.target.files[0];if(!S)return;if(A(S.name),f>0&&S.size/1024/1024>f){On.error(`File size too big (max ${f} MB)`);return}let Y=go[d].types;if(Y.length&&!Y.includes(S.type)){On.error(go[d].errorMessage??"File type not supported");return}let w=S;if(v&&S.type.startsWith("image/"))try{let C=await Jo(S,v),T=await fetch(C).then(M=>M.blob());w=new File([T],S.name,{type:S.type})}catch(C){console.error("Error resizing image:",C)}if(t){let C=new FileReader;C.onload=T=>{var M;return r==null?void 0:r({src:(M=T.target)==null?void 0:M.result,file:w})},C.readAsDataURL(w);return}r==null||r({file:w})};return bo("label",{className:i(Dc({variant:o}),N?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&ye("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ye(St,{})}),ye("div",{className:"absolute inset-0 z-[5]",onDragOver:L=>{L.preventDefault(),L.stopPropagation(),P(!0)},onDragEnter:L=>{L.preventDefault(),L.stopPropagation(),P(!0)},onDragLeave:L=>{L.preventDefault(),L.stopPropagation(),P(!1)},onDrop:async L=>{L.preventDefault(),L.stopPropagation(),B(L),P(!1)}}),bo("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",N&&"bg-neutral-50",x&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",g&&!N&&"group-hover:opacity-100"):i(!N&&"group-hover:bg-neutral-50")),children:[ye(s,{className:i("size-7 transition-all duration-75",N?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",x?"scale-110":"scale-100"),n)}),b!==null&&ye("div",{className:i("mt-2 text-center text-sm text-neutral-500",N&&"text-neutral-400"),children:b??ye(Ec,{children:bo("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ye("span",{className:"sr-only",children:y})]}),l&&(m??ye("img",{src:l,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&ye("div",{className:"sr-only mt-1 flex shadow-sm",children:ye("input",{id:e,type:"file",accept:go[d].types.join(","),onChange:B,disabled:N},k)})]})}import{AnimatePresence as Ic,motion as Vn}from"framer-motion";import{X as Ac}from"lucide-react";import Oc from"next/link";import{isValidElement as zc}from"react";import{Fragment as Vc,jsx as ee,jsxs as zt}from"react/jsx-runtime";function _n({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:zt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[ee("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:ee(Ic,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(Vn.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 s=e.find(m=>m.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var g,b,f,v;let d=(g=s.options)==null?void 0:g.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),l=(d==null?void 0:d.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,m,{key:s.key,option:d}))??s.icon,u=(d==null?void 0:d.label)??((f=s.getOptionLabel)==null?void 0:f.call(s,m,{key:s.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return zt(Vn.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:[zt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:Hn(s.icon)?s.icon:ee(s.icon,{className:"h-4 w-4"})}),s.label]}),ee("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),ee("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?zt(Vc,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:Hn(l)?l:ee(l,{className:"h-4 w-4"})}),p?ee(Oc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Pt(u,30)}):Pt(u,30)]}):ee("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),ee("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(n,m),children:ee(Ac,{className:"h-3.5 w-3.5"})})]},`${n}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&zt("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",ee("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 Hn=e=>zc(e);import{Command as He,useCommandState as Hc}from"cmdk";import{ChevronDown as _c,ListFilter as Fc}from"lucide-react";import{Fragment as Wc,forwardRef as Bc,isValidElement as Wn,useCallback as Tr,useEffect as Lr,useImperativeHandle as $c,useRef as vo,useState as ho}from"react";import{Fragment as Zc,jsx as W,jsxs as Ne}from"react/jsx-runtime";function Bn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:m,emptyState:d,className:l}){var S,Y;let{isMobile:u}=Z(),p=vo(null),g=vo(),[b,f]=ho(!1);Ie("f",()=>f(!0),{enabled:!b});let[v,y]=ho(""),[N,x]=ho(null),P=Tr(()=>{y(""),x(null)},[]);Lr(()=>{b||P()},[b]);let k=N?e.find(({key:w})=>w===N):null,A=Tr(w=>{p.current&&(g.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),x(w),o==null||o(w)},[]),B=Tr(w=>{if(!k||!c)return!1;let C=c.find(({key:T})=>T===N);return(C==null?void 0:C.value)===w||C&&k.multiple&&Array.isArray(C.value)&&C.value.includes(w)},[k]),L=Tr(w=>{k&&(B(w)?r(k.key,w):t(k.key,w),k.multiple||f(!1))},[c,k,s]);return Lr(()=>{a==null||a(v)},[v]),Lr(()=>{n==null||n(N)},[N]),Lr(()=>{(k==null?void 0:k.options)&&p.current&&(g.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),W(xe,{openPopover:b,setOpenPopover:f,onEscapeKeyDown:w=>{N&&(w.preventDefault(),P())},content:W(pe,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Ne(He,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[Ne("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[W(Gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:v,onValueChange:y,onKeyDown:w=>{(w.key==="Escape"||w.key==="Backspace"&&!v)&&(w.preventDefault(),w.stopPropagation(),N?P():f(!1))},emptySubmit:w=>{w.preventDefault(),w.stopPropagation(),s?(t("ai",k?`${k.label} ${v}`:v),f(!1)):L(v)}}),!k&&W("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),W(Kc,{ref:p,children:Ne(He.List,{className:i("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((Y=(S=k.options)==null?void 0:S.filter(w=>!v||!w.hideDuringSearch))==null?void 0:Y.map(w=>{let C=B(w.value);return W(Fn,{filter:k,option:w,right:C?W(Ca,{className:"h-4 w-4"}):w.right,onSelect:()=>L(w.value)},w.value)}))??W(He.Loading,{children:W("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:W(Pe,{})})}):e.filter(w=>!w.hideInFilterDropdown).map(w=>Ne(Wc,{children:[W(Fn,{filter:w,onSelect:()=>A(w.key)}),w.separatorAfter&&W(He.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},w.key)),(!k||k.options)&&W(jc,{search:v,askAI:s,children:d?Uc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),children:Ne("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",l),children:[W(Fc,{className:"size-4 shrink-0"}),W("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?W("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):W(_c,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Uc(e){return typeof e=="object"&&e!==null&&!Wn(e)}var Gc=e=>{let t=Hc(r=>r.filtered.count===0);return W(He.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"})},Kc=Bc(({children:e},t)=>{let r=vo(null);$c(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return Ne(Zc,{children:[W("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),W("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Fn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Z(),n=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return Ne(He.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[W("span",{className:"shrink-0 text-neutral-600",children:Yc(n)?n:W(n,{className:"h-4 w-4"})}),Pt(c,48),W("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var jc=({search:e,askAI:t,children:r})=>t&&e?Ne(He.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[W(da,{className:"h-4 w-4"}),Ne("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",Ne("span",{className:"text-black",children:['"',e,'"']})]})]}):W(He.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Yc=e=>Wn(e);var Y2={Select:Bn,List:_n};import{useMemo as qc,useState as $n}from"react";import{jsx as Xe,jsxs as Mr}from"react/jsx-runtime";function ty({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,m]=$n(r.defaultValue),[d,l]=$n(!1),u=qc(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return Mr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:s}),l(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Mr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Mr("div",{className:"flex flex-col space-y-3",children:[Xe("h2",{className:"text-xl font-medium",children:e}),Xe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Xe("input",{...r,type:r.type||"text",required:!0,disabled:!!n,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":n})}):Xe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Mr("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"?Xe("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,Xe("div",{className:"shrink-0",children:Xe(te,{text:a,loading:d,disabled:u,disabledTooltip:n})})]})]})}import{useId as Xc}from"react";import{jsx as Dr,jsxs as Jc}from"react/jsx-runtime";function Je({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Xc();return Jc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Dr("defs",{children:Dr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Dr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Dr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Qc}from"lucide-react";import ed,{useCallback as td,useState as rd}from"react";import{jsx as Qe,jsxs as xo}from"react/jsx-runtime";var od=ed.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=rd(!1),c=td(()=>n(!a),[a,n]);return xo("div",{children:[xo("div",{className:"relative flex",children:[Qe("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}),xo("div",{className:"group",children:[r.error&&Qe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Qe(Qc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Qe("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:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Qe(Oa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Qe(za,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Qe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});od.displayName="Input";import{flip as ld,offset as cd,size as dd,useDismiss as md,useFloating as ud,useInteractions as pd}from"@floating-ui/react";import{Command as Me,useCommandState as fd}from"cmdk";import{Check as gd,ChevronDown as bd,Search as hd,X as vd}from"lucide-react";import{createContext as xd,forwardRef as Yn,useContext as Co,useEffect as yo,useMemo as Gn,useRef as Kn,useState as No}from"react";import{Drawer as ht}from"vaul";import ad from"next/image";import{memo as nd,useEffect as id,useState as Un}from"react";import{jsx as sd}from"react/jsx-runtime";var Vt=nd(e=>{let[t,r]=Un(!0),[o,a]=Un(e.src);id(()=>a(e.src),[e.src]);let n=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return sd(ad,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:n,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as O,jsxs as le}from"react/jsx-runtime";var Er=xd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function Dy({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=Z(),l=Kn(null),[u,p]=No(!1),[g,b]=No(""),[f,v]=No(!1);yo(()=>{u&&v(!1)},[u]),yo(()=>v(!0),[g]),yo(()=>{t&&b(t.value)},[t]);let y=Gn(()=>{let C=g.toLowerCase();return f?e.filter(T=>T.value.toLowerCase().includes(C)):g?e.sort((T,M)=>(M.value.toLowerCase().includes(C)?1:0)-(T.value.toLowerCase().includes(C)?1:0)):e},[f,g,e]),{refs:N,floatingStyles:x,context:P}=ud({open:u,onOpenChange:p,middleware:[cd(8),dd({apply({elements:{floating:C},availableHeight:T}){Object.assign(C.style,{maxHeight:`${Math.max(75,Math.min(T,290))}px`})},padding:8}),ld({fallbackStrategy:"initialPlacement",padding:8})]}),k=md(P,{enabled:!d||!n}),{getReferenceProps:A,getFloatingProps:B}=pd([k]),L=Kn(null),{scrollProgress:S,updateScrollProgress:Y}=Ae(L),w=Gn(()=>t&&t.icon?t.icon:t&&t.image?O(Vt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||O(hd,{className:"size-4 text-neutral-400"}),[t,c]);return O(Er.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:g,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&n?le(ht.Root,{open:u,onOpenChange:p,children:[O(ht.Trigger,{className:"sm:hidden",asChild:!0,children:O(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:O(wo,{className:o,iconElement:w})})}),O(ht.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ht.Portal,{children:[O(ht.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:C=>{C.target instanceof Element&&C.target.closest("[data-sonner-toast]")&&C.preventDefault()},children:le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O("div",{className:"p-2",children:O(wo,{className:o,iconElement:w})}),u&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&g===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),O(jn,{items:y})]})]})}),O(ht.Overlay,{})]})]}):le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O(wo,{className:o,iconElement:w,ref:N.setReference,...A()}),u&&le("div",{ref:N.setFloating,style:x,...B(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:L,onScroll:Y,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&g===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),O(jn,{items:y})]}),O("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(S,2)}})]})]})})}var wo=Yn(({iconElement:e,className:t,...r},o)=>le("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:[O("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[O(yd,{}),O(Nd,{})]})]})),yd=Yn((e,t)=>{let r=fd(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:m}=Co(Er);return O(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),n(!1)):d.key==="Enter"&&r?n(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&n(!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}=Co(Er);return O("button",{type:"button",onClick:()=>{r(n=>!n),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?O(vd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):O(bd,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function jn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Co(Er);return e.map(a=>le(Me.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&O(Vt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),O("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&&O(gr,{className:"text-xs",variant:"neutral",children:a.label})]}),O(gd,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as ko from"@radix-ui/react-label";import{cva as wd}from"class-variance-authority";import*as Zn from"react";import{jsx as Pd}from"react/jsx-runtime";var Cd=wd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),kd=Zn.forwardRef(({className:e,...t},r)=>Pd(ko.Root,{ref:r,className:i(Cd(),e),...t}));kd.displayName=ko.Root.displayName;import{cva as Sd}from"class-variance-authority";import{isValidElement as Rd}from"react";import{jsx as Po,jsxs as qn}from"react/jsx-runtime";var So=Sd(["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"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function Uy({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,disabledTooltip:c,...s}){return Po(ut,{tooltipProps:{content:c},children:qn(e||"button",{...e==="button"?{type:"button"}:{},className:i(So({variant:t,disabled:!!c}),n),disabled:c?!0:s.disabled,...s,children:[qn("div",{className:"flex grow items-center gap-2",children:[o&&(Td(o)?o:Po(o,{className:"size-4"})),r]}),a&&Po("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 Td=e=>Rd(e);import{curveNatural as Xn}from"@visx/curve";import{LinearGradient as Jn}from"@visx/gradient";import{Group as Ld}from"@visx/group";import{ParentSize as Md}from"@visx/responsive";import{scaleLinear as Dd,scaleUtc as Ed}from"@visx/scale";import{Area as Id,AreaClosed as Ad}from"@visx/shape";import{motion as Qn}from"framer-motion";import{useId as Od,useMemo as ei}from"react";import{jsx as we,jsxs as Ro}from"react/jsx-runtime";var zd={top:8,right:2,bottom:2,left:2};function e4(e){return we(Md,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Vd,{...{width:t,height:r,...e}})})}function Vd({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...zd,...n},s=Od(),m=ei(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:l}=ei(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),g=r.map(({date:v})=>v.getTime()),b=new Date(Math.min(...g)),f=new Date(Math.max(...g));return{yScale:Dd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Ed({domain:[b,f],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return Ro("svg",{width:e,height:t,children:[Ro("defs",{children:[we(Jn,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Jn,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),Ro(Ld,{left:c.left,top:c.top,children:[we(Id,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,curve:o?Xn:void 0,children:({path:u})=>we(Qn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Ad,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Xn:void 0,children:({path:u})=>we(Qn.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 ce from"@radix-ui/react-dialog";import*as To from"@radix-ui/react-visually-hidden";import{useRouter as Hd}from"next/navigation";import{Drawer as et}from"vaul";import{jsx as ne,jsxs as vt}from"react/jsx-runtime";function i4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let m=Hd(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Z();return l&&!n?ne(et.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...s,children:vt(et.Portal,{children:[ne(et.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(et.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:vt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[vt(To.Root,{children:[ne(et.Title,{children:"Modal"}),ne(et.Description,{children:"This is a modal"})]}),ne(_d,{}),e]})}),ne(et.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:vt(ce.Portal,{children:[ne(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),vt(ce.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className: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:[vt(To.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function _d(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as Lo}from"react";import{jsx as Ht,jsxs as Fd}from"react/jsx-runtime";function p4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:m,decrementAriaLabel:d="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,g=typeof o=="number"?e<o:!0,b=Lo(y=>{let N=y;return typeof r=="number"&&(N=Math.max(r,N)),typeof o=="number"&&(N=Math.min(o,N)),N},[r,o]),f=Lo(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),v=Lo(()=>{n||!g||t(b(e+a))},[n,g,b,t,a,e]);return Fd("div",{id:s,role:"group","aria-disabled":n,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",n&&"opacity-60",c),...u,children:[Ht("button",{type:"button","aria-label":d,onClick:f,disabled:n||!p,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(n||!p)&&"hover:bg-neutral-50"),children:Ht(mr,{className:"block size-4"})}),Ht("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:y=>{n||((y.key==="ArrowLeft"||y.key==="ArrowDown")&&(y.preventDefault(),f()),(y.key==="ArrowRight"||y.key==="ArrowUp")&&(y.preventDefault(),v()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:m?m(e):e}),Ht("button",{type:"button","aria-label":l,onClick:v,disabled:n||!g,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(n||!g)&&"hover:bg-neutral-50"),children:Ht(mt,{className:"block size-4"})})]})}import{Fragment as Wd,jsx as Ir,jsxs as xt}from"react/jsx-runtime";var ti=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 b4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return xt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[xt("div",{className:"flex items-center gap-2",children:[xt("div",{children:[Ir("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&xt(Wd,{children:[xt("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&&Ir("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),xt("div",{className:"flex items-center gap-2",children:[Ir("button",{type:"button",className:ti,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Ir("button",{type:"button",className:ti,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as ri,jsxs as Bd}from"react/jsx-runtime";function x4({progress:e,strokeWidth:t=16,className:r}){let o=Math.min(Math.max(e,0),1),a=(100-t)/2,n=a*Math.PI*2,c=o*n;return Bd("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600",r),children:[ri("circle",{cx:"50",cy:"50",r:a,stroke:"#e5e5e5",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round"}),o>0&&ri("circle",{cx:"50",cy:"50",r:a,stroke:"currentColor",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",strokeDasharray:`${c} ${n-c}`,style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as $d}from"lucide-react";import*as Mo from"react";import{jsx as Ar}from"react/jsx-runtime";var Ud=Mo.forwardRef(({className:e,...t},r)=>Ar(_e.Root,{className:i("grid gap-2",e),...t,ref:r}));Ud.displayName=_e.Root.displayName;var Gd=Mo.forwardRef(({className:e,...t},r)=>Ar(_e.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:Ar(_e.Indicator,{className:"flex items-center justify-center",children:Ar($d,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Gd.displayName=_e.Item.displayName;import{Drawer as Fe}from"vaul";import{jsx as tt,jsxs as qd}from"react/jsx-runtime";function Kd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Fe.NestedRoot:Fe.Root;return tt(a,{direction:"right",handleOnly:!0,...o,children:qd(Fe.Portal,{children:[tt(Fe.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),tt(Fe.Content,{...t,onPointerDownOutside:n=>{var c;n.target instanceof Element&&n.target.closest("[data-sonner-toast]")&&n.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,n)},className:i("@container/sheet 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)",userSelect:"auto",...t==null?void 0:t.style},children:tt("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function jd({className:e,...t}){return tt(Fe.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Yd(e){return tt(Fe.Description,{...e})}function Zd(e){return tt(Fe.Close,{...e})}var R4=Object.assign(Kd,{Title:jd,Description:Yd,Close:Zd});import{useEffect as Xd,useRef as Jd,useState as Qd}from"react";import{jsx as oi}from"react/jsx-runtime";var em=`
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
- `,Jd=`
9
+ `,tm=`
10
10
  precision mediump float;
11
11
 
12
12
  uniform vec2 resolution;
@@ -40,14 +40,14 @@ void main(void) {
40
40
 
41
41
  gl_FragColor = fragColor;
42
42
  }
43
- `,Qd=60,em=1e3/Qd;function w4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Zd(null),[c,s]=qd(!1);return Yd(()=>{let m=n.current;if(!m||!m.parentElement)return;let d=m.parentElement,l=window.devicePixelRatio||1;m.width=d.clientWidth*l,m.height=d.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){alert("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let S=0;S<2;++S){let K=S===0?Xd:Jd,w=u.createShader(S===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!w){console.error("Failed to create shader");return}u.shaderSource(w,K),u.compileShader(w),u.getShaderParameter(w,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(w)),u.attachShader(p,w),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let g=u.getAttribLocation(p,"position"),b=u.getUniformLocation(p,"time"),f=u.getUniformLocation(p,"resolution"),v=u.getUniformLocation(p,"dotSize"),y=u.getUniformLocation(p,"cellSize"),N=u.getUniformLocation(p,"speed"),x=u.getUniformLocation(p,"color");u.useProgram(p);let P=[1,1,-1,1,1,-1,-1,-1],k=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,k),u.bufferData(u.ARRAY_BUFFER,new Float32Array(P),u.STATIC_DRAW),u.enableVertexAttribArray(g),u.vertexAttribPointer(g,2,u.FLOAT,!1,0,0),u.uniform1f(v,e*window.devicePixelRatio),u.uniform1f(y,t*window.devicePixelRatio),u.uniform1f(N,r),u.uniform3f(x,o[0],o[1],o[2]);let A,W=0;function T(S){if(S-W<em){A=requestAnimationFrame(T);return}W=S,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(b,S/1e3),u.uniform2f(f,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),A=requestAnimationFrame(T)}return A=requestAnimationFrame(T),m.addEventListener("webglcontextlost",S=>{S.preventDefault(),s(!0),cancelAnimationFrame(A)}),()=>{cancelAnimationFrame(A),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),ei("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:ei("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as We from"@radix-ui/react-slider";import{jsx as rt,jsxs as Or}from"react/jsx-runtime";function P4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:m}){let d=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return rt("div",{className:i("relative z-0",c),children:Or("div",{className:"w-full",children:[Or(We.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Or(We.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[rt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Or("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[rt(We.Range,{className:"absolute h-4 bg-black"}),d.map(l=>{let u=(l-r)/(o-r)*100,p=l<=e;return rt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),rt(We.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:rt("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),rt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as tm,useId as rm,useRef as om}from"react";import{jsx as zr,jsxs as ti}from"react/jsx-runtime";function L4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:n,autoFocus:c=!1}){let s=rm(),m=om(null);return tm(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),ti("div",{className:a,children:[r&&zr("div",{className:"flex items-center gap-2",children:zr("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),ti("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:[zr("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?kt(e):"",onBlur:d=>{if(d.target.value.length>0){let l=Yr(d.target.value);l&&(t(l),d.target.value=kt(l))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let l=Yr(m.current.value);l&&(t(l),m.current.value=kt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),zr("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?Xo(e):"",onChange:d=>{let l=new Date(d.target.value);t(l),m.current&&(m.current.value=kt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as am}from"class-variance-authority";import{jsx as ri,jsxs as sm}from"react/jsx-runtime";var nm=am("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"}}),im={neutral:Ma,new:Ta,success:Sa,pending:La,warning:Xr,error:Xr};function z4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??im[t??"neutral"]:null;return ri(ut,{tooltipProps:{content:o},children:sm("span",{className:i(nm({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:[s&&ri(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as Hr from"@radix-ui/react-switch";import{useMemo as lm}from"react";import{jsx as Vr}from"react/jsx-runtime";function U4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let l=lm(()=>d?!0:m||s,[d,m,s]),u=Vr(Hr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:l,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:Vr(Hr.Thumb,{className:i(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:n})});return d?Vr(J,{content:d,children:Vr("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Do}from"cmdk";import{useState as cm}from"react";import{jsx as yt,jsxs as dm}from"react/jsx-runtime";function J4({table:e}){let[t,r]=cm(!1);return yt(xe,{openPopover:t,setOpenPopover:r,content:yt(Do,{tabIndex:0,loop:!0,children:yt(Do.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 dm(Do.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:[yt("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:yt(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:yt(_a,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Eo,getCoreRowModel as pm,useReactTable as fm}from"@tanstack/react-table";import{AnimatePresence as gm,motion as bm}from"framer-motion";import{memo as hm,useEffect as _t,useMemo as ii,useRef as vm,useState as ni}from"react";import{useEffect as mm,useState as um}from"react";import{jsx as _r,jsxs as oi}from"react/jsx-runtime";function ai({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=um(0);return mm(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),_r("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:oi("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[_r("div",{className:"flex w-6 items-center justify-center",children:_r(gt,{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"})}),oi("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"]}),_r("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 Nm,jsx as H,jsxs as de}from"react/jsx-runtime";var Io=(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"]),xm=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 NN(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,g]=ni(e.columnVisibility??{}),[b,f]=ni(e.selectedRows??{}),v=vm(null);_t(()=>{if(!m||!t)return;let x=Object.entries(b);if(x.length>0){let P=x.filter(([k])=>t.find(A=>(m==null?void 0:m(A))===k));P.length!==x.length&&f(Object.fromEntries(P))}},[t,b,m]),_t(()=>{e.selectedRows&&!Zr(e.selectedRows,b)&&f(e.selectedRows??{})},[e.selectedRows]),_t(()=>{var x;(x=e.onRowSelectionChange)==null||x.call(e,N.getSelectedRowModel().rows)},[b]),_t(()=>{e.columnVisibility&&!Zr(e.columnVisibility,p)&&g(e.columnVisibility??{})},[e.columnVisibility]),_t(()=>{var x;(x=e.onColumnVisibilityChange)==null||x.call(e,p)},[p]);let y=ii(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:x})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsAllRowsSelected()?!0:x.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>x.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:x,table:P})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsSelected(),onClick:k=>{let A=m==null?void 0:m(x.original),W=P.getRowModel().rows,T=v.current!==null?W.findIndex(S=>(m==null?void 0:m(S.original))===v.current):-1;if(k.shiftKey&&v.current!==null&&T!==-1){let S=x.index,K=Math.min(T,S),w=Math.max(T,S),C=W.slice(K,w+1).map(R=>m==null?void 0:m(R.original));P.setRowSelection(R=>{let L=A!==void 0&&((R==null?void 0:R[A])??!1);return{...R,...Object.fromEntries(C.map(ee=>[ee,!L]))}}),v.current=A??null}else x.toggleSelected(),v.current=A??null},title:"Select"})})}]:[],...o],[u,o]),N=fm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:pm(),onPaginationChange:s,onColumnVisibilityChange:x=>g(x),onRowSelectionChange:f,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:l});return{...e,columnVisibility:p,table:N,enableColumnResizing:d}}var ym=hm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:s}){let{className:m,...d}=a||{};return H("tr",{className:i("group/row",r&&"cursor-pointer select-none",s.getRowModel().rows.length>8&&t.index===s.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{Ke(l)||r(t,l)}:void 0,onAuxClick:o?l=>{Ke(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...d,children:t.getVisibleCells().map(l=>H("td",{className:i(Io(l.column.id,!!r),"text-content-default group",Ao(l.column,t.index===s.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Oo(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Eo(l.column.columnDef.cell,l.getContext())}),n==null?void 0:n(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function wN({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:m=[],className:d,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:g,tdClassName:b,table:f,pagination:v,resourceName:y,onRowClick:N,onRowAuxClick:x,onRowSelectionChange:P,selectionControls:k,rowProps:A,rowCount:W,children:T,enableColumnResizing:S=!1}){let K=!!P||!!k,w=ii(()=>S?f.getVisibleLeafColumns().reduce((C,R)=>C+R.getSize(),0):"100%",[S,f.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?de(Nm,{children:[K&&H(ai,{table:f,controls:k,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[de("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",S&&"[&_th]:group/resize"],d),style:{width:"100%",tableLayout:S?"fixed":"auto",minWidth:w},children:[H("thead",{className:"relative",children:f.getHeaderGroups().map(C=>H("tr",{children:C.headers.map(R=>{let L=m.includes(R.column.id),ee=L?"button":"div";return de("th",{colSpan:R.colSpan,className:i(Io(R.id),"text-content-emphasis select-none font-medium",Ao(R.column,!f.getRowModel().rows.length),typeof g=="function"?g(R.column.id):g,S&&"relative"),style:{width:R.getSize(),...Oo(R.column)},children:[H("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(ee,{className:i("flex items-center gap-2",R.column.id==="select"&&"size-full"),...L&&{type:"button",disabled:!L,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:R.column.id,sortOrder:n!==R.column.id||c==="asc"?"desc":"asc"})},children:[R.isPlaceholder?null:Eo(R.column.columnDef.header,R.getContext()),L&&n===R.column.id&&H(ua,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),S&&R.column.getCanResize()&&!["select","menu"].includes(R.column.id)&&H("div",{onMouseDown:R.getResizeHandler(),onTouchStart:R.getResizeHandler(),onClick:D=>D.stopPropagation(),className:xm})]},R.id)})},C.id))}),H("tbody",{children:f.getRowModel().rows.map(C=>{let R=typeof A=="function"?A(C):A,{className:L,...ee}=R||{};return S?H(ym,{row:C,onRowClick:N,onRowAuxClick:x,rowProps:R,cellRight:a,tdClassName:b,table:f},`${C.id}-${f.getVisibleLeafColumns().map(D=>D.id).join(",")}`):H("tr",{className:i("group/row",N&&"cursor-pointer select-none",f.getRowModel().rows.length>8&&C.index===f.getRowModel().rows.length-1&&"[&_td]:border-b-0",L),onClick:N?D=>{Ke(D)||N(C,D)}:void 0,onAuxClick:x?D=>{Ke(D)||x(C,D)}:void 0,"data-selected":C.getIsSelected(),...ee,children:C.getVisibleCells().map(D=>H("td",{className:i(Io(D.column.id,!!N),"text-content-default group",Ao(D.column,C.index===f.getRowModel().rows.length-1),typeof b=="function"?b(D.column.id,C):b),style:{minWidth:D.column.columnDef.minSize,maxWidth:D.column.columnDef.maxSize,width:D.column.columnDef.size||"auto",...Oo(D.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Eo(D.column.columnDef.cell,D.getContext())}),a==null?void 0:a(D)]})},D.id))},C.id)})})]}),T]})]}):H("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(y==null?void 0:y(!0))||"items"} found.`}),v&&!r&&!!(e!=null&&e.length)&&!!W&&de("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:[de("div",{children:[H("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((v.pageIndex-1)*v.pageSize+1).toLocaleString(),"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,f.getRowCount()).toLocaleString()]})," ","of"," ",H("span",{className:"font-medium",children:f.getRowCount().toLocaleString()})," ",(y==null?void 0:y(f.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[H(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>f.previousPage(),disabled:v.pageIndex===1}),H(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>f.nextPage(),disabled:v.pageIndex===f.getPageCount()})]})]}),H(gm,{children:t&&H(bm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:H("div",{className:"flex h-[75vh] w-full items-center justify-center",children:H(Pe,{})})})})]})}var Ao=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Oo=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 wm,motion as si}from"framer-motion";import Cm from"next/link";import{useId as km}from"react";import{jsx as Fr,jsxs as Pm}from"react/jsx-runtime";function TN({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=km();return Fr(wm,{id:s,children:Fr(si.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:c,children:e.map(m=>{let d=m.value===t,l=m.href?Cm:"button";return Pm(l,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:i("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"?Fr("p",{children:m.label}):m.label,m.badge,d&&Fr(si.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",n),transition:{duration:.25}})]},m.value)})})})}import{useEffect as Sm,useId as Rm,useRef as Tm,useState as Lm}from"react";import{jsx as fe,jsxs as zo}from"react/jsx-runtime";var Mm=[{key:"utm_source",icon:Wa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ya,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ha,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ga,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:ja,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Fa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function zN({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=Rm(),[m,d]=Lm(!1),l=Tm(null);return Sm(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:i("grid gap-y-3",n),children:Mm.map(({key:u,icon:p,label:g,placeholder:b,description:f},v)=>fe("div",{className:"group relative",children:zo("div",{className:"relative z-10 flex",children:[fe(J,{content:zo("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:f}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:zo("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:()=>d(y=>!y),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):g})]})}),fe("div",{className:"min-w-0 grow",children:fe(ut,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${s}-${u}`,ref:v===0?l:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as Vo,jsxs as Dm}from"react/jsx-runtime";function HN(){return Dm("div",{style:Wr.backgroundMain,children:[Vo("div",{style:Wr.backgroundMainBefore}),Vo("div",{style:Wr.backgroundMainAfter}),Vo("div",{style:Wr.backgroundContent})]})}var Wr={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
+ `,rm=60,om=1e3/rm;function D4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Jd(null),[c,s]=Qd(!1);return Xd(()=>{let m=n.current;if(!m||!m.parentElement)return;let d=m.parentElement,l=window.devicePixelRatio||1;m.width=d.clientWidth*l,m.height=d.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){alert("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let S=0;S<2;++S){let Y=S===0?em:tm,w=u.createShader(S===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!w){console.error("Failed to create shader");return}u.shaderSource(w,Y),u.compileShader(w),u.getShaderParameter(w,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(w)),u.attachShader(p,w),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let g=u.getAttribLocation(p,"position"),b=u.getUniformLocation(p,"time"),f=u.getUniformLocation(p,"resolution"),v=u.getUniformLocation(p,"dotSize"),y=u.getUniformLocation(p,"cellSize"),N=u.getUniformLocation(p,"speed"),x=u.getUniformLocation(p,"color");u.useProgram(p);let P=[1,1,-1,1,1,-1,-1,-1],k=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,k),u.bufferData(u.ARRAY_BUFFER,new Float32Array(P),u.STATIC_DRAW),u.enableVertexAttribArray(g),u.vertexAttribPointer(g,2,u.FLOAT,!1,0,0),u.uniform1f(v,e*window.devicePixelRatio),u.uniform1f(y,t*window.devicePixelRatio),u.uniform1f(N,r),u.uniform3f(x,o[0],o[1],o[2]);let A,B=0;function L(S){if(S-B<om){A=requestAnimationFrame(L);return}B=S,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(b,S/1e3),u.uniform2f(f,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),A=requestAnimationFrame(L)}return A=requestAnimationFrame(L),m.addEventListener("webglcontextlost",S=>{S.preventDefault(),s(!0),cancelAnimationFrame(A)}),()=>{cancelAnimationFrame(A),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),oi("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:oi("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as We from"@radix-ui/react-slider";import{jsx as rt,jsxs as Or}from"react/jsx-runtime";function A4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:m}){let d=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return rt("div",{className:i("relative z-0",c),children:Or("div",{className:"w-full",children:[Or(We.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Or(We.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[rt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Or("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[rt(We.Range,{className:"absolute h-4 bg-black"}),d.map(l=>{let u=(l-r)/(o-r)*100,p=l<=e;return rt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),rt(We.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:rt("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),rt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as am,useId as nm,useRef as im}from"react";import{jsx as zr,jsxs as ai}from"react/jsx-runtime";function H4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:n,autoFocus:c=!1}){let s=nm(),m=im(null);return am(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),ai("div",{className:a,children:[r&&zr("div",{className:"flex items-center gap-2",children:zr("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),ai("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:[zr("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?kt(e):"",onBlur:d=>{if(d.target.value.length>0){let l=Yr(d.target.value);l&&(t(l),d.target.value=kt(l))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let l=Yr(m.current.value);l&&(t(l),m.current.value=kt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),zr("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?Xo(e):"",onChange:d=>{let l=new Date(d.target.value);t(l),m.current&&(m.current.value=kt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as sm}from"class-variance-authority";import{jsx as ni,jsxs as dm}from"react/jsx-runtime";var lm=sm("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"}}),cm={neutral:Ma,new:Ta,success:Sa,pending:La,warning:Xr,error:Xr};function G4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??cm[t??"neutral"]:null;return ni(ut,{tooltipProps:{content:o},children:dm("span",{className:i(lm({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:[s&&ni(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as Hr from"@radix-ui/react-switch";import{useMemo as mm}from"react";import{jsx as Vr}from"react/jsx-runtime";function Q4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let l=mm(()=>d?!0:m||s,[d,m,s]),u=Vr(Hr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:l,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:Vr(Hr.Thumb,{className:i(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:n})});return d?Vr(Q,{content:d,children:Vr("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Do}from"cmdk";import{useState as um}from"react";import{jsx as yt,jsxs as pm}from"react/jsx-runtime";function sN({table:e}){let[t,r]=um(!1);return yt(xe,{openPopover:t,setOpenPopover:r,content:yt(Do,{tabIndex:0,loop:!0,children:yt(Do.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 pm(Do.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:[yt("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:yt(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:yt(_a,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Eo,getCoreRowModel as bm,useReactTable as hm}from"@tanstack/react-table";import{AnimatePresence as vm,motion as xm}from"framer-motion";import{memo as ym,useEffect as _t,useMemo as ci,useRef as Nm,useState as li}from"react";import{useEffect as fm,useState as gm}from"react";import{jsx as _r,jsxs as ii}from"react/jsx-runtime";function si({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=gm(0);return fm(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),_r("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:ii("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[_r("div",{className:"flex w-6 items-center justify-center",children:_r(gt,{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"})}),ii("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"]}),_r("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 km,jsx as _,jsxs as de}from"react/jsx-runtime";var Io=(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"]),wm=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 MN(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,g]=li(e.columnVisibility??{}),[b,f]=li(e.selectedRows??{}),v=Nm(null);_t(()=>{if(!m||!t)return;let x=Object.entries(b);if(x.length>0){let P=x.filter(([k])=>t.find(A=>(m==null?void 0:m(A))===k));P.length!==x.length&&f(Object.fromEntries(P))}},[t,b,m]),_t(()=>{e.selectedRows&&!Zr(e.selectedRows,b)&&f(e.selectedRows??{})},[e.selectedRows]),_t(()=>{var x;(x=e.onRowSelectionChange)==null||x.call(e,N.getSelectedRowModel().rows)},[b]),_t(()=>{e.columnVisibility&&!Zr(e.columnVisibility,p)&&g(e.columnVisibility??{})},[e.columnVisibility]),_t(()=>{var x;(x=e.onColumnVisibilityChange)==null||x.call(e,p)},[p]);let y=ci(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:x})=>_("div",{className:"flex size-full items-center justify-center",children:_(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsAllRowsSelected()?!0:x.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>x.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:x,table:P})=>_("div",{className:"flex size-full items-center justify-center",children:_(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsSelected(),onClick:k=>{let A=m==null?void 0:m(x.original),B=P.getRowModel().rows,L=v.current!==null?B.findIndex(S=>(m==null?void 0:m(S.original))===v.current):-1;if(k.shiftKey&&v.current!==null&&L!==-1){let S=x.index,Y=Math.min(L,S),w=Math.max(L,S),C=B.slice(Y,w+1).map(T=>m==null?void 0:m(T.original));P.setRowSelection(T=>{let M=A!==void 0&&((T==null?void 0:T[A])??!1);return{...T,...Object.fromEntries(C.map(V=>[V,!M]))}}),v.current=A??null}else x.toggleSelected(),v.current=A??null},title:"Select"})})}]:[],...o],[u,o]),N=hm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:bm(),onPaginationChange:s,onColumnVisibilityChange:x=>g(x),onRowSelectionChange:f,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:l});return{...e,columnVisibility:p,table:N,enableColumnResizing:d}}var Cm=ym(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:s}){let{className:m,...d}=a||{};return _("tr",{className:i("group/row",r&&"cursor-pointer select-none",s.getRowModel().rows.length>8&&t.index===s.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{je(l)||r(t,l)}:void 0,onAuxClick:o?l=>{je(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...d,children:t.getVisibleCells().map(l=>_("td",{className:i(Io(l.column.id,!!r),"text-content-default group",Ao(l.column,t.index===s.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Oo(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[_("div",{className:"min-w-0 shrink grow truncate",children:Eo(l.column.columnDef.cell,l.getContext())}),n==null?void 0:n(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function DN({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:m=[],className:d,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:g,tdClassName:b,table:f,pagination:v,resourceName:y,onRowClick:N,onRowAuxClick:x,onRowSelectionChange:P,selectionControls:k,rowProps:A,rowCount:B,children:L,enableColumnResizing:S=!1}){let Y=!!P||!!k,w=ci(()=>S?f.getVisibleLeafColumns().reduce((C,T)=>C+T.getSize(),0):"100%",[S,f.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?de(km,{children:[Y&&_(si,{table:f,controls:k,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[de("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",S&&"[&_th]:group/resize"],d),style:{width:"100%",tableLayout:S?"fixed":"auto",minWidth:w},children:[_("thead",{className:"relative",children:f.getHeaderGroups().map(C=>_("tr",{children:C.headers.map(T=>{let M=m.includes(T.column.id),V=M?"button":"div";return de("th",{colSpan:T.colSpan,className:i(Io(T.id),"text-content-emphasis select-none font-medium",Ao(T.column,!f.getRowModel().rows.length),typeof g=="function"?g(T.column.id):g,S&&"relative"),style:{width:T.getSize(),...Oo(T.column)},children:[_("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(V,{className:i("flex items-center gap-2",T.column.id==="select"&&"size-full"),...M&&{type:"button",disabled:!M,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:T.column.id,sortOrder:n!==T.column.id||c==="asc"?"desc":"asc"})},children:[T.isPlaceholder?null:Eo(T.column.columnDef.header,T.getContext()),M&&n===T.column.id&&_(ua,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),S&&T.column.getCanResize()&&!["select","menu"].includes(T.column.id)&&_("div",{onMouseDown:T.getResizeHandler(),onTouchStart:T.getResizeHandler(),onClick:R=>R.stopPropagation(),className:wm})]},T.id)})},C.id))}),_("tbody",{children:f.getRowModel().rows.map(C=>{let T=typeof A=="function"?A(C):A,{className:M,...V}=T||{};return S?_(Cm,{row:C,onRowClick:N,onRowAuxClick:x,rowProps:T,cellRight:a,tdClassName:b,table:f},`${C.id}-${f.getVisibleLeafColumns().map(R=>R.id).join(",")}`):_("tr",{className:i("group/row",N&&"cursor-pointer select-none",f.getRowModel().rows.length>8&&C.index===f.getRowModel().rows.length-1&&"[&_td]:border-b-0",M),onClick:N?R=>{je(R)||N(C,R)}:void 0,onAuxClick:x?R=>{je(R)||x(C,R)}:void 0,"data-selected":C.getIsSelected(),...V,children:C.getVisibleCells().map(R=>_("td",{className:i(Io(R.column.id,!!N),"text-content-default group",Ao(R.column,C.index===f.getRowModel().rows.length-1),typeof b=="function"?b(R.column.id,C):b),style:{minWidth:R.column.columnDef.minSize,maxWidth:R.column.columnDef.maxSize,width:R.column.columnDef.size||"auto",...Oo(R.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[_("div",{className:"min-w-0 shrink grow truncate",children:Eo(R.column.columnDef.cell,R.getContext())}),a==null?void 0:a(R)]})},R.id))},C.id)})})]}),L]})]}):_("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(y==null?void 0:y(!0))||"items"} found.`}),v&&!r&&!!(e!=null&&e.length)&&!!B&&de("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:[de("div",{children:[_("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((v.pageIndex-1)*v.pageSize+1).toLocaleString(),"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,f.getRowCount()).toLocaleString()]})," ","of"," ",_("span",{className:"font-medium",children:f.getRowCount().toLocaleString()})," ",(y==null?void 0:y(f.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[_(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>f.previousPage(),disabled:v.pageIndex===1}),_(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>f.nextPage(),disabled:v.pageIndex===f.getPageCount()})]})]}),_(vm,{children:t&&_(xm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:_("div",{className:"flex h-[75vh] w-full items-center justify-center",children:_(Pe,{})})})})]})}var Ao=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Oo=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 Pm,motion as di}from"framer-motion";import Sm from"next/link";import{useId as Rm}from"react";import{jsx as Fr,jsxs as Tm}from"react/jsx-runtime";function VN({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=Rm();return Fr(Pm,{id:s,children:Fr(di.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:c,children:e.map(m=>{let d=m.value===t,l=m.href?Sm:"button";return Tm(l,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:i("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"?Fr("p",{children:m.label}):m.label,m.badge,d&&Fr(di.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",n),transition:{duration:.25}})]},m.value)})})})}import{useEffect as Lm,useId as Mm,useRef as Dm,useState as Em}from"react";import{jsx as fe,jsxs as zo}from"react/jsx-runtime";var Im=[{key:"utm_source",icon:Wa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ya,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ha,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ga,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ka,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Fa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function GN({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Z(),s=Mm(),[m,d]=Em(!1),l=Dm(null);return Lm(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:i("grid gap-y-3",n),children:Im.map(({key:u,icon:p,label:g,placeholder:b,description:f},v)=>fe("div",{className:"group relative",children:zo("div",{className:"relative z-10 flex",children:[fe(Q,{content:zo("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:f}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:zo("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:()=>d(y=>!y),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):g})]})}),fe("div",{className:"min-w-0 grow",children:fe(ut,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${s}-${u}`,ref:v===0?l:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as Vo,jsxs as Am}from"react/jsx-runtime";function jN(){return Am("div",{style:Wr.backgroundMain,children:[Vo("div",{style:Wr.backgroundMainBefore}),Vo("div",{style:Wr.backgroundMainAfter}),Vo("div",{style:Wr.backgroundContent})]})}var Wr={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%),
44
44
  radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
45
45
  radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
46
46
  radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
47
47
  radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
48
48
  radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
49
- 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{ChevronDown as Nu}from"lucide-react";import wu from"next/image";import $e from"next/link";import{useParams as Cu}from"next/navigation";import{useState as ku}from"react";import{jsx as li}from"react/jsx-runtime";function Ft({className:e}){return li("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:li("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 Br=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:ct,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:dt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:lt,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:tr,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:qa,href:"/integrations"}],Ho=[{icon:xa,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ha,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ga,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:va,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ba,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ci=[{icon:lr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:dr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Ho}],Wt=[{icon:cr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ir,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Rt,title:"About",description:"Company, values, and team",href:"/about"},{icon:Na,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Va,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:wa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ft,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Aa,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],di=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],mi=[{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Partner Terms",slug:"partners"},{name:"Privacy Policy",slug:"privacy"},{name:"Report Abuse",slug:"abuse"},{name:"SLA",slug:"sla"},{name:"Subprocessors",slug:"subprocessors"},{name:"Terms of Service",slug:"terms"}],GN=[{name:"X (Twitter)",icon:ar,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:or,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:rr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:nr,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Em}from"react/jsx-runtime";function $r({className:e,children:t}){return Em("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Be from"@radix-ui/react-popover";import{BoxSelect as du,Home as mu,LayoutGrid as uu,Type as pu}from"lucide-react";import{useParams as fu}from"next/navigation";import{useCallback as gu,useContext as bu,useState as hu}from"react";import{toast as vu}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Ym}from"framer-motion";import jt from"next/link";import{useParams as Zm,usePathname as qm}from"next/navigation";import{createContext as Xm,useId as Jm}from"react";import Qm from"swr";import{Link as hi}from"@radix-ui/react-navigation-menu";import vi from"next/image";import xi from"next/link";import{Link2 as Im}from"lucide-react";import{jsx as Z,jsxs as X}from"react/jsx-runtime";var ui={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},ot={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 pi({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(Im,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>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:ui[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Qt(t)})]}),X("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",ui[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:ot.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(Ea,{className:"text-content-default size-3.5"}),ot.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/${ot.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),ot.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:ot.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:ot.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(ot.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 Am}from"react";import{jsx as h,jsxs as me}from"react/jsx-runtime";function fi(e){let t=Am();return me("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:[me("defs",{children:[h("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),h("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),h("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),h("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),h("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[h("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),h("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),h("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),h("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[h("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),h("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),h("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"}),h("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"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[h("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),h("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[h("clipPath",{id:`${t}-b`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),h("clipPath",{id:`${t}-c`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),h("clipPath",{id:`${t}-d`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),h("clipPath",{id:`${t}-f`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),h("clipPath",{id:`${t}-g`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),h("clipPath",{id:`${t}-h`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),h("clipPath",{id:`${t}-j`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),h("clipPath",{id:`${t}-k`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),h("clipPath",{id:`${t}-l`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),me("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as zm,jsx as De,jsxs as Bt}from"react/jsx-runtime";var Om=[{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 gi({className:e}){return De("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:De("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Om.map((t,r)=>De("div",{className:"h-[60px] w-[180px] p-[3px]",children:De("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Bt(zm,{children:[De("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),Bt("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Bt("div",{className:"flex items-center gap-1.5",children:[De("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"}),De("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),De("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Bt("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[De("span",{className:"text-content-muted text-[6px] font-medium",children:Qt(o)}),Bt("span",{className:"text-content-default text-[9px] font-medium",children:["$",er(t[o])]})]},o))})]})]})})},r))})})}import{Link as Vm}from"@radix-ui/react-navigation-menu";import Hm from"next/link";import{jsx as $t,jsxs as bi}from"react/jsx-runtime";var at="text-xs uppercase text-neutral-500 dark:text-white/60",_m="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",Ce=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Ut({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return $t(Vm,{asChild:!0,children:$t(Hm,{className:i(_m,a),...c,children:bi("div",{className:"flex items-center justify-between gap-3",children:[e,bi("div",{className:"flex-1",children:[$t("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&$t("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&$t(ca,{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 z,jsxs as Gt}from"react/jsx-runtime";var Fm=[{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:z(ct,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:z(fi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:z(lt,{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:z(pi,{className:"absolute bottom-0 left-0 size-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:z(dt,{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:z(gi,{})}],Wm=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:z("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:z(vi,{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:z("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:z(vi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function yi({domain:e}){return Gt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[z("div",{className:"grid grid-cols-3 gap-4",children:Fm.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>z(hi,{asChild:!0,children:Gt(xi,{href:_(a,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Gt("div",{className:"relative p-5 pb-0",children:[o,z("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),z("div",{className:"relative mt-10 h-40 grow",children:z("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:z("div",{className:"relative size-full",children:s})})}),z("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":n}})]})},t))}),z("div",{className:"grid grow grid-cols-2 gap-4",children:Wm.map(({title:t,description:r,href:o,graphic:a})=>z(hi,{asChild:!0,children:Gt(xi,{href:_(o,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),z("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),z("div",{className:"relative flex items-center justify-between px-5 py-4",children:Gt("div",{children:[z("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Bm}from"@radix-ui/react-navigation-menu";import $m from"next/link";import{jsx as G,jsxs as nt}from"react/jsx-runtime";var Um=[{icon:cr,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:ir,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function Ni({domain:e}){return nt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[nt("div",{className:"flex h-full flex-col p-4",children:[G("p",{className:i(at,"mb-4 ml-2"),children:"Explore"}),G("div",{className:"grid grow grid-cols-2 gap-4",children:Um.map(({icon:t,title:r,description:o,href:a})=>G(Bm,{asChild:!0,children:nt($m,{href:_(a,e,Ce({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:[nt("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(Je,{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:i("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"}),nt("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))})]}),nt("div",{className:"px-6 py-4",children:[G("p",{className:i(at,"mb-2"),children:"Company"}),G("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Ut,{className:"-mx-2",href:_(a,e,Ce({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))})]}),nt("div",{className:"px-6 py-4",children:[G("p",{className:i(at,"mb-2"),children:"Updates"}),G("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Ut,{className:"-mx-2",href:_(a,e,Ce({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 Gm}from"@radix-ui/react-navigation-menu";import jm from"next/link";import{jsx as re,jsxs as Nt}from"react/jsx-runtime";var Km=[{icon:lr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:dr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function wi({domain:e}){return Nt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Nt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(at,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:Km.map(({icon:t,title:r,description:o,href:a})=>re(Gm,{asChild:!0,children:Nt(jm,{href:_(a,e,Ce({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:[Nt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(Je,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),Nt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),Nt("div",{className:"px-6 py-4",children:[re("p",{className:i(at,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Ho.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Ut,{className:"-mx-2",href:_(a,e,Ce({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as ru,jsx as B,jsxs as wt}from"react/jsx-runtime";var _o=Xm({theme:"light"}),Fo=[{name:"Product",content:yi,childItems:Br,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:wi,childItems:ci,segments:["/solutions","/sdks"]},{name:"Resources",content:Ni,childItems:Wt,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"]}],Ci=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 ew({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Zm();t&&(o=t);let a=Jm(),n=un(40),c=qm(),{data:s,isLoading:m}=Qm(o.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return B(_o.Provider,{value:{theme:e},children:B(Ym,{id:a,children:wt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",n&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B($r,{className:i("relative",r),children:wt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(jt,{className:"block w-fit py-2 pr-2",href:_("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(Ur,{})})}),wt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(ue.List,{className:"group relative z-0 flex",children:Fo.map(({name:d,href:l,segments:u,content:p})=>{let g=u.some(b=>c==null?void 0:c.startsWith(b));return wt(ue.Item,{children:[B(tu,{trigger:!!p,children:l!==void 0?B(jt,{id:`nav-${l}`,href:_(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:Ci,"data-active":g,children:d}):wt("button",{className:Ci,"data-active":g,children:[d,B(eu,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(ue.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:B(p,{domain:o})})]},d)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(ue.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?B(jt,{href:ke,className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:wt(ru,{children:[B(jt,{href:"https://app.dub.co/login",className:i(se({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),B(jt,{href:"https://app.dub.co/register",className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function eu(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 tu({trigger:e,children:t}){return e?B(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as ou,Menu as au,X as nu}from"lucide-react";import Ct from"next/link";import{useParams as $o}from"next/navigation";import{useEffect as iu,useState as Pi}from"react";import su from"swr";import{Fragment as cu,jsx as M,jsxs as Ee}from"react/jsx-runtime";var Wo={"Dub Links":M("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:M(ct,{className:"size-3 text-orange-900"})}),"Dub Partners":M("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:M(dt,{className:"size-3 text-violet-900"})}),"Dub Analytics":M("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:M(lt,{className:"size-3 text-green-900"})}),"Dub API":M("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:M(tr,{className:"size-3 text-neutral-900"})})};function gw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=$o();t&&(r=t);let[o,a]=Pi(!1);iu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=su(r.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return Ee("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[n&&Object.keys(n).length>0?M(Bo,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Ee("div",{className:"flex gap-2 max-[280px]:hidden",children:[M(Bo,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),M(Bo,{href:`${ke}/register`,children:"Sign Up"})]}),M("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?M(nu,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):M(au,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),M("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:Ee("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[Fo.map(({name:s,href:m,childItems:d},l)=>M(lu,{name:s,href:m,childItems:d,setOpen:a},l)),n&&Object.keys(n).length>0?M("li",{className:"py-3 min-[281px]:hidden",children:M(Ct,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ee(cu,{children:[M("li",{className:"py-3 min-[281px]:hidden",children:M(Ct,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),M("li",{className:"py-3 min-[281px]:hidden",children:M(Ct,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var lu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=$o(),[n,c]=Pi(!1);return r?M("li",{className:"py-3",children:Ee(pe,{height:!0,children:[Ee("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[M("p",{className:"font-semibold",children:e}),M(ou,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&M("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?Ee("div",{className:"grid grid-cols-1 gap-3",children:[M("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,l)=>M(ki,{item:d,setOpen:o,size:"small"},l))]},m):M(ki,{item:s,setOpen:o},m))})]})}):t?M("li",{className:"py-3",children:M(Ct,{href:_(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},ki=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=$o(),s=Wo==null?void 0:Wo[e];return Ee(Ct,{href:_(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:[M("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",n==="small"&&"size-8"),children:s??M(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),Ee("div",{children:[M("div",{className:"flex items-center gap-2",children:M("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&M("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Bo({variant:e,className:t,...r}){return M(Ct,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as Si}from"react/jsx-runtime";function Ri({className:e}){return Si("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:Si("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as q,jsxs as Ti}from"react/jsx-runtime";var xu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
49
+ 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{ChevronDown as ku}from"lucide-react";import Pu from"next/image";import $e from"next/link";import{useParams as Su}from"next/navigation";import{useState as Ru}from"react";import{jsx as mi}from"react/jsx-runtime";function Ft({className:e}){return mi("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:mi("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 Br=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:ct,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:dt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:lt,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:tr,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:qa,href:"/integrations"}],Ho=[{icon:xa,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ha,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ga,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:va,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ba,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ui=[{icon:lr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:dr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Ho}],Wt=[{icon:cr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ir,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Rt,title:"About",description:"Company, values, and team",href:"/about"},{icon:Na,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Va,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:wa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ft,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Aa,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],pi=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],fi=[{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Partner Terms",slug:"partners"},{name:"Privacy Policy",slug:"privacy"},{name:"Report Abuse",slug:"abuse"},{name:"SLA",slug:"sla"},{name:"Subprocessors",slug:"subprocessors"},{name:"Terms of Service",slug:"terms"}],e3=[{name:"X (Twitter)",icon:ar,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:or,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:rr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:nr,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Om}from"react/jsx-runtime";function $r({className:e,children:t}){return Om("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Be from"@radix-ui/react-popover";import{BoxSelect as pu,Home as fu,LayoutGrid as gu,Type as bu}from"lucide-react";import{useParams as hu}from"next/navigation";import{useCallback as vu,useContext as xu,useState as yu}from"react";import{toast as Nu}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Xm}from"framer-motion";import Kt from"next/link";import{useParams as Jm,usePathname as Qm}from"next/navigation";import{createContext as eu,useId as tu}from"react";import ru from"swr";import{Link as yi}from"@radix-ui/react-navigation-menu";import Ni from"next/image";import wi from"next/link";import{Link2 as zm}from"lucide-react";import{jsx as q,jsxs as J}from"react/jsx-runtime";var gi={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},ot={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 bi({className:e}){return J("div",{className:i("pointer-events-none relative size-full",e),children:[J("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:[q("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"}),q("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),q("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),J("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[J("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[J("div",{className:"p-1.5",children:[J("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:[q(zm,{className:"size-3 rotate-90"}),"d.to/try"]}),q("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),q("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>J("div",{className:"flex items-center justify-between gap-2",children:[J("div",{className:"flex items-center gap-2",children:[q("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:gi[t].color}}),q("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Qt(t)})]}),J("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",gi[t].value]})]},t))})]}),q("div",{className:"relative",children:J("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[J("div",{className:"px-3 py-2.5",children:[J("div",{className:"flex justify-between gap-2",children:[q("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:ot.avatarIndex*100+"%"}}),J("div",{className:"flex flex-col items-end gap-1",children:[J("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:[q(Ea,{className:"text-content-default size-3.5"}),ot.origin]}),J("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:[q("img",{src:`https://flag.vercel.app/m/${ot.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),ot.country]})]})]}),q("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:ot.name}),q("div",{className:"text-content-subtle mt-px text-xs",children:ot.email})]}),q("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(ot.details).map(([t,r])=>J("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[q("span",{className:"text-content-muted truncate font-medium",children:t}),q("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as Vm}from"react";import{jsx as h,jsxs as me}from"react/jsx-runtime";function hi(e){let t=Vm();return me("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:[me("defs",{children:[h("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),h("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),h("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),h("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),h("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[h("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),h("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),h("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),h("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[h("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),h("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),h("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"}),h("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"}),h("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),h("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),h("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"}),h("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:h("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[h("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"}),h("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"})]}),h("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[h("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),h("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),h("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),h("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"}),h("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"}),h("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:h("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"})}),h("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:h("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[h("clipPath",{id:`${t}-b`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),h("clipPath",{id:`${t}-c`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),h("clipPath",{id:`${t}-d`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),h("clipPath",{id:`${t}-f`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),h("clipPath",{id:`${t}-g`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),h("clipPath",{id:`${t}-h`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),h("clipPath",{id:`${t}-j`,children:h("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),h("clipPath",{id:`${t}-k`,children:h("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),h("clipPath",{id:`${t}-l`,children:h("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),me("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#030712",stopOpacity:"0"}),h("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as _m,jsx as De,jsxs as Bt}from"react/jsx-runtime";var Hm=[{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 vi({className:e}){return De("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:De("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Hm.map((t,r)=>De("div",{className:"h-[60px] w-[180px] p-[3px]",children:De("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Bt(_m,{children:[De("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),Bt("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Bt("div",{className:"flex items-center gap-1.5",children:[De("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"}),De("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),De("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Bt("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[De("span",{className:"text-content-muted text-[6px] font-medium",children:Qt(o)}),Bt("span",{className:"text-content-default text-[9px] font-medium",children:["$",er(t[o])]})]},o))})]})]})})},r))})})}import{Link as Fm}from"@radix-ui/react-navigation-menu";import Wm from"next/link";import{jsx as $t,jsxs as xi}from"react/jsx-runtime";var at="text-xs uppercase text-neutral-500 dark:text-white/60",Bm="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",Ce=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Ut({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return $t(Fm,{asChild:!0,children:$t(Wm,{className:i(Bm,a),...c,children:xi("div",{className:"flex items-center justify-between gap-3",children:[e,xi("div",{className:"flex-1",children:[$t("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&$t("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&$t(ca,{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 z,jsxs as Gt}from"react/jsx-runtime";var $m=[{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:z(ct,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:z(hi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:z(lt,{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:z(bi,{className:"absolute bottom-0 left-0 size-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:z(dt,{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:z(vi,{})}],Um=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:z("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:z(Ni,{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:z("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:z(Ni,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function Ci({domain:e}){return Gt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[z("div",{className:"grid grid-cols-3 gap-4",children:$m.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>z(yi,{asChild:!0,children:Gt(wi,{href:F(a,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Gt("div",{className:"relative p-5 pb-0",children:[o,z("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),z("div",{className:"relative mt-10 h-40 grow",children:z("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:z("div",{className:"relative size-full",children:s})})}),z("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":n}})]})},t))}),z("div",{className:"grid grow grid-cols-2 gap-4",children:Um.map(({title:t,description:r,href:o,graphic:a})=>z(yi,{asChild:!0,children:Gt(wi,{href:F(o,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),z("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),z("div",{className:"relative flex items-center justify-between px-5 py-4",children:Gt("div",{children:[z("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Gm}from"@radix-ui/react-navigation-menu";import Km from"next/link";import{jsx as K,jsxs as nt}from"react/jsx-runtime";var jm=[{icon:cr,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:ir,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function ki({domain:e}){return nt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[nt("div",{className:"flex h-full flex-col p-4",children:[K("p",{className:i(at,"mb-4 ml-2"),children:"Explore"}),K("div",{className:"grid grow grid-cols-2 gap-4",children:jm.map(({icon:t,title:r,description:o,href:a})=>K(Gm,{asChild:!0,children:nt(Km,{href:F(a,e,Ce({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:[nt("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(Je,{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"}),nt("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))})]}),nt("div",{className:"px-6 py-4",children:[K("p",{className:i(at,"mb-2"),children:"Company"}),K("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Ut,{className:"-mx-2",href:F(a,e,Ce({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))})]}),nt("div",{className:"px-6 py-4",children:[K("p",{className:i(at,"mb-2"),children:"Updates"}),K("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Ut,{className:"-mx-2",href:F(a,e,Ce({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 Ym}from"@radix-ui/react-navigation-menu";import Zm from"next/link";import{jsx as re,jsxs as Nt}from"react/jsx-runtime";var qm=[{icon:lr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:dr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function Pi({domain:e}){return Nt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Nt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(at,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:qm.map(({icon:t,title:r,description:o,href:a})=>re(Ym,{asChild:!0,children:Nt(Zm,{href:F(a,e,Ce({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:[Nt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(Je,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),Nt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),Nt("div",{className:"px-6 py-4",children:[re("p",{className:i(at,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Ho.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Ut,{className:"-mx-2",href:F(a,e,Ce({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as nu,jsx as $,jsxs as wt}from"react/jsx-runtime";var _o=eu({theme:"light"}),Fo=[{name:"Product",content:Ci,childItems:Br,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:Pi,childItems:ui,segments:["/solutions","/sdks"]},{name:"Resources",content:ki,childItems:Wt,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"]}],Si=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 cw({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Jm();t&&(o=t);let a=tu(),n=un(40),c=Qm(),{data:s,isLoading:m}=ru(o.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return $(_o.Provider,{value:{theme:e},children:$(Xm,{id:a,children:wt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[$("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",n&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),$($r,{className:i("relative",r),children:wt("div",{className:"flex h-14 items-center justify-between",children:[$("div",{className:"grow basis-0",children:$(Kt,{className:"block w-fit py-2 pr-2",href:F("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:$(Ur,{})})}),wt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[$(ue.List,{className:"group relative z-0 flex",children:Fo.map(({name:d,href:l,segments:u,content:p})=>{let g=u.some(b=>c==null?void 0:c.startsWith(b));return wt(ue.Item,{children:[$(au,{trigger:!!p,children:l!==void 0?$(Kt,{id:`nav-${l}`,href:F(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:Si,"data-active":g,children:d}):wt("button",{className:Si,"data-active":g,children:[d,$(ou,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&$(ue.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:$(p,{domain:o})})]},d)})}),$("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:$(ue.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),$("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?$(Kt,{href:ke,className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:wt(nu,{children:[$(Kt,{href:"https://app.dub.co/login",className:i(se({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),$(Kt,{href:"https://app.dub.co/register",className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function ou(e){return $("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:$("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 au({trigger:e,children:t}){return e?$(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as iu,Menu as su,X as lu}from"lucide-react";import Ct from"next/link";import{useParams as $o}from"next/navigation";import{useEffect as cu,useState as Ti}from"react";import du from"swr";import{Fragment as uu,jsx as D,jsxs as Ee}from"react/jsx-runtime";var Wo={"Dub Links":D("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:D(ct,{className:"size-3 text-orange-900"})}),"Dub Partners":D("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:D(dt,{className:"size-3 text-violet-900"})}),"Dub Analytics":D("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:D(lt,{className:"size-3 text-green-900"})}),"Dub API":D("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:D(tr,{className:"size-3 text-neutral-900"})})};function kw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=$o();t&&(r=t);let[o,a]=Ti(!1);cu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=du(r.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return Ee("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[n&&Object.keys(n).length>0?D(Bo,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Ee("div",{className:"flex gap-2 max-[280px]:hidden",children:[D(Bo,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),D(Bo,{href:`${ke}/register`,children:"Sign Up"})]}),D("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?D(lu,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):D(su,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),D("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:Ee("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[Fo.map(({name:s,href:m,childItems:d},l)=>D(mu,{name:s,href:m,childItems:d,setOpen:a},l)),n&&Object.keys(n).length>0?D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ee(uu,{children:[D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var mu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=$o(),[n,c]=Ti(!1);return r?D("li",{className:"py-3",children:Ee(pe,{height:!0,children:[Ee("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[D("p",{className:"font-semibold",children:e}),D(iu,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&D("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?Ee("div",{className:"grid grid-cols-1 gap-3",children:[D("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,l)=>D(Ri,{item:d,setOpen:o,size:"small"},l))]},m):D(Ri,{item:s,setOpen:o},m))})]})}):t?D("li",{className:"py-3",children:D(Ct,{href:F(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},Ri=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=$o(),s=Wo==null?void 0:Wo[e];return Ee(Ct,{href:F(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:[D("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",n==="small"&&"size-8"),children:s??D(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),Ee("div",{children:[D("div",{className:"flex items-center gap-2",children:D("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&D("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Bo({variant:e,className:t,...r}){return D(Ct,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as Li}from"react/jsx-runtime";function Mi({className:e}){return Li("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:Li("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 X,jsxs as Di}from"react/jsx-runtime";var wu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
50
50
  <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"/>
51
- </svg>`,yu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
51
+ </svg>`,Cu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
52
52
  <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"/>
53
- </svg>`;function Ur({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=fu(),{theme:a}=bu(_o),[n,c]=hu(!1),s=gu(l=>{l.preventDefault(),c(!0)},[]),[,m]=ft();function d(l){vu.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Ti(Be.Root,{open:n,onOpenChange:c,children:[q(Be.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(Ri,{className:r}):q(Ft,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Be.Portal,{children:q(Be.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:l=>{l.stopPropagation(),c(!1)},children:Ti("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(Kt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(xu),icon:q(Ft,{className:"h-4 w-4"})}),q(Kt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(yu),icon:q(pu,{strokeWidth:2,className:"h-4 w-4"})}),q(Kt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(du,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Kt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(mu,{strokeWidth:2,className:"h-4 w-4"})}):q(Kt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(uu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Kt({className:e,...t}){return q(te,{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 $}from"react/jsx-runtime";var Pu=[{name:"Twitter",icon:ar,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:or,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:rr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:nr,href:"https://www.youtube.com/@dubdotco"}],Yt={product:[...Br.filter(({title:e})=>e!=="Dub Integrations").map(({id:e,title:t,href:r})=>({id:e,name:t,href:r})),{id:null,name:"Dub Enterprise",href:"/enterprise"}],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:"Integrations",href:"/integrations"},{name:"Pricing",href:"/pricing"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"}],company:[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"Careers",href:"/careers"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"},{name:"Privacy",href:"/privacy"}],compare:di.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Zt="text-sm font-medium text-neutral-900",qt="flex flex-col mt-2.5 gap-3.5",it="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function jw({staticDomain:e,className:t}){let{domain:r="dub.co"}=Cu();e&&(r=e);let[o,a]=ku(!1);return I($r,{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:$("footer",{children:[$("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[$("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:$($e,{href:_("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[$("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),I(Ur,{className:"h-8 text-neutral-800"})]})}),I("div",{className:"flex items-center gap-3",children:Pu.map(({name:n,icon:c,href:s})=>$("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:n}),I(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[I("h3",{className:Zt,children:"Product"}),I("ul",{role:"list",className:qt,children:Yt.product.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[n.id&&I(qr,{product:n.id}),n.name]})},n.name))})]}),$("div",{children:[I("h3",{className:Zt,children:"Solutions"}),I("ul",{role:"list",className:qt,children:Yt.solutions.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:n.name})},n.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Resources"}),I("ul",{role:"list",className:qt,children:Yt.resources.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(it,"gap-1"),children:[n.name,n.target&&I(Ka,{className:"size-3.5"})]})},n.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[I("div",{className:"grid gap-8",children:$("div",{children:[I("h3",{className:Zt,children:"Company"}),$("ul",{role:"list",className:qt,children:[Yt.company.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(it,"gap-1"),children:n.name})},n.name)),I("li",{className:"-mt-1",children:I(xe,{content:I("div",{className:"flex w-screen flex-col gap-1 p-1.5 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[200px]",children:mi.map(n=>I($e,{href:_(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(So({variant:"default"}),it,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:$("button",{className:it,children:["Legal",I(Nu,{className:"size-3.5"})]})})})]})]})}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Compare"}),I("ul",{role:"list",className:qt,children:Yt.compare.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[I(qr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(Ln,{}),I($e,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(wu,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),$("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Su,motion as Ru}from"framer-motion";import{useEffect as Tu,useState as Lu}from"react";import{jsx as Li}from"react/jsx-runtime";var Mi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=Lu(!1);Tu(()=>{n(!0)},[]);let c=r?Ru.div:"div";return Li(Su,{children:a?Li(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Mu}from"class-variance-authority";import{toast as Du}from"sonner";import{jsx as Uo,jsxs as Iu}from"react/jsx-runtime";var Eu=Mu("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 a6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ft(),s=o||la;return Iu("button",{onClick:m=>{m.stopPropagation(),Du.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Eu({variant:e}),r),type:"button",children:[Uo("span",{className:"sr-only",children:"Copy"}),n?Uo(fa,{className:"h-3.5 w-3.5"}):Uo(s,{className:"h-3.5 w-3.5"})]})}import{toast as Au}from"sonner";import{jsx as Ou}from"react/jsx-runtime";function c6({value:e,children:t,className:r,successMessage:o}){let[a,n]=ft();return Ou("button",{onClick:c=>{c.stopPropagation(),Au.promise(n(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 zu,jsxs as Vu}from"react/jsx-runtime";function m6({icon:e,text:t}){return Vu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,zu("p",{className:"truncate text-sm",children:t})]})}import{jsx as Hu}from"react/jsx-runtime";var p6=({children:e})=>Hu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Go}from"react/jsx-runtime";function v6({apexDomain:e,className:t,imageProps:r}){return e?Go(Vt,{src:`${ia}${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}):Go("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:Go(Ba,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Di}from"lucide-react";import{useSearchParams as _u}from"next/navigation";import{useEffect as Fu,useMemo as Wu,useRef as Bu}from"react";import $u from"swr";import{useDebounce as Uu}from"use-debounce";import{Fragment as Ei,jsx as j,jsxs as Ue}from"react/jsx-runtime";function T6({defaultUrl:e}){let t=_u(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Uu(ta(r),500),a=Wu(()=>na(o||""),[o]),{data:n,isValidating:c}=$u(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,be,{revalidateOnFocus:!1}),{title:s,description:m,image:d}=n||{},l=Bu(null);Fu(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Y();return Ue(Ei,{children:[!e&&Ue("div",{className:"relative flex items-center",children:[j(Di,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:l,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"})]}),Ue("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&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(St,{})}),d?j("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Ue("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(ma,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Ue("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}):Ue("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 L6({defaultUrl:e}){return Ue(Ei,{children:[Ue("div",{className:"relative flex items-center",children:[j(Di,{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(St,{})})})]})}import{AnimatePresence as Gu}from"framer-motion";import Ii from"js-cookie";import{createContext as ju,useState as Ku}from"react";import{jsx as jo}from"react/jsx-runtime";var Yu=ju({hidePopup:()=>{}});function z6({children:e,hiddenCookieId:t}){let[r,o]=Ku(Ii.get(t)==="1"),a=()=>{o(!0),Ii.set(t,"1")};return jo(Mi,{children:jo(Yu.Provider,{value:{hidePopup:a},children:jo(Gu,{children:!r&&e})})})}import{motion as Zu}from"framer-motion";import{jsx as Ai}from"react/jsx-runtime";function F6({value:e=0,max:t=100,className:r}){return Ai("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Ai(Zu.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 zi}from"class-variance-authority";import{LayoutGroup as qu,motion as Xu}from"framer-motion";import Ju from"next/link";import{useId as Qu}from"react";import{jsx as Xt,jsxs as Oi}from"react/jsx-runtime";var ep=zi("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"}}),tp=zi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function X6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Qu();return Xt("div",{className:i("flex text-sm",a),children:Xt(qu,{id:n,children:t.map(({id:c,label:s,href:m,target:d})=>{let l=c===r;return Oi(m?Ju:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Oi("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(ep({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[s,d==="_blank"&&Xt(ya,{className:"size-2.5"})]}),l&&Xt(Xu.div,{layoutId:"indicator",transition:{duration:.1},className:tp({variant:e}),children:Xt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Ko,jsxs as Vi}from"react/jsx-runtime";var rp=[{icon:Xa,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ia,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ua,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Za,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:$a,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function e5(){return Vi("div",{className:"p-3",children:[Ko("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Ko("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:rp.map(({text:e,icon:t,href:r})=>Vi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Ko(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Hi,jsxs as op}from"react/jsx-runtime";function o5({className:e}){return op("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),Hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{no as AUTOPLAY_DEFAULT_DELAY,Pb as Accordion,Gi as AccordionContent,$i as AccordionItem,Ui as AccordionTrigger,e5 as AdvancedLinkFeaturesTooltip,kp as Africa,zp as Airtm,Zi as Alert,Xi as AlertDescription,qi as AlertTitle,Mp as Amazon,$p as AndroidLogo,pe as AnimatedSizeContainer,mp as Anthropic,Up as AppleLogo,Gp as ArrowBoldUp,jp as ArrowRight,Kp as ArrowTrendUp,Yp as ArrowTurnLeft,Zp as ArrowTurnRight2,ya as ArrowUpRight,ap as ArrowUpRight2,qp as ArrowsOppositeDirectionX,Xp as ArrowsOppositeDirectionY,Pp as Asia,Bo as AuthButton,Ib as Avatar,HN as Background,gr as Badge,Jp as BadgeCheck,Qp as BadgeCheck2Fill,e1 as BadgeTooltip,e0 as Bell,t0 as Blog,Vt as BlurImage,r0 as Bolt,o0 as BoltFill,n0 as Book2,ir as Book2Fill,i0 as Book2Small,a0 as BookOpen,s0 as Books2,l0 as BoxArchive,c0 as BracketsCurly,Na as BriefcaseFill,d0 as Brush,m0 as BulletList,wa as BulletListFill,te as Button,t1 as ButtonTooltip,di as COMPARE_PAGES,u0 as Calculator,Cn as Calendar,b0 as Calendar6,f0 as CalendarDays,p0 as CalendarIcon,g0 as CalendarRefresh,yp as CardAmex,Np as CardDiscover,P1 as CardList,wp as CardMastercard,ov as CardSelector,Cp as CardVisa,h0 as Cards,v0 as CaretUpFill,wl as Carousel,Cl as CarouselContent,kl as CarouselItem,Nv as CarouselNavBar,Sl as CarouselNext,Pl as CarouselPrevious,Dv as CarouselThumbnail,Mv as CarouselThumbnails,Vp as CashApp,x0 as ChartActivity2,y0 as ChartArea2,N0 as ChartLine,Dp as ChatGPT,Ca as Check,sr as Check2,gt as Checkbox,ka as CheckboxCheckedFill,Pa as CheckboxUnchecked,w0 as ChevronLeft,C0 as ChevronRight,Sa as CircleCheck,Ra as CircleCheckFill,k0 as CircleDollar,P0 as CircleDotted,Ta as CircleHalfDottedCheck,La as CircleHalfDottedClock,Ma as CircleInfo,S0 as CirclePercentage,R0 as CirclePlay,T0 as CirclePlayFill,L0 as CircleQuestion,M0 as CircleUser,Xr as CircleWarning,D0 as CircleXmark,E0 as Circles,I0 as Circles3,Mi as ClientOnly,Da as CloudUpload,A0 as Code,O0 as ColorPalette2,ox as Combobox,o5 as CompositeLogo,z0 as ConnectedDots,H0 as ConnectedDots4,V0 as ConnectedDotsFill,_0 as Connections3,la as Copy,a6 as CopyButton,c6 as CopyText,F0 as CreditCard,W0 as Crosshairs3,B0 as Crown,np as CrownSmall,$0 as Cube,U0 as CubeSettings,G0 as CubeSettingsFill,j0 as CurrencyDollar,Ea as CursorRays,K0 as DatabaseKey,co as DatePickerContext,Wx as DateRangePicker,Y0 as Desktop,Z0 as DiamondTurnRight,lr as DiamondTurnRightFill,q0 as Directions,X0 as Discount,J0 as Dots,Zx as DotsPattern,Q0 as Download,lt as DubAnalyticsIcon,tr as DubApiIcon,ip as DubCraftedShield,ct as DubLinksIcon,dt as DubPartnersIcon,qr as DubProductIcon,Ln as DubStatusBadge,ef as Duplicate,ut as DynamicTooltipWrapper,Ia as Earth,tf as EarthPosition,J4 as EditColumnsButton,o2 as EmptyState,rf as Envelope,of as EnvelopeAlert,af as EnvelopeArrowRight,Aa as EnvelopeFill,Sp as Europe,ca as ExpandingArrow,Oa as Eye,za as EyeSlash,Br as FEATURES_LIST,nf as FaceSmile,up as Facebook,Va as FeatherFill,Ep as Figma,sf as FileContent,f2 as FileUpload,lf as FileZip2,_2 as Filter,df as Filter2,cf as FilterBars,uf as Flag2,Ha as Flag6,mf as FlagWavy,pf as Flask,ff as FlaskSmall,gf as Folder,yf as Folder5,bf as FolderBookmark,hf as FolderLock,vf as FolderPlus,xf as FolderShield,jw as Footer,j2 as Form,Nf as GamingConsole,wf as Gauge6,_a as Gear,Cf as Gear2,kf as Gear3,Pf as Gem,Fa as Gift,Sf as GiftFill,Ip as GitHubEnhanced,rr as Github,Rf as Globe,Ba as Globe2,Wa as GlobePointer,Tf as GlobeSearch,ga as Go,pp as Google,Ap as GoogleEnhanced,Lf as GreekTemple,Je as Grid,Mf as GridIcon,Df as GridLayoutRows,Ef as GridPlus,If as GripDotsVertical,Af as Headset,Of as Heart,zf as HeartFill,Vf as HexadecagonStar,Hf as History,_f as Hyperlink,sp as IOSAppStore,m6 as IconMenu,Ff as Icosahedron,$a as Incognito,Wf as InfinityIcon,Jb as InfoTooltip,p6 as InlineSnippet,ed as Input,Bf as InputField,$f as InputPassword,Ua as InputPasswordPointer,Ga as InputSearch,wy as InputSelect,fp as Instagram,Uf as InvoiceDollar,Gf as Key,nn as KeyboardShortcutContext,dh as KeyboardShortcutProvider,mi as LEGAL_PAGES,Nd as Label,jf as LayoutSidebar,Kf as License,cr as LifeRing,Yf as LinesY,qf as Link4,Zf as LinkBroken,v6 as LinkLogo,T6 as LinkPreview,L6 as LinkPreviewPlaceholder,or as LinkedIn,Xb as LinkifyTooltipContent,St as LoadingCircle,dp as LoadingDots,Pe as LoadingSpinner,Xf as LocationPin,Jf as Lock,Qf as LockFill,Ft as Logo,da as Magic,eg as Magnifier,tg as MapPosition,lp as MarkdownIcon,rg as MarketingTarget,cp as MatrixLines,$r as MaxWidthWrapper,og as Menu3,Oy as MenuItem,ag as MessageSmile,dr as MicrophoneFill,Gy as MiniAreaChart,mr as Minus,ng as MobilePhone,Xy as Modal,ig as MoneyBill,sg as MoneyBill2,lg as MoneyBills2,cg as Msgs,ew as Nav,_o as NavContext,gw as NavMobile,Ur as NavWordmark,Rp as NorthAmerica,dg as Note,vg as NucleoPhoto,a4 as NumberStepper,Qb as NumberTooltip,Tp as Oceania,mg as OfficeBuilding,gp as OpenAI,xb as PLAN_FEATURE_ICONS,ja as Page2,s4 as PaginationControls,ug as Paintbrush,pg as Palette2,fg as PaperPlane,Hp as Payoneer,_p as Paypal,bg as Pen2,gg as PenWriting,hg as PercentageArrowDown,ma as Photo,ba as Php,xg as Plug2,mt as Plus,yg as Plus2,xe as Popover,z6 as Popup,Yu as PopupContext,Ng as Post,bp as ProductHunt,F6 as ProgressBar,d4 as ProgressCircle,wg as Pyramid,ha as Python,Cg as QRCode,Wt as RESOURCES,Wd as RadioGroup,Bd as RadioGroupItem,kg as Receipt2,Ka as ReferredVia,Pg as Refresh2,Sg as Robot,va as Ruby,Ho as SDKS,GN as SOCIAL_LINKS,ci as SOLUTIONS,Ya as SatelliteDish,Rg as ScanText,Tg as Scribble,v4 as Sheet,Lg as ShieldAlert,Mg as ShieldCheck,Dg as ShieldKeyhole,Eg as ShieldSlash,Ig as ShieldUser,w4 as ShimmerDots,Ag as Shuffle,qb as SimpleTooltipContent,hp as Slack,P4 as Slider,Og as Sliders,L4 as SmartDateTimePicker,ua as SortOrder,Lp as SouthAmerica,zg as Sparkle3,Op as Spotify,Vg as SquareChart,Hg as SquareLayoutGrid5,_g as SquareLayoutGrid6,Fg as SquareUserSparkle2,Wg as SquareXmark,Bg as Stars2,z4 as StatusBadge,Fp as Stripe,Wp as StripeLink,pa as Success,U4 as Switch,Jg as TV,X6 as TabSelect,wN as Table,$g as TableIcon,Ug as TableRows2,Gg as Tablet,jg as Tag,Kg as Tags,fa as Tick,vp as TikTok,Za as Timer2,qa as Toggle2Fill,TN as ToggleGroup,Yg as Toggles,Ab as TokenAvatar,J as Tooltip,Zb as TooltipContent,Yb as TooltipProvider,Zg as Trash,qg as TriangleWarning,Xg as Trophy,ar as Twitter,xa as Typescript,zN as UTMBuilder,Mm as UTM_PARAMETERS,Qg as UiCard,xp as Unsplash,eb as User,tb as UserCheck,rb as UserCrown,ob as UserDelete,ab as UserFocus,nb as UserMinus,ib as UserPlus,sb as UserXmark,lb as Users,db as Users2,mb as Users6,Rt as UsersFill,cb as UsersSettings,Bp as Venmo,ub as Versions2,Xa as Views,pb as Watch,fb as Webhook,gb as Window,bb as WindowSearch,hb as WindowSettings,Ri as Wordmark,vb as Xmark,nr as YouTube,rs as badgeVariants,se as buttonVariants,es as getUserAvatarUrl,So as menuItemVariants,Fo as navItems,nm as statusBadgeVariants,ve as useCarousel,vn as useCarouselActiveIndex,M1 as useColumnVisibility,A1 as useCookies,ft as useCopyToClipboard,_1 as useCurrentAnchor,$1 as useCurrentSubdomain,K1 as useEnterSubmit,X1 as useInViewport,eh as useInputFocused,ah as useIntersectionObserver,Ie as useKeyboardShortcut,to as useLocalStorage,Y as useMediaQuery,gh as useOptimisticUpdate,Rh as usePagination,Mh as useRemoveGAParams,br as useResizeObserver,cn as useRouterStuff,un as useScroll,Ae as useScrollProgress,NN as useTable,ln as useTablePagination,Gh as useToastWithUndo};
53
+ </svg>`;function Ur({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=hu(),{theme:a}=xu(_o),[n,c]=yu(!1),s=vu(l=>{l.preventDefault(),c(!0)},[]),[,m]=ft();function d(l){Nu.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Di(Be.Root,{open:n,onOpenChange:c,children:[X(Be.Anchor,{asChild:!0,children:X("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?X(Mi,{className:r}):X(Ft,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),X(Be.Portal,{children:X(Be.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:l=>{l.stopPropagation(),c(!1)},children:Di("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:[X(jt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(wu),icon:X(Ft,{className:"h-4 w-4"})}),X(jt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Cu),icon:X(bu,{strokeWidth:2,className:"h-4 w-4"})}),X(jt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:X(pu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?X(jt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:X(fu,{strokeWidth:2,className:"h-4 w-4"})}):X(jt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:X(gu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function jt({className:e,...t}){return X(te,{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 U}from"react/jsx-runtime";var Tu=[{name:"Twitter",icon:ar,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:or,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:rr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:nr,href:"https://www.youtube.com/@dubdotco"}],Yt={product:[...Br.filter(({title:e})=>e!=="Dub Integrations").map(({id:e,title:t,href:r})=>({id:e,name:t,href:r})),{id:null,name:"Dub Enterprise",href:"/enterprise"}],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:"Integrations",href:"/integrations"},{name:"Pricing",href:"/pricing"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"}],company:[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"Careers",href:"/careers"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"},{name:"Privacy",href:"/privacy"}],compare:pi.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","FirstPromoter","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Zt="text-sm font-medium text-neutral-900",qt="flex flex-col mt-2.5 gap-3.5",it="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function t6({staticDomain:e,className:t}){let{domain:r="dub.co"}=Su();e&&(r=e);let[o,a]=Ru(!1);return I($r,{className:i("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:U("footer",{children:[U("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[U("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:U($e,{href:F("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[U("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),I(Ur,{className:"h-8 text-neutral-800"})]})}),I("div",{className:"flex items-center gap-3",children:Tu.map(({name:n,icon:c,href:s})=>U("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:n}),I(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),U("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[U("div",{className:"md:grid md:grid-cols-2",children:[U("div",{className:"grid gap-8",children:[U("div",{children:[I("h3",{className:Zt,children:"Product"}),I("ul",{role:"list",className:qt,children:Yt.product.map(n=>I("li",{children:U($e,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[n.id&&I(qr,{product:n.id}),n.name]})},n.name))})]}),U("div",{children:[I("h3",{className:Zt,children:"Solutions"}),I("ul",{role:"list",className:qt,children:Yt.solutions.map(n=>I("li",{children:I($e,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:n.name})},n.name))})]})]}),U("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Resources"}),I("ul",{role:"list",className:qt,children:Yt.resources.map(n=>I("li",{children:U($e,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(it,"gap-1"),children:[n.name,n.target&&I(ja,{className:"size-3.5"})]})},n.name))})]})]}),U("div",{className:"md:grid md:grid-cols-2",children:[I("div",{className:"grid gap-8",children:U("div",{children:[I("h3",{className:Zt,children:"Company"}),U("ul",{role:"list",className:qt,children:[Yt.company.map(n=>I("li",{children:I($e,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(it,"gap-1"),children:n.name})},n.name)),I("li",{className:"-mt-1",children:I(xe,{content:I("div",{className:"flex w-screen flex-col gap-1 p-1.5 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[200px]",children:fi.map(n=>I($e,{href:F(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(So({variant:"default"}),it,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:U("button",{className:it,children:["Legal",I(ku,{className:"size-3.5"})]})})})]})]})}),U("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Compare"}),I("ul",{role:"list",className:qt,children:Yt.compare.map(n=>I("li",{children:U($e,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[I(qr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),U("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(En,{}),I($e,{href:F("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(Pu,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),U("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Lu,motion as Mu}from"framer-motion";import{useEffect as Du,useState as Eu}from"react";import{jsx as Ei}from"react/jsx-runtime";var Ii=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=Eu(!1);Du(()=>{n(!0)},[]);let c=r?Mu.div:"div";return Ei(Lu,{children:a?Ei(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Iu}from"class-variance-authority";import{toast as Au}from"sonner";import{jsx as Uo,jsxs as zu}from"react/jsx-runtime";var Ou=Iu("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 p6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ft(),s=o||la;return zu("button",{onClick:m=>{m.stopPropagation(),Au.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Ou({variant:e}),r),type:"button",children:[Uo("span",{className:"sr-only",children:"Copy"}),n?Uo(fa,{className:"h-3.5 w-3.5"}):Uo(s,{className:"h-3.5 w-3.5"})]})}import{toast as Vu}from"sonner";import{jsx as Hu}from"react/jsx-runtime";function v6({value:e,children:t,className:r,successMessage:o}){let[a,n]=ft();return Hu("button",{onClick:c=>{c.stopPropagation(),Vu.promise(n(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 _u,jsxs as Fu}from"react/jsx-runtime";function y6({icon:e,text:t}){return Fu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,_u("p",{className:"truncate text-sm",children:t})]})}import{jsx as Wu}from"react/jsx-runtime";var w6=({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 Go}from"react/jsx-runtime";function R6({apexDomain:e,className:t,imageProps:r}){return e?Go(Vt,{src:`${ia}${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}):Go("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:Go(Ba,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ai}from"lucide-react";import{useSearchParams as Bu}from"next/navigation";import{useEffect as $u,useMemo as Uu,useRef as Gu}from"react";import Ku from"swr";import{useDebounce as ju}from"use-debounce";import{Fragment as Oi,jsx as j,jsxs as Ue}from"react/jsx-runtime";function V6({defaultUrl:e}){let t=Bu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=ju(ta(r),500),a=Uu(()=>na(o||""),[o]),{data:n,isValidating:c}=Ku(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,be,{revalidateOnFocus:!1}),{title:s,description:m,image:d}=n||{},l=Gu(null);$u(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Z();return Ue(Oi,{children:[!e&&Ue("div",{className:"relative flex items-center",children:[j(Ai,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:l,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"})]}),Ue("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&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(St,{})}),d?j("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Ue("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(ma,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Ue("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}):Ue("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 H6({defaultUrl:e}){return Ue(Oi,{children:[Ue("div",{className:"relative flex items-center",children:[j(Ai,{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(St,{})})})]})}import{AnimatePresence as Yu}from"framer-motion";import zi from"js-cookie";import{createContext as Zu,useState as qu}from"react";import{jsx as Ko}from"react/jsx-runtime";var Xu=Zu({hidePopup:()=>{}});function G6({children:e,hiddenCookieId:t}){let[r,o]=qu(zi.get(t)==="1"),a=()=>{o(!0),zi.set(t,"1")};return Ko(Ii,{children:Ko(Xu.Provider,{value:{hidePopup:a},children:Ko(Yu,{children:!r&&e})})})}import{motion as Ju}from"framer-motion";import{jsx as Vi}from"react/jsx-runtime";function Z6({value:e=0,max:t=100,className:r}){return Vi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Vi(Ju.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 _i}from"class-variance-authority";import{LayoutGroup as Qu,motion as ep}from"framer-motion";import tp from"next/link";import{useId as rp}from"react";import{jsx as Xt,jsxs as Hi}from"react/jsx-runtime";var op=_i("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"}}),ap=_i("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function i5({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=rp();return Xt("div",{className:i("flex text-sm",a),children:Xt(Qu,{id:n,children:t.map(({id:c,label:s,href:m,target:d})=>{let l=c===r;return Hi(m?tp:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Hi("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(op({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[s,d==="_blank"&&Xt(ya,{className:"size-2.5"})]}),l&&Xt(ep.div,{layoutId:"indicator",transition:{duration:.1},className:ap({variant:e}),children:Xt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as jo,jsxs as Fi}from"react/jsx-runtime";var np=[{icon:Xa,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ia,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ua,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Za,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:$a,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function c5(){return Fi("div",{className:"p-3",children:[jo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),jo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:np.map(({text:e,icon:t,href:r})=>Fi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[jo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Wi,jsxs as ip}from"react/jsx-runtime";function u5({className:e}){return ip("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:[Wi("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"}),Wi("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{no as AUTOPLAY_DEFAULT_DELAY,Ib as Accordion,Yi as AccordionContent,Ki as AccordionItem,ji as AccordionTrigger,c5 as AdvancedLinkFeaturesTooltip,Rp as Africa,_p as Airtm,Ji as Alert,es as AlertDescription,Qi as AlertTitle,Ip as Amazon,Kp as AndroidLogo,pe as AnimatedSizeContainer,fp as Anthropic,jp as Apple,Yp as AppleLogo,Zp as ArrowBoldUp,qp as ArrowRight,Xp as ArrowTrendUp,Jp as ArrowTurnLeft,Qp as ArrowTurnRight2,ya as ArrowUpRight,sp as ArrowUpRight2,e0 as ArrowsOppositeDirectionX,t0 as ArrowsOppositeDirectionY,Tp as Asia,Bo as AuthButton,Wb as Avatar,jN as Background,gr as Badge,r0 as BadgeCheck,o0 as BadgeCheck2Fill,l1 as BadgeTooltip,a0 as Bell,n0 as Blog,Vt as BlurImage,i0 as Bolt,s0 as BoltFill,c0 as Book2,ir as Book2Fill,d0 as Book2Small,l0 as BookOpen,m0 as Books2,u0 as BoxArchive,p0 as BracketsCurly,Na as BriefcaseFill,f0 as Brush,g0 as BulletList,wa as BulletListFill,te as Button,c1 as ButtonTooltip,pi as COMPARE_PAGES,b0 as Calculator,Cn as Calendar,y0 as Calendar6,v0 as CalendarDays,h0 as CalendarIcon,x0 as CalendarRefresh,Cp as CardAmex,kp as CardDiscover,I1 as CardList,Pp as CardMastercard,mv as CardSelector,Sp as CardVisa,N0 as Cards,w0 as CaretUpFill,Pl as Carousel,Sl as CarouselContent,Rl as CarouselItem,Lv as CarouselNavBar,Ll as CarouselNext,Tl as CarouselPrevious,_v as CarouselThumbnail,Hv as CarouselThumbnails,Fp as CashApp,C0 as ChartActivity2,k0 as ChartArea2,P0 as ChartLine,Ap as ChatGPT,Ca as Check,sr as Check2,gt as Checkbox,ka as CheckboxCheckedFill,Pa as CheckboxUnchecked,S0 as ChevronLeft,R0 as ChevronRight,Sa as CircleCheck,Ra as CircleCheckFill,T0 as CircleDollar,L0 as CircleDotted,Ta as CircleHalfDottedCheck,La as CircleHalfDottedClock,Ma as CircleInfo,M0 as CirclePercentage,D0 as CirclePlay,E0 as CirclePlayFill,I0 as CircleQuestion,A0 as CircleUser,Xr as CircleWarning,O0 as CircleXmark,z0 as Circles,V0 as Circles3,Ii as ClientOnly,H0 as Cloud,Da as CloudUpload,_0 as Code,F0 as ColorPalette2,mx as Combobox,u5 as CompositeLogo,W0 as ConnectedDots,$0 as ConnectedDots4,B0 as ConnectedDotsFill,U0 as Connections3,la as Copy,p6 as CopyButton,v6 as CopyText,G0 as CreditCard,K0 as Crosshairs3,j0 as Crown,lp as CrownSmall,Y0 as Cube,Z0 as CubeSettings,q0 as CubeSettingsFill,X0 as CurrencyDollar,Ea as CursorRays,J0 as DatabaseKey,co as DatePickerContext,qx as DateRangePicker,Q0 as Desktop,ef as DiamondTurnRight,lr as DiamondTurnRightFill,tf as Directions,rf as Discount,of as Dots,a2 as DotsPattern,af as Download,lt as DubAnalyticsIcon,tr as DubApiIcon,cp as DubCraftedShield,ct as DubLinksIcon,dt as DubPartnersIcon,qr as DubProductIcon,En as DubStatusBadge,nf as Duplicate,ut as DynamicTooltipWrapper,Ia as Earth,sf as EarthPosition,sN as EditColumnsButton,u2 as EmptyState,lf as Envelope,cf as EnvelopeAlert,df as EnvelopeArrowRight,Aa as EnvelopeFill,Lp as Europe,ca as ExpandingArrow,Oa as Eye,za as EyeSlash,Br as FEATURES_LIST,mf as FaceSmile,gp as Facebook,Va as FeatherFill,Op as Figma,uf as FileContent,C2 as FileUpload,pf as FileZip2,Y2 as Filter,gf as Filter2,ff as FilterBars,hf as Flag2,Ha as Flag6,bf as FlagWavy,vf as Flask,xf as FlaskSmall,yf as Folder,Pf as Folder5,Nf as FolderBookmark,wf as FolderLock,Cf as FolderPlus,kf as FolderShield,t6 as Footer,ty as Form,Sf as GamingConsole,Rf as Gauge6,_a as Gear,Tf as Gear2,Lf as Gear3,Mf as Gem,Fa as Gift,Df as GiftFill,zp as GitHubEnhanced,rr as Github,Ef as Globe,Ba as Globe2,Wa as GlobePointer,If as GlobeSearch,ga as Go,bp as Google,Vp as GoogleEnhanced,Af as GreekTemple,Je as Grid,Of as GridIcon,zf as GridLayoutRows,Vf as GridPlus,Hf as GripDotsVertical,_f as Headset,Ff as Heart,Wf as HeartFill,Bf as HexadecagonStar,$f as History,Uf as Hyperlink,dp as IOSAppStore,y6 as IconMenu,Gf as Icosahedron,$a as Incognito,Kf as InfinityIcon,i1 as InfoTooltip,w6 as InlineSnippet,od as Input,jf as InputField,Yf as InputPassword,Ua as InputPasswordPointer,Ga as InputSearch,Dy as InputSelect,hp as Instagram,Zf as InvoiceDollar,qf as Key,nn as KeyboardShortcutContext,vh as KeyboardShortcutProvider,fi as LEGAL_PAGES,kd as Label,Xf as LayoutSidebar,Jf as License,Qf as LifeRing,cr as LifeRingFill,eg as LinesY,rg as Link4,tg as LinkBroken,R6 as LinkLogo,V6 as LinkPreview,H6 as LinkPreviewPlaceholder,or as LinkedIn,n1 as LinkifyTooltipContent,St as LoadingCircle,pp as LoadingDots,Pe as LoadingSpinner,og as LocationPin,ag as Lock,ng as LockFill,Ft as Logo,da as Magic,ig as Magnifier,sg as MapPosition,mp as MarkdownIcon,lg as MarketingTarget,up as MatrixLines,$r as MaxWidthWrapper,cg as Menu3,Uy as MenuItem,dg as MessageSmile,dr as MicrophoneFill,e4 as MiniAreaChart,mr as Minus,mg as MobilePhone,i4 as Modal,ug as MoneyBill,pg as MoneyBill2,fg as MoneyBills2,gg as Msg,bg as Msgs,hg as MsgsDotted,cw as Nav,_o as NavContext,kw as NavMobile,Ur as NavWordmark,Mp as NorthAmerica,vg as Note,Sg as NucleoPhoto,p4 as NumberStepper,s1 as NumberTooltip,Dp as Oceania,xg as OfficeBuilding,vp as OpenAI,Rb as PLAN_FEATURE_ICONS,Ka as Page2,b4 as PaginationControls,yg as Paintbrush,Ng as Palette2,wg as PaperPlane,Wp as Payoneer,Bp as Paypal,kg as Pen2,Cg as PenWriting,Pg as PercentageArrowDown,ma as Photo,ba as Php,Rg as Plug2,mt as Plus,Tg as Plus2,xe as Popover,G6 as Popup,Xu as PopupContext,Lg as Post,xp as ProductHunt,Z6 as ProgressBar,x4 as ProgressCircle,Mg as Pyramid,ha as Python,Dg as QRCode,Wt as RESOURCES,Ud as RadioGroup,Gd as RadioGroupItem,Eg as Receipt2,ja as ReferredVia,Ig as Refresh2,Ag as Robot,va as Ruby,Ho as SDKS,e3 as SOCIAL_LINKS,ui as SOLUTIONS,Ya as SatelliteDish,Og as ScanText,zg as Scribble,R4 as Sheet,Vg as ShieldAlert,Hg as ShieldCheck,_g as ShieldKeyhole,Fg as ShieldSlash,Wg as ShieldUser,D4 as ShimmerDots,Bg as Shuffle,a1 as SimpleTooltipContent,yp as Slack,A4 as Slider,$g as Sliders,H4 as SmartDateTimePicker,ua as SortOrder,Ep as SouthAmerica,Ug as Sparkle3,Hp as Spotify,Gg as SquareChart,Kg as SquareLayoutGrid5,jg as SquareLayoutGrid6,Yg as SquareUserSparkle2,Zg as SquareXmark,qg as Stars2,G4 as StatusBadge,$p as Stripe,Up as StripeLink,pa as Success,Q4 as Switch,ib as TV,i5 as TabSelect,DN as Table,Xg as TableIcon,Jg as TableRows2,Qg as Tablet,eb as Tag,tb as Tags,fa as Tick,Np as TikTok,Za as Timer2,qa as Toggle2Fill,VN as ToggleGroup,rb as Toggles,Bb as TokenAvatar,Q as Tooltip,o1 as TooltipContent,r1 as TooltipProvider,ob as Trash,ab as TriangleWarning,nb as Trophy,ar as Twitter,xa as Typescript,GN as UTMBuilder,Im as UTM_PARAMETERS,sb as UiCard,wp as Unsplash,lb as User,cb as UserCheck,db as UserCrown,mb as UserDelete,ub as UserFocus,pb as UserMinus,fb as UserPlus,gb as UserXmark,bb as Users,vb as Users2,xb as Users6,Rt as UsersFill,hb as UsersSettings,Gp as Venmo,yb as Versions2,Xa as Views,Nb as Watch,wb as Webhook,Cb as Window,kb as WindowSearch,Pb as WindowSettings,Mi as Wordmark,Sb as Xmark,nr as YouTube,ns as badgeVariants,se as buttonVariants,os as getUserAvatarUrl,So as menuItemVariants,Fo as navItems,lm as statusBadgeVariants,ve as useCarousel,vn as useCarouselActiveIndex,H1 as useColumnVisibility,B1 as useCookies,ft as useCopyToClipboard,j1 as useCurrentAnchor,X1 as useCurrentSubdomain,th as useEnterSubmit,nh as useInViewport,lh as useInputFocused,uh as useIntersectionObserver,Ie as useKeyboardShortcut,to as useLocalStorage,Z as useMediaQuery,Ch as useOptimisticUpdate,Oh as usePagination,Hh as useRemoveGAParams,br as useResizeObserver,cn as useRouterStuff,un as useScroll,Ae as useScrollProgress,MN as useTable,ln as useTablePagination,Qh as useToastWithUndo};