@dub/ui 0.2.21 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/index.d.ts +15 -3
- package/dist/charts/index.mjs +1 -1
- package/dist/chunk-24SPS4WN.mjs +2 -0
- package/dist/chunk-2YBLJVB6.mjs +2 -0
- package/dist/chunk-46WLFPMH.mjs +2 -0
- package/dist/chunk-4AV6FAIE.mjs +2 -0
- package/dist/chunk-4OT2N5UX.mjs +2 -0
- package/dist/chunk-4VVS47D3.mjs +2 -0
- package/dist/chunk-53MJBDSX.mjs +2 -0
- package/dist/chunk-53TMPLIG.mjs +2 -0
- package/dist/chunk-7UPAYZHN.mjs +2 -0
- package/dist/chunk-ABSIL3FB.mjs +2 -0
- package/dist/chunk-B6X6Y4Z4.mjs +2 -0
- package/dist/chunk-BBZCNOG7.mjs +2 -0
- package/dist/chunk-BEH4ZOED.mjs +2 -0
- package/dist/chunk-BFY2URQ5.mjs +2 -0
- package/dist/chunk-CZJFGG7G.mjs +2 -0
- package/dist/chunk-E3J362K2.mjs +2 -0
- package/dist/chunk-F6CU2GGS.mjs +2 -0
- package/dist/chunk-HMBXLDSH.mjs +2 -0
- package/dist/chunk-I5JX5PNF.mjs +2 -0
- package/dist/chunk-IP6T6ZUX.mjs +2 -0
- package/dist/chunk-JKYVYQGC.mjs +2 -0
- package/dist/chunk-K3BXLH2D.mjs +2 -0
- package/dist/chunk-K5IGEUVI.mjs +2 -0
- package/dist/chunk-KR7TQ55L.mjs +2 -0
- package/dist/chunk-KVI6KYHD.mjs +2 -0
- package/dist/chunk-LQRBYEWQ.mjs +2 -0
- package/dist/chunk-OWNJTMNY.mjs +2 -0
- package/dist/chunk-OZCAG6AS.mjs +2 -0
- package/dist/chunk-QVISZFX2.mjs +2 -0
- package/dist/chunk-RAU6FFKC.mjs +2 -0
- package/dist/chunk-RDQDJERJ.mjs +2 -0
- package/dist/chunk-RK5PFGFA.mjs +2 -0
- package/dist/chunk-S3MOHBAU.mjs +2 -0
- package/dist/chunk-S7BVDLYG.mjs +2 -0
- package/dist/chunk-TKYWI6GE.mjs +2 -0
- package/dist/chunk-TXOE2JB5.mjs +2 -0
- package/dist/chunk-TYKFSFAV.mjs +2 -0
- package/dist/chunk-UMVELMNH.mjs +2 -0
- package/dist/chunk-VA5FYSBE.mjs +2 -0
- package/dist/chunk-VJNSFBOV.mjs +2 -0
- package/dist/chunk-VZGC3L4E.mjs +2 -0
- package/dist/chunk-W2FRZO5F.mjs +2 -0
- package/dist/chunk-WYLDJVPX.mjs +2 -0
- package/dist/chunk-XFVW2VLE.mjs +2 -0
- package/dist/chunk-YM5B3WSN.mjs +2 -0
- package/dist/chunk-ZC672SSR.mjs +2 -0
- package/dist/chunk-ZH4HNUUF.mjs +2 -0
- package/dist/chunk-ZVSAO7SD.mjs +2 -0
- package/dist/icons/index.d.ts +15 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +35 -15
- package/dist/index.mjs +6 -6
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as Jm,$a as B0,$b as Su,$c as Cp,A as Em,Aa as _o,Ab as lu,Ac as qu,B as Am,Ba as Ho,Bb as cu,Bc as na,C as Lo,Ca as Vo,Cb as du,Cc as Qu,D as To,Da as Bo,Db as Zo,Dc as Xu,E as Eo,Ea as N0,Eb as mu,Ec as Ju,F as Ao,Fa as k0,Fb as uu,Fc as ep,G as Do,Ga as P0,Gb as qo,Gc as tp,H as Dm,Ha as Wo,Hb as pu,Hc as rp,I as Im,Ia as Fo,Ib as Qo,Ic as op,J as zm,Ja as Uo,Jb as fu,Jc as ap,K as Om,Ka as S0,Kb as gu,Kc as ip,L as _m,La as M0,Lb as hu,Lc as np,M as Hm,Ma as R0,Mb as vu,Mc as sp,N as Vm,Na as Cr,Nb as bu,Nc as lp,O as Bm,Oa as L0,Ob as Xo,Oc as cp,P as Wm,Pa as T0,Pb as Jo,Pc as dp,Q as Fm,Qa as E0,Qb as ea,Qc as mp,R as Um,Ra as Go,Rb as ta,Rc as up,S as Gm,Sa as A0,Sb as xu,Sc as pp,T as $m,Ta as D0,Tb as yu,Tc as fp,U as Km,Ua as I0,Ub as wu,Uc as gp,V as jm,Va as Ot,Vb as ra,Vc as hp,W as Ym,Wa as z0,Wb as Cu,Wc as vp,X as Zm,Xa as O0,Xb as Nu,Xc as bp,Y as qm,Ya as _0,Yb as ku,Yc as xp,Z as Qm,Za as H0,Zb as Pu,Zc as yp,_ as Xm,_a as V0,_b as oa,_c as wp,a as yo,aa as e0,ab as W0,ac as Mu,ad as Np,b as ym,ba as t0,bb as _t,bc as Ru,bd as kp,c as wm,ca as r0,cb as F0,cc as Lu,cd as Pp,d as wo,da as o0,db as U0,dc as Tu,dd as Sp,e as Co,ea as a0,eb as G0,ec as Eu,ed as Mp,f as Cm,fa as i0,fb as $0,fc as Au,fd as Rp,g as No,ga as n0,gb as K0,gc as Du,gd as Lp,h as ko,ha as s0,hb as j0,hc as Iu,hd as Tp,i as Po,ia as l0,ib as Y0,ic as zu,id as Ep,j as So,ja as c0,jb as Z0,jc as Ou,k as mt,ka as d0,kb as q0,kc as _u,l as Nm,la as Io,lb as Q0,lc as aa,m as ye,ma as m0,mb as $o,mc as Hu,n as km,na as u0,nb as Ko,nc as Vu,o as At,oa as p0,ob as jo,oc as Bu,p as Pm,pa as f0,pb as X0,pc as Wu,q as Dt,qa as zo,qb as J0,qc as Fu,r as Sm,ra as g0,rb as eu,rc as Uu,s as Mo,sa as h0,sb as tu,sc as Gu,t as Ro,ta as v0,tb as ru,tc as Ht,u as Mm,ua as b0,ub as Yo,uc as $u,v as It,va as x0,vb as ou,vc as Ku,w as Rm,wa as y0,wb as au,wc as ju,x as zt,xa as w0,xb as iu,xc as Yu,y as Lm,ya as C0,yb as nu,yc as ia,z as Tm,za as Oo,zb as su,zc as Zu}from"./chunk-2P6AY23V.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as uo,b as I,c as Rt,d as Lt,e as po,f as qe,g as fo,h as go,i as Tt,j as ho,k as vo,l as Et,m as bo,n as me,o as n,p as xo}from"./chunk-34EW67AY.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as Gi}from"lucide-react";import*as Bt from"react";import{jsx as Vt,jsxs as Yi}from"react/jsx-runtime";var _p=ae.Root,$i=Bt.forwardRef(({className:e,...t},r)=>Vt(ae.Item,{ref:r,className:n("border-b border-b-slate-200 py-3 last:border-none",e),...t}));$i.displayName="AccordionItem";var Ki=Bt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let s=r==="chevron"?Gi:Ht;return Vt(ae.Header,{className:"flex",children:Yi(ae.Trigger,{ref:a,className:n("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,Vt(s,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ki.displayName=ae.Trigger.displayName;var ji=Bt.forwardRef(({className:e,children:t,...r},o)=>Vt(ae.Content,{ref:o,className:n("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-gray-500 transition-all sm:text-base",e),...r,children:t}));ji.displayName=ae.Content.displayName;import{cva as Zi}from"class-variance-authority";import*as Wt from"react";import{jsx as Nr}from"react/jsx-runtime";var qi=Zi("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"}}),Qi=Wt.forwardRef(({className:e,variant:t,...r},o)=>Nr("div",{ref:o,role:"alert",className:n(qi({variant:t}),e),...r}));Qi.displayName="Alert";var Xi=Wt.forwardRef(({className:e,...t},r)=>Nr("h5",{ref:r,className:n("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Xi.displayName="AlertTitle";var Ji=Wt.forwardRef(({className:e,...t},r)=>Nr("div",{ref:r,className:n("text-sm [&_p]:leading-relaxed",e),...t}));Ji.displayName="AlertDescription";import{sha256 as en}from"js-sha256";import{useState as tn}from"react";import{jsx as kr}from"react/jsx-runtime";function rn(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${en(e.email)}?d=${encodeURIComponent(r)}`:t}function $p({user:e={},className:t}){if(!e)return kr("div",{className:n("h-10 w-10 animate-pulse rounded-full border border-gray-300 bg-gray-100",t)});let[r,o]=tn(rn(e));return kr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:n("h-10 w-10 rounded-full border border-gray-300",t),draggable:!1,onError:()=>{o(`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function Kp({id:e,className:t}){return kr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:n("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as on}from"class-variance-authority";import{jsx as nn}from"react/jsx-runtime";var an=on("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-gray-400 text-gray-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-gray-200 bg-gray-100 text-gray-800",neutral:"border-gray-400 text-gray-500",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 Ft({className:e,variant:t,...r}){return nn("span",{className:n(an({variant:t}),e),...r})}import{cva as mn}from"class-variance-authority";import{forwardRef as un}from"react";import*as ue from"@radix-ui/react-tooltip";import sn from"linkify-react";import{HelpCircle as ln}from"lucide-react";import cn from"next/link";import{useState as dn}from"react";import{jsx as $,jsxs as Qe}from"react/jsx-runtime";function sf({children:e}){return $(ue.Provider,{delayDuration:150,children:e})}function ee({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:s=0,...c}){let[l,d]=dn(!1);return Qe(ue.Root,{open:l,onOpenChange:d,delayDuration:s,disableHoverableContent:a,children:[$(ue.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),$(ue.Portal,{children:$(ue.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?$("span",{className:n("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-gray-700",r),children:t}):typeof t=="function"?t({setOpen:d}):t})})]})}function lf({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:[$("p",{className:"text-sm text-gray-700",children:e}),t&&(r?$(cn,{href:r,...o?{target:o}:{},className:n(pe({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?$(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function cf({title:e,cta:t,href:r}){return Qe("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[e," ",$("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:t})]})}function df({children:e}){return $("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-gray-700",children:$(sn,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-gray-400 hover:text-gray-700"},children:e})})}function mf(e){return $(ee,{...e,children:$(ln,{className:"h-4 w-4 text-gray-500"})})}function uf({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:$(ee,{content:Qe("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[Qe("p",{className:"text-sm font-semibold text-gray-700",children:[r,Rt(e||0,{full:!0})," ",t]}),a&&Qe("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",vo(a,{withAgo:!0})]})]}),children:o})}function pf({children:e,content:t,...r}){return $(ee,{content:t,...r,children:$("div",{className:"flex cursor-pointer items-center",children:$(Ft,{variant:"gray",className:"border-gray-300 transition-all hover:bg-gray-200",children:e})})})}function ff({children:e,tooltipProps:t,...r}){return $(ee,{...t,children:$("button",{type:"button",...r,className:n("flex h-6 w-6 items-center justify-center rounded-md text-gray-500 transition-colors duration-75 hover:bg-gray-100 active:bg-gray-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}import{jsx as Xe,jsxs as sa}from"react/jsx-runtime";var pe=mn("transition-all",{variants:{variant:{primary:"border-black bg-black text-white hover:bg-gray-800 hover:ring-4 hover:ring-gray-200",secondary:n("border-gray-200 bg-white text-gray-900 hover:bg-gray-50 focus-visible:border-gray-500 outline-none","data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"),outline:"border-transparent text-neutral-600 hover:bg-neutral-100",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=un(({text:e,variant:t="primary",className:r,textWrapperClassName:o,loading:a,icon:s,shortcut:c,disabledTooltip:l,right:d,...m},i)=>l?Xe(ee,{content:l,children:sa("div",{className:n("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[s,e&&Xe("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Xe("kbd",{className:n("hidden rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-400 md:inline-block",{"bg-gray-100":t==null?void 0:t.endsWith("outline")}),children:c})]})}):sa("button",{ref:i,type:m.onClick?"button":"submit",className:n("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",m.disabled||a?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400 outline-none":pe({variant:t}),r),disabled:m.disabled||a,...m,children:[a?Xe(ye,{}):s||null,e&&Xe("div",{className:n("min-w-0 truncate",c&&"flex-1 text-left",o),children:e}),c&&Xe("kbd",{className:n("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-gray-700 text-gray-400 group-hover:bg-gray-600 group-hover:text-gray-300":t==="primary","bg-gray-200 text-gray-400 group-hover:bg-gray-100 group-hover:text-gray-500":t==="secondary","bg-gray-100 text-gray-500 group-hover:bg-gray-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"}),children:c}),d]}));ie.displayName="Button";import{cva as pn}from"class-variance-authority";import{createContext as fn}from"react";import{jsx as la}from"react/jsx-runtime";var gn=pn("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"}}}),ut=fn({variant:"loose"});function ca({variant:e="loose",loading:t=!1,className:r,children:o}){return la("ul",{className:n(gn({variant:e,loading:t}),r),"data-variant":e,children:la(ut.Provider,{value:{variant:e},children:o})})}import{cva as hn}from"class-variance-authority";import{createContext as vn,useContext as bn,useEffect as xn,useRef as yn,useState as wn}from"react";import{jsx as Pr}from"react/jsx-runtime";var Cn=hn("w-full group/card border-gray-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-gray-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Nn="w-full py-2.5 px-4",Sr=vn({hovered:!1});function da({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0}){let{variant:s}=bn(ut),c=yn(null),[l,d]=wn(!1);return xn(()=>{if(!l||!c.current)return;let m=setInterval(()=>{var i;((i=c.current)==null?void 0:i.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(m)},[l]),Pr("li",{ref:c,className:n(Cn({variant:s}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:Pr("div",{className:n(Nn,t),onClick:o?m=>{document.getElementById("modal-backdrop")||Et(m)||o()}:void 0,children:Pr(Sr.Provider,{value:{hovered:l},children:r})})})}var Hf=Object.assign(ca,{Card:Object.assign(da,{Context:Sr}),Context:ut});import kn from"embla-carousel-autoplay";import Pn from"embla-carousel-react";import{ArrowLeft as Sn,ArrowRight as Mn}from"lucide-react";import{createContext as Rn,forwardRef as ft,useCallback as pt,useContext as Ln,useEffect as Mr,useState as Rr}from"react";import{jsx as we,jsxs as pa}from"react/jsx-runtime";var Lr=2e3,ma=Rn(null);function fe(){let e=Ln(ma);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ua(){let{api:e}=fe(),[t,r]=Rr(0),o=pt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Mr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Tn=ft(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:s,children:c,...l},d)=>{let[m,i]=Pn({...t,axis:e==="horizontal"?"x":"y"},[...o?[kn(typeof o=="object"?o:{delay:Lr})]:[],...a||[]]),[p,f]=Rr(!1),[x,h]=Rr(!1),b=pt(M=>{!M||(f(M.canScrollPrev()),h(M.canScrollNext()))},[]),g=pt(()=>{i==null||i.scrollPrev()},[i]),N=pt(()=>{i==null||i.scrollNext()},[i]),S=pt(M=>{M.key==="ArrowLeft"?(M.preventDefault(),g()):M.key==="ArrowRight"&&(M.preventDefault(),N())},[g,N]);return Mr(()=>{!i||!r||r(i)},[i,r]),Mr(()=>{if(!!i)return b(i),i.on("reInit",b),i.on("select",b),()=>{i==null||i.off("select",b)}},[i,b]),we(ma.Provider,{value:{carouselRef:m,api:i,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:N,canScrollPrev:p,canScrollNext:x},children:we("div",{ref:d,onKeyDownCapture:S,className:n("relative",s),role:"region","aria-roledescription":"carousel",...l,children:c})})});Tn.displayName="Carousel";var En=ft(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=fe();return we("div",{ref:o,className:"overflow-hidden",children:we("div",{ref:r,className:n("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});En.displayName="CarouselContent";var An=ft(({className:e,...t},r)=>{let{orientation:o}=fe();return we("div",{ref:r,role:"group","aria-roledescription":"slide",className:n("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});An.displayName="CarouselItem";var Dn=ft(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:s}=fe();return pa("button",{ref:r,className:n("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!s,onClick:a,...t,children:[we(Sn,{className:"h-4 w-4"}),we("span",{className:"sr-only",children:"Previous slide"})]})});Dn.displayName="CarouselPrevious";var In=ft(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:s}=fe();return pa("button",{ref:r,className:n("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",pe({variant:"secondary",className:"p-2"}),e),disabled:!s,onClick:a,...t,children:[we(Mn,{className:"h-4 w-4"}),we("span",{className:"sr-only",children:"Next slide"})]})});In.displayName="CarouselNext";import{cva as zn}from"class-variance-authority";import{motion as On}from"framer-motion";import{ChevronLeft as _n,ChevronRight as Hn}from"lucide-react";import*as Me from"react";import{jsx as Be,jsxs as gt}from"react/jsx-runtime";var Vn=zn("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-gray-800/10 bg-white sm:bottom-6 "}}}),rg=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:s,api:c}=fe(),l=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[d,m]=Me.useState(0),[i,p]=Me.useState(!1),f=Me.useCallback(b=>{m((b==null?void 0:b.selectedScrollSnap())??0)},[]),x=Me.useCallback(b=>()=>{l&&l.isPlaying()&&l.stop(),b()},[l]);return Me.useEffect(()=>{!c||(f(c),p((l==null?void 0:l.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,l,f]),gt("div",{className:n(Vn({variant:e}),t),children:[e!=="simple"&>("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!s,onClick:x(o),children:[Be(_n,{className:"h-4 w-4"}),Be("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Be("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>gt("button",{onClick:x(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-gray-100 active:bg-gray-200 sm:p-1.5",children:[Be("div",{className:n("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===d?"bg-black":"bg-black/20",i&&g===d&&"w-6 bg-black/20"),children:i&&g===d&&Be(On.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((l==null?void 0:l.options.delay)??Lr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),gt("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&>("button",{className:"cursor-pointer rounded-full p-2 hover:bg-gray-50 active:bg-gray-100",disabled:!a,onClick:x(r),children:[Be(Hn,{className:"h-4 w-4"}),Be("span",{className:"sr-only",children:"Next slide"})]})]})};import Bn from"embla-carousel-react";import{forwardRef as Wn,useCallback as Fn,useEffect as Un}from"react";import{jsx as Ut}from"react/jsx-runtime";var mg=({className:e,...t})=>{let{api:r}=fe(),[o,a]=Bn({dragFree:!0}),s=Fn(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Un(()=>{if(!(!r||!a))return s(r),r.on("reInit",s),r.on("select",s),()=>{r==null||r.off("reInit",s),r==null||r.off("select",s)}},[r,a,s]),Ut("div",{className:"overflow-hidden",ref:o,children:Ut("div",{className:n("mx-4 flex gap-4",e),...t})})},ug=Wn(({index:e,className:t,...r},o)=>{let{api:a}=fe(),s=ua();return Ut("div",{ref:o,children:Ut("button",{type:"button",onClick:()=>{var l;if(!a)return;let c=(l=a.plugins())==null?void 0:l.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===s}):t,...r})})});import*as ht from"@radix-ui/react-checkbox";import{Check as Gn}from"lucide-react";import*as fa from"react";import{jsx as Tr}from"react/jsx-runtime";var $n=fa.forwardRef(({className:e,...t},r)=>Tr(ht.Root,{ref:r,className:n("peer h-5 w-5 shrink-0 rounded-md border border-gray-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Tr(ht.Indicator,{className:"flex items-center justify-center",children:Tr(Gn,{className:"h-3 w-3 text-white"})})}));$n.displayName=ht.Root.displayName;import{Command as Yt,CommandInput as Is,CommandItem as zs,useCommandState as Os}from"cmdk";import{ChevronDown as _s}from"lucide-react";import{forwardRef as Hs,isValidElement as Vs,useCallback as Bs,useEffect as jt,useRef as Ws,useState as vt}from"react";import{motion as Es}from"framer-motion";import{forwardRef as As,useRef as Ds}from"react";import Er from"js-cookie";import{useEffect as Kn,useState as jn}from"react";function xg(e,t,r){let[o,a]=jn(()=>{let c=Er.get(e);return c?JSON.parse(c):t});return Kn(()=>{let c=()=>{let l=Er.get(e);l&&a(JSON.parse(l))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Er.set(e,JSON.stringify(c),r)}]}import{useCallback as Yn,useEffect as Zn,useRef as qn,useState as Qn}from"react";var Je=(e=3e3)=>{let t=qn(null),[r,o]=Qn(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},s=Yn(async c=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){console.error("Failed to copy: ",l)}},[e]);return Zn(()=>()=>a(),[]),[r,s]};import{useEffect as Xn,useState as Jn}from"react";function kg(){let[e,t]=Jn(null);return Xn(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(l=>{var p,f,x;let d=l[0];if(!d)return;let m=(((p=d.rootBounds)==null?void 0:p.height)||0)*.3+o;for(let h=1;h<l.length;h++){let b=l[h];if(!b)break;(b.boundingClientRect.top<d.boundingClientRect.top||d.boundingClientRect.bottom<o)&&(d=b)}let i=d.target;for(;i&&i.getBoundingClientRect().bottom<o;)i=(f=s.get(i))==null?void 0:f.next;for(;i&&i.getBoundingClientRect().top>m;)i=(x=s.get(i))==null?void 0:x.prev;i&&t(i.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),s=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(l=>a.observe(l)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function Sg(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as es,useState as ts}from"react";function Tg(e,t={}){let{root:r,defaultValue:o}=t,[a,s]=ts(o??!1);return es(()=>{let c=()=>{let d=e.current;if(!d)return;let m=r==null?void 0:r.current,i=d.getBoundingClientRect(),p=m?m.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};s(i.top<p.bottom&&i.bottom>p.top&&i.left<p.right&&i.right>p.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let l=null;return e.current&&(l=new IntersectionObserver(c),l.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),l==null||l.disconnect()}},[e,r]),a}import{useEffect as rs,useState as os}from"react";function Dg(){let[e,t]=os(!1);return rs(()=>{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 as,useState as is}from"react";function _g(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}){let[s,c]=is(),l=(s==null?void 0:s.isIntersecting)&&a,d=([m])=>{c(m)};return as(()=>{let m=e==null?void 0:e.current;if(!!!window.IntersectionObserver||l||!m)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(d,p);return f.observe(m),()=>f.disconnect()},[e,JSON.stringify(t),r,o,l]),s}import{createContext as ns,useCallback as ss,useContext as ls,useEffect as ga,useId as cs,useState as ds}from"react";import{jsx as ms}from"react/jsx-runtime";var ha=ns({listeners:[],setListeners:()=>{}});function Ug({children:e}){let[t,r]=ds([]);return ms(ha.Provider,{value:{listeners:t,setListeners:r},children:e})}function et(e,t,r={}){let o=cs(),{listeners:a,setListeners:s}=ls(ha),c=ss(l=>{let d=l.target,m=document.getElementById("modal-backdrop");if(l.metaKey||l.ctrlKey||d.tagName==="INPUT"||d.tagName==="TEXTAREA"||!!m!=!!r.modal||(Array.isArray(e)?!e.includes(l.key):l.key!==e))return;let i=a.filter(f=>f.enabled!==!1&&(Array.isArray(f.key)?f.key.includes(l.key):f.key===l.key));!i.length||ho(i,(f,x)=>(x.priority??0)-(f.priority??0)).slice(-1)[0].id!==o||(l.preventDefault(),t(l))},[e,a,o,t]);ga(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),ga(()=>(s(l=>[...l.filter(d=>d.id!==o),{id:o,key:e,...r}]),()=>s(l=>l.filter(d=>d.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as us,useState as ps}from"react";function va(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Kg(e,t){let[r,o]=ps(va(e)??t);return us(()=>{let s=va(e);s&&o(s)},[e]),[r,s=>{o(s),window.localStorage.setItem(e,JSON.stringify(s))}]}import{toast as fs}from"sonner";import gs from"swr";function Qg(e,t){let{data:r,isLoading:o,mutate:a}=gs(e,me);return{data:r,isLoading:o,update:async(s,c)=>fs.promise(a(s(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 wa,useMemo as ys}from"react";import{useEffect as ba,useState as hs}from"react";function xa({pageSize:e,page:t,onPageChange:r}){let[o,a]=hs({pageIndex:t,pageSize:e});return ba(()=>{a(s=>({...s,pageIndex:t}))},[t]),ba(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as vs,useRouter as bs,useSearchParams as xs}from"next/navigation";function ya(){let e=vs(),t=bs(),r=xs(),o=Object.fromEntries(r);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:({set:c,del:l,replace:d,scroll:m=!0,getNewPath:i,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>f.set(b,Array.isArray(g)?g.join(p):g)),l&&(Array.isArray(l)?l.forEach(b=>f.delete(b)):f.delete(l));let x=f.toString(),h=`${e}${x.length>0?`?${x}`:""}`;if(i)return h;d?t.replace(h,{scroll:!1}):t.push(h,{scroll:m})},getQueryString:(c,l)=>{let d=new URLSearchParams(r);c&&Object.entries(c).forEach(([i,p])=>d.set(i,p)),l!=null&&l.ignore&&l.ignore.forEach(i=>d.delete(i));let m=d.toString();return m.length>0?`?${m}`:""}}}function l1(e=po){let{searchParams:t,queryParams:r}=ya(),o=ys(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:s}=xa({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return wa(()=>{let c=parseInt(t.get("page")||"1")||1;s(l=>({...l,pageIndex:c}))},[t.get("page")]),wa(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:s}}import{useEffect as ws}from"react";function m1(){ws(()=>{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 Cs,useState as Ns}from"react";function Gt(e){let[t,r]=Ns(),o=([a])=>{r(a)};return Cs(()=>{let a=e==null?void 0:e.current;if(!a)return;let s=new ResizeObserver(o);return s.observe(a),()=>s.disconnect()},[e]),t}import{useCallback as ks,useEffect as Ca,useState as Ps}from"react";function Na(e){let[t,r]=Ps(!1),o=ks(()=>{r(window.scrollY>e)},[e]);return Ca(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),Ca(()=>{o()},[o]),t}import{useCallback as Ss,useEffect as Ms,useState as Rs}from"react";function tt(e){let[t,r]=Rs(1),o=Ss(()=>{if(!e.current)return;let{scrollTop:s,scrollHeight:c,clientHeight:l}=e.current;r(c===l?1:Math.min(s/(c-l),1))},[]),a=Gt(e);return Ms(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Ls}from"react";import{toast as Pa}from"sonner";import{jsx as $t,jsxs as ka}from"react/jsx-runtime";function Ts({id:e,message:t,undo:r}){let o=()=>{r(),Pa.dismiss(e)},a=s=>{s.key==="z"&&(s.ctrlKey||s.metaKey)&&o()};return Ls(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),ka("div",{className:"flex w-full items-center justify-between space-x-2",children:[ka("div",{className:"flex items-center space-x-2",children:[$t(Po,{}),$t("p",{className:"font-medium",children:t})]}),$t("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 P1(){return({id:t,message:r,undo:o,duration:a})=>Pa($t(Ts,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Sa}from"react/jsx-runtime";var Ce=As(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...s},c)=>{var m,i;let l=Ds(null),d=Gt(l);return Sa(Es.div,{ref:c,className:n("overflow-hidden",r),animate:{width:e?((m=d==null?void 0:d.contentRect)==null?void 0:m.width)??"auto":"auto",height:t?((i=d==null?void 0:d.contentRect)==null?void 0:i.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...s,children:Sa("div",{ref:l,className:n(t&&"h-max",e&&"w-max"),children:a})})});Ce.displayName="AnimatedSizeContainer";import*as Re from"@radix-ui/react-popover";import{Drawer as rt}from"vaul";import{jsx as Ne,jsxs as Kt}from"react/jsx-runtime";function ot({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:s,mobileOnly:c,popoverContentClassName:l,collisionBoundary:d,sticky:m,onEscapeKeyDown:i,onWheel:p}){let{isMobile:f}=Y();return c||f?Kt(rt.Root,{open:a,onOpenChange:s,children:[Ne(rt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Kt(rt.Portal,{children:[Ne(rt.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),Kt(rt.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",onEscapeKeyDown:i,onPointerDownOutside:x=>{x.target instanceof Element&&x.target.closest("[data-sonner-toast]")&&x.preventDefault()},children:[Ne("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Ne("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),Ne("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:t})]}),Ne(rt.Overlay,{})]})]}):Kt(Re.Root,{open:a,onOpenChange:s,children:[Ne(Re.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Ne(Re.Portal,{children:Ne(Re.Content,{sideOffset:8,align:r,side:o,className:n("animate-slide-up-fade z-50 items-center rounded-lg border border-gray-200 bg-white drop-shadow-lg sm:block",l),sticky:m,collisionBoundary:d,onEscapeKeyDown:i,onWheel:p,children:t})})]})}import{Fragment as Ar,jsx as A,jsxs as Le}from"react/jsx-runtime";function Fs(e,t){return e===!0}function J1({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:s="Select...",searchPlaceholder:c="Search...",emptyState:l,createLabel:d,onCreate:m,buttonProps:i,shortcutHint:p,caret:f,side:x,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:N=!0,inputClassName:S,optionRight:M,optionClassName:P,matchTriggerWidth:w,children:y}){let R=Fs(e,r),z=Array.isArray(t)?t:t?[t]:[],{isMobile:D}=Y(),[q,C]=vt(!1),O=h??q,ce=b??C,[T,de]=vt(""),[J,xr]=vt(!1),[yr,Wi]=vt(void 0),[Fi,co]=vt(!1),Ui=_=>{var Ze;if(R){let wr=z.some(({value:dt})=>dt===_.value);r(wr?z.filter(({value:dt})=>dt!==_.value):[...z,_])}else r(z.length&&((Ze=z[0])==null?void 0:Ze.value)===_.value?null:_),ce(!1)},mo=Bs((_,Ze)=>Ze===""?[...z,..._.filter(wr=>z.findIndex(dt=>dt.value===wr.value)===-1)]:_,[z]);return jt(()=>{J&&(Wi(o&&mo(o,T)),xr(!1))},[J,o,mo,T]),jt(()=>{xr(!0)},[o]),jt(()=>{O||(de(""),xr(!0))},[O]),jt(()=>g==null?void 0:g(T),[T]),A(ot,{openPopover:O,setOpenPopover:ce,align:"start",side:x,onWheel:_=>{_.stopPropagation()},popoverContentClassName:n(w&&"sm:w-[var(--radix-popover-trigger-width)]"),content:A(Ce,{width:!D&&!w,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Le(Yt,{loop:!0,shouldFilter:N,children:[Le("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[A(Is,{placeholder:c,value:T,onValueChange:de,className:n("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-400 focus:ring-0 sm:text-sm",S),onKeyDown:_=>{(_.key==="Escape"||_.key==="Backspace"&&!T)&&(_.preventDefault(),_.stopPropagation(),ce(!1))}}),p&&A("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:p})]}),A(Us,{children:A(Yt.List,{className:n("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:yr!==void 0?Le(Ar,{children:[yr.map(_=>A(Gs,{option:_,multiple:R,selected:z.some(({value:Ze})=>Ze===_.value),onSelect:()=>Ui(_),right:M==null?void 0:M(_),className:P},`${_.label}, ${_.value}`)),T.length>0&&m&&Le(zs,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-gray-700","data-[selected=true]:bg-gray-100",P),onSelect:async()=>{co(!0),await(m==null?void 0:m(T))&&(de(""),ce(!1)),co(!1)},children:[Fi?A(ye,{className:"size-4 shrink-0"}):A(Ht,{className:"size-4 shrink-0"}),A("div",{className:"grow truncate",children:(d==null?void 0:d(T))||`Create "${T}"`})]}),N?A($s,{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:l||"No matches"}):yr.length===0?A("div",{className:"flex min-h-12 items-center justify-center text-sm text-gray-500",children:l||"No matches"}):null]}):A(Yt.Loading,{children:A("div",{className:"flex h-12 items-center justify-center",children:A(ye,{})})})})})]})}),children:A(ie,{variant:"secondary",...i,className:n(i==null?void 0:i.className,"flex gap-2"),textWrapperClassName:n(i==null?void 0:i.textWrapperClassName,"w-full flex items-center justify-start"),text:Le(Ar,{children:[A("div",{className:"min-w-0 grow truncate text-left",children:y||z.map(_=>_.label).join(", ")||s}),f&&A(_s,{className:"ml-1 size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}),icon:a?Ma(a)?a:A(a,{className:"size-4 shrink-0"}):void 0})})}var Us=({children:e})=>{let t=Ws(null),{scrollProgress:r,updateScrollProgress:o}=tt(t);return Le(Ar,{children:[A("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),A("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 Gs({option:e,onSelect:t,multiple:r,selected:o,right:a,className:s}){return Le(Yt.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100",s),onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&A("div",{className:"shrink-0 text-gray-600",children:o?A(Ho,{className:"size-4 text-gray-600"}):A(Vo,{className:"size-4 text-gray-400"})}),Le("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&A("span",{className:"shrink-0 text-gray-600",children:Ma(e.icon)?e.icon:A(e.icon,{className:"h-4 w-4"})}),A("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&A(_o,{className:"size-4 shrink-0 text-gray-600"})]})}var Ma=e=>Vs(e),$s=Hs((e,t)=>Os(o=>o.filtered.count===0)?A("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Zt,format as Ks,isSameMonth as js}from"date-fns";import{ChevronLeft as Ra,ChevronRight as La,ChevronsLeft as Ys,ChevronsRight as Zs}from"lucide-react";import{forwardRef as qs,useRef as Qs}from"react";import{DayPicker as Xs,useDayPicker as Js,useDayRender as el,useNavigation as tl}from"react-day-picker";import{Fragment as rl,jsx as te,jsxs as qt}from"react/jsx-runtime";var bt=qs(({onClick:e,icon:t,disabled:r,...o},a)=>te("button",{ref:a,type:"button",disabled:r,className:n("flex h-7 w-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-gray-200 text-gray-600 hover:text-gray-800","hover:bg-gray-50 active:bg-gray-100","disabled:pointer-events-none disabled:text-gray-400"),onClick:e,...o,children:te(t,{className:"h-full w-full shrink-0"})}));bt.displayName="NavigationButton";function Ta({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:s,className:c,classNames:l,...d}){return te(Xs,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:s,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-gray-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-gray-900",day:n("relative h-10 w-full sm:h-9 sm:w-9 rounded-md text-sm text-gray-900","hover:bg-gray-100 active:bg-gray-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-gray-300 line-through disabled:hover:bg-transparent",day_outside:"text-gray-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...l},components:{IconLeft:()=>te(Ra,{className:"h-4 w-4"}),IconRight:()=>te(La,{className:"h-4 w-4"}),Caption:({...m})=>{let{goToMonth:i,nextMonth:p,previousMonth:f,currentMonth:x,displayMonths:h}=tl(),{numberOfMonths:b,fromDate:g,toDate:N}=Js(),S=h.findIndex(D=>js(m.displayMonth,D)),M=S===0,P=S===h.length-1,w=b>1&&(M||!P),y=b>1&&(P||!M),R=()=>{let D=Zt(x,-1);f&&(!g||D.getTime()>=g.getTime())&&i(D)},z=()=>{let D=Zt(x,1);p&&(!N||D.getTime()<=N.getTime())&&i(D)};return qt("div",{className:"flex items-center justify-between",children:[qt("div",{className:"flex items-center gap-1",children:[o&&!y&&te(bt,{disabled:a||!f||g&&Zt(x,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:Ys}),!y&&te(bt,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&i(f),icon:Ra})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-gray-900",children:Ks(m.displayMonth,"LLLL yyy",{locale:s})}),qt("div",{className:"flex items-center gap-1",children:[!w&&te(bt,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&i(p),icon:La}),o&&!w&&te(bt,{disabled:a||!p||N&&Zt(x,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:z,icon:Zs})]})]})},Day:({date:m,displayMonth:i})=>{let p=Qs(null),{activeModifiers:f,buttonProps:x,divProps:h,isButton:b,isHidden:g}=el(m,i,p),{selected:N,today:S,disabled:M,range_middle:P}=f;if(g)return te(rl,{});if(!b)return te("div",{...h,className:n("flex items-center justify-center",h.className)});let{children:w,...y}=x;return qt("button",{ref:p,...y,type:"button",children:[w,S&&te("span",{className:n("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!N,"!bg-white":N,"!bg-blue-400":N&&P,"text-gray-400":M})})]})}},...d})}import{enUS as pl}from"date-fns/locale";import{useEffect as Hr,useMemo as Aa,useState as Xt}from"react";import{Command as Dr}from"cmdk";import{Lock as ol}from"lucide-react";import{jsx as We,jsxs as al}from"react/jsx-runtime";var Ir=({presets:e,onSelect:t,currentValue:r})=>{let o=d=>"dateRange"in d,a=d=>"date"in d,s=(d,m)=>d.getDate()===m.getDate()&&d.getMonth()===m.getMonth()&&d.getFullYear()===m.getFullYear(),c=(d,m)=>{let i=d.from,p=m.from,f=!1;i&&p&&s(i,p)&&(f=!0);let x=d.to,h=m.to,b=!1;return x&&h&&s(x,h)&&(b=!0),f&&b},l=d=>{if(o(d)){let m=r;return m&&c(m,d.dateRange)}else if(a(d)){let m=r;return m&&s(m,d.date)}return!1};return We(Dr,{className:"w-full rounded ring-gray-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:We(Dr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,m)=>al(Dr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:n("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-gray-200","px-2.5 py-1.5 text-left text-sm text-gray-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-gray-100",l(d)&&"font-semibold text-gray-800"),children:[We("span",{children:d.label}),d.requiresUpgrade?We(ol,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?We("kbd",{className:"text-gray-4000 hidden rounded bg-gray-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-gray-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&We(ee,{side:"bottom",content:d.tooltipContent,children:We("div",{className:"absolute inset-0 cursor-not-allowed"})})]},m))})})};Ir.displayName="DatePicker.Presets";import{format as Te}from"date-fns";import{createContext as il}from"react";var zr=il({isOpen:!1,setIsOpen:()=>{}}),nl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Or=(e,t,r=!1)=>{let o=!nl(),a;return r?a=o?Te(e,"d MMM, yyyy h:mm a",{locale:t}):Te(e,"d MMM, yyyy HH:mm",{locale:t}):a=Te(e,"d MMM, yyyy",{locale:t}),a},Ea=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:s,fromDay:c,toDay:l}=t;if(e&&e.length>0){let d=o,m=r;e.forEach(i=>{var p,f,x,h,b,g;if("date"in i){let N=i.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${i.label} is before fromYear ${d}.`);if(r&&N>r)throw new Error(`Preset ${i.label} is after toYear ${m}.`);if(a&&i.date.getMonth()<a.getMonth())throw new Error(`Preset ${i.label} is before fromMonth ${a}.`);if(s&&i.date.getMonth()>s.getMonth())throw new Error(`Preset ${i.label} is after toMonth ${s}.`);if(c&&i.date.getDate()<c.getDate())throw new Error(`Preset ${i.label} is before fromDay ${c}.`);if(l&&i.date.getDate()>l.getDate())throw new Error(`Preset ${i.label} is after toDay ${Te(l,"MMM dd, yyyy")}.`)}if("dateRange"in i){let N=(p=i.dateRange.from)==null?void 0:p.getFullYear(),S=(f=i.dateRange.to)==null?void 0:f.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${i.label}'s 'from' is before fromYear ${d}.`);if(S&&r&&S>r)throw new Error(`Preset ${i.label}'s 'to' is after toYear ${m}.`);if(a){let M=(x=i.dateRange.from)==null?void 0:x.getMonth();if(M&&M<a.getMonth())throw new Error(`Preset ${i.label}'s 'from' is before fromMonth ${Te(a,"MMM, yyyy")}.`)}if(s){let M=(h=i.dateRange.to)==null?void 0:h.getMonth();if(M&&M>s.getMonth())throw new Error(`Preset ${i.label}'s 'to' is after toMonth ${Te(s,"MMM, yyyy")}.`)}if(c){let M=(b=i.dateRange.from)==null?void 0:b.getDate();if(M&&M<c.getDate())throw new Error(`Preset ${i.dateRange.from}'s 'from' is before fromDay ${Te(c,"MMM dd, yyyy")}.`)}if(l){let M=(g=i.dateRange.to)==null?void 0:g.getDate();if(M&&M>l.getDate())throw new Error(`Preset ${i.label}'s 'to' is after toDay ${Te(l,"MMM dd, yyyy")}.`)}}})}};import{cva as sl}from"class-variance-authority";import{Calendar as ll,ChevronDown as cl}from"lucide-react";import{forwardRef as dl}from"react";import{jsx as Qt,jsxs as ul}from"react/jsx-runtime";var ml=sl(["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-gray-200 text-gray-900 placeholder-gray-400 transition-all","disabled:pointer-events-none disabled:bg-gray-100 disabled:text-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),_r=dl(({className:e,children:t,placeholder:r,hasError:o,...a},s)=>ul("button",{ref:s,className:n(ml({hasError:o}),e),...a,children:[Qt(ll,{className:n("h-4 w-4 shrink-0 text-gray-400",!!t&&"text-gray-900")}),Qt("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:t||(r?Qt("span",{className:"text-gray-400",children:r}):null)}),Qt(cl,{className:"h-4 w-4 flex-shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));_r.displayName="DatePicker.Trigger";import{jsx as ge,jsxs as gl}from"react/jsx-runtime";var fl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:s,disableNavigation:c,disabledDays:l,showYearNavigation:d=!1,locale:m=pl,placeholder:i="Select date range",hasError:p,align:f="center",className:x,...h})=>{let{isDesktop:b}=Y(),[g,N]=Xt(!1),[S,M]=Xt(a&&r?a==null?void 0:a.find(({id:T})=>T===r):void 0),[P,w]=Xt((S==null?void 0:S.dateRange)??e??t??void 0),[y,R]=Xt(P==null?void 0:P.to),z=Aa(()=>P,[g]);Hr(()=>{w(e)},[e]),Hr(()=>{let T=a==null?void 0:a.find(({id:de})=>de===r);M(T),w((T==null?void 0:T.dateRange)??e??t)},[a,r]),Hr(()=>{g?P&&R(P.to):R(P==null?void 0:P.to)},[g]);let D=(T,de)=>{let J=(P==null?void 0:P.from)&&(P==null?void 0:P.to)?{from:de}:T;w(J),M(void 0),(J==null?void 0:J.from)&&(J==null?void 0:J.to)&&(o==null||o(J),N(!1))},q=T=>{w(T.dateRange),M(T),o==null||o(T.dateRange,T),N(!1)},C=()=>{w(z),N(!1)},O=T=>{T||C(),N(T)},ce=Aa(()=>P?`${P.from?Or(P.from,m):""} - ${P.to?Or(P.to,m):""}`:null,[P,m]);return et((a==null?void 0:a.filter(T=>T.shortcut).map(T=>T.shortcut))??[],T=>{let de=a==null?void 0:a.find(J=>J.shortcut===T.key);de&&q(de)}),ge(zr.Provider,{value:{isOpen:g,setIsOpen:N},children:ge(ot,{align:f,openPopover:g,setOpenPopover:O,popoverContentClassName:"rounded-xl",content:ge("div",{className:"flex w-full",children:gl("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&ge("div",{className:n("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-gray-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:ge("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:ge(Ir,{currentValue:P,presets:a,onSelect:q})})}),ge("div",{className:"scrollbar-hide overflow-x-scroll",children:ge(Ta,{mode:"range",selected:P,onSelect:D,month:y,onMonthChange:R,numberOfMonths:b?2:1,disabled:l,disableNavigation:c,showYearNavigation:d,locale:m,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-gray-200 overflow-x-scroll scrollbar-hide"},...h})})]})}),children:ge(_r,{placeholder:i,disabled:s,className:x,hasError:p,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(S==null?void 0:S.label)??ce})})})};function Oh({presets:e,...t}){return e&&Ea(e,t),ge(fl,{presets:e,...t})}import{jsx as Jt,jsxs as Da}from"react/jsx-runtime";function Fh({icon:e,title:t,description:r,learnMore:o,children:a}){return Da("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Jt("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-gray-200 bg-gray-50",children:Jt(e,{className:"size-6 text-gray-800"})}),Jt("p",{className:"text-center text-base font-medium text-gray-950",children:t}),r&&Da("p",{className:"max-w-sm text-balance text-center text-sm text-gray-500",children:[r," ",o&&Jt("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-gray-800",children:"Learn more \u2197"})]}),a]})}import{cva as hl}from"class-variance-authority";import{useState as Ia}from"react";import{toast as za}from"sonner";import{Fragment as bl,jsx as he,jsxs as Br}from"react/jsx-runtime";var Vr={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)"}},vl=hl("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-gray-50",{variants:{variant:{default:"rounded-md border border-gray-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function Xh({readFile:e,onChange:t,variant:r,className:o,iconClassName:a,previewClassName:s,customPreview:c,accept:l="any",imageSrc:d,loading:m=!1,clickToUpload:i=!0,showHoverOverlay:p=!0,content:f,maxFileSizeMB:x=0,targetResolution:h,accessibilityLabel:b="File upload",disabled:g=!1}){let[N,S]=Ia(!1),[M,P]=Ia(null),w=async y=>{let R="dataTransfer"in y?y.dataTransfer.files&&y.dataTransfer.files[0]:y.target.files&&y.target.files[0];if(!R)return;if(P(R.name),x>0&&R.size/1024/1024>x){za.error(`File size too big (max ${x} MB)`);return}let z=Vr[l].types;if(z.length&&!z.includes(R.type)){za.error(Vr[l].errorMessage??"File type not supported");return}let D=R;if(h&&R.type.startsWith("image/"))try{let q=await go(R,h),C=await fetch(q).then(O=>O.blob());D=new File([C],R.name,{type:R.type})}catch(q){console.error("Error resizing image:",q)}if(e){let q=new FileReader;q.onload=C=>{var O;return t==null?void 0:t({src:(O=C.target)==null?void 0:O.result,file:D})},q.readAsDataURL(D);return}t==null||t({file:D})};return Br("label",{className:n(vl({variant:r}),g?"cursor-not-allowed":n(i&&"cursor-pointer"),o),children:[m&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(mt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:y=>{y.preventDefault(),y.stopPropagation(),S(!0)},onDragEnter:y=>{y.preventDefault(),y.stopPropagation(),S(!0)},onDragLeave:y=>{y.preventDefault(),y.stopPropagation(),S(!1)},onDrop:async y=>{y.preventDefault(),y.stopPropagation(),w(y),S(!1)}}),Br("div",{className:n("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",g&&"bg-gray-50",N&&!g&&"cursor-copy border-black bg-gray-50 opacity-100",d?n("opacity-0",p&&!g&&"group-hover:opacity-100"):n(!g&&"group-hover:bg-gray-50")),children:[he(Go,{className:n("size-7 transition-all duration-75",g?"text-gray-400":n("text-gray-500 group-hover:scale-110 group-active:scale-95",N?"scale-110":"scale-100"),a)}),f!==null&&he("div",{className:n("mt-2 text-center text-sm text-gray-500",g&&"text-gray-400"),children:f??he(bl,{children:Br("p",{children:["Drag and drop ",i&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:b})]}),d&&(c??he("img",{src:d,alt:"Preview",className:n("h-full w-full rounded-[inherit] object-cover",s)})),i&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{type:"file",accept:Vr[l].types.join(","),onChange:w,disabled:g},M)})]})}import{AnimatePresence as xl,motion as Oa}from"framer-motion";import{X as yl}from"lucide-react";import{isValidElement as wl}from"react";import{Fragment as Cl,jsx as X,jsxs as xt}from"react/jsx-runtime";function Ha({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return et("Escape",o,{priority:1}),X(Ce,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:xt("div",{className:n("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[X("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:X(xl,{children:t==null?void 0:t.map(({key:s,value:c})=>{if(s==="loader")return X(Oa.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-gray-200 bg-white"},`loader-${c}`);let l=e.find(d=>d.key===s);return l?(l.multiple&&Array.isArray(c)?c:[c]).map(d=>{var f,x,h;let m=(f=l.options)==null?void 0:f.find(b=>typeof b.value=="string"&&typeof d=="string"?b.value.toLowerCase()===d.toLowerCase():b.value===d),i=(m==null?void 0:m.icon)??((x=l.getOptionIcon)==null?void 0:x.call(l,d,{key:l.key,option:m}))??l.icon,p=(m==null?void 0:m.label)??((h=l.getOptionLabel)==null?void 0:h.call(l,d,{key:l.key,option:m}))??d;return xt(Oa.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-gray-200 bg-white text-sm text-black",children:[xt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[X("span",{className:"shrink-0 text-gray-600",children:_a(l.icon)?l.icon:X(l.icon,{className:"h-4 w-4"})}),l.label]}),X("div",{className:"px-3 py-2 text-gray-500",children:"is"}),X("div",{className:"flex items-center gap-2.5 px-3 py-2",children:l.options?xt(Cl,{children:[X("span",{className:"shrink-0 text-gray-600",children:_a(i)?i:X(i,{className:"h-4 w-4"})}),Tt(p,30)]}):X("div",{className:"h-5 w-12 animate-pulse rounded-md bg-gray-200"})}),X("button",{type:"button",className:"h-full rounded-r-md p-2 text-gray-500 ring-inset ring-gray-500 hover:bg-gray-100 hover:text-gray-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(s,d),children:X(yl,{className:"h-3.5 w-3.5"})})]},`${s}-${d}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&xt("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-gray-500 ring-inset ring-gray-500 transition-colors hover:border-gray-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",X("kbd",{className:"rounded-md border border-gray-200 px-1.5 py-0.5 text-xs text-gray-950 group-hover:bg-gray-50",children:"ESC"})]})]})})}var _a=e=>wl(e);import{Command as Ee,useCommandState as Nl}from"cmdk";import{ChevronDown as kl,ListFilter as Pl}from"lucide-react";import{Fragment as Sl,forwardRef as Ml,isValidElement as Ba,useCallback as er,useEffect as tr,useImperativeHandle as Rl,useRef as Fr,useState as Wr}from"react";import{Fragment as Il,jsx as H,jsxs as ve}from"react/jsx-runtime";function Wa({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:s,activeFilters:c,askAI:l,children:d,emptyState:m,className:i}){var D,q;let{isMobile:p}=Y(),f=Fr(null),x=Fr(),[h,b]=Wr(!1);et("f",()=>b(!0),{enabled:!h});let[g,N]=Wr(""),[S,M]=Wr(null),P=er(()=>{N(""),M(null)},[]);tr(()=>{h||P()},[h]);let w=S?e.find(({key:C})=>C===S):null,y=er(C=>{f.current&&(x.current={width:f.current.clientWidth,height:f.current.clientHeight}),N(""),M(C),o==null||o(C)},[]),R=er(C=>{if(!w||!c)return!1;let O=c.find(({key:ce})=>ce===S);return(O==null?void 0:O.value)===C||O&&w.multiple&&Array.isArray(O.value)&&O.value.includes(C)},[w]),z=er(C=>{w&&(R(C)?r(w.key,C):t(w.key,C),w.multiple||b(!1))},[c,w,l]);return tr(()=>{a==null||a(g)},[g]),tr(()=>{s==null||s(S)},[S]),tr(()=>{(w==null?void 0:w.options)&&f.current&&(x.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),H(ot,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:C=>{S&&(C.preventDefault(),P())},content:H(Ce,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ee,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-gray-200",children:[H(Tl,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:g,onValueChange:N,onKeyDown:C=>{(C.key==="Escape"||C.key==="Backspace"&&!g)&&(C.preventDefault(),C.stopPropagation(),S?P():b(!1))},emptySubmit:C=>{C.preventDefault(),C.stopPropagation(),l?(t("ai",w?`${w.label} ${g}`:g),b(!1)):z(g)}}),!w&&H("kbd",{className:"mr-2 hidden shrink-0 rounded border border-gray-200 bg-gray-100 px-2 py-0.5 text-xs font-light text-gray-500 md:block",children:"F"})]}),H(El,{ref:f,children:ve(Ee.List,{className:n("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((q=(D=w.options)==null?void 0:D.filter(C=>!g||!C.hideDuringSearch))==null?void 0:q.map(C=>{let O=R(C.value);return H(Va,{filter:w,option:C,right:O?H(Oo,{className:"h-4 w-4"}):C.right,onSelect:()=>z(C.value)},C.value)}))??H(Ee.Loading,{children:H("div",{className:"-m-1 flex items-center justify-center",style:x.current,children:H(ye,{})})}):e.map(C=>ve(Sl,{children:[H(Va,{filter:C,onSelect:()=>y(C.key)}),C.separatorAfter&&H(Ee.Separator,{className:"-mx-1 my-1 border-b border-gray-200"})]},C.key)),(!w||w.options)&&H(Al,{search:g,askAI:l,children:m?Ll(m)?(m==null?void 0:m[S??"default"])??"No matches":m:"No matches"})]})},S)]})}),children:ve("button",{type:"button",className:n("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-gray-200 bg-white text-gray-900 placeholder-gray-400","focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",i),children:[H(Pl,{className:"size-4 shrink-0"}),H("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-gray-900",children:d??"Filter"}),c!=null&&c.length?H("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):H(kl,{className:"size-4 shrink-0 text-gray-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Ll(e){return typeof e=="object"&&e!==null&&!Ba(e)}var Tl=e=>{let t=Nl(r=>r.filtered.count===0);return H(Ee.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-gray-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"})},El=Ml(({children:e},t)=>{let r=Fr(null);Rl(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=tt(r);return ve(Il,{children:[H("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),H("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Va({filter:e,option:t,right:r,onSelect:o}){var l,d;let{isMobile:a}=Y(),s=t?t.icon??((l=e.getOptionIcon)==null?void 0:l.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((d=e.getOptionLabel)==null?void 0:d.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ee.Item,{className:n("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-gray-100"),onPointerDown:m=>{m.preventDefault()},onPointerUp:m=>{m.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[H("span",{className:"shrink-0 text-gray-600",children:Dl(s)?s:H(s,{className:"h-4 w-4"})}),Tt(c,48),H("div",{className:"ml-1 flex shrink-0 grow justify-end text-gray-500",children:r})]})}var Al=({search:e,askAI:t,children:r})=>t&&e?ve(Ee.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-gray-100 px-3 py-2",children:[H(Co,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-gray-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):H(Ee.Empty,{className:"p-2 text-center text-sm text-gray-400",children:r}),Dl=e=>Ba(e);var C2={Select:Wa,List:Ha};import{useMemo as zl,useState as Fa}from"react";import{jsx as Fe,jsxs as rr}from"react/jsx-runtime";function L2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:s,handleSubmit:c}){let[l,d]=Fa(r.defaultValue),[m,i]=Fa(!1),p=zl(()=>m||!l||l===r.defaultValue,[m,l,r.defaultValue]);return rr("form",{onSubmit:async f=>{f.preventDefault(),i(!0),await c({[r.name]:l}),i(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[rr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[rr("div",{className:"flex flex-col space-y-3",children:[Fe("h2",{className:"text-xl font-medium",children:e}),Fe("p",{className:"text-sm text-gray-500",children:t})]}),typeof r.defaultValue=="string"?Fe("input",{...r,type:r.type||"text",required:!0,disabled:!!s,onChange:f=>d(f.target.value),className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":s})}):Fe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),rr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[typeof o=="string"?Fe("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Fe("div",{className:"shrink-0",children:Fe(ie,{text:a,loading:m,disabled:p,disabledTooltip:s})})]})]})}import{useId as Ol}from"react";import{jsx as or,jsxs as _l}from"react/jsx-runtime";function D2({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Ol();return _l("svg",{className:n("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[or("defs",{children:or("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:or("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),or("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Hl}from"lucide-react";import Vl,{useCallback as Bl,useState as Wl}from"react";import{jsx as Ue,jsxs as Ur}from"react/jsx-runtime";var Fl=Vl.forwardRef(({className:e,type:t,...r},o)=>{let[a,s]=Wl(!1),c=Bl(()=>s(!a),[a,s]);return Ur("div",{children:[Ur("div",{className:"relative flex",children:[Ue("input",{type:a?"text":t,className:n("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Ur("div",{className:"group",children:[r.error&&Ue("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ue(Hl,{className:n("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ue("button",{className:n("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?Ue($o,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0}):Ue(Ko,{className:"size-4 flex-none text-gray-500 transition hover:text-gray-700","aria-hidden":!0})})]})]}),r.error&&Ue("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Fl.displayName="Input";import{flip as Kl,offset as jl,size as Yl,useDismiss as Zl,useFloating as ql,useInteractions as Ql}from"@floating-ui/react";import{Command as ke,useCommandState as Xl}from"cmdk";import{Check as Jl,ChevronDown as ec,Search as Gr,X as tc}from"lucide-react";import{createContext as rc,forwardRef as oc,useContext as Zr,useEffect as $r,useMemo as ac,useRef as Ga,useState as Kr}from"react";import{Drawer as at}from"vaul";import Ul from"next/image";import{useEffect as Gl,useState as Ua}from"react";import{jsx as $l}from"react/jsx-runtime";function ar(e){let[t,r]=Ua(!0),[o,a]=Ua(e.src);Gl(()=>a(e.src),[e.src]);let s=c=>{r(!1);let l=c.target;l.naturalWidth<=16&&l.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return $l(Ul,{...e,src:o,alt:e.alt,className:n(t?"blur-[2px]":"blur-0",e.className),onLoad:s,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as L,jsxs as Q}from"react/jsx-runtime";var ir=rc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function iv({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:s,icon:c,inputAttrs:l,noItemsElement:d}){let m=Ga(null),[i,p]=Kr(!1),[f,x]=Kr(""),[h,b]=Kr(!1);$r(()=>{i&&b(!1)},[i]),$r(()=>b(!0),[f]),$r(()=>{t&&x(t.value)},[t]);let g=ac(()=>{let C=f.toLowerCase();return h?e.filter(O=>O.value.toLowerCase().includes(C)):f?e.sort((O,ce)=>(ce.value.toLowerCase().includes(C)?1:0)-(O.value.toLowerCase().includes(C)?1:0)):e},[h,f,e]),{refs:N,floatingStyles:S,context:M}=ql({open:i,onOpenChange:p,middleware:[jl(8),Yl({apply({elements:{floating:C},availableHeight:O}){Object.assign(C.style,{maxHeight:`${Math.max(75,Math.min(O,290))}px`})},padding:8}),Kl({fallbackStrategy:"initialPlacement",padding:8})]}),P=Zl(M),{getReferenceProps:w,getFloatingProps:y}=Ql([P]),R=Ga(null),{scrollProgress:z,updateScrollProgress:D}=tt(R),{isMobile:q}=Y();return L(ir.Provider,{value:{inputAttrs:l||{},openCommandList:i,setOpenCommandList:p,inputValue:f,setInputValue:x,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:q&&s?Q(at.Root,{open:i,onOpenChange:p,children:[L(at.Trigger,{className:"sm:hidden",asChild:!0,children:L(ke,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:Q("div",{className:n("group relative rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500 md:min-w-[140px]",o),children:[L("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?L("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||L(Gr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[L(jr,{}),L(Yr,{})]})]})})}),L(at.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),Q(at.Portal,{children:[L(at.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-gray-200 bg-white",onPointerDownOutside:C=>{C.target instanceof Element&&C.target.closest("[data-sonner-toast]")&&C.preventDefault()},children:Q(ke,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group relative mb-2 rounded-t-md border-b border-gray-300 bg-white p-1 sm:border sm:py-0 sm:focus-within:border-gray-500 sm:focus-within:ring-1 sm:focus-within:ring-gray-200",o),children:[L("div",{className:"absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400",children:t&&t.image?L("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||L(Gr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[L(jr,{}),L(Yr,{})]})]}),i&&Q(ke.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(d?L("div",{children:d}):L("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&L(ke.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."}),L($a,{items:g})]})]})}),L(at.Overlay,{})]})]}):Q(ke,{ref:m,className:"relative",shouldFilter:!1,loop:!0,children:[Q("div",{className:n("group rounded-md border border-gray-200 bg-white px-1 transition-all focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-200",o),children:[L("div",{onClick:()=>p(C=>!C),className:"absolute inset-y-0 left-0 flex cursor-pointer items-center justify-center pl-3 text-gray-400",children:t&&t.image?L("img",{src:t.image,alt:t.value,className:"h-4 w-4 rounded-full"}):c||L(Gr,{className:"h-4 w-4 text-gray-400"})}),Q("div",{className:"flex h-10 px-8",children:[L(jr,{ref:N.setReference,...w()}),L(Yr,{})]})]}),i&&Q("div",{ref:N.setFloating,style:S,...y(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-gray-200 bg-white shadow-md",children:[Q("div",{ref:R,onScroll:D,className:"grow overflow-y-auto p-2",children:[Q(ke.List,{children:[e.length===0&&f===""&&(d?L("div",{children:d}):L("p",{className:"px-4 py-2 text-sm text-gray-600",children:"No items found."})),f!==""&&L(ke.Empty,{className:"px-4 py-2 text-sm text-gray-600",children:"No results found."})]}),L($a,{items:g})]}),L("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(z,2)}})]})]})})}var jr=oc((e,t)=>{let r=Xl(m=>m.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:s,inputValue:c,setInputValue:l,disabled:d}=Zr(ir);return L(ke.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>s(!0),value:c,onValueChange:l,onKeyDown:m=>{m.key==="Escape"?(m.preventDefault(),s(!1)):m.key==="Enter"&&r?s(!1):m.key.match(/^[a-z0-9]$/i)&&!m.metaKey&&s(!0)},disabled:d,className:"block w-full truncate rounded-md border-none px-0 text-base text-gray-900 placeholder-gray-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Yr(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Zr(ir);return L("button",{type:"button",onClick:()=>{r(s=>!s),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?L(tc,{className:"h-4 w-4 text-gray-400 transition-all hover:text-gray-700"}):L(ec,{className:n("h-4 w-4 text-gray-400 transition-all hover:text-gray-700",{"rotate-180 transform":t})})})}function $a({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Zr(ir);return e.map(a=>Q(ke.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-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-gray-100 aria-selected:text-gray-900",children:[Q("div",{className:"flex items-center space-x-2",children:[a.image&&L(ar,{src:a.image,alt:a.value,className:"h-4 w-4 rounded-full",width:16,height:16}),L("p",{className:n("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&&L(Ft,{className:"text-xs",variant:"neutral",children:a.label})]}),L(Jl,{className:"invisible h-5 w-5 text-gray-500 aria-selected:visible"})]},a.id))}import*as qr from"@radix-ui/react-label";import{cva as ic}from"class-variance-authority";import*as Ka from"react";import{jsx as lc}from"react/jsx-runtime";var nc=ic("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sc=Ka.forwardRef(({className:e,...t},r)=>lc(qr.Root,{ref:r,className:n(nc(),e),...t}));sc.displayName=qr.Root.displayName;import{curveNatural as ja}from"@visx/curve";import{LinearGradient as Ya}from"@visx/gradient";import{Group as cc}from"@visx/group";import{ParentSize as dc}from"@visx/responsive";import{scaleLinear as mc,scaleUtc as uc}from"@visx/scale";import{Area as pc,AreaClosed as fc}from"@visx/shape";import{motion as Za}from"framer-motion";import{useId as gc,useMemo as qa}from"react";import{jsx as be,jsxs as Qr}from"react/jsx-runtime";function bv(e){return be(dc,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&be(hc,{...{width:t,height:r,...e}})})}var Ae={top:8,right:2,bottom:2,left:2};function hc({width:e,height:t,data:r,curve:o=!0,color:a}){let s=gc(),c=qa(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:l,xScale:d}=qa(()=>{let m=r.map(({value:h})=>h),i=Math.max(...m),p=r.map(({date:h})=>h.getTime()),f=new Date(Math.min(...p)),x=new Date(Math.max(...p));return{yScale:mc({domain:[-2,Math.max(i,2)],range:[t-Ae.top-Ae.bottom,0],nice:!0,clamp:!0}),xScale:uc({domain:[f,x],range:[0,e-Ae.left-Ae.right],nice:!0})}},[r,t,e]);return Qr("svg",{width:e,height:t,children:[Qr("defs",{children:[be(Ya,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-Ae.left-Ae.right,gradientUnits:"userSpaceOnUse"}),be(Ya,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),be("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:be("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),Qr(cc,{left:Ae.left,top:Ae.top,children:[be(pc,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,curve:o?ja:void 0,children:({path:m})=>be(Za.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),be(fc,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,yScale:l,curve:o?ja:void 0,children:({path:m})=>be(Za.path,{initial:{d:m(c)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as ne from"@radix-ui/react-dialog";import*as Xr from"@radix-ui/react-visually-hidden";import{useRouter as vc}from"next/navigation";import{Drawer as Ge}from"vaul";import{jsx as re,jsxs as it}from"react/jsx-runtime";function kv({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:s,preventDefaultClose:c,drawerRootProps:l}){let d=vc(),m=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):d.back())},{isMobile:i}=Y();return i&&!s?re(Ge.Root,{open:o?r:!0,onOpenChange:p=>{p||m({dragged:!0})},...l,children:it(Ge.Portal,{children:[re(Ge.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),re(Ge.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-gray-200 bg-white",t),children:it("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[it(Xr.Root,{children:[re(Ge.Title,{children:"Modal"}),re(Ge.Description,{children:"This is a modal"})]}),re(bc,{}),e]})}),re(Ge.Overlay,{})]})}):re(ne.Root,{open:o?r:!0,onOpenChange:p=>{p||m()},children:it(ne.Portal,{children:[re(ne.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),it(ne.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.preventDefault()},className:n("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-gray-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[it(Xr.Root,{children:[re(ne.Title,{children:"Modal"}),re(ne.Description,{children:"This is a modal"})]}),e]})]})})}function bc(){return re("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:re("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})})}import{Fragment as xc,jsx as nr,jsxs as nt}from"react/jsx-runtime";var Qa=n("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-gray-200 bg-white px-2 text-sm text-gray-600","outline-none hover:bg-gray-50 focus-visible:border-gray-500","disabled:cursor-not-allowed disabled:border-gray-200 disabled:text-gray-400 disabled:bg-gray-100");function Mv({pagination:e,setPagination:t,totalCount:r,unit:o=c=>`item${c?"s":""}`,className:a,children:s}){return nt("div",{className:n("flex items-center justify-between gap-2 text-sm leading-6 text-gray-600",a),children:[nt("div",{className:"flex items-center gap-2",children:[nt("div",{children:[nr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&nt(xc,{children:[nt("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ","of"," "]}),nr("span",{className:"font-medium",children:Rt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),s]}),nt("div",{className:"flex items-center gap-2",children:[nr("button",{type:"button",className:Qa,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),nr("button",{type:"button",className:Qa,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as De from"@radix-ui/react-radio-group";import{Circle as yc}from"lucide-react";import*as Jr from"react";import{jsx as sr}from"react/jsx-runtime";var wc=Jr.forwardRef(({className:e,...t},r)=>sr(De.Root,{className:n("grid gap-2",e),...t,ref:r}));wc.displayName=De.Root.displayName;var Cc=Jr.forwardRef(({className:e,...t},r)=>sr(De.Item,{ref:r,className:n("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:sr(De.Indicator,{className:"flex items-center justify-center",children:sr(yc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Cc.displayName=De.Item.displayName;import{Drawer as Ie}from"vaul";import{jsx as $e,jsxs as Mc}from"react/jsx-runtime";function Nc({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ie.NestedRoot:Ie.Root;return $e(a,{direction:"right",handleOnly:!0,...o,children:Mc(Ie.Portal,{children:[$e(Ie.Overlay,{className:"fixed inset-0 bg-black/20"}),$e(Ie.Content,{...t,onPointerDownOutside:s=>{var c;s.target instanceof Element&&s.target.closest("[data-sonner-toast]")&&s.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,s)},className:n("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:$e("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function kc({className:e,...t}){return $e(Ie.Title,{className:n("text-xl font-medium text-zinc-900",e),...t})}function Pc(e){return $e(Ie.Description,{...e})}function Sc(e){return $e(Ie.Close,{...e})}var zv=Object.assign(Nc,{Title:kc,Description:Pc,Close:Sc});import{useEffect as Rc,useRef as Lc,useState as Tc}from"react";import{jsx as Xa}from"react/jsx-runtime";var Ec=`
|
|
2
|
+
import{$ as nm,$a as Km,$b as D0,$c as Rp,A as Hu,Aa as Vo,Ab as f0,Ac as Bt,B as _u,Ba as Bo,Bb as g0,Bc as ap,C as Eo,Ca as Wo,Cb as h0,Cc as np,D as Ao,Da as Fo,Db as v0,Dc as ip,E as Do,Ea as Tm,Eb as b0,Ec as sp,F as Io,Fa as Lm,Fb as x0,Fc as sa,G as zo,Ga as Em,Gb as y0,Gc as lp,H as Vu,Ha as Uo,Hb as w0,Hc as cp,I as Bu,Ia as Go,Ib as Qo,Ic as la,J as Wu,Ja as $o,Jb as C0,Jc as dp,K as Fu,Ka as Am,Kb as N0,Kc as up,L as Uu,La as Dm,Lb as Xo,Lc as mp,M as Gu,Ma as Im,Mb as k0,Mc as pp,N as $u,Na as Nr,Nb as Jo,Nc as fp,O as Ku,Oa as zm,Ob as P0,Oc as gp,P as ju,Pa as Om,Pb as S0,Pc as hp,Q as Yu,Qa as Hm,Qb as M0,Qc as vp,R as Zu,Ra as Ko,Rb as R0,Rc as bp,S as qu,Sa as _m,Sb as T0,Sc as xp,T as Qu,Ta as Vm,Tb as ea,Tc as yp,U as Xu,Ua as Bm,Ub as ta,Uc as wp,V as Ju,Va as _t,Vb as ra,Vc as Cp,W as em,Wa as Wm,Wb as oa,Wc as Np,X as tm,Xa as Fm,Xb as L0,Xc as kp,Y as rm,Ya as Um,Yb as E0,Yc as Pp,Z as om,Za as Gm,Zb as A0,Zc as Sp,_ as am,_a as $m,_b as aa,_c as Mp,a as Co,aa as im,ab as jm,ac as I0,ad as Tp,b as Su,ba as sm,bb as Vt,bc as z0,bd as Lp,c as Mu,ca as lm,cb as Ym,cc as O0,cd as Ep,d as No,da as cm,db as Zm,dc as na,dd as Ap,e as ko,ea as dm,eb as qm,ec as H0,ed as Dp,f as Ru,fa as um,fb as Qm,fc as _0,fd as Ip,g as Po,ga as mm,gb as Xm,gc as V0,gd as zp,h as So,ha as pm,hb as Jm,hc as B0,hd as Op,i as Mo,ia as fm,ib as e0,ic as W0,id as Hp,j as Ro,ja as gm,jb as t0,jc as F0,jd as _p,k as mt,ka as hm,kb as r0,kc as U0,kd as Vp,l as Tu,la as Oo,lb as o0,lc as G0,ld as Bp,m as we,ma as vm,mb as a0,mc as $0,md as Wp,n as Lu,na as bm,nb as jo,nc as K0,nd as Fp,o as It,oa as xm,ob as Yo,oc as j0,od as Up,p as Eu,pa as ym,pb as Zo,pc as Y0,pd as Gp,q as zt,qa as Ho,qb as n0,qc as Z0,r as Au,ra as wm,rb as i0,rc as q0,s as To,sa as Cm,sb as s0,sc as ia,t as Lo,ta as Nm,tb as l0,tc as Q0,u as Du,ua as km,ub as c0,uc as X0,v as Ot,va as Pm,vb as qo,vc as J0,w as Iu,wa as Sm,wb as d0,wc as ep,x as Ht,xa as Mm,xb as u0,xc as tp,y as zu,ya as Rm,yb as m0,yc as rp,z as Ou,za as _o,zb as p0,zc as op}from"./chunk-TXOE2JB5.mjs";import{a as q}from"./chunk-NWME2ANF.mjs";import{a as fo,b as O,c as Et,d as At,e as go,f as qe,g as ho,h as vo,i as Dt,j as bo,k as xo,l as ut,m as yo,n as me,o as i,p as wo}from"./chunk-OWNJTMNY.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Kn}from"lucide-react";import*as Ft from"react";import{jsx as Wt,jsxs as qn}from"react/jsx-runtime";var qp=ne.Root,jn=Ft.forwardRef(({className:e,...t},r)=>Wt(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));jn.displayName="AccordionItem";var Yn=Ft.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?Kn:Bt;return Wt(ne.Header,{className:"flex",children:qn(ne.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,Wt(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Yn.displayName=ne.Trigger.displayName;var Zn=Ft.forwardRef(({className:e,children:t,...r},o)=>Wt(ne.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));Zn.displayName=ne.Content.displayName;import{cva as Qn}from"class-variance-authority";import*as Ut from"react";import{jsx as kr}from"react/jsx-runtime";var Xn=Qn("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"}}),Jn=Ut.forwardRef(({className:e,variant:t,...r},o)=>kr("div",{ref:o,role:"alert",className:i(Xn({variant:t}),e),...r}));Jn.displayName="Alert";var ei=Ut.forwardRef(({className:e,...t},r)=>kr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));ei.displayName="AlertTitle";var ti=Ut.forwardRef(({className:e,...t},r)=>kr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));ti.displayName="AlertDescription";import{sha256 as ri}from"js-sha256";import{useState as oi}from"react";import{jsx as Pr}from"react/jsx-runtime";function ai(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${ri(e.email)}?d=${encodeURIComponent(r)}`:t}function af({user:e={},className:t}){if(!e)return Pr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=oi(ai(e));return Pr("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.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function nf({id:e,className:t}){return Pr("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 ni}from"class-variance-authority";import{jsx as si}from"react/jsx-runtime";var ii=ni("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",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 Gt({className:e,variant:t,...r}){return si("span",{className:i(ii({variant:t}),e),...r})}import{cva as mi}from"class-variance-authority";import{forwardRef as pi}from"react";import*as pe from"@radix-ui/react-tooltip";import li from"linkify-react";import{HelpCircle as ci}from"lucide-react";import di from"next/link";import{useState as ui}from"react";import{jsx as K,jsxs as Qe}from"react/jsx-runtime";function yf({children:e}){return K(pe.Provider,{delayDuration:150,children:e})}function X({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[s,m]=ui(!1);return Qe(pe.Root,{open:s,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[K(pe.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),K(pe.Portal,{children:K(pe.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?K("span",{className:i("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function wf({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:[K("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?K(di,{href:r,...o?{target:o}:{},className:i(fe({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?K(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Cf({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," ",K("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function Nf({children:e}){return K("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-neutral-700",children:K(li,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-neutral-400 hover:text-neutral-700"},children:e})})}function kf(e){return K(X,{...e,children:K(ci,{className:"h-4 w-4 text-neutral-500"})})}function Pf({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:K(X,{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,Et(e||0,{full:!0})," ",t]}),a&&Qe("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",xo(a,{withAgo:!0})]})]}),children:o})}function Sf({children:e,content:t,...r}){return K(X,{content:t,...r,children:K("div",{className:"flex cursor-pointer items-center",children:K(Gt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Mf({children:e,tooltipProps:t,...r}){return K(X,{...t,children:K("button",{type:"button",...r,className:i("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}import{jsx as Xe,jsxs as ca}from"react/jsx-runtime";var fe=mi("transition-all",{variants:{variant:{primary:"border-black bg-black text-white hover:bg-neutral-800 hover:ring-4 hover:ring-neutral-200",secondary:i("border-neutral-200 bg-white text-neutral-900 hover:bg-neutral-50 focus-visible:border-neutral-500 outline-none","data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"),outline:"border-transparent text-neutral-600 hover:bg-neutral-100",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=pi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:s,disabledTooltip:m,right:d,...n},p)=>m?Xe(X,{content:m,children:ca("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&&Xe("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&Xe("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})]})}):ca("button",{ref:p,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":fe({variant:t}),r),disabled:n.disabled||l,...n,children:[l?Xe(we,{}):c||null,e&&Xe("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&Xe("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]}));ie.displayName="Button";import{cva as fi}from"class-variance-authority";import{createContext as gi}from"react";import{jsx as da}from"react/jsx-runtime";var hi=fi("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),pt=gi({variant:"loose"});function ua({variant:e="loose",loading:t=!1,className:r,children:o}){return da("ul",{className:i(hi({variant:e,loading:t}),r),"data-variant":e,children:da(pt.Provider,{value:{variant:e},children:o})})}import{cva as vi}from"class-variance-authority";import{createContext as bi,useContext as xi,useEffect as yi,useRef as wi,useState as Ci}from"react";import{jsx as ma,jsxs as Pi}from"react/jsx-runtime";var Ni=vi("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"}}}),ki="w-full py-2.5 px-4",Sr=bi({hovered:!1});function pa({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0,banner:l}){let{variant:c}=xi(pt),s=wi(null),[m,d]=Ci(!1);return yi(()=>{if(!m||!s.current)return;let n=setInterval(()=>{var p;((p=s.current)==null?void 0:p.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(n)},[m]),Pi("li",{ref:s,className:i(Ni({variant:c}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:[l,ma("div",{className:i(ki,t),onClick:o?n=>{document.getElementById("modal-backdrop")||ut(n)||o()}:void 0,children:ma(Sr.Provider,{value:{hovered:m},children:r})})]})}var Qf=Object.assign(ua,{Card:Object.assign(pa,{Context:Sr}),Context:pt});import Si from"embla-carousel-autoplay";import Mi from"embla-carousel-react";import{ArrowLeft as Ri,ArrowRight as Ti}from"lucide-react";import{createContext as Li,forwardRef as gt,useCallback as ft,useContext as Ei,useEffect as Mr,useState as Rr}from"react";import{jsx as Ce,jsxs as ha}from"react/jsx-runtime";var Tr=2e3,fa=Li(null);function ge(){let e=Ei(fa);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ga(){let{api:e}=ge(),[t,r]=Rr(0),o=ft(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Mr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Ai=gt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},m)=>{let[d,n]=Mi({...t,axis:e==="horizontal"?"x":"y"},[...o?[Si(typeof o=="object"?o:{delay:Tr})]:[],...a||[]]),[p,f]=Rr(!1),[v,x]=Rr(!1),g=ft(R=>{!R||(f(R.canScrollPrev()),x(R.canScrollNext()))},[]),h=ft(()=>{n==null||n.scrollPrev()},[n]),N=ft(()=>{n==null||n.scrollNext()},[n]),C=ft(R=>{R.key==="ArrowLeft"?(R.preventDefault(),h()):R.key==="ArrowRight"&&(R.preventDefault(),N())},[h,N]);return Mr(()=>{!n||!r||r(n)},[n,r]),Mr(()=>{if(!!n)return g(n),n.on("reInit",g),n.on("select",g),()=>{n==null||n.off("select",g)}},[n,g]),Ce(fa.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:h,scrollNext:N,canScrollPrev:p,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:C,className:i("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});Ai.displayName="Carousel";var Di=gt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ge();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Di.displayName="CarouselContent";var Ii=gt(({className:e,...t},r)=>{let{orientation:o}=ge();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Ii.displayName="CarouselItem";var zi=gt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=ge();return ha("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",fe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(Ri,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});zi.displayName="CarouselPrevious";var Oi=gt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=ge();return ha("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",fe({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(Ti,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});Oi.displayName="CarouselNext";import{cva as Hi}from"class-variance-authority";import{motion as _i}from"framer-motion";import{ChevronLeft as Vi,ChevronRight as Bi}from"lucide-react";import*as Re from"react";import{jsx as Be,jsxs as ht}from"react/jsx-runtime";var Wi=Hi("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 "}}}),g1=({variant:e="simple",className:t})=>{var x;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=ge(),s=(x=c==null?void 0:c.plugins())==null?void 0:x.autoplay,[m,d]=Re.useState(0),[n,p]=Re.useState(!1),f=Re.useCallback(g=>{d((g==null?void 0:g.selectedScrollSnap())??0)},[]),v=Re.useCallback(g=>()=>{s&&s.isPlaying()&&s.stop(),g()},[s]);return Re.useEffect(()=>{!c||(f(c),p((s==null?void 0:s.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,s,f]),ht("div",{className:i(Wi({variant:e}),t),children:[e!=="simple"&&ht("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[Be(Vi,{className:"h-4 w-4"}),Be("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Be("div",{className:"flex items-center gap-1",children:c.slideNodes().map((g,h)=>ht("button",{onClick:v(()=>c.scrollTo(h)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Be("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",h===m?"bg-black":"bg-black/20",n&&h===m&&"w-6 bg-black/20"),children:n&&h===m&&Be(_i.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Tr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),ht("span",{className:"sr-only",children:["Slide ",h+1]})]},h))}),e!=="simple"&&ht("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[Be(Bi,{className:"h-4 w-4"}),Be("span",{className:"sr-only",children:"Next slide"})]})]})};import Fi from"embla-carousel-react";import{forwardRef as Ui,useCallback as Gi,useEffect as $i}from"react";import{jsx as $t}from"react/jsx-runtime";var k1=({className:e,...t})=>{let{api:r}=ge(),[o,a]=Fi({dragFree:!0}),l=Gi(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return $i(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),$t("div",{className:"overflow-hidden",ref:o,children:$t("div",{className:i("mx-4 flex gap-4",e),...t})})},P1=Ui(({index:e,className:t,...r},o)=>{let{api:a}=ge(),l=ga();return $t("div",{ref:o,children:$t("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===l}):t,...r})})});import*as vt from"@radix-ui/react-checkbox";import{Check as Ki}from"lucide-react";import*as va from"react";import{jsx as Lr}from"react/jsx-runtime";var ji=va.forwardRef(({className:e,...t},r)=>Lr(vt.Root,{ref:r,className:i("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Lr(vt.Indicator,{className:"flex items-center justify-center",children:Lr(Ki,{className:"h-3 w-3 text-white"})})}));ji.displayName=vt.Root.displayName;import{Command as xt,CommandInput as Os,CommandItem as Hs,useCommandState as _s}from"cmdk";import{ChevronDown as Vs}from"lucide-react";import{forwardRef as Bs,isValidElement as Ws,useCallback as Fs,useEffect as Zt,useRef as Us,useState as bt}from"react";import{motion as Ds}from"framer-motion";import{forwardRef as Is,useRef as zs}from"react";import Er from"js-cookie";import{useEffect as Yi,useState as Zi}from"react";function A1(e,t,r){let[o,a]=Zi(()=>{let c=Er.get(e);return c?JSON.parse(c):t});return Yi(()=>{let c=()=>{let s=Er.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Er.set(e,JSON.stringify(c),r)}]}import{useCallback as qi,useEffect as Qi,useRef as Xi,useState as Ji}from"react";var Je=(e=3e3)=>{let t=Xi(null),[r,o]=Ji(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=qi(async c=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(s){console.error("Failed to copy: ",s)}},[e]);return Qi(()=>()=>a(),[]),[r,l]};import{useEffect as es,useState as ts}from"react";function H1(){let[e,t]=ts(null);return es(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var p,f,v;let m=s[0];if(!m)return;let d=(((p=m.rootBounds)==null?void 0:p.height)||0)*.3+o;for(let x=1;x<s.length;x++){let g=s[x];if(!g)break;(g.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=g)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(f=l.get(n))==null?void 0:f.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function V1(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as rs,useState as os}from"react";function U1(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=os(o??!1);return rs(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),p=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<p.bottom&&n.bottom>p.top&&n.left<p.right&&n.right>p.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 as,useState as ns}from"react";function K1(){let[e,t]=ns(!1);return as(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as is,useState as ss}from"react";function q1(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}){let[l,c]=ss(),s=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return is(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!d)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(m,p);return f.observe(d),()=>f.disconnect()},[e,JSON.stringify(t),r,o,s]),l}import{createContext as ls,useCallback as cs,useContext as ds,useEffect as ba,useId as us,useState as ms}from"react";import{jsx as ps}from"react/jsx-runtime";var xa=ls({listeners:[],setListeners:()=>{}});function rg({children:e}){let[t,r]=ms([]);return ps(xa.Provider,{value:{listeners:t,setListeners:r},children:e})}function et(e,t,r={}){let o=us(),{listeners:a,setListeners:l}=ds(xa),c=cs(s=>{let m=s.target,d=document.getElementById("modal-backdrop");if(s.metaKey||s.ctrlKey||m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||(Array.isArray(e)?!e.includes(s.key):s.key!==e))return;let n=a.filter(f=>f.enabled!==!1&&(Array.isArray(f.key)?f.key.includes(s.key):f.key===s.key));!n.length||bo(n,(f,v)=>(v.priority??0)-(f.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.modal]);ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),ba(()=>(l(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as fs,useState as gs}from"react";function ya(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function ng(e,t){let[r,o]=gs(ya(e)??t);return fs(()=>{let l=ya(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as hs}from"sonner";import vs from"swr";function dg(e,t){let{data:r,isLoading:o,mutate:a}=vs(e,me);return{data:r,isLoading:o,update:async(l,c)=>hs.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ka,useMemo as Cs}from"react";import{useEffect as wa,useState as bs}from"react";function Ca({pageSize:e,page:t,onPageChange:r}){let[o,a]=bs({pageIndex:t,pageSize:e});return wa(()=>{a(l=>({...l,pageIndex:t}))},[t]),wa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as xs,useRouter as ys,useSearchParams as ws}from"next/navigation";function Na(){let e=xs(),t=ys(),r=ws(),o=Object.fromEntries(r);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:({set:c,del:s,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([g,h])=>f.set(g,Array.isArray(h)?h.join(p):h)),s&&(Array.isArray(s)?s.forEach(g=>f.delete(g)):f.delete(s));let v=f.toString(),x=`${e}${v.length>0?`?${v}`:""}`;if(n)return x;m?t.replace(x,{scroll:!1}):t.push(x,{scroll:d})},getQueryString:(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((p,f)=>{var v;(v=s.include)!=null&&v.includes(f)&&n.set(f,p)}),m=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>m.delete(n)),c&&Object.entries(c).forEach(([n,p])=>m.set(n,p));let d=m.toString();return d.length>0?`?${d}`:""}}}function wg(e=go){let{searchParams:t,queryParams:r}=Na(),o=Cs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ca({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return ka(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),ka(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as Ns}from"react";function kg(){Ns(()=>{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 ks,useState as Ps}from"react";function Kt(e){let[t,r]=Ps(),o=([a])=>{r(a)};return ks(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as Ss,useEffect as Pa,useState as Ms}from"react";function Sa(e){let[t,r]=Ms(!1),o=Ss(()=>{r(window.scrollY>e)},[e]);return Pa(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),Pa(()=>{o()},[o]),t}import{useCallback as Rs,useEffect as Ts,useState as Ls}from"react";function tt(e){let[t,r]=Ls(1),o=Rs(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=Kt(e);return Ts(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Es}from"react";import{toast as Ra}from"sonner";import{jsx as jt,jsxs as Ma}from"react/jsx-runtime";function As({id:e,message:t,undo:r}){let o=()=>{r(),Ra.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return Es(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Ma("div",{className:"flex w-full items-center justify-between space-x-2",children:[Ma("div",{className:"flex items-center space-x-2",children:[jt(Mo,{}),jt("p",{className:"font-medium",children:t})]}),jt("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function _g(){return({id:t,message:r,undo:o,duration:a})=>Ra(jt(As,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ta}from"react/jsx-runtime";var Ne=Is(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let s=zs(null),m=Kt(s);return Ta(Ds.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?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Ta("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});Ne.displayName="AnimatedSizeContainer";import*as Te from"@radix-ui/react-popover";import{Drawer as rt}from"vaul";import{jsx as ke,jsxs as Yt}from"react/jsx-runtime";function ot({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:p,onWheel:f}){let{isMobile:v}=q();return c||v?Yt(rt.Root,{open:a,onOpenChange:l,children:[ke(rt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Yt(rt.Portal,{children:[ke(rt.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),Yt(rt.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-neutral-200 bg-white",onEscapeKeyDown:p,onPointerDownOutside:x=>{x.target instanceof Element&&x.target.closest("[data-sonner-toast]")&&x.preventDefault()},children:[ke("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:ke("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})}),ke("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:t})]}),ke(rt.Overlay,{})]})]}):Yt(Te.Root,{open:a,onOpenChange:l,children:[ke(Te.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),ke(Te.Portal,{children:ke(Te.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade z-50 items-center rounded-lg border border-neutral-200 bg-white drop-shadow-lg sm:block",s),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:p,onWheel:f,children:t})})]})}import{Fragment as qt,jsx as E,jsxs as Pe}from"react/jsx-runtime";function Gs(e,t){return e===!0}function ph({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:p,caret:f,side:v,open:x,onOpenChange:g,onSearchChange:h,shouldFilter:N=!0,inputRight:C,inputClassName:R,optionRight:k,optionClassName:w,matchTriggerWidth:D,children:y}){let T=Gs(e,r),M=Array.isArray(t)?t:t?[t]:[],{isMobile:J}=q(),[S,z]=bt(!1),Y=x??S,L=g??z,[Z,ee]=bt(""),[uo,yr]=bt(!1),[wr,Un]=bt(void 0),[Gn,mo]=bt(!1),$n=H=>{var Ze;if(T){let Cr=M.some(({value:dt})=>dt===H.value);r(Cr?M.filter(({value:dt})=>dt!==H.value):[...M,H])}else r(M.length&&((Ze=M[0])==null?void 0:Ze.value)===H.value?null:H),L(!1)},po=Fs((H,Ze)=>Ze===""?[...M,...H.filter(Cr=>M.findIndex(dt=>dt.value===Cr.value)===-1)]:H,[M]);return Zt(()=>{uo&&(Un(o&&po(o,Z)),yr(!1))},[uo,o,po,Z]),Zt(()=>{yr(!0)},[o]),Zt(()=>{Y||(ee(""),yr(!0))},[Y]),Zt(()=>h==null?void 0:h(Z),[Z]),E(ot,{openPopover:Y,setOpenPopover:L,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(D&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(Ne,{width:!J&&!D,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Pe(xt,{loop:!0,shouldFilter:N,children:[Pe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Os,{placeholder:c,value:Z,onValueChange:ee,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!Z)&&(H.preventDefault(),H.stopPropagation(),L(!1))}}),C&&E("div",{className:"mr-2",children:C}),p&&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:p})]}),E($s,{children:E(xt.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:wr!==void 0?Pe(qt,{children:[wr.map(H=>E(Ks,{option:H,multiple:T,selected:M.some(({value:Ze})=>Ze===H.value),onSelect:()=>$n(H),right:k==null?void 0:k(H),className:w},`${H.label}, ${H.value}`)),Z.length>0&&d&&Pe(Hs,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",w),onSelect:async()=>{mo(!0),await(d==null?void 0:d(Z))&&(ee(""),L(!1)),mo(!1)},children:[Gn?E(we,{className:"size-4 shrink-0"}):E(Bt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(m==null?void 0:m(Z))||`Create "${Z}"`})]}),N?E(Ys,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):wr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(xt.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(we,{})})})})})]})}),children:E(ie,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Pe(qt,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:y||M.map(H=>H.label).join(", ")||l}),f&&(f===!0?E(Vs,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:a?La(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var $s=({children:e})=>{let t=Us(null),{scrollProgress:r,updateScrollProgress:o}=tt(t);return Pe(qt,{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 Ks({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Pe(qt,{children:[E(js,{disabledTooltip:e.disabledTooltip,children:Pe(xt.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",l),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(Bo,{className:"size-4 text-neutral-600"}):E(Wo,{className:"size-4 text-neutral-400"})}),Pe("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:La(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(Vo,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(xt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var js=({children:e,disabledTooltip:t})=>t?E(X,{content:t,children:E("div",{children:e})}):e,La=e=>Ws(e),Ys=Bs((e,t)=>_s(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Qt,format as Zs,isSameMonth as qs}from"date-fns";import{ChevronLeft as Ea,ChevronRight as Aa,ChevronsLeft as Qs,ChevronsRight as Xs}from"lucide-react";import{forwardRef as Js,useRef as el}from"react";import{DayPicker as tl,useDayPicker as rl,useDayRender as ol,useNavigation as al}from"react-day-picker";import{Fragment as nl,jsx as re,jsxs as Xt}from"react/jsx-runtime";var yt=Js(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));yt.displayName="NavigationButton";function Da({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...m}){return re(tl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(Ea,{className:"h-4 w-4"}),IconRight:()=>re(Aa,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:p,previousMonth:f,currentMonth:v,displayMonths:x}=al(),{numberOfMonths:g,fromDate:h,toDate:N}=rl(),C=x.findIndex(M=>qs(d.displayMonth,M)),R=C===0,k=C===x.length-1,w=g>1&&(R||!k),D=g>1&&(k||!R),y=()=>{let M=Qt(v,-1);f&&(!h||M.getTime()>=h.getTime())&&n(M)},T=()=>{let M=Qt(v,1);p&&(!N||M.getTime()<=N.getTime())&&n(M)};return Xt("div",{className:"flex items-center justify-between",children:[Xt("div",{className:"flex items-center gap-1",children:[o&&!D&&re(yt,{disabled:a||!f||h&&Qt(v,-1).getTime()<h.getTime(),"aria-label":"Go to previous year",onClick:y,icon:Qs}),!D&&re(yt,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&n(f),icon:Ea})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Zs(d.displayMonth,"LLLL yyy",{locale:l})}),Xt("div",{className:"flex items-center gap-1",children:[!w&&re(yt,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&n(p),icon:Aa}),o&&!w&&re(yt,{disabled:a||!p||N&&Qt(v,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:T,icon:Xs})]})]})},Day:({date:d,displayMonth:n})=>{let p=el(null),{activeModifiers:f,buttonProps:v,divProps:x,isButton:g,isHidden:h}=ol(d,n,p),{selected:N,today:C,disabled:R,range_middle:k}=f;if(h)return re(nl,{});if(!g)return re("div",{...x,className:i("flex items-center justify-center",x.className)});let{children:w,...D}=v;return Xt("button",{ref:p,...D,type:"button",children:[w,C&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!N,"!bg-white":N,"!bg-blue-400":N&&k,"text-neutral-400":R})})]})}},...m})}import{enUS as hl}from"date-fns/locale";import{useEffect as Hr,useMemo as za,useState as er}from"react";import{Command as Ar}from"cmdk";import{Lock as il}from"lucide-react";import{jsx as We,jsxs as sl}from"react/jsx-runtime";var Dr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),s=(d,n)=>{let p=d.from,f=n.from,v=!1;p&&f&&c(p,f)&&(v=!0);let x=d.to,g=n.to,h=!1;return x&&g&&c(x,g)&&(h=!0),v&&h},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&s(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return We(Ar,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:We(Ar.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>sl(Ar.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:[We("span",{children:d.label}),d.requiresUpgrade?We(il,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?We("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&&We(X,{side:"bottom",content:d.tooltipContent,children:We("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Dr.displayName="DatePicker.Presets";import{format as Le}from"date-fns";import{createContext as ll}from"react";var Ir=ll({isOpen:!1,setIsOpen:()=>{}}),cl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},zr=(e,t,r=!1)=>{let o=!cl(),a;return r?a=o?Le(e,"d MMM, yyyy h:mm a",{locale:t}):Le(e,"d MMM, yyyy HH:mm",{locale:t}):a=Le(e,"d MMM, yyyy",{locale:t}),a},Ia=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var p,f,v,x,g,h;if("date"in n){let N=n.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&N>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Le(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let N=(p=n.dateRange.from)==null?void 0:p.getFullYear(),C=(f=n.dateRange.to)==null?void 0:f.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(C&&r&&C>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Le(a,"MMM, yyyy")}.`)}if(l){let R=(x=n.dateRange.to)==null?void 0:x.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Le(l,"MMM, yyyy")}.`)}if(c){let R=(g=n.dateRange.from)==null?void 0:g.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Le(c,"MMM dd, yyyy")}.`)}if(s){let R=(h=n.dateRange.to)==null?void 0:h.getDate();if(R&&R>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Le(s,"MMM dd, yyyy")}.`)}}})}};import{cva as dl}from"class-variance-authority";import{Calendar as ul,ChevronDown as ml}from"lucide-react";import{forwardRef as pl}from"react";import{jsx as Jt,jsxs as gl}from"react/jsx-runtime";var fl=dl(["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"}}}),Or=pl(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>gl("button",{ref:l,className:i(fl({hasError:o}),e),...a,children:[Jt(ul,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Jt("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Jt("span",{className:"text-neutral-400",children:r}):null)}),Jt(ml,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Or.displayName="DatePicker.Trigger";import{jsx as he,jsxs as bl}from"react/jsx-runtime";var vl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=hl,placeholder:n="Select date range",hasError:p,align:f="center",className:v,...x})=>{let{isDesktop:g}=q(),[h,N]=er(!1),[C,R]=er(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,w]=er((C==null?void 0:C.dateRange)??e??t??void 0),[D,y]=er(k==null?void 0:k.to),T=za(()=>k,[h]);Hr(()=>{w(e)},[e]),Hr(()=>{let L=a==null?void 0:a.find(({id:Z})=>Z===r);R(L),w((L==null?void 0:L.dateRange)??e??t)},[a,r]),Hr(()=>{h?k&&y(k.to):y(k==null?void 0:k.to)},[h]);let M=(L,Z)=>{let ee=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:Z}:L;w(ee),R(void 0),(ee==null?void 0:ee.from)&&(ee==null?void 0:ee.to)&&(o==null||o(ee),N(!1))},J=L=>{w(L.dateRange),R(L),o==null||o(L.dateRange,L),N(!1)},S=()=>{w(T),N(!1)},z=L=>{L||S(),N(L)},Y=za(()=>k?`${k.from?zr(k.from,d):""} - ${k.to?zr(k.to,d):""}`:null,[k,d]);return et((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let Z=a==null?void 0:a.find(ee=>ee.shortcut===L.key);Z&&J(Z)}),he(Ir.Provider,{value:{isOpen:h,setIsOpen:N},children:he(ot,{align:f,openPopover:h,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:he("div",{className:"flex w-full",children:bl("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&he("div",{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:he("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:he(Dr,{currentPresetId:r,currentValue:k,presets:a,onSelect:J})})}),he("div",{className:"scrollbar-hide overflow-x-scroll",children:he(Da,{mode:"range",selected:k,onSelect:M,month:D,onMonthChange:y,numberOfMonths:g?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"},...x})})]})}),children:he(Or,{placeholder:n,disabled:l,className:v,hasError:p,"aria-required":x.required||x["aria-required"],"aria-invalid":x["aria-invalid"],"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],children:(C==null?void 0:C.label)??Y})})})};function qh({presets:e,...t}){return e&&Ia(e,t),he(vl,{presets:e,...t})}import{jsx as tr,jsxs as Oa}from"react/jsx-runtime";function r2({icon:e,title:t,description:r,learnMore:o,children:a}){return Oa("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[tr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:tr(e,{className:"size-6 text-neutral-800"})}),tr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Oa("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&tr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as xl}from"class-variance-authority";import{useState as Ha}from"react";import{toast as _a}from"sonner";import{Fragment as wl,jsx as ve,jsxs as Vr}from"react/jsx-runtime";var _r={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)"}},yl=xl("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 p2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:s=Ko,customPreview:m,accept:d="any",imageSrc:n,loading:p=!1,clickToUpload:f=!0,showHoverOverlay:v=!0,content:x,maxFileSizeMB:g=0,targetResolution:h,accessibilityLabel:N="File upload",disabled:C=!1}){let[R,k]=Ha(!1),[w,D]=Ha(null),y=async T=>{let M="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!M)return;if(D(M.name),g>0&&M.size/1024/1024>g){_a.error(`File size too big (max ${g} MB)`);return}let J=_r[d].types;if(J.length&&!J.includes(M.type)){_a.error(_r[d].errorMessage??"File type not supported");return}let S=M;if(h&&M.type.startsWith("image/"))try{let z=await vo(M,h),Y=await fetch(z).then(L=>L.blob());S=new File([Y],M.name,{type:M.type})}catch(z){console.error("Error resizing image:",z)}if(t){let z=new FileReader;z.onload=Y=>{var L;return r==null?void 0:r({src:(L=Y.target)==null?void 0:L.result,file:S})},z.readAsDataURL(S);return}r==null||r({file:S})};return Vr("label",{className:i(yl({variant:o}),C?"cursor-not-allowed":i(f&&"cursor-pointer"),a),children:[p&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(mt,{})}),ve("div",{className:"absolute inset-0 z-[5]",onDragOver:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragEnter:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragLeave:T=>{T.preventDefault(),T.stopPropagation(),k(!1)},onDrop:async T=>{T.preventDefault(),T.stopPropagation(),y(T),k(!1)}}),Vr("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",C&&"bg-neutral-50",R&&!C&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",v&&!C&&"group-hover:opacity-100"):i(!C&&"group-hover:bg-neutral-50")),children:[ve(s,{className:i("size-7 transition-all duration-75",C?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),x!==null&&ve("div",{className:i("mt-2 text-center text-sm text-neutral-500",C&&"text-neutral-400"),children:x??ve(wl,{children:Vr("p",{children:["Drag and drop ",f&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:N})]}),n&&(m??ve("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),f&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:_r[d].types.join(","),onChange:y,disabled:C},w)})]})}import{AnimatePresence as Cl,motion as Va}from"framer-motion";import{X as Nl}from"lucide-react";import{isValidElement as kl}from"react";import{Fragment as Pl,jsx as te,jsxs as wt}from"react/jsx-runtime";function Wa({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return et("Escape",o,{priority:1}),te(Ne,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:wt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[te("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:te(Cl,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return te(Va.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===l);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var f,v,x;let d=(f=s.options)==null?void 0:f.find(g=>typeof g.value=="string"&&typeof m=="string"?g.value.toLowerCase()===m.toLowerCase():g.value===m),n=(d==null?void 0:d.icon)??((v=s.getOptionIcon)==null?void 0:v.call(s,m,{key:s.key,option:d}))??s.icon,p=(d==null?void 0:d.label)??((x=s.getOptionLabel)==null?void 0:x.call(s,m,{key:s.key,option:d}))??m;return wt(Va.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:[wt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[te("span",{className:"shrink-0 text-neutral-600",children:Ba(s.icon)?s.icon:te(s.icon,{className:"h-4 w-4"})}),s.label]}),te("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),te("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?wt(Pl,{children:[te("span",{className:"shrink-0 text-neutral-600",children:Ba(n)?n:te(n,{className:"h-4 w-4"})}),Dt(p,30)]}):te("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),te("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,m),children:te(Nl,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&wt("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",te("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 Ba=e=>kl(e);import{Command as Ee,useCommandState as Sl}from"cmdk";import{ChevronDown as Ml,ListFilter as Rl}from"lucide-react";import{Fragment as Tl,forwardRef as Ll,isValidElement as Ua,useCallback as rr,useEffect as or,useImperativeHandle as El,useRef as Wr,useState as Br}from"react";import{Fragment as Hl,jsx as _,jsxs as be}from"react/jsx-runtime";function Ga({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:m,emptyState:d,className:n}){var M,J;let{isMobile:p}=q(),f=Wr(null),v=Wr(),[x,g]=Br(!1);et("f",()=>g(!0),{enabled:!x});let[h,N]=Br(""),[C,R]=Br(null),k=rr(()=>{N(""),R(null)},[]);or(()=>{x||k()},[x]);let w=C?e.find(({key:S})=>S===C):null,D=rr(S=>{f.current&&(v.current={width:f.current.clientWidth,height:f.current.clientHeight}),N(""),R(S),o==null||o(S)},[]),y=rr(S=>{if(!w||!c)return!1;let z=c.find(({key:Y})=>Y===C);return(z==null?void 0:z.value)===S||z&&w.multiple&&Array.isArray(z.value)&&z.value.includes(S)},[w]),T=rr(S=>{w&&(y(S)?r(w.key,S):t(w.key,S),w.multiple||g(!1))},[c,w,s]);return or(()=>{a==null||a(h)},[h]),or(()=>{l==null||l(C)},[C]),or(()=>{(w==null?void 0:w.options)&&f.current&&(v.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),_(ot,{openPopover:x,setOpenPopover:g,onEscapeKeyDown:S=>{C&&(S.preventDefault(),k())},content:_(Ne,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:be(Ee,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[be("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Dl,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:h,onValueChange:N,onKeyDown:S=>{(S.key==="Escape"||S.key==="Backspace"&&!h)&&(S.preventDefault(),S.stopPropagation(),C?k():g(!1))},emptySubmit:S=>{S.preventDefault(),S.stopPropagation(),s?(t("ai",w?`${w.label} ${h}`:h),g(!1)):T(h)}}),!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"})]}),_(Il,{ref:f,children:be(Ee.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((J=(M=w.options)==null?void 0:M.filter(S=>!h||!S.hideDuringSearch))==null?void 0:J.map(S=>{let z=y(S.value);return _(Fa,{filter:w,option:S,right:z?_(_o,{className:"h-4 w-4"}):S.right,onSelect:()=>T(S.value)},S.value)}))??_(Ee.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(we,{})})}):e.map(S=>be(Tl,{children:[_(Fa,{filter:S,onSelect:()=>D(S.key)}),S.separatorAfter&&_(Ee.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},S.key)),(!w||w.options)&&_(zl,{search:h,askAI:s,children:d?Al(d)?(d==null?void 0:d[C??"default"])??"No matches":d:"No matches"})]})},C)]})}),children:be("button",{type:"button",className:i("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(Rl,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(Ml,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Al(e){return typeof e=="object"&&e!==null&&!Ua(e)}var Dl=e=>{let t=Sl(r=>r.filtered.count===0);return _(Ee.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"})},Il=Ll(({children:e},t)=>{let r=Wr(null);El(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=tt(r);return be(Hl,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Fa({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=q(),l=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 be(Ee.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:[_("span",{className:"shrink-0 text-neutral-600",children:Ol(l)?l:_(l,{className:"h-4 w-4"})}),Dt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var zl=({search:e,askAI:t,children:r})=>t&&e?be(Ee.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(ko,{className:"h-4 w-4"}),be("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",be("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ee.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Ol=e=>Ua(e);var H2={Select:Ga,List:Wa};import{useMemo as _l,useState as $a}from"react";import{jsx as Fe,jsxs as ar}from"react/jsx-runtime";function G2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,m]=$a(r.defaultValue),[d,n]=$a(!1),p=_l(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return ar("form",{onSubmit:async f=>{f.preventDefault(),n(!0),await c({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[ar("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[ar("div",{className:"flex flex-col space-y-3",children:[Fe("h2",{className:"text-xl font-medium",children:e}),Fe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Fe("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:f=>m(f.target.value),className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":l})}):Fe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),ar("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"?Fe("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,Fe("div",{className:"shrink-0",children:Fe(ie,{text:a,loading:d,disabled:p,disabledTooltip:l})})]})]})}import{useId as Vl}from"react";import{jsx as nr,jsxs as Bl}from"react/jsx-runtime";function Y2({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Vl();return Bl("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[nr("defs",{children:nr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:nr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),nr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Wl}from"lucide-react";import Fl,{useCallback as Ul,useState as Gl}from"react";import{jsx as Ue,jsxs as Fr}from"react/jsx-runtime";var $l=Fl.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Gl(!1),c=Ul(()=>l(!a),[a,l]);return Fr("div",{children:[Fr("div",{className:"relative flex",children:[Ue("input",{type:a?"text":t,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",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Fr("div",{className:"group",children:[r.error&&Ue("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ue(Wl,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ue("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?Ue(jo,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ue(Yo,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ue("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});$l.displayName="Input";import{flip as Zl,offset as ql,size as Ql,useDismiss as Xl,useFloating as Jl,useInteractions as ec}from"@floating-ui/react";import{Command as Se,useCommandState as tc}from"cmdk";import{Check as rc,ChevronDown as oc,Search as ac,X as nc}from"lucide-react";import{createContext as ic,forwardRef as qa,useContext as Kr,useEffect as Ur,useMemo as ja,useRef as Ya,useState as Gr}from"react";import{Drawer as at}from"vaul";import Kl from"next/image";import{useEffect as jl,useState as Ka}from"react";import{jsx as Yl}from"react/jsx-runtime";function Ct(e){let[t,r]=Ka(!0),[o,a]=Ka(e.src);jl(()=>a(e.src),[e.src]);let l=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Yl(Kl,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as I,jsxs as se}from"react/jsx-runtime";var ir=ic({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function wv({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=q(),n=Ya(null),[p,f]=Gr(!1),[v,x]=Gr(""),[g,h]=Gr(!1);Ur(()=>{p&&h(!1)},[p]),Ur(()=>h(!0),[v]),Ur(()=>{t&&x(t.value)},[t]);let N=ja(()=>{let z=v.toLowerCase();return g?e.filter(Y=>Y.value.toLowerCase().includes(z)):v?e.sort((Y,L)=>(L.value.toLowerCase().includes(z)?1:0)-(Y.value.toLowerCase().includes(z)?1:0)):e},[g,v,e]),{refs:C,floatingStyles:R,context:k}=Jl({open:p,onOpenChange:f,middleware:[ql(8),Ql({apply({elements:{floating:z},availableHeight:Y}){Object.assign(z.style,{maxHeight:`${Math.max(75,Math.min(Y,290))}px`})},padding:8}),Zl({fallbackStrategy:"initialPlacement",padding:8})]}),w=Xl(k,{enabled:!d||!l}),{getReferenceProps:D,getFloatingProps:y}=ec([w]),T=Ya(null),{scrollProgress:M,updateScrollProgress:J}=tt(T),S=ja(()=>t&&t.icon?t.icon:t&&t.image?I(Ct,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||I(ac,{className:"size-4 text-neutral-400"}),[t,c]);return I(ir.Provider,{value:{inputAttrs:s||{},openCommandList:p,setOpenCommandList:f,inputValue:v,setInputValue:x,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(at.Root,{open:p,onOpenChange:f,children:[I(at.Trigger,{className:"sm:hidden",asChild:!0,children:I(Se,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:I($r,{className:o,iconElement:S})})}),I(at.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(at.Portal,{children:[I(at.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:z=>{z.target instanceof Element&&z.target.closest("[data-sonner-toast]")&&z.preventDefault()},children:se(Se,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I("div",{className:"p-2",children:I($r,{className:o,iconElement:S})}),p&&se(Se.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?I("div",{children:m}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&I(Se.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),I(Za,{items:N})]})]})}),I(at.Overlay,{})]})]}):se(Se,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I($r,{className:o,iconElement:S,ref:C.setReference,...D()}),p&&se("div",{ref:C.setFloating,style:R,...y(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:T,onScroll:J,className:"grow overflow-y-auto p-2",children:[se(Se.List,{children:[e.length===0&&v===""&&(m?I("div",{children:m}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&I(Se.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),I(Za,{items:N})]}),I("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(M,2)}})]})]})})}var $r=qa(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:i("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[I("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[I(sc,{}),I(lc,{})]})]})),sc=qa((e,t)=>{let r=tc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:m}=Kr(ir);return I(Se.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function lc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Kr(ir);return I("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?I(nc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):I(oc,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Za({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Kr(ir);return e.map(a=>se(Se.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&I(Ct,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),I("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&&I(Gt,{className:"text-xs",variant:"neutral",children:a.label})]}),I(rc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as jr from"@radix-ui/react-label";import{cva as cc}from"class-variance-authority";import*as Qa from"react";import{jsx as mc}from"react/jsx-runtime";var dc=cc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),uc=Qa.forwardRef(({className:e,...t},r)=>mc(jr.Root,{ref:r,className:i(dc(),e),...t}));uc.displayName=jr.Root.displayName;import{curveNatural as Xa}from"@visx/curve";import{LinearGradient as Ja}from"@visx/gradient";import{Group as pc}from"@visx/group";import{ParentSize as fc}from"@visx/responsive";import{scaleLinear as gc,scaleUtc as hc}from"@visx/scale";import{Area as vc,AreaClosed as bc}from"@visx/shape";import{motion as en}from"framer-motion";import{useId as xc,useMemo as tn}from"react";import{jsx as xe,jsxs as Yr}from"react/jsx-runtime";function Iv(e){return xe(fc,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(yc,{...{width:t,height:r,...e}})})}var Ae={top:8,right:2,bottom:2,left:2};function yc({width:e,height:t,data:r,curve:o=!0,color:a}){let l=xc(),c=tn(()=>r.map(({date:d})=>({date:d,value:0})),[r]),{yScale:s,xScale:m}=tn(()=>{let d=r.map(({value:x})=>x),n=Math.max(...d),p=r.map(({date:x})=>x.getTime()),f=new Date(Math.min(...p)),v=new Date(Math.max(...p));return{yScale:gc({domain:[-2,Math.max(n,2)],range:[t-Ae.top-Ae.bottom,0],nice:!0,clamp:!0}),xScale:hc({domain:[f,v],range:[0,e-Ae.left-Ae.right],nice:!0})}},[r,t,e]);return Yr("svg",{width:e,height:t,children:[Yr("defs",{children:[xe(Ja,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-Ae.left-Ae.right,gradientUnits:"userSpaceOnUse"}),xe(Ja,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),Yr(pc,{left:Ae.left,top:Ae.top,children:[xe(vc,{data:r,x:({date:d})=>m(d),y:({value:d})=>s(d)??0,curve:o?Xa:void 0,children:({path:d})=>xe(en.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),xe(bc,{data:r,x:({date:d})=>m(d),y:({value:d})=>s(d)??0,yScale:s,curve:o?Xa:void 0,children:({path:d})=>xe(en.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as Zr from"@radix-ui/react-visually-hidden";import{useRouter as wc}from"next/navigation";import{Drawer as Ge}from"vaul";import{jsx as oe,jsxs as nt}from"react/jsx-runtime";function Bv({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let m=wc(),d=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):m.back())},{isMobile:n}=q();return n&&!l?oe(Ge.Root,{open:o?r:!0,onOpenChange:p=>{p||d({dragged:!0})},...s,children:nt(Ge.Portal,{children:[oe(Ge.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(Ge.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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(Zr.Root,{children:[oe(Ge.Title,{children:"Modal"}),oe(Ge.Description,{children:"This is a modal"})]}),oe(Cc,{}),e]})}),oe(Ge.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:p=>{p||d()},children:nt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),nt(le.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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(Zr.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function Cc(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as Nc,jsx as sr,jsxs as it}from"react/jsx-runtime";var rn=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 Uv({pagination:e,setPagination:t,totalCount:r,unit:o=c=>`item${c?"s":""}`,className:a,children:l}){return it("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[it("div",{className:"flex items-center gap-2",children:[it("div",{children:[sr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&it(Nc,{children:[it("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ","of"," "]}),sr("span",{className:"font-medium",children:Et(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),it("div",{className:"flex items-center gap-2",children:[sr("button",{type:"button",className:rn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),sr("button",{type:"button",className:rn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as De from"@radix-ui/react-radio-group";import{Circle as kc}from"lucide-react";import*as qr from"react";import{jsx as lr}from"react/jsx-runtime";var Pc=qr.forwardRef(({className:e,...t},r)=>lr(De.Root,{className:i("grid gap-2",e),...t,ref:r}));Pc.displayName=De.Root.displayName;var Sc=qr.forwardRef(({className:e,...t},r)=>lr(De.Item,{ref:r,className:i("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:lr(De.Indicator,{className:"flex items-center justify-center",children:lr(kc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Sc.displayName=De.Item.displayName;import{Drawer as Ie}from"vaul";import{jsx as $e,jsxs as Ec}from"react/jsx-runtime";function Mc({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ie.NestedRoot:Ie.Root;return $e(a,{direction:"right",handleOnly:!0,...o,children:Ec(Ie.Portal,{children:[$e(Ie.Overlay,{className:"fixed inset-0 bg-black/20"}),$e(Ie.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:i("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:$e("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Rc({className:e,...t}){return $e(Ie.Title,{className:i("text-xl font-medium text-zinc-900",e),...t})}function Tc(e){return $e(Ie.Description,{...e})}function Lc(e){return $e(Ie.Close,{...e})}var Qv=Object.assign(Mc,{Title:Rc,Description:Tc,Close:Lc});import{useEffect as Ac,useRef as Dc,useState as Ic}from"react";import{jsx as on}from"react/jsx-runtime";var zc=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,Oc=`
|
|
10
10
|
precision mediump float;
|
|
11
11
|
|
|
12
12
|
uniform vec2 resolution;
|
|
@@ -39,14 +39,14 @@ void main(void) {
|
|
|
39
39
|
|
|
40
40
|
gl_FragColor = fragColor;
|
|
41
41
|
}
|
|
42
|
-
`,Dc=60,Ic=1e3/Dc;function Vv({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Lc(null),[s,c]=Tc(!1);return Rc(()=>{let l=a.current;if(!l||!l.parentElement)return;let d=l.parentElement,m=window.devicePixelRatio||1;l.width=d.clientWidth*m,l.height=d.clientHeight*m;let i=l.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(i===null){alert("Failed to initialize WebGL");return}let p=i.createProgram();if(!p){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let z=R===0?Ec:Ac,D=i.createShader(R===0?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!D){console.error("Failed to create shader");return}i.shaderSource(D,z),i.compileShader(D),i.getShaderParameter(D,i.COMPILE_STATUS)||console.error(i.getShaderInfoLog(D)),i.attachShader(p,D),i.linkProgram(p)}i.getProgramParameter(p,i.LINK_STATUS)||console.error(i.getProgramInfoLog(p));let f=i.getAttribLocation(p,"position"),x=i.getUniformLocation(p,"time"),h=i.getUniformLocation(p,"resolution"),b=i.getUniformLocation(p,"dotSize"),g=i.getUniformLocation(p,"cellSize"),N=i.getUniformLocation(p,"speed");i.useProgram(p);let S=[1,1,-1,1,1,-1,-1,-1],M=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,M),i.bufferData(i.ARRAY_BUFFER,new Float32Array(S),i.STATIC_DRAW),i.enableVertexAttribArray(f),i.vertexAttribPointer(f,2,i.FLOAT,!1,0,0),i.uniform1f(b,e*window.devicePixelRatio),i.uniform1f(g,t*window.devicePixelRatio),i.uniform1f(N,r);let P,w=0;function y(R){if(R-w<Ic){P=requestAnimationFrame(y);return}w=R,i&&l&&p&&(i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.uniform1f(x,R/1e3),i.uniform2f(h,l.width,l.height),i.drawArrays(i.TRIANGLE_STRIP,0,4)),P=requestAnimationFrame(y)}return P=requestAnimationFrame(y),l.addEventListener("webglcontextlost",R=>{R.preventDefault(),c(!0),cancelAnimationFrame(P)}),()=>{cancelAnimationFrame(P),l.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Xa("div",{className:n("absolute inset-0",o,s&&"opacity-0"),children:Xa("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as zc}from"class-variance-authority";import{jsx as Hc,jsxs as Vc}from"react/jsx-runtime";var Oc=zc("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-gray-500/[.15] text-gray-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"}}),_c={neutral:Uo,new:Wo,success:Bo,pending:Fo,warning:Cr,error:Cr};function $v({className:e,variant:t,icon:r,onClick:o,children:a,...s}){let c=r!==null?r??_c[t??"neutral"]:null;return Vc("span",{className:n(Oc({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...s,children:[c&&Hc(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as cr from"@radix-ui/react-switch";import{useMemo as Bc}from"react";import{jsx as lr}from"react/jsx-runtime";function Jv({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:s,checked:c=!0,loading:l=!1,disabled:d=!1,disabledTooltip:m}){let i=Bc(()=>m?!0:d||l,[m,d,l]),p=lr(cr.Root,{checked:l?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:i,className:n("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-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:lr(cr.Thumb,{className:n(`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:s})});return m?lr(ee,{content:m,children:lr("div",{children:p})}):p}import{flexRender as Ja,getCoreRowModel as Wc,useReactTable as Fc}from"@tanstack/react-table";import{AnimatePresence as Uc,motion as Gc}from"framer-motion";import{useEffect as eo,useState as ei}from"react";import{jsx as j,jsxs as Pe}from"react/jsx-runtime";var ti=(e,t)=>n(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-gray-200 px-4 relative","border-l border-b",e==="menu"&&"bg-white border-l-transparent py-0 px-1",t&&"group-hover/row:bg-neutral-50 transition-colors duration-75"]);function Cb(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:s,pagination:c,onPaginationChange:l,getRowId:d}=e,[m,i]=ei(e.columnVisibility??{}),[p,f]=ei(e.selectedRows??{});eo(()=>{var h;(h=e.onRowSelectionChange)==null||h.call(e,x.getSelectedRowModel().rows)},[p]),eo(()=>{e.columnVisibility&&!bo(e.columnVisibility,m)&&i(e.columnVisibility??{})},[e.columnVisibility]),eo(()=>{var h;(h=e.onColumnVisibilityChange)==null||h.call(e,m)},[m]);let x=Fc({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,...a},getCoreRowModel:Wc(),onPaginationChange:l,onColumnVisibilityChange:h=>i(h),onRowSelectionChange:f,state:{pagination:c,columnVisibility:m,columnPinning:{left:[],right:[],...s},rowSelection:p},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:d});return{...e,columnVisibility:m,table:x}}function Nb({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:s,sortBy:c,sortOrder:l,onSortChange:d,sortableColumns:m=[],className:i,containerClassName:p,scrollWrapperClassName:f,thClassName:x,tdClassName:h,table:b,pagination:g,resourceName:N,onRowClick:S,rowCount:M,children:P}){return Pe("div",{className:n("relative rounded-xl border border-gray-200 bg-white",p),children:[!o&&!!(t!=null&&t.length)||r?Pe("div",{className:n("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[Pe("table",{className:n(["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"],i),children:[j("thead",{children:b.getHeaderGroups().map(w=>j("tr",{children:w.headers.map(y=>{let R=m.includes(y.column.id),z=R?"button":"div";return j("th",{className:n(ti(y.id),"select-none font-medium",ri(y.column,!b.getRowModel().rows.length),typeof x=="function"?x(y.column.id):x),style:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto",...oi(y.column)},children:j("div",{className:"flex items-center justify-between gap-6 !pr-0",children:Pe(z,{className:"flex items-center gap-2",...R&&{type:"button",disabled:!R,"aria-label":"Sort by column",onClick:()=>d==null?void 0:d({sortBy:y.column.id,sortOrder:c!==y.column.id||l==="asc"?"desc":"asc"})},children:[j("span",{children:y.isPlaceholder?null:Ja(y.column.columnDef.header,y.getContext())}),R&&j(ko,{order:c===y.column.id?l||"desc":null})]})})},y.id)})},w.id))}),j("tbody",{children:b.getRowModel().rows.map(w=>j("tr",{className:n("group/row",S&&"cursor-pointer select-none",b.getRowModel().rows.length>8&&w.index===b.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:S?y=>{Et(y)||S(w,y)}:void 0,children:w.getVisibleCells().map(y=>j("td",{className:n(ti(y.column.id,!!S),"group text-gray-600",ri(y.column,w.index===b.getRowModel().rows.length-1),typeof h=="function"?h(y.column.id):h),style:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto",...oi(y.column)},children:Pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[j("div",{className:"min-w-0 shrink grow truncate",children:Ja(y.column.columnDef.cell,y.getContext())}),s==null?void 0:s(y)]})},y.id))},w.id))})]}),P]}):j("div",{className:"flex h-96 w-full items-center justify-center text-sm text-gray-500",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!M&&Pe("div",{className:"sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t border-gray-200 bg-white px-4 py-3.5 text-sm leading-6 text-gray-600",children:[Pe("div",{children:[j("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",Pe("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,b.getRowCount())]})," ","of"," ",j("span",{className:"font-medium",children:b.getRowCount().toLocaleString()})," ",(N==null?void 0:N(b.getRowCount()!==1))||"items"]}),Pe("div",{className:"flex items-center gap-2",children:[j(ie,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>b.previousPage(),disabled:g.pageIndex===1}),j(ie,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>b.nextPage(),disabled:g.pageIndex===b.getPageCount()})]})]}),j(Uc,{children:r&&j(Gc.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl bg-white/50",children:j(ye,{})})})]})}var ri=(e,t)=>{let r=e.getIsPinned();return n(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},oi=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 $c,motion as ai}from"framer-motion";import{useId as Kc}from"react";import{jsx as dr,jsxs as jc}from"react/jsx-runtime";function Rb({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:s,style:c}){let l=Kc();return dr($c,{id:l,children:dr(ai.div,{layout:!0,className:n("relative inline-flex items-center gap-1 rounded-xl border border-gray-200 bg-white p-1",o),style:c,children:e.map(d=>jc("button",{type:"button",className:n("relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"z-[11] transition-colors hover:text-gray-500":d.value!==t},a),onClick:()=>r(d.value),children:[typeof d.label=="string"?dr("p",{children:d.label}):d.label,d.badge,d.value===t&&dr(ai.div,{layoutId:l,className:n("absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border border-gray-200 bg-gray-50",s),transition:{duration:.25}})]},d.value))})})}import{useEffect as Yc,useId as Zc,useRef as qc,useState as Qc}from"react";import{jsx as se,jsxs as to}from"react/jsx-runtime";var Xc=[{key:"utm_source",icon:qo,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:na,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Yo,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:ra,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:aa,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Zo,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Ob({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:s}){let{isMobile:c}=Y(),l=Zc(),[d,m]=Qc(!1),i=qc(null);return Yc(()=>{i.current&&!c&&o&&setTimeout(()=>{var p;return(p=i.current)==null?void 0:p.focus()},10)},[]),se("div",{className:n("grid gap-y-3",s),children:Xc.map(({key:p,icon:f,label:x,placeholder:h,description:b},g)=>se("div",{className:"group relative",children:to("div",{className:"relative z-10 flex",children:[se(ee,{content:to("div",{className:"p-3 text-center text-xs",children:[se("p",{className:"text-gray-600",children:b}),se("span",{className:"font-mono text-gray-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:to("div",{className:n("flex items-center gap-1.5 rounded-l-md border-y border-l border-gray-300 bg-gray-50 px-3 py-1.5 text-gray-700",d?"sm:min-w-36":"sm:min-w-28"),onClick:()=>m(N=>!N),children:[se(f,{className:"size-4 shrink-0"}),se("label",{htmlFor:`${l}-${p}`,className:"select-none text-sm",children:d?se("span",{className:"font-mono text-xs",children:p}):x})]})}),se("div",{className:"min-w-0 grow",children:se(Jc,{disabledTooltip:a,children:se("input",{type:"text",id:`${l}-${p}`,ref:g===0?i:void 0,placeholder:h,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-gray-300 placeholder-gray-400 focus:border-gray-500 focus:ring-gray-500 disabled:cursor-not-allowed sm:text-sm",value:e[p]||"",onChange:N=>t(p,N.target.value)})})})]})},p))})}function Jc({children:e,disabledTooltip:t}){return t?se(ee,{content:t,disableHoverableContent:!0,children:e}):e}import{jsx as ro,jsxs as ed}from"react/jsx-runtime";function Hb(){return ed("div",{style:mr.backgroundMain,children:[ro("div",{style:mr.backgroundMainBefore}),ro("div",{style:mr.backgroundMainAfter}),ro("div",{style:mr.backgroundContent})]})}var mr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
42
|
+
`,Hc=60,_c=1e3/Hc;function tb({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Dc(null),[l,c]=Ic(!1);return Ac(()=>{let s=a.current;if(!s||!s.parentElement)return;let m=s.parentElement,d=window.devicePixelRatio||1;s.width=m.clientWidth*d,s.height=m.clientHeight*d;let n=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let p=n.createProgram();if(!p){console.error("Failed to create shader program");return}for(let y=0;y<2;++y){let T=y===0?zc:Oc,M=n.createShader(y===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!M){console.error("Failed to create shader");return}n.shaderSource(M,T),n.compileShader(M),n.getShaderParameter(M,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(M)),n.attachShader(p,M),n.linkProgram(p)}n.getProgramParameter(p,n.LINK_STATUS)||console.error(n.getProgramInfoLog(p));let f=n.getAttribLocation(p,"position"),v=n.getUniformLocation(p,"time"),x=n.getUniformLocation(p,"resolution"),g=n.getUniformLocation(p,"dotSize"),h=n.getUniformLocation(p,"cellSize"),N=n.getUniformLocation(p,"speed");n.useProgram(p);let C=[1,1,-1,1,1,-1,-1,-1],R=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,R),n.bufferData(n.ARRAY_BUFFER,new Float32Array(C),n.STATIC_DRAW),n.enableVertexAttribArray(f),n.vertexAttribPointer(f,2,n.FLOAT,!1,0,0),n.uniform1f(g,e*window.devicePixelRatio),n.uniform1f(h,t*window.devicePixelRatio),n.uniform1f(N,r);let k,w=0;function D(y){if(y-w<_c){k=requestAnimationFrame(D);return}w=y,n&&s&&p&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,y/1e3),n.uniform2f(x,s.width,s.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(D)}return k=requestAnimationFrame(D),s.addEventListener("webglcontextlost",y=>{y.preventDefault(),c(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),on("div",{className:i("absolute inset-0",o,l&&"opacity-0"),children:on("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as Vc}from"class-variance-authority";import{jsx as Fc,jsxs as Uc}from"react/jsx-runtime";var Bc=Vc("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"}}),Wc={neutral:$o,new:Uo,success:Fo,pending:Go,warning:Nr,error:Nr};function sb({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??Wc[t??"neutral"]:null;return Uc("span",{className:i(Bc({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&Fc(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as dr from"@radix-ui/react-switch";import{useMemo as Gc}from"react";import{jsx as cr}from"react/jsx-runtime";function gb({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:l,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let n=Gc(()=>d?!0:m||s,[d,m,s]),p=cr(dr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:i("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:cr(dr.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:l})});return d?cr(X,{content:d,children:cr("div",{className:"inline-block leading-none",children:p})}):p}import{flexRender as Xr,getCoreRowModel as $c,useReactTable as Kc}from"@tanstack/react-table";import{AnimatePresence as jc,motion as Yc}from"framer-motion";import{memo as Zc,useEffect as Qr,useState as an}from"react";import{jsx as F,jsxs as ue}from"react/jsx-runtime";var Jr=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-neutral-200 px-4 relative","border-l border-b",e==="menu"&&"bg-white border-l-transparent py-0 px-1",t&&"group-hover/row:bg-neutral-50 transition-colors duration-75"]),qc=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 Vb(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[p,f]=an(e.columnVisibility??{}),[v,x]=an(e.selectedRows??{});Qr(()=>{var h;(h=e.onRowSelectionChange)==null||h.call(e,g.getSelectedRowModel().rows)},[v]),Qr(()=>{e.columnVisibility&&!yo(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Qr(()=>{var h;(h=e.onColumnVisibilityChange)==null||h.call(e,p)},[p]);let g=Kc({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:$c(),onPaginationChange:s,onColumnVisibilityChange:h=>f(h),onRowSelectionChange:x,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...l},rowSelection:v},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:p,table:g,enableColumnResizing:d}}var Qc=Zc(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:l}){return F("tr",{className:i("group/row",r&&"cursor-pointer select-none",l.getRowModel().rows.length>8&&t.index===l.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?c=>{ut(c)||r(t,c)}:void 0,children:t.getVisibleCells().map(c=>F("td",{className:i(Jr(c.column.id,!!r),"group text-neutral-600",eo(c.column,t.index===l.getRowModel().rows.length-1),typeof a=="function"?a(c.column.id):a),style:{width:c.column.getSize(),...to(c.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:Xr(c.column.columnDef.cell,c.getContext())}),o==null?void 0:o(c)]})},c.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function Bb({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:s,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:p,scrollWrapperClassName:f,thClassName:v,tdClassName:x,table:g,pagination:h,resourceName:N,onRowClick:C,rowCount:R,children:k,enableColumnResizing:w=!1}){return ue("div",{className:i("relative rounded-xl border border-neutral-200 bg-white",p),children:[!o&&!!(t!=null&&t.length)||r?ue("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[ue("table",{className:i(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",...w&&{minWidth:g.getVisibleLeafColumns().reduce((D,y)=>D+y.getSize(),0)}},children:[F("thead",{children:g.getHeaderGroups().map(D=>F("tr",{children:D.headers.map(y=>{let T=d.includes(y.column.id),M=T?"button":"div";return ue("th",{colSpan:y.colSpan,className:i(Jr(y.id),"select-none font-medium",eo(y.column,!g.getRowModel().rows.length),typeof v=="function"?v(y.column.id):v,w&&"relative"),style:{...w?{width:y.getSize()}:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto"},...to(y.column)},children:[F("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ue(M,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:y.column.id,sortOrder:c!==y.column.id||s==="asc"?"desc":"asc"})},children:[y.isPlaceholder?null:Xr(y.column.columnDef.header,y.getContext()),T&&c===y.column.id&&F(So,{className:"h-3 w-3 shrink-0",order:s||"desc"})]})}),w&&y.column.getCanResize()&&y.column.id!=="menu"&&F("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:J=>J.stopPropagation(),className:qc})]},y.id)})},D.id))}),F("tbody",{children:g.getRowModel().rows.map(D=>w?F(Qc,{row:D,onRowClick:C,cellRight:l,tdClassName:x,table:g},D.id):F("tr",{className:i("group/row",C&&"cursor-pointer select-none",g.getRowModel().rows.length>8&&D.index===g.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:C?y=>{ut(y)||C(D,y)}:void 0,children:D.getVisibleCells().map(y=>F("td",{className:i(Jr(y.column.id,!!C),"group text-neutral-600",eo(y.column,D.index===g.getRowModel().rows.length-1),typeof x=="function"?x(y.column.id):x),style:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto",...to(y.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:Xr(y.column.columnDef.cell,y.getContext())}),l==null?void 0:l(y)]})},y.id))},D.id))})]}),k]}):F("div",{className:"flex h-96 w-full items-center justify-center text-sm text-neutral-500",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),h&&!o&&!!(t!=null&&t.length)&&!!R&&ue("div",{className:"sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t border-neutral-200 bg-white px-4 py-3.5 text-sm leading-6 text-neutral-600",children:[ue("div",{children:[F("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ue("span",{className:"font-medium",children:[(h.pageIndex-1)*h.pageSize+1,"-",Math.min((h.pageIndex-1)*h.pageSize+h.pageSize,g.getRowCount())]})," ","of"," ",F("span",{className:"font-medium",children:g.getRowCount().toLocaleString()})," ",(N==null?void 0:N(g.getRowCount()!==1))||"items"]}),ue("div",{className:"flex items-center gap-2",children:[F(ie,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>g.previousPage(),disabled:h.pageIndex===1}),F(ie,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>g.nextPage(),disabled:h.pageIndex===g.getPageCount()})]})]}),F(jc,{children:r&&F(Yc.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl bg-white/50",children:F(we,{})})})]})}var eo=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},to=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 Xc,motion as nn}from"framer-motion";import{useId as Jc}from"react";import{jsx as ur,jsxs as ed}from"react/jsx-runtime";function $b({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=Jc();return ur(Xc,{id:s,children:ur(nn.div,{layout:!0,className:i("relative inline-flex items-center gap-1 rounded-xl border border-neutral-200 bg-white p-1",o),style:c,children:e.map(m=>ed("button",{type:"button","data-selected":m.value===t,className:i("relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"z-[11] transition-colors hover:text-neutral-500":m.value!==t},a),onClick:()=>r(m.value),children:[typeof m.label=="string"?ur("p",{children:m.label}):m.label,m.badge,m.value===t&&ur(nn.div,{layoutId:s,className:i("absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border border-neutral-200 bg-neutral-50",l),transition:{duration:.25}})]},m.value))})})}import{useEffect as td,useId as rd,useRef as od,useState as ad}from"react";import{jsx as ce,jsxs as ro}from"react/jsx-runtime";var nd=[{key:"utm_source",icon:Xo,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:la,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:qo,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:aa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:ia,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Qo,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Jb({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=q(),s=rd(),[m,d]=ad(!1),n=od(null);return td(()=>{n.current&&!c&&o&&setTimeout(()=>{var p;return(p=n.current)==null?void 0:p.focus()},10)},[]),ce("div",{className:i("grid gap-y-3",l),children:nd.map(({key:p,icon:f,label:v,placeholder:x,description:g},h)=>ce("div",{className:"group relative",children:ro("div",{className:"relative z-10 flex",children:[ce(X,{content:ro("div",{className:"p-3 text-center text-xs",children:[ce("p",{className:"text-neutral-600",children:g}),ce("span",{className:"font-mono text-neutral-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:ro("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(N=>!N),children:[ce(f,{className:"size-4 shrink-0"}),ce("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:m?ce("span",{className:"font-mono text-xs",children:p}):v})]})}),ce("div",{className:"min-w-0 grow",children:ce(id,{disabledTooltip:a,children:ce("input",{type:"text",id:`${s}-${p}`,ref:h===0?n:void 0,placeholder:x,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[p]||"",onChange:N=>t(p,N.target.value)})})})]})},p))})}function id({children:e,disabledTooltip:t}){return t?ce(X,{content:t,disableHoverableContent:!0,children:e}):e}import{jsx as oo,jsxs as sd}from"react/jsx-runtime";function t4(){return sd("div",{style:mr.backgroundMain,children:[oo("div",{style:mr.backgroundMainBefore}),oo("div",{style:mr.backgroundMainAfter}),oo("div",{style:mr.backgroundContent})]})}var mr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
43
43
|
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
44
44
|
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
45
45
|
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
46
46
|
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
47
47
|
radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
|
|
48
|
-
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import Od from"next/image";import He from"next/link";import{useParams as _d}from"next/navigation";import{useEffect as Hd,useState as Ai}from"react";import Vd from"swr";import{jsx as ii}from"react/jsx-runtime";function ni(e){return ii("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:ii("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}import{jsx as si}from"react/jsx-runtime";function yt({className:e}){return si("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-10 w-10 text-black dark:text-white",e),children:si("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=[{title:"Dub Links",description:"Short links with superpowers",icon:ta,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:oa,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:_t,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ot,href:"/docs/integrations"}],li=[{icon:Ro,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Mo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:ni,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],ci=[{icon:Do,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:Eo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:Lo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:Ao,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:To,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],di=[{icon:Io,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Xo,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ea,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],pr=[{icon:yt,title:"About",description:"Company and team",href:"/about"},{icon:jo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:zo,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Jo,title:"Customers",description:"Success stories and use cases",href:"/customers"}],fr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],mi=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],ui=[{name:"X (Twitter)",icon:It,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Dt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:At,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:zt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as td}from"react/jsx-runtime";function gr({className:e,children:t}){return td("div",{className:n("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 Pd,Home as Sd,LayoutGrid as Md,Type as Rd}from"lucide-react";import{useParams as Ld}from"next/navigation";import{useCallback as Td,useContext as Ed,useState as Ad}from"react";import{toast as Dd}from"sonner";import*as le from"@radix-ui/react-navigation-menu";import{LayoutGroup as ld}from"framer-motion";import cd from"js-cookie";import wt from"next/link";import{useParams as dd,usePathname as md}from"next/navigation";import{createContext as ud,useId as pd}from"react";import fd from"swr";import{Link as pi}from"@radix-ui/react-navigation-menu";import fi from"next/link";import{jsx as xe,jsxs as hr}from"react/jsx-runtime";var Ke="text-xs uppercase text-neutral-500 dark:text-white/60",rd="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",oe=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function ze({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:s,...c}){return xe(pi,{asChild:!0,children:xe(fi,{className:n(rd,a),...c,children:hr("div",{className:"flex items-center justify-between gap-3",children:[e,hr("div",{className:"flex-1",children:[xe("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&xe("p",{className:n("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),s&&xe(wo,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function vr({icon:e,title:t,description:r,iconClassName:o,...a}){return xe(pi,{asChild:!0,children:xe(fi,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:hr("div",{className:"flex items-center justify-between px-5 py-4",children:[hr("div",{children:[xe("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),xe("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),xe(e,{className:n("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as je,jsxs as gi}from"react/jsx-runtime";function hi({domain:e}){return gi("div",{className:"grid w-[540px] grid-cols-[minmax(0,1fr),minmax(0,0.75fr)] divide-x divide-neutral-200",children:[je("div",{className:"flex flex-col gap-4 p-4",children:pr.map(({title:t,description:r,icon:o,href:a})=>je(vr,{title:t,description:r,icon:o,iconClassName:"size-5",href:I(a,e,oe({domain:e,utm_content:t}))},t))}),gi("div",{className:"px-6 py-4",children:[je("p",{className:n(Ke,"mb-2"),children:"Social"}),je("div",{className:"grid grid-cols-1",children:ui.map(({icon:t,name:r,href:o})=>je(ze,{href:o,target:"_blank",className:"-mx-2",icon:je("div",{className:"shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1.5 dark:border-white/20 dark:bg-white/10",children:je(t,{className:"size-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60"})}),title:r},o))})]})]})}import{Link as xi}from"@radix-ui/react-navigation-menu";import yi from"next/link";import{jsx as k,jsxs as oo}from"react/jsx-runtime";function vi(e){return oo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:n("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[oo("g",{className:"text-[var(--grid)]",children:[k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),k("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),k("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),k("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),k("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),k("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),k("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:k("tspan",{x:"157.667",y:"232.909",children:"402"})}),k("g",{filter:"url(#a)",children:k("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),k("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),k("defs",{children:oo("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[k("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),k("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),k("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),k("feOffset",{dy:"2"}),k("feGaussianBlur",{stdDeviation:"1"}),k("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),k("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),k("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as od}from"react";import{jsx as u,jsxs as V}from"react/jsx-runtime";function bi(e){let t=od();return V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:n("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[V("g",{clipPath:`url(#${t}-a)`,children:[u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),u("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),u("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),u("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),u("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),u("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),u("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),u("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),u("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),u("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),u("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),u("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),u("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),u("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),u("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),V("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),u("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),u("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:u("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:u("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),V("g",{children:[u("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),u("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),u("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),u("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:u("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),u("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:u("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"251",y:"171.636",children:"51K"})})]}),V("defs",{children:[V("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#030712",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),V("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),V("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),u("clipPath",{id:`${t}-a`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),u("clipPath",{id:`${t}-y`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),u("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:u("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),u("image",{href:`${Lt}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import{jsx as F,jsxs as Se}from"react/jsx-runtime";var ad=[{title:"Dub API",description:"Programmatic link creation at scale",icon:_t,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ot,href:"/docs/integrations"}];function wi({domain:e}){return Se("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-gray-200",children:[Se("div",{className:"grid grid-cols-2 gap-4 p-4",children:[F(xi,{asChild:!0,children:Se(yi,{href:I("/home",e,oe({domain:e,utm_content:"Dub Links"})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[Se("div",{className:"p-5 pb-0",children:[F("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),F("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),F("div",{className:"relative grow overflow-hidden",children:F(bi,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),F("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]})}),Se("div",{className:"flex flex-col gap-4",children:[F(xi,{asChild:!0,children:Se(yi,{href:I("/analytics",e,oe({domain:e,utm_content:"Dub Analytics"})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[F(vi,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),F("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Se("div",{className:"h-56 p-5",children:[F("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),F("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),F("div",{className:"grid grow grid-rows-2 gap-4",children:ad.map(({title:t,description:r,icon:o,href:a})=>F(vr,{title:t,description:r,icon:o,href:I(a,e,oe({domain:e,utm_content:t}))},t))})]})]}),Se("div",{className:"px-6 py-4",children:[F("p",{className:n(Ke,"mb-2"),children:"Customer Stories"}),Se("div",{className:"grid grid-cols-1",children:[li.map(({icon:t,iconClassName:r,title:o,description:a,href:s})=>F(ze,{className:"-mx-2",href:I(s,e,oe({domain:e,utm_content:o})),icon:F("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:F(t,{className:n("h-4 w-4 shrink-0 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},s)),F(ze,{className:"-mx-2",href:I("/customers",e,oe({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),F("p",{className:n(Ke,"mb-2 mt-5"),children:"Compare"}),F("div",{className:"flex flex-col",children:fr.map(({name:t,slug:r})=>F(ze,{className:"-mx-2",href:I(`/compare/${r}`,e,oe({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as Ni}from"@radix-ui/react-navigation-menu";import nd from"next/image";import ki from"next/link";import{useId as id}from"react";import{jsx as v,jsxs as st}from"react/jsx-runtime";function Ci({className:e,...t}){let r=id();return st("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:n("",e),...t,children:[v("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),st("g",{opacity:"0.5",children:[v("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:v("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),v("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:v("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),v("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:v("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),v("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),v("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),v("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),st("defs",{children:[st("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[v("stop",{stopColor:"#fff",stopOpacity:"0"}),v("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),st("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[v("stop",{stopColor:"#5B5B5B"}),v("stop",{offset:"1",stopColor:"#757575"})]}),st("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[v("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),v("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),v("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),v("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),v("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),v("feOffset",{dx:"-0.991",dy:"0.991"}),v("feGaussianBlur",{stdDeviation:"0.496"}),v("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),v("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),v("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),v("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),v("feOffset",{dx:"0.991",dy:"-0.991"}),v("feGaussianBlur",{stdDeviation:"0.496"}),v("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),v("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),v("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),v("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as G,jsxs as Oe}from"react/jsx-runtime";var sd=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function Pi({domain:e}){return Oe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[G("div",{className:"grid grid-cols-2 gap-4 p-4",children:sd.map(({title:t,description:r,thumbnail:o,href:a})=>G(Ni,{asChild:!0,children:Oe(ki,{href:I(a,e,oe({domain:e,utm_content:t})),className:n("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[Oe("div",{className:"p-5 pb-0",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),G("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),G("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:G("div",{className:n("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:G(nd,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)}))}),Oe("div",{className:"flex flex-col gap-2 px-6 py-4",children:[Oe("div",{children:[G("p",{className:n(Ke,"mb-2"),children:"SDKs"}),G("div",{className:"flex flex-col gap-0.5",children:ci.map(({icon:t,iconClassName:r,title:o,href:a})=>G(ze,{className:"-mx-2",href:I(a,e,oe({domain:e,utm_content:o})),icon:G("div",{className:"shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:G(t,{className:n("size-5 text-gray-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),G("div",{className:"-mx-2 flex grow flex-col justify-end",children:G(Ni,{asChild:!0,children:Oe(ki,{href:I("/brand",e,oe({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[Oe("div",{className:"pointer-events-none absolute inset-0",children:[G("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:G("div",{className:n("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),G(Ci,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),G("div",{className:"relative flex items-center justify-between px-5 py-4",children:Oe("div",{children:[G("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),G("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})})]})]})}import{Fragment as vd,jsx as B,jsxs as lt}from"react/jsx-runtime";var ao=ud({theme:"light"}),io=[{name:"Product",content:wi,childItems:ur,segments:["/home","/analytics","/features","/compare"]},{name:"Resources",content:Pi,childItems:di,segments:["/solutions","/docs","/help","/brand"]},{name:"Company",content:hi,childItems:pr,segments:["about","/blog","/changelog","/customers"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],Si=n("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 Z4({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=dd();t&&(o=t);let a=pd(),s=Na(40),c=md(),{data:l,isLoading:d}=fd(o.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4}),m=!!(o==="dub.co"&&cd.get("dub_id"));return B(ao.Provider,{value:{theme:e},children:B(ld,{id:a,children:lt("div",{className:n("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:n("absolute inset-0 block border-b border-transparent transition-all",s&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(gr,{className:n("relative",r),children:lt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(wt,{className:"block w-fit py-2 pr-2",href:I("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(br,{})})}),lt(le.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(le.List,{className:"group relative z-0 flex",children:io.map(({name:i,href:p,segments:f,content:x})=>{let h=f.some(b=>c==null?void 0:c.startsWith(b));return lt(le.Item,{children:[B(hd,{trigger:!!x,children:p!==void 0?B(wt,{id:`nav-${p}`,href:I(p,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:i}),className:Si,"data-active":h,children:i}):lt("button",{className:Si,"data-active":h,children:[i,B(gd,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),x&&B(le.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:B(x,{domain:o})})]},i)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(le.Viewport,{className:n("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:l&&Object.keys(l).length>0?B(wt,{href:qe,className:n(pe({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"}):d?null:lt(vd,{children:[B(wt,{href:m?"https://app.dub.co/login":"https://d.to/login",className:n(pe({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),B(wt,{href:m?"https://app.dub.co/register":"https://d.to/register",className:n(pe({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 gd(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function hd({trigger:e,children:t}){return e?B(le.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as bd,Menu as xd,X as yd}from"lucide-react";import Ct from"next/link";import{useParams as Mi}from"next/navigation";import{useEffect as wd,useState as Ri}from"react";import Cd from"swr";import{Fragment as kd,jsx as W,jsxs as Ye}from"react/jsx-runtime";function nx({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Mi();t&&(r=t);let[o,a]=Ri(!1);wd(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:s}=Cd(r.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4});return Ye("div",{className:n(e==="dark"&&"dark"),children:[W("button",{onClick:()=>a(!o),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-gray-100 active:bg-gray-200"),children:o?W(yd,{className:"h-5 w-5 text-gray-600 dark:text-white/70"}):W(xd,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),W("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Ye("ul",{className:"grid divide-y divide-gray-200 dark:divide-white/[0.15]",children:[io.map(({name:c,href:l,childItems:d},m)=>W(Nd,{name:c,href:l,childItems:d,setOpen:a},m)),s&&Object.keys(s).length>0?W("li",{className:"py-3",children:W(Ct,{href:qe,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ye(kd,{children:[W("li",{className:"py-3",children:W(Ct,{href:`${qe}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),W("li",{className:"py-3",children:W(Ct,{href:`${qe}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Nd=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Mi(),[s,c]=Ri(!1);return r?W("li",{className:"py-3",children:Ye(Ce,{height:!0,children:[Ye("button",{className:"flex w-full justify-between",onClick:()=>c(!s),children:[W("p",{className:"font-semibold",children:e}),W(bd,{className:n("h-5 w-5 text-gray-500 transition-all dark:text-white/50",s&&"rotate-180")})]}),s&&W("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:l,href:d,icon:m,description:i})=>Ye(Ct,{href:I(d,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:l}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[W("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:W(m,{className:"size-5 text-neutral-700"})}),Ye("div",{children:[W("div",{className:"flex items-center gap-2",children:W("h2",{className:"text-sm font-medium text-neutral-900",children:l})}),W("p",{className:"text-sm text-neutral-500",children:i})]})]},d))})]})}):t?W("li",{className:"py-3",children:W(Ct,{href:I(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};import{jsx as Li}from"react/jsx-runtime";function Ti({className:e}){return Li("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("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 Z,jsxs as Ei}from"react/jsx-runtime";var Id=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
+
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import Fd from"next/image";import _e from"next/link";import{useParams as Ud}from"next/navigation";import{useEffect as Gd,useState as In}from"react";import $d from"swr";import{jsx as sn}from"react/jsx-runtime";function ln(e){return sn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:sn("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}import{jsx as cn}from"react/jsx-runtime";function Nt({className:e}){return cn("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:cn("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 pr=[{title:"Dub Links",description:"Short links with superpowers",icon:oa,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:na,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Vt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}],dn=[{icon:Lo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:To,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:ln,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],un=[{icon:zo,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:Do,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:Eo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:Io,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:Ao,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],mn=[{icon:Oo,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ea,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ra,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],fr=[{icon:Nt,title:"About",description:"Company and team",href:"/about"},{icon:Zo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Ho,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:ta,title:"Customers",description:"Success stories and use cases",href:"/customers"}],gr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],pn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],fn=[{name:"X (Twitter)",icon:Ot,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:zt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:It,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Ht,href:"https://www.youtube.com/@dubdotco"}];import{jsx as ld}from"react/jsx-runtime";function hr({className:e,children:t}){return ld("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as He from"@radix-ui/react-popover";import{BoxSelect as Ed,Home as Ad,LayoutGrid as Dd,Type as Id}from"lucide-react";import{useParams as zd}from"next/navigation";import{useCallback as Od,useContext as Hd,useState as _d}from"react";import{toast as Vd}from"sonner";import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as gd}from"framer-motion";import kt from"next/link";import{useParams as hd,usePathname as vd}from"next/navigation";import{createContext as bd,useId as xd}from"react";import yd from"swr";import{Link as gn}from"@radix-ui/react-navigation-menu";import hn from"next/link";import{jsx as ye,jsxs as vr}from"react/jsx-runtime";var Ke="text-xs uppercase text-neutral-500 dark:text-white/60",cd="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",ae=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function ze({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return ye(gn,{asChild:!0,children:ye(hn,{className:i(cd,a),...c,children:vr("div",{className:"flex items-center justify-between gap-3",children:[e,vr("div",{className:"flex-1",children:[ye("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&ye("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&ye(No,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function br({icon:e,title:t,description:r,iconClassName:o,...a}){return ye(gn,{asChild:!0,children:ye(hn,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:vr("div",{className:"flex items-center justify-between px-5 py-4",children:[vr("div",{children:[ye("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),ye("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ye(e,{className:i("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as je,jsxs as vn}from"react/jsx-runtime";function bn({domain:e}){return vn("div",{className:"grid w-[540px] grid-cols-[minmax(0,1fr),minmax(0,0.75fr)] divide-x divide-neutral-200",children:[je("div",{className:"flex flex-col gap-4 p-4",children:fr.map(({title:t,description:r,icon:o,href:a})=>je(br,{title:t,description:r,icon:o,iconClassName:"size-5",href:O(a,e,ae({domain:e,utm_content:t}))},t))}),vn("div",{className:"px-6 py-4",children:[je("p",{className:i(Ke,"mb-2"),children:"Social"}),je("div",{className:"grid grid-cols-1",children:fn.map(({icon:t,name:r,href:o})=>je(ze,{href:o,target:"_blank",className:"-mx-2",icon:je("div",{className:"shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1.5 dark:border-white/20 dark:bg-white/10",children:je(t,{className:"size-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60"})}),title:r},o))})]})]})}import{Link as wn}from"@radix-ui/react-navigation-menu";import Cn from"next/link";import{jsx as P,jsxs as ao}from"react/jsx-runtime";function xn(e){return ao("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:i("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[ao("g",{className:"text-[var(--grid)]",children:[P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),P("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"232.909",children:"402"})}),P("g",{filter:"url(#a)",children:P("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),P("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),P("defs",{children:ao("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[P("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),P("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),P("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),P("feOffset",{dy:"2"}),P("feGaussianBlur",{stdDeviation:"1"}),P("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),P("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),P("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as dd}from"react";import{jsx as u,jsxs as V}from"react/jsx-runtime";function yn(e){let t=dd();return V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[V("g",{clipPath:`url(#${t}-a)`,children:[u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),u("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),u("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),u("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),u("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),u("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),u("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),u("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),u("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),u("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),u("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),u("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),u("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),u("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),u("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),u("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),u("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),u("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),V("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),u("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),u("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),V("g",{children:[u("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),u("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),u("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:u("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:u("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),u("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),u("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),V("g",{children:[u("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),u("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),u("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),u("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),u("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:u("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),u("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),u("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:u("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),u("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:u("tspan",{x:"251",y:"171.636",children:"51K"})})]}),V("defs",{children:[V("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EA580C"}),u("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),u("stop",{offset:"1",stopColor:"#EA580C"})]}),V("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#EAB308",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#EAB308"})]}),V("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[u("stop",{stopColor:"#030712",stopOpacity:"0"}),u("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),V("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),V("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),u("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),u("clipPath",{id:`${t}-a`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),u("clipPath",{id:`${t}-y`,children:u("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),u("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:u("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),u("image",{href:`${At}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import{jsx as U,jsxs as Me}from"react/jsx-runtime";var ud=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Vt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}];function Nn({domain:e}){return Me("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[Me("div",{className:"grid grid-cols-2 gap-4 p-4",children:[U(wn,{asChild:!0,children:Me(Cn,{href:O("/home",e,ae({domain:e,utm_content:"Dub Links"})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[Me("div",{className:"p-5 pb-0",children:[U("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),U("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),U("div",{className:"relative grow overflow-hidden",children:U(yn,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),U("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]})}),Me("div",{className:"flex flex-col gap-4",children:[U(wn,{asChild:!0,children:Me(Cn,{href:O("/analytics",e,ae({domain:e,utm_content:"Dub Analytics"})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[U(xn,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),U("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Me("div",{className:"h-56 p-5",children:[U("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),U("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),U("div",{className:"grid grow grid-rows-2 gap-4",children:ud.map(({title:t,description:r,icon:o,href:a})=>U(br,{title:t,description:r,icon:o,href:O(a,e,ae({domain:e,utm_content:t}))},t))})]})]}),Me("div",{className:"px-6 py-4",children:[U("p",{className:i(Ke,"mb-2"),children:"Customer Stories"}),Me("div",{className:"grid grid-cols-1",children:[dn.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>U(ze,{className:"-mx-2",href:O(l,e,ae({domain:e,utm_content:o})),icon:U("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:U(t,{className:i("h-4 w-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),U(ze,{className:"-mx-2",href:O("/customers",e,ae({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),U("p",{className:i(Ke,"mb-2 mt-5"),children:"Compare"}),U("div",{className:"flex flex-col",children:gr.map(({name:t,slug:r})=>U(ze,{className:"-mx-2",href:O(`/compare/${r}`,e,ae({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as Pn}from"@radix-ui/react-navigation-menu";import pd from"next/image";import Sn from"next/link";import{useId as md}from"react";import{jsx as b,jsxs as st}from"react/jsx-runtime";function kn({className:e,...t}){let r=md();return st("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:i("",e),...t,children:[b("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),st("g",{opacity:"0.5",children:[b("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:b("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),b("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:b("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),b("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:b("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),b("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),b("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),b("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),st("defs",{children:[st("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[b("stop",{stopColor:"#fff",stopOpacity:"0"}),b("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),st("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[b("stop",{stopColor:"#5B5B5B"}),b("stop",{offset:"1",stopColor:"#757575"})]}),st("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[b("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),b("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),b("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),b("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),b("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),b("feOffset",{dx:"-0.991",dy:"0.991"}),b("feGaussianBlur",{stdDeviation:"0.496"}),b("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),b("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),b("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),b("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),b("feOffset",{dx:"0.991",dy:"-0.991"}),b("feGaussianBlur",{stdDeviation:"0.496"}),b("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),b("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),b("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),b("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as $,jsxs as Oe}from"react/jsx-runtime";var fd=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function Mn({domain:e}){return Oe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[$("div",{className:"grid grid-cols-2 gap-4 p-4",children:fd.map(({title:t,description:r,thumbnail:o,href:a})=>$(Pn,{asChild:!0,children:Oe(Sn,{href:O(a,e,ae({domain:e,utm_content:t})),className:i("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[Oe("div",{className:"p-5 pb-0",children:[$("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),$("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),$("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:$("div",{className:i("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:$(pd,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)}))}),Oe("div",{className:"flex flex-col gap-2 px-6 py-4",children:[Oe("div",{children:[$("p",{className:i(Ke,"mb-2"),children:"SDKs"}),$("div",{className:"flex flex-col gap-0.5",children:un.map(({icon:t,iconClassName:r,title:o,href:a})=>$(ze,{className:"-mx-2",href:O(a,e,ae({domain:e,utm_content:o})),icon:$("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:$(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),$("div",{className:"-mx-2 flex grow flex-col justify-end",children:$(Pn,{asChild:!0,children:Oe(Sn,{href:O("/brand",e,ae({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[Oe("div",{className:"pointer-events-none absolute inset-0",children:[$("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:$("div",{className:i("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),$(kn,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),$("div",{className:"relative flex items-center justify-between px-5 py-4",children:Oe("div",{children:[$("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),$("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})})]})]})}import{Fragment as Nd,jsx as B,jsxs as lt}from"react/jsx-runtime";var no=bd({theme:"light"}),io=[{name:"Product",content:Nn,childItems:pr,segments:["/home","/analytics","/features","/compare"]},{name:"Resources",content:Mn,childItems:mn,segments:["/solutions","/docs","/help","/brand"]},{name:"Company",content:bn,childItems:fr,segments:["about","/blog","/changelog","/customers"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],Rn=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 ux({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=hd();t&&(o=t);let a=xd(),l=Sa(40),c=vd(),{data:s,isLoading:m}=yd(o.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4});return B(no.Provider,{value:{theme:e},children:B(gd,{id:a,children:lt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(hr,{className:i("relative",r),children:lt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(kt,{className:"block w-fit py-2 pr-2",href:O("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(xr,{})})}),lt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(de.List,{className:"group relative z-0 flex",children:io.map(({name:d,href:n,segments:p,content:f})=>{let v=p.some(x=>c==null?void 0:c.startsWith(x));return lt(de.Item,{children:[B(Cd,{trigger:!!f,children:n!==void 0?B(kt,{id:`nav-${n}`,href:O(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:Rn,"data-active":v,children:d}):lt("button",{className:Rn,"data-active":v,children:[d,B(wd,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),f&&B(de.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:B(f,{domain:o})})]},d)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(de.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?B(kt,{href:qe,className:i(fe({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:lt(Nd,{children:[B(kt,{href:"https://app.dub.co/login",className:i(fe({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),B(kt,{href:"https://app.dub.co/register",className:i(fe({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 wd(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Cd({trigger:e,children:t}){return e?B(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as kd,Menu as Pd,X as Sd}from"lucide-react";import Pt from"next/link";import{useParams as Tn}from"next/navigation";import{useEffect as Md,useState as Ln}from"react";import Rd from"swr";import{Fragment as Ld,jsx as W,jsxs as Ye}from"react/jsx-runtime";function Cx({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Tn();t&&(r=t);let[o,a]=Ln(!1);Md(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=Rd(r.endsWith("dub.co")&&"/api/auth/session",me,{dedupingInterval:6e4});return Ye("div",{className:i(e==="dark"&&"dark"),children:[W("button",{onClick:()=>a(!o),className:i("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?W(Sd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):W(Pd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),W("nav",{className:i("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Ye("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[io.map(({name:c,href:s,childItems:m},d)=>W(Td,{name:c,href:s,childItems:m,setOpen:a},d)),l&&Object.keys(l).length>0?W("li",{className:"py-3",children:W(Pt,{href:qe,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ye(Ld,{children:[W("li",{className:"py-3",children:W(Pt,{href:`${qe}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),W("li",{className:"py-3",children:W(Pt,{href:`${qe}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Td=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Tn(),[l,c]=Ln(!1);return r?W("li",{className:"py-3",children:Ye(Ne,{height:!0,children:[Ye("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[W("p",{className:"font-semibold",children:e}),W(kd,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&W("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:s,href:m,icon:d,description:n})=>Ye(Pt,{href:O(m,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:s}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[W("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:W(d,{className:"size-5 text-neutral-700"})}),Ye("div",{children:[W("div",{className:"flex items-center gap-2",children:W("h2",{className:"text-sm font-medium text-neutral-900",children:s})}),W("p",{className:"text-sm text-neutral-500",children:n})]})]},m))})]})}):t?W("li",{className:"py-3",children:W(Pt,{href:O(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};import{jsx as En}from"react/jsx-runtime";function An({className:e}){return En("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:En("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as Q,jsxs as Dn}from"react/jsx-runtime";var Bd=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
|
|
50
|
-
</svg>`,
|
|
50
|
+
</svg>`,Wd=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
51
51
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>
|
|
52
|
-
</svg>`;function br({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Ld(),{theme:a}=Ed(ao),[s,c]=Ad(!1),l=Td(i=>{i.preventDefault(),c(!0)},[]),[,d]=Je();function m(i){Dd.promise(d(i),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Ei(_e.Root,{open:s,onOpenChange:c,children:[Z(_e.Anchor,{asChild:!0,children:Z("div",{onContextMenu:l,className:"max-w-fit",children:e==="full"?Z(Ti,{className:r}):Z(yt,{className:n("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Z(_e.Portal,{children:Z(_e.Content,{sideOffset:14,align:"start",className:n("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:i=>{i.stopPropagation(),c(!1)},children:Ei("div",{className:"grid gap-1 rounded-lg border border-gray-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Z(Nt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>m(Id),icon:Z(yt,{className:"h-4 w-4"})}),Z(Nt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>m(zd),icon:Z(Rd,{strokeWidth:2,className:"h-4 w-4"})}),Z(Nt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Z(Pd,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Z(Nt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Z(Sd,{strokeWidth:2,className:"h-4 w-4"})}):Z(Nt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Z(Md,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Nt({className:e,...t}){return Z(ie,{className:n("h-9 justify-start px-3 font-medium hover:text-gray-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as E,jsxs as U}from"react/jsx-runtime";var Bd=[{name:"Twitter",icon:It,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Dt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:At,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:zt,href:"https://www.youtube.com/@dubdotco"}],kt={features:ur.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:fr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:mi.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:xo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},Pt="text-sm font-medium text-neutral-900",St="flex flex-col mt-2.5 gap-2.5",ct="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Dx({staticDomain:e,className:t}){let{domain:r="dub.co"}=_d();return e&&(r=e),E(gr,{className:n("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:U("footer",{children:[U("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[U("div",{className:"flex flex-col gap-6",children:[E("div",{className:"grow",children:U(He,{href:I("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[U("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),E(br,{className:"h-8 text-gray-800"})]})}),E("div",{className:"flex items-center gap-3",children:Bd.map(({name:o,icon:a,href:s})=>U("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[E("span",{className:"sr-only",children:o}),E(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),U("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[U("div",{className:"md:grid md:grid-cols-2",children:[U("div",{children:[E("h3",{className:Pt,children:"Product"}),E("ul",{role:"list",className:St,children:kt.features.map(o=>E("li",{children:E(He,{href:I(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]}),U("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:Pt,children:"Resources"}),E("ul",{role:"list",className:St,children:kt.product.map(o=>E("li",{children:E(He,{href:I(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]})]}),U("div",{className:"md:grid md:grid-cols-2",children:[U("div",{className:"flex flex-col space-y-8",children:[U("div",{children:[E("h3",{className:Pt,children:"Compare"}),E("ul",{role:"list",className:St,children:kt.compare.map(o=>E("li",{children:E(He,{href:I(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]}),U("div",{children:[E("h3",{className:Pt,children:"Legal"}),U("ul",{role:"list",className:St,children:[kt.legal.map(o=>E("li",{children:E(He,{href:I(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name)),E("li",{children:U("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:n(ct,"flex items-center gap-1"),children:["Trust Center ",E(ia,{className:"size-3.5"})]})})]})]})]}),U("div",{className:"mt-10 md:mt-0",children:[E("h3",{className:Pt,children:"Tools"}),E("ul",{role:"list",className:St,children:kt.tools.map(o=>E("li",{children:E(He,{href:I(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]})]})]})]}),U("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[E(Wd,{}),E(He,{href:I("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:E(Od,{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."]})]})]})})}function Wd(){let{data:e}=Vd("https://status.dub.co/api/v1/summary",me),[t,r]=Ai("bg-neutral-200"),[o,a]=Ai("Loading status...");return Hd(()=>{if(!e)return;let{ongoing_incidents:s}=e;if(s.length>0){let{current_worst_impact:c,name:l}=s[0],d=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(l),r(d)}else a("All systems operational"),r("bg-green-500")},[e]),U(He,{href:"https://status.dub.co",target:"_blank",className:"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",children:[U("div",{className:"relative size-2",children:[E("div",{className:n("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),E("div",{className:n("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),E("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as Fd,motion as Ud}from"framer-motion";import{useEffect as Gd,useState as $d}from"react";import{jsx as Di}from"react/jsx-runtime";var Ii=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,s]=$d(!1);Gd(()=>{s(!0)},[]);let c=r?Ud.div:"div";return Di(Fd,{children:a?Di(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Kd}from"class-variance-authority";import{toast as jd}from"sonner";import{jsx as no,jsxs as Zd}from"react/jsx-runtime";var Yd=Kd("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-gray-100 active:bg-gray-200",neutral:"bg-transparent hover:bg-gray-100 active:bg-gray-200"}},defaultVariants:{variant:"default"}});function $x({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[s,c]=Je(),l=o||yo;return Zd("button",{onClick:d=>{d.stopPropagation(),jd.promise(c(t),{success:a||"Copied to clipboard!"})},className:n(Yd({variant:e}),r),type:"button",children:[no("span",{className:"sr-only",children:"Copy"}),s?no(So,{className:"h-3.5 w-3.5"}):no(l,{className:"h-3.5 w-3.5"})]})}import{toast as qd}from"sonner";import{jsx as Qd}from"react/jsx-runtime";function qx({value:e,children:t,className:r,successMessage:o}){let[a,s]=Je();return Qd("button",{onClick:c=>{c.stopPropagation(),qd.promise(s(e),{success:o||"Copied to clipboard!"})},type:"button",className:n("cursor-copy text-sm text-gray-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Xd,jsxs as Jd}from"react/jsx-runtime";function Xx({icon:e,text:t}){return Jd("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Xd("p",{className:"truncate text-sm",children:t})]})}import{jsx as em}from"react/jsx-runtime";var ey=({children:e})=>em("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as so}from"react/jsx-runtime";function iy({apexDomain:e,className:t,imageProps:r}){return e?so(ar,{src:`${Lt}${e}`,alt:e,className:n("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):so("div",{className:n("flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 px-0 sm:h-10 sm:w-10",t),children:so(Qo,{className:"h-4 w-4 text-gray-600 sm:h-5 sm:w-5"})})}import{Link2 as zi}from"lucide-react";import{useRouter as tm,useSearchParams as rm}from"next/navigation";import{useEffect as om,useMemo as am,useRef as im}from"react";import nm from"swr";import{useDebounce as sm}from"use-debounce";import{Fragment as Oi,jsx as K,jsxs as Ve}from"react/jsx-runtime";function gy({defaultUrl:e}){let t=tm(),r=rm(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=sm(uo(o),500),s=am(()=>fo(a||""),[a]),{data:c,isValidating:l}=nm(a&&`/api/metatags?url=${encodeURIComponent(a)}`,me,{revalidateOnFocus:!1}),{title:d,description:m,image:i}=c||{},p=im(null);om(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=Y();return Ve(Oi,{children:[!e&&Ve("div",{className:"relative flex items-center",children:[K(zi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),K("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:o,onChange:x=>t.replace(`/tools/metatags${x.target.value.length>0?`?url=${x.target.value}`:""}`),"aria-invalid":"true"})]}),Ve("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:[l&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:K(mt,{})}),i?K("img",{src:i,alt:"Preview",className:"h-[250px] w-full border-b border-gray-300 object-cover"}):Ve("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300",children:[K(No,{className:"h-8 w-8 text-gray-400"}),K("p",{className:"text-sm text-gray-400",children:"Enter a link to generate a preview."})]}),Ve("div",{className:"grid gap-1 bg-white p-3 text-left",children:[s?K("p",{className:"text-sm text-[#536471]",children:s}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-gray-100"}),d?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:d}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-gray-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Ve("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-gray-100"}),K("div",{className:"h-4 w-48 rounded-md bg-gray-100"})]})]})]})]})}function hy({defaultUrl:e}){return Ve(Oi,{children:[Ve("div",{className:"relative flex items-center",children:[K(zi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:K(mt,{})})})]})}import{AnimatePresence as lm}from"framer-motion";import _i from"js-cookie";import{createContext as cm,useState as dm}from"react";import{jsx as lo}from"react/jsx-runtime";var mm=cm({hidePopup:()=>{}});function Ny({children:e,hiddenCookieId:t}){let[r,o]=dm(_i.get(t)==="1"),a=()=>{o(!0),_i.set(t,"1")};return lo(Ii,{children:lo(mm.Provider,{value:{hidePopup:a},children:lo(lm,{children:!r&&e})})})}import{motion as um}from"framer-motion";import{jsx as Hi}from"react/jsx-runtime";function My({value:e=0,max:t=100,className:r}){return Hi("div",{className:n("h-3 w-full overflow-hidden rounded-full bg-gray-200",r),children:Hi(um.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 Vi}from"class-variance-authority";import{LayoutGroup as pm,motion as fm}from"framer-motion";import{useId as gm}from"react";import{jsx as Mt,jsxs as bm}from"react/jsx-runtime";var hm=Vi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-gray-400 data-[selected=true]:text-black data-[selected=false]:hover:text-gray-500",accent:"text-neutral-500 transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-neutral-700 data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),vm=Vi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-black",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function Oy({variant:e,options:t,selected:r,onSelect:o,className:a}){let s=gm();return Mt("div",{className:n("flex text-sm",a),children:Mt(pm,{id:s,children:t.map(({id:c,label:l})=>bm("div",{className:"relative",children:[Mt("button",{type:"button",onClick:()=>o==null?void 0:o(c),className:hm({variant:e}),"data-selected":c===r,"aria-selected":c===r,children:l}),c===r&&Mt(fm.div,{layoutId:"indicator",transition:{duration:.1},className:vm({variant:e}),children:Mt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c))})})}import{jsx as Bi,jsxs as xm}from"react/jsx-runtime";function Vy({className:e}){return xm("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n("h-6 w-auto text-black dark:text-white",e),children:[Bi("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"}),Bi("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{Lr as AUTOPLAY_DEFAULT_DELAY,_p as Accordion,ji as AccordionContent,$i as AccordionItem,Ki as AccordionTrigger,Dm as Africa,$m as Airtm,Qi as Alert,Ji as AlertDescription,Xi as AlertTitle,Vm as Amazon,Ce as AnimatedSizeContainer,Qm as Apple,Xm as ArrowBoldUp,Jm as ArrowRight,e0 as ArrowTrendUp,t0 as ArrowTurnLeft,r0 as ArrowTurnRight2,o0 as ArrowUpRight,a0 as ArrowsOppositeDirectionY,Im as Asia,$p as Avatar,Hb as Background,Ft as Badge,i0 as BadgeCheck,pf as BadgeTooltip,n0 as Blog,ar as BlurImage,s0 as Bolt,l0 as BoltFill,d0 as Book2,Io as Book2Fill,m0 as Book2Small,c0 as BookOpen,u0 as Books2,p0 as BoxArchive,f0 as BulletList,zo as BulletListFill,ie as Button,ff as ButtonTooltip,pr as COMPANY,fr as COMPARE_PAGES,li as CUSTOMER_STORIES,Ta as Calendar,b0 as Calendar6,h0 as CalendarDays,g0 as CalendarIcon,v0 as CalendarRefresh,Lm as CardAmex,Tm as CardDiscover,Hf as CardList,Em as CardMastercard,Am as CardVisa,x0 as Cards,y0 as CaretUpFill,Tn as Carousel,En as CarouselContent,An as CarouselItem,rg as CarouselNavBar,In as CarouselNext,Dn as CarouselPrevious,ug as CarouselThumbnail,mg as CarouselThumbnails,Km as CashApp,w0 as ChartActivity2,C0 as ChartLine,Bm as ChatGPT,Oo as Check,_o as Check2,$n as Checkbox,Ho as CheckboxCheckedFill,Vo as CheckboxUnchecked,Bo as CircleCheck,N0 as CircleCheckFill,k0 as CircleDollar,P0 as CircleDotted,Wo as CircleHalfDottedCheck,Fo as CircleHalfDottedClock,Uo as CircleInfo,S0 as CirclePlay,M0 as CirclePlayFill,R0 as CircleQuestion,Cr as CircleWarning,L0 as CircleXmark,T0 as Circles,E0 as Circles3,Ii as ClientOnly,Go as CloudUpload,A0 as Code,D0 as ColorPalette2,J1 as Combobox,Vy as CompositeLogo,I0 as ConnectedDots,z0 as ConnectedDots4,Ot as ConnectedDotsFill,O0 as Connections3,yo as Copy,$x as CopyButton,qx as CopyText,_0 as CreditCard,H0 as Crosshairs3,V0 as Crown,ym as CrownSmall,B0 as Cube,W0 as CubeSettings,_t as CubeSettingsFill,F0 as CurrencyDollar,U0 as CursorRays,G0 as DatabaseKey,zr as DatePickerContext,Oh as DateRangePicker,$0 as Desktop,K0 as DiamondTurnRight,j0 as Dots,Y0 as Download,wm as DubCraftedShield,Z0 as Duplicate,q0 as EarthPosition,Fh as EmptyState,Q0 as EnvelopeArrowRight,zm as Europe,wo as ExpandingArrow,$o as Eye,Ko as EyeSlash,ur as FEATURES_LIST,km as Facebook,jo as FeatherFill,Wm as Figma,Xh as FileUpload,X0 as FileZip2,C2 as Filter,eu as Filter2,J0 as FilterBars,ru as Flag2,Yo as Flag6,tu as FlagWavy,ou as Folder,au as Folder5,Dx as Footer,L2 as Form,iu as GamingConsole,nu as Gauge6,su as Gear,lu as Gear2,cu as Gear3,du as Gem,Zo as Gift,mu as GiftFill,Fm as GitHubEnhanced,At as Github,uu as Globe,Qo as Globe2,qo as GlobePointer,pu as GlobeSearch,Lo as Go,Pm as Google,Um as GoogleEnhanced,fu as GreekTemple,D2 as Grid,gu as GridIcon,hu as GridLayoutRows,vu as GridPlus,bu as Headset,Xo as HeadsetFill,Jo as HeartFill,ea as HexadecagonStar,ta as Hyperlink,Xx as IconMenu,xu as Icosahedron,yu as Incognito,mf as InfoTooltip,ey as InlineSnippet,Fl as Input,wu as InputPassword,ra as InputSearch,iv as InputSelect,Cu as InvoiceDollar,Nu as Key,ha as KeyboardShortcutContext,Ug as KeyboardShortcutProvider,mi as LEGAL_PAGES,sc as Label,ku as LayoutSidebar,Pu as License,oa as LinesY,Mu as Link4,Su as LinkBroken,iy as LinkLogo,gy as LinkPreview,hy as LinkPreviewPlaceholder,Dt as LinkedIn,df as LinkifyTooltipContent,mt as LoadingCircle,Nm as LoadingDots,ye as LoadingSpinner,Ru as LocationPin,yt as Logo,Co as Magic,Lu as Magnifier,Tu as MapPosition,Cm as MatrixLines,gr as MaxWidthWrapper,Eu as Menu3,Au as MessageSmile,bv as MiniAreaChart,Du as MobilePhone,kv as Modal,Iu as MoneyBill2,zu as MoneyBills2,Z4 as Nav,ao as NavContext,nx as NavMobile,br as NavWordmark,Om as NorthAmerica,Ou as Note,Uu as NucleoPhoto,uf as NumberTooltip,_m as Oceania,_u as OfficeBuilding,aa as Page2,Mv as PaginationControls,Hu as Paintbrush,Vu as Palette2,jm as Payoneer,Ym as Paypal,Wu as Pen2,Bu as PenWriting,Fu as PercentageArrowDown,No as Photo,To as Php,Gu as Plug2,Ht as Plus,ot as Popover,Ny as Popup,mm as PopupContext,$u as Post,Sm as Prisma,Mo as ProductHunt,My as ProgressBar,Ku as Pyramid,Eo as Python,ju as QRCode,di as RESOURCES,wc as RadioGroup,Cc as RadioGroupItem,Ro as Raycast,Yu as Receipt2,ia as ReferredVia,Zu as Refresh2,qu as Robot,Ao as Ruby,ci as SDKS,ui as SOCIAL_LINKS,na as SatelliteDish,Qu as ScanText,Xu as Scribble,zv as Sheet,Ju as ShieldAlert,ep as ShieldCheck,tp as ShieldKeyhole,rp as ShieldSlash,Vv as ShimmerDots,op as Shuffle,cf as SimpleTooltipContent,ap as Sliders,ko as SortOrder,Hm as SouthAmerica,ip as Sparkle3,Gm as Spotify,np as SquareChart,sp as SquareLayoutGrid6,lp as SquareXmark,cp as Stars2,$v as StatusBadge,Zm as StripeLink,Po as Success,Jv as Switch,vp as TV,Oy as TabSelect,Nb as Table,dp as TableIcon,mp as TableRows2,up as Tablet,pp as Tag,fp as Tags,So as Tick,Mm as Tinybird,gp as Toggle2Fill,Rb as ToggleGroup,Kp as TokenAvatar,ee as Tooltip,lf as TooltipContent,sf as TooltipProvider,hp as Trash,It as Twitter,Do as Typescript,Ob as UTMBuilder,Xc as UTM_PARAMETERS,Rm as Unsplash,bp as User,xp as UserCheck,yp as UserCrown,wp as Users,Np as Users2,kp as Users6,Cp as UsersSettings,qm as Venmo,Pp as Versions2,Sp as Watch,Mp as Webhook,Rp as Window,Lp as WindowSearch,Tp as WindowSettings,Ti as Wordmark,Ep as Xmark,zt as YouTube,an as badgeVariants,pe as buttonVariants,rn as getUserAvatarUrl,io as navItems,Oc as statusBadgeVariants,fe as useCarousel,ua as useCarouselActiveIndex,xg as useCookies,Je as useCopyToClipboard,kg as useCurrentAnchor,Sg as useEnterSubmit,Tg as useInViewport,Dg as useInputFocused,_g as useIntersectionObserver,et as useKeyboardShortcut,Kg as useLocalStorage,Y as useMediaQuery,Qg as useOptimisticUpdate,l1 as usePagination,m1 as useRemoveGAParams,Gt as useResizeObserver,ya as useRouterStuff,Na as useScroll,tt as useScrollProgress,Cb as useTable,xa as useTablePagination,P1 as useToastWithUndo};
|
|
52
|
+
</svg>`;function xr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=zd(),{theme:a}=Hd(no),[l,c]=_d(!1),s=Od(n=>{n.preventDefault(),c(!0)},[]),[,m]=Je();function d(n){Vd.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Dn(He.Root,{open:l,onOpenChange:c,children:[Q(He.Anchor,{asChild:!0,children:Q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?Q(An,{className:r}):Q(Nt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Q(He.Portal,{children:Q(He.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:Dn("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Q(St,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Bd),icon:Q(Nt,{className:"h-4 w-4"})}),Q(St,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Wd),icon:Q(Id,{strokeWidth:2,className:"h-4 w-4"})}),Q(St,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Q(Ed,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Q(St,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Q(Ad,{strokeWidth:2,className:"h-4 w-4"})}):Q(St,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Q(Dd,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function St({className:e,...t}){return Q(ie,{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 G}from"react/jsx-runtime";var Kd=[{name:"Twitter",icon:Ot,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:zt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:It,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Ht,href:"https://www.youtube.com/@dubdotco"}],Mt={features:pr.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:gr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:pn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:wo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},Rt="text-sm font-medium text-neutral-900",Tt="flex flex-col mt-2.5 gap-2.5",ct="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Zx({staticDomain:e,className:t}){let{domain:r="dub.co"}=Ud();return e&&(r=e),A(hr,{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:G("footer",{children:[G("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[G("div",{className:"flex flex-col gap-6",children:[A("div",{className:"grow",children:G(_e,{href:O("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[G("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),A(xr,{className:"h-8 text-neutral-800"})]})}),A("div",{className:"flex items-center gap-3",children:Kd.map(({name:o,icon:a,href:l})=>G("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[A("span",{className:"sr-only",children:o}),A(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),G("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[G("div",{className:"md:grid md:grid-cols-2",children:[G("div",{children:[A("h3",{className:Rt,children:"Product"}),A("ul",{role:"list",className:Tt,children:Mt.features.map(o=>A("li",{children:A(_e,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]}),G("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Rt,children:"Resources"}),A("ul",{role:"list",className:Tt,children:Mt.product.map(o=>A("li",{children:A(_e,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]})]}),G("div",{className:"md:grid md:grid-cols-2",children:[G("div",{className:"flex flex-col space-y-8",children:[G("div",{children:[A("h3",{className:Rt,children:"Compare"}),A("ul",{role:"list",className:Tt,children:Mt.compare.map(o=>A("li",{children:A(_e,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]}),G("div",{children:[A("h3",{className:Rt,children:"Legal"}),G("ul",{role:"list",className:Tt,children:[Mt.legal.map(o=>A("li",{children:A(_e,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name)),A("li",{children:G("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:i(ct,"flex items-center gap-1"),children:["Trust Center ",A(sa,{className:"size-3.5"})]})})]})]})]}),G("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Rt,children:"Tools"}),A("ul",{role:"list",className:Tt,children:Mt.tools.map(o=>A("li",{children:A(_e,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ct,children:o.name})},o.name))})]})]})]})]}),G("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[A(jd,{}),A(_e,{href:O("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:A(Fd,{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"})}),G("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}function jd(){let{data:e}=$d("https://status.dub.co/api/v1/summary",me),[t,r]=In("bg-neutral-200"),[o,a]=In("Loading status...");return Gd(()=>{if(!e)return;let{ongoing_incidents:l}=e;if(l.length>0){let{current_worst_impact:c,name:s}=l[0],m=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(s),r(m)}else a("All systems operational"),r("bg-green-500")},[e]),G(_e,{href:"https://status.dub.co",target:"_blank",className:"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",children:[G("div",{className:"relative size-2",children:[A("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),A("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),A("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as Yd,motion as Zd}from"framer-motion";import{useEffect as qd,useState as Qd}from"react";import{jsx as zn}from"react/jsx-runtime";var On=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=Qd(!1);qd(()=>{l(!0)},[]);let c=r?Zd.div:"div";return zn(Yd,{children:a?zn(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Xd}from"class-variance-authority";import{toast as Jd}from"sonner";import{jsx as so,jsxs as tu}from"react/jsx-runtime";var eu=Xd("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 s5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=Je(),s=o||Co;return tu("button",{onClick:m=>{m.stopPropagation(),Jd.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(eu({variant:e}),r),type:"button",children:[so("span",{className:"sr-only",children:"Copy"}),l?so(Ro,{className:"h-3.5 w-3.5"}):so(s,{className:"h-3.5 w-3.5"})]})}import{toast as ru}from"sonner";import{jsx as ou}from"react/jsx-runtime";function m5({value:e,children:t,className:r,successMessage:o}){let[a,l]=Je();return ou("button",{onClick:c=>{c.stopPropagation(),ru.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as au,jsxs as nu}from"react/jsx-runtime";function f5({icon:e,text:t}){return nu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,au("p",{className:"truncate text-sm",children:t})]})}import{jsx as iu}from"react/jsx-runtime";var h5=({children:e})=>iu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as lo}from"react/jsx-runtime";function w5({apexDomain:e,className:t,imageProps:r}){return e?lo(Ct,{src:`${At}${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}):lo("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:lo(Jo,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Hn}from"lucide-react";import{useRouter as su,useSearchParams as lu}from"next/navigation";import{useEffect as cu,useMemo as du,useRef as uu}from"react";import mu from"swr";import{useDebounce as pu}from"use-debounce";import{Fragment as _n,jsx as j,jsxs as Ve}from"react/jsx-runtime";function E5({defaultUrl:e}){let t=su(),r=lu(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=pu(fo(o),500),l=du(()=>ho(a||""),[a]),{data:c,isValidating:s}=mu(a&&`/api/metatags?url=${encodeURIComponent(a)}`,me,{revalidateOnFocus:!1}),{title:m,description:d,image:n}=c||{},p=uu(null);cu(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=q();return Ve(_n,{children:[!e&&Ve("div",{className:"relative flex items-center",children:[j(Hn,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,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:o,onChange:v=>t.replace(`/tools/metatags${v.target.value.length>0?`?url=${v.target.value}`:""}`),"aria-invalid":"true"})]}),Ve("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[s&&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(mt,{})}),n?j("img",{src:n,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Ve("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(Po,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Ve("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?j("p",{className:"text-sm text-[#536471]",children:l}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),m?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:m}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),d?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:d}):Ve("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 A5({defaultUrl:e}){return Ve(_n,{children:[Ve("div",{className:"relative flex items-center",children:[j(Hn,{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(mt,{})})})]})}import{AnimatePresence as fu}from"framer-motion";import Vn from"js-cookie";import{createContext as gu,useState as hu}from"react";import{jsx as co}from"react/jsx-runtime";var vu=gu({hidePopup:()=>{}});function V5({children:e,hiddenCookieId:t}){let[r,o]=hu(Vn.get(t)==="1"),a=()=>{o(!0),Vn.set(t,"1")};return co(On,{children:co(vu.Provider,{value:{hidePopup:a},children:co(fu,{children:!r&&e})})})}import{motion as bu}from"framer-motion";import{jsx as Bn}from"react/jsx-runtime";function U5({value:e=0,max:t=100,className:r}){return Bn("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Bn(bu.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 Wn}from"class-variance-authority";import{LayoutGroup as xu,motion as yu}from"framer-motion";import{useId as wu}from"react";import{jsx as Lt,jsxs as ku}from"react/jsx-runtime";var Cu=Wn("p-4 transition-colors duration-75",{variants:{variant:{default:"text-neutral-400 data-[selected=true]:text-black data-[selected=false]:hover:text-neutral-500",accent:"text-neutral-500 transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-neutral-700 data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Nu=Wn("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-black",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function X5({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=wu();return Lt("div",{className:i("flex text-sm",a),children:Lt(xu,{id:l,children:t.map(({id:c,label:s})=>ku("div",{className:"relative",children:[Lt("button",{type:"button",onClick:()=>o==null?void 0:o(c),className:Cu({variant:e}),"data-selected":c===r,"aria-selected":c===r,children:s}),c===r&&Lt(yu.div,{layoutId:"indicator",transition:{duration:.1},className:Nu({variant:e}),children:Lt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c))})})}import{jsx as Fn,jsxs as Pu}from"react/jsx-runtime";function t8({className:e}){return Pu("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:[Fn("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"}),Fn("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{Tr as AUTOPLAY_DEFAULT_DELAY,qp as Accordion,Zn as AccordionContent,jn as AccordionItem,Yn as AccordionTrigger,Vu as Africa,Qu as Airtm,Jn as Alert,ti as AlertDescription,ei as AlertTitle,$u as Amazon,Ne as AnimatedSizeContainer,om as Apple,am as ArrowBoldUp,nm as ArrowRight,im as ArrowTrendUp,sm as ArrowTurnLeft,lm as ArrowTurnRight2,cm as ArrowUpRight,dm as ArrowsOppositeDirectionY,Bu as Asia,af as Avatar,t4 as Background,Gt as Badge,um as BadgeCheck,Sf as BadgeTooltip,mm as Blog,Ct as BlurImage,pm as Bolt,fm as BoltFill,hm as Book2,Oo as Book2Fill,vm as Book2Small,gm as BookOpen,bm as Books2,xm as BoxArchive,ym as BulletList,Ho as BulletListFill,ie as Button,Mf as ButtonTooltip,fr as COMPANY,gr as COMPARE_PAGES,dn as CUSTOMER_STORIES,Da as Calendar,km as Calendar6,Cm as CalendarDays,wm as CalendarIcon,Nm as CalendarRefresh,zu as CardAmex,Ou as CardDiscover,Qf as CardList,Hu as CardMastercard,_u as CardVisa,Pm as Cards,Sm as CaretUpFill,Ai as Carousel,Di as CarouselContent,Ii as CarouselItem,g1 as CarouselNavBar,Oi as CarouselNext,zi as CarouselPrevious,P1 as CarouselThumbnail,k1 as CarouselThumbnails,Xu as CashApp,Mm as ChartActivity2,Rm as ChartLine,Ku as ChatGPT,_o as Check,Vo as Check2,ji as Checkbox,Bo as CheckboxCheckedFill,Wo as CheckboxUnchecked,Fo as CircleCheck,Tm as CircleCheckFill,Lm as CircleDollar,Em as CircleDotted,Uo as CircleHalfDottedCheck,Go as CircleHalfDottedClock,$o as CircleInfo,Am as CirclePlay,Dm as CirclePlayFill,Im as CircleQuestion,Nr as CircleWarning,zm as CircleXmark,Om as Circles,Hm as Circles3,On as ClientOnly,Ko as CloudUpload,_m as Code,Vm as ColorPalette2,ph as Combobox,t8 as CompositeLogo,Bm as ConnectedDots,Wm as ConnectedDots4,_t as ConnectedDotsFill,Fm as Connections3,Co as Copy,s5 as CopyButton,m5 as CopyText,Um as CreditCard,Gm as Crosshairs3,$m as Crown,Su as CrownSmall,Km as Cube,jm as CubeSettings,Vt as CubeSettingsFill,Ym as CurrencyDollar,Zm as CursorRays,qm as DatabaseKey,Ir as DatePickerContext,qh as DateRangePicker,Qm as Desktop,Xm as DiamondTurnRight,Jm as Discount,e0 as Dots,t0 as Download,Mu as DubCraftedShield,r0 as Duplicate,o0 as EarthPosition,r2 as EmptyState,a0 as EnvelopeArrowRight,Wu as Europe,No as ExpandingArrow,jo as Eye,Yo as EyeSlash,pr as FEATURES_LIST,Lu as Facebook,Zo as FeatherFill,ju as Figma,p2 as FileUpload,n0 as FileZip2,H2 as Filter,s0 as Filter2,i0 as FilterBars,c0 as Flag2,qo as Flag6,l0 as FlagWavy,d0 as Folder,g0 as Folder5,u0 as FolderBookmark,m0 as FolderLock,p0 as FolderPlus,f0 as FolderShield,Zx as Footer,G2 as Form,h0 as GamingConsole,v0 as Gauge6,b0 as Gear,x0 as Gear2,y0 as Gear3,w0 as Gem,Qo as Gift,C0 as GiftFill,Yu as GitHubEnhanced,It as Github,N0 as Globe,Jo as Globe2,Xo as GlobePointer,k0 as GlobeSearch,Eo as Go,Eu as Google,Zu as GoogleEnhanced,P0 as GreekTemple,Y2 as Grid,S0 as GridIcon,M0 as GridLayoutRows,R0 as GridPlus,T0 as Headset,ea as HeadsetFill,ta as HeartFill,ra as HexadecagonStar,oa as Hyperlink,f5 as IconMenu,L0 as Icosahedron,E0 as Incognito,kf as InfoTooltip,h5 as InlineSnippet,$l as Input,A0 as InputPassword,aa as InputSearch,wv as InputSelect,D0 as InvoiceDollar,I0 as Key,xa as KeyboardShortcutContext,rg as KeyboardShortcutProvider,pn as LEGAL_PAGES,uc as Label,z0 as LayoutSidebar,O0 as License,na as LinesY,_0 as Link4,H0 as LinkBroken,w5 as LinkLogo,E5 as LinkPreview,A5 as LinkPreviewPlaceholder,zt as LinkedIn,Nf as LinkifyTooltipContent,mt as LoadingCircle,Tu as LoadingDots,we as LoadingSpinner,V0 as LocationPin,B0 as LockFill,Nt as Logo,ko as Magic,W0 as Magnifier,F0 as MapPosition,Ru as MatrixLines,hr as MaxWidthWrapper,U0 as Menu3,G0 as MessageSmile,Iv as MiniAreaChart,$0 as MobilePhone,Bv as Modal,K0 as MoneyBill,j0 as MoneyBill2,Y0 as MoneyBills2,ux as Nav,no as NavContext,Cx as NavMobile,xr as NavWordmark,Fu as NorthAmerica,Z0 as Note,rp as NucleoPhoto,Pf as NumberTooltip,Uu as Oceania,q0 as OfficeBuilding,ia as Page2,Uv as PaginationControls,Q0 as Paintbrush,X0 as Palette2,Ju as Payoneer,em as Paypal,ep as Pen2,J0 as PenWriting,tp as PercentageArrowDown,Po as Photo,Ao as Php,op as Plug2,Bt as Plus,ot as Popover,V5 as Popup,vu as PopupContext,ap as Post,Au as Prisma,To as ProductHunt,U5 as ProgressBar,np as Pyramid,Do as Python,ip as QRCode,mn as RESOURCES,Pc as RadioGroup,Sc as RadioGroupItem,Lo as Raycast,sp as Receipt2,sa as ReferredVia,lp as Refresh2,cp as Robot,Io as Ruby,un as SDKS,fn as SOCIAL_LINKS,la as SatelliteDish,dp as ScanText,up as Scribble,Qv as Sheet,mp as ShieldAlert,pp as ShieldCheck,fp as ShieldKeyhole,gp as ShieldSlash,tb as ShimmerDots,hp as Shuffle,Cf as SimpleTooltipContent,vp as Sliders,So as SortOrder,Gu as SouthAmerica,bp as Sparkle3,qu as Spotify,xp as SquareChart,yp as SquareLayoutGrid6,wp as SquareXmark,Cp as Stars2,sb as StatusBadge,tm as StripeLink,Mo as Success,gb as Switch,Lp as TV,X5 as TabSelect,Bb as Table,Np as TableIcon,kp as TableRows2,Pp as Tablet,Sp as Tag,Mp as Tags,Ro as Tick,Du as Tinybird,Rp as Toggle2Fill,$b as ToggleGroup,nf as TokenAvatar,X as Tooltip,wf as TooltipContent,yf as TooltipProvider,Tp as Trash,Ot as Twitter,zo as Typescript,Jb as UTMBuilder,nd as UTM_PARAMETERS,Iu as Unsplash,Ep as User,Ap as UserCheck,Dp as UserCrown,Ip as Users,Op as Users2,Hp as Users6,zp as UsersSettings,rm as Venmo,_p as Versions2,Vp as Watch,Bp as Webhook,Wp as Window,Fp as WindowSearch,Up as WindowSettings,An as Wordmark,Gp as Xmark,Ht as YouTube,ii as badgeVariants,fe as buttonVariants,ai as getUserAvatarUrl,io as navItems,Bc as statusBadgeVariants,ge as useCarousel,ga as useCarouselActiveIndex,A1 as useCookies,Je as useCopyToClipboard,H1 as useCurrentAnchor,V1 as useEnterSubmit,U1 as useInViewport,K1 as useInputFocused,q1 as useIntersectionObserver,et as useKeyboardShortcut,ng as useLocalStorage,q as useMediaQuery,dg as useOptimisticUpdate,wg as usePagination,kg as useRemoveGAParams,Kt as useResizeObserver,Na as useRouterStuff,Sa as useScroll,tt as useScrollProgress,Vb as useTable,Ca as useTablePagination,_g as useToastWithUndo};
|