@dub/ui 0.2.66 → 0.2.67

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