@engrate/components 0.1.26 → 0.1.28
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.cjs.js
CHANGED
|
@@ -105,4 +105,4 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
|
|
|
105
105
|
${x}px !important;
|
|
106
106
|
${w}px !important;
|
|
107
107
|
}
|
|
108
|
-
`),()=>{P.contains(S)&&P.removeChild(S)}},[t]),b.jsx(_he,{isPresent:t,childRef:s,sizeRef:l,pop:i,children:i===!1?e:p.cloneElement(e,{ref:d})})}const jhe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=vb(Ihe),d=O.useId();let f=!0,h=O.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:r,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;n&&n()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[r,u,n]);return i&&f&&(h={...h}),O.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=b.jsx(Nhe,{pop:a==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),b.jsx(Vd.Provider,{value:h,children:e})};function Ihe(){return new Map}function yL(e=!0){const t=O.useContext(Vd);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=O.useId();O.useEffect(()=>{if(e)return o(i)},[e]);const a=O.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const $l=e=>e.key||"";function gO(e){const t=[];return O.Children.forEach(e,r=>{O.isValidElement(r)&&t.push(r)}),t}const Rhe=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=yL(a),f=O.useMemo(()=>gO(e),[e]),h=a&&!u?[]:f.map($l),v=O.useRef(!0),m=O.useRef(f),g=vb(()=>new Map),y=O.useRef(new Set),[x,w]=O.useState(f),[S,P]=O.useState(f);YR(()=>{v.current=!1,m.current=f;for(let A=0;A<S.length;A++){const T=$l(S[A]);h.includes(T)?(g.delete(T),y.current.delete(T)):g.get(T)!==!0&&g.set(T,!1)}},[S,h.length,h.join("-")]);const C=[];if(f!==x){let A=[...f];for(let T=0;T<S.length;T++){const M=S[T],_=$l(M);h.includes(_)||(A.splice(T,0,M),C.push(M))}return i==="wait"&&C.length&&(A=C),P(gO(A)),w(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=O.useContext(mb);return b.jsx(b.Fragment,{children:S.map(A=>{const T=$l(A),M=a&&!u?!1:f===S||h.includes(T),_=()=>{if(y.current.has(T))return;if(y.current.add(T),g.has(T))g.set(T,!0);else return;let k=!0;g.forEach(N=>{N||(k=!1)}),k&&(E?.(),P(m.current),a&&d?.(),n&&n())};return b.jsx(jhe,{isPresent:M,initial:!v.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:M?void 0:_,anchorX:s,anchorY:l,children:A},T)})})},bL=O.createContext({strict:!1}),yO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bO=!1;function Lhe(){if(bO)return;const e={};for(const t in yO)e[t]={isEnabled:r=>yO[t].some(n=>!!r[n])};Y2(e),bO=!0}function xL(){return Lhe(),Spe()}function $he(e){const t=xL();for(const r in e)t[r]={...t[r],...e[r]};Y2(t)}const Vhe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vhe.has(e)}let wL=e=>!gu(e);function Fhe(e){typeof e=="function"&&(wL=t=>t.startsWith("on")?!gu(t):e(t))}try{Fhe(require("@emotion/is-prop-valid").default)}catch{}function Bhe(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(wL(o)||r===!0&&gu(o)||!t&&!gu(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}const Wd=O.createContext({});function Whe(e,t){if(Bd(e)){const{initial:r,animate:n}=e;return{initial:r===!1||ts(r)?r:void 0,animate:ts(n)?n:void 0}}return e.inherit!==!1?t:{}}function zhe(e){const{initial:t,animate:r}=Whe(e,O.useContext(Wd));return O.useMemo(()=>({initial:t,animate:r}),[xO(t),xO(r)])}function xO(e){return Array.isArray(e)?e.join(" "):e}const Ub=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SL(e,t,r){for(const n in t)!Ct(t[n])&&!tL(n,r)&&(e[n]=t[n])}function Khe({transformTemplate:e},t){return O.useMemo(()=>{const r=Ub();return Wb(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Uhe(e,t){const r=e.style||{},n={};return SL(n,r,e),Object.assign(n,Khe(e,t)),n}function Hhe(e,t){const r={},n=Uhe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const PL=()=>({...Ub(),attrs:{}});function Ghe(e,t,r,n){const o=O.useMemo(()=>{const i=PL();return rL(i,t,oL(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};SL(i,e.style,e),o.style={...i,...o.style}}return o}const Yhe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Hb(e){return typeof e!="string"||e.includes("-")?!1:!!(Yhe.indexOf(e)>-1||/[A-Z]/u.test(e))}function qhe(e,t,r,{latestValues:n},o,i=!1,a){const l=(a??Hb(e)?Ghe:Hhe)(t,n,o,e),c=Bhe(t,typeof e=="string",i),u=e!==O.Fragment?{...c,...l,ref:r}:{},{children:d}=t,f=O.useMemo(()=>Ct(d)?d.get():d,[d]);return O.createElement(e,{...u,children:f})}function Xhe({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Zhe(r,n,o,e),renderState:t()}}function Zhe(e,t,r,n){const o={},i=n(e,{});for(const f in i)o[f]=tc(i[f]);let{initial:a,animate:s}=e;const l=Bd(e),c=H2(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Fd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const v=jb(e,f[h]);if(v){const{transitionEnd:m,transition:g,...y}=v;for(const x in y){let w=y[x];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[x]=w)}for(const x in m)o[x]=m[x]}}}return o}const CL=e=>(t,r)=>{const n=O.useContext(Wd),o=O.useContext(Vd),i=()=>Xhe(e,t,n,o);return r?i():vb(i)},Qhe=CL({scrapeMotionValuesFromProps:zb,createRenderState:Ub}),Jhe=CL({scrapeMotionValuesFromProps:iL,createRenderState:PL}),eme=Symbol.for("motionComponentSymbol");function tme(e,t,r){const n=O.useRef(r);O.useInsertionEffect(()=>{n.current=r});const o=O.useRef(null);return O.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=n.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const OL=O.createContext({});function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rme(e,t,r,n,o,i){const{visualElement:a}=O.useContext(Wd),s=O.useContext(bL),l=O.useContext(Vd),c=O.useContext(Kb),u=c.reducedMotion,d=c.skipAnimations,f=O.useRef(null),h=O.useRef(!1);n=n||s.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,m=O.useContext(OL);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&nme(f.current,r,o,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{v&&g.current&&v.update(r,l)});const y=r[N2],x=O.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return YR(()=>{h.current=!0,v&&(g.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),O.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),v.enteringChildren=void 0)}),v}function nme(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:EL(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&li(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function EL(e){if(e)return e.options.allowProjection!==!1?e.projection:EL(e.parent)}function fh(e,{forwardMotionProps:t=!1,type:r}={},n,o){n&&$he(n);const i=r?r==="svg":Hb(e),a=i?Jhe:Qhe;function s(c,u){let d;const f={...O.useContext(Kb),...c,layoutId:ome(c)},{isStatic:h}=f,v=zhe(c),m=a(c,h);if(!h&&GR){ime(f,n);const g=ame(f);d=g.MeasureLayout,v.visualElement=rme(e,m,f,o,g.ProjectionNode,i)}return b.jsxs(Wd.Provider,{value:v,children:[d&&v.visualElement?b.jsx(d,{visualElement:v.visualElement,...f}):null,qhe(e,c,tme(m,v.visualElement,u),m,h,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=O.forwardRef(s);return l[eme]=e,l}function ome({layoutId:e}){const t=O.useContext(mb).id;return t&&e!==void 0?t+"-"+e:e}function ime(e,t){const r=O.useContext(bL).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ji(!1,n,"lazy-strict-mode"):hn(!1,n,"lazy-strict-mode")}}function ame(e){const t=xL(),{drag:r,layout:n}=t;if(!r&&!n)return{};const o={...r,...n};return{MeasureLayout:r?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sme(e,t){if(typeof Proxy>"u")return fh;const r=new Map,n=(i,a)=>fh(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&xb(!1,"motion() is deprecated. Use motion.create() instead."),n(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,fh(a,void 0,e,t)),r.get(a))})}const lme=(e,t)=>t.isSVG??Hb(e)?new Vpe(t):new Npe(t,{allowProjection:e!==O.Fragment});class cme extends eo{constructor(t){super(t),t.animationState||(t.animationState=Kpe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ume=0;class dme extends eo{constructor(){super(...arguments),this.id=ume++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const fme={animation:{Feature:cme},exit:{Feature:dme}};function Xs(e){return{point:{x:e.pageX,y:e.pageY}}}const pme=e=>t=>$b(t)&&e(t,Xs(t));function ka(e,t,r,n){return rs(e,t,pme(r),n)}const AL=({current:e})=>e?e.ownerDocument.defaultView:null,wO=(e,t)=>Math.abs(e-t);function hme(e,t){const r=wO(e.x,t.x),n=wO(e.y,t.y);return Math.sqrt(r**2+n**2)}const SO=new Set(["auto","scroll"]);class TL{constructor(t,r,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=hh(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=hme(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:g}=h,{timestamp:y}=yt;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;v||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ph(v,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=hh(h.type==="pointercancel"?this.lastMoveEventInfo:ph(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),g&&g(h,x)},!$b(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=o||window;const l=Xs(t),c=ph(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=r;f&&f(t,hh(c,this.history)),this.removeListeners=Gs(ka(this.contextWindow,"pointermove",this.handlePointerMove),ka(this.contextWindow,"pointerup",this.handlePointerUp),ka(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(SO.has(n.overflowX)||SO.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-r.x,y:o.y-r.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),_e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kn(this.updatePoint)}}function ph(e,t){return t?{point:t(e.point)}:e}function PO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hh({point:e},t){return{point:e,delta:PO(e,ML(t)),offset:PO(e,mme(t)),velocity:vme(t,.1)}}function mme(e){return e[0]}function ML(e){return e[e.length-1]}function vme(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ML(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>cr(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&o.timestamp-n.timestamp>cr(t)*2&&(n=e[1]);const i=ar(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gme(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Be(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Be(r,e,n.max):Math.min(e,r)),e}function CO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function yme(e,{top:t,left:r,bottom:n,right:o}){return{x:CO(e.x,r,o),y:CO(e.y,t,n)}}function OO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function bme(e,t){return{x:OO(e.x,t.x),y:OO(e.y,t.y)}}function xme(e,t){let r=.5;const n=jt(e),o=jt(t);return o>n?r=Qa(t.min,t.max-n,e.min):n>o&&(r=Qa(e.min,e.max-o,t.min)),Ur(0,1,r)}function wme(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const ev=.35;function Sme(e=ev){return e===!1?e=0:e===!0&&(e=ev),{x:EO(e,"left","right"),y:EO(e,"top","bottom")}}function EO(e,t,r){return{min:AO(e,t),max:AO(e,r)}}function AO(e,t){return typeof e=="number"?e:e[t]||0}const Pme=new WeakMap;class Cme{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{r&&this.snapToCursor(Xs(d).point),this.stopAnimation()},a=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Qfe(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Vr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=jt(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&_e.update(()=>m(d,f),!1,!0),Hm(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=Eme(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&_e.update(()=>g(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new TL(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:AL(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,o=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!n)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(n,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!Vl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=gme(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&li(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yme(n.layoutBox,t):this.constraints=!1,this.elastic=Sme(r),o!==this.constraints&&!li(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&kr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wme(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!li(t))return!1;const n=t.current;hn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Ape(n,o.root,this.visualElement.getTransformPagePoint());let a=bme(o.layout.layoutBox,i);if(r){const s=r(Cpe(a));this.hasMutatedConstraints=!!s,s&&(a=X2(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=kr(u=>{if(!Vl(u,r,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Hm(this.visualElement,t),n.start(Nb(t,n,0,r,this.visualElement,!1))}stopAnimation(){kr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){kr(r=>{const{drag:n}=this.getProps();if(!Vl(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[r],l=i.get()||0;i.set(t[r]-Be(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!li(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};kr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=xme({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),kr(a=>{if(!Vl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(Be(l,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Pme.set(this.visualElement,this);const t=this.visualElement.current,r=ka(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&ope(f);u&&d&&!h&&this.start(c)});let n;const o=()=>{const{dragConstraints:c}=this.getProps();li(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Ome(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_e.read(o);const s=rs(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(kr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),r(),a(),l&&l(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=ev,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function TO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ome(e,t,r){const n=I1(e,TO(r)),o=I1(t,TO(r));return()=>{n(),o()}}function Vl(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Eme(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Ame extends eo{constructor(t){super(t),this.removeGroupControls=lr,this.removeListeners=lr,this.controls=new Cme(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const mh=e=>(t,r)=>{e&&_e.update(()=>e(t,r),!1,!0)};class Tme extends eo{constructor(){super(...arguments),this.removePointerDownListener=lr}onPointerDown(t){this.session=new TL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:mh(t),onStart:mh(r),onMove:mh(n),onEnd:(i,a)=>{delete this.session,o&&_e.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ka(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vh=!1;class Mme extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),vh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,t.layoutDependency!==r&&a.setOptions({...a.options,layoutDependency:r}),vh=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||_e.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;vh=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kL(e){const[t,r]=yL(),n=O.useContext(mb);return b.jsx(Mme,{...e,layoutGroup:n,switchLayoutGroup:O.useContext(OL),isPresent:t,safeToRemove:r})}const kme={pan:{Feature:Tme},drag:{Feature:Ame,ProjectionNode:gL,MeasureLayout:kL}};function MO(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Dme extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=epe(t,(r,n)=>(MO(this.node,n,"Start"),o=>MO(this.node,o,"End"))))}unmount(){}}class _me extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gs(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kO(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Nme extends eo{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ape(t,(o,i)=>(kO(this.node,i,"Start"),(a,{success:s})=>kO(this.node,a,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:n?.tap===!1})}unmount(){}}const tv=new WeakMap,gh=new WeakMap,jme=e=>{const t=tv.get(e.target);t&&t(e)},Ime=e=>{e.forEach(jme)};function Rme({root:e,...t}){const r=e||document;gh.has(r)||gh.set(r,{});const n=gh.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Ime,{root:e,...t})),n[o]}function Lme(e,t,r){const n=Rme(t);return tv.set(e,r),n.observe(e),()=>{tv.delete(e),n.unobserve(e)}}const $me={some:0,all:1};class Vme extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:$me[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lme(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Fme(t,r))&&this.startObserver()}unmount(){}}function Fme({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Bme={inView:{Feature:Vme},tap:{Feature:Nme},focus:{Feature:_me},hover:{Feature:Dme}},Wme={layout:{ProjectionNode:gL,MeasureLayout:kL}},zme={...fme,...Bme,...kme,...Wme},DL=sme(zme,lme),_L=te("font-sans",{variants:{variant:{lead:"text-lead text-primary","semi-lead":"text-semi-lead text-secondary","body-lg":"text-body-lg text-secondary",body:"text-body text-secondary","body-sm":"text-body-sm text-secondary",descriptive:"text-descriptive text-secondary",label:"text-label text-tertiary","label-sm":"text-label-sm text-tertiary"},weight:{regular:"font-normal",medium:"font-medium"}},defaultVariants:{variant:"body",weight:"regular"}}),qo=p.forwardRef(({className:e,variant:t="body",weight:r="regular",as:n="p",asChild:o=!1,...i},a)=>{const s=o?Ie:n;return b.jsx(s,{className:D(_L({variant:t,weight:r,className:e})),ref:a,...i})});qo.displayName="Text";const NL=p.createContext(!1),jL=({open:e,defaultOpen:t=!1,onOpenChange:r,children:n,...o})=>{const[i,a]=p.useState(t),s=e!==void 0,l=s?e:i,c=p.useCallback(u=>{s||a(u),r?.(u)},[s,r]);return b.jsx(NL.Provider,{value:l,children:b.jsx(JE,{open:l,onOpenChange:c,...o,children:n})})};jL.displayName="Modal";const Kme=eA,IL=tA,Ume=Au,Gb=p.forwardRef(({className:e,...t},r)=>b.jsx(rA,{ref:r,forceMount:!0,asChild:!0,...t,children:b.jsx(DL.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.2},className:D("fixed inset-0 z-50 bg-black/20",e)})}));Gb.displayName="ModalOverlay";const RL=te(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-8 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),LL=p.forwardRef(({className:e,children:t,size:r,showCloseButton:n=!0,...o},i)=>{const a=p.useContext(NL);return b.jsx(Rhe,{children:a&&b.jsxs(IL,{forceMount:!0,children:[b.jsx(Gb,{}),b.jsx(nA,{ref:i,forceMount:!0,asChild:!0,...o,children:b.jsxs(DL.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:D(RL({size:r}),e),children:[t,n&&b.jsx(Au,{asChild:!0,children:b.jsxs(kv,{variant:"ghost",size:"icon",className:"absolute top-6 right-6",children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})]})})});LL.displayName="ModalContent";const $L=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));$L.displayName="ModalHeader";const VL=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));VL.displayName="ModalFooter";const FL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(oA,{ref:n,asChild:!0,...r,children:b.jsx(hb,{level:"h3",className:e,children:t})}));FL.displayName="ModalTitle";const BL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iA,{ref:n,asChild:!0,...r,children:b.jsx(qo,{variant:"semi-lead",className:e,children:t})}));BL.displayName="ModalDescription";const WL=te("flex items-center justify-center gap-1 font-sans",{variants:{size:{sm:"text-small",default:"text-body",lg:"text-lead"}},defaultVariants:{size:"default"}}),zL=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-primary hover:bg-alt active:bg-contrast rounded-full",active:"bg-sunflower text-primary hover:bg-sunflower-hover rounded-full",ellipsis:"text-tertiary cursor-default"},size:{sm:"text-small h-7 w-7",default:"text-small h-9 w-9",lg:"text-body h-11 w-11"}},defaultVariants:{variant:"default",size:"default"}}),KL=p.forwardRef(({className:e,size:t,page:r,totalPages:n,onPageChange:o,siblingCount:i=1,...a},s)=>{const l=p.useMemo(()=>{const d=i*2+3+2;if(n<=d)return Array.from({length:n},(g,y)=>y+1);const f=Math.max(r-i,1),h=Math.min(r+i,n),v=f>2,m=h<n-1;if(!v&&m){const g=3+2*i;return[...Array.from({length:g},(x,w)=>w+1),"ellipsis-right",n]}if(v&&!m){const g=3+2*i;return[1,"ellipsis-left",...Array.from({length:g},(x,w)=>n-g+w+1)]}return v&&m?[1,"ellipsis-left",...Array.from({length:i*2+1},(y,x)=>f+x),"ellipsis-right",n]:Array.from({length:n},(g,y)=>y+1)},[r,n,i]),c=u=>{u>=1&&u<=n&&u!==r&&o?.(u)};return b.jsxs("nav",{ref:s,role:"navigation","aria-label":"Pagination",className:D(WL({size:t,className:e})),...a,children:[b.jsx(gi,{size:t,onClick:()=>c(r-1),disabled:r===1,"aria-label":"Go to previous page",children:b.jsx(Cv,{className:"h-4 w-4"})}),l.map(u=>typeof u=="string"?b.jsx(gi,{size:t,variant:"ellipsis",disabled:!0,"aria-hidden":!0,children:b.jsx(nE,{className:"h-4 w-4"})},u):b.jsx(gi,{size:t,variant:u===r?"active":"default",onClick:()=>c(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u)),b.jsx(gi,{size:t,onClick:()=>c(r+1),disabled:r===n,"aria-label":"Go to next page",children:b.jsx(Ov,{className:"h-4 w-4"})})]})});KL.displayName="Pagination";const gi=p.forwardRef(({className:e,variant:t,size:r,...n},o)=>b.jsx("button",{ref:o,type:"button",className:D(zL({variant:t,size:r,className:e})),...n}));gi.displayName="PaginationItem";const UL=p.createContext(null);function Hme(){const e=p.useContext(UL);if(!e)throw new Error("PaginationDot must be used within a PaginationDots component");return e}const HL=te("inline-flex items-center justify-center font-sans",{variants:{size:{sm:"gap-1.5",default:"gap-2",lg:"gap-2.5"}},defaultVariants:{size:"default"}}),GL=p.forwardRef(({className:e,value:t,onValueChange:r,size:n="default",children:o,...i},a)=>b.jsx(UL.Provider,{value:{value:t,onValueChange:r,size:n??"default"},children:b.jsx("div",{ref:a,role:"group","aria-label":"Content navigation",className:D(HL({size:n}),e),...i,children:o})}));GL.displayName="PaginationDots";const YL=te("focus-visible:ring-sunflower rounded-full transition-all duration-300 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{size:{sm:"h-1.5",default:"h-2",lg:"h-2.5"},active:{true:"bg-sunflower",false:"bg-border hover:bg-quaternary"}},compoundVariants:[{size:"sm",active:!1,class:"w-1.5"},{size:"default",active:!1,class:"w-2"},{size:"lg",active:!1,class:"w-2.5"},{size:"sm",active:!0,class:"w-4"},{size:"default",active:!0,class:"w-6"},{size:"lg",active:!0,class:"w-8"}],defaultVariants:{size:"default",active:!1}}),qL=p.forwardRef(({className:e,index:t,...r},n)=>{const{value:o,onValueChange:i,size:a}=Hme(),s=t===o;return b.jsx("button",{ref:n,type:"button","aria-label":`Go to slide ${t+1}`,"aria-current":s?"true":void 0,onClick:()=>i?.(t),className:D(YL({size:a,active:s}),e),...r})});qL.displayName="PaginationDot";const XL=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),DO=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],ZL=p.forwardRef(({className:e,size:t,data:r,showLegend:n=!0,showTooltip:o=!0,innerRadius:i=0,outerRadius:a="80%",paddingAngle:s=0,showLabels:l=!1,startAngle:c=90,endAngle:u=-270,...d},f)=>{const h=p.useMemo(()=>r.reduce((m,g)=>m+g.value,0),[r]),v=p.useCallback(m=>{const{cx:g=0,cy:y=0,midAngle:x=0,percent:w=0}=m,S=m.innerRadius??0,P=m.outerRadius??0,C=Math.PI/180,E=S+(P-S)*.5,A=g+E*Math.cos(-x*C),T=y+E*Math.sin(-x*C);return b.jsx("text",{x:A,y:T,fill:"var(--color-white)",textAnchor:"middle",dominantBaseline:"central",style:{fontSize:"12px",fontFamily:"var(--font-sans)",fontWeight:500},children:`${(w*100).toFixed(0)}%`})},[]);return b.jsx("div",{ref:f,className:D(XL({size:t,className:e})),role:"img",...d,children:b.jsx(Jv,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Xne,{children:[o&&b.jsx(gy,{contentStyle:{backgroundColor:"var(--color-white)",border:"1px solid var(--color-border)",borderRadius:"4px",fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-primary)"},labelStyle:{color:"var(--color-secondary)",fontWeight:400},itemStyle:{color:"var(--color-secondary)"},formatter:(m,g)=>[`${m} (${h>0?(Number(m)/h*100).toFixed(1):0}%)`,g]}),n&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),b.jsx(t_,{data:r,cx:"50%",cy:"50%",innerRadius:i,outerRadius:a,paddingAngle:s,dataKey:"value",nameKey:"name",startAngle:c,endAngle:u,label:l?v:!1,labelLine:!1,children:r.map((m,g)=>b.jsx(Ds,{fill:m.color||DO[g%DO.length]},`cell-${m.name}-${g}`))})]})})})});ZL.displayName="PieChart";const QL=te("bg-border relative w-full overflow-hidden rounded-full",{variants:{size:{sm:"h-1",default:"h-2",lg:"h-3",xl:"h-4"}},defaultVariants:{size:"default"}}),JL=te("h-full transition-all duration-300 ease-out",{variants:{variant:{default:"bg-sunflower",muted:"bg-secondary",success:"bg-electric-blue"},animated:{true:"animate-pulse",false:""}},defaultVariants:{variant:"default",animated:!1}}),e$=p.forwardRef(({className:e,value:t=0,max:r=100,size:n,variant:o,animated:i,label:a="Progress",indeterminate:s=!1,...l},c)=>{const u=Math.min(Math.max(t/r*100,0),100);return b.jsx("div",{ref:c,role:"progressbar","aria-valuenow":s?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":a,className:D(QL({size:n,className:e})),...l,children:b.jsx("div",{className:D(JL({variant:o,animated:i}),s&&"animate-progress-indeterminate"),style:{width:s?"50%":`${u}%`}})})});e$.displayName="ProgressIndicator";var Yb="Radio",[Gme,t$]=it(Yb),[Yme,qme]=Gme(Yb),r$=p.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=p.useState(null),h=ie(t,g=>f(g)),v=p.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(Yme,{scope:r,checked:o,disabled:a,children:[b.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":a$(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:h,onClick:U(e.onClick,g=>{o||l?.(),m&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})}),m&&b.jsx(i$,{control:d,bubbles:!v.current,name:n,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});r$.displayName=Yb;var n$="RadioIndicator",o$=p.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=qme(n$,r);return b.jsx(At,{present:n||i.checked,children:b.jsx(ee.span,{"data-state":a$(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});o$.displayName=n$;var Xme="RadioBubbleInput",i$=p.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),b.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});i$.displayName=Xme;function a$(e){return e?"checked":"unchecked"}var Zme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zd="RadioGroup",[Qme]=it(zd,[kd,t$]),s$=kd(),l$=t$(),[Jme,eve]=Qme(zd),c$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,h=s$(r),v=Li(c),[m,g]=xt({prop:i,defaultProp:o??null,onChange:d,caller:zd});return b.jsx(Jme,{scope:r,name:n,required:a,disabled:s,value:m,onValueChange:g,children:b.jsx(aj,{asChild:!0,...h,orientation:l,dir:v,loop:u,children:b.jsx(ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:v,...f,ref:t})})})});c$.displayName=zd;var u$="RadioGroupItem",d$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,i=eve(u$,r),a=i.disabled||n,s=s$(r),l=l$(r),c=p.useRef(null),u=ie(t,c),d=i.value===o.value,f=p.useRef(!1);return p.useEffect(()=>{const h=m=>{Zme.includes(m.key)&&(f.current=!0)},v=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),b.jsx(sj,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(r$,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:U(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:U(o.onFocus,()=>{f.current&&c.current?.click()})})})});d$.displayName=u$;var tve="RadioGroupIndicator",f$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=l$(r);return b.jsx(o$,{...o,...n,ref:t})});f$.displayName=tve;var rve=c$,nve=d$,ove=f$;const p$=p.forwardRef(({className:e,...t},r)=>b.jsx(rve,{className:D("grid gap-2",e),...t,ref:r}));p$.displayName="RadioGroup";const h$=p.forwardRef(({className:e,...t},r)=>b.jsx(nve,{ref:r,className:D("border-border bg-card aspect-square h-5 w-5 rounded-full border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower",e),...t,children:b.jsx(ove,{className:"flex items-center justify-center",children:b.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));h$.displayName="RadioGroupItem";function yu(e,[t,r]){return Math.min(r,Math.max(t,e))}function ive(e){const t=ave(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(lve);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function ave(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=uve(o),s=cve(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sve=Symbol("radix.slottable");function lve(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sve}function cve(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function uve(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var m$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dve="VisuallyHidden",Kd=p.forwardRef((e,t)=>b.jsx(ee.span,{...e,ref:t,style:{...m$,...e.style}}));Kd.displayName=dve;var fve=Kd,pve=[" ","Enter","ArrowUp","ArrowDown"],hve=[" ","Enter"],$o="Select",[Ud,Hd,mve]=Ri($o),[na]=it($o,[mve,Zn]),Gd=Zn(),[vve,to]=na($o),[gve,yve]=na($o),v$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:v}=e,m=Gd(t),[g,y]=p.useState(null),[x,w]=p.useState(null),[S,P]=p.useState(!1),C=Li(c),[E,A]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:$o}),[T,M]=xt({prop:a,defaultProp:s,onChange:l,caller:$o}),_=p.useRef(null),k=g?v||!!g.closest("form"):!0,[N,R]=p.useState(new Set),z=Array.from(N).map(B=>B.props.value).join(";");return b.jsx(Fs,{...m,children:b.jsxs(vve,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:It(),value:T,onValueChange:M,open:E,onOpenChange:A,dir:C,triggerPointerDownPosRef:_,disabled:f,children:[b.jsx(Ud.Provider,{scope:t,children:b.jsx(gve,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(B=>{R(F=>new Set(F).add(B))},[]),onNativeOptionRemove:p.useCallback(B=>{R(F=>{const j=new Set(F);return j.delete(B),j})},[]),children:r})}),k?b.jsxs(B$,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:B=>M(B.target.value),disabled:f,form:v,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},z):null]})})};v$.displayName=$o;var g$="SelectTrigger",y$=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Gd(r),a=to(g$,r),s=a.disabled||n,l=ie(t,a.onTriggerChange),c=Hd(r),u=p.useRef("touch"),[d,f,h]=z$(m=>{const g=c().filter(w=>!w.disabled),y=g.find(w=>w.value===a.value),x=K$(g,m,y);x!==void 0&&a.onValueChange(x.value)}),v=m=>{s||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(Bs,{asChild:!0,...i,children:b.jsx(ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":W$(a.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&v(m)}),onPointerDown:U(o.onPointerDown,m=>{u.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const g=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(g&&m.key===" ")&&pve.includes(m.key)&&(v(),m.preventDefault())})})})});y$.displayName=g$;var b$="SelectValue",x$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=to(b$,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ie(t,l.onValueNodeChange);return pt(()=>{c(u)},[c,u]),b.jsx(ee.span,{...s,ref:d,style:{pointerEvents:"none"},children:W$(l.value)?b.jsx(b.Fragment,{children:a}):i})});x$.displayName=b$;var bve="SelectIcon",w$=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return b.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});w$.displayName=bve;var xve="SelectPortal",S$=e=>b.jsx(Bo,{asChild:!0,...e});S$.displayName=xve;var Vo="SelectContent",P$=p.forwardRef((e,t)=>{const r=to(Vo,e.__scopeSelect),[n,o]=p.useState();if(pt(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?as.createPortal(b.jsx(C$,{scope:e.__scopeSelect,children:b.jsx(Ud.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(O$,{...e,ref:t})});P$.displayName=Vo;var vr=10,[C$,ro]=na(Vo),wve="SelectContentImpl",Sve=ive("SelectContent.RemoveScroll"),O$=p.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g,...y}=e,x=to(Vo,r),[w,S]=p.useState(null),[P,C]=p.useState(null),E=ie(t,K=>S(K)),[A,T]=p.useState(null),[M,_]=p.useState(null),k=Hd(r),[N,R]=p.useState(!1),z=p.useRef(!1);p.useEffect(()=>{if(w)return Ou(w)},[w]),Pu();const B=p.useCallback(K=>{const[fe,...$]=k().map(V=>V.ref.current),[G]=$.slice(-1),W=document.activeElement;for(const V of K)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===fe&&P&&(P.scrollTop=0),V===G&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[k,P]),F=p.useCallback(()=>B([A,w]),[B,A,w]);p.useEffect(()=>{N&&F()},[N,F]);const{onOpenChange:j,triggerPointerDownPosRef:L}=x;p.useEffect(()=>{if(w){let K={x:0,y:0};const fe=G=>{K={x:Math.abs(Math.round(G.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(L.current?.y??0))}},$=G=>{K.x<=10&&K.y<=10?G.preventDefault():w.contains(G.target)||j(!1),document.removeEventListener("pointermove",fe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",$,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",$,{capture:!0})}}},[w,j,L]),p.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[H,re]=z$(K=>{const fe=k().filter(W=>!W.disabled),$=fe.find(W=>W.ref.current===document.activeElement),G=K$(fe,K,$);G&&setTimeout(()=>G.ref.current.focus())}),le=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&(T(K),G&&(z.current=!0))},[x.value]),ae=p.useCallback(()=>w?.focus(),[w]),oe=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&_(K)},[x.value]),Se=n==="popper"?rv:E$,Me=Se===rv?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g}:{};return b.jsx(C$,{scope:r,content:w,viewport:P,onViewportChange:C,itemRefCallback:le,selectedItem:A,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:F,selectedItemText:M,position:n,isPositioned:N,searchRef:H,children:b.jsx(ls,{as:Sve,allowPinchZoom:!0,children:b.jsx(ss,{asChild:!0,trapped:x.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:U(o,K=>{x.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:b.jsx(Se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:K=>K.preventDefault(),...y,...Me,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:U(y.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&re(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let G=k().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(K.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const W=K.target,V=G.indexOf(W);G=G.slice(V+1)}setTimeout(()=>B(G)),K.preventDefault()}})})})})})})});O$.displayName=wve;var Pve="SelectItemAlignedPosition",E$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=to(Vo,r),a=ro(Vo,r),[s,l]=p.useState(null),[c,u]=p.useState(null),d=ie(t,E=>u(E)),f=Hd(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&g&&y){const E=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=M.left-A.left,V=T.left-W,he=E.left-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.left=zt+"px"}else{const W=A.right-M.right,V=window.innerWidth-T.right-W,he=window.innerWidth-E.right-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.right=zt+"px"}const _=f(),k=window.innerHeight-vr*2,N=m.scrollHeight,R=window.getComputedStyle(c),z=parseInt(R.borderTopWidth,10),B=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),L=z+B+N+j+F,H=Math.min(g.offsetHeight*5,L),re=window.getComputedStyle(m),le=parseInt(re.paddingTop,10),ae=parseInt(re.paddingBottom,10),oe=E.top+E.height/2-vr,Se=k-oe,Me=g.offsetHeight/2,K=g.offsetTop+Me,fe=z+B+K,$=L-fe;if(fe<=oe){const W=_.length>0&&g===_[_.length-1].ref.current;s.style.bottom="0px";const V=c.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(Se,Me+(W?ae:0)+V+F),ue=fe+he;s.style.height=ue+"px"}else{const W=_.length>0&&g===_[0].ref.current;s.style.top="0px";const he=Math.max(oe,z+m.offsetTop+(W?le:0)+Me)+$;s.style.height=he+"px",m.scrollTop=fe-oe+m.offsetTop}s.style.margin=`${vr}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=k+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,g,y,i.dir,n]);pt(()=>w(),[w]);const[S,P]=p.useState();pt(()=>{c&&P(window.getComputedStyle(c).zIndex)},[c]);const C=p.useCallback(E=>{E&&v.current===!0&&(w(),x?.(),v.current=!1)},[w,x]);return b.jsx(Ove,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ee.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});E$.displayName=Pve;var Cve="SelectPopperPosition",rv=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vr,...i}=e,a=Gd(r);return b.jsx(Td,{...a,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});rv.displayName=Cve;var[Ove,qb]=na(Vo,{}),nv="SelectViewport",A$=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=ro(nv,r),a=qb(nv,r),s=ie(t,i.onViewportChange),l=p.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),b.jsx(Ud.Slot,{scope:r,children:b.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f?.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const v=window.innerHeight-vr*2,m=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),y=Math.max(m,g);if(y<v){const x=y+h,w=Math.min(v,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});A$.displayName=nv;var T$="SelectGroup",[Eve,Ave]=na(T$),M$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=It();return b.jsx(Eve,{scope:r,id:o,children:b.jsx(ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});M$.displayName=T$;var k$="SelectLabel",D$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ave(k$,r);return b.jsx(ee.div,{id:o.id,...n,ref:t})});D$.displayName=k$;var bu="SelectItem",[Tve,_$]=na(bu),N$=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=to(bu,r),l=ro(bu,r),c=s.value===n,[u,d]=p.useState(i??""),[f,h]=p.useState(!1),v=ie(t,x=>l.itemRefCallback?.(x,n,o)),m=It(),g=p.useRef("touch"),y=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(Tve,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:p.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:b.jsx(Ud.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:b.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:U(a.onFocus,()=>h(!0)),onBlur:U(a.onBlur,()=>h(!1)),onClick:U(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:U(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:U(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:U(a.onPointerMove,x=>{g.current=x.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:U(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(hve.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});N$.displayName=bu;var Ea="SelectItemText",j$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=to(Ea,r),s=ro(Ea,r),l=_$(Ea,r),c=yve(Ea,r),[u,d]=p.useState(null),f=ie(t,y=>d(y),l.onItemTextChange,y=>s.itemTextRefCallback?.(y,l.value,l.disabled)),h=u?.textContent,v=p.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return pt(()=>(m(v),()=>g(v)),[m,g,v]),b.jsxs(b.Fragment,{children:[b.jsx(ee.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?as.createPortal(i.children,a.valueNode):null]})});j$.displayName=Ea;var I$="SelectItemIndicator",R$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _$(I$,r).isSelected?b.jsx(ee.span,{"aria-hidden":!0,...n,ref:t}):null});R$.displayName=I$;var ov="SelectScrollUpButton",L$=p.forwardRef((e,t)=>{const r=ro(ov,e.__scopeSelect),n=qb(ov,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});L$.displayName=ov;var iv="SelectScrollDownButton",$$=p.forwardRef((e,t)=>{const r=ro(iv,e.__scopeSelect),n=qb(iv,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$$.displayName=iv;var V$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=ro("SelectScrollButton",r),a=p.useRef(null),s=Hd(r),l=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),pt(()=>{s().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),b.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:U(o.onPointerMove,()=>{i.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:U(o.onPointerLeave,()=>{l()})})}),Mve="SelectSeparator",F$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return b.jsx(ee.div,{"aria-hidden":!0,...n,ref:t})});F$.displayName=Mve;var av="SelectArrow",kve=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gd(r),i=to(av,r),a=ro(av,r);return i.open&&a.position==="popper"?b.jsx(Md,{...o,...n,ref:t}):null});kve.displayName=av;var Dve="SelectBubbleInput",B$=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(n,o),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.select,{...r,style:{...m$,...r.style},ref:i,defaultValue:t})});B$.displayName=Dve;function W$(e){return e===""||e===void 0}function z$(e){const t=Et(e),r=p.useRef(""),n=p.useRef(0),o=p.useCallback(a=>{const s=r.current+a;t(s),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function K$(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=_ve(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function _ve(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nve=v$,jve=y$,Ive=x$,Rve=w$,Lve=S$,$ve=P$,Vve=A$,Fve=M$,Bve=D$,Wve=N$,zve=j$,Kve=R$,Uve=L$,Hve=$$,Gve=F$;const Yve=Nve,qve=Fve,Xve=Ive,U$=p.forwardRef(({className:e,children:t,variant:r="default",...n},o)=>b.jsxs(jve,{ref:o,className:D("bg-card text-body-sm text-primary flex h-8 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary placeholder:text-body-sm","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1",r==="default"?"border-border focus-visible:ring-sunflower":"border-error focus-visible:ring-error",e),...n,children:[t,b.jsx(Rve,{asChild:!0,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 opacity-50",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})})]}));U$.displayName="SelectTrigger";const Xb=p.forwardRef(({className:e,...t},r)=>b.jsx(Uve,{ref:r,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m18 15-6-6-6 6"})})}));Xb.displayName="SelectScrollUpButton";const Zb=p.forwardRef(({className:e,...t},r)=>b.jsx(Hve,{ref:r,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})}));Zb.displayName="SelectScrollDownButton";const H$=p.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>b.jsx(Lve,{children:b.jsxs($ve,{ref:o,className:D("border-border bg-card text-primary relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[b.jsx(Xb,{}),b.jsx(Vve,{className:D("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),b.jsx(Zb,{})]})}));H$.displayName="SelectContent";const G$=p.forwardRef(({className:e,...t},r)=>b.jsx(Bve,{ref:r,className:D("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));G$.displayName="SelectLabel";const Y$=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Wve,{ref:n,className:D("text-body-sm relative flex h-8 w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-alt focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(Kve,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),b.jsx(zve,{children:t})]}));Y$.displayName="SelectItem";const q$=p.forwardRef(({className:e,...t},r)=>b.jsx(Gve,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));q$.displayName="SelectSeparator";const X$=p.createContext(null);function Xo(){const e=p.useContext(X$);if(!e)throw new Error("Sidebar components must be used within a Sidebar");return e}const Z$=te(["border-border bg-alt flex h-dvh flex-col border-r transition-[width] duration-300 ease-in-out","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{variant:{default:"",bordered:"border-border border"},width:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",width:"default"}}),Zve={sm:{expanded:"w-52",collapsed:"w-14"},default:{expanded:"w-64",collapsed:"w-16"},lg:{expanded:"w-72",collapsed:"w-20"}},Q$=p.forwardRef(({className:e,variant:t,width:r="default",defaultCollapsed:n=!1,collapsed:o,onCollapsedChange:i,collapsible:a=!0,autoCollapseMobile:s=!0,children:l,...c},u)=>{const[d,f]=p.useState(n),h=o!==void 0,v=h?o:d,m=p.useCallback(x=>{a&&(h||f(x),i?.(x))},[h,i,a]);p.useEffect(()=>{if(!s||!a||typeof window>"u"||!window.matchMedia)return;const x=window.matchMedia("(max-width: 768px)"),w=S=>{m(S.matches)};return w(x),x.addEventListener("change",w),()=>x.removeEventListener("change",w)},[s,a,m]);const g=p.useMemo(()=>({collapsed:v,setCollapsed:m,collapsible:a}),[v,m,a]),y=Zve[r||"default"];return b.jsx(X$.Provider,{value:g,children:b.jsx("aside",{ref:u,className:D(Z$({variant:t}),v?y.collapsed:y.expanded,e),"data-collapsed":v,...c,children:l})})});Q$.displayName="Sidebar";const J$=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex items-center gap-4 px-6 pt-6 pb-4",e),...t}));J$.displayName="SidebarHeader";const eV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex-1 overflow-y-auto px-5 py-4",e),...t}));eV.displayName="SidebarContent";const tV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("border-border mt-auto border-t px-5 py-5",e),...t}));tV.displayName="SidebarFooter";const rV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("space-y-2 py-4",e),...t}));rV.displayName="SidebarGroup";const nV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n}=Xo();return n?null:b.jsx(qo,{variant:"label",ref:r,className:D("px-4 py-3 uppercase",e),...t})});nV.displayName="SidebarGroupLabel";const ns=te(["group text-small relative flex w-full cursor-pointer items-center gap-3 rounded-md px-4 py-3 font-sans font-normal","text-secondary hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{active:{true:"text-primary",false:""}},defaultVariants:{active:!1}}),oV=p.forwardRef(({className:e,active:t,icon:r,asChild:n=!1,children:o,...i},a)=>{const{collapsed:s}=Xo(),l=n?Ie:"button",c=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",s?"right-1 bottom-0 left-1 h-0.75":"top-1 bottom-1 left-0 w-0.75",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),u=b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx(qo,{variant:"body-sm",className:"truncate",children:o})]});return n?b.jsx(Ie,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:p.isValidElement(o)?p.cloneElement(o,{children:b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx("span",{className:"truncate",children:o.props.children})]})}):o}):b.jsx(l,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:u})});oV.displayName="SidebarItem";const iV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n,setCollapsed:o,collapsible:i}=Xo();return i?b.jsx("button",{ref:r,type:"button",className:D("text-small flex w-full items-center rounded-md p-2 font-sans font-normal","text-secondary hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),onClick:()=>o(!n),"aria-label":n?"Expand sidebar":"Collapse sidebar",...t,children:n?b.jsx(Ov,{className:"h-5 w-5"}):b.jsx(Cv,{className:"h-5 w-5"})}):null});iV.displayName="SidebarTrigger";const aV=p.forwardRef(({className:e,...t},r)=>b.jsx("hr",{ref:r,className:D("border-border my-5 border-t",e),...t}));aV.displayName="SidebarSeparator";const sv=p.createContext(null);function sV(){const e=p.useContext(sv);if(!e)throw new Error("SidebarSub components must be used within a SidebarSub");return e}const lV=p.forwardRef(({className:e,defaultOpen:t=!1,open:r,onOpenChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),{collapsed:c}=Xo(),u=r!==void 0,d=u?r:s,f=p.useCallback(v=>{u||l(v),n?.(v)},[u,n]),h=p.useMemo(()=>({open:d,setOpen:f}),[d,f]);return c?b.jsx(sv.Provider,{value:h,children:b.jsx(jd,{open:d,onOpenChange:f,children:b.jsx("div",{ref:a,className:D("relative",e),...i,children:o})})}):b.jsx(sv.Provider,{value:h,children:b.jsx(VO,{open:d,onOpenChange:f,asChild:!0,children:b.jsx("div",{ref:a,className:e,...i,children:o})})})});lV.displayName="SidebarSub";const cV=p.forwardRef(({className:e,active:t,icon:r,children:n,...o},i)=>{const{collapsed:a}=Xo(),{open:s}=sV(),l=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",a?"right-1 bottom-0 left-1 h-0.75":"top-1 bottom-1 left-0 w-0.75",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),c=b.jsxs(b.Fragment,{children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!a&&b.jsxs(b.Fragment,{children:[b.jsx(qo,{variant:"body-sm",className:"flex-1 truncate text-left",children:n}),b.jsx(rE,{className:D("h-4 w-4 shrink-0 transition-transform duration-200",s&&"rotate-180"),"aria-hidden":"true"})]})]});return a?b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:i,type:"button",className:D(ns({active:t}),"justify-center px-2",e),...o,children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r})]})}):b.jsx(FO,{asChild:!0,children:b.jsx("button",{ref:i,type:"button",className:D(ns({active:t}),e),...o,children:c})})});cV.displayName="SidebarSubTrigger";const uV=p.forwardRef(({className:e,children:t,...r},n)=>{const{collapsed:o}=Xo();return o?b.jsx(Rd,{children:b.jsx(Ld,{ref:n,side:"right",align:"start",sideOffset:8,className:D("bg-card border-border z-50 min-w-[180px] rounded-md border p-2 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=right]:slide-in-from-left-2",e),...r,children:t})}):b.jsx(BO,{ref:n,className:D("overflow-hidden","data-[state=open]:animate-collapsible-down","data-[state=closed]:animate-collapsible-up",e),...r,children:b.jsx("div",{className:"space-y-1 pt-1 pl-8",children:t})})});uV.displayName="SidebarSubContent";const dV=te("bg-contrast animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),fV=p.forwardRef(({className:e,variant:t,width:r,height:n,style:o,...i},a)=>{const s={...o,...r!==void 0&&{width:typeof r=="number"?`${r}px`:r},...n!==void 0&&{height:typeof n=="number"?`${n}px`:n}};return b.jsx("div",{ref:a,"aria-hidden":"true",className:D(dV({variant:t,className:e})),style:s,...i})});fV.displayName="Skeleton";var pV=["PageUp","PageDown"],hV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],mV={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},oa="Slider",[lv,Qve,Jve]=Ri(oa),[vV]=it(oa,[Jve]),[ege,Yd]=vV(oa),gV=p.forwardRef((e,t)=>{const{name:r,min:n=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:v,...m}=e,g=p.useRef(new Set),y=p.useRef(0),w=a==="horizontal"?tge:rge,[S=[],P]=xt({prop:u,defaultProp:c,onChange:_=>{[...g.current][y.current]?.focus(),d(_)}}),C=p.useRef(S);function E(_){const k=sge(S,_);M(_,k)}function A(_){M(_,y.current)}function T(){const _=C.current[y.current];S[y.current]!==_&&f(S)}function M(_,k,{commit:N}={commit:!1}){const R=dge(i),z=fge(Math.round((_-n)/i)*i+n,R),B=yu(z,[n,o]);P((F=[])=>{const j=ige(F,B,k);if(uge(j,l*i)){y.current=j.indexOf(B);const L=String(j)!==String(F);return L&&N&&f(j),L?j:F}else return F})}return b.jsx(ege,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:o,valueIndexToChangeRef:y,thumbs:g.current,values:S,orientation:a,form:v,children:b.jsx(lv.Provider,{scope:e.__scopeSlider,children:b.jsx(lv.Slot,{scope:e.__scopeSlider,children:b.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:U(m.onPointerDown,()=>{s||(C.current=S)}),min:n,max:o,inverted:h,onSlideStart:s?void 0:E,onSlideMove:s?void 0:A,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(n,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:k})=>{if(!s){const z=pV.includes(_.key)||_.shiftKey&&hV.includes(_.key)?10:1,B=y.current,F=S[B],j=i*z*k;M(F+j,B,{commit:!0})}}})})})})});gV.displayName=oa;var[yV,bV]=vV(oa,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tge=p.forwardRef((e,t)=>{const{min:r,max:n,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=p.useState(null),h=ie(t,w=>f(w)),v=p.useRef(void 0),m=Li(o),g=m==="ltr",y=g&&!i||!g&&i;function x(w){const S=v.current||d.getBoundingClientRect(),P=[0,S.width],E=Qb(P,y?[r,n]:[n,r]);return v.current=S,E(w-S.left)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(xV,{dir:m,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);a?.(S)},onSlideMove:w=>{const S=x(w.clientX);s?.(S)},onSlideEnd:()=>{v.current=void 0,l?.()},onStepKeyDown:w=>{const P=mV[y?"from-left":"from-right"].includes(w.key);c?.({event:w,direction:P?-1:1})}})})}),rge=p.forwardRef((e,t)=>{const{min:r,max:n,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=p.useRef(null),d=ie(t,u),f=p.useRef(void 0),h=!o;function v(m){const g=f.current||u.current.getBoundingClientRect(),y=[0,g.height],w=Qb(y,h?[n,r]:[r,n]);return f.current=g,w(m-g.top)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:b.jsx(xV,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const g=v(m.clientY);i?.(g)},onSlideMove:m=>{const g=v(m.clientY);a?.(g)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:m=>{const y=mV[h?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),xV=p.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Yd(oa,r);return b.jsx(ee.span,{...c,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):pV.concat(hV).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():n(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),wV="SliderTrack",SV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(wV,r);return b.jsx(ee.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:t})});SV.displayName=wV;var cv="SliderRange",PV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(cv,r),i=bV(cv,r),a=p.useRef(null),s=ie(t,a),l=o.values.length,c=o.values.map(f=>EV(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ee.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});PV.displayName=cv;var uv="SliderThumb",CV=p.forwardRef((e,t)=>{const r=Qve(e.__scopeSlider),[n,o]=p.useState(null),i=ie(t,s=>o(s)),a=p.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return b.jsx(nge,{...e,ref:i,index:a})}),nge=p.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:o,...i}=e,a=Yd(uv,r),s=bV(uv,r),[l,c]=p.useState(null),u=ie(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,f=$s(l),h=a.values[n],v=h===void 0?0:EV(h,a.min,a.max),m=age(n,a.values.length),g=f?.[s.size],y=g?lge(g,v,s.direction):0;return p.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${y}px)`},children:[b.jsx(lv.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ee.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),d&&b.jsx(OV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});CV.displayName=uv;var oge="RadioBubbleInput",OV=p.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(o,n),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});OV.displayName=oge;function ige(e=[],t,r){const n=[...e];return n[r]=t,n.sort((o,i)=>o-i)}function EV(e,t,r){const i=100/(r-t)*(e-t);return yu(i,[0,100])}function age(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function sge(e,t){if(e.length===1)return 0;const r=e.map(o=>Math.abs(o-t)),n=Math.min(...r);return r.indexOf(n)}function lge(e,t,r){const n=e/2,i=Qb([0,50],[0,n]);return(n-i(t)*r)*r}function cge(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function uge(e,t){if(t>0){const r=cge(e);return Math.min(...r)>=t}return!0}function Qb(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function dge(e){return(String(e).split(".")[1]||"").length}function fge(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var pge=gV,hge=SV,mge=PV,vge=CV;const AV=te("relative flex w-full touch-none items-center select-none",{variants:{size:{sm:"[--slider-thumb-size:theme(spacing.3)] [--slider-track-height:theme(spacing.1)]",default:"[--slider-thumb-size:theme(spacing.4)] [--slider-track-height:theme(spacing.2)]",lg:"[--slider-thumb-size:theme(spacing.5)] [--slider-track-height:theme(spacing.3)]"}},defaultVariants:{size:"default"}}),TV=p.forwardRef(({className:e,size:t,defaultValue:r=[0],value:n,"aria-label":o,"aria-labelledby":i,...a},s)=>{const l=n?.length??r?.length??1;return b.jsxs(pge,{ref:s,defaultValue:r,value:n,className:D(AV({size:t}),e),...a,children:[b.jsx(hge,{className:D("bg-border relative h-[var(--slider-track-height)] w-full grow overflow-hidden rounded-full"),children:b.jsx(mge,{className:"bg-sunflower absolute h-full"})}),Array.from({length:l}).map((c,u)=>b.jsx(vge,{"aria-label":o,"aria-labelledby":i,className:D("border-sunflower block h-[var(--slider-thumb-size)] w-[var(--slider-thumb-size)] rounded-full border-2 bg-white shadow-md transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","hover:border-sunflower-hover")},u))]})});TV.displayName="Slider";const MV=te("inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",{variants:{variant:{default:"text-sunflower",muted:"text-secondary",inverted:"text-white"},size:{sm:"h-4 w-4 border-2",default:"h-6 w-6 border-2",lg:"h-8 w-8 border-3",xl:"h-12 w-12 border-4"}},defaultVariants:{variant:"default",size:"default"}}),kV=p.forwardRef(({className:e,variant:t,size:r,label:n="Loading",...o},i)=>b.jsx("span",{ref:i,role:"status","aria-label":n,className:D(MV({variant:t,size:r,className:e})),...o,children:b.jsx("span",{className:"sr-only",children:n})}));kV.displayName="Spinner";const DV=te("flex",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"vertical",gap:"md",align:"stretch",justify:"start",wrap:"nowrap"}}),_V=p.forwardRef(({className:e,direction:t,gap:r,align:n,justify:o,wrap:i,as:a="div",asChild:s=!1,...l},c)=>{const u=s?Ie:a;return b.jsx(u,{className:D(DV({direction:t,gap:r,align:n,justify:o,wrap:i,className:e})),ref:c,...l})});_V.displayName="Stack";const NV=p.createContext(null);function Jb(){const e=p.useContext(NV);if(!e)throw new Error("Stepper components must be used within a Stepper");return e}const jV=p.createContext(null);function Zs(){const e=p.useContext(jV);if(!e)throw new Error("StepperItem child components must be used within a StepperItem");return e}const IV=te("flex",{variants:{orientation:{horizontal:"flex-row items-start",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),RV=te("inline-flex items-center font-sans",{variants:{size:{sm:"gap-1",default:"gap-1.5",lg:"gap-2"}},defaultVariants:{size:"default"}}),LV=te("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"h-5 w-5 text-[10px]",default:"h-6 w-6 text-[11px]",lg:"h-7 w-7 text-xs"}},defaultVariants:{size:"default"}}),$V=te("transition-colors",{variants:{size:{sm:"h-0.5 w-3",default:"h-0.5 w-4",lg:"h-0.5 w-5"}},defaultVariants:{size:"default"}}),VV=p.forwardRef(({className:e,variant:t="default",activeStep:r=1,orientation:n="horizontal",totalSteps:o,size:i,labels:a,onStepClick:s,children:l,...c},u)=>{const[d,f]=p.useState(0),h=p.useMemo(()=>({activeStep:r,orientation:n,totalSteps:d,setTotalSteps:f}),[r,n,d]);if(t==="mini"){const v=o??0,m=Array.from({length:v},(g,y)=>y+1);return b.jsx("div",{ref:u,role:"group","aria-label":"Progress",className:D(RV({size:i}),e),...c,children:m.map(g=>{const y=g<r?"completed":g===r?"active":"inactive",x=a?.[g-1]??`Step ${g}`,w=g===v;return b.jsxs(p.Fragment,{children:[b.jsx("button",{type:"button","aria-current":y==="active"?"step":void 0,"aria-label":x,"data-state":y,disabled:!s,onClick:()=>s?.(g),className:D(LV({size:i}),"focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",s?"cursor-pointer":"cursor-default disabled:opacity-100",y==="completed"&&"bg-sunflower text-primary",y==="active"&&"border-sunflower text-primary border-2",y==="inactive"&&"border-border text-tertiary border-2"),children:y==="completed"?b.jsx(tE,{className:D(i==="sm"&&"h-2.5 w-2.5",i==="lg"&&"h-3.5 w-3.5",(!i||i==="default")&&"h-3 w-3"),strokeWidth:3}):g}),!w&&b.jsx("div",{"aria-hidden":"true",className:D($V({size:i}),g<r?"bg-sunflower":"bg-border")})]},g)})})}return b.jsx(NV.Provider,{value:h,children:b.jsxs("div",{ref:u,role:"group","aria-label":"Progress","data-orientation":n,className:D("w-full",e),...c,children:[b.jsx("div",{className:D(IV({orientation:n})),children:l}),n==="horizontal"&&d>0&&b.jsxs("div",{className:"text-tertiary text-body-sm mt-4 text-center font-sans",children:["Step ",Math.min(r,d)," of ",d]})]})})});VV.displayName="Stepper";const FV=te("group relative",{variants:{orientation:{horizontal:"flex flex-1 flex-col items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),BV=p.forwardRef(({className:e,step:t,children:r,...n},o)=>{const{activeStep:i,orientation:a,totalSteps:s,setTotalSteps:l}=Jb(),c=t<i?"completed":t===i?"active":"inactive";p.useEffect(()=>{l(f=>Math.max(f,t))},[t,l]);const u=t===s,d=p.useMemo(()=>({step:t,state:c,isLastStep:u}),[t,c,u]);return b.jsx(jV.Provider,{value:d,children:b.jsx("div",{ref:o,"data-state":c,"data-step":t,"data-orientation":a,className:D(FV({orientation:a}),e),...n,children:r})})});BV.displayName="StepperItem";const WV=te("focus-visible:ring-sunflower flex items-center gap-3 text-left font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{orientation:{horizontal:"flex-col items-center gap-2 text-center",vertical:"flex-row"}},defaultVariants:{orientation:"horizontal"}}),zV=p.forwardRef(({className:e,children:t,...r},n)=>{const{orientation:o}=Jb(),{state:i}=Zs();return b.jsx("button",{ref:n,type:"button","aria-current":i==="active"?"step":void 0,"data-state":i,className:D(WV({orientation:o}),e),...r,children:t})});zV.displayName="StepperTrigger";const KV=te("text-body-sm inline-flex shrink-0 items-center justify-center rounded-full font-sans transition-colors",{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),UV=p.forwardRef(({className:e,size:t,children:r,...n},o)=>{const{state:i,step:a}=Zs();return b.jsx("span",{ref:o,"data-state":i,className:D(KV({size:t}),i==="completed"&&"bg-sunflower text-primary",i==="active"&&"border-sunflower text-primary border-2",i==="inactive"&&"border-border text-tertiary border-2",e),"aria-hidden":"true",...n,children:i==="completed"?b.jsx(tE,{className:"h-4 w-4"}):r??a})});UV.displayName="StepperIndicator";const HV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("span",{ref:r,"data-state":n,className:D("text-body-sm font-sans font-medium tracking-tight",n==="inactive"?"text-tertiary":"text-primary",e),...t})});HV.displayName="StepperTitle";const GV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("p",{ref:r,"data-state":n,className:D("text-small font-sans",n==="inactive"?"text-quaternary":"text-secondary",e),...t})});GV.displayName="StepperDescription";const YV=te("transition-colors",{variants:{orientation:{horizontal:"absolute top-[17px] right-[calc(-50%_+_24px)] left-[calc(50%_+_24px)] h-0.5",vertical:"mt-1 mb-1 ml-4.5 min-h-8 w-0.5"}},defaultVariants:{orientation:"horizontal"}}),qV=p.forwardRef(({className:e,...t},r)=>{const{orientation:n}=Jb(),{state:o}=Zs();return b.jsx("div",{ref:r,role:"separator","data-state":o,"data-orientation":n,className:D(YV({orientation:n}),o==="completed"?"bg-sunflower":"bg-border",e),"aria-hidden":"true",...t})});qV.displayName="StepperSeparator";var qd="Switch",[gge]=it(qd),[yge,bge]=gge(qd),XV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=p.useState(null),v=ie(t,w=>h(w)),m=p.useRef(!1),g=f?u||!!f.closest("form"):!0,[y,x]=xt({prop:o,defaultProp:i??!1,onChange:c,caller:qd});return b.jsxs(yge,{scope:r,checked:y,disabled:s,children:[b.jsx(ee.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":eF(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:v,onClick:U(e.onClick,w=>{x(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&b.jsx(JV,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});XV.displayName=qd;var ZV="SwitchThumb",QV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bge(ZV,r);return b.jsx(ee.span,{"data-state":eF(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});QV.displayName=ZV;var xge="SwitchBubbleInput",JV=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});JV.displayName=xge;function eF(e){return e?"checked":"unchecked"}var wge=XV,Sge=QV;const tF=p.forwardRef(({className:e,...t},r)=>b.jsx(wge,{className:D("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-sunflower data-[state=unchecked]:bg-contrast",e),...t,ref:r,children:b.jsx(Sge,{className:D("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));tF.displayName="Switch";const rF=te("text-body w-full caption-bottom border-collapse font-sans",{variants:{variant:{default:"border-separate border-spacing-0",striped:"border-separate border-spacing-0"},size:{default:"",compact:""}},defaultVariants:{variant:"default",size:"default"}}),Pge=te("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),Cge=te("",{variants:{},defaultVariants:{}}),Oge=te("transition-colors",{variants:{variant:{default:"border-border hover:bg-alt/50 border-b",striped:"border-border even:bg-alt/30 hover:bg-alt border-b"}},defaultVariants:{variant:"default"}}),Ege=te("text-small text-primary text-left align-middle font-sans font-normal [&:has([role=checkbox])]:pr-0",{variants:{sortable:{true:"hover:bg-contrast cursor-pointer select-none",false:""},size:{default:"h-12 px-4",compact:"h-8 px-2"}},defaultVariants:{sortable:!1,size:"default"}}),Age=te("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),ex=p.createContext({size:"default"}),nF=p.forwardRef(({className:e,variant:t,size:r="default",...n},o)=>b.jsx(ex.Provider,{value:{size:r??"default"},children:b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:o,className:D(rF({variant:t,size:r}),e),...n})})}));nF.displayName="Table";const oF=p.forwardRef(({className:e,...t},r)=>b.jsx("thead",{ref:r,className:D(Pge(),e),...t}));oF.displayName="TableHeader";const iF=p.forwardRef(({className:e,...t},r)=>b.jsx("tbody",{ref:r,className:D(Cge(),e),...t}));iF.displayName="TableBody";const aF=p.forwardRef(({className:e,...t},r)=>b.jsx("tfoot",{ref:r,className:D("border-border bg-alt text-primary border-t font-normal",e),...t}));aF.displayName="TableFooter";const sF=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx("tr",{ref:n,className:D(Oge({variant:t}),e),...r}));sF.displayName="TableRow";const lF=p.forwardRef(({className:e,children:t,sortable:r=!1,sortDirection:n=null,onSort:o,...i},a)=>{const{size:s}=p.useContext(ex),l=()=>{r&&o&&o()},c=u=>{r&&o&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())};return b.jsx("th",{ref:a,className:D(Ege({sortable:r,size:s}),e),onClick:l,onKeyDown:c,tabIndex:r?0:void 0,role:r?"button":void 0,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":void 0,...i,children:b.jsxs("div",{className:"flex items-center gap-2",children:[t,r&&b.jsxs("span",{className:"inline-flex flex-col","aria-hidden":"true",children:[b.jsx("svg",{className:D("h-3 w-3 transition-opacity",n==="asc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 15l5-5 5 5"})}),b.jsx("svg",{className:D("-mt-1 h-3 w-3 transition-opacity",n==="desc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 9l5 5 5-5"})})]})]})})});lF.displayName="TableHead";const cF=p.forwardRef(({className:e,children:t,...r},n)=>{const{size:o}=p.useContext(ex);return b.jsx("td",{ref:n,className:D(Age({size:o}),e),...r,children:b.jsx(qo,{variant:"body-sm",as:"span",children:t})})});cF.displayName="TableCell";const uF=p.forwardRef(({className:e,...t},r)=>b.jsx("caption",{ref:r,className:D("text-small text-tertiary mt-4 text-left",e),...t}));uF.displayName="TableCaption";function Tge({data:e,initialSortKey:t=null,initialSortDirection:r="asc"}){const[n,o]=p.useState({key:t??null,direction:t?r??"asc":null}),i=p.useCallback(c=>{o(u=>u.key!==c?{key:c,direction:"asc"}:u.direction==="asc"?{key:c,direction:"desc"}:u.direction==="desc"?{key:null,direction:null}:{key:c,direction:"asc"})},[]),{key:a,direction:s}=n;return{sortedData:p.useMemo(()=>!a||!s?e:[...e].sort((c,u)=>{const d=c[a],f=u[a];if(d===f)return 0;let h=0;return typeof d=="string"&&typeof f=="string"?h=d.localeCompare(f):typeof d=="number"&&typeof f=="number"?h=d-f:h=String(d).localeCompare(String(f)),s==="asc"?h:-h}),[e,a,s]),sortKey:a,sortDirection:s,handleSort:i}}function Mge({data:e,filterKeys:t}){const[r,n]=p.useState("");return{filteredData:p.useMemo(()=>{if(!r.trim())return e;const i=r.toLowerCase();return e.filter(a=>t&&t.length>0?t.some(s=>String(a[s]).toLowerCase().includes(i)):Object.values(a).some(s=>String(s).toLowerCase().includes(i)))},[e,r,t]),filterValue:r,setFilterValue:n}}const dF=p.createContext(null);function fF(){const e=p.useContext(dF);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const pF=p.forwardRef(({className:e,defaultValue:t="",value:r,onValueChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),c=p.useRef(new Map),u=r!==void 0?r:s,d=p.useCallback(h=>{r===void 0&&l(h),n?.(h)},[r,n]),f=p.useCallback((h,v)=>{v?c.current.set(h,v):c.current.delete(h)},[]);return b.jsx(dF.Provider,{value:{activeTab:u,setActiveTab:d,registerTrigger:f},children:b.jsx("div",{ref:a,className:D("w-full",e),...i,children:o})})});pF.displayName="Tabs";const hF=te("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border relative gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),mF=p.createContext(null),vF=p.forwardRef(({className:e,variant:t,...r},n)=>{const o=p.useRef(null),[i,a]=p.useState(null),[s,l]=p.useState(!1),c=p.useRef(!1),u=p.useCallback(h=>{if(h&&o.current){const v=o.current.getBoundingClientRect();a({left:h.left-v.left,width:h.width}),c.current||(c.current=!0,l(!0))}},[]),d=p.useCallback(h=>{o.current=h,typeof n=="function"?n(h):n&&(n.current=h)},[n]),f=p.useMemo(()=>({variant:t??"default",setActiveRect:u}),[t,u]);return b.jsx(mF.Provider,{value:f,children:b.jsxs("div",{ref:d,role:"tablist",className:D(hF({variant:t,className:e})),...r,children:[r.children,t!=="pills"&&i&&b.jsx("span",{className:D("bg-sunflower pointer-events-none absolute bottom-0 h-0.5",s&&"transition-all duration-200 ease-out"),style:{left:i.left,width:i.width},"aria-hidden":"true"})]})})});vF.displayName="TabList";const gF=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-secondary hover:text-primary data-[state=active]:text-primary px-4 py-2",pills:"rounded-pill text-secondary hover:text-primary data-[state=active]:bg-card data-[state=active]:text-primary px-4 py-1.5 data-[state=active]:shadow-sm"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),yF=p.forwardRef(({className:e,variant:t,size:r,value:n,...o},i)=>{const{activeTab:a,setActiveTab:s}=fF(),l=p.useContext(mF),c=p.useRef(null),u=a===n,d=p.useCallback(f=>{c.current=f,typeof i=="function"?i(f):i&&(i.current=f)},[i]);return p.useEffect(()=>{if(u&&c.current&&l){const f=()=>{if(c.current){const h=c.current.getBoundingClientRect();l.setActiveRect({left:h.left,width:h.width})}};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)}},[u,l]),b.jsx("button",{ref:d,role:"tab",type:"button","aria-selected":u,"data-state":u?"active":"inactive",onClick:()=>s(n),className:D(gF({variant:t,size:r,className:e})),...o})});yF.displayName="TabTrigger";const bF=te("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),xF=p.forwardRef(({className:e,size:t,value:r,...n},o)=>{const{activeTab:i}=fF(),a=i===r;return a?b.jsx("div",{ref:o,role:"tabpanel","data-state":a?"active":"inactive",className:D(bF({size:t,className:e})),...n}):null});xF.displayName="TabContent";const wF=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm flex min-h-[80px] w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{variant:"default",resize:"vertical"}}),SF=p.forwardRef(({className:e,variant:t,resize:r,...n},o)=>b.jsx("textarea",{className:D(wF({variant:t,resize:r}),e),ref:o,...n}));SF.displayName="Textarea";var tx="ToastProvider",[rx,kge,Dge]=Ri("Toast"),[PF]=it("Toast",[Dge]),[_ge,Xd]=PF(tx),CF=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=p.useState(null),[c,u]=p.useState(0),d=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${tx}\`. Expected non-empty \`string\`.`),b.jsx(rx.Provider,{scope:t,children:b.jsx(_ge,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:p.useCallback(()=>u(h=>h+1),[]),onToastRemove:p.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};CF.displayName=tx;var OF="ToastViewport",Nge=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",EF=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Nge,label:o="Notifications ({hotkey})",...i}=e,a=Xd(OF,r),s=kge(r),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),f=ie(t,d,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const g=y=>{n.length!==0&&n.every(w=>y[w]||y.code===w)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),p.useEffect(()=>{const g=l.current,y=d.current;if(v&&g&&y){const x=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(dv);y.dispatchEvent(C),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(fv);y.dispatchEvent(C),a.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&w()},P=()=>{g.contains(document.activeElement)||w()};return g.addEventListener("focusin",x),g.addEventListener("focusout",S),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",P),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",P),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,a.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:g})=>{const x=s().map(w=>{const S=w.ref.current,P=[S,...Hge(S)];return g==="forwards"?P:P.reverse()});return(g==="forwards"?x.reverse():x).flat()},[s]);return p.useEffect(()=>{const g=d.current;if(g){const y=x=>{const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const P=document.activeElement,C=x.shiftKey;if(x.target===g&&C){c.current?.focus();return}const T=m({tabbingDirection:C?"backwards":"forwards"}),M=T.findIndex(_=>_===P);yh(T.slice(M+1))?x.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[s,m]),b.jsxs(vz,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&b.jsx(pv,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});yh(g)}}),b.jsx(rx.Slot,{scope:r,children:b.jsx(ee.ol,{tabIndex:-1,...i,ref:f})}),v&&b.jsx(pv,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});yh(g)}})]})});EF.displayName=OF;var AF="ToastFocusProxy",pv=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=Xd(AF,r);return b.jsx(Kd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&n()}})});pv.displayName=AF;var Qs="Toast",jge="toast.swipeStart",Ige="toast.swipeMove",Rge="toast.swipeCancel",Lge="toast.swipeEnd",TF=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=xt({prop:n,defaultProp:o??!0,onChange:i,caller:Qs});return b.jsx(At,{present:r||s,children:b.jsx(Fge,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Et(e.onPause),onResume:Et(e.onResume),onSwipeStart:U(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:U(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:U(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});TF.displayName=Qs;var[$ge,Vge]=PF(Qs,{onClose(){}}),Fge=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,m=Xd(Qs,r),[g,y]=p.useState(null),x=ie(t,R=>y(R)),w=p.useRef(null),S=p.useRef(null),P=o||m.duration,C=p.useRef(0),E=p.useRef(P),A=p.useRef(0),{onToastAdd:T,onToastRemove:M}=m,_=Et(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),k=p.useCallback(R=>{!R||R===1/0||(window.clearTimeout(A.current),C.current=new Date().getTime(),A.current=window.setTimeout(_,R))},[_]);p.useEffect(()=>{const R=m.viewport;if(R){const z=()=>{k(E.current),c?.()},B=()=>{const F=new Date().getTime()-C.current;E.current=E.current-F,window.clearTimeout(A.current),l?.()};return R.addEventListener(dv,B),R.addEventListener(fv,z),()=>{R.removeEventListener(dv,B),R.removeEventListener(fv,z)}}},[m.viewport,P,l,c,k]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&k(P)},[i,P,m.isClosePausedRef,k]),p.useEffect(()=>(T(),()=>M()),[T,M]);const N=p.useMemo(()=>g?IF(g):null,[g]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(Bge,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:N}),b.jsx($ge,{scope:r,onClose:_,children:as.createPortal(b.jsx(rx.ItemSlot,{scope:r,children:b.jsx(mz,{asChild:!0,onEscapeKeyDown:U(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ee.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,R=>{R.key==="Escape"&&(s?.(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:U(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:U(e.onPointerMove,R=>{if(!w.current)return;const z=R.clientX-w.current.x,B=R.clientY-w.current.y,F=!!S.current,j=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=j?L(0,z):0,re=j?0:L(0,B),le=R.pointerType==="touch"?10:2,ae={x:H,y:re},oe={originalEvent:R,delta:ae};F?(S.current=ae,Fl(Ige,d,oe,{discrete:!1})):_O(ae,m.swipeDirection,le)?(S.current=ae,Fl(jge,u,oe,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(z)>le||Math.abs(B)>le)&&(w.current=null)}),onPointerUp:U(e.onPointerUp,R=>{const z=S.current,B=R.target;if(B.hasPointerCapture(R.pointerId)&&B.releasePointerCapture(R.pointerId),S.current=null,w.current=null,z){const F=R.currentTarget,j={originalEvent:R,delta:z};_O(z,m.swipeDirection,m.swipeThreshold)?Fl(Lge,h,j,{discrete:!0}):Fl(Rge,f,j,{discrete:!0}),F.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Bge=e=>{const{__scopeToast:t,children:r,...n}=e,o=Xd(Qs,t),[i,a]=p.useState(!1),[s,l]=p.useState(!1);return Kge(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Bo,{asChild:!0,children:b.jsx(Kd,{...n,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",r]})})})},Wge="ToastTitle",MF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});MF.displayName=Wge;var zge="ToastDescription",kF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});kF.displayName=zge;var DF="ToastAction",_F=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?b.jsx(jF,{altText:r,asChild:!0,children:b.jsx(nx,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${DF}\`. Expected non-empty \`string\`.`),null)});_F.displayName=DF;var NF="ToastClose",nx=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Vge(NF,r);return b.jsx(jF,{asChild:!0,children:b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});nx.displayName=NF;var jF=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return b.jsx(ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function IF(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Uge(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...IF(n))}}),t}function Fl(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?vv(o,i):o.dispatchEvent(i)}var _O=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return t==="left"||t==="right"?i&&n>r:!i&&o>r};function Kge(e=()=>{}){const t=Et(e);pt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Uge(e){return e.nodeType===e.ELEMENT_NODE}function Hge(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function yh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Gge=CF,Yge=EF,qge=TF,Xge=MF,Zge=kF,Qge=_F,Jge=nx;const eye=Gge,RF=p.forwardRef(({className:e,...t},r)=>b.jsx(Yge,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-105",e),...t}));RF.displayName="ToastViewport";const LF=te(["group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all","data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out","data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full"],{variants:{variant:{default:"border-border bg-main text-primary",success:"border-sunflower/30 bg-eggshell text-primary [&>svg]:text-sunflower",error:"border-error/30 bg-main text-primary [&>svg]:text-error",warning:"border-sunflower/50 bg-vanilla text-primary [&>svg]:text-sunflower",info:"border-electric-blue/30 bg-main text-primary [&>svg]:text-electric-blue"}},defaultVariants:{variant:"default"}}),$F=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(qge,{ref:n,className:D(LF({variant:t}),e),...r}));$F.displayName="Toast";const VF=p.forwardRef(({className:e,...t},r)=>b.jsx(Qge,{ref:r,className:D("rounded-pill border-border inline-flex h-8 shrink-0 items-center justify-center border bg-transparent px-3 text-sm font-medium","ring-offset-main transition-colors","hover:bg-alt","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none disabled:opacity-50","group-[.error]:border-error/30 group-[.error]:hover:border-error/50 group-[.error]:hover:bg-error/10 group-[.error]:focus:ring-error",e),...t}));VF.displayName="ToastAction";const FF=p.forwardRef(({className:e,...t},r)=>b.jsxs(Jge,{ref:r,className:D("text-secondary absolute top-2 right-2 rounded-sm p-1 opacity-0 transition-opacity","hover:text-primary","focus:ring-sunflower focus:opacity-100 focus:ring-2 focus:outline-none","group-hover:opacity-100","group-[.error]:text-error/70 group-[.error]:hover:text-error group-[.error]:focus:ring-error group-[.error]:focus:ring-offset-error",e),"toast-close":"",...t,children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}));FF.displayName="ToastClose";const BF=p.forwardRef(({className:e,...t},r)=>b.jsx(Xge,{ref:r,className:D("text-sm",e),...t}));BF.displayName="ToastTitle";const WF=p.forwardRef(({className:e,...t},r)=>b.jsx(Zge,{ref:r,className:D("text-secondary text-sm",e),...t}));WF.displayName="ToastDescription";var tye=Symbol("radix.slottable");function rye(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=tye,t}var[Zd]=it("Tooltip",[Zn]),Qd=Zn(),zF="TooltipProvider",nye=700,hv="tooltip.open",[oye,ox]=Zd(zF),KF=e=>{const{__scopeTooltip:t,delayDuration:r=nye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=p.useRef(!0),s=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(oye,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};KF.displayName=zF;var os="Tooltip",[iye,Js]=Zd(os),UF=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=ox(os,e.__scopeTooltip),c=Qd(t),[u,d]=p.useState(null),f=It(),h=p.useRef(0),v=a??l.disableHoverableContent,m=s??l.delayDuration,g=p.useRef(!1),[y,x]=xt({prop:n,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(hv))):l.onClose(),i?.(E)},caller:os}),w=p.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,x(!0)},[x]),P=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),C=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0),h.current=0},m)},[m,x]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),b.jsx(Fs,{...c,children:b.jsx(iye,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:p.useCallback(()=>{v?P():(window.clearTimeout(h.current),h.current=0)},[P,v]),onOpen:S,onClose:P,disableHoverableContent:v,children:r})})};UF.displayName=os;var mv="TooltipTrigger",HF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Js(mv,r),i=ox(mv,r),a=Qd(r),s=p.useRef(null),l=ie(t,s,o.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(Bs,{asChild:!0,...a,children:b.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:U(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:U(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:U(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});HF.displayName=mv;var ix="TooltipPortal",[aye,sye]=Zd(ix,{forceMount:void 0}),GF=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Js(ix,t);return b.jsx(aye,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};GF.displayName=ix;var Ii="TooltipContent",YF=p.forwardRef((e,t)=>{const r=sye(Ii,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Js(Ii,e.__scopeTooltip);return b.jsx(At,{present:n||a.open,children:a.disableHoverableContent?b.jsx(qF,{side:o,...i,ref:t}):b.jsx(lye,{side:o,...i,ref:t})})}),lye=p.forwardRef((e,t)=>{const r=Js(Ii,e.__scopeTooltip),n=ox(Ii,e.__scopeTooltip),o=p.useRef(null),i=ie(t,o),[a,s]=p.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},x=fye(y,g.getBoundingClientRect()),w=pye(y,x),S=hye(m.getBoundingClientRect()),P=vye([...w,...S]);s(P),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),p.useEffect(()=>{if(a){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(g)||u?.contains(g),w=!mye(y,a);x?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,f]),b.jsx(qF,{...e,ref:i})}),[cye,uye]=Zd(os,{isInside:!1}),dye=rye("TooltipContent"),qF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Js(Ii,r),c=Qd(r),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(hv,u),()=>document.removeEventListener(hv,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(Td,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(dye,{children:n}),b.jsx(cye,{scope:r,isInside:!0,children:b.jsx(fve,{id:l.contentId,role:"tooltip",children:o||n})})]})})});YF.displayName=Ii;var XF="TooltipArrow",ZF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Qd(r);return uye(XF,r).isInside?null:b.jsx(Md,{...o,...n,ref:t})});ZF.displayName=XF;function fye(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pye(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function hye(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function mye(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function vye(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gye(t)}function gye(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yye=KF,bye=UF,xye=HF,wye=GF,Sye=YF,Pye=ZF;const Cye=yye,Oye=bye,Eye=xye,QF=wye,ax=p.forwardRef(({className:e,...t},r)=>b.jsx(Pye,{ref:r,className:D("fill-primary",e),...t}));ax.displayName="TooltipArrow";const JF=te(["z-50 overflow-hidden rounded-md px-3 py-1.5 font-sans shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],{variants:{variant:{default:"bg-primary text-small text-white",light:"bg-card text-primary text-small border-border border"}},defaultVariants:{variant:"default"}}),eB=p.forwardRef(({className:e,variant:t,sideOffset:r=4,showArrow:n=!1,children:o,...i},a)=>b.jsx(QF,{children:b.jsxs(Sye,{ref:a,sideOffset:r,className:D(JF({variant:t,className:e})),...i,children:[o,n&&b.jsx(ax,{className:t==="light"?"fill-card":"fill-primary"})]})}));eB.displayName="TooltipContent";exports.Accordion=bE;exports.AccordionContent=PE;exports.AccordionItem=xE;exports.AccordionTrigger=SE;exports.ActionsMenuButton=gR;exports.AlertDialog=J3;exports.AlertDialogAction=TA;exports.AlertDialogCancel=MA;exports.AlertDialogContent=PA;exports.AlertDialogDescription=AA;exports.AlertDialogFooter=OA;exports.AlertDialogHeader=CA;exports.AlertDialogOverlay=Dv;exports.AlertDialogPortal=wA;exports.AlertDialogTitle=EA;exports.AlertDialogTrigger=e5;exports.Badge=DA;exports.Banner=NA;exports.BarChart=W_;exports.BreadcrumbItem=U_;exports.BreadcrumbSeparator=$y;exports.Breadcrumbs=K_;exports.Button=kv;exports.Calendar=Rs;exports.Card=CN;exports.Checkbox=NN;exports.ContextMenu=_ce;exports.ContextMenuCheckboxItem=bI;exports.ContextMenuContent=gI;exports.ContextMenuGroup=jce;exports.ContextMenuItem=yI;exports.ContextMenuLabel=wI;exports.ContextMenuPortal=hI;exports.ContextMenuRadioGroup=Rce;exports.ContextMenuRadioItem=xI;exports.ContextMenuSeparator=SI;exports.ContextMenuShortcut=PI;exports.ContextMenuSub=Ice;exports.ContextMenuSubContent=vI;exports.ContextMenuSubTrigger=mI;exports.ContextMenuTrigger=Nce;exports.DatePicker=II;exports.DateRangePicker=LI;exports.DateTimePicker=VI;exports.Divider=BI;exports.DropdownMenu=kue;exports.DropdownMenuCheckboxItem=fR;exports.DropdownMenuContent=uR;exports.DropdownMenuGroup=_ue;exports.DropdownMenuItem=dR;exports.DropdownMenuLabel=hR;exports.DropdownMenuPortal=sR;exports.DropdownMenuRadioGroup=jue;exports.DropdownMenuRadioItem=pR;exports.DropdownMenuSeparator=mR;exports.DropdownMenuShortcut=vR;exports.DropdownMenuSub=Nue;exports.DropdownMenuSubContent=cR;exports.DropdownMenuSubTrigger=lR;exports.DropdownMenuTrigger=Due;exports.EngrateLogo=bR;exports.Eyebrow=wR;exports.Footer=PR;exports.FooterBottom=TR;exports.FooterContent=CR;exports.FooterCopyright=MR;exports.FooterHeading=ER;exports.FooterLinks=AR;exports.FooterSection=OR;exports.FormField=_R;exports.FormMessage=fb;exports.Grid=NR;exports.GridItem=jR;exports.Header=RR;exports.HeaderActions=VR;exports.HeaderLogo=LR;exports.HeaderNav=$R;exports.Heading=hb;exports.Input=WR;exports.Label=pb;exports.LineChart=KR;exports.Link=HR;exports.Modal=jL;exports.ModalClose=Ume;exports.ModalContent=LL;exports.ModalDescription=BL;exports.ModalFooter=VL;exports.ModalHeader=$L;exports.ModalOverlay=Gb;exports.ModalPortal=IL;exports.ModalTitle=FL;exports.ModalTrigger=Kme;exports.Pagination=KL;exports.PaginationDot=qL;exports.PaginationDots=GL;exports.PaginationItem=gi;exports.PieChart=ZL;exports.ProgressIndicator=e$;exports.RadioGroup=p$;exports.RadioGroupItem=h$;exports.Select=Yve;exports.SelectContent=H$;exports.SelectGroup=qve;exports.SelectItem=Y$;exports.SelectLabel=G$;exports.SelectScrollDownButton=Zb;exports.SelectScrollUpButton=Xb;exports.SelectSeparator=q$;exports.SelectTrigger=U$;exports.SelectValue=Xve;exports.Sidebar=Q$;exports.SidebarContent=eV;exports.SidebarFooter=tV;exports.SidebarGroup=rV;exports.SidebarGroupLabel=nV;exports.SidebarHeader=J$;exports.SidebarItem=oV;exports.SidebarSeparator=aV;exports.SidebarSub=lV;exports.SidebarSubContent=uV;exports.SidebarSubTrigger=cV;exports.SidebarTrigger=iV;exports.Skeleton=fV;exports.Slider=TV;exports.Spinner=kV;exports.Stack=_V;exports.Stepper=VV;exports.StepperDescription=GV;exports.StepperIndicator=UV;exports.StepperItem=BV;exports.StepperSeparator=qV;exports.StepperTitle=HV;exports.StepperTrigger=zV;exports.Switch=tF;exports.TabContent=xF;exports.TabList=vF;exports.TabTrigger=yF;exports.Table=nF;exports.TableBody=iF;exports.TableCaption=uF;exports.TableCell=cF;exports.TableFooter=aF;exports.TableHead=lF;exports.TableHeader=oF;exports.TableRow=sF;exports.Tabs=pF;exports.Text=qo;exports.Textarea=SF;exports.Toast=$F;exports.ToastAction=VF;exports.ToastClose=FF;exports.ToastDescription=WF;exports.ToastProvider=eye;exports.ToastTitle=BF;exports.ToastViewport=RF;exports.Tooltip=Oye;exports.TooltipArrow=ax;exports.TooltipContent=eB;exports.TooltipPortal=QF;exports.TooltipProvider=Cye;exports.TooltipTrigger=Eye;exports.accordionTriggerVariants=wE;exports.accordionVariants=yE;exports.alertDialogContentVariants=SA;exports.badgeVariants=kA;exports.bannerVariants=_A;exports.barChartVariants=B_;exports.breadcrumbItemVariants=Om;exports.breadcrumbsVariants=z_;exports.buttonVariants=Tu;exports.cardVariants=PN;exports.cn=D;exports.datePickerTriggerVariants=jI;exports.dateRangePickerTriggerVariants=RI;exports.dateTimePickerTriggerVariants=$I;exports.dividerVariants=FI;exports.engrateLogoVariants=yR;exports.eyebrowVariants=xR;exports.footerVariants=SR;exports.gridItemVariants=Uue;exports.gridVariants=Fue;exports.headerVariants=IR;exports.headingVariants=FR;exports.inputVariants=BR;exports.labelVariants=DR;exports.lineChartVariants=zR;exports.linkVariants=UR;exports.miniStepperIndicatorVariants=LV;exports.miniStepperSeparatorVariants=$V;exports.miniStepperVariants=RV;exports.modalContentVariants=RL;exports.paginationDotVariants=YL;exports.paginationDotsVariants=HL;exports.paginationItemVariants=zL;exports.paginationVariants=WL;exports.pieChartVariants=XL;exports.progressBarVariants=JL;exports.progressIndicatorVariants=QL;exports.sidebarItemVariants=ns;exports.sidebarVariants=Z$;exports.skeletonVariants=dV;exports.sliderVariants=AV;exports.spinnerVariants=MV;exports.stackVariants=DV;exports.stepperIndicatorVariants=KV;exports.stepperItemVariants=FV;exports.stepperSeparatorVariants=YV;exports.stepperTriggerVariants=WV;exports.stepperVariants=IV;exports.tabContentVariants=bF;exports.tabListVariants=hF;exports.tabTriggerVariants=gF;exports.tableVariants=rF;exports.textVariants=_L;exports.textareaVariants=wF;exports.toastVariants=LF;exports.tooltipContentVariants=JF;exports.useFilterableTable=Mge;exports.useSidebarContext=Xo;exports.useSidebarSubContext=sV;exports.useSortableTable=Tge;
|
|
108
|
+
`),()=>{P.contains(S)&&P.removeChild(S)}},[t]),b.jsx(_he,{isPresent:t,childRef:s,sizeRef:l,pop:i,children:i===!1?e:p.cloneElement(e,{ref:d})})}const jhe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=vb(Ihe),d=O.useId();let f=!0,h=O.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:r,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;n&&n()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[r,u,n]);return i&&f&&(h={...h}),O.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=b.jsx(Nhe,{pop:a==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),b.jsx(Vd.Provider,{value:h,children:e})};function Ihe(){return new Map}function yL(e=!0){const t=O.useContext(Vd);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,i=O.useId();O.useEffect(()=>{if(e)return o(i)},[e]);const a=O.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const $l=e=>e.key||"";function gO(e){const t=[];return O.Children.forEach(e,r=>{O.isValidElement(r)&&t.push(r)}),t}const Rhe=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=yL(a),f=O.useMemo(()=>gO(e),[e]),h=a&&!u?[]:f.map($l),v=O.useRef(!0),m=O.useRef(f),g=vb(()=>new Map),y=O.useRef(new Set),[x,w]=O.useState(f),[S,P]=O.useState(f);YR(()=>{v.current=!1,m.current=f;for(let A=0;A<S.length;A++){const T=$l(S[A]);h.includes(T)?(g.delete(T),y.current.delete(T)):g.get(T)!==!0&&g.set(T,!1)}},[S,h.length,h.join("-")]);const C=[];if(f!==x){let A=[...f];for(let T=0;T<S.length;T++){const M=S[T],_=$l(M);h.includes(_)||(A.splice(T,0,M),C.push(M))}return i==="wait"&&C.length&&(A=C),P(gO(A)),w(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=O.useContext(mb);return b.jsx(b.Fragment,{children:S.map(A=>{const T=$l(A),M=a&&!u?!1:f===S||h.includes(T),_=()=>{if(y.current.has(T))return;if(y.current.add(T),g.has(T))g.set(T,!0);else return;let k=!0;g.forEach(N=>{N||(k=!1)}),k&&(E?.(),P(m.current),a&&d?.(),n&&n())};return b.jsx(jhe,{isPresent:M,initial:!v.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:M?void 0:_,anchorX:s,anchorY:l,children:A},T)})})},bL=O.createContext({strict:!1}),yO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bO=!1;function Lhe(){if(bO)return;const e={};for(const t in yO)e[t]={isEnabled:r=>yO[t].some(n=>!!r[n])};Y2(e),bO=!0}function xL(){return Lhe(),Spe()}function $he(e){const t=xL();for(const r in e)t[r]={...t[r],...e[r]};Y2(t)}const Vhe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vhe.has(e)}let wL=e=>!gu(e);function Fhe(e){typeof e=="function"&&(wL=t=>t.startsWith("on")?!gu(t):e(t))}try{Fhe(require("@emotion/is-prop-valid").default)}catch{}function Bhe(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(wL(o)||r===!0&&gu(o)||!t&&!gu(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}const Wd=O.createContext({});function Whe(e,t){if(Bd(e)){const{initial:r,animate:n}=e;return{initial:r===!1||ts(r)?r:void 0,animate:ts(n)?n:void 0}}return e.inherit!==!1?t:{}}function zhe(e){const{initial:t,animate:r}=Whe(e,O.useContext(Wd));return O.useMemo(()=>({initial:t,animate:r}),[xO(t),xO(r)])}function xO(e){return Array.isArray(e)?e.join(" "):e}const Ub=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SL(e,t,r){for(const n in t)!Ct(t[n])&&!tL(n,r)&&(e[n]=t[n])}function Khe({transformTemplate:e},t){return O.useMemo(()=>{const r=Ub();return Wb(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Uhe(e,t){const r=e.style||{},n={};return SL(n,r,e),Object.assign(n,Khe(e,t)),n}function Hhe(e,t){const r={},n=Uhe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const PL=()=>({...Ub(),attrs:{}});function Ghe(e,t,r,n){const o=O.useMemo(()=>{const i=PL();return rL(i,t,oL(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};SL(i,e.style,e),o.style={...i,...o.style}}return o}const Yhe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Hb(e){return typeof e!="string"||e.includes("-")?!1:!!(Yhe.indexOf(e)>-1||/[A-Z]/u.test(e))}function qhe(e,t,r,{latestValues:n},o,i=!1,a){const l=(a??Hb(e)?Ghe:Hhe)(t,n,o,e),c=Bhe(t,typeof e=="string",i),u=e!==O.Fragment?{...c,...l,ref:r}:{},{children:d}=t,f=O.useMemo(()=>Ct(d)?d.get():d,[d]);return O.createElement(e,{...u,children:f})}function Xhe({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Zhe(r,n,o,e),renderState:t()}}function Zhe(e,t,r,n){const o={},i=n(e,{});for(const f in i)o[f]=tc(i[f]);let{initial:a,animate:s}=e;const l=Bd(e),c=H2(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Fd(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const v=jb(e,f[h]);if(v){const{transitionEnd:m,transition:g,...y}=v;for(const x in y){let w=y[x];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[x]=w)}for(const x in m)o[x]=m[x]}}}return o}const CL=e=>(t,r)=>{const n=O.useContext(Wd),o=O.useContext(Vd),i=()=>Xhe(e,t,n,o);return r?i():vb(i)},Qhe=CL({scrapeMotionValuesFromProps:zb,createRenderState:Ub}),Jhe=CL({scrapeMotionValuesFromProps:iL,createRenderState:PL}),eme=Symbol.for("motionComponentSymbol");function tme(e,t,r){const n=O.useRef(r);O.useInsertionEffect(()=>{n.current=r});const o=O.useRef(null);return O.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=n.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const OL=O.createContext({});function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rme(e,t,r,n,o,i){const{visualElement:a}=O.useContext(Wd),s=O.useContext(bL),l=O.useContext(Vd),c=O.useContext(Kb),u=c.reducedMotion,d=c.skipAnimations,f=O.useRef(null),h=O.useRef(!1);n=n||s.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,m=O.useContext(OL);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&nme(f.current,r,o,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{v&&g.current&&v.update(r,l)});const y=r[N2],x=O.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return YR(()=>{h.current=!0,v&&(g.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),O.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),v.enteringChildren=void 0)}),v}function nme(e,t,r,n){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:EL(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&li(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function EL(e){if(e)return e.options.allowProjection!==!1?e.projection:EL(e.parent)}function fh(e,{forwardMotionProps:t=!1,type:r}={},n,o){n&&$he(n);const i=r?r==="svg":Hb(e),a=i?Jhe:Qhe;function s(c,u){let d;const f={...O.useContext(Kb),...c,layoutId:ome(c)},{isStatic:h}=f,v=zhe(c),m=a(c,h);if(!h&&GR){ime(f,n);const g=ame(f);d=g.MeasureLayout,v.visualElement=rme(e,m,f,o,g.ProjectionNode,i)}return b.jsxs(Wd.Provider,{value:v,children:[d&&v.visualElement?b.jsx(d,{visualElement:v.visualElement,...f}):null,qhe(e,c,tme(m,v.visualElement,u),m,h,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=O.forwardRef(s);return l[eme]=e,l}function ome({layoutId:e}){const t=O.useContext(mb).id;return t&&e!==void 0?t+"-"+e:e}function ime(e,t){const r=O.useContext(bL).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ji(!1,n,"lazy-strict-mode"):hn(!1,n,"lazy-strict-mode")}}function ame(e){const t=xL(),{drag:r,layout:n}=t;if(!r&&!n)return{};const o={...r,...n};return{MeasureLayout:r?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sme(e,t){if(typeof Proxy>"u")return fh;const r=new Map,n=(i,a)=>fh(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&xb(!1,"motion() is deprecated. Use motion.create() instead."),n(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,fh(a,void 0,e,t)),r.get(a))})}const lme=(e,t)=>t.isSVG??Hb(e)?new Vpe(t):new Npe(t,{allowProjection:e!==O.Fragment});class cme extends eo{constructor(t){super(t),t.animationState||(t.animationState=Kpe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ume=0;class dme extends eo{constructor(){super(...arguments),this.id=ume++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const fme={animation:{Feature:cme},exit:{Feature:dme}};function Xs(e){return{point:{x:e.pageX,y:e.pageY}}}const pme=e=>t=>$b(t)&&e(t,Xs(t));function ka(e,t,r,n){return rs(e,t,pme(r),n)}const AL=({current:e})=>e?e.ownerDocument.defaultView:null,wO=(e,t)=>Math.abs(e-t);function hme(e,t){const r=wO(e.x,t.x),n=wO(e.y,t.y);return Math.sqrt(r**2+n**2)}const SO=new Set(["auto","scroll"]);class TL{constructor(t,r,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=hh(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=hme(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:g}=h,{timestamp:y}=yt;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;v||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ph(v,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=hh(h.type==="pointercancel"?this.lastMoveEventInfo:ph(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),g&&g(h,x)},!$b(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=o||window;const l=Xs(t),c=ph(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=r;f&&f(t,hh(c,this.history)),this.removeListeners=Gs(ka(this.contextWindow,"pointermove",this.handlePointerMove),ka(this.contextWindow,"pointerup",this.handlePointerUp),ka(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(SO.has(n.overflowX)||SO.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-r.x,y:o.y-r.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),_e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kn(this.updatePoint)}}function ph(e,t){return t?{point:t(e.point)}:e}function PO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hh({point:e},t){return{point:e,delta:PO(e,ML(t)),offset:PO(e,mme(t)),velocity:vme(t,.1)}}function mme(e){return e[0]}function ML(e){return e[e.length-1]}function vme(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ML(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>cr(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&o.timestamp-n.timestamp>cr(t)*2&&(n=e[1]);const i=ar(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function gme(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Be(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Be(r,e,n.max):Math.min(e,r)),e}function CO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function yme(e,{top:t,left:r,bottom:n,right:o}){return{x:CO(e.x,r,o),y:CO(e.y,t,n)}}function OO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function bme(e,t){return{x:OO(e.x,t.x),y:OO(e.y,t.y)}}function xme(e,t){let r=.5;const n=jt(e),o=jt(t);return o>n?r=Qa(t.min,t.max-n,e.min):n>o&&(r=Qa(e.min,e.max-o,t.min)),Ur(0,1,r)}function wme(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const ev=.35;function Sme(e=ev){return e===!1?e=0:e===!0&&(e=ev),{x:EO(e,"left","right"),y:EO(e,"top","bottom")}}function EO(e,t,r){return{min:AO(e,t),max:AO(e,r)}}function AO(e,t){return typeof e=="number"?e:e[t]||0}const Pme=new WeakMap;class Cme{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{r&&this.snapToCursor(Xs(d).point),this.stopAnimation()},a=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Qfe(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Vr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=jt(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&_e.update(()=>m(d,f),!1,!0),Hm(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=Eme(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&_e.update(()=>g(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new TL(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:AL(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,o=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!n)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(n,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!Vl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=gme(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&li(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yme(n.layoutBox,t):this.constraints=!1,this.elastic=Sme(r),o!==this.constraints&&!li(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&kr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wme(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!li(t))return!1;const n=t.current;hn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Ape(n,o.root,this.visualElement.getTransformPagePoint());let a=bme(o.layout.layoutBox,i);if(r){const s=r(Cpe(a));this.hasMutatedConstraints=!!s,s&&(a=X2(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=kr(u=>{if(!Vl(u,r,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Hm(this.visualElement,t),n.start(Nb(t,n,0,r,this.visualElement,!1))}stopAnimation(){kr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){kr(r=>{const{drag:n}=this.getProps();if(!Vl(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[r],l=i.get()||0;i.set(t[r]-Be(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!li(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};kr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=xme({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),kr(a=>{if(!Vl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(Be(l,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Pme.set(this.visualElement,this);const t=this.visualElement.current,r=ka(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&ope(f);u&&d&&!h&&this.start(c)});let n;const o=()=>{const{dragConstraints:c}=this.getProps();li(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Ome(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_e.read(o);const s=rs(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(kr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),r(),a(),l&&l(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=ev,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function TO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ome(e,t,r){const n=I1(e,TO(r)),o=I1(t,TO(r));return()=>{n(),o()}}function Vl(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Eme(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Ame extends eo{constructor(t){super(t),this.removeGroupControls=lr,this.removeListeners=lr,this.controls=new Cme(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const mh=e=>(t,r)=>{e&&_e.update(()=>e(t,r),!1,!0)};class Tme extends eo{constructor(){super(...arguments),this.removePointerDownListener=lr}onPointerDown(t){this.session=new TL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:mh(t),onStart:mh(r),onMove:mh(n),onEnd:(i,a)=>{delete this.session,o&&_e.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ka(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vh=!1;class Mme extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),vh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,t.layoutDependency!==r&&a.setOptions({...a.options,layoutDependency:r}),vh=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||_e.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;vh=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kL(e){const[t,r]=yL(),n=O.useContext(mb);return b.jsx(Mme,{...e,layoutGroup:n,switchLayoutGroup:O.useContext(OL),isPresent:t,safeToRemove:r})}const kme={pan:{Feature:Tme},drag:{Feature:Ame,ProjectionNode:gL,MeasureLayout:kL}};function MO(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Dme extends eo{mount(){const{current:t}=this.node;t&&(this.unmount=epe(t,(r,n)=>(MO(this.node,n,"Start"),o=>MO(this.node,o,"End"))))}unmount(){}}class _me extends eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gs(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kO(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),i=n[o];i&&_e.postRender(()=>i(t,Xs(t)))}class Nme extends eo{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ape(t,(o,i)=>(kO(this.node,i,"Start"),(a,{success:s})=>kO(this.node,a,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:n?.tap===!1})}unmount(){}}const tv=new WeakMap,gh=new WeakMap,jme=e=>{const t=tv.get(e.target);t&&t(e)},Ime=e=>{e.forEach(jme)};function Rme({root:e,...t}){const r=e||document;gh.has(r)||gh.set(r,{});const n=gh.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Ime,{root:e,...t})),n[o]}function Lme(e,t,r){const n=Rme(t);return tv.set(e,r),n.observe(e),()=>{tv.delete(e),n.unobserve(e)}}const $me={some:0,all:1};class Vme extends eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:$me[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lme(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Fme(t,r))&&this.startObserver()}unmount(){}}function Fme({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Bme={inView:{Feature:Vme},tap:{Feature:Nme},focus:{Feature:_me},hover:{Feature:Dme}},Wme={layout:{ProjectionNode:gL,MeasureLayout:kL}},zme={...fme,...Bme,...kme,...Wme},DL=sme(zme,lme),_L=te("font-sans",{variants:{variant:{lead:"text-lead text-primary","semi-lead":"text-semi-lead text-secondary","body-lg":"text-body-lg text-secondary",body:"text-body text-secondary","body-sm":"text-body-sm text-secondary",descriptive:"text-descriptive text-secondary",label:"text-label text-tertiary","label-sm":"text-label-sm text-tertiary"},weight:{regular:"font-normal",medium:"font-medium"}},defaultVariants:{variant:"body",weight:"regular"}}),qo=p.forwardRef(({className:e,variant:t="body",weight:r="regular",as:n="p",asChild:o=!1,...i},a)=>{const s=o?Ie:n;return b.jsx(s,{className:D(_L({variant:t,weight:r,className:e})),ref:a,...i})});qo.displayName="Text";const NL=p.createContext(!1),jL=({open:e,defaultOpen:t=!1,onOpenChange:r,children:n,...o})=>{const[i,a]=p.useState(t),s=e!==void 0,l=s?e:i,c=p.useCallback(u=>{s||a(u),r?.(u)},[s,r]);return b.jsx(NL.Provider,{value:l,children:b.jsx(JE,{open:l,onOpenChange:c,...o,children:n})})};jL.displayName="Modal";const Kme=eA,IL=tA,Ume=Au,Gb=p.forwardRef(({className:e,...t},r)=>b.jsx(rA,{ref:r,forceMount:!0,asChild:!0,...t,children:b.jsx(DL.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.2},className:D("fixed inset-0 z-50 bg-black/20",e)})}));Gb.displayName="ModalOverlay";const RL=te(["fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","bg-main grid w-full gap-4 p-8 shadow-lg","max-h-[85vh] overflow-y-auto","border-border rounded-lg border","focus-visible:ring-sunflower focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"],{variants:{size:{sm:"max-w-[400px]",default:"max-w-[500px]",lg:"max-w-[640px]",full:"max-w-[95vw]"}},defaultVariants:{size:"default"}}),LL=p.forwardRef(({className:e,children:t,size:r,showCloseButton:n=!0,...o},i)=>{const a=p.useContext(NL);return b.jsx(Rhe,{children:a&&b.jsxs(IL,{forceMount:!0,children:[b.jsx(Gb,{}),b.jsx(nA,{ref:i,forceMount:!0,asChild:!0,...o,children:b.jsxs(DL.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:D(RL({size:r}),e),children:[t,n&&b.jsx(Au,{asChild:!0,children:b.jsxs(kv,{variant:"ghost",size:"icon",className:"absolute top-6 right-6",children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})]})})});LL.displayName="ModalContent";const $L=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}));$L.displayName="ModalHeader";const VL=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}));VL.displayName="ModalFooter";const FL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(oA,{ref:n,asChild:!0,...r,children:b.jsx(hb,{level:"h3",className:e,children:t})}));FL.displayName="ModalTitle";const BL=p.forwardRef(({className:e,children:t,...r},n)=>b.jsx(iA,{ref:n,asChild:!0,...r,children:b.jsx(qo,{variant:"semi-lead",className:e,children:t})}));BL.displayName="ModalDescription";const WL=te("flex items-center justify-center gap-1 font-sans",{variants:{size:{sm:"text-small",default:"text-body",lg:"text-lead"}},defaultVariants:{size:"default"}}),zL=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-primary hover:bg-alt active:bg-contrast rounded-full",active:"bg-sunflower text-primary hover:bg-sunflower-hover rounded-full",ellipsis:"text-tertiary cursor-default"},size:{sm:"text-small h-7 w-7",default:"text-small h-9 w-9",lg:"text-body h-11 w-11"}},defaultVariants:{variant:"default",size:"default"}}),KL=p.forwardRef(({className:e,size:t,page:r,totalPages:n,onPageChange:o,siblingCount:i=1,...a},s)=>{const l=p.useMemo(()=>{const d=i*2+3+2;if(n<=d)return Array.from({length:n},(g,y)=>y+1);const f=Math.max(r-i,1),h=Math.min(r+i,n),v=f>2,m=h<n-1;if(!v&&m){const g=3+2*i;return[...Array.from({length:g},(x,w)=>w+1),"ellipsis-right",n]}if(v&&!m){const g=3+2*i;return[1,"ellipsis-left",...Array.from({length:g},(x,w)=>n-g+w+1)]}return v&&m?[1,"ellipsis-left",...Array.from({length:i*2+1},(y,x)=>f+x),"ellipsis-right",n]:Array.from({length:n},(g,y)=>y+1)},[r,n,i]),c=u=>{u>=1&&u<=n&&u!==r&&o?.(u)};return b.jsxs("nav",{ref:s,role:"navigation","aria-label":"Pagination",className:D(WL({size:t,className:e})),...a,children:[b.jsx(gi,{size:t,onClick:()=>c(r-1),disabled:r===1,"aria-label":"Go to previous page",children:b.jsx(Cv,{className:"h-4 w-4"})}),l.map(u=>typeof u=="string"?b.jsx(gi,{size:t,variant:"ellipsis",disabled:!0,"aria-hidden":!0,children:b.jsx(nE,{className:"h-4 w-4"})},u):b.jsx(gi,{size:t,variant:u===r?"active":"default",onClick:()=>c(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u)),b.jsx(gi,{size:t,onClick:()=>c(r+1),disabled:r===n,"aria-label":"Go to next page",children:b.jsx(Ov,{className:"h-4 w-4"})})]})});KL.displayName="Pagination";const gi=p.forwardRef(({className:e,variant:t,size:r,...n},o)=>b.jsx("button",{ref:o,type:"button",className:D(zL({variant:t,size:r,className:e})),...n}));gi.displayName="PaginationItem";const UL=p.createContext(null);function Hme(){const e=p.useContext(UL);if(!e)throw new Error("PaginationDot must be used within a PaginationDots component");return e}const HL=te("inline-flex items-center justify-center font-sans",{variants:{size:{sm:"gap-1.5",default:"gap-2",lg:"gap-2.5"}},defaultVariants:{size:"default"}}),GL=p.forwardRef(({className:e,value:t,onValueChange:r,size:n="default",children:o,...i},a)=>b.jsx(UL.Provider,{value:{value:t,onValueChange:r,size:n??"default"},children:b.jsx("div",{ref:a,role:"group","aria-label":"Content navigation",className:D(HL({size:n}),e),...i,children:o})}));GL.displayName="PaginationDots";const YL=te("focus-visible:ring-sunflower rounded-full transition-all duration-300 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",{variants:{size:{sm:"h-1.5",default:"h-2",lg:"h-2.5"},active:{true:"bg-sunflower",false:"bg-border hover:bg-quaternary"}},compoundVariants:[{size:"sm",active:!1,class:"w-1.5"},{size:"default",active:!1,class:"w-2"},{size:"lg",active:!1,class:"w-2.5"},{size:"sm",active:!0,class:"w-4"},{size:"default",active:!0,class:"w-6"},{size:"lg",active:!0,class:"w-8"}],defaultVariants:{size:"default",active:!1}}),qL=p.forwardRef(({className:e,index:t,...r},n)=>{const{value:o,onValueChange:i,size:a}=Hme(),s=t===o;return b.jsx("button",{ref:n,type:"button","aria-label":`Go to slide ${t+1}`,"aria-current":s?"true":void 0,onClick:()=>i?.(t),className:D(YL({size:a,active:s}),e),...r})});qL.displayName="PaginationDot";const XL=te("text-small font-sans tracking-[-0.05em]",{variants:{size:{sm:"h-48",default:"h-72",lg:"h-96"}},defaultVariants:{size:"default"}}),DO=["var(--color-sunflower)","var(--color-electric-blue)","var(--color-cool-purple)","var(--color-deep-blue)","var(--color-warm-purple)"],ZL=p.forwardRef(({className:e,size:t,data:r,showLegend:n=!0,showTooltip:o=!0,innerRadius:i=0,outerRadius:a="80%",paddingAngle:s=0,showLabels:l=!1,startAngle:c=90,endAngle:u=-270,...d},f)=>{const h=p.useMemo(()=>r.reduce((m,g)=>m+g.value,0),[r]),v=p.useCallback(m=>{const{cx:g=0,cy:y=0,midAngle:x=0,percent:w=0}=m,S=m.innerRadius??0,P=m.outerRadius??0,C=Math.PI/180,E=S+(P-S)*.5,A=g+E*Math.cos(-x*C),T=y+E*Math.sin(-x*C);return b.jsx("text",{x:A,y:T,fill:"var(--color-white)",textAnchor:"middle",dominantBaseline:"central",style:{fontSize:"12px",fontFamily:"var(--font-sans)",fontWeight:500},children:`${(w*100).toFixed(0)}%`})},[]);return b.jsx("div",{ref:f,className:D(XL({size:t,className:e})),role:"img",...d,children:b.jsx(Jv,{width:"100%",height:"100%",minWidth:100,minHeight:100,children:b.jsxs(Xne,{children:[o&&b.jsx(gy,{contentStyle:{backgroundColor:"var(--color-white)",border:"1px solid var(--color-border)",borderRadius:"4px",fontFamily:"var(--font-sans)",fontSize:"14px",color:"var(--color-primary)"},labelStyle:{color:"var(--color-secondary)",fontWeight:400},itemStyle:{color:"var(--color-secondary)"},formatter:(m,g)=>[`${m} (${h>0?(Number(m)/h*100).toFixed(1):0}%)`,g]}),n&&b.jsx(qu,{wrapperStyle:{fontFamily:"var(--font-sans)",fontSize:"14px"},formatter:m=>b.jsx("span",{style:{color:"var(--color-secondary)"},children:m})}),b.jsx(t_,{data:r,cx:"50%",cy:"50%",innerRadius:i,outerRadius:a,paddingAngle:s,dataKey:"value",nameKey:"name",startAngle:c,endAngle:u,label:l?v:!1,labelLine:!1,children:r.map((m,g)=>b.jsx(Ds,{fill:m.color||DO[g%DO.length]},`cell-${m.name}-${g}`))})]})})})});ZL.displayName="PieChart";const QL=te("bg-border relative w-full overflow-hidden rounded-full",{variants:{size:{sm:"h-1",default:"h-2",lg:"h-3",xl:"h-4"}},defaultVariants:{size:"default"}}),JL=te("h-full transition-all duration-300 ease-out",{variants:{variant:{default:"bg-sunflower",muted:"bg-secondary",success:"bg-electric-blue"},animated:{true:"animate-pulse",false:""}},defaultVariants:{variant:"default",animated:!1}}),e$=p.forwardRef(({className:e,value:t=0,max:r=100,size:n,variant:o,animated:i,label:a="Progress",indeterminate:s=!1,...l},c)=>{const u=Math.min(Math.max(t/r*100,0),100);return b.jsx("div",{ref:c,role:"progressbar","aria-valuenow":s?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":a,className:D(QL({size:n,className:e})),...l,children:b.jsx("div",{className:D(JL({variant:o,animated:i}),s&&"animate-progress-indeterminate"),style:{width:s?"50%":`${u}%`}})})});e$.displayName="ProgressIndicator";var Yb="Radio",[Gme,t$]=it(Yb),[Yme,qme]=Gme(Yb),r$=p.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=p.useState(null),h=ie(t,g=>f(g)),v=p.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(Yme,{scope:r,checked:o,disabled:a,children:[b.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":a$(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:h,onClick:U(e.onClick,g=>{o||l?.(),m&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})}),m&&b.jsx(i$,{control:d,bubbles:!v.current,name:n,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});r$.displayName=Yb;var n$="RadioIndicator",o$=p.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=qme(n$,r);return b.jsx(At,{present:n||i.checked,children:b.jsx(ee.span,{"data-state":a$(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});o$.displayName=n$;var Xme="RadioBubbleInput",i$=p.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),b.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});i$.displayName=Xme;function a$(e){return e?"checked":"unchecked"}var Zme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zd="RadioGroup",[Qme]=it(zd,[kd,t$]),s$=kd(),l$=t$(),[Jme,eve]=Qme(zd),c$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,h=s$(r),v=Li(c),[m,g]=xt({prop:i,defaultProp:o??null,onChange:d,caller:zd});return b.jsx(Jme,{scope:r,name:n,required:a,disabled:s,value:m,onValueChange:g,children:b.jsx(aj,{asChild:!0,...h,orientation:l,dir:v,loop:u,children:b.jsx(ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:v,...f,ref:t})})})});c$.displayName=zd;var u$="RadioGroupItem",d$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,i=eve(u$,r),a=i.disabled||n,s=s$(r),l=l$(r),c=p.useRef(null),u=ie(t,c),d=i.value===o.value,f=p.useRef(!1);return p.useEffect(()=>{const h=m=>{Zme.includes(m.key)&&(f.current=!0)},v=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),b.jsx(sj,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(r$,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:U(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:U(o.onFocus,()=>{f.current&&c.current?.click()})})})});d$.displayName=u$;var tve="RadioGroupIndicator",f$=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=l$(r);return b.jsx(o$,{...o,...n,ref:t})});f$.displayName=tve;var rve=c$,nve=d$,ove=f$;const p$=p.forwardRef(({className:e,...t},r)=>b.jsx(rve,{className:D("grid gap-2",e),...t,ref:r}));p$.displayName="RadioGroup";const h$=p.forwardRef(({className:e,...t},r)=>b.jsx(nve,{ref:r,className:D("border-border bg-card aspect-square h-5 w-5 rounded-full border transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-sunflower",e),...t,children:b.jsx(ove,{className:"flex items-center justify-center",children:b.jsx("span",{className:"bg-sunflower h-2.5 w-2.5 rounded-full"})})}));h$.displayName="RadioGroupItem";function yu(e,[t,r]){return Math.min(r,Math.max(t,e))}function ive(e){const t=ave(e),r=p.forwardRef((n,o)=>{const{children:i,...a}=n,s=p.Children.toArray(i),l=s.find(lve);if(l){const c=l.props.children,u=s.map(d=>d===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function ave(e){const t=p.forwardRef((r,n)=>{const{children:o,...i}=r;if(p.isValidElement(o)){const a=uve(o),s=cve(i,o.props);return o.type!==p.Fragment&&(s.ref=n?Hr(n,a):a),p.cloneElement(o,s)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sve=Symbol("radix.slottable");function lve(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sve}function cve(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function uve(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var m$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dve="VisuallyHidden",Kd=p.forwardRef((e,t)=>b.jsx(ee.span,{...e,ref:t,style:{...m$,...e.style}}));Kd.displayName=dve;var fve=Kd,pve=[" ","Enter","ArrowUp","ArrowDown"],hve=[" ","Enter"],$o="Select",[Ud,Hd,mve]=Ri($o),[na]=it($o,[mve,Zn]),Gd=Zn(),[vve,to]=na($o),[gve,yve]=na($o),v$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:v}=e,m=Gd(t),[g,y]=p.useState(null),[x,w]=p.useState(null),[S,P]=p.useState(!1),C=Li(c),[E,A]=xt({prop:n,defaultProp:o??!1,onChange:i,caller:$o}),[T,M]=xt({prop:a,defaultProp:s,onChange:l,caller:$o}),_=p.useRef(null),k=g?v||!!g.closest("form"):!0,[N,R]=p.useState(new Set),z=Array.from(N).map(B=>B.props.value).join(";");return b.jsx(Fs,{...m,children:b.jsxs(vve,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:It(),value:T,onValueChange:M,open:E,onOpenChange:A,dir:C,triggerPointerDownPosRef:_,disabled:f,children:[b.jsx(Ud.Provider,{scope:t,children:b.jsx(gve,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(B=>{R(F=>new Set(F).add(B))},[]),onNativeOptionRemove:p.useCallback(B=>{R(F=>{const j=new Set(F);return j.delete(B),j})},[]),children:r})}),k?b.jsxs(B$,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:B=>M(B.target.value),disabled:f,form:v,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},z):null]})})};v$.displayName=$o;var g$="SelectTrigger",y$=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Gd(r),a=to(g$,r),s=a.disabled||n,l=ie(t,a.onTriggerChange),c=Hd(r),u=p.useRef("touch"),[d,f,h]=z$(m=>{const g=c().filter(w=>!w.disabled),y=g.find(w=>w.value===a.value),x=K$(g,m,y);x!==void 0&&a.onValueChange(x.value)}),v=m=>{s||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(Bs,{asChild:!0,...i,children:b.jsx(ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":W$(a.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&v(m)}),onPointerDown:U(o.onPointerDown,m=>{u.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const g=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(g&&m.key===" ")&&pve.includes(m.key)&&(v(),m.preventDefault())})})})});y$.displayName=g$;var b$="SelectValue",x$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=to(b$,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=ie(t,l.onValueNodeChange);return pt(()=>{c(u)},[c,u]),b.jsx(ee.span,{...s,ref:d,style:{pointerEvents:"none"},children:W$(l.value)?b.jsx(b.Fragment,{children:a}):i})});x$.displayName=b$;var bve="SelectIcon",w$=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return b.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});w$.displayName=bve;var xve="SelectPortal",S$=e=>b.jsx(Bo,{asChild:!0,...e});S$.displayName=xve;var Vo="SelectContent",P$=p.forwardRef((e,t)=>{const r=to(Vo,e.__scopeSelect),[n,o]=p.useState();if(pt(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?as.createPortal(b.jsx(C$,{scope:e.__scopeSelect,children:b.jsx(Ud.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(O$,{...e,ref:t})});P$.displayName=Vo;var vr=10,[C$,ro]=na(Vo),wve="SelectContentImpl",Sve=ive("SelectContent.RemoveScroll"),O$=p.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g,...y}=e,x=to(Vo,r),[w,S]=p.useState(null),[P,C]=p.useState(null),E=ie(t,K=>S(K)),[A,T]=p.useState(null),[M,_]=p.useState(null),k=Hd(r),[N,R]=p.useState(!1),z=p.useRef(!1);p.useEffect(()=>{if(w)return Ou(w)},[w]),Pu();const B=p.useCallback(K=>{const[fe,...$]=k().map(V=>V.ref.current),[G]=$.slice(-1),W=document.activeElement;for(const V of K)if(V===W||(V?.scrollIntoView({block:"nearest"}),V===fe&&P&&(P.scrollTop=0),V===G&&P&&(P.scrollTop=P.scrollHeight),V?.focus(),document.activeElement!==W))return},[k,P]),F=p.useCallback(()=>B([A,w]),[B,A,w]);p.useEffect(()=>{N&&F()},[N,F]);const{onOpenChange:j,triggerPointerDownPosRef:L}=x;p.useEffect(()=>{if(w){let K={x:0,y:0};const fe=G=>{K={x:Math.abs(Math.round(G.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(L.current?.y??0))}},$=G=>{K.x<=10&&K.y<=10?G.preventDefault():w.contains(G.target)||j(!1),document.removeEventListener("pointermove",fe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",$,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",$,{capture:!0})}}},[w,j,L]),p.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[H,re]=z$(K=>{const fe=k().filter(W=>!W.disabled),$=fe.find(W=>W.ref.current===document.activeElement),G=K$(fe,K,$);G&&setTimeout(()=>G.ref.current.focus())}),le=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&(T(K),G&&(z.current=!0))},[x.value]),ae=p.useCallback(()=>w?.focus(),[w]),oe=p.useCallback((K,fe,$)=>{const G=!z.current&&!$;(x.value!==void 0&&x.value===fe||G)&&_(K)},[x.value]),Se=n==="popper"?rv:E$,Me=Se===rv?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:g}:{};return b.jsx(C$,{scope:r,content:w,viewport:P,onViewportChange:C,itemRefCallback:le,selectedItem:A,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:F,selectedItemText:M,position:n,isPositioned:N,searchRef:H,children:b.jsx(ls,{as:Sve,allowPinchZoom:!0,children:b.jsx(ss,{asChild:!0,trapped:x.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:U(o,K=>{x.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:b.jsx(Se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:K=>K.preventDefault(),...y,...Me,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:U(y.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&re(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let G=k().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(K.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const W=K.target,V=G.indexOf(W);G=G.slice(V+1)}setTimeout(()=>B(G)),K.preventDefault()}})})})})})})});O$.displayName=wve;var Pve="SelectItemAlignedPosition",E$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=to(Vo,r),a=ro(Vo,r),[s,l]=p.useState(null),[c,u]=p.useState(null),d=ie(t,E=>u(E)),f=Hd(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&g&&y){const E=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=M.left-A.left,V=T.left-W,he=E.left-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.left=zt+"px"}else{const W=A.right-M.right,V=window.innerWidth-T.right-W,he=window.innerWidth-E.right-V,ue=E.width+he,Ye=Math.max(ue,A.width),tt=window.innerWidth-vr,zt=yu(V,[vr,Math.max(vr,tt-Ye)]);s.style.minWidth=ue+"px",s.style.right=zt+"px"}const _=f(),k=window.innerHeight-vr*2,N=m.scrollHeight,R=window.getComputedStyle(c),z=parseInt(R.borderTopWidth,10),B=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),L=z+B+N+j+F,H=Math.min(g.offsetHeight*5,L),re=window.getComputedStyle(m),le=parseInt(re.paddingTop,10),ae=parseInt(re.paddingBottom,10),oe=E.top+E.height/2-vr,Se=k-oe,Me=g.offsetHeight/2,K=g.offsetTop+Me,fe=z+B+K,$=L-fe;if(fe<=oe){const W=_.length>0&&g===_[_.length-1].ref.current;s.style.bottom="0px";const V=c.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(Se,Me+(W?ae:0)+V+F),ue=fe+he;s.style.height=ue+"px"}else{const W=_.length>0&&g===_[0].ref.current;s.style.top="0px";const he=Math.max(oe,z+m.offsetTop+(W?le:0)+Me)+$;s.style.height=he+"px",m.scrollTop=fe-oe+m.offsetTop}s.style.margin=`${vr}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=k+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,g,y,i.dir,n]);pt(()=>w(),[w]);const[S,P]=p.useState();pt(()=>{c&&P(window.getComputedStyle(c).zIndex)},[c]);const C=p.useCallback(E=>{E&&v.current===!0&&(w(),x?.(),v.current=!1)},[w,x]);return b.jsx(Ove,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ee.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});E$.displayName=Pve;var Cve="SelectPopperPosition",rv=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vr,...i}=e,a=Gd(r);return b.jsx(Td,{...a,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});rv.displayName=Cve;var[Ove,qb]=na(Vo,{}),nv="SelectViewport",A$=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=ro(nv,r),a=qb(nv,r),s=ie(t,i.onViewportChange),l=p.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),b.jsx(Ud.Slot,{scope:r,children:b.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f?.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const v=window.innerHeight-vr*2,m=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),y=Math.max(m,g);if(y<v){const x=y+h,w=Math.min(v,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});A$.displayName=nv;var T$="SelectGroup",[Eve,Ave]=na(T$),M$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=It();return b.jsx(Eve,{scope:r,id:o,children:b.jsx(ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});M$.displayName=T$;var k$="SelectLabel",D$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ave(k$,r);return b.jsx(ee.div,{id:o.id,...n,ref:t})});D$.displayName=k$;var bu="SelectItem",[Tve,_$]=na(bu),N$=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=to(bu,r),l=ro(bu,r),c=s.value===n,[u,d]=p.useState(i??""),[f,h]=p.useState(!1),v=ie(t,x=>l.itemRefCallback?.(x,n,o)),m=It(),g=p.useRef("touch"),y=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(Tve,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:p.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:b.jsx(Ud.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:b.jsx(ee.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:U(a.onFocus,()=>h(!0)),onBlur:U(a.onBlur,()=>h(!1)),onClick:U(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:U(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:U(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:U(a.onPointerMove,x=>{g.current=x.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:U(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(hve.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});N$.displayName=bu;var Ea="SelectItemText",j$=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=to(Ea,r),s=ro(Ea,r),l=_$(Ea,r),c=yve(Ea,r),[u,d]=p.useState(null),f=ie(t,y=>d(y),l.onItemTextChange,y=>s.itemTextRefCallback?.(y,l.value,l.disabled)),h=u?.textContent,v=p.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return pt(()=>(m(v),()=>g(v)),[m,g,v]),b.jsxs(b.Fragment,{children:[b.jsx(ee.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?as.createPortal(i.children,a.valueNode):null]})});j$.displayName=Ea;var I$="SelectItemIndicator",R$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _$(I$,r).isSelected?b.jsx(ee.span,{"aria-hidden":!0,...n,ref:t}):null});R$.displayName=I$;var ov="SelectScrollUpButton",L$=p.forwardRef((e,t)=>{const r=ro(ov,e.__scopeSelect),n=qb(ov,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});L$.displayName=ov;var iv="SelectScrollDownButton",$$=p.forwardRef((e,t)=>{const r=ro(iv,e.__scopeSelect),n=qb(iv,e.__scopeSelect),[o,i]=p.useState(!1),a=ie(t,n.onScrollButtonChange);return pt(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?b.jsx(V$,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$$.displayName=iv;var V$=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=ro("SelectScrollButton",r),a=p.useRef(null),s=Hd(r),l=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),pt(()=>{s().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),b.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:U(o.onPointerMove,()=>{i.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:U(o.onPointerLeave,()=>{l()})})}),Mve="SelectSeparator",F$=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return b.jsx(ee.div,{"aria-hidden":!0,...n,ref:t})});F$.displayName=Mve;var av="SelectArrow",kve=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gd(r),i=to(av,r),a=ro(av,r);return i.open&&a.position==="popper"?b.jsx(Md,{...o,...n,ref:t}):null});kve.displayName=av;var Dve="SelectBubbleInput",B$=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(n,o),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.select,{...r,style:{...m$,...r.style},ref:i,defaultValue:t})});B$.displayName=Dve;function W$(e){return e===""||e===void 0}function z$(e){const t=Et(e),r=p.useRef(""),n=p.useRef(0),o=p.useCallback(a=>{const s=r.current+a;t(s),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function K$(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=_ve(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function _ve(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nve=v$,jve=y$,Ive=x$,Rve=w$,Lve=S$,$ve=P$,Vve=A$,Fve=M$,Bve=D$,Wve=N$,zve=j$,Kve=R$,Uve=L$,Hve=$$,Gve=F$;const Yve=Nve,qve=Fve,Xve=Ive,U$=p.forwardRef(({className:e,children:t,variant:r="default",...n},o)=>b.jsxs(jve,{ref:o,className:D("bg-card text-body-sm text-primary flex h-8 w-full items-center justify-between rounded-md border px-3 py-2 font-sans transition-colors","placeholder:text-tertiary placeholder:text-body-sm","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1",r==="default"?"border-border focus-visible:ring-sunflower":"border-error focus-visible:ring-error",e),...n,children:[t,b.jsx(Rve,{asChild:!0,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4 opacity-50",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})})]}));U$.displayName="SelectTrigger";const Xb=p.forwardRef(({className:e,...t},r)=>b.jsx(Uve,{ref:r,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m18 15-6-6-6 6"})})}));Xb.displayName="SelectScrollUpButton";const Zb=p.forwardRef(({className:e,...t},r)=>b.jsx(Hve,{ref:r,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("path",{d:"m6 9 6 6 6-6"})})}));Zb.displayName="SelectScrollDownButton";const H$=p.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>b.jsx(Lve,{children:b.jsxs($ve,{ref:o,className:D("border-border bg-card text-primary relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border font-sans shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[b.jsx(Xb,{}),b.jsx(Vve,{className:D("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),b.jsx(Zb,{})]})}));H$.displayName="SelectContent";const G$=p.forwardRef(({className:e,...t},r)=>b.jsx(Bve,{ref:r,className:D("text-small text-tertiary py-1.5 pr-2 pl-8 font-normal",e),...t}));G$.displayName="SelectLabel";const Y$=p.forwardRef(({className:e,children:t,...r},n)=>b.jsxs(Wve,{ref:n,className:D("text-body-sm relative flex h-8 w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 outline-none select-none","focus:bg-alt focus:text-primary","data-disabled:pointer-events-none data-disabled:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(Kve,{children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:b.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),b.jsx(zve,{children:t})]}));Y$.displayName="SelectItem";const q$=p.forwardRef(({className:e,...t},r)=>b.jsx(Gve,{ref:r,className:D("bg-border -mx-1 my-1 h-px",e),...t}));q$.displayName="SelectSeparator";const X$=p.createContext(null);function Xo(){const e=p.useContext(X$);if(!e)throw new Error("Sidebar components must be used within a Sidebar");return e}const Z$=te(["border-border bg-alt flex h-dvh flex-col border-r transition-[width] duration-300 ease-in-out","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{variant:{default:"",bordered:"border-border border"},width:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",width:"default"}}),Zve={sm:{expanded:"w-52",collapsed:"w-14"},default:{expanded:"w-64",collapsed:"w-16"},lg:{expanded:"w-72",collapsed:"w-20"}},Q$=p.forwardRef(({className:e,variant:t,width:r="default",defaultCollapsed:n=!1,collapsed:o,onCollapsedChange:i,collapsible:a=!0,autoCollapseMobile:s=!0,children:l,...c},u)=>{const[d,f]=p.useState(n),h=o!==void 0,v=h?o:d,m=p.useCallback(x=>{a&&(h||f(x),i?.(x))},[h,i,a]);p.useEffect(()=>{if(!s||!a||typeof window>"u"||!window.matchMedia)return;const x=window.matchMedia("(max-width: 768px)"),w=S=>{m(S.matches)};return w(x),x.addEventListener("change",w),()=>x.removeEventListener("change",w)},[s,a,m]);const g=p.useMemo(()=>({collapsed:v,setCollapsed:m,collapsible:a}),[v,m,a]),y=Zve[r||"default"];return b.jsx(X$.Provider,{value:g,children:b.jsx("aside",{ref:u,className:D(Z$({variant:t}),v?y.collapsed:y.expanded,e),"data-collapsed":v,...c,children:l})})});Q$.displayName="Sidebar";const J$=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex items-center gap-4 px-6 pt-6 pb-4",e),...t}));J$.displayName="SidebarHeader";const eV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("flex-1 overflow-y-auto px-5 py-4",e),...t}));eV.displayName="SidebarContent";const tV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D("border-border mt-auto border-t px-5 py-5",e),...t}));tV.displayName="SidebarFooter";const rV=p.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:D(e),...t}));rV.displayName="SidebarGroup";const nV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n}=Xo();return n?null:b.jsx(qo,{variant:"label",ref:r,className:D("px-4 py-3 uppercase",e),...t})});nV.displayName="SidebarGroupLabel";const ns=te(["group text-small relative flex w-full cursor-pointer items-center gap-3 rounded-md px-4 py-3 font-sans font-normal","text-secondary hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"],{variants:{active:{true:"text-primary",false:""}},defaultVariants:{active:!1}}),oV=p.forwardRef(({className:e,active:t,icon:r,asChild:n=!1,children:o,...i},a)=>{const{collapsed:s}=Xo(),l=n?Ie:"button",c=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",s?"right-1 bottom-0 left-1 h-0.5":"top-1 bottom-1 left-0 w-0.5",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),u=b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx(qo,{variant:"body-sm",className:"truncate",children:o})]});return n?b.jsx(Ie,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:p.isValidElement(o)?p.cloneElement(o,{children:b.jsxs(b.Fragment,{children:[c,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!s&&b.jsx("span",{className:"truncate",children:o.props.children})]})}):o}):b.jsx(l,{ref:a,className:D(ns({active:t}),s&&"justify-center px-2",e),...i,children:u})});oV.displayName="SidebarItem";const iV=p.forwardRef(({className:e,...t},r)=>{const{collapsed:n,setCollapsed:o,collapsible:i}=Xo();return i?b.jsx("button",{ref:r,type:"button",className:D("text-small flex w-full items-center rounded-md p-2 font-sans font-normal","text-secondary hover:bg-vanilla hover:text-primary","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),onClick:()=>o(!n),"aria-label":n?"Expand sidebar":"Collapse sidebar",...t,children:n?b.jsx(Ov,{className:"h-5 w-5"}):b.jsx(Cv,{className:"h-5 w-5"})}):null});iV.displayName="SidebarTrigger";const aV=p.forwardRef(({className:e,...t},r)=>b.jsx("hr",{ref:r,className:D("border-border my-5 border-t",e),...t}));aV.displayName="SidebarSeparator";const sv=p.createContext(null);function sV(){const e=p.useContext(sv);if(!e)throw new Error("SidebarSub components must be used within a SidebarSub");return e}const lV=p.forwardRef(({className:e,defaultOpen:t=!1,open:r,onOpenChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),{collapsed:c}=Xo(),u=r!==void 0,d=u?r:s,f=p.useCallback(v=>{u||l(v),n?.(v)},[u,n]),h=p.useMemo(()=>({open:d,setOpen:f}),[d,f]);return c?b.jsx(sv.Provider,{value:h,children:b.jsx(jd,{open:d,onOpenChange:f,children:b.jsx("div",{ref:a,className:D("relative",e),...i,children:o})})}):b.jsx(sv.Provider,{value:h,children:b.jsx(VO,{open:d,onOpenChange:f,asChild:!0,children:b.jsx("div",{ref:a,className:e,...i,children:o})})})});lV.displayName="SidebarSub";const cV=p.forwardRef(({className:e,active:t,icon:r,children:n,...o},i)=>{const{collapsed:a}=Xo(),{open:s}=sV(),l=b.jsx("span",{className:D("bg-sunflower absolute rounded-full transition-opacity",a?"right-1 bottom-0 left-1 h-0.5":"top-1 bottom-1 left-0 w-0.5",t?"opacity-100":"opacity-0 group-hover:opacity-100"),"aria-hidden":"true"}),c=b.jsxs(b.Fragment,{children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r}),!a&&b.jsxs(b.Fragment,{children:[b.jsx(qo,{variant:"body-sm",className:"flex-1 truncate text-left",children:n}),b.jsx(rE,{className:D("h-4 w-4 shrink-0 transition-transform duration-200",s&&"rotate-180"),"aria-hidden":"true"})]})]});return a?b.jsx(Id,{asChild:!0,children:b.jsxs("button",{ref:i,type:"button",className:D(ns({active:t}),"justify-center px-2",e),...o,children:[l,r&&b.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:r})]})}):b.jsx(FO,{asChild:!0,children:b.jsx("button",{ref:i,type:"button",className:D(ns({active:t}),e),...o,children:c})})});cV.displayName="SidebarSubTrigger";const uV=p.forwardRef(({className:e,children:t,...r},n)=>{const{collapsed:o}=Xo();return o?b.jsx(Rd,{children:b.jsx(Ld,{ref:n,side:"right",align:"start",sideOffset:8,className:D("bg-card border-border z-50 min-w-[180px] rounded-md border p-2 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=right]:slide-in-from-left-2",e),...r,children:t})}):b.jsx(BO,{ref:n,className:D("overflow-hidden","data-[state=open]:animate-collapsible-down","data-[state=closed]:animate-collapsible-up",e),...r,children:b.jsx("div",{className:"space-y-1 pt-1 pl-8",children:t})})});uV.displayName="SidebarSubContent";const dV=te("bg-contrast animate-pulse",{variants:{variant:{default:"rounded-md",circular:"rounded-full",text:"rounded"}},defaultVariants:{variant:"default"}}),fV=p.forwardRef(({className:e,variant:t,width:r,height:n,style:o,...i},a)=>{const s={...o,...r!==void 0&&{width:typeof r=="number"?`${r}px`:r},...n!==void 0&&{height:typeof n=="number"?`${n}px`:n}};return b.jsx("div",{ref:a,"aria-hidden":"true",className:D(dV({variant:t,className:e})),style:s,...i})});fV.displayName="Skeleton";var pV=["PageUp","PageDown"],hV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],mV={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},oa="Slider",[lv,Qve,Jve]=Ri(oa),[vV]=it(oa,[Jve]),[ege,Yd]=vV(oa),gV=p.forwardRef((e,t)=>{const{name:r,min:n=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:v,...m}=e,g=p.useRef(new Set),y=p.useRef(0),w=a==="horizontal"?tge:rge,[S=[],P]=xt({prop:u,defaultProp:c,onChange:_=>{[...g.current][y.current]?.focus(),d(_)}}),C=p.useRef(S);function E(_){const k=sge(S,_);M(_,k)}function A(_){M(_,y.current)}function T(){const _=C.current[y.current];S[y.current]!==_&&f(S)}function M(_,k,{commit:N}={commit:!1}){const R=dge(i),z=fge(Math.round((_-n)/i)*i+n,R),B=yu(z,[n,o]);P((F=[])=>{const j=ige(F,B,k);if(uge(j,l*i)){y.current=j.indexOf(B);const L=String(j)!==String(F);return L&&N&&f(j),L?j:F}else return F})}return b.jsx(ege,{scope:e.__scopeSlider,name:r,disabled:s,min:n,max:o,valueIndexToChangeRef:y,thumbs:g.current,values:S,orientation:a,form:v,children:b.jsx(lv.Provider,{scope:e.__scopeSlider,children:b.jsx(lv.Slot,{scope:e.__scopeSlider,children:b.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:U(m.onPointerDown,()=>{s||(C.current=S)}),min:n,max:o,inverted:h,onSlideStart:s?void 0:E,onSlideMove:s?void 0:A,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(n,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:k})=>{if(!s){const z=pV.includes(_.key)||_.shiftKey&&hV.includes(_.key)?10:1,B=y.current,F=S[B],j=i*z*k;M(F+j,B,{commit:!0})}}})})})})});gV.displayName=oa;var[yV,bV]=vV(oa,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tge=p.forwardRef((e,t)=>{const{min:r,max:n,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=p.useState(null),h=ie(t,w=>f(w)),v=p.useRef(void 0),m=Li(o),g=m==="ltr",y=g&&!i||!g&&i;function x(w){const S=v.current||d.getBoundingClientRect(),P=[0,S.width],E=Qb(P,y?[r,n]:[n,r]);return v.current=S,E(w-S.left)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(xV,{dir:m,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);a?.(S)},onSlideMove:w=>{const S=x(w.clientX);s?.(S)},onSlideEnd:()=>{v.current=void 0,l?.()},onStepKeyDown:w=>{const P=mV[y?"from-left":"from-right"].includes(w.key);c?.({event:w,direction:P?-1:1})}})})}),rge=p.forwardRef((e,t)=>{const{min:r,max:n,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=p.useRef(null),d=ie(t,u),f=p.useRef(void 0),h=!o;function v(m){const g=f.current||u.current.getBoundingClientRect(),y=[0,g.height],w=Qb(y,h?[n,r]:[r,n]);return f.current=g,w(m-g.top)}return b.jsx(yV,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:b.jsx(xV,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const g=v(m.clientY);i?.(g)},onSlideMove:m=>{const g=v(m.clientY);a?.(g)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:m=>{const y=mV[h?"from-bottom":"from-top"].includes(m.key);l?.({event:m,direction:y?-1:1})}})})}),xV=p.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=Yd(oa,r);return b.jsx(ee.span,{...c,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):pV.concat(hV).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():n(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),wV="SliderTrack",SV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(wV,r);return b.jsx(ee.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:t})});SV.displayName=wV;var cv="SliderRange",PV=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,o=Yd(cv,r),i=bV(cv,r),a=p.useRef(null),s=ie(t,a),l=o.values.length,c=o.values.map(f=>EV(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ee.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});PV.displayName=cv;var uv="SliderThumb",CV=p.forwardRef((e,t)=>{const r=Qve(e.__scopeSlider),[n,o]=p.useState(null),i=ie(t,s=>o(s)),a=p.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return b.jsx(nge,{...e,ref:i,index:a})}),nge=p.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:o,...i}=e,a=Yd(uv,r),s=bV(uv,r),[l,c]=p.useState(null),u=ie(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,f=$s(l),h=a.values[n],v=h===void 0?0:EV(h,a.min,a.max),m=age(n,a.values.length),g=f?.[s.size],y=g?lge(g,v,s.direction):0;return p.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${v}% + ${y}px)`},children:[b.jsx(lv.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ee.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),d&&b.jsx(OV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});CV.displayName=uv;var oge="RadioBubbleInput",OV=p.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const o=p.useRef(null),i=ie(o,n),a=Ls(t);return p.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ee.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});OV.displayName=oge;function ige(e=[],t,r){const n=[...e];return n[r]=t,n.sort((o,i)=>o-i)}function EV(e,t,r){const i=100/(r-t)*(e-t);return yu(i,[0,100])}function age(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function sge(e,t){if(e.length===1)return 0;const r=e.map(o=>Math.abs(o-t)),n=Math.min(...r);return r.indexOf(n)}function lge(e,t,r){const n=e/2,i=Qb([0,50],[0,n]);return(n-i(t)*r)*r}function cge(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function uge(e,t){if(t>0){const r=cge(e);return Math.min(...r)>=t}return!0}function Qb(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function dge(e){return(String(e).split(".")[1]||"").length}function fge(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var pge=gV,hge=SV,mge=PV,vge=CV;const AV=te("relative flex w-full touch-none items-center select-none",{variants:{size:{sm:"[--slider-thumb-size:theme(spacing.3)] [--slider-track-height:theme(spacing.1)]",default:"[--slider-thumb-size:theme(spacing.4)] [--slider-track-height:theme(spacing.2)]",lg:"[--slider-thumb-size:theme(spacing.5)] [--slider-track-height:theme(spacing.3)]"}},defaultVariants:{size:"default"}}),TV=p.forwardRef(({className:e,size:t,defaultValue:r=[0],value:n,"aria-label":o,"aria-labelledby":i,...a},s)=>{const l=n?.length??r?.length??1;return b.jsxs(pge,{ref:s,defaultValue:r,value:n,className:D(AV({size:t}),e),...a,children:[b.jsx(hge,{className:D("bg-border relative h-[var(--slider-track-height)] w-full grow overflow-hidden rounded-full"),children:b.jsx(mge,{className:"bg-sunflower absolute h-full"})}),Array.from({length:l}).map((c,u)=>b.jsx(vge,{"aria-label":o,"aria-labelledby":i,className:D("border-sunflower block h-[var(--slider-thumb-size)] w-[var(--slider-thumb-size)] rounded-full border-2 bg-white shadow-md transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","hover:border-sunflower-hover")},u))]})});TV.displayName="Slider";const MV=te("inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",{variants:{variant:{default:"text-sunflower",muted:"text-secondary",inverted:"text-white"},size:{sm:"h-4 w-4 border-2",default:"h-6 w-6 border-2",lg:"h-8 w-8 border-3",xl:"h-12 w-12 border-4"}},defaultVariants:{variant:"default",size:"default"}}),kV=p.forwardRef(({className:e,variant:t,size:r,label:n="Loading",...o},i)=>b.jsx("span",{ref:i,role:"status","aria-label":n,className:D(MV({variant:t,size:r,className:e})),...o,children:b.jsx("span",{className:"sr-only",children:n})}));kV.displayName="Spinner";const DV=te("flex",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"vertical",gap:"md",align:"stretch",justify:"start",wrap:"nowrap"}}),_V=p.forwardRef(({className:e,direction:t,gap:r,align:n,justify:o,wrap:i,as:a="div",asChild:s=!1,...l},c)=>{const u=s?Ie:a;return b.jsx(u,{className:D(DV({direction:t,gap:r,align:n,justify:o,wrap:i,className:e})),ref:c,...l})});_V.displayName="Stack";const NV=p.createContext(null);function Jb(){const e=p.useContext(NV);if(!e)throw new Error("Stepper components must be used within a Stepper");return e}const jV=p.createContext(null);function Zs(){const e=p.useContext(jV);if(!e)throw new Error("StepperItem child components must be used within a StepperItem");return e}const IV=te("flex",{variants:{orientation:{horizontal:"flex-row items-start",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),RV=te("inline-flex items-center font-sans",{variants:{size:{sm:"gap-1",default:"gap-1.5",lg:"gap-2"}},defaultVariants:{size:"default"}}),LV=te("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"h-5 w-5 text-[10px]",default:"h-6 w-6 text-[11px]",lg:"h-7 w-7 text-xs"}},defaultVariants:{size:"default"}}),$V=te("transition-colors",{variants:{size:{sm:"h-0.5 w-3",default:"h-0.5 w-4",lg:"h-0.5 w-5"}},defaultVariants:{size:"default"}}),VV=p.forwardRef(({className:e,variant:t="default",activeStep:r=1,orientation:n="horizontal",totalSteps:o,size:i,labels:a,onStepClick:s,children:l,...c},u)=>{const[d,f]=p.useState(0),h=p.useMemo(()=>({activeStep:r,orientation:n,totalSteps:d,setTotalSteps:f}),[r,n,d]);if(t==="mini"){const v=o??0,m=Array.from({length:v},(g,y)=>y+1);return b.jsx("div",{ref:u,role:"group","aria-label":"Progress",className:D(RV({size:i}),e),...c,children:m.map(g=>{const y=g<r?"completed":g===r?"active":"inactive",x=a?.[g-1]??`Step ${g}`,w=g===v;return b.jsxs(p.Fragment,{children:[b.jsx("button",{type:"button","aria-current":y==="active"?"step":void 0,"aria-label":x,"data-state":y,disabled:!s,onClick:()=>s?.(g),className:D(LV({size:i}),"focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",s?"cursor-pointer":"cursor-default disabled:opacity-100",y==="completed"&&"bg-sunflower text-primary",y==="active"&&"border-sunflower text-primary border-2",y==="inactive"&&"border-border text-tertiary border-2"),children:y==="completed"?b.jsx(tE,{className:D(i==="sm"&&"h-2.5 w-2.5",i==="lg"&&"h-3.5 w-3.5",(!i||i==="default")&&"h-3 w-3"),strokeWidth:3}):g}),!w&&b.jsx("div",{"aria-hidden":"true",className:D($V({size:i}),g<r?"bg-sunflower":"bg-border")})]},g)})})}return b.jsx(NV.Provider,{value:h,children:b.jsxs("div",{ref:u,role:"group","aria-label":"Progress","data-orientation":n,className:D("w-full",e),...c,children:[b.jsx("div",{className:D(IV({orientation:n})),children:l}),n==="horizontal"&&d>0&&b.jsxs("div",{className:"text-tertiary text-body-sm mt-4 text-center font-sans",children:["Step ",Math.min(r,d)," of ",d]})]})})});VV.displayName="Stepper";const FV=te("group relative",{variants:{orientation:{horizontal:"flex flex-1 flex-col items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),BV=p.forwardRef(({className:e,step:t,children:r,...n},o)=>{const{activeStep:i,orientation:a,totalSteps:s,setTotalSteps:l}=Jb(),c=t<i?"completed":t===i?"active":"inactive";p.useEffect(()=>{l(f=>Math.max(f,t))},[t,l]);const u=t===s,d=p.useMemo(()=>({step:t,state:c,isLastStep:u}),[t,c,u]);return b.jsx(jV.Provider,{value:d,children:b.jsx("div",{ref:o,"data-state":c,"data-step":t,"data-orientation":a,className:D(FV({orientation:a}),e),...n,children:r})})});BV.displayName="StepperItem";const WV=te("focus-visible:ring-sunflower flex items-center gap-3 text-left font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{orientation:{horizontal:"flex-col items-center gap-2 text-center",vertical:"flex-row"}},defaultVariants:{orientation:"horizontal"}}),zV=p.forwardRef(({className:e,children:t,...r},n)=>{const{orientation:o}=Jb(),{state:i}=Zs();return b.jsx("button",{ref:n,type:"button","aria-current":i==="active"?"step":void 0,"data-state":i,className:D(WV({orientation:o}),e),...r,children:t})});zV.displayName="StepperTrigger";const KV=te("text-body-sm inline-flex shrink-0 items-center justify-center rounded-full font-sans transition-colors",{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),UV=p.forwardRef(({className:e,size:t,children:r,...n},o)=>{const{state:i,step:a}=Zs();return b.jsx("span",{ref:o,"data-state":i,className:D(KV({size:t}),i==="completed"&&"bg-sunflower text-primary",i==="active"&&"border-sunflower text-primary border-2",i==="inactive"&&"border-border text-tertiary border-2",e),"aria-hidden":"true",...n,children:i==="completed"?b.jsx(tE,{className:"h-4 w-4"}):r??a})});UV.displayName="StepperIndicator";const HV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("span",{ref:r,"data-state":n,className:D("text-body-sm font-sans font-medium tracking-tight",n==="inactive"?"text-tertiary":"text-primary",e),...t})});HV.displayName="StepperTitle";const GV=p.forwardRef(({className:e,...t},r)=>{const{state:n}=Zs();return b.jsx("p",{ref:r,"data-state":n,className:D("text-small font-sans",n==="inactive"?"text-quaternary":"text-secondary",e),...t})});GV.displayName="StepperDescription";const YV=te("transition-colors",{variants:{orientation:{horizontal:"absolute top-[17px] right-[calc(-50%_+_24px)] left-[calc(50%_+_24px)] h-0.5",vertical:"mt-1 mb-1 ml-4.5 min-h-8 w-0.5"}},defaultVariants:{orientation:"horizontal"}}),qV=p.forwardRef(({className:e,...t},r)=>{const{orientation:n}=Jb(),{state:o}=Zs();return b.jsx("div",{ref:r,role:"separator","data-state":o,"data-orientation":n,className:D(YV({orientation:n}),o==="completed"?"bg-sunflower":"bg-border",e),"aria-hidden":"true",...t})});qV.displayName="StepperSeparator";var qd="Switch",[gge]=it(qd),[yge,bge]=gge(qd),XV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=p.useState(null),v=ie(t,w=>h(w)),m=p.useRef(!1),g=f?u||!!f.closest("form"):!0,[y,x]=xt({prop:o,defaultProp:i??!1,onChange:c,caller:qd});return b.jsxs(yge,{scope:r,checked:y,disabled:s,children:[b.jsx(ee.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":eF(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:v,onClick:U(e.onClick,w=>{x(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&b.jsx(JV,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});XV.displayName=qd;var ZV="SwitchThumb",QV=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bge(ZV,r);return b.jsx(ee.span,{"data-state":eF(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});QV.displayName=ZV;var xge="SwitchBubbleInput",JV=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{const a=p.useRef(null),s=ie(a,i),l=Ls(r),c=$s(t);return p.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});JV.displayName=xge;function eF(e){return e?"checked":"unchecked"}var wge=XV,Sge=QV;const tF=p.forwardRef(({className:e,...t},r)=>b.jsx(wge,{className:D("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:ring-sunflower focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-sunflower data-[state=unchecked]:bg-contrast",e),...t,ref:r,children:b.jsx(Sge,{className:D("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));tF.displayName="Switch";const rF=te("text-body w-full caption-bottom border-collapse border-separate border-spacing-0 font-sans",{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Pge=te("border-border bg-alt border-b",{variants:{},defaultVariants:{}}),Cge=te("",{variants:{},defaultVariants:{}}),Oge=te("border-border hover:bg-alt/50 border-b transition-colors",{variants:{},defaultVariants:{}}),Ege=te("text-small text-primary text-left align-middle font-sans font-normal [&:has([role=checkbox])]:pr-0",{variants:{sortable:{true:"hover:bg-contrast cursor-pointer select-none",false:""},size:{default:"h-12 px-4",compact:"h-8 px-2"}},defaultVariants:{sortable:!1,size:"default"}}),Age=te("text-secondary align-middle [&:has([role=checkbox])]:pr-0",{variants:{size:{default:"p-4",compact:"p-2"}},defaultVariants:{size:"default"}}),ex=p.createContext({size:"default",bordered:!1}),nF=p.forwardRef(({className:e,size:t="default",bordered:r=!1,...n},o)=>b.jsx(ex.Provider,{value:{size:t??"default",bordered:r},children:b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:o,className:D(rF({size:t}),e),...n})})}));nF.displayName="Table";const oF=p.forwardRef(({className:e,...t},r)=>b.jsx("thead",{ref:r,className:D(Pge(),e),...t}));oF.displayName="TableHeader";const iF=p.forwardRef(({className:e,...t},r)=>b.jsx("tbody",{ref:r,className:D(Cge(),"[&>tr:last-child>td]:border-b-0",e),...t}));iF.displayName="TableBody";const aF=p.forwardRef(({className:e,...t},r)=>b.jsx("tfoot",{ref:r,className:D("border-border bg-alt text-primary border-t font-normal",e),...t}));aF.displayName="TableFooter";const sF=p.forwardRef(({className:e,...t},r)=>b.jsx("tr",{ref:r,className:D(Oge(),e),...t}));sF.displayName="TableRow";const lF=p.forwardRef(({className:e,children:t,sortable:r=!1,sortDirection:n=null,onSort:o,...i},a)=>{const{size:s,bordered:l}=p.useContext(ex),c=()=>{r&&o&&o()},u=d=>{r&&o&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o())};return b.jsx("th",{ref:a,className:D(Ege({sortable:r,size:s}),l&&"border-border border-b",e),onClick:c,onKeyDown:u,tabIndex:r?0:void 0,role:r?"button":void 0,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":void 0,...i,children:b.jsxs("div",{className:"flex items-center gap-2",children:[t,r&&b.jsxs("span",{className:"inline-flex flex-col","aria-hidden":"true",children:[b.jsx("svg",{className:D("h-3 w-3 transition-opacity",n==="asc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 15l5-5 5 5"})}),b.jsx("svg",{className:D("-mt-1 h-3 w-3 transition-opacity",n==="desc"?"opacity-100":"opacity-30"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:b.jsx("path",{d:"M7 9l5 5 5-5"})})]})]})})});lF.displayName="TableHead";const cF=p.forwardRef(({className:e,children:t,...r},n)=>{const{size:o,bordered:i}=p.useContext(ex);return b.jsx("td",{ref:n,className:D(Age({size:o}),i&&"border-border border-b",e),...r,children:b.jsx(qo,{variant:"body-sm",as:"span",children:t})})});cF.displayName="TableCell";const uF=p.forwardRef(({className:e,...t},r)=>b.jsx("caption",{ref:r,className:D("text-small text-tertiary mt-4 text-left",e),...t}));uF.displayName="TableCaption";function Tge({data:e,initialSortKey:t=null,initialSortDirection:r="asc"}){const[n,o]=p.useState({key:t??null,direction:t?r??"asc":null}),i=p.useCallback(c=>{o(u=>u.key!==c?{key:c,direction:"asc"}:u.direction==="asc"?{key:c,direction:"desc"}:u.direction==="desc"?{key:null,direction:null}:{key:c,direction:"asc"})},[]),{key:a,direction:s}=n;return{sortedData:p.useMemo(()=>!a||!s?e:[...e].sort((c,u)=>{const d=c[a],f=u[a];if(d===f)return 0;let h=0;return typeof d=="string"&&typeof f=="string"?h=d.localeCompare(f):typeof d=="number"&&typeof f=="number"?h=d-f:h=String(d).localeCompare(String(f)),s==="asc"?h:-h}),[e,a,s]),sortKey:a,sortDirection:s,handleSort:i}}function Mge({data:e,filterKeys:t}){const[r,n]=p.useState("");return{filteredData:p.useMemo(()=>{if(!r.trim())return e;const i=r.toLowerCase();return e.filter(a=>t&&t.length>0?t.some(s=>String(a[s]).toLowerCase().includes(i)):Object.values(a).some(s=>String(s).toLowerCase().includes(i)))},[e,r,t]),filterValue:r,setFilterValue:n}}const dF=p.createContext(null);function fF(){const e=p.useContext(dF);if(!e)throw new Error("Tab components must be used within a Tabs component");return e}const pF=p.forwardRef(({className:e,defaultValue:t="",value:r,onValueChange:n,children:o,...i},a)=>{const[s,l]=p.useState(t),c=p.useRef(new Map),u=r!==void 0?r:s,d=p.useCallback(h=>{r===void 0&&l(h),n?.(h)},[r,n]),f=p.useCallback((h,v)=>{v?c.current.set(h,v):c.current.delete(h)},[]);return b.jsx(dF.Provider,{value:{activeTab:u,setActiveTab:d,registerTrigger:f},children:b.jsx("div",{ref:a,className:D("w-full",e),...i,children:o})})});pF.displayName="Tabs";const hF=te("text-body inline-flex items-center font-sans transition-colors",{variants:{variant:{default:"border-border relative gap-1 border-b",pills:"rounded-pill bg-alt gap-2 p-1"}},defaultVariants:{variant:"default"}}),mF=p.createContext(null),vF=p.forwardRef(({className:e,variant:t,...r},n)=>{const o=p.useRef(null),[i,a]=p.useState(null),[s,l]=p.useState(!1),c=p.useRef(!1),u=p.useCallback(h=>{if(h&&o.current){const v=o.current.getBoundingClientRect();a({left:h.left-v.left,width:h.width}),c.current||(c.current=!0,l(!0))}},[]),d=p.useCallback(h=>{o.current=h,typeof n=="function"?n(h):n&&(n.current=h)},[n]),f=p.useMemo(()=>({variant:t??"default",setActiveRect:u}),[t,u]);return b.jsx(mF.Provider,{value:f,children:b.jsxs("div",{ref:d,role:"tablist",className:D(hF({variant:t,className:e})),...r,children:[r.children,t!=="pills"&&i&&b.jsx("span",{className:D("bg-sunflower pointer-events-none absolute bottom-0 h-0.5",s&&"transition-all duration-200 ease-out"),style:{left:i.left,width:i.width},"aria-hidden":"true"})]})})});vF.displayName="TabList";const gF=te("focus-visible:ring-sunflower inline-flex items-center justify-center font-sans font-normal whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-secondary hover:text-primary data-[state=active]:text-primary px-4 py-2",pills:"rounded-pill text-secondary hover:text-primary data-[state=active]:bg-card data-[state=active]:text-primary px-4 py-1.5 data-[state=active]:shadow-sm"},size:{sm:"text-small",default:"text-body",lg:"text-body font-medium"}},defaultVariants:{variant:"default",size:"default"}}),yF=p.forwardRef(({className:e,variant:t,size:r,value:n,...o},i)=>{const{activeTab:a,setActiveTab:s}=fF(),l=p.useContext(mF),c=p.useRef(null),u=a===n,d=p.useCallback(f=>{c.current=f,typeof i=="function"?i(f):i&&(i.current=f)},[i]);return p.useEffect(()=>{if(u&&c.current&&l){const f=()=>{if(c.current){const h=c.current.getBoundingClientRect();l.setActiveRect({left:h.left,width:h.width})}};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)}},[u,l]),b.jsx("button",{ref:d,role:"tab",type:"button","aria-selected":u,"data-state":u?"active":"inactive",onClick:()=>s(n),className:D(gF({variant:t,size:r,className:e})),...o})});yF.displayName="TabTrigger";const bF=te("font-sans",{variants:{size:{sm:"text-small mt-3",default:"text-body mt-4",lg:"text-body mt-6"}},defaultVariants:{size:"default"}}),xF=p.forwardRef(({className:e,size:t,value:r,...n},o)=>{const{activeTab:i}=fF(),a=i===r;return a?b.jsx("div",{ref:o,role:"tabpanel","data-state":a?"active":"inactive",className:D(bF({size:t,className:e})),...n}):null});xF.displayName="TabContent";const wF=te("bg-card text-body-sm text-primary placeholder:text-tertiary placeholder:text-body-sm flex min-h-[80px] w-full rounded-md border px-3 py-2 font-sans transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border focus-visible:ring-sunflower",error:"border-error focus-visible:ring-error"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{variant:"default",resize:"vertical"}}),SF=p.forwardRef(({className:e,variant:t,resize:r,...n},o)=>b.jsx("textarea",{className:D(wF({variant:t,resize:r}),e),ref:o,...n}));SF.displayName="Textarea";var tx="ToastProvider",[rx,kge,Dge]=Ri("Toast"),[PF]=it("Toast",[Dge]),[_ge,Xd]=PF(tx),CF=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=p.useState(null),[c,u]=p.useState(0),d=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${tx}\`. Expected non-empty \`string\`.`),b.jsx(rx.Provider,{scope:t,children:b.jsx(_ge,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:p.useCallback(()=>u(h=>h+1),[]),onToastRemove:p.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};CF.displayName=tx;var OF="ToastViewport",Nge=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",EF=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Nge,label:o="Notifications ({hotkey})",...i}=e,a=Xd(OF,r),s=kge(r),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),f=ie(t,d,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const g=y=>{n.length!==0&&n.every(w=>y[w]||y.code===w)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),p.useEffect(()=>{const g=l.current,y=d.current;if(v&&g&&y){const x=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(dv);y.dispatchEvent(C),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(fv);y.dispatchEvent(C),a.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&w()},P=()=>{g.contains(document.activeElement)||w()};return g.addEventListener("focusin",x),g.addEventListener("focusout",S),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",P),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",P),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,a.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:g})=>{const x=s().map(w=>{const S=w.ref.current,P=[S,...Hge(S)];return g==="forwards"?P:P.reverse()});return(g==="forwards"?x.reverse():x).flat()},[s]);return p.useEffect(()=>{const g=d.current;if(g){const y=x=>{const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const P=document.activeElement,C=x.shiftKey;if(x.target===g&&C){c.current?.focus();return}const T=m({tabbingDirection:C?"backwards":"forwards"}),M=T.findIndex(_=>_===P);yh(T.slice(M+1))?x.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[s,m]),b.jsxs(vz,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&b.jsx(pv,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});yh(g)}}),b.jsx(rx.Slot,{scope:r,children:b.jsx(ee.ol,{tabIndex:-1,...i,ref:f})}),v&&b.jsx(pv,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});yh(g)}})]})});EF.displayName=OF;var AF="ToastFocusProxy",pv=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=Xd(AF,r);return b.jsx(Kd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&n()}})});pv.displayName=AF;var Qs="Toast",jge="toast.swipeStart",Ige="toast.swipeMove",Rge="toast.swipeCancel",Lge="toast.swipeEnd",TF=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=xt({prop:n,defaultProp:o??!0,onChange:i,caller:Qs});return b.jsx(At,{present:r||s,children:b.jsx(Fge,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Et(e.onPause),onResume:Et(e.onResume),onSwipeStart:U(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:U(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:U(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});TF.displayName=Qs;var[$ge,Vge]=PF(Qs,{onClose(){}}),Fge=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,m=Xd(Qs,r),[g,y]=p.useState(null),x=ie(t,R=>y(R)),w=p.useRef(null),S=p.useRef(null),P=o||m.duration,C=p.useRef(0),E=p.useRef(P),A=p.useRef(0),{onToastAdd:T,onToastRemove:M}=m,_=Et(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),k=p.useCallback(R=>{!R||R===1/0||(window.clearTimeout(A.current),C.current=new Date().getTime(),A.current=window.setTimeout(_,R))},[_]);p.useEffect(()=>{const R=m.viewport;if(R){const z=()=>{k(E.current),c?.()},B=()=>{const F=new Date().getTime()-C.current;E.current=E.current-F,window.clearTimeout(A.current),l?.()};return R.addEventListener(dv,B),R.addEventListener(fv,z),()=>{R.removeEventListener(dv,B),R.removeEventListener(fv,z)}}},[m.viewport,P,l,c,k]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&k(P)},[i,P,m.isClosePausedRef,k]),p.useEffect(()=>(T(),()=>M()),[T,M]);const N=p.useMemo(()=>g?IF(g):null,[g]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(Bge,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:N}),b.jsx($ge,{scope:r,onClose:_,children:as.createPortal(b.jsx(rx.ItemSlot,{scope:r,children:b.jsx(mz,{asChild:!0,onEscapeKeyDown:U(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ee.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,R=>{R.key==="Escape"&&(s?.(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:U(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:U(e.onPointerMove,R=>{if(!w.current)return;const z=R.clientX-w.current.x,B=R.clientY-w.current.y,F=!!S.current,j=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=j?L(0,z):0,re=j?0:L(0,B),le=R.pointerType==="touch"?10:2,ae={x:H,y:re},oe={originalEvent:R,delta:ae};F?(S.current=ae,Fl(Ige,d,oe,{discrete:!1})):_O(ae,m.swipeDirection,le)?(S.current=ae,Fl(jge,u,oe,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(z)>le||Math.abs(B)>le)&&(w.current=null)}),onPointerUp:U(e.onPointerUp,R=>{const z=S.current,B=R.target;if(B.hasPointerCapture(R.pointerId)&&B.releasePointerCapture(R.pointerId),S.current=null,w.current=null,z){const F=R.currentTarget,j={originalEvent:R,delta:z};_O(z,m.swipeDirection,m.swipeThreshold)?Fl(Lge,h,j,{discrete:!0}):Fl(Rge,f,j,{discrete:!0}),F.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Bge=e=>{const{__scopeToast:t,children:r,...n}=e,o=Xd(Qs,t),[i,a]=p.useState(!1),[s,l]=p.useState(!1);return Kge(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Bo,{asChild:!0,children:b.jsx(Kd,{...n,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",r]})})})},Wge="ToastTitle",MF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});MF.displayName=Wge;var zge="ToastDescription",kF=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return b.jsx(ee.div,{...n,ref:t})});kF.displayName=zge;var DF="ToastAction",_F=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?b.jsx(jF,{altText:r,asChild:!0,children:b.jsx(nx,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${DF}\`. Expected non-empty \`string\`.`),null)});_F.displayName=DF;var NF="ToastClose",nx=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Vge(NF,r);return b.jsx(jF,{asChild:!0,children:b.jsx(ee.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});nx.displayName=NF;var jF=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return b.jsx(ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function IF(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Uge(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...IF(n))}}),t}function Fl(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?vv(o,i):o.dispatchEvent(i)}var _O=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return t==="left"||t==="right"?i&&n>r:!i&&o>r};function Kge(e=()=>{}){const t=Et(e);pt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Uge(e){return e.nodeType===e.ELEMENT_NODE}function Hge(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function yh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Gge=CF,Yge=EF,qge=TF,Xge=MF,Zge=kF,Qge=_F,Jge=nx;const eye=Gge,RF=p.forwardRef(({className:e,...t},r)=>b.jsx(Yge,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-105",e),...t}));RF.displayName="ToastViewport";const LF=te(["group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all","data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out","data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full"],{variants:{variant:{default:"border-border bg-main text-primary",success:"border-sunflower/30 bg-eggshell text-primary [&>svg]:text-sunflower",error:"border-error/30 bg-main text-primary [&>svg]:text-error",warning:"border-sunflower/50 bg-vanilla text-primary [&>svg]:text-sunflower",info:"border-electric-blue/30 bg-main text-primary [&>svg]:text-electric-blue"}},defaultVariants:{variant:"default"}}),$F=p.forwardRef(({className:e,variant:t,...r},n)=>b.jsx(qge,{ref:n,className:D(LF({variant:t}),e),...r}));$F.displayName="Toast";const VF=p.forwardRef(({className:e,...t},r)=>b.jsx(Qge,{ref:r,className:D("rounded-pill border-border inline-flex h-8 shrink-0 items-center justify-center border bg-transparent px-3 text-sm font-medium","ring-offset-main transition-colors","hover:bg-alt","focus:ring-sunflower focus:ring-2 focus:ring-offset-2 focus:outline-none","disabled:pointer-events-none disabled:opacity-50","group-[.error]:border-error/30 group-[.error]:hover:border-error/50 group-[.error]:hover:bg-error/10 group-[.error]:focus:ring-error",e),...t}));VF.displayName="ToastAction";const FF=p.forwardRef(({className:e,...t},r)=>b.jsxs(Jge,{ref:r,className:D("text-secondary absolute top-2 right-2 rounded-sm p-1 opacity-0 transition-opacity","hover:text-primary","focus:ring-sunflower focus:opacity-100 focus:ring-2 focus:outline-none","group-hover:opacity-100","group-[.error]:text-error/70 group-[.error]:hover:text-error group-[.error]:focus:ring-error group-[.error]:focus:ring-offset-error",e),"toast-close":"",...t,children:[b.jsx(oE,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}));FF.displayName="ToastClose";const BF=p.forwardRef(({className:e,...t},r)=>b.jsx(Xge,{ref:r,className:D("text-sm",e),...t}));BF.displayName="ToastTitle";const WF=p.forwardRef(({className:e,...t},r)=>b.jsx(Zge,{ref:r,className:D("text-secondary text-sm",e),...t}));WF.displayName="ToastDescription";var tye=Symbol("radix.slottable");function rye(e){const t=({children:r})=>b.jsx(b.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=tye,t}var[Zd]=it("Tooltip",[Zn]),Qd=Zn(),zF="TooltipProvider",nye=700,hv="tooltip.open",[oye,ox]=Zd(zF),KF=e=>{const{__scopeTooltip:t,delayDuration:r=nye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=p.useRef(!0),s=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(oye,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};KF.displayName=zF;var os="Tooltip",[iye,Js]=Zd(os),UF=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=ox(os,e.__scopeTooltip),c=Qd(t),[u,d]=p.useState(null),f=It(),h=p.useRef(0),v=a??l.disableHoverableContent,m=s??l.delayDuration,g=p.useRef(!1),[y,x]=xt({prop:n,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(hv))):l.onClose(),i?.(E)},caller:os}),w=p.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,x(!0)},[x]),P=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),C=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0),h.current=0},m)},[m,x]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),b.jsx(Fs,{...c,children:b.jsx(iye,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:p.useCallback(()=>{v?P():(window.clearTimeout(h.current),h.current=0)},[P,v]),onOpen:S,onClose:P,disableHoverableContent:v,children:r})})};UF.displayName=os;var mv="TooltipTrigger",HF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Js(mv,r),i=ox(mv,r),a=Qd(r),s=p.useRef(null),l=ie(t,s,o.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(Bs,{asChild:!0,...a,children:b.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:U(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:U(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:U(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});HF.displayName=mv;var ix="TooltipPortal",[aye,sye]=Zd(ix,{forceMount:void 0}),GF=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Js(ix,t);return b.jsx(aye,{scope:t,forceMount:r,children:b.jsx(At,{present:r||i.open,children:b.jsx(Bo,{asChild:!0,container:o,children:n})})})};GF.displayName=ix;var Ii="TooltipContent",YF=p.forwardRef((e,t)=>{const r=sye(Ii,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Js(Ii,e.__scopeTooltip);return b.jsx(At,{present:n||a.open,children:a.disableHoverableContent?b.jsx(qF,{side:o,...i,ref:t}):b.jsx(lye,{side:o,...i,ref:t})})}),lye=p.forwardRef((e,t)=>{const r=Js(Ii,e.__scopeTooltip),n=ox(Ii,e.__scopeTooltip),o=p.useRef(null),i=ie(t,o),[a,s]=p.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((v,m)=>{const g=v.currentTarget,y={x:v.clientX,y:v.clientY},x=fye(y,g.getBoundingClientRect()),w=pye(y,x),S=hye(m.getBoundingClientRect()),P=vye([...w,...S]);s(P),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&u){const v=g=>h(g,u),m=g=>h(g,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,f]),p.useEffect(()=>{if(a){const v=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},x=l?.contains(g)||u?.contains(g),w=!mye(y,a);x?f():w&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,f]),b.jsx(qF,{...e,ref:i})}),[cye,uye]=Zd(os,{isInside:!1}),dye=rye("TooltipContent"),qF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Js(Ii,r),c=Qd(r),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(hv,u),()=>document.removeEventListener(hv,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(Fo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(Td,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(dye,{children:n}),b.jsx(cye,{scope:r,isInside:!0,children:b.jsx(fve,{id:l.contentId,role:"tooltip",children:o||n})})]})})});YF.displayName=Ii;var XF="TooltipArrow",ZF=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Qd(r);return uye(XF,r).isInside?null:b.jsx(Md,{...o,...n,ref:t})});ZF.displayName=XF;function fye(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pye(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function hye(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function mye(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function vye(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gye(t)}function gye(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yye=KF,bye=UF,xye=HF,wye=GF,Sye=YF,Pye=ZF;const Cye=yye,Oye=bye,Eye=xye,QF=wye,ax=p.forwardRef(({className:e,...t},r)=>b.jsx(Pye,{ref:r,className:D("fill-primary",e),...t}));ax.displayName="TooltipArrow";const JF=te(["z-50 overflow-hidden rounded-md px-3 py-1.5 font-sans shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],{variants:{variant:{default:"bg-primary text-small text-white",light:"bg-card text-primary text-small border-border border"}},defaultVariants:{variant:"default"}}),eB=p.forwardRef(({className:e,variant:t,sideOffset:r=4,showArrow:n=!1,children:o,...i},a)=>b.jsx(QF,{children:b.jsxs(Sye,{ref:a,sideOffset:r,className:D(JF({variant:t,className:e})),...i,children:[o,n&&b.jsx(ax,{className:t==="light"?"fill-card":"fill-primary"})]})}));eB.displayName="TooltipContent";exports.Accordion=bE;exports.AccordionContent=PE;exports.AccordionItem=xE;exports.AccordionTrigger=SE;exports.ActionsMenuButton=gR;exports.AlertDialog=J3;exports.AlertDialogAction=TA;exports.AlertDialogCancel=MA;exports.AlertDialogContent=PA;exports.AlertDialogDescription=AA;exports.AlertDialogFooter=OA;exports.AlertDialogHeader=CA;exports.AlertDialogOverlay=Dv;exports.AlertDialogPortal=wA;exports.AlertDialogTitle=EA;exports.AlertDialogTrigger=e5;exports.Badge=DA;exports.Banner=NA;exports.BarChart=W_;exports.BreadcrumbItem=U_;exports.BreadcrumbSeparator=$y;exports.Breadcrumbs=K_;exports.Button=kv;exports.Calendar=Rs;exports.Card=CN;exports.Checkbox=NN;exports.ContextMenu=_ce;exports.ContextMenuCheckboxItem=bI;exports.ContextMenuContent=gI;exports.ContextMenuGroup=jce;exports.ContextMenuItem=yI;exports.ContextMenuLabel=wI;exports.ContextMenuPortal=hI;exports.ContextMenuRadioGroup=Rce;exports.ContextMenuRadioItem=xI;exports.ContextMenuSeparator=SI;exports.ContextMenuShortcut=PI;exports.ContextMenuSub=Ice;exports.ContextMenuSubContent=vI;exports.ContextMenuSubTrigger=mI;exports.ContextMenuTrigger=Nce;exports.DatePicker=II;exports.DateRangePicker=LI;exports.DateTimePicker=VI;exports.Divider=BI;exports.DropdownMenu=kue;exports.DropdownMenuCheckboxItem=fR;exports.DropdownMenuContent=uR;exports.DropdownMenuGroup=_ue;exports.DropdownMenuItem=dR;exports.DropdownMenuLabel=hR;exports.DropdownMenuPortal=sR;exports.DropdownMenuRadioGroup=jue;exports.DropdownMenuRadioItem=pR;exports.DropdownMenuSeparator=mR;exports.DropdownMenuShortcut=vR;exports.DropdownMenuSub=Nue;exports.DropdownMenuSubContent=cR;exports.DropdownMenuSubTrigger=lR;exports.DropdownMenuTrigger=Due;exports.EngrateLogo=bR;exports.Eyebrow=wR;exports.Footer=PR;exports.FooterBottom=TR;exports.FooterContent=CR;exports.FooterCopyright=MR;exports.FooterHeading=ER;exports.FooterLinks=AR;exports.FooterSection=OR;exports.FormField=_R;exports.FormMessage=fb;exports.Grid=NR;exports.GridItem=jR;exports.Header=RR;exports.HeaderActions=VR;exports.HeaderLogo=LR;exports.HeaderNav=$R;exports.Heading=hb;exports.Input=WR;exports.Label=pb;exports.LineChart=KR;exports.Link=HR;exports.Modal=jL;exports.ModalClose=Ume;exports.ModalContent=LL;exports.ModalDescription=BL;exports.ModalFooter=VL;exports.ModalHeader=$L;exports.ModalOverlay=Gb;exports.ModalPortal=IL;exports.ModalTitle=FL;exports.ModalTrigger=Kme;exports.Pagination=KL;exports.PaginationDot=qL;exports.PaginationDots=GL;exports.PaginationItem=gi;exports.PieChart=ZL;exports.ProgressIndicator=e$;exports.RadioGroup=p$;exports.RadioGroupItem=h$;exports.Select=Yve;exports.SelectContent=H$;exports.SelectGroup=qve;exports.SelectItem=Y$;exports.SelectLabel=G$;exports.SelectScrollDownButton=Zb;exports.SelectScrollUpButton=Xb;exports.SelectSeparator=q$;exports.SelectTrigger=U$;exports.SelectValue=Xve;exports.Sidebar=Q$;exports.SidebarContent=eV;exports.SidebarFooter=tV;exports.SidebarGroup=rV;exports.SidebarGroupLabel=nV;exports.SidebarHeader=J$;exports.SidebarItem=oV;exports.SidebarSeparator=aV;exports.SidebarSub=lV;exports.SidebarSubContent=uV;exports.SidebarSubTrigger=cV;exports.SidebarTrigger=iV;exports.Skeleton=fV;exports.Slider=TV;exports.Spinner=kV;exports.Stack=_V;exports.Stepper=VV;exports.StepperDescription=GV;exports.StepperIndicator=UV;exports.StepperItem=BV;exports.StepperSeparator=qV;exports.StepperTitle=HV;exports.StepperTrigger=zV;exports.Switch=tF;exports.TabContent=xF;exports.TabList=vF;exports.TabTrigger=yF;exports.Table=nF;exports.TableBody=iF;exports.TableCaption=uF;exports.TableCell=cF;exports.TableFooter=aF;exports.TableHead=lF;exports.TableHeader=oF;exports.TableRow=sF;exports.Tabs=pF;exports.Text=qo;exports.Textarea=SF;exports.Toast=$F;exports.ToastAction=VF;exports.ToastClose=FF;exports.ToastDescription=WF;exports.ToastProvider=eye;exports.ToastTitle=BF;exports.ToastViewport=RF;exports.Tooltip=Oye;exports.TooltipArrow=ax;exports.TooltipContent=eB;exports.TooltipPortal=QF;exports.TooltipProvider=Cye;exports.TooltipTrigger=Eye;exports.accordionTriggerVariants=wE;exports.accordionVariants=yE;exports.alertDialogContentVariants=SA;exports.badgeVariants=kA;exports.bannerVariants=_A;exports.barChartVariants=B_;exports.breadcrumbItemVariants=Om;exports.breadcrumbsVariants=z_;exports.buttonVariants=Tu;exports.cardVariants=PN;exports.cn=D;exports.datePickerTriggerVariants=jI;exports.dateRangePickerTriggerVariants=RI;exports.dateTimePickerTriggerVariants=$I;exports.dividerVariants=FI;exports.engrateLogoVariants=yR;exports.eyebrowVariants=xR;exports.footerVariants=SR;exports.gridItemVariants=Uue;exports.gridVariants=Fue;exports.headerVariants=IR;exports.headingVariants=FR;exports.inputVariants=BR;exports.labelVariants=DR;exports.lineChartVariants=zR;exports.linkVariants=UR;exports.miniStepperIndicatorVariants=LV;exports.miniStepperSeparatorVariants=$V;exports.miniStepperVariants=RV;exports.modalContentVariants=RL;exports.paginationDotVariants=YL;exports.paginationDotsVariants=HL;exports.paginationItemVariants=zL;exports.paginationVariants=WL;exports.pieChartVariants=XL;exports.progressBarVariants=JL;exports.progressIndicatorVariants=QL;exports.sidebarItemVariants=ns;exports.sidebarVariants=Z$;exports.skeletonVariants=dV;exports.sliderVariants=AV;exports.spinnerVariants=MV;exports.stackVariants=DV;exports.stepperIndicatorVariants=KV;exports.stepperItemVariants=FV;exports.stepperSeparatorVariants=YV;exports.stepperTriggerVariants=WV;exports.stepperVariants=IV;exports.tabContentVariants=bF;exports.tabListVariants=hF;exports.tabTriggerVariants=gF;exports.tableVariants=rF;exports.textVariants=_L;exports.textareaVariants=wF;exports.toastVariants=LF;exports.tooltipContentVariants=JF;exports.useFilterableTable=Mge;exports.useSidebarContext=Xo;exports.useSidebarSubContext=sV;exports.useSortableTable=Tge;
|