Files
2026-09-20 08:53:09 -07:00

51 lines
125 KiB
JavaScript

function hs(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bt={exports:{}},qe={};var tr;function ys(){if(tr)return qe;tr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:i}}return qe.Fragment=t,qe.jsx=n,qe.jsxs=n,qe}var nr;function ws(){return nr||(nr=1,Bt.exports=ys()),Bt.exports}var m=ws(),Wt={exports:{}},V={};var rr;function xs(){if(rr)return V;rr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function h(g){return g===null||typeof g!="object"?null:(g=y&&g[y]||g["@@iterator"],typeof g=="function"?g:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,v={};function w(g,T,j){this.props=g,this.context=T,this.refs=v,this.updater=j||E}w.prototype.isReactComponent={},w.prototype.setState=function(g,T){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,T,"setState")},w.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function C(){}C.prototype=w.prototype;function x(g,T,j){this.props=g,this.context=T,this.refs=v,this.updater=j||E}var S=x.prototype=new C;S.constructor=x,f(S,w.prototype),S.isPureReactComponent=!0;var R=Array.isArray;function P(){}var b={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function O(g,T,j){var k=j.ref;return{$$typeof:e,type:g,key:T,ref:k!==void 0?k:null,props:j}}function $(g,T){return O(g.type,T,g.props)}function D(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function B(g){var T={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(j){return T[j]})}var W=/\/+/g;function A(g,T){return typeof g=="object"&&g!==null&&g.key!=null?B(""+g.key):T.toString(36)}function K(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(P,P):(g.status="pending",g.then(function(T){g.status==="pending"&&(g.status="fulfilled",g.value=T)},function(T){g.status==="pending"&&(g.status="rejected",g.reason=T)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function L(g,T,j,k,U){var Y=typeof g;(Y==="undefined"||Y==="boolean")&&(g=null);var _=!1;if(g===null)_=!0;else switch(Y){case"bigint":case"string":case"number":_=!0;break;case"object":switch(g.$$typeof){case e:case t:_=!0;break;case d:return _=g._init,L(_(g._payload),T,j,k,U)}}if(_)return U=U(g),_=k===""?"."+A(g,0):k,R(U)?(j="",_!=null&&(j=_.replace(W,"$&/")+"/"),L(U,T,j,"",function(Z){return Z})):U!=null&&(D(U)&&(U=$(U,j+(U.key==null||g&&g.key===U.key?"":(""+U.key).replace(W,"$&/")+"/")+_)),T.push(U)),1;_=0;var X=k===""?".":k+":";if(R(g))for(var q=0;q<g.length;q++)k=g[q],Y=X+A(k,q),_+=L(k,T,j,Y,U);else if(q=h(g),typeof q=="function")for(g=q.call(g),q=0;!(k=g.next()).done;)k=k.value,Y=X+A(k,q++),_+=L(k,T,j,Y,U);else if(Y==="object"){if(typeof g.then=="function")return L(K(g),T,j,k,U);throw T=String(g),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return _}function H(g,T,j){if(g==null)return g;var k=[],U=0;return L(g,k,"","",function(Y){return T.call(j,Y,U++)}),k}function I(g){if(g._status===-1){var T=g._result;T=T(),T.then(function(j){(g._status===0||g._status===-1)&&(g._status=1,g._result=j)},function(j){(g._status===0||g._status===-1)&&(g._status=2,g._result=j)}),g._status===-1&&(g._status=0,g._result=T)}if(g._status===1)return g._result.default;throw g._result}var z=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},te={map:H,forEach:function(g,T,j){H(g,function(){T.apply(this,arguments)},j)},count:function(g){var T=0;return H(g,function(){T++}),T},toArray:function(g){return H(g,function(T){return T})||[]},only:function(g){if(!D(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return V.Activity=p,V.Children=te,V.Component=w,V.Fragment=n,V.Profiler=o,V.PureComponent=x,V.StrictMode=r,V.Suspense=u,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,V.__COMPILER_RUNTIME={__proto__:null,c:function(g){return b.H.useMemoCache(g)}},V.cache=function(g){return function(){return g.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(g,T,j){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var k=f({},g.props),U=g.key;if(T!=null)for(Y in T.key!==void 0&&(U=""+T.key),T)!M.call(T,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&T.ref===void 0||(k[Y]=T[Y]);var Y=arguments.length-2;if(Y===1)k.children=j;else if(1<Y){for(var _=Array(Y),X=0;X<Y;X++)_[X]=arguments[X+2];k.children=_}return O(g.type,U,k)},V.createContext=function(g){return g={$$typeof:s,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:i,_context:g},g},V.createElement=function(g,T,j){var k,U={},Y=null;if(T!=null)for(k in T.key!==void 0&&(Y=""+T.key),T)M.call(T,k)&&k!=="key"&&k!=="__self"&&k!=="__source"&&(U[k]=T[k]);var _=arguments.length-2;if(_===1)U.children=j;else if(1<_){for(var X=Array(_),q=0;q<_;q++)X[q]=arguments[q+2];U.children=X}if(g&&g.defaultProps)for(k in _=g.defaultProps,_)U[k]===void 0&&(U[k]=_[k]);return O(g,Y,U)},V.createRef=function(){return{current:null}},V.forwardRef=function(g){return{$$typeof:a,render:g}},V.isValidElement=D,V.lazy=function(g){return{$$typeof:d,_payload:{_status:-1,_result:g},_init:I}},V.memo=function(g,T){return{$$typeof:l,type:g,compare:T===void 0?null:T}},V.startTransition=function(g){var T=b.T,j={};b.T=j;try{var k=g(),U=b.S;U!==null&&U(j,k),typeof k=="object"&&k!==null&&typeof k.then=="function"&&k.then(P,z)}catch(Y){z(Y)}finally{T!==null&&j.types!==null&&(T.types=j.types),b.T=T}},V.unstable_useCacheRefresh=function(){return b.H.useCacheRefresh()},V.use=function(g){return b.H.use(g)},V.useActionState=function(g,T,j){return b.H.useActionState(g,T,j)},V.useCallback=function(g,T){return b.H.useCallback(g,T)},V.useContext=function(g){return b.H.useContext(g)},V.useDebugValue=function(){},V.useDeferredValue=function(g,T){return b.H.useDeferredValue(g,T)},V.useEffect=function(g,T){return b.H.useEffect(g,T)},V.useEffectEvent=function(g){return b.H.useEffectEvent(g)},V.useId=function(){return b.H.useId()},V.useImperativeHandle=function(g,T,j){return b.H.useImperativeHandle(g,T,j)},V.useInsertionEffect=function(g,T){return b.H.useInsertionEffect(g,T)},V.useLayoutEffect=function(g,T){return b.H.useLayoutEffect(g,T)},V.useMemo=function(g,T){return b.H.useMemo(g,T)},V.useOptimistic=function(g,T){return b.H.useOptimistic(g,T)},V.useReducer=function(g,T,j){return b.H.useReducer(g,T,j)},V.useRef=function(g){return b.H.useRef(g)},V.useState=function(g){return b.H.useState(g)},V.useSyncExternalStore=function(g,T,j){return b.H.useSyncExternalStore(g,T,j)},V.useTransition=function(){return b.H.useTransition()},V.version="19.2.0",V}var or;function Lr(){return or||(or=1,Wt.exports=xs()),Wt.exports}var Kt={exports:{}},re={};var ir;function Es(){if(ir)return re;ir=1;var e=Lr();function t(u){var l="https://react.dev/errors/"+u;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(u,l,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:l,implementation:d}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,l){if(u==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return re.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,re.createPortal=function(u,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return i(u,l,null,d)},re.flushSync=function(u){var l=s.T,d=r.p;try{if(s.T=null,r.p=2,u)return u()}finally{s.T=l,r.p=d,r.d.f()}},re.preconnect=function(u,l){typeof u=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,r.d.C(u,l))},re.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},re.preinit=function(u,l){if(typeof u=="string"&&l&&typeof l.as=="string"){var d=l.as,p=a(d,l.crossOrigin),y=typeof l.integrity=="string"?l.integrity:void 0,h=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;d==="style"?r.d.S(u,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:h}):d==="script"&&r.d.X(u,{crossOrigin:p,integrity:y,fetchPriority:h,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},re.preinitModule=function(u,l){if(typeof u=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var d=a(l.as,l.crossOrigin);r.d.M(u,{crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&r.d.M(u)},re.preload=function(u,l){if(typeof u=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var d=l.as,p=a(d,l.crossOrigin);r.d.L(u,d,{crossOrigin:p,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},re.preloadModule=function(u,l){if(typeof u=="string")if(l){var d=a(l.as,l.crossOrigin);r.d.m(u,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else r.d.m(u)},re.requestFormReset=function(u){r.d.r(u)},re.unstable_batchedUpdates=function(u,l){return u(l)},re.useFormState=function(u,l,d){return s.H.useFormState(u,l,d)},re.useFormStatus=function(){return s.H.useHostTransitionStatus()},re.version="19.2.0",re}var sr;function Cs(){if(sr)return Kt.exports;sr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kt.exports=Es(),Kt.exports}var c=Lr();const we=Dr(c),kr=hs({__proto__:null,default:we},[c]);var Ke=Cs();const jr=Dr(Ke);function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function ar(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bn(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ar(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ar(e[o],null)}}}}function G(...e){return c.useCallback(bn(...e),e)}function Ss(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,u=c.useMemo(()=>a,Object.values(a));return m.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),u=n.length;n=[...n,s];const l=p=>{const{scope:y,children:h,...E}=p,f=y?.[e]?.[u]||a,v=c.useMemo(()=>E,Object.values(E));return m.jsx(f.Provider,{value:v,children:h})};l.displayName=i+"Provider";function d(p,y){const h=y?.[e]?.[u]||a,E=c.useContext(h);if(E)return E;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[l,d]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const u=a?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,Rs(o,...t)]}function Rs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:u,scopeName:l})=>{const p=u(i)[`__scope${l}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function He(e){const t=bs(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),u=a.find(Ps);if(u){const l=u.props.children,d=a.map(p=>p===u?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:p);return m.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,d):null})}return m.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Vu=He("Slot");function bs(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=As(o),a=_s(i,o.props);return o.type!==c.Fragment&&(a.ref=r?bn(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fr=Symbol("radix.slottable");function Ts(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Fr,t}function Ps(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fr}function _s(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function As(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function et(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=f=>{const{scope:v,children:w}=f,C=we.useRef(null),x=we.useRef(new Map).current;return m.jsx(o,{scope:v,itemMap:x,collectionRef:C,children:w})};s.displayName=t;const a=e+"CollectionSlot",u=He(a),l=we.forwardRef((f,v)=>{const{scope:w,children:C}=f,x=i(a,w),S=G(v,x.collectionRef);return m.jsx(u,{ref:S,children:C})});l.displayName=a;const d=e+"CollectionItemSlot",p="data-radix-collection-item",y=He(d),h=we.forwardRef((f,v)=>{const{scope:w,children:C,...x}=f,S=we.useRef(null),R=G(v,S),P=i(d,w);return we.useEffect(()=>(P.itemMap.set(S,{ref:S,...x}),()=>{P.itemMap.delete(S)})),m.jsx(y,{[p]:"",ref:R,children:C})});h.displayName=d;function E(f){const v=i(e+"CollectionConsumer",f);return we.useCallback(()=>{const C=v.collectionRef.current;if(!C)return[];const x=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((P,b)=>x.indexOf(P.ref.current)-x.indexOf(b.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:h},E,r]}var Ns=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=Ns.reduce((e,t)=>{const n=He(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(u,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vt(e,t){e&&Ke.flushSync(()=>e.dispatchEvent(t))}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Os(e,t=globalThis?.document){const n=ne(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Is="DismissableLayer",tn="dismissableLayer.update",Ms="dismissableLayer.pointerDownOutside",Ds="dismissableLayer.focusOutside",cr,$r=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ue=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...u}=e,l=c.useContext($r),[d,p]=c.useState(null),y=d?.ownerDocument??globalThis?.document,[,h]=c.useState({}),E=G(t,b=>p(b)),f=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(v),C=d?f.indexOf(d):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=C>=w,R=ks(b=>{const M=b.target,O=[...l.branches].some($=>$.contains(M));!S||O||(o?.(b),s?.(b),b.defaultPrevented||a?.())},y),P=js(b=>{const M=b.target;[...l.branches].some($=>$.contains(M))||(i?.(b),s?.(b),b.defaultPrevented||a?.())},y);return Os(b=>{C===l.layers.size-1&&(r?.(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},y),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(cr=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),lr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=cr)}},[d,y,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),lr())},[d,l]),c.useEffect(()=>{const b=()=>h({});return document.addEventListener(tn,b),()=>document.removeEventListener(tn,b)},[]),m.jsx(F.div,{...u,ref:E,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,P.onFocusCapture),onBlurCapture:N(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,R.onPointerDownCapture)})});Ue.displayName=Is;var Ls="DismissableLayerBranch",Hr=c.forwardRef((e,t)=>{const n=c.useContext($r),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(F.div,{...e,ref:o})});Hr.displayName=Ls;function ks(e,t=globalThis?.document){const n=ne(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){Vr(Ms,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function js(e,t=globalThis?.document){const n=ne(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&Vr(Ds,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lr(){const e=new CustomEvent(tn);document.dispatchEvent(e)}function Vr(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vt(o,i):o.dispatchEvent(i)}var Fs=Ue,$s=Hr,ee=globalThis?.document?c.useLayoutEffect:()=>{},Hs="Portal",Rt=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);ee(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?jr.createPortal(m.jsx(F.div,{...r,ref:t}),s):null});Rt.displayName=Hs;function Vs(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ve=e=>{const{present:t,children:n}=e,r=Bs(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=G(r.ref,Ws(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ve.displayName="Presence";function Bs(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,u]=Vs(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=rt(r.current);i.current=a==="mounted"?l:"none"},[a]),ee(()=>{const l=r.current,d=o.current;if(d!==e){const y=i.current,h=rt(l);e?u("MOUNT"):h==="none"||l?.display==="none"?u("UNMOUNT"):u(d&&y!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ee(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=h=>{const f=rt(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&f&&(u("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},y=h=>{h.target===t&&(i.current=rt(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function rt(e){return e?.animationName||"none"}function Ws(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ks=kr[" useInsertionEffect ".trim().toString()]||ee;function Ae({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=Us({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const l=c.useCallback(d=>{if(a){const p=zs(d)?d(e):d;p!==e&&s.current?.(p)}else i(d)},[a,e,i,s]);return[u,l]}function Us({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Ks(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function zs(e){return typeof e=="function"}var Br=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"}),Ys="VisuallyHidden",bt=c.forwardRef((e,t)=>m.jsx(F.span,{...e,ref:t,style:{...Br,...e.style}}));bt.displayName=Ys;var Wr=bt,Tn="ToastProvider",[Pn,Gs,Xs]=et("Toast"),[Kr]=ye("Toast",[Xs]),[qs,Tt]=Kr(Tn),Ur=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,u]=c.useState(null),[l,d]=c.useState(0),p=c.useRef(!1),y=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tn}\`. Expected non-empty \`string\`.`),m.jsx(Pn.Provider,{scope:t,children:m.jsx(qs,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:u,onToastAdd:c.useCallback(()=>d(h=>h+1),[]),onToastRemove:c.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:y,children:s})})};Ur.displayName=Tn;var zr="ToastViewport",Zs=["F8"],nn="toast.viewportPause",rn="toast.viewportResume",Yr=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Zs,label:o="Notifications ({hotkey})",...i}=e,s=Tt(zr,n),a=Gs(n),u=c.useRef(null),l=c.useRef(null),d=c.useRef(null),p=c.useRef(null),y=G(t,p,s.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=s.toastCount>0;c.useEffect(()=>{const v=w=>{r.length!==0&&r.every(x=>w[x]||w.code===x)&&p.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),c.useEffect(()=>{const v=u.current,w=p.current;if(E&&v&&w){const C=()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(nn);w.dispatchEvent(P),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(rn);w.dispatchEvent(P),s.isClosePausedRef.current=!1}},S=P=>{!v.contains(P.relatedTarget)&&x()},R=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",C),v.addEventListener("focusout",S),v.addEventListener("pointermove",C),v.addEventListener("pointerleave",R),window.addEventListener("blur",C),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",C),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",C),v.removeEventListener("pointerleave",R),window.removeEventListener("blur",C),window.removeEventListener("focus",x)}}},[E,s.isClosePausedRef]);const f=c.useCallback(({tabbingDirection:v})=>{const C=a().map(x=>{const S=x.ref.current,R=[S,...ua(S)];return v==="forwards"?R:R.reverse()});return(v==="forwards"?C.reverse():C).flat()},[a]);return c.useEffect(()=>{const v=p.current;if(v){const w=C=>{const x=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!x){const R=document.activeElement,P=C.shiftKey;if(C.target===v&&P){l.current?.focus();return}const O=f({tabbingDirection:P?"backwards":"forwards"}),$=O.findIndex(D=>D===R);Ut(O.slice($+1))?C.preventDefault():P?l.current?.focus():d.current?.focus()}};return v.addEventListener("keydown",w),()=>v.removeEventListener("keydown",w)}},[a,f]),m.jsxs($s,{ref:u,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&m.jsx(on,{ref:l,onFocusFromOutsideViewport:()=>{const v=f({tabbingDirection:"forwards"});Ut(v)}}),m.jsx(Pn.Slot,{scope:n,children:m.jsx(F.ol,{tabIndex:-1,...i,ref:y})}),E&&m.jsx(on,{ref:d,onFocusFromOutsideViewport:()=>{const v=f({tabbingDirection:"backwards"});Ut(v)}})]})});Yr.displayName=zr;var Gr="ToastFocusProxy",on=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Tt(Gr,n);return m.jsx(bt,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{const a=s.relatedTarget;!i.viewport?.contains(a)&&r()}})});on.displayName=Gr;var tt="Toast",Js="toast.swipeStart",Qs="toast.swipeMove",ea="toast.swipeCancel",ta="toast.swipeEnd",Xr=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,u]=Ae({prop:r,defaultProp:o??!0,onChange:i,caller:tt});return m.jsx(ve,{present:n||a,children:m.jsx(oa,{open:a,...s,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:N(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:N(e.onSwipeMove,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:N(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:N(e.onSwipeEnd,l=>{const{x:d,y:p}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});Xr.displayName=tt;var[na,ra]=Kr(tt,{onClose(){}}),oa=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:u,onResume:l,onSwipeStart:d,onSwipeMove:p,onSwipeCancel:y,onSwipeEnd:h,...E}=e,f=Tt(tt,n),[v,w]=c.useState(null),C=G(t,A=>w(A)),x=c.useRef(null),S=c.useRef(null),R=o||f.duration,P=c.useRef(0),b=c.useRef(R),M=c.useRef(0),{onToastAdd:O,onToastRemove:$}=f,D=ne(()=>{v?.contains(document.activeElement)&&f.viewport?.focus(),s()}),B=c.useCallback(A=>{!A||A===1/0||(window.clearTimeout(M.current),P.current=new Date().getTime(),M.current=window.setTimeout(D,A))},[D]);c.useEffect(()=>{const A=f.viewport;if(A){const K=()=>{B(b.current),l?.()},L=()=>{const H=new Date().getTime()-P.current;b.current=b.current-H,window.clearTimeout(M.current),u?.()};return A.addEventListener(nn,L),A.addEventListener(rn,K),()=>{A.removeEventListener(nn,L),A.removeEventListener(rn,K)}}},[f.viewport,R,u,l,B]),c.useEffect(()=>{i&&!f.isClosePausedRef.current&&B(R)},[i,R,f.isClosePausedRef,B]),c.useEffect(()=>(O(),()=>$()),[O,$]);const W=c.useMemo(()=>v?no(v):null,[v]);return f.viewport?m.jsxs(m.Fragment,{children:[W&&m.jsx(ia,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:W}),m.jsx(na,{scope:n,onClose:D,children:Ke.createPortal(m.jsx(Pn.ItemSlot,{scope:n,children:m.jsx(Fs,{asChild:!0,onEscapeKeyDown:N(a,()=>{f.isFocusedToastEscapeKeyDownRef.current||D(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(F.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":f.swipeDirection,...E,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:N(e.onKeyDown,A=>{A.key==="Escape"&&(a?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:N(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:N(e.onPointerMove,A=>{if(!x.current)return;const K=A.clientX-x.current.x,L=A.clientY-x.current.y,H=!!S.current,I=["left","right"].includes(f.swipeDirection),z=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,te=I?z(0,K):0,g=I?0:z(0,L),T=A.pointerType==="touch"?10:2,j={x:te,y:g},k={originalEvent:A,delta:j};H?(S.current=j,ot(Qs,p,k,{discrete:!1})):ur(j,f.swipeDirection,T)?(S.current=j,ot(Js,d,k,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(K)>T||Math.abs(L)>T)&&(x.current=null)}),onPointerUp:N(e.onPointerUp,A=>{const K=S.current,L=A.target;if(L.hasPointerCapture(A.pointerId)&&L.releasePointerCapture(A.pointerId),S.current=null,x.current=null,K){const H=A.currentTarget,I={originalEvent:A,delta:K};ur(K,f.swipeDirection,f.swipeThreshold)?ot(ta,h,I,{discrete:!0}):ot(ea,y,I,{discrete:!0}),H.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),ia=e=>{const{__scopeToast:t,children:n,...r}=e,o=Tt(tt,t),[i,s]=c.useState(!1),[a,u]=c.useState(!1);return ca(()=>s(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:m.jsx(Rt,{asChild:!0,children:m.jsx(bt,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},sa="ToastTitle",qr=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(F.div,{...r,ref:t})});qr.displayName=sa;var aa="ToastDescription",Zr=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(F.div,{...r,ref:t})});Zr.displayName=aa;var Jr="ToastAction",Qr=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(to,{altText:n,asChild:!0,children:m.jsx(_n,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jr}\`. Expected non-empty \`string\`.`),null)});Qr.displayName=Jr;var eo="ToastClose",_n=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=ra(eo,n);return m.jsx(to,{asChild:!0,children:m.jsx(F.button,{type:"button",...r,ref:t,onClick:N(e.onClick,o.onClose)})})});_n.displayName=eo;var to=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(F.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function no(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),la(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...no(r))}}),t}function ot(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vt(o,i):o.dispatchEvent(i)}var ur=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function ca(e=()=>{}){const t=ne(e);ee(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function la(e){return e.nodeType===e.ELEMENT_NODE}function ua(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ut(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Bu=Ur,Wu=Yr,Ku=Xr,Uu=qr,zu=Zr,Yu=Qr,Gu=_n,da=kr[" useId ".trim().toString()]||(()=>{}),fa=0;function Ee(e){const[t,n]=c.useState(da());return ee(()=>{n(r=>r??String(fa++))},[e]),e||(t?`radix-${t}`:"")}const pa=["top","right","bottom","left"],Ce=Math.min,oe=Math.max,mt=Math.round,it=Math.floor,Se=e=>({x:e,y:e}),va={left:"right",right:"left",bottom:"top",top:"bottom"},ma={start:"end",end:"start"};function sn(e,t,n){return oe(e,Ce(t,n))}function ge(e,t){return typeof e=="function"?e(t):e}function he(e){return e.split("-")[0]}function ze(e){return e.split("-")[1]}function An(e){return e==="x"?"y":"x"}function Nn(e){return e==="y"?"height":"width"}function Re(e){return["top","bottom"].includes(he(e))?"y":"x"}function On(e){return An(Re(e))}function ga(e,t,n){n===void 0&&(n=!1);const r=ze(e),o=On(e),i=Nn(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gt(s)),[s,gt(s)]}function ha(e){const t=gt(e);return[an(e),t,an(t)]}function an(e){return e.replace(/start|end/g,t=>ma[t])}function ya(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function wa(e,t,n,r){const o=ze(e);let i=ya(he(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(an)))),i}function gt(e){return e.replace(/left|right|bottom|top/g,t=>va[t])}function xa(e){return{top:0,right:0,bottom:0,left:0,...e}}function ro(e){return typeof e!="number"?xa(e):{top:e,right:e,bottom:e,left:e}}function ht(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function dr(e,t,n){let{reference:r,floating:o}=e;const i=Re(t),s=On(t),a=Nn(s),u=he(t),l=i==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,y=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(ze(t)){case"start":h[s]-=y*(n&&l?-1:1);break;case"end":h[s]+=y*(n&&l?-1:1);break}return h}const Ea=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=dr(l,r,u),y=r,h={},E=0;for(let f=0;f<a.length;f++){const{name:v,fn:w}=a[f],{x:C,y:x,data:S,reset:R}=await w({x:d,y:p,initialPlacement:r,placement:y,strategy:o,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});d=C??d,p=x??p,h={...h,[v]:{...h[v],...S}},R&&E<=50&&(E++,typeof R=="object"&&(R.placement&&(y=R.placement),R.rects&&(l=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:p}=dr(l,y,u)),f=-1)}return{x:d,y:p,placement:y,strategy:o,middlewareData:h}};async function Je(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:y=!1,padding:h=0}=ge(t,e),E=ro(h),v=a[y?p==="floating"?"reference":"floating":p],w=ht(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:u})),C=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},R=ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:x,strategy:u}):C);return{top:(w.top-R.top+E.top)/S.y,bottom:(R.bottom-w.bottom+E.bottom)/S.y,left:(w.left-R.left+E.left)/S.x,right:(R.right-w.right+E.right)/S.x}}const Ca=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:d=0}=ge(e,t)||{};if(l==null)return{};const p=ro(d),y={x:n,y:r},h=On(o),E=Nn(h),f=await s.getDimensions(l),v=h==="y",w=v?"top":"left",C=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[E]+i.reference[h]-y[h]-i.floating[E],R=y[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let b=P?P[x]:0;(!b||!await(s.isElement==null?void 0:s.isElement(P)))&&(b=a.floating[x]||i.floating[E]);const M=S/2-R/2,O=b/2-f[E]/2-1,$=Ce(p[w],O),D=Ce(p[C],O),B=$,W=b-f[E]-D,A=b/2-f[E]/2+M,K=sn(B,A,W),L=!u.arrow&&ze(o)!=null&&A!==K&&i.reference[E]/2-(A<B?$:D)-f[E]/2<0,H=L?A<B?A-B:A-W:0;return{[h]:y[h]+H,data:{[h]:K,centerOffset:A-K-H,...L&&{alignmentOffset:H}},reset:L}}}),Sa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:f=!0,...v}=ge(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=he(o),C=Re(a),x=he(a)===a,S=await(u.isRTL==null?void 0:u.isRTL(l.floating)),R=y||(x||!f?[gt(a)]:ha(a)),P=E!=="none";!y&&P&&R.push(...wa(a,f,E,S));const b=[a,...R],M=await Je(t,v),O=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&O.push(M[w]),p){const A=ga(o,s,S);O.push(M[A[0]],M[A[1]])}if($=[...$,{placement:o,overflows:O}],!O.every(A=>A<=0)){var D,B;const A=(((D=i.flip)==null?void 0:D.index)||0)+1,K=b[A];if(K)return{data:{index:A,overflows:$},reset:{placement:K}};let L=(B=$.filter(H=>H.overflows[0]<=0).sort((H,I)=>H.overflows[1]-I.overflows[1])[0])==null?void 0:B.placement;if(!L)switch(h){case"bestFit":{var W;const H=(W=$.filter(I=>{if(P){const z=Re(I.placement);return z===C||z==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(z=>z>0).reduce((z,te)=>z+te,0)]).sort((I,z)=>I[1]-z[1])[0])==null?void 0:W[0];H&&(L=H);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function fr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pr(e){return pa.some(t=>e[t]>=0)}const Ra=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ge(e,t);switch(r){case"referenceHidden":{const i=await Je(t,{...o,elementContext:"reference"}),s=fr(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pr(s)}}}case"escaped":{const i=await Je(t,{...o,altBoundary:!0}),s=fr(i,n.floating);return{data:{escapedOffsets:s,escaped:pr(s)}}}default:return{}}}}};async function ba(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=he(n),a=ze(n),u=Re(n)==="y",l=["left","top"].includes(s)?-1:1,d=i&&u?-1:1,p=ge(t,e);let{mainAxis:y,crossAxis:h,alignmentAxis:E}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof E=="number"&&(h=a==="end"?E*-1:E),u?{x:h*d,y:y*l}:{x:y*l,y:h*d}}const Ta=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await ba(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},Pa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:w,y:C}=v;return{x:w,y:C}}},...u}=ge(e,t),l={x:n,y:r},d=await Je(t,u),p=Re(he(o)),y=An(p);let h=l[y],E=l[p];if(i){const v=y==="y"?"top":"left",w=y==="y"?"bottom":"right",C=h+d[v],x=h-d[w];h=sn(C,h,x)}if(s){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",C=E+d[v],x=E-d[w];E=sn(C,E,x)}const f=a.fn({...t,[y]:h,[p]:E});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[y]:i,[p]:s}}}}}},_a=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=ge(e,t),d={x:n,y:r},p=Re(o),y=An(p);let h=d[y],E=d[p];const f=ge(a,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=y==="y"?"height":"width",S=i.reference[y]-i.floating[x]+v.mainAxis,R=i.reference[y]+i.reference[x]-v.mainAxis;h<S?h=S:h>R&&(h=R)}if(l){var w,C;const x=y==="y"?"width":"height",S=["top","left"].includes(he(o)),R=i.reference[p]-i.floating[x]+(S&&((w=s.offset)==null?void 0:w[p])||0)+(S?0:v.crossAxis),P=i.reference[p]+i.reference[x]+(S?0:((C=s.offset)==null?void 0:C[p])||0)-(S?v.crossAxis:0);E<R?E=R:E>P&&(E=P)}return{[y]:h,[p]:E}}}},Aa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...l}=ge(e,t),d=await Je(t,l),p=he(o),y=ze(o),h=Re(o)==="y",{width:E,height:f}=i.floating;let v,w;p==="top"||p==="bottom"?(v=p,w=y===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(w=p,v=y==="end"?"top":"bottom");const C=f-d.top-d.bottom,x=E-d.left-d.right,S=Ce(f-d[v],C),R=Ce(E-d[w],x),P=!t.middlewareData.shift;let b=S,M=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=C),P&&!y){const $=oe(d.left,0),D=oe(d.right,0),B=oe(d.top,0),W=oe(d.bottom,0);h?M=E-2*($!==0||D!==0?$+D:oe(d.left,d.right)):b=f-2*(B!==0||W!==0?B+W:oe(d.top,d.bottom))}await u({...t,availableWidth:M,availableHeight:b});const O=await s.getDimensions(a.floating);return E!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function Ye(e){return oo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function me(e){var t;return(t=(oo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oo(e){return Pt()?e instanceof Node||e instanceof ie(e).Node:!1}function le(e){return Pt()?e instanceof Element||e instanceof ie(e).Element:!1}function pe(e){return Pt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function vr(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function nt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Na(e){return["table","td","th"].includes(Ye(e))}function _t(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function In(e){const t=Mn(),n=le(e)?ue(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Oa(e){let t=be(e);for(;pe(t)&&!Ve(t);){if(In(t))return t;if(_t(t))return null;t=be(t)}return null}function Mn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ve(e){return["html","body","#document"].includes(Ye(e))}function ue(e){return ie(e).getComputedStyle(e)}function At(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function be(e){if(Ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vr(e)&&e.host||me(e);return vr(t)?t.host:t}function io(e){const t=be(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:pe(t)&&nt(t)?t:io(t)}function Qe(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=io(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ie(o);if(i){const a=cn(s);return t.concat(s,s.visualViewport||[],nt(o)?o:[],a&&n?Qe(a):[])}return t.concat(o,Qe(o,[],n))}function cn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function so(e){const t=ue(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=mt(n)!==i||mt(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Dn(e){return le(e)?e:e.contextElement}function Fe(e){const t=Dn(e);if(!pe(t))return Se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=so(t);let s=(i?mt(n.width):n.width)/r,a=(i?mt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ia=Se(0);function ao(e){const t=ie(e);return!Mn()||!t.visualViewport?Ia:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ma(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function Ne(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Dn(e);let s=Se(1);t&&(r?le(r)&&(s=Fe(r)):s=Fe(e));const a=Ma(i,n,r)?ao(i):Se(0);let u=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(i){const y=ie(i),h=r&&le(r)?ie(r):r;let E=y,f=cn(E);for(;f&&r&&h!==E;){const v=Fe(f),w=f.getBoundingClientRect(),C=ue(f),x=w.left+(f.clientLeft+parseFloat(C.paddingLeft))*v.x,S=w.top+(f.clientTop+parseFloat(C.paddingTop))*v.y;u*=v.x,l*=v.y,d*=v.x,p*=v.y,u+=x,l+=S,E=ie(f),f=cn(E)}}return ht({width:d,height:p,x:u,y:l})}function Da(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=me(r),a=t?_t(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},l=Se(1);const d=Se(0),p=pe(r);if((p||!p&&!i)&&((Ye(r)!=="body"||nt(s))&&(u=At(r)),pe(r))){const y=Ne(r);l=Fe(r),d.x=y.x+r.clientLeft,d.y=y.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x,y:n.y*l.y-u.scrollTop*l.y+d.y}}function La(e){return Array.from(e.getClientRects())}function ln(e,t){const n=At(e).scrollLeft;return t?t.left+n:Ne(me(e)).left+n}function ka(e){const t=me(e),n=At(e),r=e.ownerDocument.body,o=oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ln(e);const a=-n.scrollTop;return ue(r).direction==="rtl"&&(s+=oe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function ja(e,t){const n=ie(e),r=me(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Mn();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}return{width:i,height:s,x:a,y:u}}function Fa(e,t){const n=Ne(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=pe(e)?Fe(e):Se(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:a,x:u,y:l}}function mr(e,t,n){let r;if(t==="viewport")r=ja(e,n);else if(t==="document")r=ka(me(e));else if(le(t))r=Fa(t,n);else{const o=ao(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ht(r)}function co(e,t){const n=be(e);return n===t||!le(n)||Ve(n)?!1:ue(n).position==="fixed"||co(n,t)}function $a(e,t){const n=t.get(e);if(n)return n;let r=Qe(e,[],!1).filter(a=>le(a)&&Ye(a)!=="body"),o=null;const i=ue(e).position==="fixed";let s=i?be(e):e;for(;le(s)&&!Ve(s);){const a=ue(s),u=In(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||nt(s)&&!u&&co(e,s))?r=r.filter(d=>d!==s):o=a,s=be(s)}return t.set(e,r),r}function Ha(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_t(t)?[]:$a(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((l,d)=>{const p=mr(t,d,o);return l.top=oe(p.top,l.top),l.right=Ce(p.right,l.right),l.bottom=Ce(p.bottom,l.bottom),l.left=oe(p.left,l.left),l},mr(t,a,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Va(e){const{width:t,height:n}=so(e);return{width:t,height:n}}function Ba(e,t,n){const r=pe(t),o=me(t),i=n==="fixed",s=Ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Se(0);if(r||!r&&!i)if((Ye(t)!=="body"||nt(o))&&(a=At(t)),r){const h=Ne(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&(u.x=ln(o));let l=0,d=0;if(o&&!r&&!i){const h=o.getBoundingClientRect();d=h.top+a.scrollTop,l=h.left+a.scrollLeft-ln(o,h)}const p=s.left+a.scrollLeft-u.x-l,y=s.top+a.scrollTop-u.y-d;return{x:p,y,width:s.width,height:s.height}}function zt(e){return ue(e).position==="static"}function gr(e,t){if(!pe(e)||ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return me(e)===n&&(n=n.ownerDocument.body),n}function lo(e,t){const n=ie(e);if(_t(e))return n;if(!pe(e)){let o=be(e);for(;o&&!Ve(o);){if(le(o)&&!zt(o))return o;o=be(o)}return n}let r=gr(e,t);for(;r&&Na(r)&&zt(r);)r=gr(r,t);return r&&Ve(r)&&zt(r)&&!In(r)?n:r||Oa(e)||n}const Wa=async function(e){const t=this.getOffsetParent||lo,n=this.getDimensions,r=await n(e.floating);return{reference:Ba(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ka(e){return ue(e).direction==="rtl"}const Ua={convertOffsetParentRelativeRectToViewportRelativeRect:Da,getDocumentElement:me,getClippingRect:Ha,getOffsetParent:lo,getElementRects:Wa,getClientRects:La,getDimensions:Va,getScale:Fe,isElement:le,isRTL:Ka};function za(e,t){let n=null,r;const o=me(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const{left:l,top:d,width:p,height:y}=e.getBoundingClientRect();if(a||t(),!p||!y)return;const h=it(d),E=it(o.clientWidth-(l+p)),f=it(o.clientHeight-(d+y)),v=it(l),C={rootMargin:-h+"px "+-E+"px "+-f+"px "+-v+"px",threshold:oe(0,Ce(1,u))||1};let x=!0;function S(R){const P=R[0].intersectionRatio;if(P!==u){if(!x)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return s(!0),i}function Ya(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Dn(e),d=o||i?[...l?Qe(l):[],...Qe(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=l&&a?za(l,n):null;let y=-1,h=null;s&&(h=new ResizeObserver(w=>{let[C]=w;C&&C.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let E,f=u?Ne(e):null;u&&v();function v(){const w=Ne(e);f&&(w.x!==f.x||w.y!==f.y||w.width!==f.width||w.height!==f.height)&&n(),f=w,E=requestAnimationFrame(v)}return n(),()=>{var w;d.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p?.(),(w=h)==null||w.disconnect(),h=null,u&&cancelAnimationFrame(E)}}const Ga=Ta,Xa=Pa,qa=Sa,Za=Aa,Ja=Ra,hr=Ca,Qa=_a,ec=(e,t,n)=>{const r=new Map,o={platform:Ua,...n},i={...o.platform,_c:r};return Ea(e,t,{...o,platform:i})};var ut=typeof document<"u"?c.useLayoutEffect:c.useEffect;function yt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!yt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yr(e,t){const n=uo(e);return Math.round(t*n)/n}function Yt(e){const t=c.useRef(e);return ut(()=>{t.current=e}),t}function tc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[d,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,h]=c.useState(r);yt(y,r)||h(r);const[E,f]=c.useState(null),[v,w]=c.useState(null),C=c.useCallback(I=>{I!==P.current&&(P.current=I,f(I))},[]),x=c.useCallback(I=>{I!==b.current&&(b.current=I,w(I))},[]),S=i||E,R=s||v,P=c.useRef(null),b=c.useRef(null),M=c.useRef(d),O=u!=null,$=Yt(u),D=Yt(o),B=Yt(l),W=c.useCallback(()=>{if(!P.current||!b.current)return;const I={placement:t,strategy:n,middleware:y};D.current&&(I.platform=D.current),ec(P.current,b.current,I).then(z=>{const te={...z,isPositioned:B.current!==!1};A.current&&!yt(M.current,te)&&(M.current=te,Ke.flushSync(()=>{p(te)}))})},[y,t,n,D,B]);ut(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[l]);const A=c.useRef(!1);ut(()=>(A.current=!0,()=>{A.current=!1}),[]),ut(()=>{if(S&&(P.current=S),R&&(b.current=R),S&&R){if($.current)return $.current(S,R,W);W()}},[S,R,W,$,O]);const K=c.useMemo(()=>({reference:P,floating:b,setReference:C,setFloating:x}),[C,x]),L=c.useMemo(()=>({reference:S,floating:R}),[S,R]),H=c.useMemo(()=>{const I={position:n,left:0,top:0};if(!L.floating)return I;const z=yr(L.floating,d.x),te=yr(L.floating,d.y);return a?{...I,transform:"translate("+z+"px, "+te+"px)",...uo(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:te}},[n,a,L.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:W,refs:K,elements:L,floatingStyles:H}),[d,W,K,L,H])}const nc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?hr({element:r.current,padding:o}).fn(n):{}:r?hr({element:r,padding:o}).fn(n):{}}}},rc=(e,t)=>({...Ga(e),options:[e,t]}),oc=(e,t)=>({...Xa(e),options:[e,t]}),ic=(e,t)=>({...Qa(e),options:[e,t]}),sc=(e,t)=>({...qa(e),options:[e,t]}),ac=(e,t)=>({...Za(e),options:[e,t]}),cc=(e,t)=>({...Ja(e),options:[e,t]}),lc=(e,t)=>({...nc(e),options:[e,t]});var uc="Arrow",fo=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(F.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});fo.displayName=uc;var dc=fo;function po(e){const[t,n]=c.useState(void 0);return ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ln="Popper",[vo,Nt]=ye(Ln),[fc,mo]=vo(Ln),go=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return m.jsx(fc,{scope:t,anchor:r,onAnchorChange:o,children:n})};go.displayName=Ln;var ho="PopperAnchor",yo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=mo(ho,n),s=c.useRef(null),a=G(t,s),u=c.useRef(null);return c.useEffect(()=>{const l=u.current;u.current=r?.current||s.current,l!==u.current&&i.onAnchorChange(u.current)}),r?null:m.jsx(F.div,{...o,ref:a})});yo.displayName=ho;var kn="PopperContent",[pc,vc]=vo(kn),wo=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:h="optimized",onPlaced:E,...f}=e,v=mo(kn,n),[w,C]=c.useState(null),x=G(t,_=>C(_)),[S,R]=c.useState(null),P=po(S),b=P?.width??0,M=P?.height??0,O=r+(i!=="center"?"-"+i:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(l)?l:[l],B=D.length>0,W={padding:$,boundary:D.filter(gc),altBoundary:B},{refs:A,floatingStyles:K,placement:L,isPositioned:H,middlewareData:I}=tc({strategy:"fixed",placement:O,whileElementsMounted:(..._)=>Ya(..._,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[rc({mainAxis:o+M,alignmentAxis:s}),u&&oc({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ic():void 0,...W}),u&&sc({...W}),ac({...W,apply:({elements:_,rects:X,availableWidth:q,availableHeight:Z})=>{const{width:J,height:Q}=X.reference,se=_.floating.style;se.setProperty("--radix-popper-available-width",`${q}px`),se.setProperty("--radix-popper-available-height",`${Z}px`),se.setProperty("--radix-popper-anchor-width",`${J}px`),se.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),S&&lc({element:S,padding:a}),hc({arrowWidth:b,arrowHeight:M}),y&&cc({strategy:"referenceHidden",...W})]}),[z,te]=Co(L),g=ne(E);ee(()=>{H&&g?.()},[H,g]);const T=I.arrow?.x,j=I.arrow?.y,k=I.arrow?.centerOffset!==0,[U,Y]=c.useState();return ee(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:H?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(pc,{scope:n,placedSide:z,onArrowChange:R,arrowX:T,arrowY:j,shouldHideArrow:k,children:m.jsx(F.div,{"data-side":z,"data-align":te,...f,ref:x,style:{...f.style,animation:H?void 0:"none"}})})})});wo.displayName=kn;var xo="PopperArrow",mc={top:"bottom",right:"left",bottom:"top",left:"right"},Eo=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=vc(xo,r),s=mc[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(dc,{...o,ref:n,style:{...o.style,display:"block"}})})});Eo.displayName=xo;function gc(e){return e!==null}var hc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,d]=Co(n),p={start:"0%",center:"50%",end:"100%"}[d],y=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+u/2;let E="",f="";return l==="bottom"?(E=s?p:`${y}px`,f=`${-u}px`):l==="top"?(E=s?p:`${y}px`,f=`${r.floating.height+u}px`):l==="right"?(E=`${-u}px`,f=s?p:`${h}px`):l==="left"&&(E=`${r.floating.width+u}px`,f=s?p:`${h}px`),{data:{x:E,y:f}}}});function Co(e){const[t,n="center"]=e.split("-");return[t,n]}var yc=go,So=yo,Ro=wo,bo=Eo,[Ot]=ye("Tooltip",[Nt]),jn=Nt(),To="TooltipProvider",wc=700,wr="tooltip.open",[xc,Po]=Ot(To),_o=e=>{const{__scopeTooltip:t,delayDuration:n=wc,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),m.jsx(xc,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:i})};_o.displayName=To;var Ao="Tooltip",[Xu,It]=Ot(Ao),un="TooltipTrigger",Ec=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=It(un,n),i=Po(un,n),s=jn(n),a=c.useRef(null),u=G(t,a,o.onTriggerChange),l=c.useRef(!1),d=c.useRef(!1),p=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),m.jsx(So,{asChild:!0,...s,children:m.jsx(F.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:N(e.onPointerMove,y=>{y.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:N(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});Ec.displayName=un;var Cc="TooltipPortal",[qu,Sc]=Ot(Cc,{forceMount:void 0}),Be="TooltipContent",No=c.forwardRef((e,t)=>{const n=Sc(Be,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=It(Be,e.__scopeTooltip);return m.jsx(ve,{present:r||s.open,children:s.disableHoverableContent?m.jsx(Oo,{side:o,...i,ref:t}):m.jsx(Rc,{side:o,...i,ref:t})})}),Rc=c.forwardRef((e,t)=>{const n=It(Be,e.__scopeTooltip),r=Po(Be,e.__scopeTooltip),o=c.useRef(null),i=G(t,o),[s,a]=c.useState(null),{trigger:u,onClose:l}=n,d=o.current,{onPointerInTransitChange:p}=r,y=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((E,f)=>{const v=E.currentTarget,w={x:E.clientX,y:E.clientY},C=Ac(w,v.getBoundingClientRect()),x=Nc(w,C),S=Oc(f.getBoundingClientRect()),R=Mc([...x,...S]);a(R),p(!0)},[p]);return c.useEffect(()=>()=>y(),[y]),c.useEffect(()=>{if(u&&d){const E=v=>h(v,d),f=v=>h(v,u);return u.addEventListener("pointerleave",E),d.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",E),d.removeEventListener("pointerleave",f)}}},[u,d,h,y]),c.useEffect(()=>{if(s){const E=f=>{const v=f.target,w={x:f.clientX,y:f.clientY},C=u?.contains(v)||d?.contains(v),x=!Ic(w,s);C?y():x&&(y(),l())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[u,d,s,l,y]),m.jsx(Oo,{...e,ref:i})}),[bc,Tc]=Ot(Ao,{isInside:!1}),Pc=Ts("TooltipContent"),Oo=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,u=It(Be,n),l=jn(n),{onClose:d}=u;return c.useEffect(()=>(document.addEventListener(wr,d),()=>document.removeEventListener(wr,d)),[d]),c.useEffect(()=>{if(u.trigger){const p=y=>{y.target?.contains(u.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,d]),m.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:m.jsxs(Ro,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.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:[m.jsx(Pc,{children:r}),m.jsx(bc,{scope:n,isInside:!0,children:m.jsx(Wr,{id:u.contentId,role:"tooltip",children:o||r})})]})})});No.displayName=Be;var Io="TooltipArrow",_c=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jn(n);return Tc(Io,n).isInside?null:m.jsx(bo,{...o,...r,ref:t})});_c.displayName=Io;function Ac(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Nc(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Oc(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ic(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],u=t[s],l=a.x,d=a.y,p=u.x,y=u.y;d>r!=y>r&&n<(p-l)*(r-d)/(y-d)+l&&(o=!o)}return o}function Mc(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Dc(t)}function Dc(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zu=_o,Ju=No,Gt="focusScope.autoFocusOnMount",Xt="focusScope.autoFocusOnUnmount",xr={bubbles:!1,cancelable:!0},Lc="FocusScope",Fn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,u]=c.useState(null),l=ne(o),d=ne(i),p=c.useRef(null),y=G(t,f=>u(f)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let f=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?p.current=S:xe(p.current,{select:!0})},v=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||xe(p.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const R of x)R.removedNodes.length>0&&xe(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const C=new MutationObserver(w);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),C.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){Cr.add(h);const f=document.activeElement;if(!a.contains(f)){const w=new CustomEvent(Gt,xr);a.addEventListener(Gt,l),a.dispatchEvent(w),w.defaultPrevented||(kc(Vc(Mo(a)),{select:!0}),document.activeElement===f&&xe(a))}return()=>{a.removeEventListener(Gt,l),setTimeout(()=>{const w=new CustomEvent(Xt,xr);a.addEventListener(Xt,d),a.dispatchEvent(w),w.defaultPrevented||xe(f??document.body,{select:!0}),a.removeEventListener(Xt,d),Cr.remove(h)},0)}}},[a,l,d,h]);const E=c.useCallback(f=>{if(!n&&!r||h.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(v&&w){const C=f.currentTarget,[x,S]=jc(C);x&&S?!f.shiftKey&&w===S?(f.preventDefault(),n&&xe(x,{select:!0})):f.shiftKey&&w===x&&(f.preventDefault(),n&&xe(S,{select:!0})):w===C&&f.preventDefault()}},[n,r,h.paused]);return m.jsx(F.div,{tabIndex:-1,...s,ref:y,onKeyDown:E})});Fn.displayName=Lc;function kc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xe(r,{select:t}),document.activeElement!==n)return}function jc(e){const t=Mo(e),n=Er(t,e),r=Er(t.reverse(),e);return[n,r]}function Mo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Er(e,t){for(const n of e)if(!Fc(n,{upTo:t}))return n}function Fc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $c(e){return e instanceof HTMLInputElement&&"select"in e}function xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$c(e)&&t&&e.select()}}var Cr=Hc();function Hc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Sr(e,t),e.unshift(t)},remove(t){e=Sr(e,t),e[0]?.resume()}}}function Sr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vc(e){return e.filter(t=>t.tagName!=="A")}var qt=0;function Do(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rr()),document.body.insertAdjacentElement("beforeend",e[1]??Rr()),qt++,()=>{qt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qt--}},[])}function Rr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fe.apply(this,arguments)};function Lo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Bc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var dt="right-scroll-bar-position",ft="width-before-scroll-bar",Wc="with-scroll-bars-hidden",Kc="--removed-body-scroll-bar-size";function Zt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Uc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var zc=typeof window<"u"?c.useLayoutEffect:c.useEffect,br=new WeakMap;function Yc(e,t){var n=Uc(null,function(r){return e.forEach(function(o){return Zt(o,r)})});return zc(function(){var r=br.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Zt(a,null)}),i.forEach(function(a){o.has(a)||Zt(a,s)})}br.set(n,e)},[e]),n}function Gc(e){return e}function Xc(e,t){t===void 0&&(t=Gc);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var u=function(){var d=s;s=[],d.forEach(i)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){s.push(d),l()},filter:function(d){return s=s.filter(d),n}}}};return o}function qc(e){e===void 0&&(e={});var t=Xc(null);return t.options=fe({async:!0,ssr:!1},e),t}var ko=function(e){var t=e.sideCar,n=Lo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,fe({},n))};ko.isSideCarExport=!0;function Zc(e,t){return e.useMedium(t),ko}var jo=qc(),Jt=function(){},Mt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Jt,onWheelCapture:Jt,onTouchMoveCapture:Jt}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,p=e.shards,y=e.sideCar,h=e.noRelative,E=e.noIsolation,f=e.inert,v=e.allowPinchZoom,w=e.as,C=w===void 0?"div":w,x=e.gapMode,S=Lo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=y,P=Yc([n,t]),b=fe(fe({},S),o);return c.createElement(c.Fragment,null,d&&c.createElement(R,{sideCar:jo,removeScrollBar:l,shards:p,noRelative:h,noIsolation:E,inert:f,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),fe(fe({},b),{ref:P})):c.createElement(C,fe({},b,{className:u,ref:P}),a))});Mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mt.classNames={fullWidth:ft,zeroRight:dt};var Jc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jc();return t&&e.setAttribute("nonce",t),e}function el(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qc())&&(el(t,n),tl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rl=function(){var e=nl();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fo=function(){var e=rl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ol={left:0,top:0,right:0,gap:0},Qt=function(e){return parseInt(e||"",10)||0},il=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qt(n),Qt(r),Qt(o)]},sl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ol;var t=il(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},al=Fo(),$e="data-scroll-locked",cl=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(Wc,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat($e,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(dt,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(ft,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(dt," .").concat(dt,` {
right: 0 `).concat(r,`;
}
.`).concat(ft," .").concat(ft,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat($e,`] {
`).concat(Kc,": ").concat(a,`px;
}
`)},Tr=function(){var e=parseInt(document.body.getAttribute($e)||"0",10);return isFinite(e)?e:0},ll=function(){c.useEffect(function(){return document.body.setAttribute($e,(Tr()+1).toString()),function(){var e=Tr()-1;e<=0?document.body.removeAttribute($e):document.body.setAttribute($e,e.toString())}},[])},ul=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ll();var i=c.useMemo(function(){return sl(o)},[o]);return c.createElement(al,{styles:cl(i,!t,o,n?"":"!important")})},dn=!1;if(typeof window<"u")try{var st=Object.defineProperty({},"passive",{get:function(){return dn=!0,!0}});window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{dn=!1}var Le=dn?{passive:!1}:!1,dl=function(e){return e.tagName==="TEXTAREA"},$o=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!dl(e)&&n[t]==="visible")},fl=function(e){return $o(e,"overflowY")},pl=function(e){return $o(e,"overflowX")},Pr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ho(e,r);if(o){var i=Vo(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ml=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ho=function(e,t){return e==="v"?fl(t):pl(t)},Vo=function(e,t){return e==="v"?vl(t):ml(t)},gl=function(e,t){return e==="h"&&t==="rtl"?-1:1},hl=function(e,t,n,r,o){var i=gl(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,u=t.contains(a),l=!1,d=s>0,p=0,y=0;do{if(!a)break;var h=Vo(e,a),E=h[0],f=h[1],v=h[2],w=f-v-i*E;(E||w)&&Ho(e,a)&&(p+=w,y+=E);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(d&&Math.abs(p)<1||!d&&Math.abs(y)<1)&&(l=!0),l},at=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_r=function(e){return[e.deltaX,e.deltaY]},Ar=function(e){return e&&"current"in e?e.current:e},yl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wl=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},xl=0,ke=[];function El(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(xl++)[0],i=c.useState(Fo)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Bc([e.lockRef.current],(e.shards||[]).map(Ar),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!s.current.allowPinchZoom;var w=at(f),C=n.current,x="deltaX"in f?f.deltaX:C[0]-w[0],S="deltaY"in f?f.deltaY:C[1]-w[1],R,P=f.target,b=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in f&&b==="h"&&P.type==="range")return!1;var M=Pr(b,P);if(!M)return!0;if(M?R=b:(R=b==="v"?"h":"v",M=Pr(b,P)),!M)return!1;if(!r.current&&"changedTouches"in f&&(x||S)&&(r.current=R),!R)return!0;var O=r.current||R;return hl(O,v,f,O==="h"?x:S)},[]),u=c.useCallback(function(f){var v=f;if(!(!ke.length||ke[ke.length-1]!==i)){var w="deltaY"in v?_r(v):at(v),C=t.current.filter(function(R){return R.name===v.type&&(R.target===v.target||v.target===R.shadowParent)&&yl(R.delta,w)})[0];if(C&&C.should){v.cancelable&&v.preventDefault();return}if(!C){var x=(s.current.shards||[]).map(Ar).filter(Boolean).filter(function(R){return R.contains(v.target)}),S=x.length>0?a(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),l=c.useCallback(function(f,v,w,C){var x={name:f,delta:v,target:w,should:C,shadowParent:Cl(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),d=c.useCallback(function(f){n.current=at(f),r.current=void 0},[]),p=c.useCallback(function(f){l(f.type,_r(f),f.target,a(f,e.lockRef.current))},[]),y=c.useCallback(function(f){l(f.type,at(f),f.target,a(f,e.lockRef.current))},[]);c.useEffect(function(){return ke.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",u,Le),document.addEventListener("touchmove",u,Le),document.addEventListener("touchstart",d,Le),function(){ke=ke.filter(function(f){return f!==i}),document.removeEventListener("wheel",u,Le),document.removeEventListener("touchmove",u,Le),document.removeEventListener("touchstart",d,Le)}},[]);var h=e.removeScrollBar,E=e.inert;return c.createElement(c.Fragment,null,E?c.createElement(i,{styles:wl(o)}):null,h?c.createElement(ul,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Sl=Zc(jo,El);var $n=c.forwardRef(function(e,t){return c.createElement(Mt,fe({},e,{ref:t,sideCar:Sl}))});$n.classNames=Mt.classNames;var Rl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},je=new WeakMap,ct=new WeakMap,lt={},en=0,Bo=function(e){return e&&(e.host||Bo(e.parentNode))},bl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tl=function(e,t,n,r){var o=bl(t,Array.isArray(e)?e:[e]);lt[n]||(lt[n]=new WeakMap);var i=lt[n],s=[],a=new Set,u=new Set(o),l=function(p){!p||a.has(p)||(a.add(p),l(p.parentNode))};o.forEach(l);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(y){if(a.has(y))d(y);else try{var h=y.getAttribute(r),E=h!==null&&h!=="false",f=(je.get(y)||0)+1,v=(i.get(y)||0)+1;je.set(y,f),i.set(y,v),s.push(y),f===1&&E&&ct.set(y,!0),v===1&&y.setAttribute(n,"true"),E||y.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return d(t),a.clear(),en++,function(){s.forEach(function(p){var y=je.get(p)-1,h=i.get(p)-1;je.set(p,y),i.set(p,h),y||(ct.has(p)||p.removeAttribute(r),ct.delete(p)),h||p.removeAttribute(n)}),en--,en||(je=new WeakMap,je=new WeakMap,ct=new WeakMap,lt={})}},Wo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Rl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Tl(r,o,n,"aria-hidden")):function(){return null}},Dt="Dialog",[Ko]=ye(Dt),[Pl,de]=Ko(Dt),Uo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),u=c.useRef(null),[l,d]=Ae({prop:r,defaultProp:o??!1,onChange:i,caller:Dt});return m.jsx(Pl,{scope:t,triggerRef:a,contentRef:u,contentId:Ee(),titleId:Ee(),descriptionId:Ee(),open:l,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s,children:n})};Uo.displayName=Dt;var zo="DialogTrigger",Yo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(zo,n),i=G(t,o.triggerRef);return m.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bn(o.open),...r,ref:i,onClick:N(e.onClick,o.onOpenToggle)})});Yo.displayName=zo;var Hn="DialogPortal",[_l,Go]=Ko(Hn,{forceMount:void 0}),Xo=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=de(Hn,t);return m.jsx(_l,{scope:t,forceMount:n,children:c.Children.map(r,s=>m.jsx(ve,{present:n||i.open,children:m.jsx(Rt,{asChild:!0,container:o,children:s})}))})};Xo.displayName=Hn;var wt="DialogOverlay",qo=c.forwardRef((e,t)=>{const n=Go(wt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=de(wt,e.__scopeDialog);return i.modal?m.jsx(ve,{present:r||i.open,children:m.jsx(Nl,{...o,ref:t})}):null});qo.displayName=wt;var Al=He("DialogOverlay.RemoveScroll"),Nl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(wt,n);return m.jsx($n,{as:Al,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(F.div,{"data-state":Bn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Oe="DialogContent",Zo=c.forwardRef((e,t)=>{const n=Go(Oe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=de(Oe,e.__scopeDialog);return m.jsx(ve,{present:r||i.open,children:i.modal?m.jsx(Ol,{...o,ref:t}):m.jsx(Il,{...o,ref:t})})});Zo.displayName=Oe;var Ol=c.forwardRef((e,t)=>{const n=de(Oe,e.__scopeDialog),r=c.useRef(null),o=G(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return Wo(i)},[]),m.jsx(Jo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault())})}),Il=c.forwardRef((e,t)=>{const n=de(Oe,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return m.jsx(Jo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Jo=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=de(Oe,n),u=c.useRef(null),l=G(t,u);return Do(),m.jsxs(m.Fragment,{children:[m.jsx(Fn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:m.jsx(Ue,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Bn(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Ml,{titleId:a.titleId}),m.jsx(Ll,{contentRef:u,descriptionId:a.descriptionId})]})]})}),Vn="DialogTitle",Qo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(Vn,n);return m.jsx(F.h2,{id:o.titleId,...r,ref:t})});Qo.displayName=Vn;var ei="DialogDescription",ti=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(ei,n);return m.jsx(F.p,{id:o.descriptionId,...r,ref:t})});ti.displayName=ei;var ni="DialogClose",ri=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(ni,n);return m.jsx(F.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});ri.displayName=ni;function Bn(e){return e?"open":"closed"}var oi="DialogTitleWarning",[Qu,ii]=Ss(oi,{contentName:Oe,titleName:Vn,docsSlug:"dialog"}),Ml=({titleId:e})=>{const t=ii(oi),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Dl="DialogDescriptionWarning",Ll=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ii(Dl).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ed=Uo,td=Yo,nd=Xo,rd=qo,od=Zo,id=Qo,sd=ti,ad=ri,kl=c.createContext(void 0);function Wn(e){const t=c.useContext(kl);return e||t||"ltr"}function Kn(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var De="NavigationMenu",[Un,si,jl]=et(De),[fn,Fl,$l]=et(De),[zn]=ye(De,[jl,$l]),[Hl,ae]=zn(De),[Vl,Bl]=zn(De),ai=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:i,delayDuration:s=200,skipDelayDuration:a=300,orientation:u="horizontal",dir:l,...d}=e,[p,y]=c.useState(null),h=G(t,O=>y(O)),E=Wn(l),f=c.useRef(0),v=c.useRef(0),w=c.useRef(0),[C,x]=c.useState(!0),[S,R]=Ae({prop:r,onChange:O=>{const $=O!=="",D=a>0;$?(window.clearTimeout(w.current),D&&x(!1)):(window.clearTimeout(w.current),w.current=window.setTimeout(()=>x(!0),a)),o?.(O)},defaultProp:i??"",caller:De}),P=c.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>R(""),150)},[R]),b=c.useCallback(O=>{window.clearTimeout(v.current),R(O)},[R]),M=c.useCallback(O=>{S===O?window.clearTimeout(v.current):f.current=window.setTimeout(()=>{window.clearTimeout(v.current),R(O)},s)},[S,R,s]);return c.useEffect(()=>()=>{window.clearTimeout(f.current),window.clearTimeout(v.current),window.clearTimeout(w.current)},[]),m.jsx(ci,{scope:n,isRootMenu:!0,value:S,dir:E,orientation:u,rootNavigationMenu:p,onTriggerEnter:O=>{window.clearTimeout(f.current),C?M(O):b(O)},onTriggerLeave:()=>{window.clearTimeout(f.current),P()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:P,onItemSelect:O=>{R($=>$===O?"":O)},onItemDismiss:()=>R(""),children:m.jsx(F.nav,{"aria-label":"Main","data-orientation":u,dir:E,...d,ref:h})})});ai.displayName=De;var pn="NavigationMenuSub",Wl=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",...a}=e,u=ae(pn,n),[l,d]=Ae({prop:r,onChange:o,defaultProp:i??"",caller:pn});return m.jsx(ci,{scope:n,isRootMenu:!1,value:l,dir:u.dir,orientation:s,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:p=>d(p),onItemSelect:p=>d(p),onItemDismiss:()=>d(""),children:m.jsx(F.div,{"data-orientation":s,...a,ref:t})})});Wl.displayName=pn;var ci=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:i,children:s,value:a,onItemSelect:u,onItemDismiss:l,onTriggerEnter:d,onTriggerLeave:p,onContentEnter:y,onContentLeave:h}=e,[E,f]=c.useState(null),[v,w]=c.useState(new Map),[C,x]=c.useState(null);return m.jsx(Hl,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:Kn(a),baseId:Ee(),dir:o,orientation:i,viewport:E,onViewportChange:f,indicatorTrack:C,onIndicatorTrackChange:x,onTriggerEnter:ne(d),onTriggerLeave:ne(p),onContentEnter:ne(y),onContentLeave:ne(h),onItemSelect:ne(u),onItemDismiss:ne(l),onViewportContentChange:c.useCallback((S,R)=>{w(P=>(P.set(S,R),new Map(P)))},[]),onViewportContentRemove:c.useCallback(S=>{w(R=>R.has(S)?(R.delete(S),new Map(R)):R)},[]),children:m.jsx(Un.Provider,{scope:t,children:m.jsx(Vl,{scope:t,items:v,children:s})})})},li="NavigationMenuList",ui=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=ae(li,n),i=m.jsx(F.ul,{"data-orientation":o.orientation,...r,ref:t});return m.jsx(F.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:m.jsx(Un.Slot,{scope:n,children:o.isRootMenu?m.jsx(xi,{asChild:!0,children:i}):i})})});ui.displayName=li;var di="NavigationMenuItem",[Kl,fi]=zn(di),pi=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,i=Ee(),s=r||i||"LEGACY_REACT_AUTO_VALUE",a=c.useRef(null),u=c.useRef(null),l=c.useRef(null),d=c.useRef(()=>{}),p=c.useRef(!1),y=c.useCallback((E="start")=>{if(a.current){d.current();const f=mn(a.current);f.length&&Xn(E==="start"?f:f.reverse())}},[]),h=c.useCallback(()=>{if(a.current){const E=mn(a.current);E.length&&(d.current=Zl(E))}},[]);return m.jsx(Kl,{scope:n,value:s,triggerRef:u,contentRef:a,focusProxyRef:l,wasEscapeCloseRef:p,onEntryKeyDown:y,onFocusProxyEnter:y,onRootContentClose:h,onContentFocusOutside:h,children:m.jsx(F.li,{...o,ref:t})})});pi.displayName=di;var vn="NavigationMenuTrigger",vi=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,i=ae(vn,e.__scopeNavigationMenu),s=fi(vn,e.__scopeNavigationMenu),a=c.useRef(null),u=G(a,s.triggerRef,t),l=Ci(i.baseId,s.value),d=Si(i.baseId,s.value),p=c.useRef(!1),y=c.useRef(!1),h=s.value===i.value;return m.jsxs(m.Fragment,{children:[m.jsx(Un.ItemSlot,{scope:n,value:s.value,children:m.jsx(Ei,{asChild:!0,children:m.jsx(F.button,{id:l,disabled:r,"data-disabled":r?"":void 0,"data-state":qn(h),"aria-expanded":h,"aria-controls":d,...o,ref:u,onPointerEnter:N(e.onPointerEnter,()=>{y.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:N(e.onPointerMove,xt(()=>{r||y.current||s.wasEscapeCloseRef.current||p.current||(i.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:N(e.onPointerLeave,xt(()=>{r||(i.onTriggerLeave(),p.current=!1)})),onClick:N(e.onClick,()=>{i.onItemSelect(s.value),y.current=h}),onKeyDown:N(e.onKeyDown,E=>{const v={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];h&&E.key===v&&(s.onEntryKeyDown(),E.preventDefault())})})})}),h&&m.jsxs(m.Fragment,{children:[m.jsx(Wr,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:E=>{const f=s.contentRef.current,v=E.relatedTarget,w=v===a.current,C=f?.contains(v);(w||!C)&&s.onFocusProxyEnter(w?"start":"end")}}),i.viewport&&m.jsx("span",{"aria-owns":d})]})]})});vi.displayName=vn;var Ul="NavigationMenuLink",Nr="navigationMenu.linkSelect",mi=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...i}=e;return m.jsx(Ei,{asChild:!0,children:m.jsx(F.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:t,onClick:N(e.onClick,s=>{const a=s.target,u=new CustomEvent(Nr,{bubbles:!0,cancelable:!0});if(a.addEventListener(Nr,l=>o?.(l),{once:!0}),vt(a,u),!u.defaultPrevented&&!s.metaKey){const l=new CustomEvent(pt,{bubbles:!0,cancelable:!0});vt(a,l)}},{checkForDefaultPrevented:!1})})})});mi.displayName=Ul;var Yn="NavigationMenuIndicator",gi=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ae(Yn,e.__scopeNavigationMenu),i=!!o.value;return o.indicatorTrack?jr.createPortal(m.jsx(ve,{present:n||i,children:m.jsx(zl,{...r,ref:t})}),o.indicatorTrack):null});gi.displayName=Yn;var zl=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=ae(Yn,n),i=si(n),[s,a]=c.useState(null),[u,l]=c.useState(null),d=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{const E=i().find(f=>f.value===o.value)?.ref.current;E&&a(E)},[i,o.value]);const y=()=>{s&&l({size:d?s.offsetWidth:s.offsetHeight,offset:d?s.offsetLeft:s.offsetTop})};return gn(s,y),gn(o.indicatorTrack,y),u?m.jsx(F.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...d?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...r.style}}):null}),We="NavigationMenuContent",hi=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ae(We,e.__scopeNavigationMenu),i=fi(We,e.__scopeNavigationMenu),s=G(i.contentRef,t),a=i.value===o.value,u={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return o.viewport?m.jsx(Yl,{forceMount:n,...u,ref:s}):m.jsx(ve,{present:n||a,children:m.jsx(yi,{"data-state":qn(a),...u,ref:s,onPointerEnter:N(e.onPointerEnter,o.onContentEnter),onPointerLeave:N(e.onPointerLeave,xt(o.onContentLeave)),style:{pointerEvents:!a&&o.isRootMenu?"none":void 0,...u.style}})})});hi.displayName=We;var Yl=c.forwardRef((e,t)=>{const n=ae(We,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ee(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ee(()=>()=>o(e.value),[e.value,o]),null}),pt="navigationMenu.rootContentDismiss",yi=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:i,wasEscapeCloseRef:s,onRootContentClose:a,onContentFocusOutside:u,...l}=e,d=ae(We,n),p=c.useRef(null),y=G(p,t),h=Ci(d.baseId,r),E=Si(d.baseId,r),f=si(n),v=c.useRef(null),{onItemDismiss:w}=d;c.useEffect(()=>{const x=p.current;if(d.isRootMenu&&x){const S=()=>{w(),a(),x.contains(document.activeElement)&&o.current?.focus()};return x.addEventListener(pt,S),()=>x.removeEventListener(pt,S)}},[d.isRootMenu,e.value,o,w,a]);const C=c.useMemo(()=>{const S=f().map($=>$.value);d.dir==="rtl"&&S.reverse();const R=S.indexOf(d.value),P=S.indexOf(d.previousValue),b=r===d.value,M=P===S.indexOf(r);if(!b&&!M)return v.current;const O=(()=>{if(R!==P){if(b&&P!==-1)return R>P?"from-end":"from-start";if(M&&R!==-1)return R>P?"to-start":"to-end"}return null})();return v.current=O,O},[d.previousValue,d.value,d.dir,f,r]);return m.jsx(xi,{asChild:!0,children:m.jsx(Ue,{id:E,"aria-labelledby":h,"data-motion":C,"data-orientation":d.orientation,...l,ref:y,disableOutsidePointerEvents:!1,onDismiss:()=>{const x=new Event(pt,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(x)},onFocusOutside:N(e.onFocusOutside,x=>{u();const S=x.target;d.rootNavigationMenu?.contains(S)&&x.preventDefault()}),onPointerDownOutside:N(e.onPointerDownOutside,x=>{const S=x.target,R=f().some(b=>b.ref.current?.contains(S)),P=d.isRootMenu&&d.viewport?.contains(S);(R||P||!d.isRootMenu)&&x.preventDefault()}),onKeyDown:N(e.onKeyDown,x=>{const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const P=mn(x.currentTarget),b=document.activeElement,M=P.findIndex(D=>D===b),$=x.shiftKey?P.slice(0,M).reverse():P.slice(M+1,P.length);Xn($)?x.preventDefault():i.current?.focus()}}),onEscapeKeyDown:N(e.onEscapeKeyDown,x=>{s.current=!0})})})}),Gn="NavigationMenuViewport",wi=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=!!ae(Gn,e.__scopeNavigationMenu).value;return m.jsx(ve,{present:n||i,children:m.jsx(Gl,{...r,ref:t})})});wi.displayName=Gn;var Gl=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,i=ae(Gn,n),s=G(t,i.onViewportChange),a=Bl(We,e.__scopeNavigationMenu),[u,l]=c.useState(null),[d,p]=c.useState(null),y=u?u?.width+"px":void 0,h=u?u?.height+"px":void 0,E=!!i.value,f=E?i.value:i.previousValue;return gn(d,()=>{d&&l({width:d.offsetWidth,height:d.offsetHeight})}),m.jsx(F.div,{"data-state":qn(E),"data-orientation":i.orientation,...o,ref:s,style:{pointerEvents:!E&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":y,"--radix-navigation-menu-viewport-height":h,...o.style},onPointerEnter:N(e.onPointerEnter,i.onContentEnter),onPointerLeave:N(e.onPointerLeave,xt(i.onContentLeave)),children:Array.from(a.items).map(([w,{ref:C,forceMount:x,...S}])=>{const R=f===w;return m.jsx(ve,{present:x||R,children:m.jsx(yi,{...S,ref:bn(C,P=>{R&&P&&p(P)})})},w)})})}),Xl="FocusGroup",xi=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=ae(Xl,n);return m.jsx(fn.Provider,{scope:n,children:m.jsx(fn.Slot,{scope:n,children:m.jsx(F.div,{dir:o.dir,...r,ref:t})})})}),Or=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ql="FocusGroupItem",Ei=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fl(n),i=ae(ql,n);return m.jsx(fn.ItemSlot,{scope:n,children:m.jsx(F.button,{...r,ref:t,onKeyDown:N(e.onKeyDown,s=>{if(["Home","End",...Or].includes(s.key)){let u=o().map(p=>p.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),Or.includes(s.key)){const p=u.indexOf(s.currentTarget);u=u.slice(p+1)}setTimeout(()=>Xn(u)),s.preventDefault()}})})})});function mn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Zl(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function gn(e,t){const n=ne(t);ee(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function qn(e){return e?"open":"closed"}function Ci(e,t){return`${e}-trigger-${t}`}function Si(e,t){return`${e}-content-${t}`}function xt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cd=ai,ld=ui,ud=pi,dd=vi,fd=mi,pd=gi,vd=hi,md=wi;function Et(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ri=["PageUp","PageDown"],bi=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ti={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ge="Slider",[hn,Jl,Ql]=et(Ge),[Pi]=ye(Ge,[Ql]),[eu,Lt]=Pi(Ge),_i=c.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:l=[r],value:d,onValueChange:p=()=>{},onValueCommit:y=()=>{},inverted:h=!1,form:E,...f}=e,v=c.useRef(new Set),w=c.useRef(0),x=s==="horizontal"?tu:nu,[S=[],R]=Ae({prop:d,defaultProp:l,onChange:D=>{[...v.current][w.current]?.focus(),p(D)}}),P=c.useRef(S);function b(D){const B=au(S,D);$(D,B)}function M(D){$(D,w.current)}function O(){const D=P.current[w.current];S[w.current]!==D&&y(S)}function $(D,B,{commit:W}={commit:!1}){const A=du(i),K=fu(Math.round((D-r)/i)*i+r,A),L=Et(K,[r,o]);R((H=[])=>{const I=iu(H,L,B);if(uu(I,u*i)){w.current=I.indexOf(L);const z=String(I)!==String(H);return z&&W&&y(I),z?I:H}else return H})}return m.jsx(eu,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:w,thumbs:v.current,values:S,orientation:s,form:E,children:m.jsx(hn.Provider,{scope:e.__scopeSlider,children:m.jsx(hn.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...f,ref:t,onPointerDown:N(f.onPointerDown,()=>{a||(P.current=S)}),min:r,max:o,inverted:h,onSlideStart:a?void 0:b,onSlideMove:a?void 0:M,onSlideEnd:a?void 0:O,onHomeKeyDown:()=>!a&&$(r,0,{commit:!0}),onEndKeyDown:()=>!a&&$(o,S.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:B})=>{if(!a){const K=Ri.includes(D.key)||D.shiftKey&&bi.includes(D.key)?10:1,L=w.current,H=S[L],I=i*K*B;$(H+I,L,{commit:!0})}}})})})})});_i.displayName=Ge;var[Ai,Ni]=Pi(Ge,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tu=c.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:s,onSlideMove:a,onSlideEnd:u,onStepKeyDown:l,...d}=e,[p,y]=c.useState(null),h=G(t,x=>y(x)),E=c.useRef(void 0),f=Wn(o),v=f==="ltr",w=v&&!i||!v&&i;function C(x){const S=E.current||p.getBoundingClientRect(),R=[0,S.width],b=Zn(R,w?[n,r]:[r,n]);return E.current=S,b(x-S.left)}return m.jsx(Ai,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:m.jsx(Oi,{dir:f,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=C(x.clientX);s?.(S)},onSlideMove:x=>{const S=C(x.clientX);a?.(S)},onSlideEnd:()=>{E.current=void 0,u?.()},onStepKeyDown:x=>{const R=Ti[w?"from-left":"from-right"].includes(x.key);l?.({event:x,direction:R?-1:1})}})})}),nu=c.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:s,onSlideEnd:a,onStepKeyDown:u,...l}=e,d=c.useRef(null),p=G(t,d),y=c.useRef(void 0),h=!o;function E(f){const v=y.current||d.current.getBoundingClientRect(),w=[0,v.height],x=Zn(w,h?[r,n]:[n,r]);return y.current=v,x(f-v.top)}return m.jsx(Ai,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:m.jsx(Oi,{"data-orientation":"vertical",...l,ref:p,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:f=>{const v=E(f.clientY);i?.(v)},onSlideMove:f=>{const v=E(f.clientY);s?.(v)},onSlideEnd:()=>{y.current=void 0,a?.()},onStepKeyDown:f=>{const w=Ti[h?"from-bottom":"from-top"].includes(f.key);u?.({event:f,direction:w?-1:1})}})})}),Oi=c.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:u,...l}=e,d=Lt(Ge,n);return m.jsx(F.span,{...l,ref:t,onKeyDown:N(e.onKeyDown,p=>{p.key==="Home"?(s(p),p.preventDefault()):p.key==="End"?(a(p),p.preventDefault()):Ri.concat(bi).includes(p.key)&&(u(p),p.preventDefault())}),onPointerDown:N(e.onPointerDown,p=>{const y=p.target;y.setPointerCapture(p.pointerId),p.preventDefault(),d.thumbs.has(y)?y.focus():r(p)}),onPointerMove:N(e.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&o(p)}),onPointerUp:N(e.onPointerUp,p=>{const y=p.target;y.hasPointerCapture(p.pointerId)&&(y.releasePointerCapture(p.pointerId),i(p))})})}),Ii="SliderTrack",Mi=c.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Lt(Ii,n);return m.jsx(F.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Mi.displayName=Ii;var yn="SliderRange",Di=c.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Lt(yn,n),i=Ni(yn,n),s=c.useRef(null),a=G(t,s),u=o.values.length,l=o.values.map(y=>ji(y,o.min,o.max)),d=u>1?Math.min(...l):0,p=100-Math.max(...l);return m.jsx(F.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:p+"%"}})});Di.displayName=yn;var wn="SliderThumb",Li=c.forwardRef((e,t)=>{const n=Jl(e.__scopeSlider),[r,o]=c.useState(null),i=G(t,a=>o(a)),s=c.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(ru,{...e,ref:i,index:s})}),ru=c.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,s=Lt(wn,n),a=Ni(wn,n),[u,l]=c.useState(null),d=G(t,C=>l(C)),p=u?s.form||!!u.closest("form"):!0,y=po(u),h=s.values[r],E=h===void 0?0:ji(h,s.min,s.max),f=su(r,s.values.length),v=y?.[a.size],w=v?cu(v,E,a.direction):0;return c.useEffect(()=>{if(u)return s.thumbs.add(u),()=>{s.thumbs.delete(u)}},[u,s.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${E}% + ${w}px)`},children:[m.jsx(hn.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(F.span,{role:"slider","aria-label":e["aria-label"]||f,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...i,ref:d,style:h===void 0?{display:"none"}:e.style,onFocus:N(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),p&&m.jsx(ki,{name:o??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},r)]})});Li.displayName=wn;var ou="RadioBubbleInput",ki=c.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=c.useRef(null),i=G(o,r),s=Kn(t);return c.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&d){const p=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(p)}},[s,t]),m.jsx(F.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});ki.displayName=ou;function iu(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function ji(e,t,n){const i=100/(n-t)*(e-t);return Et(i,[0,100])}function su(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function au(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function cu(e,t,n){const r=e/2,i=Zn([0,50],[0,r]);return(r-i(t)*n)*n}function lu(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function uu(e,t){if(t>0){const n=lu(e);return Math.min(...n)>=t}return!0}function Zn(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function du(e){return(String(e).split(".")[1]||"").length}function fu(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var gd=_i,hd=Mi,yd=Di,wd=Li,pu=[" ","Enter","ArrowUp","ArrowDown"],vu=[" ","Enter"],Ie="Select",[kt,jt,mu]=et(Ie),[Xe]=ye(Ie,[mu,Nt]),Ft=Nt(),[gu,Te]=Xe(Ie),[hu,yu]=Xe(Ie),Fi=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:u,dir:l,name:d,autoComplete:p,disabled:y,required:h,form:E}=e,f=Ft(t),[v,w]=c.useState(null),[C,x]=c.useState(null),[S,R]=c.useState(!1),P=Wn(l),[b,M]=Ae({prop:r,defaultProp:o??!1,onChange:i,caller:Ie}),[O,$]=Ae({prop:s,defaultProp:a,onChange:u,caller:Ie}),D=c.useRef(null),B=v?E||!!v.closest("form"):!0,[W,A]=c.useState(new Set),K=Array.from(W).map(L=>L.props.value).join(";");return m.jsx(yc,{...f,children:m.jsxs(gu,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:C,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:Ee(),value:O,onValueChange:$,open:b,onOpenChange:M,dir:P,triggerPointerDownPosRef:D,disabled:y,children:[m.jsx(kt.Provider,{scope:t,children:m.jsx(hu,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(L=>{A(H=>new Set(H).add(L))},[]),onNativeOptionRemove:c.useCallback(L=>{A(H=>{const I=new Set(H);return I.delete(L),I})},[]),children:n})}),B?m.jsxs(cs,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:p,value:O,onChange:L=>$(L.target.value),disabled:y,form:E,children:[O===void 0?m.jsx("option",{value:""}):null,Array.from(W)]},K):null]})})};Fi.displayName=Ie;var $i="SelectTrigger",Hi=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ft(n),s=Te($i,n),a=s.disabled||r,u=G(t,s.onTriggerChange),l=jt(n),d=c.useRef("touch"),[p,y,h]=us(f=>{const v=l().filter(x=>!x.disabled),w=v.find(x=>x.value===s.value),C=ds(v,f,w);C!==void 0&&s.onValueChange(C.value)}),E=f=>{a||(s.onOpenChange(!0),h()),f&&(s.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return m.jsx(So,{asChild:!0,...i,children:m.jsx(F.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ls(s.value)?"":void 0,...o,ref:u,onClick:N(o.onClick,f=>{f.currentTarget.focus(),d.current!=="mouse"&&E(f)}),onPointerDown:N(o.onPointerDown,f=>{d.current=f.pointerType;const v=f.target;v.hasPointerCapture(f.pointerId)&&v.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(E(f),f.preventDefault())}),onKeyDown:N(o.onKeyDown,f=>{const v=p.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&y(f.key),!(v&&f.key===" ")&&pu.includes(f.key)&&(E(),f.preventDefault())})})})});Hi.displayName=$i;var Vi="SelectValue",Bi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,u=Te(Vi,n),{onValueNodeHasChildrenChange:l}=u,d=i!==void 0,p=G(t,u.onValueNodeChange);return ee(()=>{l(d)},[l,d]),m.jsx(F.span,{...a,ref:p,style:{pointerEvents:"none"},children:ls(u.value)?m.jsx(m.Fragment,{children:s}):i})});Bi.displayName=Vi;var wu="SelectIcon",Wi=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(F.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Wi.displayName=wu;var xu="SelectPortal",Ki=e=>m.jsx(Rt,{asChild:!0,...e});Ki.displayName=xu;var Me="SelectContent",Ui=c.forwardRef((e,t)=>{const n=Te(Me,e.__scopeSelect),[r,o]=c.useState();if(ee(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Ke.createPortal(m.jsx(zi,{scope:e.__scopeSelect,children:m.jsx(kt.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),i):null}return m.jsx(Yi,{...e,ref:t})});Ui.displayName=Me;var ce=10,[zi,Pe]=Xe(Me),Eu="SelectContentImpl",Cu=He("SelectContent.RemoveScroll"),Yi=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:y,collisionPadding:h,sticky:E,hideWhenDetached:f,avoidCollisions:v,...w}=e,C=Te(Me,n),[x,S]=c.useState(null),[R,P]=c.useState(null),b=G(t,_=>S(_)),[M,O]=c.useState(null),[$,D]=c.useState(null),B=jt(n),[W,A]=c.useState(!1),K=c.useRef(!1);c.useEffect(()=>{if(x)return Wo(x)},[x]),Do();const L=c.useCallback(_=>{const[X,...q]=B().map(Q=>Q.ref.current),[Z]=q.slice(-1),J=document.activeElement;for(const Q of _)if(Q===J||(Q?.scrollIntoView({block:"nearest"}),Q===X&&R&&(R.scrollTop=0),Q===Z&&R&&(R.scrollTop=R.scrollHeight),Q?.focus(),document.activeElement!==J))return},[B,R]),H=c.useCallback(()=>L([M,x]),[L,M,x]);c.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:I,triggerPointerDownPosRef:z}=C;c.useEffect(()=>{if(x){let _={x:0,y:0};const X=Z=>{_={x:Math.abs(Math.round(Z.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(z.current?.y??0))}},q=Z=>{_.x<=10&&_.y<=10?Z.preventDefault():x.contains(Z.target)||I(!1),document.removeEventListener("pointermove",X),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",q,{capture:!0})}}},[x,I,z]),c.useEffect(()=>{const _=()=>I(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[I]);const[te,g]=us(_=>{const X=B().filter(J=>!J.disabled),q=X.find(J=>J.ref.current===document.activeElement),Z=ds(X,_,q);Z&&setTimeout(()=>Z.ref.current.focus())}),T=c.useCallback((_,X,q)=>{const Z=!K.current&&!q;(C.value!==void 0&&C.value===X||Z)&&(O(_),Z&&(K.current=!0))},[C.value]),j=c.useCallback(()=>x?.focus(),[x]),k=c.useCallback((_,X,q)=>{const Z=!K.current&&!q;(C.value!==void 0&&C.value===X||Z)&&D(_)},[C.value]),U=r==="popper"?xn:Gi,Y=U===xn?{side:a,sideOffset:u,align:l,alignOffset:d,arrowPadding:p,collisionBoundary:y,collisionPadding:h,sticky:E,hideWhenDetached:f,avoidCollisions:v}:{};return m.jsx(zi,{scope:n,content:x,viewport:R,onViewportChange:P,itemRefCallback:T,selectedItem:M,onItemLeave:j,itemTextRefCallback:k,focusSelectedItem:H,selectedItemText:$,position:r,isPositioned:W,searchRef:te,children:m.jsx($n,{as:Cu,allowPinchZoom:!0,children:m.jsx(Fn,{asChild:!0,trapped:C.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:N(o,_=>{C.trigger?.focus({preventScroll:!0}),_.preventDefault()}),children:m.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:m.jsx(U,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:_=>_.preventDefault(),...w,...Y,onPlaced:()=>A(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:N(w.onKeyDown,_=>{const X=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!X&&_.key.length===1&&g(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let Z=B().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(_.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const J=_.target,Q=Z.indexOf(J);Z=Z.slice(Q+1)}setTimeout(()=>L(Z)),_.preventDefault()}})})})})})})});Yi.displayName=Eu;var Su="SelectItemAlignedPosition",Gi=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Te(Me,n),s=Pe(Me,n),[a,u]=c.useState(null),[l,d]=c.useState(null),p=G(t,b=>d(b)),y=jt(n),h=c.useRef(!1),E=c.useRef(!0),{viewport:f,selectedItem:v,selectedItemText:w,focusSelectedItem:C}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&f&&v&&w){const b=i.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),O=i.valueNode.getBoundingClientRect(),$=w.getBoundingClientRect();if(i.dir!=="rtl"){const J=$.left-M.left,Q=O.left-J,se=b.left-Q,_e=b.width+se,$t=Math.max(_e,M.width),Ht=window.innerWidth-ce,Vt=Et(Q,[ce,Math.max(ce,Ht-$t)]);a.style.minWidth=_e+"px",a.style.left=Vt+"px"}else{const J=M.right-$.right,Q=window.innerWidth-O.right-J,se=window.innerWidth-b.right-Q,_e=b.width+se,$t=Math.max(_e,M.width),Ht=window.innerWidth-ce,Vt=Et(Q,[ce,Math.max(ce,Ht-$t)]);a.style.minWidth=_e+"px",a.style.right=Vt+"px"}const D=y(),B=window.innerHeight-ce*2,W=f.scrollHeight,A=window.getComputedStyle(l),K=parseInt(A.borderTopWidth,10),L=parseInt(A.paddingTop,10),H=parseInt(A.borderBottomWidth,10),I=parseInt(A.paddingBottom,10),z=K+L+W+I+H,te=Math.min(v.offsetHeight*5,z),g=window.getComputedStyle(f),T=parseInt(g.paddingTop,10),j=parseInt(g.paddingBottom,10),k=b.top+b.height/2-ce,U=B-k,Y=v.offsetHeight/2,_=v.offsetTop+Y,X=K+L+_,q=z-X;if(X<=k){const J=D.length>0&&v===D[D.length-1].ref.current;a.style.bottom="0px";const Q=l.clientHeight-f.offsetTop-f.offsetHeight,se=Math.max(U,Y+(J?j:0)+Q+H),_e=X+se;a.style.height=_e+"px"}else{const J=D.length>0&&v===D[0].ref.current;a.style.top="0px";const se=Math.max(k,K+f.offsetTop+(J?T:0)+Y)+q;a.style.height=se+"px",f.scrollTop=X-k+f.offsetTop}a.style.margin=`${ce}px 0`,a.style.minHeight=te+"px",a.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[y,i.trigger,i.valueNode,a,l,f,v,w,i.dir,r]);ee(()=>x(),[x]);const[S,R]=c.useState();ee(()=>{l&&R(window.getComputedStyle(l).zIndex)},[l]);const P=c.useCallback(b=>{b&&E.current===!0&&(x(),C?.(),E.current=!1)},[x,C]);return m.jsx(bu,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:m.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m.jsx(F.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Gi.displayName=Su;var Ru="SelectPopperPosition",xn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ce,...i}=e,s=Ft(n);return m.jsx(Ro,{...s,...i,ref:t,align:r,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)"}})});xn.displayName=Ru;var[bu,Jn]=Xe(Me,{}),En="SelectViewport",Xi=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Pe(En,n),s=Jn(En,n),a=G(t,i.onViewportChange),u=c.useRef(0);return m.jsxs(m.Fragment,{children:[m.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:r}),m.jsx(kt.Slot,{scope:n,children:m.jsx(F.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:N(o.onScroll,l=>{const d=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:y}=s;if(y?.current&&p){const h=Math.abs(u.current-d.scrollTop);if(h>0){const E=window.innerHeight-ce*2,f=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),w=Math.max(f,v);if(w<E){const C=w+h,x=Math.min(E,C),S=C-x;p.style.height=x+"px",p.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});Xi.displayName=En;var qi="SelectGroup",[Tu,Pu]=Xe(qi),_u=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ee();return m.jsx(Tu,{scope:n,id:o,children:m.jsx(F.div,{role:"group","aria-labelledby":o,...r,ref:t})})});_u.displayName=qi;var Zi="SelectLabel",Ji=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pu(Zi,n);return m.jsx(F.div,{id:o.id,...r,ref:t})});Ji.displayName=Zi;var Ct="SelectItem",[Au,Qi]=Xe(Ct),es=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=Te(Ct,n),u=Pe(Ct,n),l=a.value===r,[d,p]=c.useState(i??""),[y,h]=c.useState(!1),E=G(t,C=>u.itemRefCallback?.(C,r,o)),f=Ee(),v=c.useRef("touch"),w=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 m.jsx(Au,{scope:n,value:r,disabled:o,textId:f,isSelected:l,onItemTextChange:c.useCallback(C=>{p(x=>x||(C?.textContent??"").trim())},[]),children:m.jsx(kt.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:m.jsx(F.div,{role:"option","aria-labelledby":f,"data-highlighted":y?"":void 0,"aria-selected":l&&y,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:E,onFocus:N(s.onFocus,()=>h(!0)),onBlur:N(s.onBlur,()=>h(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:N(s.onPointerDown,C=>{v.current=C.pointerType}),onPointerMove:N(s.onPointerMove,C=>{v.current=C.pointerType,o?u.onItemLeave?.():v.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,C=>{C.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,C=>{u.searchRef?.current!==""&&C.key===" "||(vu.includes(C.key)&&w(),C.key===" "&&C.preventDefault())})})})})});es.displayName=Ct;var Ze="SelectItemText",ts=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=Te(Ze,n),a=Pe(Ze,n),u=Qi(Ze,n),l=yu(Ze,n),[d,p]=c.useState(null),y=G(t,w=>p(w),u.onItemTextChange,w=>a.itemTextRefCallback?.(w,u.value,u.disabled)),h=d?.textContent,E=c.useMemo(()=>m.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value),[u.disabled,u.value,h]),{onNativeOptionAdd:f,onNativeOptionRemove:v}=l;return ee(()=>(f(E),()=>v(E)),[f,v,E]),m.jsxs(m.Fragment,{children:[m.jsx(F.span,{id:u.textId,...i,ref:y}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ke.createPortal(i.children,s.valueNode):null]})});ts.displayName=Ze;var ns="SelectItemIndicator",rs=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Qi(ns,n).isSelected?m.jsx(F.span,{"aria-hidden":!0,...r,ref:t}):null});rs.displayName=ns;var Cn="SelectScrollUpButton",os=c.forwardRef((e,t)=>{const n=Pe(Cn,e.__scopeSelect),r=Jn(Cn,e.__scopeSelect),[o,i]=c.useState(!1),s=G(t,r.onScrollButtonChange);return ee(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollTop>0;i(l)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?m.jsx(ss,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});os.displayName=Cn;var Sn="SelectScrollDownButton",is=c.forwardRef((e,t)=>{const n=Pe(Sn,e.__scopeSelect),r=Jn(Sn,e.__scopeSelect),[o,i]=c.useState(!1),s=G(t,r.onScrollButtonChange);return ee(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<l;i(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?m.jsx(ss,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});is.displayName=Sn;var ss=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Pe("SelectScrollButton",n),s=c.useRef(null),a=jt(n),u=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),ee(()=>{a().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),m.jsx(F.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:N(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:N(o.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:N(o.onPointerLeave,()=>{u()})})}),Nu="SelectSeparator",as=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(F.div,{"aria-hidden":!0,...r,ref:t})});as.displayName=Nu;var Rn="SelectArrow",Ou=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ft(n),i=Te(Rn,n),s=Pe(Rn,n);return i.open&&s.position==="popper"?m.jsx(bo,{...o,...r,ref:t}):null});Ou.displayName=Rn;var Iu="SelectBubbleInput",cs=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),i=G(r,o),s=Kn(t);return c.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&d){const p=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(p)}},[s,t]),m.jsx(F.select,{...n,style:{...Br,...n.style},ref:i,defaultValue:t})});cs.displayName=Iu;function ls(e){return e===""||e===void 0}function us(e){const t=ne(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(s=>{const a=n.current+s;t(a),(function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(a)},[t]),i=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ds(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Mu(e,Math.max(i,0));o.length===1&&(s=s.filter(l=>l!==n));const u=s.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Mu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var xd=Fi,Ed=Hi,Cd=Bi,Sd=Wi,Rd=Ki,bd=Ui,Td=Xi,Pd=Ji,_d=es,Ad=ts,Nd=rs,Od=os,Id=is,Md=as,Qn="Progress",er=100,[Du]=ye(Qn),[Lu,ku]=Du(Qn),fs=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=ju,...s}=e;(o||o===0)&&!Ir(o)&&console.error(Fu(`${o}`,"Progress"));const a=Ir(o)?o:er;r!==null&&!Mr(r,a)&&console.error($u(`${r}`,"Progress"));const u=Mr(r,a)?r:null,l=St(u)?i(u,a):void 0;return m.jsx(Lu,{scope:n,value:u,max:a,children:m.jsx(F.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":St(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":ms(u,a),"data-value":u??void 0,"data-max":a,...s,ref:t})})});fs.displayName=Qn;var ps="ProgressIndicator",vs=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=ku(ps,n);return m.jsx(F.div,{"data-state":ms(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});vs.displayName=ps;function ju(e,t){return`${Math.round(e/t*100)}%`}function ms(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function St(e){return typeof e=="number"}function Ir(e){return St(e)&&!isNaN(e)&&e>0}function Mr(e,t){return St(e)&&!isNaN(e)&&e<=t&&e>=0}function Fu(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${er}\`.`}function $u(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${er} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var Dd=fs,Ld=vs,Hu="Label",gs=c.forwardRef((e,t)=>m.jsx(F.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));gs.displayName=Hu;var kd=gs;export{Yu as A,Ld as B,Gu as C,zu as D,xd as E,Cd as F,Ed as G,Sd as H,pd as I,Rd as J,bd as K,ld as L,Td as M,_d as N,rd as O,Bu as P,Nd as Q,Ku as R,Vu as S,Uu as T,Ad as U,Wu as V,Od as W,Id as X,Pd as Y,Md as Z,kd as _,Lr as a,Cs as b,we as c,jr as d,Ju as e,Zu as f,nd as g,od as h,ad as i,m as j,id as k,sd as l,ed as m,td as n,cd as o,dd as p,vd as q,c as r,md as s,fd as t,ud as u,gd as v,hd as w,yd as x,wd as y,Dd as z};