@keslers/kui 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
2
3
  import { ReactNode } from 'react';
3
4
  import { IconType } from 'react-icons';
4
5
 
@@ -45,4 +46,11 @@ interface LayoutProps {
45
46
  }
46
47
  declare function Layout({ header, footer, children }: LayoutProps): react_jsx_runtime.JSX.Element;
47
48
 
48
- export { Footer, Header, Layout };
49
+ interface IconWithBadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
50
+ variant?: "cart" | "none";
51
+ itemCount?: number;
52
+ children?: React.ReactNode;
53
+ }
54
+ declare const IconWithBadge: React.ForwardRefExoticComponent<IconWithBadgeProps & React.RefAttributes<HTMLButtonElement>>;
55
+
56
+ export { Footer, Header, IconWithBadge, Layout };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
2
3
  import { ReactNode } from 'react';
3
4
  import { IconType } from 'react-icons';
4
5
 
@@ -45,4 +46,11 @@ interface LayoutProps {
45
46
  }
46
47
  declare function Layout({ header, footer, children }: LayoutProps): react_jsx_runtime.JSX.Element;
47
48
 
48
- export { Footer, Header, Layout };
49
+ interface IconWithBadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
50
+ variant?: "cart" | "none";
51
+ itemCount?: number;
52
+ children?: React.ReactNode;
53
+ }
54
+ declare const IconWithBadge: React.ForwardRefExoticComponent<IconWithBadgeProps & React.RefAttributes<HTMLButtonElement>>;
55
+
56
+ export { Footer, Header, IconWithBadge, Layout };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{useState as Ln}from"react";import"react";import{cva as Hr}from"class-variance-authority";import{NavigationMenu as it}from"radix-ui";import{clsx as _r}from"clsx";import{twMerge as zr}from"tailwind-merge";function B(...t){return zr(_r(t))}import{ChevronDownIcon as Un}from"lucide-react";import{jsx as Q,jsxs as Ur}from"react/jsx-runtime";function pe({className:t,children:e,viewport:r=!0,...o}){return Ur(it.Root,{"data-slot":"navigation-menu","data-viewport":r,className:B("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...o,children:[e,r&&Q(Vr,{})]})}function ge({className:t,...e}){return Q(it.List,{"data-slot":"navigation-menu-list",className:B("group flex flex-1 list-none items-center justify-center gap-0",t),...e})}function fe({className:t,...e}){return Q(it.Item,{"data-slot":"navigation-menu-item",className:B("relative",t),...e})}var xe=Hr("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function Vr({className:t,...e}){return Q("div",{className:B("absolute top-full left-0 isolate z-50 flex justify-center"),children:Q(it.Viewport,{"data-slot":"navigation-menu-viewport",className:B("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",t),...e})})}function ve({className:t,...e}){return Q(it.Link,{"data-slot":"navigation-menu-link",className:B("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",t),...e})}import"react";import{cva as Gr}from"class-variance-authority";import{Slot as Kr}from"radix-ui";import{jsx as Yr}from"react/jsx-runtime";var $r=Gr("group/button shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ye({className:t,variant:e="default",size:r="default",asChild:o=!1,...n}){let i=o?Kr.Root:"button";return Yr(i,{"data-slot":"button","data-variant":e,"data-size":r,className:B($r({variant:e,size:r,className:t})),...n})}import*as dt from"react";import*as y from"react";var Jn=!!(typeof window<"u"&&window.document&&window.document.createElement);function _(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t?.(n),r===!1||!n.defaultPrevented)return e?.(n)}}import*as me from"react";function ke(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Bt(...t){return e=>{let r=!1,o=t.map(n=>{let i=ke(n,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let n=0;n<o.length;n++){let i=o[n];typeof i=="function"?i():ke(t[n],null)}}}}function I(...t){return me.useCallback(Bt(...t),t)}import*as A from"react";import{jsx as Le}from"react/jsx-runtime";function we(t,e){let r=A.createContext(e),o=i=>{let{children:c,...a}=i,l=A.useMemo(()=>a,Object.values(a));return Le(r.Provider,{value:l,children:c})};o.displayName=t+"Provider";function n(i){let c=A.useContext(r);if(c)return c;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[o,n]}function Ce(t,e=[]){let r=[];function o(i,c){let a=A.createContext(c),l=r.length;r=[...r,c];let s=h=>{let{scope:p,children:g,...w}=h,d=p?.[t]?.[l]||a,f=A.useMemo(()=>w,Object.values(w));return Le(d.Provider,{value:f,children:g})};s.displayName=i+"Provider";function u(h,p){let g=p?.[t]?.[l]||a,w=A.useContext(g);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[s,u]}let n=()=>{let i=r.map(c=>A.createContext(c));return function(a){let l=a?.[t]||i;return A.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return n.scopeName=t,[o,Xr(n,...e)]}function Xr(...t){let e=t[0];if(t.length===1)return e;let r=()=>{let o=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let c=o.reduce((a,{useScope:l,scopeName:s})=>{let h=l(i)[`__scope${s}`];return{...a,...h}},{});return A.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}import*as Wt from"react";import*as be from"react";var V=globalThis?.document?be.useLayoutEffect:()=>{};var qr=Wt[" useId ".trim().toString()]||(()=>{}),Zr=0;function pt(t){let[e,r]=Wt.useState(qr());return V(()=>{t||r(o=>o??String(Zr++))},[t]),t||(e?`radix-${e}`:"")}import*as O from"react";import*as gt from"react";var Qr=O[" useInsertionEffect ".trim().toString()]||V;function Re({prop:t,defaultProp:e,onChange:r=()=>{},caller:o}){let[n,i,c]=Jr({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:n;{let u=O.useRef(t!==void 0);O.useEffect(()=>{let h=u.current;h!==a&&console.warn(`${o} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,o])}let s=O.useCallback(u=>{if(a){let h=to(u)?u(t):u;h!==t&&c.current?.(h)}else i(u)},[a,t,i,c]);return[l,s]}function Jr({defaultProp:t,onChange:e}){let[r,o]=O.useState(t),n=O.useRef(r),i=O.useRef(e);return Qr(()=>{i.current=e},[e]),O.useEffect(()=>{n.current!==r&&(i.current?.(r),n.current=r)},[r,n]),[r,o,i]}function to(t){return typeof t=="function"}import*as L from"react";import*as je from"react";import*as Fe from"react-dom";import*as j from"react";import{Fragment as ui,jsx as Me}from"react/jsx-runtime";function ft(t){let e=eo(t),r=j.forwardRef((o,n)=>{let{children:i,...c}=o,a=j.Children.toArray(i),l=a.find(oo);if(l){let s=l.props.children,u=a.map(h=>h===l?j.Children.count(s)>1?j.Children.only(null):j.isValidElement(s)?s.props.children:null:h);return Me(e,{...c,ref:n,children:j.isValidElement(s)?j.cloneElement(s,void 0,u):null})}return Me(e,{...c,ref:n,children:i})});return r.displayName=`${t}.Slot`,r}function eo(t){let e=j.forwardRef((r,o)=>{let{children:n,...i}=r;if(j.isValidElement(n)){let c=io(n),a=no(i,n.props);return n.type!==j.Fragment&&(a.ref=o?Bt(o,c):c),j.cloneElement(n,a)}return j.Children.count(n)>1?j.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var ro=Symbol("radix.slottable");function oo(t){return j.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ro}function no(t,e){let r={...e};for(let o in e){let n=t[o],i=e[o];/^on[A-Z]/.test(o)?n&&i?r[o]=(...a)=>{let l=i(...a);return n(...a),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...i}:o==="className"&&(r[o]=[n,i].filter(Boolean).join(" "))}return{...t,...r}}function io(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import{jsx as ao}from"react/jsx-runtime";var co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=co.reduce((t,e)=>{let r=ft(`Primitive.${e}`),o=je.forwardRef((n,i)=>{let{asChild:c,...a}=n,l=c?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),ao(l,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function Se(t,e){t&&Fe.flushSync(()=>t.dispatchEvent(e))}import*as J from"react";function U(t){let e=J.useRef(t);return J.useEffect(()=>{e.current=t}),J.useMemo(()=>(...r)=>e.current?.(...r),[])}import*as Be from"react";function We(t,e=globalThis?.document){let r=U(t);Be.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[r,e])}import{jsx as Ne}from"react/jsx-runtime";var lo="DismissableLayer",Et="dismissableLayer.update",so="dismissableLayer.pointerDownOutside",uo="dismissableLayer.focusOutside",Ee,Ae=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pt=L.forwardRef((t,e)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:i,onInteractOutside:c,onDismiss:a,...l}=t,s=L.useContext(Ae),[u,h]=L.useState(null),p=u?.ownerDocument??globalThis?.document,[,g]=L.useState({}),w=I(e,x=>h(x)),d=Array.from(s.layers),[f]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),v=d.indexOf(f),k=u?d.indexOf(u):-1,C=s.layersWithOutsidePointerEventsDisabled.size>0,M=k>=v,R=go(x=>{let H=x.target,Z=[...s.branches].some(nt=>nt.contains(H));!M||Z||(n?.(x),c?.(x),x.defaultPrevented||a?.())},p),S=fo(x=>{let H=x.target;[...s.branches].some(nt=>nt.contains(H))||(i?.(x),c?.(x),x.defaultPrevented||a?.())},p);return We(x=>{k===s.layers.size-1&&(o?.(x),!x.defaultPrevented&&a&&(x.preventDefault(),a()))},p),L.useEffect(()=>{if(u)return r&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(Ee=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(u)),s.layers.add(u),Pe(),()=>{r&&s.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ee)}},[u,p,r,s]),L.useEffect(()=>()=>{u&&(s.layers.delete(u),s.layersWithOutsidePointerEventsDisabled.delete(u),Pe())},[u,s]),L.useEffect(()=>{let x=()=>g({});return document.addEventListener(Et,x),()=>document.removeEventListener(Et,x)},[]),Ne(N.div,{...l,ref:w,style:{pointerEvents:C?M?"auto":"none":void 0,...t.style},onFocusCapture:_(t.onFocusCapture,S.onFocusCapture),onBlurCapture:_(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_(t.onPointerDownCapture,R.onPointerDownCapture)})});Pt.displayName=lo;var ho="DismissableLayerBranch",po=L.forwardRef((t,e)=>{let r=L.useContext(Ae),o=L.useRef(null),n=I(e,o);return L.useEffect(()=>{let i=o.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),Ne(N.div,{...t,ref:n})});po.displayName=ho;function go(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1),n=L.useRef(()=>{});return L.useEffect(()=>{let i=a=>{if(a.target&&!o.current){let s=function(){Oe(so,r,u,{discrete:!0})};var l=s;let u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=s,e.addEventListener("click",n.current,{once:!0})):s()}else e.removeEventListener("click",n.current);o.current=!1},c=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),e.removeEventListener("pointerdown",i),e.removeEventListener("click",n.current)}},[e,r]),{onPointerDownCapture:()=>o.current=!0}}function fo(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1);return L.useEffect(()=>{let n=i=>{i.target&&!o.current&&Oe(uo,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){let t=new CustomEvent(Et);document.dispatchEvent(t)}function Oe(t,e,r,{discrete:o}){let n=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),o?Se(n,i):n.dispatchEvent(i)}import*as T from"react";import{jsx as xo}from"react/jsx-runtime";var Nt="focusScope.autoFocusOnMount",At="focusScope.autoFocusOnUnmount",Te={bubbles:!1,cancelable:!0},vo="FocusScope",Ot=T.forwardRef((t,e)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:i,...c}=t,[a,l]=T.useState(null),s=U(n),u=U(i),h=T.useRef(null),p=I(e,d=>l(d)),g=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(o){let k=function(S){if(g.paused||!a)return;let x=S.target;a.contains(x)?h.current=x:G(h.current,{select:!0})},C=function(S){if(g.paused||!a)return;let x=S.relatedTarget;x!==null&&(a.contains(x)||G(h.current,{select:!0}))},M=function(S){if(document.activeElement===document.body)for(let H of S)H.removedNodes.length>0&&G(a)};var d=k,f=C,v=M;document.addEventListener("focusin",k),document.addEventListener("focusout",C);let R=new MutationObserver(M);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",C),R.disconnect()}}},[o,a,g.paused]),T.useEffect(()=>{if(a){De.add(g);let d=document.activeElement;if(!a.contains(d)){let v=new CustomEvent(Nt,Te);a.addEventListener(Nt,s),a.dispatchEvent(v),v.defaultPrevented||(yo(Co(ze(a)),{select:!0}),document.activeElement===d&&G(a))}return()=>{a.removeEventListener(Nt,s),setTimeout(()=>{let v=new CustomEvent(At,Te);a.addEventListener(At,u),a.dispatchEvent(v),v.defaultPrevented||G(d??document.body,{select:!0}),a.removeEventListener(At,u),De.remove(g)},0)}}},[a,s,u,g]);let w=T.useCallback(d=>{if(!r&&!o||g.paused)return;let f=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,v=document.activeElement;if(f&&v){let k=d.currentTarget,[C,M]=ko(k);C&&M?!d.shiftKey&&v===M?(d.preventDefault(),r&&G(C,{select:!0})):d.shiftKey&&v===C&&(d.preventDefault(),r&&G(M,{select:!0})):v===k&&d.preventDefault()}},[r,o,g.paused]);return xo(N.div,{tabIndex:-1,...c,ref:p,onKeyDown:w})});Ot.displayName=vo;function yo(t,{select:e=!1}={}){let r=document.activeElement;for(let o of t)if(G(o,{select:e}),document.activeElement!==r)return}function ko(t){let e=ze(t),r=Ie(e,t),o=Ie(e.reverse(),t);return[r,o]}function ze(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Ie(t,e){for(let r of t)if(!mo(r,{upTo:e}))return r}function mo(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Lo(t){return t instanceof HTMLInputElement&&"select"in t}function G(t,{select:e=!1}={}){if(t&&t.focus){let r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Lo(t)&&e&&t.select()}}var De=wo();function wo(){let t=[];return{add(e){let r=t[0];e!==r&&r?.pause(),t=_e(t,e),t.unshift(e)},remove(e){t=_e(t,e),t[0]?.resume()}}}function _e(t,e){let r=[...t],o=r.indexOf(e);return o!==-1&&r.splice(o,1),r}function Co(t){return t.filter(e=>e.tagName!=="A")}import*as xt from"react";import bo from"react-dom";import{jsx as Ro}from"react/jsx-runtime";var Mo="Portal",Tt=xt.forwardRef((t,e)=>{let{container:r,...o}=t,[n,i]=xt.useState(!1);V(()=>i(!0),[]);let c=r||n&&globalThis?.document?.body;return c?bo.createPortal(Ro(N.div,{...o,ref:e}),c):null});Tt.displayName=Mo;import*as E from"react";import*as He from"react";function jo(t,e){return He.useReducer((r,o)=>e[r][o]??r,t)}var at=t=>{let{present:e,children:r}=t,o=Fo(e),n=typeof r=="function"?r({present:o.isPresent}):E.Children.only(r),i=I(o.ref,So(n));return typeof r=="function"||o.isPresent?E.cloneElement(n,{ref:i}):null};at.displayName="Presence";function Fo(t){let[e,r]=E.useState(),o=E.useRef(null),n=E.useRef(t),i=E.useRef("none"),c=t?"mounted":"unmounted",[a,l]=jo(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{let s=vt(o.current);i.current=a==="mounted"?s:"none"},[a]),V(()=>{let s=o.current,u=n.current;if(u!==t){let p=i.current,g=vt(s);t?l("MOUNT"):g==="none"||s?.display==="none"?l("UNMOUNT"):l(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,l]),V(()=>{if(e){let s,u=e.ownerDocument.defaultView??window,h=g=>{let d=vt(o.current).includes(CSS.escape(g.animationName));if(g.target===e&&d&&(l("ANIMATION_END"),!n.current)){let f=e.style.animationFillMode;e.style.animationFillMode="forwards",s=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=f)})}},p=g=>{g.target===e&&(i.current=vt(o.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(s),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(s=>{o.current=s?getComputedStyle(s):null,r(s)},[])}}function vt(t){return t?.animationName||"none"}function So(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import*as Ue from"react";var It=0;function Ge(){Ue.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Ve()),document.body.insertAdjacentElement("beforeend",t[1]??Ve()),It++,()=>{It===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),It--}},[])}function Ve(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var P=function(){return P=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},P.apply(this,arguments)};function yt(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]]);return r}function Ke(t,e,r){if(r||arguments.length===2)for(var o=0,n=e.length,i;o<n;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}import*as Ct from"react";import*as W from"react";var K="right-scroll-bar-position",$="width-before-scroll-bar",Dt="with-scroll-bars-hidden",_t="--removed-body-scroll-bar-size";function kt(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as Bo}from"react";function $e(t,e){var r=Bo(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=e,r.facade}import*as mt from"react";var Wo=typeof window<"u"?mt.useLayoutEffect:mt.useEffect,Ye=new WeakMap;function zt(t,e){var r=$e(e||null,function(o){return t.forEach(function(n){return kt(n,o)})});return Wo(function(){var o=Ye.get(r);if(o){var n=new Set(o),i=new Set(t),c=r.current;n.forEach(function(a){i.has(a)||kt(a,null)}),i.forEach(function(a){n.has(a)||kt(a,c)})}Ye.set(r,t)},[t]),r}function Eo(t){return t}function Po(t,e){e===void 0&&(e=Eo);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var c=e(i,o);return r.push(c),function(){r=r.filter(function(a){return a!==c})}},assignSyncMedium:function(i){for(o=!0;r.length;){var c=r;r=[],c.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){o=!0;var c=[];if(r.length){var a=r;r=[],a.forEach(i),c=r}var l=function(){var u=c;c=[],u.forEach(i)},s=function(){return Promise.resolve().then(l)};s(),r={push:function(u){c.push(u),s()},filter:function(u){return c=c.filter(u),r}}}};return n}function Ht(t){t===void 0&&(t={});var e=Po(null);return e.options=P({async:!0,ssr:!1},t),e}import*as Xe from"react";var qe=function(t){var e=t.sideCar,r=yt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return Xe.createElement(o,P({},r))};qe.isSideCarExport=!0;function Vt(t,e){return t.useMedium(e),qe}var Lt=Ht();var Ut=function(){},ct=W.forwardRef(function(t,e){var r=W.useRef(null),o=W.useState({onScrollCapture:Ut,onWheelCapture:Ut,onTouchMoveCapture:Ut}),n=o[0],i=o[1],c=t.forwardProps,a=t.children,l=t.className,s=t.removeScrollBar,u=t.enabled,h=t.shards,p=t.sideCar,g=t.noRelative,w=t.noIsolation,d=t.inert,f=t.allowPinchZoom,v=t.as,k=v===void 0?"div":v,C=t.gapMode,M=yt(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=p,S=zt([r,e]),x=P(P({},M),n);return W.createElement(W.Fragment,null,u&&W.createElement(R,{sideCar:Lt,removeScrollBar:s,shards:h,noRelative:g,noIsolation:w,inert:d,setCallbacks:i,allowPinchZoom:!!f,lockRef:r,gapMode:C}),c?W.cloneElement(W.Children.only(a),P(P({},x),{ref:S})):W.createElement(k,P({},x,{className:l,ref:S}),a))});ct.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ct.classNames={fullWidth:$,zeroRight:K};import*as m from"react";import*as et from"react";import*as Je from"react";var Ze;var Qe=function(){if(Ze)return Ze;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function No(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Qe();return e&&t.setAttribute("nonce",e),t}function Ao(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Oo(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Gt=function(){var t=0,e=null;return{add:function(r){t==0&&(e=No())&&(Ao(e,r),Oo(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Kt=function(){var t=Gt();return function(e,r){Je.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}};var lt=function(){var t=Kt(),e=function(r){var o=r.styles,n=r.dynamic;return t(o,n),null};return e};var To={left:0,top:0,right:0,gap:0},$t=function(t){return parseInt(t||"",10)||0},Io=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[$t(r),$t(o),$t(n)]},Yt=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return To;var e=Io(t),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-r+e[2]-e[0])}};var Do=lt(),tt="data-scroll-locked",_o=function(t,e,r,o){var n=t.left,i=t.top,c=t.right,a=t.gap;return r===void 0&&(r="margin"),`
1
+ import{useState as bn}from"react";import"react";import{cva as Gr}from"class-variance-authority";import{NavigationMenu as it}from"radix-ui";import{clsx as Vr}from"clsx";import{twMerge as Ur}from"tailwind-merge";function B(...t){return Ur(Vr(t))}import{ChevronDownIcon as Xn}from"lucide-react";import{jsx as Q,jsxs as $r}from"react/jsx-runtime";function pe({className:t,children:e,viewport:r=!0,...o}){return $r(it.Root,{"data-slot":"navigation-menu","data-viewport":r,className:B("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...o,children:[e,r&&Q(Kr,{})]})}function ge({className:t,...e}){return Q(it.List,{"data-slot":"navigation-menu-list",className:B("group flex flex-1 list-none items-center justify-center gap-0",t),...e})}function fe({className:t,...e}){return Q(it.Item,{"data-slot":"navigation-menu-item",className:B("relative",t),...e})}var xe=Gr("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function Kr({className:t,...e}){return Q("div",{className:B("absolute top-full left-0 isolate z-50 flex justify-center"),children:Q(it.Viewport,{"data-slot":"navigation-menu-viewport",className:B("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",t),...e})})}function ve({className:t,...e}){return Q(it.Link,{"data-slot":"navigation-menu-link",className:B("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-']):not([class*='h-']):not([class*='w-'])]:size-4",t),...e})}import"react";import{cva as Yr}from"class-variance-authority";import{Slot as Xr}from"radix-ui";import{jsx as Zr}from"react/jsx-runtime";var qr=Yr("group/button shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ye({className:t,variant:e="default",size:r="default",asChild:o=!1,...n}){let i=o?Xr.Root:"button";return Zr(i,{"data-slot":"button","data-variant":e,"data-size":r,className:B(qr({variant:e,size:r,className:t})),...n})}import*as dt from"react";import*as y from"react";var ni=!!(typeof window<"u"&&window.document&&window.document.createElement);function _(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t?.(n),r===!1||!n.defaultPrevented)return e?.(n)}}import*as ke from"react";function me(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function St(...t){return e=>{let r=!1,o=t.map(n=>{let i=me(n,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let n=0;n<o.length;n++){let i=o[n];typeof i=="function"?i():me(t[n],null)}}}}function I(...t){return ke.useCallback(St(...t),t)}import*as A from"react";import{jsx as Le}from"react/jsx-runtime";function we(t,e){let r=A.createContext(e),o=i=>{let{children:c,...a}=i,l=A.useMemo(()=>a,Object.values(a));return Le(r.Provider,{value:l,children:c})};o.displayName=t+"Provider";function n(i){let c=A.useContext(r);if(c)return c;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[o,n]}function Ce(t,e=[]){let r=[];function o(i,c){let a=A.createContext(c),l=r.length;r=[...r,c];let s=h=>{let{scope:p,children:g,...w}=h,d=p?.[t]?.[l]||a,f=A.useMemo(()=>w,Object.values(w));return Le(d.Provider,{value:f,children:g})};s.displayName=i+"Provider";function u(h,p){let g=p?.[t]?.[l]||a,w=A.useContext(g);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[s,u]}let n=()=>{let i=r.map(c=>A.createContext(c));return function(a){let l=a?.[t]||i;return A.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return n.scopeName=t,[o,Qr(n,...e)]}function Qr(...t){let e=t[0];if(t.length===1)return e;let r=()=>{let o=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let c=o.reduce((a,{useScope:l,scopeName:s})=>{let h=l(i)[`__scope${s}`];return{...a,...h}},{});return A.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}import*as Wt from"react";import*as be from"react";var V=globalThis?.document?be.useLayoutEffect:()=>{};var Jr=Wt[" useId ".trim().toString()]||(()=>{}),to=0;function pt(t){let[e,r]=Wt.useState(Jr());return V(()=>{t||r(o=>o??String(to++))},[t]),t||(e?`radix-${e}`:"")}import*as O from"react";import*as gt from"react";var eo=O[" useInsertionEffect ".trim().toString()]||V;function Re({prop:t,defaultProp:e,onChange:r=()=>{},caller:o}){let[n,i,c]=ro({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:n;{let u=O.useRef(t!==void 0);O.useEffect(()=>{let h=u.current;h!==a&&console.warn(`${o} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,o])}let s=O.useCallback(u=>{if(a){let h=oo(u)?u(t):u;h!==t&&c.current?.(h)}else i(u)},[a,t,i,c]);return[l,s]}function ro({defaultProp:t,onChange:e}){let[r,o]=O.useState(t),n=O.useRef(r),i=O.useRef(e);return eo(()=>{i.current=e},[e]),O.useEffect(()=>{n.current!==r&&(i.current?.(r),n.current=r)},[r,n]),[r,o,i]}function oo(t){return typeof t=="function"}import*as L from"react";import*as je from"react";import*as Fe from"react-dom";import*as j from"react";import{Fragment as xi,jsx as Me}from"react/jsx-runtime";function ft(t){let e=no(t),r=j.forwardRef((o,n)=>{let{children:i,...c}=o,a=j.Children.toArray(i),l=a.find(ao);if(l){let s=l.props.children,u=a.map(h=>h===l?j.Children.count(s)>1?j.Children.only(null):j.isValidElement(s)?s.props.children:null:h);return Me(e,{...c,ref:n,children:j.isValidElement(s)?j.cloneElement(s,void 0,u):null})}return Me(e,{...c,ref:n,children:i})});return r.displayName=`${t}.Slot`,r}function no(t){let e=j.forwardRef((r,o)=>{let{children:n,...i}=r;if(j.isValidElement(n)){let c=lo(n),a=co(i,n.props);return n.type!==j.Fragment&&(a.ref=o?St(o,c):c),j.cloneElement(n,a)}return j.Children.count(n)>1?j.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var io=Symbol("radix.slottable");function ao(t){return j.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===io}function co(t,e){let r={...e};for(let o in e){let n=t[o],i=e[o];/^on[A-Z]/.test(o)?n&&i?r[o]=(...a)=>{let l=i(...a);return n(...a),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...i}:o==="className"&&(r[o]=[n,i].filter(Boolean).join(" "))}return{...t,...r}}function lo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import{jsx as so}from"react/jsx-runtime";var uo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=uo.reduce((t,e)=>{let r=ft(`Primitive.${e}`),o=je.forwardRef((n,i)=>{let{asChild:c,...a}=n,l=c?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),so(l,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function Be(t,e){t&&Fe.flushSync(()=>t.dispatchEvent(e))}import*as J from"react";function U(t){let e=J.useRef(t);return J.useEffect(()=>{e.current=t}),J.useMemo(()=>(...r)=>e.current?.(...r),[])}import*as Se from"react";function We(t,e=globalThis?.document){let r=U(t);Se.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[r,e])}import{jsx as Ne}from"react/jsx-runtime";var ho="DismissableLayer",Et="dismissableLayer.update",po="dismissableLayer.pointerDownOutside",go="dismissableLayer.focusOutside",Ee,Ae=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pt=L.forwardRef((t,e)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:i,onInteractOutside:c,onDismiss:a,...l}=t,s=L.useContext(Ae),[u,h]=L.useState(null),p=u?.ownerDocument??globalThis?.document,[,g]=L.useState({}),w=I(e,x=>h(x)),d=Array.from(s.layers),[f]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),v=d.indexOf(f),m=u?d.indexOf(u):-1,C=s.layersWithOutsidePointerEventsDisabled.size>0,M=m>=v,R=vo(x=>{let H=x.target,Z=[...s.branches].some(nt=>nt.contains(H));!M||Z||(n?.(x),c?.(x),x.defaultPrevented||a?.())},p),S=yo(x=>{let H=x.target;[...s.branches].some(nt=>nt.contains(H))||(i?.(x),c?.(x),x.defaultPrevented||a?.())},p);return We(x=>{m===s.layers.size-1&&(o?.(x),!x.defaultPrevented&&a&&(x.preventDefault(),a()))},p),L.useEffect(()=>{if(u)return r&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(Ee=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(u)),s.layers.add(u),Pe(),()=>{r&&s.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ee)}},[u,p,r,s]),L.useEffect(()=>()=>{u&&(s.layers.delete(u),s.layersWithOutsidePointerEventsDisabled.delete(u),Pe())},[u,s]),L.useEffect(()=>{let x=()=>g({});return document.addEventListener(Et,x),()=>document.removeEventListener(Et,x)},[]),Ne(N.div,{...l,ref:w,style:{pointerEvents:C?M?"auto":"none":void 0,...t.style},onFocusCapture:_(t.onFocusCapture,S.onFocusCapture),onBlurCapture:_(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_(t.onPointerDownCapture,R.onPointerDownCapture)})});Pt.displayName=ho;var fo="DismissableLayerBranch",xo=L.forwardRef((t,e)=>{let r=L.useContext(Ae),o=L.useRef(null),n=I(e,o);return L.useEffect(()=>{let i=o.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),Ne(N.div,{...t,ref:n})});xo.displayName=fo;function vo(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1),n=L.useRef(()=>{});return L.useEffect(()=>{let i=a=>{if(a.target&&!o.current){let s=function(){Oe(po,r,u,{discrete:!0})};var l=s;let u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=s,e.addEventListener("click",n.current,{once:!0})):s()}else e.removeEventListener("click",n.current);o.current=!1},c=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),e.removeEventListener("pointerdown",i),e.removeEventListener("click",n.current)}},[e,r]),{onPointerDownCapture:()=>o.current=!0}}function yo(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1);return L.useEffect(()=>{let n=i=>{i.target&&!o.current&&Oe(go,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){let t=new CustomEvent(Et);document.dispatchEvent(t)}function Oe(t,e,r,{discrete:o}){let n=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),o?Be(n,i):n.dispatchEvent(i)}import*as T from"react";import{jsx as mo}from"react/jsx-runtime";var Nt="focusScope.autoFocusOnMount",At="focusScope.autoFocusOnUnmount",Te={bubbles:!1,cancelable:!0},ko="FocusScope",Ot=T.forwardRef((t,e)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:i,...c}=t,[a,l]=T.useState(null),s=U(n),u=U(i),h=T.useRef(null),p=I(e,d=>l(d)),g=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(o){let m=function(S){if(g.paused||!a)return;let x=S.target;a.contains(x)?h.current=x:G(h.current,{select:!0})},C=function(S){if(g.paused||!a)return;let x=S.relatedTarget;x!==null&&(a.contains(x)||G(h.current,{select:!0}))},M=function(S){if(document.activeElement===document.body)for(let H of S)H.removedNodes.length>0&&G(a)};var d=m,f=C,v=M;document.addEventListener("focusin",m),document.addEventListener("focusout",C);let R=new MutationObserver(M);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",C),R.disconnect()}}},[o,a,g.paused]),T.useEffect(()=>{if(a){De.add(g);let d=document.activeElement;if(!a.contains(d)){let v=new CustomEvent(Nt,Te);a.addEventListener(Nt,s),a.dispatchEvent(v),v.defaultPrevented||(Lo(Mo(ze(a)),{select:!0}),document.activeElement===d&&G(a))}return()=>{a.removeEventListener(Nt,s),setTimeout(()=>{let v=new CustomEvent(At,Te);a.addEventListener(At,u),a.dispatchEvent(v),v.defaultPrevented||G(d??document.body,{select:!0}),a.removeEventListener(At,u),De.remove(g)},0)}}},[a,s,u,g]);let w=T.useCallback(d=>{if(!r&&!o||g.paused)return;let f=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,v=document.activeElement;if(f&&v){let m=d.currentTarget,[C,M]=wo(m);C&&M?!d.shiftKey&&v===M?(d.preventDefault(),r&&G(C,{select:!0})):d.shiftKey&&v===C&&(d.preventDefault(),r&&G(M,{select:!0})):v===m&&d.preventDefault()}},[r,o,g.paused]);return mo(N.div,{tabIndex:-1,...c,ref:p,onKeyDown:w})});Ot.displayName=ko;function Lo(t,{select:e=!1}={}){let r=document.activeElement;for(let o of t)if(G(o,{select:e}),document.activeElement!==r)return}function wo(t){let e=ze(t),r=Ie(e,t),o=Ie(e.reverse(),t);return[r,o]}function ze(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Ie(t,e){for(let r of t)if(!Co(r,{upTo:e}))return r}function Co(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function bo(t){return t instanceof HTMLInputElement&&"select"in t}function G(t,{select:e=!1}={}){if(t&&t.focus){let r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&bo(t)&&e&&t.select()}}var De=Ro();function Ro(){let t=[];return{add(e){let r=t[0];e!==r&&r?.pause(),t=_e(t,e),t.unshift(e)},remove(e){t=_e(t,e),t[0]?.resume()}}}function _e(t,e){let r=[...t],o=r.indexOf(e);return o!==-1&&r.splice(o,1),r}function Mo(t){return t.filter(e=>e.tagName!=="A")}import*as xt from"react";import jo from"react-dom";import{jsx as Fo}from"react/jsx-runtime";var Bo="Portal",Tt=xt.forwardRef((t,e)=>{let{container:r,...o}=t,[n,i]=xt.useState(!1);V(()=>i(!0),[]);let c=r||n&&globalThis?.document?.body;return c?jo.createPortal(Fo(N.div,{...o,ref:e}),c):null});Tt.displayName=Bo;import*as E from"react";import*as He from"react";function So(t,e){return He.useReducer((r,o)=>e[r][o]??r,t)}var at=t=>{let{present:e,children:r}=t,o=Wo(e),n=typeof r=="function"?r({present:o.isPresent}):E.Children.only(r),i=I(o.ref,Eo(n));return typeof r=="function"||o.isPresent?E.cloneElement(n,{ref:i}):null};at.displayName="Presence";function Wo(t){let[e,r]=E.useState(),o=E.useRef(null),n=E.useRef(t),i=E.useRef("none"),c=t?"mounted":"unmounted",[a,l]=So(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{let s=vt(o.current);i.current=a==="mounted"?s:"none"},[a]),V(()=>{let s=o.current,u=n.current;if(u!==t){let p=i.current,g=vt(s);t?l("MOUNT"):g==="none"||s?.display==="none"?l("UNMOUNT"):l(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,l]),V(()=>{if(e){let s,u=e.ownerDocument.defaultView??window,h=g=>{let d=vt(o.current).includes(CSS.escape(g.animationName));if(g.target===e&&d&&(l("ANIMATION_END"),!n.current)){let f=e.style.animationFillMode;e.style.animationFillMode="forwards",s=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=f)})}},p=g=>{g.target===e&&(i.current=vt(o.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(s),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(s=>{o.current=s?getComputedStyle(s):null,r(s)},[])}}function vt(t){return t?.animationName||"none"}function Eo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import*as Ue from"react";var It=0;function Ge(){Ue.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Ve()),document.body.insertAdjacentElement("beforeend",t[1]??Ve()),It++,()=>{It===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),It--}},[])}function Ve(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var P=function(){return P=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},P.apply(this,arguments)};function yt(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]]);return r}function Ke(t,e,r){if(r||arguments.length===2)for(var o=0,n=e.length,i;o<n;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}import*as Ct from"react";import*as W from"react";var K="right-scroll-bar-position",$="width-before-scroll-bar",Dt="with-scroll-bars-hidden",_t="--removed-body-scroll-bar-size";function mt(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as Po}from"react";function $e(t,e){var r=Po(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=e,r.facade}import*as kt from"react";var No=typeof window<"u"?kt.useLayoutEffect:kt.useEffect,Ye=new WeakMap;function zt(t,e){var r=$e(e||null,function(o){return t.forEach(function(n){return mt(n,o)})});return No(function(){var o=Ye.get(r);if(o){var n=new Set(o),i=new Set(t),c=r.current;n.forEach(function(a){i.has(a)||mt(a,null)}),i.forEach(function(a){n.has(a)||mt(a,c)})}Ye.set(r,t)},[t]),r}function Ao(t){return t}function Oo(t,e){e===void 0&&(e=Ao);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var c=e(i,o);return r.push(c),function(){r=r.filter(function(a){return a!==c})}},assignSyncMedium:function(i){for(o=!0;r.length;){var c=r;r=[],c.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){o=!0;var c=[];if(r.length){var a=r;r=[],a.forEach(i),c=r}var l=function(){var u=c;c=[],u.forEach(i)},s=function(){return Promise.resolve().then(l)};s(),r={push:function(u){c.push(u),s()},filter:function(u){return c=c.filter(u),r}}}};return n}function Ht(t){t===void 0&&(t={});var e=Oo(null);return e.options=P({async:!0,ssr:!1},t),e}import*as Xe from"react";var qe=function(t){var e=t.sideCar,r=yt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return Xe.createElement(o,P({},r))};qe.isSideCarExport=!0;function Vt(t,e){return t.useMedium(e),qe}var Lt=Ht();var Ut=function(){},ct=W.forwardRef(function(t,e){var r=W.useRef(null),o=W.useState({onScrollCapture:Ut,onWheelCapture:Ut,onTouchMoveCapture:Ut}),n=o[0],i=o[1],c=t.forwardProps,a=t.children,l=t.className,s=t.removeScrollBar,u=t.enabled,h=t.shards,p=t.sideCar,g=t.noRelative,w=t.noIsolation,d=t.inert,f=t.allowPinchZoom,v=t.as,m=v===void 0?"div":v,C=t.gapMode,M=yt(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=p,S=zt([r,e]),x=P(P({},M),n);return W.createElement(W.Fragment,null,u&&W.createElement(R,{sideCar:Lt,removeScrollBar:s,shards:h,noRelative:g,noIsolation:w,inert:d,setCallbacks:i,allowPinchZoom:!!f,lockRef:r,gapMode:C}),c?W.cloneElement(W.Children.only(a),P(P({},x),{ref:S})):W.createElement(m,P({},x,{className:l,ref:S}),a))});ct.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ct.classNames={fullWidth:$,zeroRight:K};import*as k from"react";import*as et from"react";import*as Je from"react";var Ze;var Qe=function(){if(Ze)return Ze;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function To(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Qe();return e&&t.setAttribute("nonce",e),t}function Io(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Do(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Gt=function(){var t=0,e=null;return{add:function(r){t==0&&(e=To())&&(Io(e,r),Do(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Kt=function(){var t=Gt();return function(e,r){Je.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}};var lt=function(){var t=Kt(),e=function(r){var o=r.styles,n=r.dynamic;return t(o,n),null};return e};var _o={left:0,top:0,right:0,gap:0},$t=function(t){return parseInt(t||"",10)||0},zo=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[$t(r),$t(o),$t(n)]},Yt=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _o;var e=zo(t),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-r+e[2]-e[0])}};var Ho=lt(),tt="data-scroll-locked",Vo=function(t,e,r,o){var n=t.left,i=t.top,c=t.right,a=t.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(Dt,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(a,"px ").concat(o,`;
@@ -35,14 +35,14 @@ import{useState as Ln}from"react";import"react";import{cva as Hr}from"class-vari
35
35
  body[`).concat(tt,`] {
36
36
  `).concat(_t,": ").concat(a,`px;
37
37
  }
38
- `)},tr=function(){var t=parseInt(document.body.getAttribute(tt)||"0",10);return isFinite(t)?t:0},zo=function(){et.useEffect(function(){return document.body.setAttribute(tt,(tr()+1).toString()),function(){var t=tr()-1;t<=0?document.body.removeAttribute(tt):document.body.setAttribute(tt,t.toString())}},[])},Xt=function(t){var e=t.noRelative,r=t.noImportant,o=t.gapMode,n=o===void 0?"margin":o;zo();var i=et.useMemo(function(){return Yt(n)},[n]);return et.createElement(Do,{styles:_o(i,!e,n,r?"":"!important")})};var qt=!1;if(typeof window<"u")try{st=Object.defineProperty({},"passive",{get:function(){return qt=!0,!0}}),window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{qt=!1}var st,Y=qt?{passive:!1}:!1;var Ho=function(t){return t.tagName==="TEXTAREA"},er=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ho(t)&&r[e]==="visible")},Vo=function(t){return er(t,"overflowY")},Uo=function(t){return er(t,"overflowX")},Zt=function(t,e){var r=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=rr(t,o);if(n){var i=or(t,o),c=i[1],a=i[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Go=function(t){var e=t.scrollTop,r=t.scrollHeight,o=t.clientHeight;return[e,r,o]},Ko=function(t){var e=t.scrollLeft,r=t.scrollWidth,o=t.clientWidth;return[e,r,o]},rr=function(t,e){return t==="v"?Vo(e):Uo(e)},or=function(t,e){return t==="v"?Go(e):Ko(e)},$o=function(t,e){return t==="h"&&e==="rtl"?-1:1},nr=function(t,e,r,o,n){var i=$o(t,window.getComputedStyle(e).direction),c=i*o,a=r.target,l=e.contains(a),s=!1,u=c>0,h=0,p=0;do{if(!a)break;var g=or(t,a),w=g[0],d=g[1],f=g[2],v=d-f-i*w;(w||v)&&rr(t,a)&&(h+=v,p+=w);var k=a.parentNode;a=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(n&&Math.abs(h)<1||!n&&c>h)||!u&&(n&&Math.abs(p)<1||!n&&-c>p))&&(s=!0),s};var wt=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ir=function(t){return[t.deltaX,t.deltaY]},ar=function(t){return t&&"current"in t?t.current:t},Yo=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Xo=function(t){return`
38
+ `)},tr=function(){var t=parseInt(document.body.getAttribute(tt)||"0",10);return isFinite(t)?t:0},Uo=function(){et.useEffect(function(){return document.body.setAttribute(tt,(tr()+1).toString()),function(){var t=tr()-1;t<=0?document.body.removeAttribute(tt):document.body.setAttribute(tt,t.toString())}},[])},Xt=function(t){var e=t.noRelative,r=t.noImportant,o=t.gapMode,n=o===void 0?"margin":o;Uo();var i=et.useMemo(function(){return Yt(n)},[n]);return et.createElement(Ho,{styles:Vo(i,!e,n,r?"":"!important")})};var qt=!1;if(typeof window<"u")try{st=Object.defineProperty({},"passive",{get:function(){return qt=!0,!0}}),window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{qt=!1}var st,Y=qt?{passive:!1}:!1;var Go=function(t){return t.tagName==="TEXTAREA"},er=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Go(t)&&r[e]==="visible")},Ko=function(t){return er(t,"overflowY")},$o=function(t){return er(t,"overflowX")},Zt=function(t,e){var r=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=rr(t,o);if(n){var i=or(t,o),c=i[1],a=i[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Yo=function(t){var e=t.scrollTop,r=t.scrollHeight,o=t.clientHeight;return[e,r,o]},Xo=function(t){var e=t.scrollLeft,r=t.scrollWidth,o=t.clientWidth;return[e,r,o]},rr=function(t,e){return t==="v"?Ko(e):$o(e)},or=function(t,e){return t==="v"?Yo(e):Xo(e)},qo=function(t,e){return t==="h"&&e==="rtl"?-1:1},nr=function(t,e,r,o,n){var i=qo(t,window.getComputedStyle(e).direction),c=i*o,a=r.target,l=e.contains(a),s=!1,u=c>0,h=0,p=0;do{if(!a)break;var g=or(t,a),w=g[0],d=g[1],f=g[2],v=d-f-i*w;(w||v)&&rr(t,a)&&(h+=v,p+=w);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(n&&Math.abs(h)<1||!n&&c>h)||!u&&(n&&Math.abs(p)<1||!n&&-c>p))&&(s=!0),s};var wt=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ir=function(t){return[t.deltaX,t.deltaY]},ar=function(t){return t&&"current"in t?t.current:t},Zo=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Qo=function(t){return`
39
39
  .block-interactivity-`.concat(t,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
41
- `)},qo=0,rt=[];function cr(t){var e=m.useRef([]),r=m.useRef([0,0]),o=m.useRef(),n=m.useState(qo++)[0],i=m.useState(lt)[0],c=m.useRef(t);m.useEffect(function(){c.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var d=Ke([t.lockRef.current],(t.shards||[]).map(ar),!0).filter(Boolean);return d.forEach(function(f){return f.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),d.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(d,f){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!c.current.allowPinchZoom;var v=wt(d),k=r.current,C="deltaX"in d?d.deltaX:k[0]-v[0],M="deltaY"in d?d.deltaY:k[1]-v[1],R,S=d.target,x=Math.abs(C)>Math.abs(M)?"h":"v";if("touches"in d&&x==="h"&&S.type==="range")return!1;var H=window.getSelection(),Z=H&&H.anchorNode,nt=Z?Z===S||Z.contains(S):!1;if(nt)return!1;var ht=Zt(x,S);if(!ht)return!0;if(ht?R=x:(R=x==="v"?"h":"v",ht=Zt(x,S)),!ht)return!1;if(!o.current&&"changedTouches"in d&&(C||M)&&(o.current=R),!R)return!0;var he=o.current||R;return nr(he,f,d,he==="h"?C:M,!0)},[]),l=m.useCallback(function(d){var f=d;if(!(!rt.length||rt[rt.length-1]!==i)){var v="deltaY"in f?ir(f):wt(f),k=e.current.filter(function(R){return R.name===f.type&&(R.target===f.target||f.target===R.shadowParent)&&Yo(R.delta,v)})[0];if(k&&k.should){f.cancelable&&f.preventDefault();return}if(!k){var C=(c.current.shards||[]).map(ar).filter(Boolean).filter(function(R){return R.contains(f.target)}),M=C.length>0?a(f,C[0]):!c.current.noIsolation;M&&f.cancelable&&f.preventDefault()}}},[]),s=m.useCallback(function(d,f,v,k){var C={name:d,delta:f,target:v,should:k,shadowParent:Zo(v)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(M){return M!==C})},1)},[]),u=m.useCallback(function(d){r.current=wt(d),o.current=void 0},[]),h=m.useCallback(function(d){s(d.type,ir(d),d.target,a(d,t.lockRef.current))},[]),p=m.useCallback(function(d){s(d.type,wt(d),d.target,a(d,t.lockRef.current))},[]);m.useEffect(function(){return rt.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Y),document.addEventListener("touchmove",l,Y),document.addEventListener("touchstart",u,Y),function(){rt=rt.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,Y),document.removeEventListener("touchmove",l,Y),document.removeEventListener("touchstart",u,Y)}},[]);var g=t.removeScrollBar,w=t.inert;return m.createElement(m.Fragment,null,w?m.createElement(i,{styles:Xo(n)}):null,g?m.createElement(Xt,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Zo(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var lr=Vt(Lt,cr);var sr=Ct.forwardRef(function(t,e){return Ct.createElement(ct,P({},t,{ref:e,sideCar:lr}))});sr.classNames=ct.classNames;var Qt=sr;var Qo=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ot=new WeakMap,bt=new WeakMap,Rt={},Jt=0,dr=function(t){return t&&(t.host||dr(t.parentNode))},Jo=function(t,e){return e.map(function(r){if(t.contains(r))return r;var o=dr(r);return o&&t.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},tn=function(t,e,r,o){var n=Jo(e,Array.isArray(t)?t:[t]);Rt[r]||(Rt[r]=new WeakMap);var i=Rt[r],c=[],a=new Set,l=new Set(n),s=function(h){!h||a.has(h)||(a.add(h),s(h.parentNode))};n.forEach(s);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var g=p.getAttribute(o),w=g!==null&&g!=="false",d=(ot.get(p)||0)+1,f=(i.get(p)||0)+1;ot.set(p,d),i.set(p,f),c.push(p),d===1&&w&&bt.set(p,!0),f===1&&p.setAttribute(r,"true"),w||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(e),a.clear(),Jt++,function(){c.forEach(function(h){var p=ot.get(h)-1,g=i.get(h)-1;ot.set(h,p),i.set(h,g),p||(bt.has(h)||h.removeAttribute(o),bt.delete(h)),g||h.removeAttribute(r)}),Jt--,Jt||(ot=new WeakMap,ot=new WeakMap,bt=new WeakMap,Rt={})}},ur=function(t,e,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),n=e||Qo(t);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),tn(o,n,r,"aria-hidden")):function(){return null}};import{Fragment as hr,jsx as b,jsxs as pr}from"react/jsx-runtime";var jt="Dialog",[gr,uc]=Ce(jt),[en,D]=gr(jt),fr=t=>{let{__scopeDialog:e,children:r,open:o,defaultOpen:n,onOpenChange:i,modal:c=!0}=t,a=y.useRef(null),l=y.useRef(null),[s,u]=Re({prop:o,defaultProp:n??!1,onChange:i,caller:jt});return b(en,{scope:e,triggerRef:a,contentRef:l,contentId:pt(),titleId:pt(),descriptionId:pt(),open:s,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(h=>!h),[u]),modal:c,children:r})};fr.displayName=jt;var xr="DialogTrigger",vr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(xr,r),i=I(e,n.triggerRef);return b(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":re(n.open),...o,ref:i,onClick:_(t.onClick,n.onOpenToggle)})});vr.displayName=xr;var te="DialogPortal",[rn,yr]=gr(te,{forceMount:void 0}),kr=t=>{let{__scopeDialog:e,forceMount:r,children:o,container:n}=t,i=D(te,e);return b(rn,{scope:e,forceMount:r,children:y.Children.map(o,c=>b(at,{present:r||i.open,children:b(Tt,{asChild:!0,container:n,children:c})}))})};kr.displayName=te;var Mt="DialogOverlay",mr=y.forwardRef((t,e)=>{let r=yr(Mt,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=D(Mt,t.__scopeDialog);return i.modal?b(at,{present:o||i.open,children:b(nn,{...n,ref:e})}):null});mr.displayName=Mt;var on=ft("DialogOverlay.RemoveScroll"),nn=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(Mt,r);return b(Qt,{as:on,allowPinchZoom:!0,shards:[n.contentRef],children:b(N.div,{"data-state":re(n.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),X="DialogContent",Lr=y.forwardRef((t,e)=>{let r=yr(X,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=D(X,t.__scopeDialog);return b(at,{present:o||i.open,children:i.modal?b(an,{...n,ref:e}):b(cn,{...n,ref:e})})});Lr.displayName=X;var an=y.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=y.useRef(null),n=I(e,r.contentRef,o);return y.useEffect(()=>{let i=o.current;if(i)return ur(i)},[]),b(wr,{...t,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(t.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:_(t.onPointerDownOutside,i=>{let c=i.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&i.preventDefault()}),onFocusOutside:_(t.onFocusOutside,i=>i.preventDefault())})}),cn=y.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=y.useRef(!1),n=y.useRef(!1);return b(wr,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||r.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let c=i.target;r.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.current&&i.preventDefault()}})}),wr=y.forwardRef((t,e)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:i,...c}=t,a=D(X,r),l=y.useRef(null),s=I(e,l);return Ge(),pr(hr,{children:[b(Ot,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:i,children:b(Pt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":re(a.open),...c,ref:s,onDismiss:()=>a.onOpenChange(!1)})}),pr(hr,{children:[b(sn,{titleId:a.titleId}),b(un,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ee="DialogTitle",Cr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(ee,r);return b(N.h2,{id:n.titleId,...o,ref:e})});Cr.displayName=ee;var br="DialogDescription",Rr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(br,r);return b(N.p,{id:n.descriptionId,...o,ref:e})});Rr.displayName=br;var Mr="DialogClose",ln=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(Mr,r);return b(N.button,{type:"button",...o,ref:e,onClick:_(t.onClick,()=>n.onOpenChange(!1))})});ln.displayName=Mr;function re(t){return t?"open":"closed"}var jr="DialogTitleWarning",[hc,Fr]=we(jr,{contentName:X,titleName:ee,docsSlug:"dialog"}),sn=({titleId:t})=>{let e=Fr(jr),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},Jo=0,rt=[];function cr(t){var e=k.useRef([]),r=k.useRef([0,0]),o=k.useRef(),n=k.useState(Jo++)[0],i=k.useState(lt)[0],c=k.useRef(t);k.useEffect(function(){c.current=t},[t]),k.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var d=Ke([t.lockRef.current],(t.shards||[]).map(ar),!0).filter(Boolean);return d.forEach(function(f){return f.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),d.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var a=k.useCallback(function(d,f){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!c.current.allowPinchZoom;var v=wt(d),m=r.current,C="deltaX"in d?d.deltaX:m[0]-v[0],M="deltaY"in d?d.deltaY:m[1]-v[1],R,S=d.target,x=Math.abs(C)>Math.abs(M)?"h":"v";if("touches"in d&&x==="h"&&S.type==="range")return!1;var H=window.getSelection(),Z=H&&H.anchorNode,nt=Z?Z===S||Z.contains(S):!1;if(nt)return!1;var ht=Zt(x,S);if(!ht)return!0;if(ht?R=x:(R=x==="v"?"h":"v",ht=Zt(x,S)),!ht)return!1;if(!o.current&&"changedTouches"in d&&(C||M)&&(o.current=R),!R)return!0;var he=o.current||R;return nr(he,f,d,he==="h"?C:M,!0)},[]),l=k.useCallback(function(d){var f=d;if(!(!rt.length||rt[rt.length-1]!==i)){var v="deltaY"in f?ir(f):wt(f),m=e.current.filter(function(R){return R.name===f.type&&(R.target===f.target||f.target===R.shadowParent)&&Zo(R.delta,v)})[0];if(m&&m.should){f.cancelable&&f.preventDefault();return}if(!m){var C=(c.current.shards||[]).map(ar).filter(Boolean).filter(function(R){return R.contains(f.target)}),M=C.length>0?a(f,C[0]):!c.current.noIsolation;M&&f.cancelable&&f.preventDefault()}}},[]),s=k.useCallback(function(d,f,v,m){var C={name:d,delta:f,target:v,should:m,shadowParent:tn(v)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(M){return M!==C})},1)},[]),u=k.useCallback(function(d){r.current=wt(d),o.current=void 0},[]),h=k.useCallback(function(d){s(d.type,ir(d),d.target,a(d,t.lockRef.current))},[]),p=k.useCallback(function(d){s(d.type,wt(d),d.target,a(d,t.lockRef.current))},[]);k.useEffect(function(){return rt.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Y),document.addEventListener("touchmove",l,Y),document.addEventListener("touchstart",u,Y),function(){rt=rt.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,Y),document.removeEventListener("touchmove",l,Y),document.removeEventListener("touchstart",u,Y)}},[]);var g=t.removeScrollBar,w=t.inert;return k.createElement(k.Fragment,null,w?k.createElement(i,{styles:Qo(n)}):null,g?k.createElement(Xt,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function tn(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var lr=Vt(Lt,cr);var sr=Ct.forwardRef(function(t,e){return Ct.createElement(ct,P({},t,{ref:e,sideCar:lr}))});sr.classNames=ct.classNames;var Qt=sr;var en=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ot=new WeakMap,bt=new WeakMap,Rt={},Jt=0,dr=function(t){return t&&(t.host||dr(t.parentNode))},rn=function(t,e){return e.map(function(r){if(t.contains(r))return r;var o=dr(r);return o&&t.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},on=function(t,e,r,o){var n=rn(e,Array.isArray(t)?t:[t]);Rt[r]||(Rt[r]=new WeakMap);var i=Rt[r],c=[],a=new Set,l=new Set(n),s=function(h){!h||a.has(h)||(a.add(h),s(h.parentNode))};n.forEach(s);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var g=p.getAttribute(o),w=g!==null&&g!=="false",d=(ot.get(p)||0)+1,f=(i.get(p)||0)+1;ot.set(p,d),i.set(p,f),c.push(p),d===1&&w&&bt.set(p,!0),f===1&&p.setAttribute(r,"true"),w||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(e),a.clear(),Jt++,function(){c.forEach(function(h){var p=ot.get(h)-1,g=i.get(h)-1;ot.set(h,p),i.set(h,g),p||(bt.has(h)||h.removeAttribute(o),bt.delete(h)),g||h.removeAttribute(r)}),Jt--,Jt||(ot=new WeakMap,ot=new WeakMap,bt=new WeakMap,Rt={})}},ur=function(t,e,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),n=e||en(t);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),on(o,n,r,"aria-hidden")):function(){return null}};import{Fragment as hr,jsx as b,jsxs as pr}from"react/jsx-runtime";var jt="Dialog",[gr,xc]=Ce(jt),[nn,D]=gr(jt),fr=t=>{let{__scopeDialog:e,children:r,open:o,defaultOpen:n,onOpenChange:i,modal:c=!0}=t,a=y.useRef(null),l=y.useRef(null),[s,u]=Re({prop:o,defaultProp:n??!1,onChange:i,caller:jt});return b(nn,{scope:e,triggerRef:a,contentRef:l,contentId:pt(),titleId:pt(),descriptionId:pt(),open:s,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(h=>!h),[u]),modal:c,children:r})};fr.displayName=jt;var xr="DialogTrigger",vr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(xr,r),i=I(e,n.triggerRef);return b(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":re(n.open),...o,ref:i,onClick:_(t.onClick,n.onOpenToggle)})});vr.displayName=xr;var te="DialogPortal",[an,yr]=gr(te,{forceMount:void 0}),mr=t=>{let{__scopeDialog:e,forceMount:r,children:o,container:n}=t,i=D(te,e);return b(an,{scope:e,forceMount:r,children:y.Children.map(o,c=>b(at,{present:r||i.open,children:b(Tt,{asChild:!0,container:n,children:c})}))})};mr.displayName=te;var Mt="DialogOverlay",kr=y.forwardRef((t,e)=>{let r=yr(Mt,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=D(Mt,t.__scopeDialog);return i.modal?b(at,{present:o||i.open,children:b(ln,{...n,ref:e})}):null});kr.displayName=Mt;var cn=ft("DialogOverlay.RemoveScroll"),ln=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(Mt,r);return b(Qt,{as:cn,allowPinchZoom:!0,shards:[n.contentRef],children:b(N.div,{"data-state":re(n.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),X="DialogContent",Lr=y.forwardRef((t,e)=>{let r=yr(X,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=D(X,t.__scopeDialog);return b(at,{present:o||i.open,children:i.modal?b(sn,{...n,ref:e}):b(dn,{...n,ref:e})})});Lr.displayName=X;var sn=y.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=y.useRef(null),n=I(e,r.contentRef,o);return y.useEffect(()=>{let i=o.current;if(i)return ur(i)},[]),b(wr,{...t,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(t.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:_(t.onPointerDownOutside,i=>{let c=i.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&i.preventDefault()}),onFocusOutside:_(t.onFocusOutside,i=>i.preventDefault())})}),dn=y.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=y.useRef(!1),n=y.useRef(!1);return b(wr,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||r.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let c=i.target;r.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.current&&i.preventDefault()}})}),wr=y.forwardRef((t,e)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:i,...c}=t,a=D(X,r),l=y.useRef(null),s=I(e,l);return Ge(),pr(hr,{children:[b(Ot,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:i,children:b(Pt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":re(a.open),...c,ref:s,onDismiss:()=>a.onOpenChange(!1)})}),pr(hr,{children:[b(hn,{titleId:a.titleId}),b(gn,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ee="DialogTitle",Cr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(ee,r);return b(N.h2,{id:n.titleId,...o,ref:e})});Cr.displayName=ee;var br="DialogDescription",Rr=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(br,r);return b(N.p,{id:n.descriptionId,...o,ref:e})});Rr.displayName=br;var Mr="DialogClose",un=y.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=D(Mr,r);return b(N.button,{type:"button",...o,ref:e,onClick:_(t.onClick,()=>n.onOpenChange(!1))})});un.displayName=Mr;function re(t){return t?"open":"closed"}var jr="DialogTitleWarning",[vc,Fr]=we(jr,{contentName:X,titleName:ee,docsSlug:"dialog"}),hn=({titleId:t})=>{let e=Fr(jr),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},dn="DialogDescriptionWarning",un=({contentRef:t,descriptionId:e})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fr(dn).contentName}}.`;return y.useEffect(()=>{let n=t.current?.getAttribute("aria-describedby");e&&n&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Sr=fr,Br=vr,Wr=kr,oe=mr,ne=Lr,ie=Cr,ae=Rr;import{cva as pn}from"class-variance-authority";import{jsx as q,jsxs as mn}from"react/jsx-runtime";var Er=Sr,Pr=Br;var gn=Wr,Nr=dt.forwardRef(({className:t,...e},r)=>q(oe,{className:B("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:r}));Nr.displayName=oe.displayName;var fn=pn("fixed z-50 gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ce=dt.forwardRef(({side:t="right",className:e,children:r,...o},n)=>mn(gn,{children:[q(Nr,{}),q(ne,{ref:n,className:B(fn({side:t}),e),...o,children:r})]}));ce.displayName=ne.displayName;var xn=({className:t,...e})=>q("div",{className:B("flex flex-col space-y-2 text-center sm:text-left",t),...e});xn.displayName="SheetHeader";var vn=({className:t,...e})=>q("div",{className:B("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});vn.displayName="SheetFooter";var yn=dt.forwardRef(({className:t,...e},r)=>q(ie,{ref:r,className:B("text-lg font-semibold text-foreground",t),...e}));yn.displayName=ie.displayName;var kn=dt.forwardRef(({className:t,...e},r)=>q(ae,{ref:r,className:B("text-sm text-muted-foreground",t),...e}));kn.displayName=ae.displayName;import{Menu as wn,X as Cn}from"lucide-react";import{jsx as F,jsxs as le}from"react/jsx-runtime";function bn({navItems:t=[],logoHref:e="/",onLogoClick:r=()=>{},logo:o,secondaryLogo:n}){let[i,c]=Ln(!1);return F("header",{className:"sticky top-0 z-60 w-full border-b border-border/20 bg-background/95 backdrop-blur supports-backdrop-filter:bg-background/60 pointer-events-auto uppercase",style:{pointerEvents:"auto"},children:le("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[le("a",{href:e,className:"flex items-center gap-1 cursor-pointer group",onClick:()=>{r(),c(!1)},children:[F("h1",{className:"font-ddin text-1xl md:text-2xl tracking-tight",children:o}),n&&F("span",{className:"font-ddin text-1xl md:text-2xl tracking-tight text-muted-foreground",children:n})]}),F("div",{className:"hidden md:flex items-center gap-6",children:F(()=>F(pe,{children:F(ge,{className:"gap-2 md:gap-6",children:t.map((l,s)=>F(fe,{children:F(ve,{className:xe(),href:l.href,onClick:l.onClick,children:typeof l.label=="string"?F("span",{className:"font-ddin text-1xl",children:l.label}):l.label})},l.href||(typeof l.label=="string"?l.label:s)))})}),{})}),le(Er,{open:i,onOpenChange:c,children:[F(Pr,{asChild:!0,className:"md:hidden",children:F(ye,{variant:"ghost",size:"icon","aria-label":"Toggle menu",children:i?F(Cn,{className:"h-6 w-6"}):F(wn,{className:"h-6 w-6"})})}),F(ce,{side:"right",className:"w-100 border-l border-border/30 mt-16",children:F("div",{className:"flex min-h-[calc(100vh-5rem)] flex-col justify-center px-8 py-12 bg-background",children:F("nav",{className:"flex flex-col gap-12 md:gap-16",children:t.map((l,s)=>F("a",{href:l.href,onClick:()=>{l.onClick&&l.onClick(),c(!1)},className:`
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},pn="DialogDescriptionWarning",gn=({contentRef:t,descriptionId:e})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fr(pn).contentName}}.`;return y.useEffect(()=>{let n=t.current?.getAttribute("aria-describedby");e&&n&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Br=fr,Sr=vr,Wr=mr,oe=kr,ne=Lr,ie=Cr,ae=Rr;import{cva as xn}from"class-variance-authority";import{jsx as q,jsxs as Cn}from"react/jsx-runtime";var Er=Br,Pr=Sr;var vn=Wr,Nr=dt.forwardRef(({className:t,...e},r)=>q(oe,{className:B("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:r}));Nr.displayName=oe.displayName;var yn=xn("fixed z-50 gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ce=dt.forwardRef(({side:t="right",className:e,children:r,...o},n)=>Cn(vn,{children:[q(Nr,{}),q(ne,{ref:n,className:B(yn({side:t}),e),...o,children:r})]}));ce.displayName=ne.displayName;var mn=({className:t,...e})=>q("div",{className:B("flex flex-col space-y-2 text-center sm:text-left",t),...e});mn.displayName="SheetHeader";var kn=({className:t,...e})=>q("div",{className:B("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});kn.displayName="SheetFooter";var Ln=dt.forwardRef(({className:t,...e},r)=>q(ie,{ref:r,className:B("text-lg font-semibold text-foreground",t),...e}));Ln.displayName=ie.displayName;var wn=dt.forwardRef(({className:t,...e},r)=>q(ae,{ref:r,className:B("text-sm text-muted-foreground",t),...e}));wn.displayName=ae.displayName;import{Menu as Rn,X as Mn}from"lucide-react";import{jsx as F,jsxs as le}from"react/jsx-runtime";function jn({navItems:t=[],logoHref:e="/",onLogoClick:r=()=>{},logo:o,secondaryLogo:n}){let[i,c]=bn(!1);return F("header",{className:"sticky top-0 z-60 w-full border-b border-border/20 bg-background/95 backdrop-blur supports-backdrop-filter:bg-background/60 pointer-events-auto uppercase",style:{pointerEvents:"auto"},children:le("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[le("a",{href:e,className:"flex items-center gap-1 cursor-pointer group",onClick:()=>{r(),c(!1)},children:[F("h1",{className:"font-ddin text-1xl md:text-2xl tracking-tight",children:o}),n&&F("span",{className:"font-ddin text-1xl md:text-2xl tracking-tight text-muted-foreground",children:n})]}),F("div",{className:"hidden md:flex items-center gap-6",children:F(()=>F(pe,{children:F(ge,{className:"gap-2 md:gap-6",children:t.map((l,s)=>F(fe,{children:F(ve,{className:B(xe(),typeof l.label!="string"&&"h-12 w-12 p-0 bg-transparent hover:bg-muted/50 flex items-center justify-center rounded-full"),href:l.href,onClick:l.onClick,children:typeof l.label=="string"?F("span",{className:"font-ddin text-1xl",children:l.label}):l.label})},l.href||(typeof l.label=="string"?l.label:s)))})}),{})}),le(Er,{open:i,onOpenChange:c,children:[F(Pr,{asChild:!0,className:"md:hidden",children:F(ye,{variant:"ghost",size:"icon","aria-label":"Toggle menu",children:i?F(Mn,{className:"h-6 w-6"}):F(Rn,{className:"h-6 w-6"})})}),F(ce,{side:"right",className:"w-100 border-l border-border/30 mt-16",children:F("div",{className:"flex min-h-[calc(100vh-5rem)] flex-col justify-center px-8 py-12 bg-background",children:F("nav",{className:"flex flex-col gap-12 md:gap-16",children:t.map((l,s)=>F("a",{href:l.href,onClick:()=>{l.onClick&&l.onClick(),c(!1)},className:`
46
46
  w-full text-left
47
47
  text-3xl md:text-4xl
48
48
  font-ddin font-medium tracking-wider
@@ -51,5 +51,5 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
51
51
  py-4 px-4 rounded-lg
52
52
  hover:bg-muted/30 focus:outline-none focus:ring-2 focus:ring-ring
53
53
  block
54
- `,children:typeof l.label=="string"?F("span",{className:"font-ddin",children:l.label}):l.label},l.href||(typeof l.label=="string"?l.label:s)))})})})]})]})})}import ut from"react";import Ar from"react";var se={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},de=Ar.createContext&&Ar.createContext(se);var Rn=["attr","size","title"];function Mn(t,e){if(t==null)return{};var r,o,n=jn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jn(t,e){if(t==null)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)!==-1)continue;r[o]=t[o]}return r}function Ft(){return Ft=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ft.apply(null,arguments)}function Or(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function St(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Or(Object(r),!0).forEach(function(o){Fn(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Or(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Fn(t,e,r){return(e=Sn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sn(t){var e=Bn(t,"string");return typeof e=="symbol"?e:e+""}function Bn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tr(t){return t&&t.map((e,r)=>ut.createElement(e.tag,St({key:r},e.attr),Tr(e.child)))}function Ir(t){return e=>ut.createElement(Wn,Ft({attr:St({},t.attr)},e),Tr(t.child))}function Wn(t){var e=r=>{var{attr:o,size:n,title:i}=t,c=Mn(t,Rn),a=n||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),ut.createElement("svg",Ft({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,c,{className:l,style:St(St({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&ut.createElement("title",null,i),t.children)};return de!==void 0?ut.createElement(de.Consumer,null,r=>e(r)):e(se)}function Dr(t){return Ir({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(t)}import{jsx as z,jsxs as ue}from"react/jsx-runtime";function En({links:t=[],socials:e=[],copyright:r,...o}){return z("footer",{className:"bg-background pt-12 pb-8 w-full font-ddin uppercase text-[10px] sm:text-xs",...o,children:z("div",{className:"container mx-auto px-6 max-w-[1400px]",children:ue("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6 md:gap-4 text-muted-foreground",children:[z("div",{className:"flex items-center gap-6 order-3 md:order-1",children:e.map(n=>{let i=n.icon;return z("a",{href:n.href,className:"hover:text-foreground transition-colors",target:"_blank",rel:"noopener noreferrer","aria-label":n.label??"Social link",children:z(i,{className:"w-4 h-4"})},n.href)})}),z("ul",{className:"flex flex-wrap justify-center items-center gap-6 md:gap-10 order-1 md:order-2 font-medium tracking-widest text-foreground",children:t.map(n=>z("li",{children:ue("a",{href:n.href,onClick:n.onClick,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 hover:text-muted-foreground transition-colors",children:[z("span",{children:n.label}),n.isExternal&&z(Dr,{className:"inline-block h-3.5 w-3.5 text-muted-foreground/60","aria-hidden":"true"})]})},n.href))}),r&&z("div",{className:"order-2 md:order-3 font-medium tracking-widest whitespace-nowrap",children:ue("a",{href:r?.companyUrl,target:"_blank",rel:"noopener noreferrer",className:"focus-visible:underline outline-none",children:["\xA9 ",new Date().getFullYear()," ",r?.companyName]})})]})})})}import{jsx as Nn,jsxs as An}from"react/jsx-runtime";function Pn({header:t,footer:e,children:r}){return An("div",{className:"min-h-screen bg-background text-foreground font-ddin flex flex-col",children:[t,Nn("div",{className:"flex-1",children:r}),e]})}export{En as Footer,bn as Header,Pn as Layout};
54
+ `,children:typeof l.label=="string"?F("span",{className:"font-ddin",children:l.label}):l.label},l.href||(typeof l.label=="string"?l.label:s)))})})})]})]})})}import ut from"react";import Ar from"react";var se={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},de=Ar.createContext&&Ar.createContext(se);var Fn=["attr","size","title"];function Bn(t,e){if(t==null)return{};var r,o,n=Sn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Sn(t,e){if(t==null)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)!==-1)continue;r[o]=t[o]}return r}function Ft(){return Ft=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ft.apply(null,arguments)}function Or(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function Bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Or(Object(r),!0).forEach(function(o){Wn(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Or(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Wn(t,e,r){return(e=En(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function En(t){var e=Pn(t,"string");return typeof e=="symbol"?e:e+""}function Pn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tr(t){return t&&t.map((e,r)=>ut.createElement(e.tag,Bt({key:r},e.attr),Tr(e.child)))}function Ir(t){return e=>ut.createElement(Nn,Ft({attr:Bt({},t.attr)},e),Tr(t.child))}function Nn(t){var e=r=>{var{attr:o,size:n,title:i}=t,c=Bn(t,Fn),a=n||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),ut.createElement("svg",Ft({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,c,{className:l,style:Bt(Bt({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&ut.createElement("title",null,i),t.children)};return de!==void 0?ut.createElement(de.Consumer,null,r=>e(r)):e(se)}function Dr(t){return Ir({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(t)}import{jsx as z,jsxs as ue}from"react/jsx-runtime";function An({links:t=[],socials:e=[],copyright:r,...o}){return z("footer",{className:"bg-background pt-12 pb-8 w-full font-ddin uppercase text-[10px] sm:text-xs",...o,children:z("div",{className:"container mx-auto px-6 max-w-[1400px]",children:ue("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6 md:gap-4 text-muted-foreground",children:[z("div",{className:"flex items-center gap-6 order-3 md:order-1",children:e.map(n=>{let i=n.icon;return z("a",{href:n.href,className:"hover:text-foreground transition-colors",target:"_blank",rel:"noopener noreferrer","aria-label":n.label??"Social link",children:z(i,{className:"w-4 h-4"})},n.href)})}),z("ul",{className:"flex flex-wrap justify-center items-center gap-6 md:gap-10 order-1 md:order-2 font-medium tracking-widest text-foreground",children:t.map(n=>z("li",{children:ue("a",{href:n.href,onClick:n.onClick,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 hover:text-muted-foreground transition-colors",children:[z("span",{children:n.label}),n.isExternal&&z(Dr,{className:"inline-block h-3.5 w-3.5 text-muted-foreground/60","aria-hidden":"true"})]})},n.href))}),r&&z("div",{className:"order-2 md:order-3 font-medium tracking-widest whitespace-nowrap",children:ue("a",{href:r?.companyUrl,target:"_blank",rel:"noopener noreferrer",className:"focus-visible:underline outline-none",children:["\xA9 ",new Date().getFullYear()," ",r?.companyName]})})]})})})}import{jsx as Tn,jsxs as In}from"react/jsx-runtime";function On({header:t,footer:e,children:r}){return In("div",{className:"min-h-screen bg-background text-foreground font-ddin flex flex-col",children:[t,Tn("div",{className:"flex-1",children:r}),e]})}import*as zr from"react";import{ShoppingCart as Dn}from"lucide-react";import{jsx as _r,jsxs as _n}from"react/jsx-runtime";var Hr=zr.forwardRef(({variant:t="none",itemCount:e=0,children:r,...o},n)=>_n("button",{ref:n,className:"relative flex items-center justify-center rounded-full transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-muted/50 active:scale-95 h-12 w-12 p-0 bg-transparent",...o,children:[t==="cart"?_r(Dn,{className:"text-foreground h-7 w-7"}):r,e>0&&_r("span",{className:"absolute -top-1.5 -right-1.5 flex items-center justify-center rounded-full bg-primary text-primary-foreground text-[10px] font-bold px-1.5 py-0.5 min-w-[18px] h-[18px] shadow-sm animate-in zoom-in duration-300",children:e>99?"99+":e})]}));Hr.displayName="IconWithBadge";export{An as Footer,jn as Header,Hr as IconWithBadge,On as Layout};
55
55
  //# sourceMappingURL=index.js.map