@dub/ui 0.2.55 → 0.2.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-74LJJSLI.mjs +2 -0
- package/dist/icons/index.d.ts +11 -5
- package/dist/icons/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/icons/index.d.ts
CHANGED
|
@@ -642,6 +642,7 @@ declare const PLAN_FEATURE_ICONS: {
|
|
|
642
642
|
domains: typeof Globe;
|
|
643
643
|
users: typeof Users2;
|
|
644
644
|
analytics: typeof ChartLine;
|
|
645
|
+
conversions: typeof Receipt2;
|
|
645
646
|
ai: typeof Sparkle3;
|
|
646
647
|
api: typeof Plug2;
|
|
647
648
|
advanced: typeof Gear3;
|
|
@@ -650,18 +651,23 @@ declare const PLAN_FEATURE_ICONS: {
|
|
|
650
651
|
deeplinks: typeof MarketingTarget;
|
|
651
652
|
events: typeof Bolt;
|
|
652
653
|
webhooks: typeof Webhook;
|
|
653
|
-
partners: typeof ConnectedDots4;
|
|
654
|
-
payouts: typeof CreditCard;
|
|
655
654
|
roles: typeof UsersSettings;
|
|
656
655
|
slack: typeof Slack;
|
|
657
656
|
tests: typeof Flask;
|
|
658
|
-
whitelabel: typeof SquareLayoutGrid5;
|
|
659
657
|
email: typeof PaperPlane;
|
|
660
|
-
volume: typeof PercentageArrowDown;
|
|
661
658
|
sso: typeof ShieldKeyhole;
|
|
662
|
-
sla: typeof License;
|
|
663
659
|
logs: typeof Versions2;
|
|
664
660
|
success: typeof UserCrown;
|
|
661
|
+
sla: typeof License;
|
|
662
|
+
volume: typeof CirclePercentage;
|
|
663
|
+
clickpayouts: typeof CursorRays;
|
|
664
|
+
payouts: typeof MoneyBills2;
|
|
665
|
+
basicrewards: typeof Gift;
|
|
666
|
+
flexiblerewards: typeof Shuffle;
|
|
667
|
+
ailandingpage: typeof Sparkle3;
|
|
668
|
+
customerinsights: typeof UserFocus;
|
|
669
|
+
partners: typeof Users2;
|
|
670
|
+
whitelabel: typeof SquareLayoutGrid5;
|
|
665
671
|
};
|
|
666
672
|
|
|
667
673
|
type Icon = LucideIcon | ComponentType<SVGProps<SVGSVGElement>>;
|
package/dist/icons/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$,$a,$b,$c,$d,A,Aa,Ab,Ac,Ad,B,Ba,Bb,Bc,Bd,C,Ca,Cb,Cc,Cd,D,Da,Db,Dc,Dd,E,Ea,Eb,Ec,Ed,F,Fa,Fb,Fc,Fd,G,Ga,Gb,Gc,Gd,H,Ha,Hb,Hc,Hd,I,Ia,Ib,Ic,Id,J,Ja,Jb,Jc,Jd,K,Ka,Kb,Kc,Kd,L,La,Lb,Lc,Ld,M,Ma,Mb,Mc,Md,N,Na,Nb,Nc,Nd,O,Oa,Ob,Oc,Od,P,Pa,Pb,Pc,Pd,Q,Qa,Qb,Qc,Qd,R,Ra,Rb,Rc,Rd,S,Sa,Sb,Sc,Sd,T,Ta,Tb,Tc,Td,U,Ua,Ub,Uc,Ud,V,Va,Vb,Vc,Vd,W,Wa,Wb,Wc,Wd,X,Xa,Xb,Xc,Xd,Y,Ya,Yb,Yc,Yd,Z,Za,Zb,Zc,Zd,_,_a,_b,_c,_d,a,aa,ab,ac,ad,ae,b,ba,bb,bc,bd,be,c,ca,cb,cc,cd,ce,d,da,db,dc,dd,de,e,ea,eb,ec,ed,ee,f,fa,fb,fc,fd,fe,g,ga,gb,gc,gd,ge,h,ha,hb,hc,hd,he,i,ia,ib,ic,id,ie,j,ja,jb,jc,jd,je,k,ka,kb,kc,kd,ke,l,la,lb,lc,ld,le,m,ma,mb,mc,md,me,n,na,nb,nc,nd,ne,o,oa,ob,oc,od,oe,p,pa,pb,pc,pd,pe,q,qa,qb,qc,qd,qe,r,ra,rb,rc,rd,re,s,sa,sb,sc,sd,t,ta,tb,tc,td,u,ua,ub,uc,ud,v,va,vb,vc,vd,w,wa,wb,wc,wd,x,xa,xb,xc,xd,y,ya,yb,yc,yd,z,za,zb,zc,zd}from"../chunk-
|
|
2
|
+
import{$,$a,$b,$c,$d,A,Aa,Ab,Ac,Ad,B,Ba,Bb,Bc,Bd,C,Ca,Cb,Cc,Cd,D,Da,Db,Dc,Dd,E,Ea,Eb,Ec,Ed,F,Fa,Fb,Fc,Fd,G,Ga,Gb,Gc,Gd,H,Ha,Hb,Hc,Hd,I,Ia,Ib,Ic,Id,J,Ja,Jb,Jc,Jd,K,Ka,Kb,Kc,Kd,L,La,Lb,Lc,Ld,M,Ma,Mb,Mc,Md,N,Na,Nb,Nc,Nd,O,Oa,Ob,Oc,Od,P,Pa,Pb,Pc,Pd,Q,Qa,Qb,Qc,Qd,R,Ra,Rb,Rc,Rd,S,Sa,Sb,Sc,Sd,T,Ta,Tb,Tc,Td,U,Ua,Ub,Uc,Ud,V,Va,Vb,Vc,Vd,W,Wa,Wb,Wc,Wd,X,Xa,Xb,Xc,Xd,Y,Ya,Yb,Yc,Yd,Z,Za,Zb,Zc,Zd,_,_a,_b,_c,_d,a,aa,ab,ac,ad,ae,b,ba,bb,bc,bd,be,c,ca,cb,cc,cd,ce,d,da,db,dc,dd,de,e,ea,eb,ec,ed,ee,f,fa,fb,fc,fd,fe,g,ga,gb,gc,gd,ge,h,ha,hb,hc,hd,he,i,ia,ib,ic,id,ie,j,ja,jb,jc,jd,je,k,ka,kb,kc,kd,ke,l,la,lb,lc,ld,le,m,ma,mb,mc,md,me,n,na,nb,nc,nd,ne,o,oa,ob,oc,od,oe,p,pa,pb,pc,pd,pe,q,qa,qb,qc,qd,qe,r,ra,rb,rc,rd,re,s,sa,sb,sc,sd,t,ta,tb,tc,td,u,ua,ub,uc,ud,v,va,vb,vc,vd,w,wa,wb,wc,wd,x,xa,xb,xc,xd,y,ya,yb,yc,yd,z,za,zb,zc,zd}from"../chunk-74LJJSLI.mjs";import"../chunk-WSLI5B4B.mjs";export{P as Africa,$ as Airtm,V as Amazon,ga as AndroidLogo,ha as AppleLogo,ia as ArrowBoldUp,ja as ArrowRight,ka as ArrowTrendUp,la as ArrowTurnLeft,ma as ArrowTurnRight2,na as ArrowUpRight,oa as ArrowsOppositeDirectionX,pa as ArrowsOppositeDirectionY,Q as Asia,qa as BadgeCheck,ra as BadgeCheck2Fill,sa as Blog,ta as Bolt,ua as BoltFill,wa as Book2,xa as Book2Fill,ya as Book2Small,va as BookOpen,za as Books2,Aa as BoxArchive,Ba as BracketsCurly,Ca as BriefcaseFill,Da as Brush,Ea as BulletList,Fa as BulletListFill,Ga as Calculator,Ka as Calendar6,Ia as CalendarDays,Ha as CalendarIcon,Ja as CalendarRefresh,G as CardAmex,H as CardDiscover,I as CardMastercard,J as CardVisa,La as Cards,Ma as CaretUpFill,aa as CashApp,Na as ChartActivity2,Oa as ChartArea2,Pa as ChartLine,W as ChatGPT,Qa as Check,Ra as Check2,Sa as CheckboxCheckedFill,Ta as CheckboxUnchecked,Ua as ChevronLeft,Va as ChevronRight,Wa as CircleCheck,Xa as CircleCheckFill,Ya as CircleDollar,Za as CircleDotted,_a as CircleHalfDottedCheck,$a as CircleHalfDottedClock,ab as CircleInfo,bb as CirclePercentage,cb as CirclePlay,db as CirclePlayFill,eb as CircleQuestion,fb as CircleUser,gb as CircleWarning,hb as CircleXmark,ib as Circles,jb as Circles3,kb as CloudUpload,lb as Code,mb as ColorPalette2,nb as ConnectedDots,pb as ConnectedDots4,ob as ConnectedDotsFill,qb as Connections3,a as Copy,rb as CreditCard,sb as Crosshairs3,tb as Crown,b as CrownSmall,ub as Cube,vb as CubeSettings,wb as CubeSettingsFill,xb as CurrencyDollar,yb as CursorRays,zb as DatabaseKey,Ab as Desktop,Bb as DiamondTurnRight,Cb as DiamondTurnRightFill,Db as Directions,Eb as Discount,Fb as Dots,Gb as Download,c as DubAnalyticsIcon,d as DubApiIcon,e as DubCraftedShield,f as DubLinksIcon,g as DubPartnersIcon,Hb as Duplicate,Ib as Earth,Jb as EarthPosition,Kb as Envelope,Lb as EnvelopeAlert,Mb as EnvelopeArrowRight,Nb as EnvelopeFill,R as Europe,h as ExpandingArrow,Ob as Eye,Pb as EyeSlash,s as Facebook,Qb as FeatherFill,X as Figma,Rb as FileContent,Sb as FileZip2,Ub as Filter2,Tb as FilterBars,Wb as Flag2,Xb as Flag6,Vb as FlagWavy,Yb as Flask,Zb as FlaskSmall,_b as Folder,dc as Folder5,$b as FolderBookmark,ac as FolderLock,bc as FolderPlus,cc as FolderShield,ec as GamingConsole,fc as Gauge6,gc as Gear,hc as Gear2,ic as Gear3,jc as Gem,kc as Gift,lc as GiftFill,Y as GitHubEnhanced,t as Github,mc as Globe,pc as Globe2,nc as GlobePointer,oc as GlobeSearch,K as Go,u as Google,Z as GoogleEnhanced,qc as GreekTemple,rc as GridIcon,sc as GridLayoutRows,tc as GridPlus,uc as GripDotsVertical,vc as Headset,wc as HeartFill,xc as HexadecagonStar,yc as History,zc as Hyperlink,Ac as Icosahedron,Bc as Incognito,Cc as InfinityIcon,Dc as InputField,Ec as InputPassword,Fc as InputPasswordPointer,Gc as InputSearch,v as Instagram,Hc as InvoiceDollar,Ic as Key,Jc as LayoutSidebar,Kc as License,Lc as LifeRing,Mc as LinesY,Oc as Link4,Nc as LinkBroken,w as LinkedIn,p as LoadingCircle,q as LoadingDots,r as LoadingSpinner,Pc as LocationPin,Qc as Lock,Rc as LockFill,i as Magic,Sc as Magnifier,Tc as MapPosition,j as MarkdownIcon,Uc as MarketingTarget,k as MatrixLines,Vc as Menu3,Wc as MessageSmile,Xc as MicrophoneFill,Yc as Minus,Zc as MobilePhone,_c as MoneyBill,$c as MoneyBill2,ad as MoneyBills2,bd as Msgs,S as NorthAmerica,cd as Note,ld as NucleoPhoto,T as Oceania,dd as OfficeBuilding,re as PLAN_FEATURE_ICONS,ed as Page2,fd as Paintbrush,gd as Palette2,hd as PaperPlane,ba as Payoneer,ca as Paypal,jd as Pen2,id as PenWriting,kd as PercentageArrowDown,l as Photo,L as Php,md as Plug2,nd as Plus,od as Plus2,pd as Post,x as Prisma,y as ProductHunt,qd as Pyramid,M as Python,rd as QRCode,z as Raycast,sd as Receipt2,td as ReferredVia,ud as Refresh2,vd as Robot,N as Ruby,wd as SatelliteDish,xd as ScanText,yd as Scribble,zd as ShieldAlert,Ad as ShieldCheck,Bd as ShieldKeyhole,Cd as ShieldSlash,Dd as ShieldUser,Ed as Shuffle,A as Slack,Fd as Sliders,m as SortOrder,U as SouthAmerica,Gd as Sparkle3,_ as Spotify,Hd as SquareChart,Id as SquareLayoutGrid5,Jd as SquareLayoutGrid6,Kd as SquareUserSparkle2,Ld as SquareXmark,Md as Stars2,da as Stripe,ea as StripeLink,n as Success,Xd as TV,Nd as TableIcon,Od as TableRows2,Pd as Tablet,Qd as Tag,Rd as Tags,o as Tick,B as TikTok,Sd as Timer2,C as Tinybird,Td as Toggle2Fill,Ud as Toggles,Vd as Trash,Wd as TriangleWarning,D as Twitter,O as Typescript,Yd as UiCard,E as Unsplash,Zd as User,_d as UserCheck,$d as UserCrown,ae as UserDelete,be as UserFocus,ce as UserPlus,de as UserXmark,ee as Users,he as Users2,ie as Users6,fe as UsersFill,ge as UsersSettings,fa as Venmo,je as Versions2,ke as Views,le as Watch,me as Webhook,ne as Window,oe as WindowSearch,pe as WindowSettings,qe as Xmark,F as YouTube};
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as hp,$a as xa,$b as Z0,$c as Ff,$d as Ag,A as Xu,Aa as Wp,Ab as L0,Ac as xf,Ad as cg,B as Ju,Ba as $p,Bb as M0,Bc as Ia,Bd as dg,C as Qu,Ca as ua,Cb as rr,Cc as yf,Cd as mg,D as Jt,Da as Up,Db as D0,Dc as wf,Dd as ug,E as ep,Ea as Gp,Eb as E0,Ec as Nf,Ed as pg,F as Qt,Fa as pa,Fb as I0,Fc as Aa,Fd as fg,G as tp,Ga as Kp,Gb as A0,Gc as Oa,Gd as gg,H as rp,Ha as jp,Hb as O0,Hc as Cf,Hd as bg,I as op,Ia as Yp,Ib as Ca,Ic as kf,Id as hg,J as ap,Ja as Zp,Jb as z0,Jc as Pf,Jd as vg,K as ia,Ka as qp,Kb as H0,Kc as Sf,Kd as xg,L as sa,La as Xp,Lb as V0,Lc as or,Ld as yg,M as la,Ma as Jp,Mb as _0,Mc as Rf,Md as wg,N as ca,Na as Qp,Nb as ka,Nc as Tf,Nd as Ng,O as da,Oa as e0,Ob as Pa,Oc as Lf,Od as Cg,P as np,Pa as t0,Pb as Sa,Pc as Mf,Pd as kg,Q as ip,Qa as fa,Qb as Ra,Qc as Df,Qd as Pg,R as sp,Ra as tr,Rb as F0,Rc as Ef,Rd as Sg,S as lp,Sa as ga,Sb as B0,Sc as If,Sd as _a,T as cp,Ta as ba,Tb as W0,Tc as Af,Td as Fa,U as dp,Ua as r0,Ub as $0,Uc as Of,Ud as Rg,V as mp,Va as o0,Vb as U0,Vc as zf,Vd as Tg,W as up,Wa as ha,Wb as G0,Wc as Hf,Wd as Lg,X as pp,Xa as a0,Xb as Ta,Xc as ar,Xd as Mg,Y as fp,Ya as n0,Yb as K0,Yc as za,Yd as Dg,Z as gp,Za as i0,Zb as j0,Zc as Vf,Zd as Eg,_ as bp,_a as va,_b as Y0,_c as _f,_d as Ig,a as Xo,aa as vp,ab as ya,ac as q0,ad as Bf,ae as Og,b as Wu,ba as xp,bb as s0,bc as X0,bd as Wf,be as zg,c as nt,ca as yp,cb as l0,cc as J0,cd as $f,ce as Hg,d as Zt,da as wp,db as c0,dc as Q0,dd as Uf,de as Vg,e as $u,ea as Np,eb as d0,ec as ef,ed as Ha,ee as _g,f as it,fa as Cp,fb as m0,fc as tf,fd as Gf,fe as St,g as st,ga as kp,gb as Gr,gc as La,gd as Kf,ge as Fg,h as Jo,ha as Pp,hb as u0,hc as rf,hd as jf,he as Bg,i as Qo,ia as Sp,ib as p0,ic as of,id as Yf,ie as Wg,j as Uu,ja as Rp,jb as f0,jc as af,jd as Zf,je as $g,k as Gu,ka as Tp,kb as wa,kc as Ma,kd as qf,ke as Ba,l as ea,la as Lp,lb as g0,lc as nf,ld as Xf,le as Ug,m as ta,ma as Mp,mb as b0,mc as sf,md as Jf,me as Gg,n as ra,na as ma,nb as h0,nc as Da,nd as nr,ne as Kg,o as oa,oa as Dp,ob as v0,oc as lf,od as Qf,oe as jg,p as Pt,pa as Ep,pb as x0,pc as Ea,pd as eg,pe as Yg,q as Ku,qa as Ip,qb as y0,qc as cf,qd as tg,qe as Zg,r as Ne,ra as Ap,rb as w0,rc as df,rd as rg,re as qg,s as ju,sa as Op,sb as N0,sc as mf,sd as og,t as qt,ta as zp,tb as C0,tc as uf,td as Kr,u as Yu,ua as Hp,ub as k0,uc as pf,ud as ag,v as Zu,va as Vp,vb as P0,vc as ff,vd as ng,w as Xt,wa as _p,wb as S0,wc as gf,wd as Va,x as qu,xa as er,xb as R0,xc as bf,xd as ig,y as aa,ya as Fp,yb as Na,yc as hf,yd as sg,z as na,za as Bp,zb as T0,zc as vf,zd as lg}from"./chunk-CTB6GJK7.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as $r,b as Nt,c as Wo,d as $o,e as Ct,f as Uo,g as Go,h as kt,i as Ur,j as Ko,k as V,l as we,m as jo,n as fe,o as jt,p as i,q as Yt,r as Yo,s as Zo,t as qo}from"./chunk-WSLI5B4B.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Ii}from"lucide-react";import*as sr from"react";import{jsx as ir,jsxs as Hi}from"react/jsx-runtime";var r1=ne.Root,Ai=sr.forwardRef(({className:e,...t},r)=>ir(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ai.displayName="AccordionItem";var Oi=sr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Ii:nr;return ir(ne.Header,{className:"flex",children:Hi(ne.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,ir(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Oi.displayName=ne.Trigger.displayName;var zi=sr.forwardRef(({className:e,children:t,...r},o)=>ir(ne.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));zi.displayName=ne.Content.displayName;import{cva as Vi}from"class-variance-authority";import*as lr from"react";import{jsx as jr}from"react/jsx-runtime";var _i=Vi("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Fi=lr.forwardRef(({className:e,variant:t,...r},o)=>jr("div",{ref:o,role:"alert",className:i(_i({variant:t}),e),...r}));Fi.displayName="Alert";var Bi=lr.forwardRef(({className:e,...t},r)=>jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Bi.displayName="AlertTitle";var Wi=lr.forwardRef(({className:e,...t},r)=>jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Wi.displayName="AlertDescription";import{sha256 as $i}from"js-sha256";import{useState as Ui}from"react";import{jsx as Yr}from"react/jsx-runtime";function Gi(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${$i(e.email)}?d=${t}`:t}function d1({user:e={},className:t}){if(!e)return Yr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ui(Gi(e));return Yr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function m1({id:e,className:t}){return Yr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ki}from"class-variance-authority";import{jsx as Yi}from"react/jsx-runtime";var ji=Ki("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function cr({className:e,variant:t,...r}){return Yi("span",{className:i(ji({variant:t}),e),...r})}import{cva as es}from"class-variance-authority";import{forwardRef as ts}from"react";import*as ge from"@radix-ui/react-tooltip";import Zi from"linkify-react";import{HelpCircle as qi}from"lucide-react";import Xi from"next/link";import{useState as Ji}from"react";import{Fragment as Qi,jsx as U,jsxs as Ge}from"react/jsx-runtime";function P1({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:c,delayDuration:d=0,...s}){let[m,l]=Ji(!1);return Ge(ge.Root,{open:o?!1:m,onOpenChange:l,delayDuration:d,disableHoverableContent:c,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:a,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...s,children:typeof t=="string"?U("span",{className:i("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:l}):t})})]})}function S1({title:e,cta:t,href:r,target:o,onClick:a}){return Ge("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(Xi,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ee,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function R1({title:e,cta:t,href:r}){return Ge("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ge(Qi,{children:[" ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})]})}function T1({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Zi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function L1(e){return U(J,{...e,children:U(qi,{className:"h-4 w-4 text-neutral-500"})})}function M1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:Ge("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ge("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Yt(e||0,{full:!0})," ",t]}),a&&Ge("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Go(a,{withAgo:!0})]})]}),children:o})}function D1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(cr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function E1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:i("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function dr({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as lt,jsxs as Wa}from"react/jsx-runtime";var ie=es("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:i("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ee=ts(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:d,shortcut:s,disabledTooltip:m,right:l,...n},u)=>m?lt(J,{content:m,children:Wa("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[d,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:s})]})}):Wa("button",{ref:u,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?lt(Ne,{}):d||null,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:s}),l]}));ee.displayName="Button";import{cva as rs}from"class-variance-authority";import{createContext as os}from"react";import{jsx as $a}from"react/jsx-runtime";var as=rs("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Rt=os({variant:"loose",loading:!1});function Ua({variant:e="loose",loading:t=!1,className:r,children:o}){return $a("ul",{className:i(as({variant:e,loading:t}),r),"data-variant":e,children:$a(Rt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ns}from"class-variance-authority";import{createContext as is,useContext as ss,useEffect as ls,useRef as cs,useState as ds}from"react";import{jsx as Ga,jsxs as ps}from"react/jsx-runtime";var ms=ns("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"}}}),us="w-full py-2.5 px-4",Zr=is({hovered:!1});function Ka({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:d}){let{variant:s}=ss(Rt),m=cs(null),[l,n]=ds(!1);ls(()=>{if(!l||!m.current)return;let p=setInterval(()=>{var b;((b=m.current)==null?void 0:b.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[l]);let u=p=>!(document.getElementById("modal-backdrop")||kt(p));return ps("li",{ref:m,className:i(ms({variant:s}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[d,Ga("div",{className:i(us,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Ga(Zr.Provider,{value:{hovered:l},children:r})})]})}var rb=Object.assign(Ua,{Card:Object.assign(Ka,{Context:Zr}),Context:Rt});import fs from"embla-carousel-autoplay";import gs from"embla-carousel-react";import{ArrowLeft as bs,ArrowRight as hs}from"lucide-react";import{createContext as vs,forwardRef as Lt,useCallback as Tt,useContext as xs,useEffect as qr,useState as Xr}from"react";import{jsx as Ce,jsxs as Za}from"react/jsx-runtime";var Jr=2e3,ja=vs(null);function be(){let e=xs(ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Ya(){let{api:e}=be(),[t,r]=Xr(0),o=Tt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ys=Lt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:d,...s},m)=>{let[l,n]=gs({...t,axis:e==="horizontal"?"x":"y"},[...o?[fs(typeof o=="object"?o:{delay:Jr})]:[],...a||[]]),[u,p]=Xr(!1),[b,f]=Xr(!1),x=Tt(P=>{!P||(p(P.canScrollPrev()),f(P.canScrollNext()))},[]),v=Tt(()=>{n==null||n.scrollPrev()},[n]),w=Tt(()=>{n==null||n.scrollNext()},[n]),y=Tt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),v()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[v,w]);return qr(()=>{!n||!r||r(n)},[n,r]),qr(()=>{if(!!n)return x(n),n.on("reInit",x),n.on("select",x),()=>{n==null||n.off("select",x)}},[n,x]),Ce(ja.Provider,{value:{carouselRef:l,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:w,canScrollPrev:u,canScrollNext:b},children:Ce("div",{ref:m,onKeyDownCapture:y,className:i("relative",c),role:"region","aria-roledescription":"carousel",...s,children:d})})});ys.displayName="Carousel";var ws=Lt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ws.displayName="CarouselContent";var Ns=Lt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Ns.displayName="CarouselItem";var Cs=Lt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(bs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});Cs.displayName="CarouselPrevious";var ks=Lt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(hs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ks.displayName="CarouselNext";import{cva as Ps}from"class-variance-authority";import{motion as Ss}from"framer-motion";import{ChevronLeft as Rs,ChevronRight as Ts}from"lucide-react";import*as Me from"react";import{jsx as Ke,jsxs as Mt}from"react/jsx-runtime";var Ls=Ps("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 "}}}),yb=({variant:e="simple",className:t})=>{var f;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:d}=be(),s=(f=d==null?void 0:d.plugins())==null?void 0:f.autoplay,[m,l]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(x=>{l((x==null?void 0:x.selectedScrollSnap())??0)},[]),b=Me.useCallback(x=>()=>{s&&s.isPlaying()&&s.stop(),x()},[s]);return Me.useEffect(()=>{!d||(p(d),u((s==null?void 0:s.isPlaying())??!1),d.on("reInit",p),d.on("select",p),d.on("autoplay:play",()=>u(!0)),d.on("autoplay:stop",()=>u(!1)))},[d,s,p]),Mt("div",{className:i(Ls({variant:e}),t),children:[e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:b(o),children:[Ke(Rs,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Previous slide"})]}),d!=null&&Ke("div",{className:"flex items-center gap-1",children:d.slideNodes().map((x,v)=>Mt("button",{onClick:b(()=>d.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ke("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",n&&v===m&&"w-6 bg-black/20"),children:n&&v===m&&Ke(Ss.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Mt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:b(r),children:[Ke(Ts,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Next slide"})]})]})};import Ms from"embla-carousel-react";import{forwardRef as Ds,useCallback as Es,useEffect as Is}from"react";import{jsx as mr}from"react/jsx-runtime";var Lb=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ms({dragFree:!0}),c=Es(d=>{!d||!a||a==null||a.scrollTo(d.selectedScrollSnap())},[a]);return Is(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),mr("div",{className:"overflow-hidden",ref:o,children:mr("div",{className:i("mx-4 flex gap-4",e),...t})})},Mb=Ds(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Ya();return mr("div",{ref:o,children:mr("button",{type:"button",onClick:()=>{var s;if(!a)return;let d=(s=a.plugins())==null?void 0:s.autoplay;d&&d.isPlaying()&&d.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Dt from"@radix-ui/react-checkbox";import{forwardRef as As}from"react";import{jsx as Qr,jsxs as Os}from"react/jsx-runtime";var ct=As(({className:e,...t},r)=>Qr(Dt.Root,{ref:r,className:i("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500 data-[state=indeterminate]:bg-blue-500",e),...t,children:Os(Dt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[Qr(tr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),Qr(za,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ct.displayName=Dt.Root.displayName;import{Command as It,CommandInput as Sl,CommandItem as Rl,useCommandState as Tl}from"cmdk";import{ChevronDown as Ll}from"lucide-react";import{forwardRef as Ml,isValidElement as Dl,useCallback as El,useEffect as gr,useRef as Il,useState as Et}from"react";import{motion as Cl}from"framer-motion";import{forwardRef as kl,useRef as Pl}from"react";import eo from"js-cookie";import{useEffect as zs,useState as Hs}from"react";function Vb(e,t,r){let[o,a]=Hs(()=>{let d=eo.get(e);return d?JSON.parse(d):t});return zs(()=>{let d=()=>{let s=eo.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[e]),[o,d=>{a(d),eo.set(e,JSON.stringify(d),r)}]}import{useCallback as Vs,useEffect as _s,useRef as Fs,useState as Bs}from"react";var dt=(e=3e3)=>{let t=Fs(null),[r,o]=Bs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Vs(async(d,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof d=="string"?await navigator.clipboard.writeText(d):d instanceof ClipboardItem&&await navigator.clipboard.write([d]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),m)throw l}},[e]);return _s(()=>()=>a(),[]),[r,c]};import{useEffect as Ws,useState as $s}from"react";function $b(){let[e,t]=$s(null);return Ws(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,b;let m=s[0];if(!m)return;let l=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let f=1;f<s.length;f++){let x=s[f];if(!x)break;(x.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=x)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>l;)n=(b=c.get(n))==null?void 0:b.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Us}from"react";function jb(e){return{handleKeyDown:Us(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Gs,useState as Ks}from"react";function Xb(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Ks(o??!1);return Gs(()=>{let d=()=>{let m=e.current;if(!m)return;let l=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",d),window.addEventListener("resize",d);let s=null;return e.current&&(s=new IntersectionObserver(d),s.observe(e.current)),d(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",d),window.removeEventListener("resize",d),s==null||s.disconnect()}},[e,r]),a}import{useEffect as js,useState as Ys}from"react";function eh(){let[e,t]=Ys(!1);return js(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as Zs,useState as qs}from"react";function ah(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,d]=qs(),s=(c==null?void 0:c.isIntersecting)&&a,m=([l])=>{d(l)};return Zs(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),c}import{createContext as Xs,useCallback as Js,useContext as Qs,useEffect as qa,useId as el,useState as tl}from"react";import{jsx as rl}from"react/jsx-runtime";var Xa=Xs({listeners:[],setListeners:()=>{}});function dh({children:e}){let[t,r]=tl([]);return rl(Xa.Provider,{value:{listeners:t,setListeners:r},children:e})}function De(e,t,r={}){let o=el(),{listeners:a,setListeners:c}=Qs(Xa),d=Js(s=>{if(r.enabled===!1)return;let m=s.target,l=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!l!=!!r.modal||!!n!=!!r.sheet)return;let u=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(f=>f.enabled!==!1&&!!l==!!f.modal&&!!n==!!f.sheet&&(Array.isArray(f.key)?f.key.includes(u):f.key===u));!p.length||Uo(p,(f,x)=>(x.priority??0)-(f.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);qa(()=>(document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)),[d]),qa(()=>(c(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as ol,useState as al}from"react";function Ja(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function ph(e,t){let[r,o]=al(Ja(e)??t);return ol(()=>{let c=Ja(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as nl}from"sonner";import il from"swr";function vh(e,t){let{data:r,isLoading:o,mutate:a}=il(e,fe);return{data:r,isLoading:o,update:async(c,d)=>nl.promise(a(c(r),{optimisticData:d,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as rn,useMemo as ul}from"react";import{useEffect as Qa,useState as sl}from"react";function en({pageSize:e,page:t,onPageChange:r}){let[o,a]=sl({pageIndex:t,pageSize:e});return Qa(()=>{a(c=>({...c,pageIndex:t}))},[t]),Qa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ll,useRouter as cl,useSearchParams as dl}from"next/navigation";import{useCallback as ml}from"react";function tn(){let e=ll(),t=cl(),r=dl(),o=Object.fromEntries(r),a=(d,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var b;(b=s.include)!=null&&b.includes(p)&&n.set(p,u)}),m=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>m.delete(n)),d&&Object.entries(d).forEach(([n,u])=>m.set(n,u));let l=m.toString();return l.length>0?`?${l}`:""},c=ml(({set:d,del:s,replace:m,scroll:l=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);d&&Object.entries(d).forEach(([x,v])=>p.set(x,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(x=>p.delete(x)):p.delete(s));let b=p.toString(),f=`${e}${b.length>0?`?${b}`:""}`;if(n)return f;m?t.replace(f,{scroll:!1}):t.push(f,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Mh(e=Zo){let{searchParams:t,queryParams:r}=tn(),o=ul(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=en({pageSize:e,page:o,onPageChange:d=>{r(d===1?{del:"page",scroll:!1}:{set:{page:d.toString()},scroll:!1})}});return rn(()=>{let d=parseInt(t.get("page")||"1")||1;c(s=>({...s,pageIndex:d}))},[t.get("page")]),rn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as pl}from"react";function Ih(){pl(()=>{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 fl,useState as gl}from"react";function ur(e){let[t,r]=gl(),o=([a])=>{r(a)};return fl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as bl,useEffect as on,useState as hl}from"react";function an(e,{container:t}={}){let[r,o]=hl(!1),a=bl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return on(()=>{let c=(t==null?void 0:t.current)??window;return c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)},[a]),on(()=>{a()},[a]),r}import{useCallback as vl,useEffect as xl,useState as yl}from"react";function Ee(e){let[t,r]=yl(1),o=vl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:d,clientHeight:s}=e.current;r(d===s?1:Math.min(c/(d-s),1))},[]),a=ur(e);return xl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as wl}from"react";import{toast as sn}from"sonner";import{jsx as pr,jsxs as nn}from"react/jsx-runtime";function Nl({id:e,message:t,undo:r}){let o=()=>{r(),sn.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return wl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),nn("div",{className:"flex w-full items-center justify-between space-x-2",children:[nn("div",{className:"flex items-center space-x-2",children:[pr(ra,{}),pr("p",{className:"font-medium",children:t})]}),pr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function Yh(){return({id:t,message:r,undo:o,duration:a})=>sn(pr(Nl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ln}from"react/jsx-runtime";var ke=kl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},d)=>{var l,n;let s=Pl(null),m=ur(s);return ln(Cl.div,{ref:d,className:i("overflow-hidden",r),animate:{width:e?((l=m==null?void 0:m.contentRect)==null?void 0:l.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...c,children:ln("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ie from"@radix-ui/react-popover";import{Drawer as mt}from"vaul";import{jsx as Pe,jsxs as fr}from"react/jsx-runtime";function Ae({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:d,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:l,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:b}=Y();return d||b?fr(mt.Root,{open:a,onOpenChange:c,children:[Pe(mt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),fr(mt.Portal,{children:[Pe(mt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),fr(mt.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:f=>{f.target instanceof Element&&f.target.closest("[data-sonner-toast]")&&f.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(mt.Overlay,{})]})]}):fr(Ie.Root,{open:a,onOpenChange:c,children:[Pe(Ie.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ie.Portal,{children:Pe(Ie.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:n,collisionBoundary:l,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as br,jsx as E,jsxs as Se}from"react/jsx-runtime";function Al(e,t){return e===!0}function Cv({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:d="Search...",emptyState:s,createLabel:m,onCreate:l,buttonProps:n,shortcutHint:u,caret:p,side:b,open:f,onOpenChange:x,onSearchChange:v,shouldFilter:w=!0,inputRight:y,inputClassName:P,optionRight:N,optionClassName:C,matchTriggerWidth:W,hideSearch:M=!1,children:D}){let L=Al(e,r),S=Array.isArray(t)?t:t?[t]:[],{isMobile:h}=Y(),[R,G]=Et(!1),k=f??R,ue=x??G,[$,Fr]=Et(""),[_o,Br]=Et(!1),[Wr,Mi]=Et(void 0),[Di,Fo]=Et(!1),Ei=H=>{var at;if(L){let $e=S.some(({value:Ue})=>Ue===H.value);r($e?S.filter(({value:Ue})=>Ue!==H.value):[...S,H])}else r(S.length&&((at=S[0])==null?void 0:at.value)===H.value?null:H),ue(!1)},Bo=El((H,at)=>at===""?[...H.filter($e=>$e.first&&!S.some(Ue=>Ue.value===$e.value)),...S,...H.filter($e=>!$e.first&&!S.some(Ue=>Ue.value===$e.value))]:H,[S]);return gr(()=>{_o&&(Mi(o&&Bo(o,$)),Br(!1))},[_o,o,Bo,$]),gr(()=>{Br(!0)},[o]),gr(()=>{k||(Fr(""),Br(!0))},[k]),gr(()=>v==null?void 0:v($),[$]),E(Ae,{openPopover:k,setOpenPopover:ue,align:"start",side:b,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!h&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(It,{loop:!0,shouldFilter:w,children:[!M&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Sl,{placeholder:d,value:$,onValueChange:Fr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",P),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),y&&E("div",{className:"mr-2",children:y}),u&&E("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),E(Ol,{children:E(It.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Wr!==void 0?Se(br,{children:[Wr.map(H=>E(zl,{option:H,multiple:L,selected:S.some(({value:at})=>at===H.value),onSelect:()=>Ei(H),right:N==null?void 0:N(H),className:C},`${H.label}, ${H.value}`)),$.length>0&&l&&Se(Rl,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",C),onSelect:async()=>{Fo(!0),await(l==null?void 0:l($))&&(Fr(""),ue(!1)),Fo(!1)},children:[Di?E(Ne,{className:"size-4 shrink-0"}):E(nr,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),w?E(Vl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Wr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(It.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ne,{})})})})})]})}),children:E(ee,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(br,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:D||S.map(H=>H.label).join(", ")||c}),p&&(p===!0?E(Ll,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?cn(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var Ol=({children:e})=>{let t=Il(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Se(br,{children:[E("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function zl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Se(br,{children:[E(Hl,{disabledTooltip:e.disabledTooltip,children:Se(It.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(ga,{className:"size-4 text-neutral-600"}):E(ba,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:cn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(tr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(It.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Hl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,cn=e=>Dl(e),Vl=Ml((e,t)=>Tl(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as hr,format as _l,isSameMonth as Fl}from"date-fns";import{ChevronLeft as dn,ChevronRight as mn,ChevronsLeft as Bl,ChevronsRight as Wl}from"lucide-react";import{forwardRef as $l,useRef as Ul}from"react";import{DayPicker as Gl,useDayPicker as Kl,useDayRender as jl,useNavigation as Yl}from"react-day-picker";import{Fragment as Zl,jsx as re,jsxs as vr}from"react/jsx-runtime";var At=$l(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));At.displayName="NavigationButton";function un({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:d,classNames:s,...m}){return re(Gl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:d,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(dn,{className:"h-4 w-4"}),IconRight:()=>re(mn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:b,displayMonths:f}=Yl(),{numberOfMonths:x,fromDate:v,toDate:w}=Kl(),y=f.findIndex(L=>Fl(l.displayMonth,L)),P=y===0,N=y===f.length-1,C=x>1&&(P||!N),W=x>1&&(N||!P),M=()=>{let L=hr(b,-1);p&&(!v||L.getTime()>=v.getTime())&&n(L)},D=()=>{let L=hr(b,1);u&&(!w||L.getTime()<=w.getTime())&&n(L)};return vr("div",{className:"flex items-center justify-between",children:[vr("div",{className:"flex items-center gap-1",children:[o&&!W&&re(At,{disabled:a||!p||v&&hr(b,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:M,icon:Bl}),!W&&re(At,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:dn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:_l(l.displayMonth,"LLLL yyy",{locale:c})}),vr("div",{className:"flex items-center gap-1",children:[!C&&re(At,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:mn}),o&&!C&&re(At,{disabled:a||!u||w&&hr(b,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:D,icon:Wl})]})]})},Day:({date:l,displayMonth:n})=>{let u=Ul(null),{activeModifiers:p,buttonProps:b,divProps:f,isButton:x,isHidden:v}=jl(l,n,u),{selected:w,today:y,disabled:P,range_middle:N}=p;if(v)return re(Zl,{});if(!x)return re("div",{...f,className:i("flex items-center justify-center",f.className)});let{children:C,...W}=b;return vr("button",{ref:u,...W,type:"button",children:[C,y&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!w,"!bg-white":w,"!bg-blue-400":w&&N,"text-neutral-400":P})})]})}},...m})}import{enUS as ic}from"date-fns/locale";import{useEffect as io,useMemo as fn,useRef as sc,useState as yr}from"react";import{Command as to}from"cmdk";import{Lock as ql}from"lucide-react";import{jsx as je,jsxs as Xl}from"react/jsx-runtime";var ro=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,c=l=>"date"in l,d=(l,n)=>l.getDate()===n.getDate()&&l.getMonth()===n.getMonth()&&l.getFullYear()===n.getFullYear(),s=(l,n)=>{let u=l.from,p=n.from,b=!1;u&&p&&d(u,p)&&(b=!0);let f=l.to,x=n.to,v=!1;return f&&x&&d(f,x)&&(v=!0),b&&v},m=l=>{if(o)return o===l.id;if(a(l)){let n=r;return n&&s(n,l.dateRange)}else if(c(l)){let n=r;return n&&d(n,l.date)}return!1};return je(to,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:je(to.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,n)=>Xl(to.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(l)&&"font-semibold text-neutral-800"),children:[je("span",{children:l.label}),l.requiresUpgrade?je(ql,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?je("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&je(J,{side:"bottom",content:l.tooltipContent,children:je("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};ro.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as Jl}from"react";var oo=Jl({isOpen:!1,setIsOpen:()=>{}}),Ql=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},ao=(e,t,r=!1)=>{let o=!Ql(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},pn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:d,toDay:s}=t;if(e&&e.length>0){let m=o,l=r;e.forEach(n=>{var u,p,b,f,x,v;if("date"in n){let w=n.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&w>r)throw new Error(`Preset ${n.label} is after toYear ${l}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(d&&n.date.getDate()<d.getDate())throw new Error(`Preset ${n.label} is before fromDay ${d}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),y=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(y&&r&&y>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${l}.`);if(a){let P=(b=n.dateRange.from)==null?void 0:b.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let P=(f=n.dateRange.to)==null?void 0:f.getMonth();if(P&&P>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(d){let P=(x=n.dateRange.from)==null?void 0:x.getDate();if(P&&P<d.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(d,"MMM dd, yyyy")}.`)}if(s){let P=(v=n.dateRange.to)==null?void 0:v.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as ec}from"class-variance-authority";import{Calendar as tc,ChevronDown as rc}from"lucide-react";import{forwardRef as oc}from"react";import{jsx as xr,jsxs as nc}from"react/jsx-runtime";var ac=ec(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),no=oc(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>nc("button",{ref:c,className:i(ac({hasError:o}),e),...a,children:[xr(tc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),xr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?xr("span",{className:"text-neutral-400",children:r}):null)}),xr(rc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));no.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as gn}from"react/jsx-runtime";var lc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:d,disabledDays:s,showYearNavigation:m=!1,locale:l=ic,placeholder:n="Select date range",hasError:u,align:p="center",className:b,...f})=>{let{isDesktop:x}=Y(),[v,w]=yr(!1),[y,P]=yr(a&&r?a==null?void 0:a.find(({id:k})=>k===r):void 0),[N,C]=yr((y==null?void 0:y.dateRange)??e??t??void 0),[W,M]=yr(N==null?void 0:N.to),D=fn(()=>N,[v]);io(()=>{C(e)},[e]),io(()=>{let k=a==null?void 0:a.find(({id:ue})=>ue===r);P(k),C((k==null?void 0:k.dateRange)??e??t)},[a,r]),io(()=>{v?N&&M(N.to):M(N==null?void 0:N.to)},[v]);let L=(k,ue)=>{let $=(N==null?void 0:N.from)&&(N==null?void 0:N.to)?{from:ue}:k;C($),P(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),w(!1))},S=k=>{C(k.dateRange),P(k),o==null||o(k.dateRange,k),w(!1)},h=()=>{C(D),w(!1)},R=k=>{k||h(),w(k)},G=fn(()=>N?`${N.from?ao(N.from,l):""} - ${N.to?ao(N.to,l):""}`:null,[N,l]);return De((a==null?void 0:a.filter(k=>k.shortcut).map(k=>k.shortcut))??[],k=>{let ue=a==null?void 0:a.find($=>$.shortcut===k.key);ue&&S(ue)}),oe(oo.Provider,{value:{isOpen:v,setIsOpen:w},children:oe(Ae,{align:p,openPopover:v,setOpenPopover:R,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:gn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&oe(cc,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(ro,{currentPresetId:r,currentValue:N,presets:a,onSelect:S})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(un,{mode:"range",selected:N,onSelect:L,month:W,onMonthChange:M,numberOfMonths:x?2:1,disabled:s,disableNavigation:d,showYearNavigation:m,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...f})})]})}),children:oe(no,{placeholder:n,disabled:c,className:b,hasError:u,"aria-required":f.required||f["aria-required"],"aria-invalid":f["aria-invalid"],"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],children:(y==null?void 0:y.label)??G})})})};function sx({presets:e,...t}){return e&&pn(e,t),oe(lc,{presets:e,...t})}function cc({children:e}){let t=sc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return gn("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),oe("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import{useId as dc}from"react";import{jsx as wr,jsxs as mc}from"react/jsx-runtime";function gx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=dc();return mc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[wr("defs",{children:wr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:wr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),wr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import uc from"next/link";import{useEffect as pc,useState as bn}from"react";import fc from"swr";import{jsx as so,jsxs as hn}from"react/jsx-runtime";function vn({className:e}){let{data:t}=fc("https://status.dub.co/api/v1/summary",fe),[r,o]=bn("bg-neutral-200"),[a,c]=bn("Loading status...");return pc(()=>{if(!t)return;let{ongoing_incidents:d}=t;if(d.length>0){let{current_worst_impact:s,name:m}=d[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(l)}else c("All systems operational"),o("bg-green-500")},[t]),hn(uc,{href:"https://status.dub.co",target:"_blank",className:i("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[hn("div",{className:"relative size-2",children:[so("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),so("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),so("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Nr,jsxs as xn}from"react/jsx-runtime";function Cx({icon:e,title:t,description:r,learnMore:o,children:a}){return xn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Nr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Nr(e,{className:"size-6 text-neutral-800"})}),Nr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&xn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Nr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as gc}from"class-variance-authority";import{useState as yn}from"react";import{toast as wn}from"sonner";import{Fragment as hc,jsx as he,jsxs as co}from"react/jsx-runtime";var Nn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],lo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:Nn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...Nn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},bc=gc("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 Ax({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:d,icon:s=wa,customPreview:m,accept:l="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:b=!0,content:f,maxFileSizeMB:x=0,targetResolution:v,accessibilityLabel:w="File upload",disabled:y=!1}){let[P,N]=yn(!1),[C,W]=yn(null),M=async D=>{let L="dataTransfer"in D?D.dataTransfer.files&&D.dataTransfer.files[0]:D.target.files&&D.target.files[0];if(!L)return;if(W(L.name),x>0&&L.size/1024/1024>x){wn.error(`File size too big (max ${x} MB)`);return}let S=lo[l].types;if(S.length&&!S.includes(L.type)){wn.error(lo[l].errorMessage??"File type not supported");return}let h=L;if(v&&L.type.startsWith("image/"))try{let R=await $o(L,v),G=await fetch(R).then(k=>k.blob());h=new File([G],L.name,{type:L.type})}catch(R){console.error("Error resizing image:",R)}if(t){let R=new FileReader;R.onload=G=>{var k;return r==null?void 0:r({src:(k=G.target)==null?void 0:k.result,file:h})},R.readAsDataURL(h);return}r==null||r({file:h})};return co("label",{className:i(bc({variant:o}),y?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(Pt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragEnter:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragLeave:D=>{D.preventDefault(),D.stopPropagation(),N(!1)},onDrop:async D=>{D.preventDefault(),D.stopPropagation(),M(D),N(!1)}}),co("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",y&&"bg-neutral-50",P&&!y&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",b&&!y&&"group-hover:opacity-100"):i(!y&&"group-hover:bg-neutral-50")),children:[he(s,{className:i("size-7 transition-all duration-75",y?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),c)}),f!==null&&he("div",{className:i("mt-2 text-center text-sm text-neutral-500",y&&"text-neutral-400"),children:f??he(hc,{children:co("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:w})]}),n&&(m??he("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",d)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:lo[l].types.join(","),onChange:M,disabled:y},C)})]})}import{AnimatePresence as vc,motion as Cn}from"framer-motion";import{X as xc}from"lucide-react";import yc from"next/link";import{isValidElement as wc}from"react";import{Fragment as Nc,jsx as Q,jsxs as Ot}from"react/jsx-runtime";function Pn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return De("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Ot("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(vc,{children:t==null?void 0:t.map(({key:c,value:d})=>{if(c==="loader")return Q(Cn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${d}`);let s=e.find(m=>m.key===c);return s?(s.multiple&&Array.isArray(d)?d:[d]).map(m=>{var b,f,x,v;let l=(b=s.options)==null?void 0:b.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.value===m),n=(l==null?void 0:l.icon)??((f=s.getOptionIcon)==null?void 0:f.call(s,m,{key:s.key,option:l}))??s.icon,u=(l==null?void 0:l.label)??((x=s.getOptionLabel)==null?void 0:x.call(s,m,{key:s.key,option:l}))??m,p=(l==null?void 0:l.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return Ot(Cn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Ot("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(s.icon)?s.icon:Q(s.icon,{className:"h-4 w-4"})}),s.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?Ot(Nc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(yc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Ct(u,30)}):Ct(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(c,m),children:Q(xc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Ot("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var kn=e=>wc(e);import{Command as ze,useCommandState as Cc}from"cmdk";import{ChevronDown as kc,ListFilter as Pc}from"lucide-react";import{Fragment as Sc,forwardRef as Rc,isValidElement as Rn,useCallback as Cr,useEffect as kr,useImperativeHandle as Tc,useRef as uo,useState as mo}from"react";import{Fragment as Ac,jsx as _,jsxs as ve}from"react/jsx-runtime";function Tn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:d,askAI:s,children:m,emptyState:l,className:n}){var L,S;let{isMobile:u}=Y(),p=uo(null),b=uo(),[f,x]=mo(!1);De("f",()=>x(!0),{enabled:!f});let[v,w]=mo(""),[y,P]=mo(null),N=Cr(()=>{w(""),P(null)},[]);kr(()=>{f||N()},[f]);let C=y?e.find(({key:h})=>h===y):null,W=Cr(h=>{p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(h),o==null||o(h)},[]),M=Cr(h=>{if(!C||!d)return!1;let R=d.find(({key:G})=>G===y);return(R==null?void 0:R.value)===h||R&&C.multiple&&Array.isArray(R.value)&&R.value.includes(h)},[C]),D=Cr(h=>{C&&(M(h)?r(C.key,h):t(C.key,h),C.multiple||x(!1))},[d,C,s]);return kr(()=>{a==null||a(v)},[v]),kr(()=>{c==null||c(y)},[y]),kr(()=>{(C==null?void 0:C.options)&&p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),_(Ae,{openPopover:f,setOpenPopover:x,onEscapeKeyDown:h=>{y&&(h.preventDefault(),N())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(ze,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Mc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:w,onKeyDown:h=>{(h.key==="Escape"||h.key==="Backspace"&&!v)&&(h.preventDefault(),h.stopPropagation(),y?N():x(!1))},emptySubmit:h=>{h.preventDefault(),h.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),x(!1)):D(v)}}),!C&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(Dc,{ref:p,children:ve(ze.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((S=(L=C.options)==null?void 0:L.filter(h=>!v||!h.hideDuringSearch))==null?void 0:S.map(h=>{let R=M(h.value);return _(Sn,{filter:C,option:h,right:R?_(fa,{className:"h-4 w-4"}):h.right,onSelect:()=>D(h.value)},h.value)}))??_(ze.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(Ne,{})})}):e.filter(h=>!h.hideInFilterDropdown).map(h=>ve(Sc,{children:[_(Sn,{filter:h,onSelect:()=>W(h.key)}),h.separatorAfter&&_(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},h.key)),(!C||C.options)&&_(Ec,{search:v,askAI:s,children:l?Lc(l)?(l==null?void 0:l[y??"default"])??"No matches":l:"No matches"})]})},y)]})}),children:ve("button",{type:"button",className:i("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(Pc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),d!=null&&d.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:d.length}):_(kc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Lc(e){return typeof e=="object"&&e!==null&&!Rn(e)}var Mc=e=>{let t=Cc(r=>r.filtered.count===0);return _(ze.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Dc=Rc(({children:e},t)=>{let r=uo(null);Tc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return ve(Ac,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Sn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),c=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,d=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(ze.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:d+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:Ic(c)?c:_(c,{className:"h-4 w-4"})}),Ct(d,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Ec=({search:e,askAI:t,children:r})=>t&&e?ve(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Qo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Ic=e=>Rn(e);var n2={Select:Tn,List:Pn};import{useMemo as Oc,useState as Ln}from"react";import{jsx as Ye,jsxs as Pr}from"react/jsx-runtime";function u2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:d}){let[s,m]=Ln(r.defaultValue),[l,n]=Ln(!1),u=Oc(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Pr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await d({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Pr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Pr("div",{className:"flex flex-col space-y-3",children:[Ye("h2",{className:"text-xl font-medium",children:e}),Ye("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ye("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:p=>m(p.target.value),className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":c})}):Ye("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Pr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ye("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,Ye("div",{className:"shrink-0",children:Ye(ee,{text:a,loading:l,disabled:u,disabledTooltip:c})})]})]})}import{useId as zc}from"react";import{jsx as Sr,jsxs as Hc}from"react/jsx-runtime";function Ze({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=zc();return Hc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Sr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Sr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Vc}from"lucide-react";import _c,{useCallback as Fc,useState as Bc}from"react";import{jsx as qe,jsxs as po}from"react/jsx-runtime";var Wc=_c.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Bc(!1),d=Fc(()=>c(!a),[a,c]);return po("div",{children:[po("div",{className:"relative flex",children:[qe("input",{type:a?"text":t,className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),po("div",{className:"group",children:[r.error&&qe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:qe(Vc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&qe("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>d(),"aria-label":a?"Hide password":"Show Password",children:a?qe(Pa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):qe(Sa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&qe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Wc.displayName="Input";import{flip as jc,offset as Yc,size as Zc,useDismiss as qc,useFloating as Xc,useInteractions as Jc}from"@floating-ui/react";import{Command as Re,useCommandState as Qc}from"cmdk";import{Check as ed,ChevronDown as td,Search as rd,X as od}from"lucide-react";import{createContext as ad,forwardRef as An,useContext as ho,useEffect as fo,useMemo as Dn,useRef as En,useState as go}from"react";import{Drawer as ut}from"vaul";import $c from"next/image";import{memo as Uc,useEffect as Gc,useState as Mn}from"react";import{jsx as Kc}from"react/jsx-runtime";var zt=Uc(e=>{let[t,r]=Mn(!0),[o,a]=Mn(e.src);Gc(()=>a(e.src),[e.src]);let c=d=>{r(!1);let s=d.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Kc($c,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as A,jsxs as se}from"react/jsx-runtime";var Rr=ad({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function W2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:d,inputAttrs:s,noItemsElement:m}){let{isMobile:l}=Y(),n=En(null),[u,p]=go(!1),[b,f]=go(""),[x,v]=go(!1);fo(()=>{u&&v(!1)},[u]),fo(()=>v(!0),[b]),fo(()=>{t&&f(t.value)},[t]);let w=Dn(()=>{let R=b.toLowerCase();return x?e.filter(G=>G.value.toLowerCase().includes(R)):b?e.sort((G,k)=>(k.value.toLowerCase().includes(R)?1:0)-(G.value.toLowerCase().includes(R)?1:0)):e},[x,b,e]),{refs:y,floatingStyles:P,context:N}=Xc({open:u,onOpenChange:p,middleware:[Yc(8),Zc({apply({elements:{floating:R},availableHeight:G}){Object.assign(R.style,{maxHeight:`${Math.max(75,Math.min(G,290))}px`})},padding:8}),jc({fallbackStrategy:"initialPlacement",padding:8})]}),C=qc(N,{enabled:!l||!c}),{getReferenceProps:W,getFloatingProps:M}=Jc([C]),D=En(null),{scrollProgress:L,updateScrollProgress:S}=Ee(D),h=Dn(()=>t&&t.icon?t.icon:t&&t.image?A(zt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):d||A(rd,{className:"size-4 text-neutral-400"}),[t,d]);return A(Rr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:b,setInputValue:f,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&c?se(ut.Root,{open:u,onOpenChange:p,children:[A(ut.Trigger,{className:"sm:hidden",asChild:!0,children:A(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:A(bo,{className:o,iconElement:h})})}),A(ut.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ut.Portal,{children:[A(ut.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:R=>{R.target instanceof Element&&R.target.closest("[data-sonner-toast]")&&R.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A("div",{className:"p-2",children:A(bo,{className:o,iconElement:h})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),A(In,{items:w})]})]})}),A(ut.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A(bo,{className:o,iconElement:h,ref:y.setReference,...W()}),u&&se("div",{ref:y.setFloating,style:P,...M(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:D,onScroll:S,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),A(In,{items:w})]}),A("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(L,2)}})]})]})})}var bo=An(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:i("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[A("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[A(nd,{}),A(id,{})]})]})),nd=An((e,t)=>{let r=Qc(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:d,setInputValue:s,disabled:m}=ho(Rr);return A(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:d,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),c(!1)):l.key==="Enter"&&r?c(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&c(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function id(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=ho(Rr);return A("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?A(od,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):A(td,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function In({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=ho(Rr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&A(zt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),A("p",{className:i("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&A(cr,{className:"text-xs",variant:"neutral",children:a.label})]}),A(ed,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as vo from"@radix-ui/react-label";import{cva as sd}from"class-variance-authority";import*as On from"react";import{jsx as dd}from"react/jsx-runtime";var ld=sd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),cd=On.forwardRef(({className:e,...t},r)=>dd(vo.Root,{ref:r,className:i(ld(),e),...t}));cd.displayName=vo.Root.displayName;import{cva as md}from"class-variance-authority";import{isValidElement as ud}from"react";import{jsx as zn,jsxs as Hn}from"react/jsx-runtime";var pd=md(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function e4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...d}){return Hn(e||"button",{...e==="button"?{type:"button"}:{},className:i(pd({variant:t}),c),...d,children:[Hn("div",{className:"flex grow items-center gap-2",children:[o&&(fd(o)?o:zn(o,{className:"size-4"})),r]}),a&&zn("kbd",{className:i("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var fd=e=>ud(e);import{curveNatural as Vn}from"@visx/curve";import{LinearGradient as _n}from"@visx/gradient";import{Group as gd}from"@visx/group";import{ParentSize as bd}from"@visx/responsive";import{scaleLinear as hd,scaleUtc as vd}from"@visx/scale";import{Area as xd,AreaClosed as yd}from"@visx/shape";import{motion as Fn}from"framer-motion";import{useId as wd,useMemo as Bn}from"react";import{jsx as xe,jsxs as xo}from"react/jsx-runtime";var Nd={top:8,right:2,bottom:2,left:2};function d4(e){return xe(bd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(Cd,{...{width:t,height:r,...e}})})}function Cd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let d={...Nd,...c},s=wd(),m=Bn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:l,xScale:n}=Bn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),b=r.map(({date:v})=>v.getTime()),f=new Date(Math.min(...b)),x=new Date(Math.max(...b));return{yScale:hd({domain:[-2,Math.max(p,2)],range:[t-d.top-d.bottom,0],nice:!0,clamp:!0}),xScale:vd({domain:[f,x],range:[0,e-d.left-d.right],nice:!0})}},[r,t,e]);return xo("svg",{width:e,height:t,children:[xo("defs",{children:[xe(_n,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-d.left-d.right,gradientUnits:"userSpaceOnUse"}),xe(_n,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),xo(gd,{left:d.left,top:d.top,children:[xe(xd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),xe(yd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,yScale:l,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as yo from"@radix-ui/react-visually-hidden";import{useRouter as kd}from"next/navigation";import{Drawer as Xe}from"vaul";import{jsx as ae,jsxs as pt}from"react/jsx-runtime";function b4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:d,drawerRootProps:s}){let m=kd(),l=({dragged:u}={})=>{d&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=Y();return n&&!c?ae(Xe.Root,{open:o?r:!0,onOpenChange:u=>{u||l({dragged:!0})},...s,children:pt(Xe.Portal,{children:[ae(Xe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Xe.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:pt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[pt(yo.Root,{children:[ae(Xe.Title,{children:"Modal"}),ae(Xe.Description,{children:"This is a modal"})]}),ae(Pd,{}),e]})}),ae(Xe.Overlay,{})]})}):ae(le.Root,{open:o?r:!0,onOpenChange:u=>{u||l()},children:pt(le.Portal,{children:[ae(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),pt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[pt(yo.Root,{children:[ae(le.Title,{children:"Modal"}),ae(le.Description,{children:"This is a modal"})]}),e]})]})})}function Pd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as Sd,jsx as Tr,jsxs as ft}from"react/jsx-runtime";var Wn=i("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function x4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:c,showTotalCount:d=!0}){return ft("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ft("div",{className:"flex items-center gap-2",children:[ft("div",{children:[Tr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ft(Sd,{children:[ft("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",d&&"of "]}),d&&Tr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),c]}),ft("div",{className:"flex items-center gap-2",children:[Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Rd}from"lucide-react";import*as wo from"react";import{jsx as Lr}from"react/jsx-runtime";var Td=wo.forwardRef(({className:e,...t},r)=>Lr(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Td.displayName=He.Root.displayName;var Ld=wo.forwardRef(({className:e,...t},r)=>Lr(He.Item,{ref:r,className:i("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Lr(He.Indicator,{className:"flex items-center justify-center",children:Lr(Rd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Ld.displayName=He.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Je,jsxs as Ad}from"react/jsx-runtime";function Md({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Je(a,{direction:"right",handleOnly:!0,...o,children:Ad(Ve.Portal,{children:[Je(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Je(Ve.Content,{...t,onPointerDownOutside:c=>{var d;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(d=t==null?void 0:t.onPointerDownOutside)==null||d.call(t,c)},className:i("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Je("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Dd({className:e,...t}){return Je(Ve.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Ed(e){return Je(Ve.Description,{...e})}function Id(e){return Je(Ve.Close,{...e})}var R4=Object.assign(Md,{Title:Dd,Description:Ed,Close:Id});import{useEffect as Od,useRef as zd,useState as Hd}from"react";import{jsx as $n}from"react/jsx-runtime";var Vd=`
|
|
2
|
+
import{$ as hp,$a as xa,$b as Z0,$c as Ff,$d as Ag,A as Xu,Aa as Wp,Ab as L0,Ac as xf,Ad as cg,B as Ju,Ba as $p,Bb as M0,Bc as Ia,Bd as dg,C as Qu,Ca as ua,Cb as rr,Cc as yf,Cd as mg,D as Jt,Da as Up,Db as D0,Dc as wf,Dd as ug,E as ep,Ea as Gp,Eb as E0,Ec as Nf,Ed as pg,F as Qt,Fa as pa,Fb as I0,Fc as Aa,Fd as fg,G as tp,Ga as Kp,Gb as A0,Gc as Oa,Gd as gg,H as rp,Ha as jp,Hb as O0,Hc as Cf,Hd as bg,I as op,Ia as Yp,Ib as Ca,Ic as kf,Id as hg,J as ap,Ja as Zp,Jb as z0,Jc as Pf,Jd as vg,K as ia,Ka as qp,Kb as H0,Kc as Sf,Kd as xg,L as sa,La as Xp,Lb as V0,Lc as or,Ld as yg,M as la,Ma as Jp,Mb as _0,Mc as Rf,Md as wg,N as ca,Na as Qp,Nb as ka,Nc as Tf,Nd as Ng,O as da,Oa as e0,Ob as Pa,Oc as Lf,Od as Cg,P as np,Pa as t0,Pb as Sa,Pc as Mf,Pd as kg,Q as ip,Qa as fa,Qb as Ra,Qc as Df,Qd as Pg,R as sp,Ra as tr,Rb as F0,Rc as Ef,Rd as Sg,S as lp,Sa as ga,Sb as B0,Sc as If,Sd as _a,T as cp,Ta as ba,Tb as W0,Tc as Af,Td as Fa,U as dp,Ua as r0,Ub as $0,Uc as Of,Ud as Rg,V as mp,Va as o0,Vb as U0,Vc as zf,Vd as Tg,W as up,Wa as ha,Wb as G0,Wc as Hf,Wd as Lg,X as pp,Xa as a0,Xb as Ta,Xc as ar,Xd as Mg,Y as fp,Ya as n0,Yb as K0,Yc as za,Yd as Dg,Z as gp,Za as i0,Zb as j0,Zc as Vf,Zd as Eg,_ as bp,_a as va,_b as Y0,_c as _f,_d as Ig,a as Xo,aa as vp,ab as ya,ac as q0,ad as Bf,ae as Og,b as Wu,ba as xp,bb as s0,bc as X0,bd as Wf,be as zg,c as nt,ca as yp,cb as l0,cc as J0,cd as $f,ce as Hg,d as Zt,da as wp,db as c0,dc as Q0,dd as Uf,de as Vg,e as $u,ea as Np,eb as d0,ec as ef,ed as Ha,ee as _g,f as it,fa as Cp,fb as m0,fc as tf,fd as Gf,fe as St,g as st,ga as kp,gb as Gr,gc as La,gd as Kf,ge as Fg,h as Jo,ha as Pp,hb as u0,hc as rf,hd as jf,he as Bg,i as Qo,ia as Sp,ib as p0,ic as of,id as Yf,ie as Wg,j as Uu,ja as Rp,jb as f0,jc as af,jd as Zf,je as $g,k as Gu,ka as Tp,kb as wa,kc as Ma,kd as qf,ke as Ba,l as ea,la as Lp,lb as g0,lc as nf,ld as Xf,le as Ug,m as ta,ma as Mp,mb as b0,mc as sf,md as Jf,me as Gg,n as ra,na as ma,nb as h0,nc as Da,nd as nr,ne as Kg,o as oa,oa as Dp,ob as v0,oc as lf,od as Qf,oe as jg,p as Pt,pa as Ep,pb as x0,pc as Ea,pd as eg,pe as Yg,q as Ku,qa as Ip,qb as y0,qc as cf,qd as tg,qe as Zg,r as Ne,ra as Ap,rb as w0,rc as df,rd as rg,re as qg,s as ju,sa as Op,sb as N0,sc as mf,sd as og,t as qt,ta as zp,tb as C0,tc as uf,td as Kr,u as Yu,ua as Hp,ub as k0,uc as pf,ud as ag,v as Zu,va as Vp,vb as P0,vc as ff,vd as ng,w as Xt,wa as _p,wb as S0,wc as gf,wd as Va,x as qu,xa as er,xb as R0,xc as bf,xd as ig,y as aa,ya as Fp,yb as Na,yc as hf,yd as sg,z as na,za as Bp,zb as T0,zc as vf,zd as lg}from"./chunk-74LJJSLI.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as $r,b as Nt,c as Wo,d as $o,e as Ct,f as Uo,g as Go,h as kt,i as Ur,j as Ko,k as V,l as we,m as jo,n as fe,o as jt,p as i,q as Yt,r as Yo,s as Zo,t as qo}from"./chunk-WSLI5B4B.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Ii}from"lucide-react";import*as sr from"react";import{jsx as ir,jsxs as Hi}from"react/jsx-runtime";var r1=ne.Root,Ai=sr.forwardRef(({className:e,...t},r)=>ir(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ai.displayName="AccordionItem";var Oi=sr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Ii:nr;return ir(ne.Header,{className:"flex",children:Hi(ne.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,ir(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Oi.displayName=ne.Trigger.displayName;var zi=sr.forwardRef(({className:e,children:t,...r},o)=>ir(ne.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));zi.displayName=ne.Content.displayName;import{cva as Vi}from"class-variance-authority";import*as lr from"react";import{jsx as jr}from"react/jsx-runtime";var _i=Vi("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Fi=lr.forwardRef(({className:e,variant:t,...r},o)=>jr("div",{ref:o,role:"alert",className:i(_i({variant:t}),e),...r}));Fi.displayName="Alert";var Bi=lr.forwardRef(({className:e,...t},r)=>jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Bi.displayName="AlertTitle";var Wi=lr.forwardRef(({className:e,...t},r)=>jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Wi.displayName="AlertDescription";import{sha256 as $i}from"js-sha256";import{useState as Ui}from"react";import{jsx as Yr}from"react/jsx-runtime";function Gi(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${$i(e.email)}?d=${t}`:t}function d1({user:e={},className:t}){if(!e)return Yr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ui(Gi(e));return Yr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function m1({id:e,className:t}){return Yr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ki}from"class-variance-authority";import{jsx as Yi}from"react/jsx-runtime";var ji=Ki("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function cr({className:e,variant:t,...r}){return Yi("span",{className:i(ji({variant:t}),e),...r})}import{cva as es}from"class-variance-authority";import{forwardRef as ts}from"react";import*as ge from"@radix-ui/react-tooltip";import Zi from"linkify-react";import{HelpCircle as qi}from"lucide-react";import Xi from"next/link";import{useState as Ji}from"react";import{Fragment as Qi,jsx as U,jsxs as Ge}from"react/jsx-runtime";function P1({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:c,delayDuration:d=0,...s}){let[m,l]=Ji(!1);return Ge(ge.Root,{open:o?!1:m,onOpenChange:l,delayDuration:d,disableHoverableContent:c,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:a,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...s,children:typeof t=="string"?U("span",{className:i("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:l}):t})})]})}function S1({title:e,cta:t,href:r,target:o,onClick:a}){return Ge("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(Xi,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ee,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function R1({title:e,cta:t,href:r}){return Ge("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ge(Qi,{children:[" ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})]})}function T1({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Zi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function L1(e){return U(J,{...e,children:U(qi,{className:"h-4 w-4 text-neutral-500"})})}function M1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:Ge("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ge("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Yt(e||0,{full:!0})," ",t]}),a&&Ge("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Go(a,{withAgo:!0})]})]}),children:o})}function D1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(cr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function E1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:i("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function dr({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as lt,jsxs as Wa}from"react/jsx-runtime";var ie=es("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:i("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ee=ts(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:d,shortcut:s,disabledTooltip:m,right:l,...n},u)=>m?lt(J,{content:m,children:Wa("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[d,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:s})]})}):Wa("button",{ref:u,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?lt(Ne,{}):d||null,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:s}),l]}));ee.displayName="Button";import{cva as rs}from"class-variance-authority";import{createContext as os}from"react";import{jsx as $a}from"react/jsx-runtime";var as=rs("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Rt=os({variant:"loose",loading:!1});function Ua({variant:e="loose",loading:t=!1,className:r,children:o}){return $a("ul",{className:i(as({variant:e,loading:t}),r),"data-variant":e,children:$a(Rt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ns}from"class-variance-authority";import{createContext as is,useContext as ss,useEffect as ls,useRef as cs,useState as ds}from"react";import{jsx as Ga,jsxs as ps}from"react/jsx-runtime";var ms=ns("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"}}}),us="w-full py-2.5 px-4",Zr=is({hovered:!1});function Ka({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:d}){let{variant:s}=ss(Rt),m=cs(null),[l,n]=ds(!1);ls(()=>{if(!l||!m.current)return;let p=setInterval(()=>{var b;((b=m.current)==null?void 0:b.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[l]);let u=p=>!(document.getElementById("modal-backdrop")||kt(p));return ps("li",{ref:m,className:i(ms({variant:s}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[d,Ga("div",{className:i(us,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Ga(Zr.Provider,{value:{hovered:l},children:r})})]})}var rb=Object.assign(Ua,{Card:Object.assign(Ka,{Context:Zr}),Context:Rt});import fs from"embla-carousel-autoplay";import gs from"embla-carousel-react";import{ArrowLeft as bs,ArrowRight as hs}from"lucide-react";import{createContext as vs,forwardRef as Lt,useCallback as Tt,useContext as xs,useEffect as qr,useState as Xr}from"react";import{jsx as Ce,jsxs as Za}from"react/jsx-runtime";var Jr=2e3,ja=vs(null);function be(){let e=xs(ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Ya(){let{api:e}=be(),[t,r]=Xr(0),o=Tt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ys=Lt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:d,...s},m)=>{let[l,n]=gs({...t,axis:e==="horizontal"?"x":"y"},[...o?[fs(typeof o=="object"?o:{delay:Jr})]:[],...a||[]]),[u,p]=Xr(!1),[b,f]=Xr(!1),x=Tt(P=>{!P||(p(P.canScrollPrev()),f(P.canScrollNext()))},[]),v=Tt(()=>{n==null||n.scrollPrev()},[n]),w=Tt(()=>{n==null||n.scrollNext()},[n]),y=Tt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),v()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[v,w]);return qr(()=>{!n||!r||r(n)},[n,r]),qr(()=>{if(!!n)return x(n),n.on("reInit",x),n.on("select",x),()=>{n==null||n.off("select",x)}},[n,x]),Ce(ja.Provider,{value:{carouselRef:l,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:w,canScrollPrev:u,canScrollNext:b},children:Ce("div",{ref:m,onKeyDownCapture:y,className:i("relative",c),role:"region","aria-roledescription":"carousel",...s,children:d})})});ys.displayName="Carousel";var ws=Lt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ws.displayName="CarouselContent";var Ns=Lt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Ns.displayName="CarouselItem";var Cs=Lt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(bs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});Cs.displayName="CarouselPrevious";var ks=Lt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(hs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ks.displayName="CarouselNext";import{cva as Ps}from"class-variance-authority";import{motion as Ss}from"framer-motion";import{ChevronLeft as Rs,ChevronRight as Ts}from"lucide-react";import*as Me from"react";import{jsx as Ke,jsxs as Mt}from"react/jsx-runtime";var Ls=Ps("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 "}}}),yb=({variant:e="simple",className:t})=>{var f;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:d}=be(),s=(f=d==null?void 0:d.plugins())==null?void 0:f.autoplay,[m,l]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(x=>{l((x==null?void 0:x.selectedScrollSnap())??0)},[]),b=Me.useCallback(x=>()=>{s&&s.isPlaying()&&s.stop(),x()},[s]);return Me.useEffect(()=>{!d||(p(d),u((s==null?void 0:s.isPlaying())??!1),d.on("reInit",p),d.on("select",p),d.on("autoplay:play",()=>u(!0)),d.on("autoplay:stop",()=>u(!1)))},[d,s,p]),Mt("div",{className:i(Ls({variant:e}),t),children:[e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:b(o),children:[Ke(Rs,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Previous slide"})]}),d!=null&&Ke("div",{className:"flex items-center gap-1",children:d.slideNodes().map((x,v)=>Mt("button",{onClick:b(()=>d.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ke("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",n&&v===m&&"w-6 bg-black/20"),children:n&&v===m&&Ke(Ss.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Mt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:b(r),children:[Ke(Ts,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Next slide"})]})]})};import Ms from"embla-carousel-react";import{forwardRef as Ds,useCallback as Es,useEffect as Is}from"react";import{jsx as mr}from"react/jsx-runtime";var Lb=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ms({dragFree:!0}),c=Es(d=>{!d||!a||a==null||a.scrollTo(d.selectedScrollSnap())},[a]);return Is(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),mr("div",{className:"overflow-hidden",ref:o,children:mr("div",{className:i("mx-4 flex gap-4",e),...t})})},Mb=Ds(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Ya();return mr("div",{ref:o,children:mr("button",{type:"button",onClick:()=>{var s;if(!a)return;let d=(s=a.plugins())==null?void 0:s.autoplay;d&&d.isPlaying()&&d.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Dt from"@radix-ui/react-checkbox";import{forwardRef as As}from"react";import{jsx as Qr,jsxs as Os}from"react/jsx-runtime";var ct=As(({className:e,...t},r)=>Qr(Dt.Root,{ref:r,className:i("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500 data-[state=indeterminate]:bg-blue-500",e),...t,children:Os(Dt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[Qr(tr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),Qr(za,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ct.displayName=Dt.Root.displayName;import{Command as It,CommandInput as Sl,CommandItem as Rl,useCommandState as Tl}from"cmdk";import{ChevronDown as Ll}from"lucide-react";import{forwardRef as Ml,isValidElement as Dl,useCallback as El,useEffect as gr,useRef as Il,useState as Et}from"react";import{motion as Cl}from"framer-motion";import{forwardRef as kl,useRef as Pl}from"react";import eo from"js-cookie";import{useEffect as zs,useState as Hs}from"react";function Vb(e,t,r){let[o,a]=Hs(()=>{let d=eo.get(e);return d?JSON.parse(d):t});return zs(()=>{let d=()=>{let s=eo.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[e]),[o,d=>{a(d),eo.set(e,JSON.stringify(d),r)}]}import{useCallback as Vs,useEffect as _s,useRef as Fs,useState as Bs}from"react";var dt=(e=3e3)=>{let t=Fs(null),[r,o]=Bs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Vs(async(d,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof d=="string"?await navigator.clipboard.writeText(d):d instanceof ClipboardItem&&await navigator.clipboard.write([d]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),m)throw l}},[e]);return _s(()=>()=>a(),[]),[r,c]};import{useEffect as Ws,useState as $s}from"react";function $b(){let[e,t]=$s(null);return Ws(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,b;let m=s[0];if(!m)return;let l=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let f=1;f<s.length;f++){let x=s[f];if(!x)break;(x.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=x)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>l;)n=(b=c.get(n))==null?void 0:b.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Us}from"react";function jb(e){return{handleKeyDown:Us(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Gs,useState as Ks}from"react";function Xb(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Ks(o??!1);return Gs(()=>{let d=()=>{let m=e.current;if(!m)return;let l=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",d),window.addEventListener("resize",d);let s=null;return e.current&&(s=new IntersectionObserver(d),s.observe(e.current)),d(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",d),window.removeEventListener("resize",d),s==null||s.disconnect()}},[e,r]),a}import{useEffect as js,useState as Ys}from"react";function eh(){let[e,t]=Ys(!1);return js(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as Zs,useState as qs}from"react";function ah(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,d]=qs(),s=(c==null?void 0:c.isIntersecting)&&a,m=([l])=>{d(l)};return Zs(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),c}import{createContext as Xs,useCallback as Js,useContext as Qs,useEffect as qa,useId as el,useState as tl}from"react";import{jsx as rl}from"react/jsx-runtime";var Xa=Xs({listeners:[],setListeners:()=>{}});function dh({children:e}){let[t,r]=tl([]);return rl(Xa.Provider,{value:{listeners:t,setListeners:r},children:e})}function De(e,t,r={}){let o=el(),{listeners:a,setListeners:c}=Qs(Xa),d=Js(s=>{if(r.enabled===!1)return;let m=s.target,l=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!l!=!!r.modal||!!n!=!!r.sheet)return;let u=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(f=>f.enabled!==!1&&!!l==!!f.modal&&!!n==!!f.sheet&&(Array.isArray(f.key)?f.key.includes(u):f.key===u));!p.length||Uo(p,(f,x)=>(x.priority??0)-(f.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);qa(()=>(document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)),[d]),qa(()=>(c(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as ol,useState as al}from"react";function Ja(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function ph(e,t){let[r,o]=al(Ja(e)??t);return ol(()=>{let c=Ja(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as nl}from"sonner";import il from"swr";function vh(e,t){let{data:r,isLoading:o,mutate:a}=il(e,fe);return{data:r,isLoading:o,update:async(c,d)=>nl.promise(a(c(r),{optimisticData:d,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as rn,useMemo as ul}from"react";import{useEffect as Qa,useState as sl}from"react";function en({pageSize:e,page:t,onPageChange:r}){let[o,a]=sl({pageIndex:t,pageSize:e});return Qa(()=>{a(c=>({...c,pageIndex:t}))},[t]),Qa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ll,useRouter as cl,useSearchParams as dl}from"next/navigation";import{useCallback as ml}from"react";function tn(){let e=ll(),t=cl(),r=dl(),o=Object.fromEntries(r),a=(d,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var b;(b=s.include)!=null&&b.includes(p)&&n.set(p,u)}),m=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>m.delete(n)),d&&Object.entries(d).forEach(([n,u])=>m.set(n,u));let l=m.toString();return l.length>0?`?${l}`:""},c=ml(({set:d,del:s,replace:m,scroll:l=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);d&&Object.entries(d).forEach(([x,v])=>p.set(x,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(x=>p.delete(x)):p.delete(s));let b=p.toString(),f=`${e}${b.length>0?`?${b}`:""}`;if(n)return f;m?t.replace(f,{scroll:!1}):t.push(f,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Mh(e=Zo){let{searchParams:t,queryParams:r}=tn(),o=ul(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=en({pageSize:e,page:o,onPageChange:d=>{r(d===1?{del:"page",scroll:!1}:{set:{page:d.toString()},scroll:!1})}});return rn(()=>{let d=parseInt(t.get("page")||"1")||1;c(s=>({...s,pageIndex:d}))},[t.get("page")]),rn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as pl}from"react";function Ih(){pl(()=>{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 fl,useState as gl}from"react";function ur(e){let[t,r]=gl(),o=([a])=>{r(a)};return fl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as bl,useEffect as on,useState as hl}from"react";function an(e,{container:t}={}){let[r,o]=hl(!1),a=bl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return on(()=>{let c=(t==null?void 0:t.current)??window;return c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)},[a]),on(()=>{a()},[a]),r}import{useCallback as vl,useEffect as xl,useState as yl}from"react";function Ee(e){let[t,r]=yl(1),o=vl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:d,clientHeight:s}=e.current;r(d===s?1:Math.min(c/(d-s),1))},[]),a=ur(e);return xl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as wl}from"react";import{toast as sn}from"sonner";import{jsx as pr,jsxs as nn}from"react/jsx-runtime";function Nl({id:e,message:t,undo:r}){let o=()=>{r(),sn.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return wl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),nn("div",{className:"flex w-full items-center justify-between space-x-2",children:[nn("div",{className:"flex items-center space-x-2",children:[pr(ra,{}),pr("p",{className:"font-medium",children:t})]}),pr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function Yh(){return({id:t,message:r,undo:o,duration:a})=>sn(pr(Nl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ln}from"react/jsx-runtime";var ke=kl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},d)=>{var l,n;let s=Pl(null),m=ur(s);return ln(Cl.div,{ref:d,className:i("overflow-hidden",r),animate:{width:e?((l=m==null?void 0:m.contentRect)==null?void 0:l.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...c,children:ln("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ie from"@radix-ui/react-popover";import{Drawer as mt}from"vaul";import{jsx as Pe,jsxs as fr}from"react/jsx-runtime";function Ae({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:d,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:l,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:b}=Y();return d||b?fr(mt.Root,{open:a,onOpenChange:c,children:[Pe(mt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),fr(mt.Portal,{children:[Pe(mt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),fr(mt.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:f=>{f.target instanceof Element&&f.target.closest("[data-sonner-toast]")&&f.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(mt.Overlay,{})]})]}):fr(Ie.Root,{open:a,onOpenChange:c,children:[Pe(Ie.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ie.Portal,{children:Pe(Ie.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:n,collisionBoundary:l,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as br,jsx as E,jsxs as Se}from"react/jsx-runtime";function Al(e,t){return e===!0}function Cv({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:d="Search...",emptyState:s,createLabel:m,onCreate:l,buttonProps:n,shortcutHint:u,caret:p,side:b,open:f,onOpenChange:x,onSearchChange:v,shouldFilter:w=!0,inputRight:y,inputClassName:P,optionRight:N,optionClassName:C,matchTriggerWidth:W,hideSearch:M=!1,children:D}){let L=Al(e,r),S=Array.isArray(t)?t:t?[t]:[],{isMobile:h}=Y(),[R,G]=Et(!1),k=f??R,ue=x??G,[$,Fr]=Et(""),[_o,Br]=Et(!1),[Wr,Mi]=Et(void 0),[Di,Fo]=Et(!1),Ei=H=>{var at;if(L){let $e=S.some(({value:Ue})=>Ue===H.value);r($e?S.filter(({value:Ue})=>Ue!==H.value):[...S,H])}else r(S.length&&((at=S[0])==null?void 0:at.value)===H.value?null:H),ue(!1)},Bo=El((H,at)=>at===""?[...H.filter($e=>$e.first&&!S.some(Ue=>Ue.value===$e.value)),...S,...H.filter($e=>!$e.first&&!S.some(Ue=>Ue.value===$e.value))]:H,[S]);return gr(()=>{_o&&(Mi(o&&Bo(o,$)),Br(!1))},[_o,o,Bo,$]),gr(()=>{Br(!0)},[o]),gr(()=>{k||(Fr(""),Br(!0))},[k]),gr(()=>v==null?void 0:v($),[$]),E(Ae,{openPopover:k,setOpenPopover:ue,align:"start",side:b,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!h&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(It,{loop:!0,shouldFilter:w,children:[!M&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Sl,{placeholder:d,value:$,onValueChange:Fr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",P),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),y&&E("div",{className:"mr-2",children:y}),u&&E("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),E(Ol,{children:E(It.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Wr!==void 0?Se(br,{children:[Wr.map(H=>E(zl,{option:H,multiple:L,selected:S.some(({value:at})=>at===H.value),onSelect:()=>Ei(H),right:N==null?void 0:N(H),className:C},`${H.label}, ${H.value}`)),$.length>0&&l&&Se(Rl,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",C),onSelect:async()=>{Fo(!0),await(l==null?void 0:l($))&&(Fr(""),ue(!1)),Fo(!1)},children:[Di?E(Ne,{className:"size-4 shrink-0"}):E(nr,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),w?E(Vl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Wr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(It.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ne,{})})})})})]})}),children:E(ee,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(br,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:D||S.map(H=>H.label).join(", ")||c}),p&&(p===!0?E(Ll,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?cn(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var Ol=({children:e})=>{let t=Il(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Se(br,{children:[E("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function zl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Se(br,{children:[E(Hl,{disabledTooltip:e.disabledTooltip,children:Se(It.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(ga,{className:"size-4 text-neutral-600"}):E(ba,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:cn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(tr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(It.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Hl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,cn=e=>Dl(e),Vl=Ml((e,t)=>Tl(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as hr,format as _l,isSameMonth as Fl}from"date-fns";import{ChevronLeft as dn,ChevronRight as mn,ChevronsLeft as Bl,ChevronsRight as Wl}from"lucide-react";import{forwardRef as $l,useRef as Ul}from"react";import{DayPicker as Gl,useDayPicker as Kl,useDayRender as jl,useNavigation as Yl}from"react-day-picker";import{Fragment as Zl,jsx as re,jsxs as vr}from"react/jsx-runtime";var At=$l(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));At.displayName="NavigationButton";function un({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:d,classNames:s,...m}){return re(Gl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:d,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...s},components:{IconLeft:()=>re(dn,{className:"h-4 w-4"}),IconRight:()=>re(mn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:b,displayMonths:f}=Yl(),{numberOfMonths:x,fromDate:v,toDate:w}=Kl(),y=f.findIndex(L=>Fl(l.displayMonth,L)),P=y===0,N=y===f.length-1,C=x>1&&(P||!N),W=x>1&&(N||!P),M=()=>{let L=hr(b,-1);p&&(!v||L.getTime()>=v.getTime())&&n(L)},D=()=>{let L=hr(b,1);u&&(!w||L.getTime()<=w.getTime())&&n(L)};return vr("div",{className:"flex items-center justify-between",children:[vr("div",{className:"flex items-center gap-1",children:[o&&!W&&re(At,{disabled:a||!p||v&&hr(b,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:M,icon:Bl}),!W&&re(At,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:dn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:_l(l.displayMonth,"LLLL yyy",{locale:c})}),vr("div",{className:"flex items-center gap-1",children:[!C&&re(At,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:mn}),o&&!C&&re(At,{disabled:a||!u||w&&hr(b,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:D,icon:Wl})]})]})},Day:({date:l,displayMonth:n})=>{let u=Ul(null),{activeModifiers:p,buttonProps:b,divProps:f,isButton:x,isHidden:v}=jl(l,n,u),{selected:w,today:y,disabled:P,range_middle:N}=p;if(v)return re(Zl,{});if(!x)return re("div",{...f,className:i("flex items-center justify-center",f.className)});let{children:C,...W}=b;return vr("button",{ref:u,...W,type:"button",children:[C,y&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!w,"!bg-white":w,"!bg-blue-400":w&&N,"text-neutral-400":P})})]})}},...m})}import{enUS as ic}from"date-fns/locale";import{useEffect as io,useMemo as fn,useRef as sc,useState as yr}from"react";import{Command as to}from"cmdk";import{Lock as ql}from"lucide-react";import{jsx as je,jsxs as Xl}from"react/jsx-runtime";var ro=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,c=l=>"date"in l,d=(l,n)=>l.getDate()===n.getDate()&&l.getMonth()===n.getMonth()&&l.getFullYear()===n.getFullYear(),s=(l,n)=>{let u=l.from,p=n.from,b=!1;u&&p&&d(u,p)&&(b=!0);let f=l.to,x=n.to,v=!1;return f&&x&&d(f,x)&&(v=!0),b&&v},m=l=>{if(o)return o===l.id;if(a(l)){let n=r;return n&&s(n,l.dateRange)}else if(c(l)){let n=r;return n&&d(n,l.date)}return!1};return je(to,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:je(to.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,n)=>Xl(to.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(l)&&"font-semibold text-neutral-800"),children:[je("span",{children:l.label}),l.requiresUpgrade?je(ql,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?je("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&je(J,{side:"bottom",content:l.tooltipContent,children:je("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};ro.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as Jl}from"react";var oo=Jl({isOpen:!1,setIsOpen:()=>{}}),Ql=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},ao=(e,t,r=!1)=>{let o=!Ql(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},pn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:d,toDay:s}=t;if(e&&e.length>0){let m=o,l=r;e.forEach(n=>{var u,p,b,f,x,v;if("date"in n){let w=n.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&w>r)throw new Error(`Preset ${n.label} is after toYear ${l}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(d&&n.date.getDate()<d.getDate())throw new Error(`Preset ${n.label} is before fromDay ${d}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),y=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(y&&r&&y>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${l}.`);if(a){let P=(b=n.dateRange.from)==null?void 0:b.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let P=(f=n.dateRange.to)==null?void 0:f.getMonth();if(P&&P>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(d){let P=(x=n.dateRange.from)==null?void 0:x.getDate();if(P&&P<d.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(d,"MMM dd, yyyy")}.`)}if(s){let P=(v=n.dateRange.to)==null?void 0:v.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as ec}from"class-variance-authority";import{Calendar as tc,ChevronDown as rc}from"lucide-react";import{forwardRef as oc}from"react";import{jsx as xr,jsxs as nc}from"react/jsx-runtime";var ac=ec(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),no=oc(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>nc("button",{ref:c,className:i(ac({hasError:o}),e),...a,children:[xr(tc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),xr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?xr("span",{className:"text-neutral-400",children:r}):null)}),xr(rc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));no.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as gn}from"react/jsx-runtime";var lc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:d,disabledDays:s,showYearNavigation:m=!1,locale:l=ic,placeholder:n="Select date range",hasError:u,align:p="center",className:b,...f})=>{let{isDesktop:x}=Y(),[v,w]=yr(!1),[y,P]=yr(a&&r?a==null?void 0:a.find(({id:k})=>k===r):void 0),[N,C]=yr((y==null?void 0:y.dateRange)??e??t??void 0),[W,M]=yr(N==null?void 0:N.to),D=fn(()=>N,[v]);io(()=>{C(e)},[e]),io(()=>{let k=a==null?void 0:a.find(({id:ue})=>ue===r);P(k),C((k==null?void 0:k.dateRange)??e??t)},[a,r]),io(()=>{v?N&&M(N.to):M(N==null?void 0:N.to)},[v]);let L=(k,ue)=>{let $=(N==null?void 0:N.from)&&(N==null?void 0:N.to)?{from:ue}:k;C($),P(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),w(!1))},S=k=>{C(k.dateRange),P(k),o==null||o(k.dateRange,k),w(!1)},h=()=>{C(D),w(!1)},R=k=>{k||h(),w(k)},G=fn(()=>N?`${N.from?ao(N.from,l):""} - ${N.to?ao(N.to,l):""}`:null,[N,l]);return De((a==null?void 0:a.filter(k=>k.shortcut).map(k=>k.shortcut))??[],k=>{let ue=a==null?void 0:a.find($=>$.shortcut===k.key);ue&&S(ue)}),oe(oo.Provider,{value:{isOpen:v,setIsOpen:w},children:oe(Ae,{align:p,openPopover:v,setOpenPopover:R,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:gn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&oe(cc,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(ro,{currentPresetId:r,currentValue:N,presets:a,onSelect:S})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(un,{mode:"range",selected:N,onSelect:L,month:W,onMonthChange:M,numberOfMonths:x?2:1,disabled:s,disableNavigation:d,showYearNavigation:m,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...f})})]})}),children:oe(no,{placeholder:n,disabled:c,className:b,hasError:u,"aria-required":f.required||f["aria-required"],"aria-invalid":f["aria-invalid"],"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],children:(y==null?void 0:y.label)??G})})})};function sx({presets:e,...t}){return e&&pn(e,t),oe(lc,{presets:e,...t})}function cc({children:e}){let t=sc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return gn("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),oe("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import{useId as dc}from"react";import{jsx as wr,jsxs as mc}from"react/jsx-runtime";function gx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=dc();return mc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[wr("defs",{children:wr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:wr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),wr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import uc from"next/link";import{useEffect as pc,useState as bn}from"react";import fc from"swr";import{jsx as so,jsxs as hn}from"react/jsx-runtime";function vn({className:e}){let{data:t}=fc("https://status.dub.co/api/v1/summary",fe),[r,o]=bn("bg-neutral-200"),[a,c]=bn("Loading status...");return pc(()=>{if(!t)return;let{ongoing_incidents:d}=t;if(d.length>0){let{current_worst_impact:s,name:m}=d[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(l)}else c("All systems operational"),o("bg-green-500")},[t]),hn(uc,{href:"https://status.dub.co",target:"_blank",className:i("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[hn("div",{className:"relative size-2",children:[so("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),so("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),so("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Nr,jsxs as xn}from"react/jsx-runtime";function Cx({icon:e,title:t,description:r,learnMore:o,children:a}){return xn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Nr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Nr(e,{className:"size-6 text-neutral-800"})}),Nr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&xn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Nr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as gc}from"class-variance-authority";import{useState as yn}from"react";import{toast as wn}from"sonner";import{Fragment as hc,jsx as he,jsxs as co}from"react/jsx-runtime";var Nn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],lo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:Nn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...Nn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},bc=gc("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 Ax({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:d,icon:s=wa,customPreview:m,accept:l="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:b=!0,content:f,maxFileSizeMB:x=0,targetResolution:v,accessibilityLabel:w="File upload",disabled:y=!1}){let[P,N]=yn(!1),[C,W]=yn(null),M=async D=>{let L="dataTransfer"in D?D.dataTransfer.files&&D.dataTransfer.files[0]:D.target.files&&D.target.files[0];if(!L)return;if(W(L.name),x>0&&L.size/1024/1024>x){wn.error(`File size too big (max ${x} MB)`);return}let S=lo[l].types;if(S.length&&!S.includes(L.type)){wn.error(lo[l].errorMessage??"File type not supported");return}let h=L;if(v&&L.type.startsWith("image/"))try{let R=await $o(L,v),G=await fetch(R).then(k=>k.blob());h=new File([G],L.name,{type:L.type})}catch(R){console.error("Error resizing image:",R)}if(t){let R=new FileReader;R.onload=G=>{var k;return r==null?void 0:r({src:(k=G.target)==null?void 0:k.result,file:h})},R.readAsDataURL(h);return}r==null||r({file:h})};return co("label",{className:i(bc({variant:o}),y?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(Pt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragEnter:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragLeave:D=>{D.preventDefault(),D.stopPropagation(),N(!1)},onDrop:async D=>{D.preventDefault(),D.stopPropagation(),M(D),N(!1)}}),co("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",y&&"bg-neutral-50",P&&!y&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",b&&!y&&"group-hover:opacity-100"):i(!y&&"group-hover:bg-neutral-50")),children:[he(s,{className:i("size-7 transition-all duration-75",y?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),c)}),f!==null&&he("div",{className:i("mt-2 text-center text-sm text-neutral-500",y&&"text-neutral-400"),children:f??he(hc,{children:co("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:w})]}),n&&(m??he("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",d)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:lo[l].types.join(","),onChange:M,disabled:y},C)})]})}import{AnimatePresence as vc,motion as Cn}from"framer-motion";import{X as xc}from"lucide-react";import yc from"next/link";import{isValidElement as wc}from"react";import{Fragment as Nc,jsx as Q,jsxs as Ot}from"react/jsx-runtime";function Pn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return De("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Ot("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(vc,{children:t==null?void 0:t.map(({key:c,value:d})=>{if(c==="loader")return Q(Cn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${d}`);let s=e.find(m=>m.key===c);return s?(s.multiple&&Array.isArray(d)?d:[d]).map(m=>{var b,f,x,v;let l=(b=s.options)==null?void 0:b.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.value===m),n=(l==null?void 0:l.icon)??((f=s.getOptionIcon)==null?void 0:f.call(s,m,{key:s.key,option:l}))??s.icon,u=(l==null?void 0:l.label)??((x=s.getOptionLabel)==null?void 0:x.call(s,m,{key:s.key,option:l}))??m,p=(l==null?void 0:l.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return Ot(Cn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Ot("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(s.icon)?s.icon:Q(s.icon,{className:"h-4 w-4"})}),s.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?Ot(Nc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(yc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Ct(u,30)}):Ct(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(c,m),children:Q(xc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Ot("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var kn=e=>wc(e);import{Command as ze,useCommandState as Cc}from"cmdk";import{ChevronDown as kc,ListFilter as Pc}from"lucide-react";import{Fragment as Sc,forwardRef as Rc,isValidElement as Rn,useCallback as Cr,useEffect as kr,useImperativeHandle as Tc,useRef as uo,useState as mo}from"react";import{Fragment as Ac,jsx as _,jsxs as ve}from"react/jsx-runtime";function Tn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:d,askAI:s,children:m,emptyState:l,className:n}){var L,S;let{isMobile:u}=Y(),p=uo(null),b=uo(),[f,x]=mo(!1);De("f",()=>x(!0),{enabled:!f});let[v,w]=mo(""),[y,P]=mo(null),N=Cr(()=>{w(""),P(null)},[]);kr(()=>{f||N()},[f]);let C=y?e.find(({key:h})=>h===y):null,W=Cr(h=>{p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(h),o==null||o(h)},[]),M=Cr(h=>{if(!C||!d)return!1;let R=d.find(({key:G})=>G===y);return(R==null?void 0:R.value)===h||R&&C.multiple&&Array.isArray(R.value)&&R.value.includes(h)},[C]),D=Cr(h=>{C&&(M(h)?r(C.key,h):t(C.key,h),C.multiple||x(!1))},[d,C,s]);return kr(()=>{a==null||a(v)},[v]),kr(()=>{c==null||c(y)},[y]),kr(()=>{(C==null?void 0:C.options)&&p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),_(Ae,{openPopover:f,setOpenPopover:x,onEscapeKeyDown:h=>{y&&(h.preventDefault(),N())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(ze,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Mc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:w,onKeyDown:h=>{(h.key==="Escape"||h.key==="Backspace"&&!v)&&(h.preventDefault(),h.stopPropagation(),y?N():x(!1))},emptySubmit:h=>{h.preventDefault(),h.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),x(!1)):D(v)}}),!C&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(Dc,{ref:p,children:ve(ze.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((S=(L=C.options)==null?void 0:L.filter(h=>!v||!h.hideDuringSearch))==null?void 0:S.map(h=>{let R=M(h.value);return _(Sn,{filter:C,option:h,right:R?_(fa,{className:"h-4 w-4"}):h.right,onSelect:()=>D(h.value)},h.value)}))??_(ze.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(Ne,{})})}):e.filter(h=>!h.hideInFilterDropdown).map(h=>ve(Sc,{children:[_(Sn,{filter:h,onSelect:()=>W(h.key)}),h.separatorAfter&&_(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},h.key)),(!C||C.options)&&_(Ec,{search:v,askAI:s,children:l?Lc(l)?(l==null?void 0:l[y??"default"])??"No matches":l:"No matches"})]})},y)]})}),children:ve("button",{type:"button",className:i("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(Pc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),d!=null&&d.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:d.length}):_(kc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Lc(e){return typeof e=="object"&&e!==null&&!Rn(e)}var Mc=e=>{let t=Cc(r=>r.filtered.count===0);return _(ze.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Dc=Rc(({children:e},t)=>{let r=uo(null);Tc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return ve(Ac,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Sn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),c=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,d=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(ze.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:d+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:Ic(c)?c:_(c,{className:"h-4 w-4"})}),Ct(d,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Ec=({search:e,askAI:t,children:r})=>t&&e?ve(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Qo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Ic=e=>Rn(e);var n2={Select:Tn,List:Pn};import{useMemo as Oc,useState as Ln}from"react";import{jsx as Ye,jsxs as Pr}from"react/jsx-runtime";function u2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:d}){let[s,m]=Ln(r.defaultValue),[l,n]=Ln(!1),u=Oc(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Pr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await d({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Pr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Pr("div",{className:"flex flex-col space-y-3",children:[Ye("h2",{className:"text-xl font-medium",children:e}),Ye("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ye("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:p=>m(p.target.value),className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":c})}):Ye("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Pr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ye("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,Ye("div",{className:"shrink-0",children:Ye(ee,{text:a,loading:l,disabled:u,disabledTooltip:c})})]})]})}import{useId as zc}from"react";import{jsx as Sr,jsxs as Hc}from"react/jsx-runtime";function Ze({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=zc();return Hc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Sr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Sr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Vc}from"lucide-react";import _c,{useCallback as Fc,useState as Bc}from"react";import{jsx as qe,jsxs as po}from"react/jsx-runtime";var Wc=_c.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Bc(!1),d=Fc(()=>c(!a),[a,c]);return po("div",{children:[po("div",{className:"relative flex",children:[qe("input",{type:a?"text":t,className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),po("div",{className:"group",children:[r.error&&qe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:qe(Vc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&qe("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>d(),"aria-label":a?"Hide password":"Show Password",children:a?qe(Pa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):qe(Sa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&qe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Wc.displayName="Input";import{flip as jc,offset as Yc,size as Zc,useDismiss as qc,useFloating as Xc,useInteractions as Jc}from"@floating-ui/react";import{Command as Re,useCommandState as Qc}from"cmdk";import{Check as ed,ChevronDown as td,Search as rd,X as od}from"lucide-react";import{createContext as ad,forwardRef as An,useContext as ho,useEffect as fo,useMemo as Dn,useRef as En,useState as go}from"react";import{Drawer as ut}from"vaul";import $c from"next/image";import{memo as Uc,useEffect as Gc,useState as Mn}from"react";import{jsx as Kc}from"react/jsx-runtime";var zt=Uc(e=>{let[t,r]=Mn(!0),[o,a]=Mn(e.src);Gc(()=>a(e.src),[e.src]);let c=d=>{r(!1);let s=d.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Kc($c,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as A,jsxs as se}from"react/jsx-runtime";var Rr=ad({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function W2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:d,inputAttrs:s,noItemsElement:m}){let{isMobile:l}=Y(),n=En(null),[u,p]=go(!1),[b,f]=go(""),[x,v]=go(!1);fo(()=>{u&&v(!1)},[u]),fo(()=>v(!0),[b]),fo(()=>{t&&f(t.value)},[t]);let w=Dn(()=>{let R=b.toLowerCase();return x?e.filter(G=>G.value.toLowerCase().includes(R)):b?e.sort((G,k)=>(k.value.toLowerCase().includes(R)?1:0)-(G.value.toLowerCase().includes(R)?1:0)):e},[x,b,e]),{refs:y,floatingStyles:P,context:N}=Xc({open:u,onOpenChange:p,middleware:[Yc(8),Zc({apply({elements:{floating:R},availableHeight:G}){Object.assign(R.style,{maxHeight:`${Math.max(75,Math.min(G,290))}px`})},padding:8}),jc({fallbackStrategy:"initialPlacement",padding:8})]}),C=qc(N,{enabled:!l||!c}),{getReferenceProps:W,getFloatingProps:M}=Jc([C]),D=En(null),{scrollProgress:L,updateScrollProgress:S}=Ee(D),h=Dn(()=>t&&t.icon?t.icon:t&&t.image?A(zt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):d||A(rd,{className:"size-4 text-neutral-400"}),[t,d]);return A(Rr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:b,setInputValue:f,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&c?se(ut.Root,{open:u,onOpenChange:p,children:[A(ut.Trigger,{className:"sm:hidden",asChild:!0,children:A(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:A(bo,{className:o,iconElement:h})})}),A(ut.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ut.Portal,{children:[A(ut.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:R=>{R.target instanceof Element&&R.target.closest("[data-sonner-toast]")&&R.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A("div",{className:"p-2",children:A(bo,{className:o,iconElement:h})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),A(In,{items:w})]})]})}),A(ut.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A(bo,{className:o,iconElement:h,ref:y.setReference,...W()}),u&&se("div",{ref:y.setFloating,style:P,...M(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:D,onScroll:S,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),A(In,{items:w})]}),A("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(L,2)}})]})]})})}var bo=An(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:i("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[A("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[A(nd,{}),A(id,{})]})]})),nd=An((e,t)=>{let r=Qc(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:d,setInputValue:s,disabled:m}=ho(Rr);return A(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:d,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),c(!1)):l.key==="Enter"&&r?c(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&c(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function id(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=ho(Rr);return A("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?A(od,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):A(td,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function In({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=ho(Rr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&A(zt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),A("p",{className:i("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&A(cr,{className:"text-xs",variant:"neutral",children:a.label})]}),A(ed,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as vo from"@radix-ui/react-label";import{cva as sd}from"class-variance-authority";import*as On from"react";import{jsx as dd}from"react/jsx-runtime";var ld=sd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),cd=On.forwardRef(({className:e,...t},r)=>dd(vo.Root,{ref:r,className:i(ld(),e),...t}));cd.displayName=vo.Root.displayName;import{cva as md}from"class-variance-authority";import{isValidElement as ud}from"react";import{jsx as zn,jsxs as Hn}from"react/jsx-runtime";var pd=md(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function e4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...d}){return Hn(e||"button",{...e==="button"?{type:"button"}:{},className:i(pd({variant:t}),c),...d,children:[Hn("div",{className:"flex grow items-center gap-2",children:[o&&(fd(o)?o:zn(o,{className:"size-4"})),r]}),a&&zn("kbd",{className:i("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var fd=e=>ud(e);import{curveNatural as Vn}from"@visx/curve";import{LinearGradient as _n}from"@visx/gradient";import{Group as gd}from"@visx/group";import{ParentSize as bd}from"@visx/responsive";import{scaleLinear as hd,scaleUtc as vd}from"@visx/scale";import{Area as xd,AreaClosed as yd}from"@visx/shape";import{motion as Fn}from"framer-motion";import{useId as wd,useMemo as Bn}from"react";import{jsx as xe,jsxs as xo}from"react/jsx-runtime";var Nd={top:8,right:2,bottom:2,left:2};function d4(e){return xe(bd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(Cd,{...{width:t,height:r,...e}})})}function Cd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let d={...Nd,...c},s=wd(),m=Bn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:l,xScale:n}=Bn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),b=r.map(({date:v})=>v.getTime()),f=new Date(Math.min(...b)),x=new Date(Math.max(...b));return{yScale:hd({domain:[-2,Math.max(p,2)],range:[t-d.top-d.bottom,0],nice:!0,clamp:!0}),xScale:vd({domain:[f,x],range:[0,e-d.left-d.right],nice:!0})}},[r,t,e]);return xo("svg",{width:e,height:t,children:[xo("defs",{children:[xe(_n,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-d.left-d.right,gradientUnits:"userSpaceOnUse"}),xe(_n,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),xo(gd,{left:d.left,top:d.top,children:[xe(xd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),xe(yd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,yScale:l,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as yo from"@radix-ui/react-visually-hidden";import{useRouter as kd}from"next/navigation";import{Drawer as Xe}from"vaul";import{jsx as ae,jsxs as pt}from"react/jsx-runtime";function b4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:d,drawerRootProps:s}){let m=kd(),l=({dragged:u}={})=>{d&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=Y();return n&&!c?ae(Xe.Root,{open:o?r:!0,onOpenChange:u=>{u||l({dragged:!0})},...s,children:pt(Xe.Portal,{children:[ae(Xe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Xe.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:pt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[pt(yo.Root,{children:[ae(Xe.Title,{children:"Modal"}),ae(Xe.Description,{children:"This is a modal"})]}),ae(Pd,{}),e]})}),ae(Xe.Overlay,{})]})}):ae(le.Root,{open:o?r:!0,onOpenChange:u=>{u||l()},children:pt(le.Portal,{children:[ae(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),pt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[pt(yo.Root,{children:[ae(le.Title,{children:"Modal"}),ae(le.Description,{children:"This is a modal"})]}),e]})]})})}function Pd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as Sd,jsx as Tr,jsxs as ft}from"react/jsx-runtime";var Wn=i("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function x4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:c,showTotalCount:d=!0}){return ft("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ft("div",{className:"flex items-center gap-2",children:[ft("div",{children:[Tr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ft(Sd,{children:[ft("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",d&&"of "]}),d&&Tr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),c]}),ft("div",{className:"flex items-center gap-2",children:[Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Rd}from"lucide-react";import*as wo from"react";import{jsx as Lr}from"react/jsx-runtime";var Td=wo.forwardRef(({className:e,...t},r)=>Lr(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Td.displayName=He.Root.displayName;var Ld=wo.forwardRef(({className:e,...t},r)=>Lr(He.Item,{ref:r,className:i("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Lr(He.Indicator,{className:"flex items-center justify-center",children:Lr(Rd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Ld.displayName=He.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Je,jsxs as Ad}from"react/jsx-runtime";function Md({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Je(a,{direction:"right",handleOnly:!0,...o,children:Ad(Ve.Portal,{children:[Je(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Je(Ve.Content,{...t,onPointerDownOutside:c=>{var d;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(d=t==null?void 0:t.onPointerDownOutside)==null||d.call(t,c)},className:i("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Je("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Dd({className:e,...t}){return Je(Ve.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Ed(e){return Je(Ve.Description,{...e})}function Id(e){return Je(Ve.Close,{...e})}var R4=Object.assign(Md,{Title:Dd,Description:Ed,Close:Id});import{useEffect as Od,useRef as zd,useState as Hd}from"react";import{jsx as $n}from"react/jsx-runtime";var Vd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|