import{b as Sg,a as xg,r as v,j as T,R as Md,d as Me}from"./comparison-DdwL-fbx.js";var sa={exports:{}},ot={},aa={exports:{}},ua={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var od;function Cg(){return od||(od=1,(function(r){function l(F,W){var U=F.length;F.push(W);e:for(;0>>1,ye=F[me];if(0>>1;mec(ft,U))Lec(q,ft)?(F[me]=q,F[Le]=U,me=Le):(F[me]=ft,F[Oe]=U,me=Oe);else if(Lec(q,U))F[me]=q,F[Le]=U,me=Le;else break e}}return W}function c(F,W){var U=F.sortIndex-W.sortIndex;return U!==0?U:F.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;r.unstable_now=function(){return f.now()}}else{var d=Date,p=d.now();r.unstable_now=function(){return d.now()-p}}var h=[],g=[],w=1,y=null,P=3,k=!1,A=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(F){for(var W=i(g);W!==null;){if(W.callback===null)a(g);else if(W.startTime<=F)a(g),W.sortIndex=W.expirationTime,l(h,W);else break;W=i(g)}}function L(F){if(S=!1,D(F),!A)if(i(h)!==null)A=!0,Z(j);else{var W=i(g);W!==null&&ae(L,W.startTime-F)}}function j(F,W){A=!1,S&&(S=!1,N(G),G=-1),k=!0;var U=P;try{for(D(W),y=i(h);y!==null&&(!(y.expirationTime>W)||F&&!ne());){var me=y.callback;if(typeof me=="function"){y.callback=null,P=y.priorityLevel;var ye=me(y.expirationTime<=W);W=r.unstable_now(),typeof ye=="function"?y.callback=ye:y===i(h)&&a(h),D(W)}else a(h);y=i(h)}if(y!==null)var Je=!0;else{var Oe=i(g);Oe!==null&&ae(L,Oe.startTime-W),Je=!1}return Je}finally{y=null,P=U,k=!1}}var b=!1,V=null,G=-1,fe=5,ie=-1;function ne(){return!(r.unstable_now()-ieF||125me?(F.sortIndex=U,l(g,F),i(h)===null&&F===i(g)&&(S?(N(G),G=-1):S=!0,ae(L,U-me))):(F.sortIndex=ye,l(h,F),A||k||(A=!0,Z(j))),F},r.unstable_shouldYield=ne,r.unstable_wrapCallback=function(F){var W=P;return function(){var U=P;P=W;try{return F.apply(this,arguments)}finally{P=U}}}})(ua)),ua}var ld;function Eg(){return ld||(ld=1,aa.exports=Cg()),aa.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var id;function Pg(){if(id)return ot;id=1;var r=Sg(),l=Eg();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},y={};function P(e){return h.call(y,e)?!0:h.call(w,e)?!1:g.test(e)?y[e]=!0:(w[e]=!0,!1)}function k(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function A(e,t,n,o){if(t===null||typeof t>"u"||k(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,n,o,s,u,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=m}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){C[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N,_);C[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N,_);C[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N,_);C[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function D(e,t,n,o){var s=C.hasOwnProperty(t)?C[t]:null;(s!==null?s.type!==0:o||!(2x||s[m]!==u[x]){var E=` `+s[m].replace(" at new "," at ");return e.displayName&&E.includes("")&&(E=E.replace("",e.displayName)),E}while(1<=m&&0<=x);break}}}finally{Je=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ye(e):""}function ft(e){switch(e.tag){case 5:return ye(e.type);case 16:return ye("Lazy");case 13:return ye("Suspense");case 19:return ye("SuspenseList");case 0:case 2:case 15:return e=Oe(e.type,!1),e;case 11:return e=Oe(e.type.render,!1),e;case 1:return e=Oe(e.type,!0),e;default:return""}}function Le(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case b:return"Portal";case fe:return"Profiler";case G:return"StrictMode";case se:return"Suspense";case ce:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ne:return(e.displayName||"Context")+".Consumer";case ie:return(e._context.displayName||"Context")+".Provider";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case de:return t=e.displayName||null,t!==null?t:Le(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return Le(e(t))}catch{}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Le(t);case 8:return t===G?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ze(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xe(e){var t=ze(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(m){o=""+m,u.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(m){o=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function we(e){e._valueTracker||(e._valueTracker=xe(e))}function Re(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=ze(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function He(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wt(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kn(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=ge(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gn(e,t){t=t.checked,t!=null&&D(e,"checked",t,!1)}function _n(e,t){Gn(e,t);var n=ge(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gi(e,t.type,n):t.hasOwnProperty("defaultValue")&&gi(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function du(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gi(e,t,n){(t!=="number"||He(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ar=Array.isArray;function Qn(e,t,n,o){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ko.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Dr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pv=["Webkit","ms","Moz","O"];Object.keys(Dr).forEach(function(e){Pv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Dr[t]=Dr[e]})});function yu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Dr.hasOwnProperty(e)&&Dr[e]?(""+t).trim():t+"px"}function wu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,s=yu(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,s):e[n]=s}}var kv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Si(e,t){if(t){if(kv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function xi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ci=null;function Ei(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pi=null,Yn=null,Xn=null;function Su(e){if(e=to(e)){if(typeof Pi!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Qo(t),Pi(e.stateNode,e.type,t))}}function xu(e){Yn?Xn?Xn.push(e):Xn=[e]:Yn=e}function Cu(){if(Yn){var e=Yn,t=Xn;if(Xn=Yn=null,Su(e),t)for(e=0;e>>=0,e===0?32:31-(Fv(e)/jv|0)|0}var Io=64,Ao=4194304;function jr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oo(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,s=e.suspendedLanes,u=e.pingedLanes,m=n&268435455;if(m!==0){var x=m&~s;x!==0?o=jr(x):(u&=m,u!==0&&(o=jr(u)))}else m=n&~s,m!==0?o=jr(m):u!==0&&(o=jr(u));if(o===0)return 0;if(t!==0&&t!==o&&(t&s)===0&&(s=o&-o,u=t&-t,s>=u||s===16&&(u&4194240)!==0))return t;if((o&4)!==0&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function zr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=n}function $v(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=Kr),Xu=" ",Zu=!1;function Ju(e,t){switch(e){case"keyup":return vh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function gh(e,t){switch(e){case"compositionend":return qu(t);case"keypress":return t.which!==32?null:(Zu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Zu?null:e;default:return null}}function yh(e,t){if(qn)return e==="compositionend"||!Hi&&Ju(e,t)?(e=Wu(),jo=Fi=on=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ic(n)}}function ac(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ac(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uc(){for(var e=window,t=He();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=He(e.document)}return t}function bi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Th(e){var t=uc(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ac(n.ownerDocument.documentElement,n)){if(o!==null&&bi(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,u=Math.min(o.start,s);o=o.end===void 0?u:Math.min(o.end,s),!e.extend&&u>o&&(s=o,o=u,u=s),s=sc(n,u);var m=sc(n,o);s&&m&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),u>o?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,er=null,Ki=null,Xr=null,Gi=!1;function cc(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gi||er==null||er!==He(o)||(o=er,"selectionStart"in o&&bi(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Xr&&Yr(Xr,o)||(Xr=o,o=bo(Ki,"onSelect"),0lr||(e.current=ls[lr],ls[lr]=null,lr--)}function Ce(e,t){lr++,ls[lr]=e.current,e.current=t}var un={},Ke=an(un),qe=an(!1),An=un;function ir(e,t){var n=e.type.contextTypes;if(!n)return un;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var s={},u;for(u in n)s[u]=t[u];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function et(e){return e=e.childContextTypes,e!=null}function Yo(){Pe(qe),Pe(Ke)}function kc(e,t,n){if(Ke.current!==un)throw Error(i(168));Ce(Ke,t),Ce(qe,n)}function Rc(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var s in o)if(!(s in t))throw Error(i(108,q(e)||"Unknown",s));return U({},n,o)}function Xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,An=Ke.current,Ce(Ke,e),Ce(qe,qe.current),!0}function Tc(e,t,n){var o=e.stateNode;if(!o)throw Error(i(169));n?(e=Rc(e,t,An),o.__reactInternalMemoizedMergedChildContext=e,Pe(qe),Pe(Ke),Ce(Ke,e)):Pe(qe),Ce(qe,n)}var bt=null,Zo=!1,is=!1;function _c(e){bt===null?bt=[e]:bt.push(e)}function Bh(e){Zo=!0,_c(e)}function cn(){if(!is&&bt!==null){is=!0;var e=0,t=Se;try{var n=bt;for(Se=1;e>=m,s-=m,Kt=1<<32-St(t)+s|n<le?($e=te,te=null):$e=te.sibling;var he=z(I,te,O[le],H);if(he===null){te===null&&(te=$e);break}e&&te&&he.alternate===null&&t(I,te),R=u(he,R,le),ee===null?J=he:ee.sibling=he,ee=he,te=$e}if(le===O.length)return n(I,te),ke&&Dn(I,le),J;if(te===null){for(;lele?($e=te,te=null):$e=te.sibling;var wn=z(I,te,he.value,H);if(wn===null){te===null&&(te=$e);break}e&&te&&wn.alternate===null&&t(I,te),R=u(wn,R,le),ee===null?J=wn:ee.sibling=wn,ee=wn,te=$e}if(he.done)return n(I,te),ke&&Dn(I,le),J;if(te===null){for(;!he.done;le++,he=O.next())he=$(I,he.value,H),he!==null&&(R=u(he,R,le),ee===null?J=he:ee.sibling=he,ee=he);return ke&&Dn(I,le),J}for(te=o(I,te);!he.done;le++,he=O.next())he=K(te,I,le,he.value,H),he!==null&&(e&&he.alternate!==null&&te.delete(he.key===null?le:he.key),R=u(he,R,le),ee===null?J=he:ee.sibling=he,ee=he);return e&&te.forEach(function(wg){return t(I,wg)}),ke&&Dn(I,le),J}function Ae(I,R,O,H){if(typeof O=="object"&&O!==null&&O.type===V&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case j:e:{for(var J=O.key,ee=R;ee!==null;){if(ee.key===J){if(J=O.type,J===V){if(ee.tag===7){n(I,ee.sibling),R=s(ee,O.props.children),R.return=I,I=R;break e}}else if(ee.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Z&&Mc(J)===ee.type){n(I,ee.sibling),R=s(ee,O.props),R.ref=no(I,ee,O),R.return=I,I=R;break e}n(I,ee);break}else t(I,ee);ee=ee.sibling}O.type===V?(R=$n(O.props.children,I.mode,H,O.key),R.return=I,I=R):(H=kl(O.type,O.key,O.props,null,I.mode,H),H.ref=no(I,R,O),H.return=I,I=H)}return m(I);case b:e:{for(ee=O.key;R!==null;){if(R.key===ee)if(R.tag===4&&R.stateNode.containerInfo===O.containerInfo&&R.stateNode.implementation===O.implementation){n(I,R.sibling),R=s(R,O.children||[]),R.return=I,I=R;break e}else{n(I,R);break}else t(I,R);R=R.sibling}R=na(O,I.mode,H),R.return=I,I=R}return m(I);case Z:return ee=O._init,Ae(I,R,ee(O._payload),H)}if(Ar(O))return Y(I,R,O,H);if(W(O))return X(I,R,O,H);tl(I,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,R!==null&&R.tag===6?(n(I,R.sibling),R=s(R,O),R.return=I,I=R):(n(I,R),R=ta(O,I.mode,H),R.return=I,I=R),m(I)):n(I,R)}return Ae}var cr=Lc(!0),Fc=Lc(!1),nl=an(null),rl=null,fr=null,ds=null;function ps(){ds=fr=rl=null}function ms(e){var t=nl.current;Pe(nl),e._currentValue=t}function vs(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function dr(e,t){rl=e,ds=fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(tt=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(ds!==e)if(e={context:e,memoizedValue:t,next:null},fr===null){if(rl===null)throw Error(i(308));fr=e,rl.dependencies={lanes:0,firstContext:e}}else fr=fr.next=e;return t}var Mn=null;function hs(e){Mn===null?Mn=[e]:Mn.push(e)}function jc(e,t,n,o){var s=t.interleaved;return s===null?(n.next=n,hs(t)):(n.next=s.next,s.next=n),t.interleaved=n,Qt(e,o)}function Qt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fn=!1;function gs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(ve&2)!==0){var s=o.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),o.pending=t,Qt(e,n)}return s=o.interleaved,s===null?(t.next=t,hs(o)):(t.next=s.next,s.next=t),o.interleaved=t,Qt(e,n)}function ol(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,Ai(e,n)}}function Bc(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var s=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var m={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?s=u=m:u=u.next=m,n=n.next}while(n!==null);u===null?s=u=t:u=u.next=t}else s=u=t;n={baseState:o.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ll(e,t,n,o){var s=e.updateQueue;fn=!1;var u=s.firstBaseUpdate,m=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var E=x,M=E.next;E.next=null,m===null?u=M:m.next=M,m=E;var B=e.alternate;B!==null&&(B=B.updateQueue,x=B.lastBaseUpdate,x!==m&&(x===null?B.firstBaseUpdate=M:x.next=M,B.lastBaseUpdate=E))}if(u!==null){var $=s.baseState;m=0,B=M=E=null,x=u;do{var z=x.lane,K=x.eventTime;if((o&z)===z){B!==null&&(B=B.next={eventTime:K,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var Y=e,X=x;switch(z=t,K=n,X.tag){case 1:if(Y=X.payload,typeof Y=="function"){$=Y.call(K,$,z);break e}$=Y;break e;case 3:Y.flags=Y.flags&-65537|128;case 0:if(Y=X.payload,z=typeof Y=="function"?Y.call(K,$,z):Y,z==null)break e;$=U({},$,z);break e;case 2:fn=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,z=s.effects,z===null?s.effects=[x]:z.push(x))}else K={eventTime:K,lane:z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},B===null?(M=B=K,E=$):B=B.next=K,m|=z;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;z=x,x=z.next,z.next=null,s.lastBaseUpdate=z,s.shared.pending=null}}while(!0);if(B===null&&(E=$),s.baseState=E,s.firstBaseUpdate=M,s.lastBaseUpdate=B,t=s.shared.interleaved,t!==null){s=t;do m|=s.lane,s=s.next;while(s!==t)}else u===null&&(s.shared.lanes=0);jn|=m,e.lanes=m,e.memoizedState=$}}function Vc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=Cs.transition;Cs.transition={};try{e(!1),t()}finally{Se=n,Cs.transition=o}}function lf(){return vt().memoizedState}function Uh(e,t,n){var o=hn(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},sf(e))af(t,n);else if(n=jc(e,t,n,o),n!==null){var s=Ze();Rt(n,e,o,s),uf(n,t,o)}}function Wh(e,t,n){var o=hn(e),s={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(sf(e))af(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var m=t.lastRenderedState,x=u(m,n);if(s.hasEagerState=!0,s.eagerState=x,xt(x,m)){var E=t.interleaved;E===null?(s.next=s,hs(t)):(s.next=E.next,E.next=s),t.interleaved=s;return}}catch{}finally{}n=jc(e,t,s,o),n!==null&&(s=Ze(),Rt(n,e,o,s),uf(n,t,o))}}function sf(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function af(e,t){io=al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uf(e,t,n){if((n&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,Ai(e,n)}}var fl={readContext:mt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},bh={readContext:mt,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Zc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ul(4194308,4,ef.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return ul(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=jt();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Uh.bind(null,_e,e),[o.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Yc,useDebugValue:Ns,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Yc(!1),t=e[0];return e=Hh.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=_e,s=jt();if(ke){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ve===null)throw Error(i(349));(Fn&30)!==0||Wc(o,t,n)}s.memoizedState=n;var u={value:n,getSnapshot:t};return s.queue=u,Zc(Kc.bind(null,o,u,e),[e]),o.flags|=2048,uo(9,bc.bind(null,o,u,n,t),void 0,null),n},useId:function(){var e=jt(),t=Ve.identifierPrefix;if(ke){var n=Gt,o=Kt;n=(o&~(1<<32-St(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=so++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=m.createElement(n,{is:o.is}):(e=m.createElement(n),n==="select"&&(m=e,o.multiple?m.multiple=!0:o.size&&(m.size=o.size))):e=m.createElementNS(e,n),e[Lt]=t,e[eo]=o,Nf(e,t,!1,!1),t.stateNode=e;e:{switch(m=xi(n,o),n){case"dialog":Ee("cancel",e),Ee("close",e),s=o;break;case"iframe":case"object":case"embed":Ee("load",e),s=o;break;case"video":case"audio":for(s=0;sgr&&(t.flags|=128,o=!0,co(u,!1),t.lanes=4194304)}else{if(!o)if(e=il(m),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),co(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ke)return Qe(t),null}else 2*Ie()-u.renderingStartTime>gr&&n!==1073741824&&(t.flags|=128,o=!0,co(u,!1),t.lanes=4194304);u.isBackwards?(m.sibling=t.child,t.child=m):(n=u.last,n!==null?n.sibling=m:t.child=m,u.last=m)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ie(),t.sibling=null,n=Te.current,Ce(Te,o?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return Js(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(at&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function qh(e,t){switch(as(t),t.tag){case 1:return et(t.type)&&Yo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pr(),Pe(qe),Pe(Ke),xs(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ws(t),null;case 13:if(Pe(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Te),null;case 4:return pr(),null;case 10:return ms(t.type._context),null;case 22:case 23:return Js(),null;case 24:return null;default:return null}}var vl=!1,Ye=!1,eg=typeof WeakSet=="function"?WeakSet:Set,Q=null;function vr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Ne(e,t,o)}else n.current=null}function Vs(e,t,n){try{n()}catch(o){Ne(e,t,o)}}var Of=!1;function tg(e,t){if(qi=Lo,e=uc(),bi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var s=o.anchorOffset,u=o.focusNode;o=o.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var m=0,x=-1,E=-1,M=0,B=0,$=e,z=null;t:for(;;){for(var K;$!==n||s!==0&&$.nodeType!==3||(x=m+s),$!==u||o!==0&&$.nodeType!==3||(E=m+o),$.nodeType===3&&(m+=$.nodeValue.length),(K=$.firstChild)!==null;)z=$,$=K;for(;;){if($===e)break t;if(z===n&&++M===s&&(x=m),z===u&&++B===o&&(E=m),(K=$.nextSibling)!==null)break;$=z,z=$.parentNode}$=K}n=x===-1||E===-1?null:{start:x,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(es={focusedElem:e,selectionRange:n},Lo=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var Y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Y!==null){var X=Y.memoizedProps,Ae=Y.memoizedState,I=t.stateNode,R=I.getSnapshotBeforeUpdate(t.elementType===t.type?X:Et(t.type,X),Ae);I.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(H){Ne(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return Y=Of,Of=!1,Y}function fo(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&e)===e){var u=s.destroy;s.destroy=void 0,u!==void 0&&Vs(t,n,u)}s=s.next}while(s!==o)}}function hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function $s(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Df(e){var t=e.alternate;t!==null&&(e.alternate=null,Df(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lt],delete t[eo],delete t[os],delete t[jh],delete t[zh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mf(e){return e.tag===5||e.tag===3||e.tag===4}function Lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hs(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Go));else if(o!==4&&(e=e.child,e!==null))for(Hs(e,t,n),e=e.sibling;e!==null;)Hs(e,t,n),e=e.sibling}function Us(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Us(e,t,n),e=e.sibling;e!==null;)Us(e,t,n),e=e.sibling}var Ue=null,Pt=!1;function pn(e,t,n){for(n=n.child;n!==null;)Ff(e,t,n),n=n.sibling}function Ff(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(No,n)}catch{}switch(n.tag){case 5:Ye||vr(n,t);case 6:var o=Ue,s=Pt;Ue=null,pn(e,t,n),Ue=o,Pt=s,Ue!==null&&(Pt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Pt?(e=Ue,n=n.stateNode,e.nodeType===8?rs(e.parentNode,n):e.nodeType===1&&rs(e,n),Ur(e)):rs(Ue,n.stateNode));break;case 4:o=Ue,s=Pt,Ue=n.stateNode.containerInfo,Pt=!0,pn(e,t,n),Ue=o,Pt=s;break;case 0:case 11:case 14:case 15:if(!Ye&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){s=o=o.next;do{var u=s,m=u.destroy;u=u.tag,m!==void 0&&((u&2)!==0||(u&4)!==0)&&Vs(n,t,m),s=s.next}while(s!==o)}pn(e,t,n);break;case 1:if(!Ye&&(vr(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(x){Ne(n,t,x)}pn(e,t,n);break;case 21:pn(e,t,n);break;case 22:n.mode&1?(Ye=(o=Ye)||n.memoizedState!==null,pn(e,t,n),Ye=o):pn(e,t,n);break;default:pn(e,t,n)}}function jf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eg),t.forEach(function(o){var s=cg.bind(null,e,o);n.has(o)||(n.add(o),o.then(s,s))})}}function kt(e,t){var n=t.deletions;if(n!==null)for(var o=0;os&&(s=m),o&=~u}if(o=s,o=Ie()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*rg(o/1960))-o,10e?16:e,vn===null)var o=!1;else{if(e=vn,vn=null,xl=0,(ve&6)!==0)throw Error(i(331));var s=ve;for(ve|=4,Q=e.current;Q!==null;){var u=Q,m=u.child;if((Q.flags&16)!==0){var x=u.deletions;if(x!==null){for(var E=0;EIe()-Ks?Bn(e,0):bs|=n),rt(e,t)}function Xf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ao,Ao<<=1,(Ao&130023424)===0&&(Ao=4194304)));var n=Ze();e=Qt(e,t),e!==null&&(zr(e,t,n),rt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xf(e,n)}function cg(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(i(314))}o!==null&&o.delete(t),Xf(e,n)}var Zf;Zf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)tt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return tt=!1,Zh(e,t,n);tt=(e.flags&131072)!==0}else tt=!1,ke&&(t.flags&1048576)!==0&&Nc(t,qo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;ml(e,t),e=t.pendingProps;var s=ir(t,Ke.current);dr(t,n),s=Ps(null,t,o,e,s,n);var u=ks();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(o)?(u=!0,Xo(t)):u=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,gs(t),s.updater=dl,t.stateNode=s,s._reactInternals=t,As(t,o,e,n),t=Ms(null,t,o,!0,u,n)):(t.tag=0,ke&&u&&ss(t),Xe(null,t,s,n),t=t.child),t;case 16:o=t.elementType;e:{switch(ml(e,t),e=t.pendingProps,s=o._init,o=s(o._payload),t.type=o,s=t.tag=dg(o),e=Et(o,e),s){case 0:t=Ds(null,t,o,e,n);break e;case 1:t=Ef(null,t,o,e,n);break e;case 11:t=yf(null,t,o,e,n);break e;case 14:t=wf(null,t,o,Et(o.type,e),n);break e}throw Error(i(306,o,""))}return t;case 0:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Et(o,s),Ds(e,t,o,s,n);case 1:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Et(o,s),Ef(e,t,o,s,n);case 3:e:{if(Pf(t),e===null)throw Error(i(387));o=t.pendingProps,u=t.memoizedState,s=u.element,zc(e,t),ll(t,o,null,n);var m=t.memoizedState;if(o=m.element,u.isDehydrated)if(u={element:o,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){s=mr(Error(i(423)),t),t=kf(e,t,o,n,s);break e}else if(o!==s){s=mr(Error(i(424)),t),t=kf(e,t,o,n,s);break e}else for(st=sn(t.stateNode.containerInfo.firstChild),it=t,ke=!0,Ct=null,n=Fc(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ur(),o===s){t=Xt(e,t,n);break e}Xe(e,t,o,n)}t=t.child}return t;case 5:return $c(t),e===null&&cs(t),o=t.type,s=t.pendingProps,u=e!==null?e.memoizedProps:null,m=s.children,ts(o,s)?m=null:u!==null&&ts(o,u)&&(t.flags|=32),Cf(e,t),Xe(e,t,m,n),t.child;case 6:return e===null&&cs(t),null;case 13:return Rf(e,t,n);case 4:return ys(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=cr(t,null,o,n):Xe(e,t,o,n),t.child;case 11:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Et(o,s),yf(e,t,o,s,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,s=t.pendingProps,u=t.memoizedProps,m=s.value,Ce(nl,o._currentValue),o._currentValue=m,u!==null)if(xt(u.value,m)){if(u.children===s.children&&!qe.current){t=Xt(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var x=u.dependencies;if(x!==null){m=u.child;for(var E=x.firstContext;E!==null;){if(E.context===o){if(u.tag===1){E=Yt(-1,n&-n),E.tag=2;var M=u.updateQueue;if(M!==null){M=M.shared;var B=M.pending;B===null?E.next=E:(E.next=B.next,B.next=E),M.pending=E}}u.lanes|=n,E=u.alternate,E!==null&&(E.lanes|=n),vs(u.return,n,t),x.lanes|=n;break}E=E.next}}else if(u.tag===10)m=u.type===t.type?null:u.child;else if(u.tag===18){if(m=u.return,m===null)throw Error(i(341));m.lanes|=n,x=m.alternate,x!==null&&(x.lanes|=n),vs(m,n,t),m=u.sibling}else m=u.child;if(m!==null)m.return=u;else for(m=u;m!==null;){if(m===t){m=null;break}if(u=m.sibling,u!==null){u.return=m.return,m=u;break}m=m.return}u=m}Xe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,o=t.pendingProps.children,dr(t,n),s=mt(s),o=o(s),t.flags|=1,Xe(e,t,o,n),t.child;case 14:return o=t.type,s=Et(o,t.pendingProps),s=Et(o.type,s),wf(e,t,o,s,n);case 15:return Sf(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Et(o,s),ml(e,t),t.tag=1,et(o)?(e=!0,Xo(t)):e=!1,dr(t,n),ff(t,o,s),As(t,o,s,n),Ms(null,t,o,!0,e,n);case 19:return _f(e,t,n);case 22:return xf(e,t,n)}throw Error(i(156,t.tag))};function Jf(e,t){return Iu(e,t)}function fg(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,n,o){return new fg(e,t,n,o)}function ea(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dg(e){if(typeof e=="function")return ea(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ue)return 11;if(e===de)return 14}return 2}function yn(e,t){var n=e.alternate;return n===null?(n=gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function kl(e,t,n,o,s,u){var m=2;if(o=e,typeof e=="function")ea(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case V:return $n(n.children,s,u,t);case G:m=8,s|=8;break;case fe:return e=gt(12,n,t,s|2),e.elementType=fe,e.lanes=u,e;case se:return e=gt(13,n,t,s),e.elementType=se,e.lanes=u,e;case ce:return e=gt(19,n,t,s),e.elementType=ce,e.lanes=u,e;case ae:return Rl(n,s,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:m=10;break e;case ne:m=9;break e;case ue:m=11;break e;case de:m=14;break e;case Z:m=16,o=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=gt(m,n,t,s),t.elementType=e,t.type=o,t.lanes=u,t}function $n(e,t,n,o){return e=gt(7,e,o,t),e.lanes=n,e}function Rl(e,t,n,o){return e=gt(22,e,o,t),e.elementType=ae,e.lanes=n,e.stateNode={isHidden:!1},e}function ta(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function na(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pg(e,t,n,o,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ii(0),this.expirationTimes=Ii(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ii(0),this.identifierPrefix=o,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ra(e,t,n,o,s,u,m,x,E){return e=new pg(e,t,n,x,E),t===1?(t=1,u===!0&&(t|=8)):t=0,u=gt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gs(u),e}function mg(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch{}}return r(),sa.exports=Pg(),sa.exports}var xo=kg();const Rg=xg(xo);function ad(r,l){if(typeof r=="function")return r(l);r!=null&&(r.current=l)}function Ld(...r){return l=>{let i=!1;const a=r.map(c=>{const f=ad(c,l);return!i&&typeof f=="function"&&(i=!0),f});if(i)return()=>{for(let c=0;c{const{children:f,...d}=a,p=v.Children.toArray(f),h=p.find(Ng);if(h){const g=h.props.children,w=p.map(y=>y===h?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:y);return T.jsx(l,{...d,ref:c,children:v.isValidElement(g)?v.cloneElement(g,void 0,w):null})}return T.jsx(l,{...d,ref:c,children:f})});return i.displayName=`${r}.Slot`,i}var fx=Pr("Slot");function Tg(r){const l=v.forwardRef((i,a)=>{const{children:c,...f}=i;if(v.isValidElement(c)){const d=Ag(c),p=Ig(f,c.props);return c.type!==v.Fragment&&(p.ref=a?Ld(a,d):d),v.cloneElement(c,p)}return v.Children.count(c)>1?v.Children.only(null):null});return l.displayName=`${r}.SlotClone`,l}var Fd=Symbol("radix.slottable");function _g(r){const l=({children:i})=>T.jsx(T.Fragment,{children:i});return l.displayName=`${r}.Slottable`,l.__radixId=Fd,l}function Ng(r){return v.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Fd}function Ig(r,l){const i={...l};for(const a in l){const c=r[a],f=l[a];/^on[A-Z]/.test(a)?c&&f?i[a]=(...p)=>{const h=f(...p);return c(...p),h}:c&&(i[a]=c):a==="style"?i[a]={...c,...f}:a==="className"&&(i[a]=[c,f].filter(Boolean).join(" "))}return{...r,...i}}function Ag(r){let l=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?r.ref:(l=Object.getOwnPropertyDescriptor(r,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?r.props.ref:r.props.ref||r.ref)}var Og=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=Og.reduce((r,l)=>{const i=Pr(`Primitive.${l}`),a=v.forwardRef((c,f)=>{const{asChild:d,...p}=c,h=d?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(h,{...p,ref:f})});return a.displayName=`Primitive.${l}`,{...r,[l]:a}},{});function Dg(r,l){r&&xo.flushSync(()=>r.dispatchEvent(l))}var Mg="Separator",ud="horizontal",Lg=["horizontal","vertical"],jd=v.forwardRef((r,l)=>{const{decorative:i,orientation:a=ud,...c}=r,f=Fg(a)?a:ud,p=i?{role:"none"}:{"aria-orientation":f==="vertical"?f:void 0,role:"separator"};return T.jsx(oe.div,{"data-orientation":f,...p,...c,ref:l})});jd.displayName=Mg;function Fg(r){return Lg.includes(r)}var dx=jd;function jg(r,l){const i=v.createContext(l),a=f=>{const{children:d,...p}=f,h=v.useMemo(()=>p,Object.values(p));return T.jsx(i.Provider,{value:h,children:d})};a.displayName=r+"Provider";function c(f){const d=v.useContext(i);if(d)return d;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${r}\``)}return[a,c]}function yt(r,l=[]){let i=[];function a(f,d){const p=v.createContext(d),h=i.length;i=[...i,d];const g=y=>{const{scope:P,children:k,...A}=y,S=P?.[r]?.[h]||p,C=v.useMemo(()=>A,Object.values(A));return T.jsx(S.Provider,{value:C,children:k})};g.displayName=f+"Provider";function w(y,P){const k=P?.[r]?.[h]||p,A=v.useContext(k);if(A)return A;if(d!==void 0)return d;throw new Error(`\`${y}\` must be used within \`${f}\``)}return[g,w]}const c=()=>{const f=i.map(d=>v.createContext(d));return function(p){const h=p?.[r]||f;return v.useMemo(()=>({[`__scope${r}`]:{...p,[r]:h}}),[p,h])}};return c.scopeName=r,[a,zg(c,...l)]}function zg(...r){const l=r[0];if(r.length===1)return l;const i=()=>{const a=r.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(f){const d=a.reduce((p,{useScope:h,scopeName:g})=>{const y=h(f)[`__scope${g}`];return{...p,...y}},{});return v.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return i.scopeName=l.scopeName,i}var ja="Progress",Bg=100,[Vg,px]=yt(ja),[$g,Hg]=Vg(ja),zd=v.forwardRef((r,l)=>{const{__scopeProgress:i,value:a=null,max:c,getValueLabel:f=Ug,...d}=r;(c||c===0)&&cd(c);const p=cd(c)?c:Bg;a!==null&&fd(a,p);const h=fd(a,p)?a:null,g=Hl(h)?f(h,p):void 0;return T.jsx($g,{scope:i,value:h,max:p,children:T.jsx(oe.div,{"aria-valuemax":p,"aria-valuemin":0,"aria-valuenow":Hl(h)?h:void 0,"aria-valuetext":g,role:"progressbar","data-state":$d(h,p),"data-value":h??void 0,"data-max":p,...d,ref:l})})});zd.displayName=ja;var Bd="ProgressIndicator",Vd=v.forwardRef((r,l)=>{const{__scopeProgress:i,...a}=r,c=Hg(Bd,i);return T.jsx(oe.div,{"data-state":$d(c.value,c.max),"data-value":c.value??void 0,"data-max":c.max,...a,ref:l})});Vd.displayName=Bd;function Ug(r,l){return`${Math.round(r/l*100)}%`}function $d(r,l){return r==null?"indeterminate":r===l?"complete":"loading"}function Hl(r){return typeof r=="number"}function cd(r){return Hl(r)&&!isNaN(r)&&r>0}function fd(r,l){return Hl(r)&&!isNaN(r)&&r<=l&&r>=0}var mx=zd,vx=Vd;function re(r,l,{checkForDefaultPrevented:i=!0}={}){return function(c){if(r?.(c),i===!1||!c.defaultPrevented)return l?.(c)}}var be=globalThis?.document?v.useLayoutEffect:()=>{},Wg=Md[" useId ".trim().toString()]||(()=>{}),bg=0;function _t(r){const[l,i]=v.useState(Wg());return be(()=>{i(a=>a??String(bg++))},[r]),l?`radix-${l}`:""}var Kg=Md[" useInsertionEffect ".trim().toString()]||be;function Nt({prop:r,defaultProp:l,onChange:i=()=>{},caller:a}){const[c,f,d]=Gg({defaultProp:l,onChange:i}),p=r!==void 0,h=p?r:c;{const w=v.useRef(r!==void 0);v.useEffect(()=>{const y=w.current;if(y!==p){const P=y?"controlled":"uncontrolled",k=p?"controlled":"uncontrolled"}w.current=p},[p,a])}const g=v.useCallback(w=>{if(p){const y=Qg(w)?w(r):w;y!==r&&d.current?.(y)}else f(w)},[p,r,f,d]);return[h,g]}function Gg({defaultProp:r,onChange:l}){const[i,a]=v.useState(r),c=v.useRef(i),f=v.useRef(l);return Kg(()=>{f.current=l},[l]),v.useEffect(()=>{c.current!==i&&(f.current?.(i),c.current=i)},[i,c]),[i,a,f]}function Qg(r){return typeof r=="function"}function Cn(r){const l=v.useRef(r);return v.useEffect(()=>{l.current=r}),v.useMemo(()=>(...i)=>l.current?.(...i),[])}function Yg(r,l=globalThis?.document){const i=Cn(r);v.useEffect(()=>{const a=c=>{c.key==="Escape"&&i(c)};return l.addEventListener("keydown",a,{capture:!0}),()=>l.removeEventListener("keydown",a,{capture:!0})},[i,l])}var Xg="DismissableLayer",Sa="dismissableLayer.update",Zg="dismissableLayer.pointerDownOutside",Jg="dismissableLayer.focusOutside",dd,Hd=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zl=v.forwardRef((r,l)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:d,onDismiss:p,...h}=r,g=v.useContext(Hd),[w,y]=v.useState(null),P=w?.ownerDocument??globalThis?.document,[,k]=v.useState({}),A=pe(l,V=>y(V)),S=Array.from(g.layers),[C]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),N=S.indexOf(C),_=w?S.indexOf(w):-1,D=g.layersWithOutsidePointerEventsDisabled.size>0,L=_>=N,j=ty(V=>{const G=V.target,fe=[...g.branches].some(ie=>ie.contains(G));!L||fe||(c?.(V),d?.(V),V.defaultPrevented||p?.())},P),b=ny(V=>{const G=V.target;[...g.branches].some(ie=>ie.contains(G))||(f?.(V),d?.(V),V.defaultPrevented||p?.())},P);return Yg(V=>{_===g.layers.size-1&&(a?.(V),!V.defaultPrevented&&p&&(V.preventDefault(),p()))},P),v.useEffect(()=>{if(w)return i&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(dd=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(w)),g.layers.add(w),pd(),()=>{i&&g.layersWithOutsidePointerEventsDisabled.size===1&&(P.body.style.pointerEvents=dd)}},[w,P,i,g]),v.useEffect(()=>()=>{w&&(g.layers.delete(w),g.layersWithOutsidePointerEventsDisabled.delete(w),pd())},[w,g]),v.useEffect(()=>{const V=()=>k({});return document.addEventListener(Sa,V),()=>document.removeEventListener(Sa,V)},[]),T.jsx(oe.div,{...h,ref:A,style:{pointerEvents:D?L?"auto":"none":void 0,...r.style},onFocusCapture:re(r.onFocusCapture,b.onFocusCapture),onBlurCapture:re(r.onBlurCapture,b.onBlurCapture),onPointerDownCapture:re(r.onPointerDownCapture,j.onPointerDownCapture)})});Zl.displayName=Xg;var qg="DismissableLayerBranch",ey=v.forwardRef((r,l)=>{const i=v.useContext(Hd),a=v.useRef(null),c=pe(l,a);return v.useEffect(()=>{const f=a.current;if(f)return i.branches.add(f),()=>{i.branches.delete(f)}},[i.branches]),T.jsx(oe.div,{...r,ref:c})});ey.displayName=qg;function ty(r,l=globalThis?.document){const i=Cn(r),a=v.useRef(!1),c=v.useRef(()=>{});return v.useEffect(()=>{const f=p=>{if(p.target&&!a.current){let h=function(){Ud(Zg,i,g,{discrete:!0})};const g={originalEvent:p};p.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=h,l.addEventListener("click",c.current,{once:!0})):h()}else l.removeEventListener("click",c.current);a.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",f),l.removeEventListener("click",c.current)}},[l,i]),{onPointerDownCapture:()=>a.current=!0}}function ny(r,l=globalThis?.document){const i=Cn(r),a=v.useRef(!1);return v.useEffect(()=>{const c=f=>{f.target&&!a.current&&Ud(Jg,i,{originalEvent:f},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,i]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function pd(){const r=new CustomEvent(Sa);document.dispatchEvent(r)}function Ud(r,l,i,{discrete:a}){const c=i.originalEvent.target,f=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:i});l&&c.addEventListener(r,l,{once:!0}),a?Dg(c,f):c.dispatchEvent(f)}var ca="focusScope.autoFocusOnMount",fa="focusScope.autoFocusOnUnmount",md={bubbles:!1,cancelable:!0},ry="FocusScope",za=v.forwardRef((r,l)=>{const{loop:i=!1,trapped:a=!1,onMountAutoFocus:c,onUnmountAutoFocus:f,...d}=r,[p,h]=v.useState(null),g=Cn(c),w=Cn(f),y=v.useRef(null),P=pe(l,S=>h(S)),k=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let S=function(D){if(k.paused||!p)return;const L=D.target;p.contains(L)?y.current=L:Sn(y.current,{select:!0})},C=function(D){if(k.paused||!p)return;const L=D.relatedTarget;L!==null&&(p.contains(L)||Sn(y.current,{select:!0}))},N=function(D){if(document.activeElement===document.body)for(const j of D)j.removedNodes.length>0&&Sn(p)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const _=new MutationObserver(N);return p&&_.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),_.disconnect()}}},[a,p,k.paused]),v.useEffect(()=>{if(p){hd.add(k);const S=document.activeElement;if(!p.contains(S)){const N=new CustomEvent(ca,md);p.addEventListener(ca,g),p.dispatchEvent(N),N.defaultPrevented||(oy(uy(Wd(p)),{select:!0}),document.activeElement===S&&Sn(p))}return()=>{p.removeEventListener(ca,g),setTimeout(()=>{const N=new CustomEvent(fa,md);p.addEventListener(fa,w),p.dispatchEvent(N),N.defaultPrevented||Sn(S??document.body,{select:!0}),p.removeEventListener(fa,w),hd.remove(k)},0)}}},[p,g,w,k]);const A=v.useCallback(S=>{if(!i&&!a||k.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,N=document.activeElement;if(C&&N){const _=S.currentTarget,[D,L]=ly(_);D&&L?!S.shiftKey&&N===L?(S.preventDefault(),i&&Sn(D,{select:!0})):S.shiftKey&&N===D&&(S.preventDefault(),i&&Sn(L,{select:!0})):N===_&&S.preventDefault()}},[i,a,k.paused]);return T.jsx(oe.div,{tabIndex:-1,...d,ref:P,onKeyDown:A})});za.displayName=ry;function oy(r,{select:l=!1}={}){const i=document.activeElement;for(const a of r)if(Sn(a,{select:l}),document.activeElement!==i)return}function ly(r){const l=Wd(r),i=vd(l,r),a=vd(l.reverse(),r);return[i,a]}function Wd(r){const l=[],i=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const c=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||c?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)l.push(i.currentNode);return l}function vd(r,l){for(const i of r)if(!iy(i,{upTo:l}))return i}function iy(r,{upTo:l}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(l!==void 0&&r===l)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function sy(r){return r instanceof HTMLInputElement&&"select"in r}function Sn(r,{select:l=!1}={}){if(r&&r.focus){const i=document.activeElement;r.focus({preventScroll:!0}),r!==i&&sy(r)&&l&&r.select()}}var hd=ay();function ay(){let r=[];return{add(l){const i=r[0];l!==i&&i?.pause(),r=gd(r,l),r.unshift(l)},remove(l){r=gd(r,l),r[0]?.resume()}}}function gd(r,l){const i=[...r],a=i.indexOf(l);return a!==-1&&i.splice(a,1),i}function uy(r){return r.filter(l=>l.tagName!=="A")}var cy="Portal",Ba=v.forwardRef((r,l)=>{const{container:i,...a}=r,[c,f]=v.useState(!1);be(()=>f(!0),[]);const d=i||c&&globalThis?.document?.body;return d?Rg.createPortal(T.jsx(oe.div,{...a,ref:l}),d):null});Ba.displayName=cy;function fy(r,l){return v.useReducer((i,a)=>l[i][a]??i,r)}var kn=r=>{const{present:l,children:i}=r,a=dy(l),c=typeof i=="function"?i({present:a.isPresent}):v.Children.only(i),f=pe(a.ref,py(c));return typeof i=="function"||a.isPresent?v.cloneElement(c,{ref:f}):null};kn.displayName="Presence";function dy(r){const[l,i]=v.useState(),a=v.useRef(null),c=v.useRef(r),f=v.useRef("none"),d=r?"mounted":"unmounted",[p,h]=fy(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=Dl(a.current);f.current=p==="mounted"?g:"none"},[p]),be(()=>{const g=a.current,w=c.current;if(w!==r){const P=f.current,k=Dl(g);r?h("MOUNT"):k==="none"||g?.display==="none"?h("UNMOUNT"):h(w&&P!==k?"ANIMATION_OUT":"UNMOUNT"),c.current=r}},[r,h]),be(()=>{if(l){let g;const w=l.ownerDocument.defaultView??window,y=k=>{const S=Dl(a.current).includes(CSS.escape(k.animationName));if(k.target===l&&S&&(h("ANIMATION_END"),!c.current)){const C=l.style.animationFillMode;l.style.animationFillMode="forwards",g=w.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=C)})}},P=k=>{k.target===l&&(f.current=Dl(a.current))};return l.addEventListener("animationstart",P),l.addEventListener("animationcancel",y),l.addEventListener("animationend",y),()=>{w.clearTimeout(g),l.removeEventListener("animationstart",P),l.removeEventListener("animationcancel",y),l.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:v.useCallback(g=>{a.current=g?getComputedStyle(g):null,i(g)},[])}}function Dl(r){return r?.animationName||"none"}function py(r){let l=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?r.ref:(l=Object.getOwnPropertyDescriptor(r,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?r.props.ref:r.props.ref||r.ref)}var da=0;function bd(){v.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??yd()),document.body.insertAdjacentElement("beforeend",r[1]??yd()),da++,()=>{da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),da--}},[])}function yd(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var Bt=function(){return Bt=Object.assign||function(l){for(var i,a=1,c=arguments.length;a"u")return Iy;var l=Ay(r),i=document.documentElement.clientWidth,a=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,a-i+l[2]-l[0])}},Dy=Yd(),Cr="data-scroll-locked",My=function(r,l,i,a){var c=r.left,f=r.top,d=r.right,p=r.gap;return i===void 0&&(i="margin"),` .`.concat(vy,` { overflow: hidden `).concat(a,`; padding-right: `).concat(p,"px ").concat(a,`; } body[`).concat(Cr,`] { overflow: hidden `).concat(a,`; overscroll-behavior: contain; `).concat([l&&"position: relative ".concat(a,";"),i==="margin"&&` padding-left: `.concat(c,`px; padding-top: `).concat(f,`px; padding-right: `).concat(d,`px; margin-left:0; margin-top:0; margin-right: `).concat(p,"px ").concat(a,`; `),i==="padding"&&"padding-right: ".concat(p,"px ").concat(a,";")].filter(Boolean).join(""),` } .`).concat(Bl,` { right: `).concat(p,"px ").concat(a,`; } .`).concat(Vl,` { margin-right: `).concat(p,"px ").concat(a,`; } .`).concat(Bl," .").concat(Bl,` { right: 0 `).concat(a,`; } .`).concat(Vl," .").concat(Vl,` { margin-right: 0 `).concat(a,`; } body[`).concat(Cr,`] { `).concat(hy,": ").concat(p,`px; } `)},Sd=function(){var r=parseInt(document.body.getAttribute(Cr)||"0",10);return isFinite(r)?r:0},Ly=function(){v.useEffect(function(){return document.body.setAttribute(Cr,(Sd()+1).toString()),function(){var r=Sd()-1;r<=0?document.body.removeAttribute(Cr):document.body.setAttribute(Cr,r.toString())}},[])},Fy=function(r){var l=r.noRelative,i=r.noImportant,a=r.gapMode,c=a===void 0?"margin":a;Ly();var f=v.useMemo(function(){return Oy(c)},[c]);return v.createElement(Dy,{styles:My(f,!l,c,i?"":"!important")})},xa=!1;if(typeof window<"u")try{var Ml=Object.defineProperty({},"passive",{get:function(){return xa=!0,!0}});window.addEventListener("test",Ml,Ml),window.removeEventListener("test",Ml,Ml)}catch{xa=!1}var wr=xa?{passive:!1}:!1,jy=function(r){return r.tagName==="TEXTAREA"},Xd=function(r,l){if(!(r instanceof Element))return!1;var i=window.getComputedStyle(r);return i[l]!=="hidden"&&!(i.overflowY===i.overflowX&&!jy(r)&&i[l]==="visible")},zy=function(r){return Xd(r,"overflowY")},By=function(r){return Xd(r,"overflowX")},xd=function(r,l){var i=l.ownerDocument,a=l;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var c=Zd(r,a);if(c){var f=Jd(r,a),d=f[1],p=f[2];if(d>p)return!0}a=a.parentNode}while(a&&a!==i.body);return!1},Vy=function(r){var l=r.scrollTop,i=r.scrollHeight,a=r.clientHeight;return[l,i,a]},$y=function(r){var l=r.scrollLeft,i=r.scrollWidth,a=r.clientWidth;return[l,i,a]},Zd=function(r,l){return r==="v"?zy(l):By(l)},Jd=function(r,l){return r==="v"?Vy(l):$y(l)},Hy=function(r,l){return r==="h"&&l==="rtl"?-1:1},Uy=function(r,l,i,a,c){var f=Hy(r,window.getComputedStyle(l).direction),d=f*a,p=i.target,h=l.contains(p),g=!1,w=d>0,y=0,P=0;do{if(!p)break;var k=Jd(r,p),A=k[0],S=k[1],C=k[2],N=S-C-f*A;(A||N)&&Zd(r,p)&&(y+=N,P+=A);var _=p.parentNode;p=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!h&&p!==document.body||h&&(l.contains(p)||l===p));return(w&&Math.abs(y)<1||!w&&Math.abs(P)<1)&&(g=!0),g},Ll=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Cd=function(r){return[r.deltaX,r.deltaY]},Ed=function(r){return r&&"current"in r?r.current:r},Wy=function(r,l){return r[0]===l[0]&&r[1]===l[1]},by=function(r){return` .block-interactivity-`.concat(r,` {pointer-events: none;} .allow-interactivity-`).concat(r,` {pointer-events: all;} `)},Ky=0,Sr=[];function Gy(r){var l=v.useRef([]),i=v.useRef([0,0]),a=v.useRef(),c=v.useState(Ky++)[0],f=v.useState(Yd)[0],d=v.useRef(r);v.useEffect(function(){d.current=r},[r]),v.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(c));var S=my([r.lockRef.current],(r.shards||[]).map(Ed),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(c))})}}},[r.inert,r.lockRef.current,r.shards]);var p=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!d.current.allowPinchZoom;var N=Ll(S),_=i.current,D="deltaX"in S?S.deltaX:_[0]-N[0],L="deltaY"in S?S.deltaY:_[1]-N[1],j,b=S.target,V=Math.abs(D)>Math.abs(L)?"h":"v";if("touches"in S&&V==="h"&&b.type==="range")return!1;var G=xd(V,b);if(!G)return!0;if(G?j=V:(j=V==="v"?"h":"v",G=xd(V,b)),!G)return!1;if(!a.current&&"changedTouches"in S&&(D||L)&&(a.current=j),!j)return!0;var fe=a.current||j;return Uy(fe,C,S,fe==="h"?D:L)},[]),h=v.useCallback(function(S){var C=S;if(!(!Sr.length||Sr[Sr.length-1]!==f)){var N="deltaY"in C?Cd(C):Ll(C),_=l.current.filter(function(j){return j.name===C.type&&(j.target===C.target||C.target===j.shadowParent)&&Wy(j.delta,N)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var D=(d.current.shards||[]).map(Ed).filter(Boolean).filter(function(j){return j.contains(C.target)}),L=D.length>0?p(C,D[0]):!d.current.noIsolation;L&&C.cancelable&&C.preventDefault()}}},[]),g=v.useCallback(function(S,C,N,_){var D={name:S,delta:C,target:N,should:_,shadowParent:Qy(N)};l.current.push(D),setTimeout(function(){l.current=l.current.filter(function(L){return L!==D})},1)},[]),w=v.useCallback(function(S){i.current=Ll(S),a.current=void 0},[]),y=v.useCallback(function(S){g(S.type,Cd(S),S.target,p(S,r.lockRef.current))},[]),P=v.useCallback(function(S){g(S.type,Ll(S),S.target,p(S,r.lockRef.current))},[]);v.useEffect(function(){return Sr.push(f),r.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:P}),document.addEventListener("wheel",h,wr),document.addEventListener("touchmove",h,wr),document.addEventListener("touchstart",w,wr),function(){Sr=Sr.filter(function(S){return S!==f}),document.removeEventListener("wheel",h,wr),document.removeEventListener("touchmove",h,wr),document.removeEventListener("touchstart",w,wr)}},[]);var k=r.removeScrollBar,A=r.inert;return v.createElement(v.Fragment,null,A?v.createElement(f,{styles:by(c)}):null,k?v.createElement(Fy,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function Qy(r){for(var l=null;r!==null;)r instanceof ShadowRoot&&(l=r.host,r=r.host),r=r.parentNode;return l}const Yy=Ey(Qd,Gy);var Va=v.forwardRef(function(r,l){return v.createElement(Jl,Bt({},r,{ref:l,sideCar:Yy}))});Va.classNames=Jl.classNames;var Xy=function(r){if(typeof document>"u")return null;var l=Array.isArray(r)?r[0]:r;return l.ownerDocument.body},xr=new WeakMap,Fl=new WeakMap,jl={},ha=0,qd=function(r){return r&&(r.host||qd(r.parentNode))},Zy=function(r,l){return l.map(function(i){if(r.contains(i))return i;var a=qd(i);return a&&r.contains(a)?a:null}).filter(function(i){return!!i})},Jy=function(r,l,i,a){var c=Zy(l,Array.isArray(r)?r:[r]);jl[i]||(jl[i]=new WeakMap);var f=jl[i],d=[],p=new Set,h=new Set(c),g=function(y){!y||p.has(y)||(p.add(y),g(y.parentNode))};c.forEach(g);var w=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(P){if(p.has(P))w(P);else try{var k=P.getAttribute(a),A=k!==null&&k!=="false",S=(xr.get(P)||0)+1,C=(f.get(P)||0)+1;xr.set(P,S),f.set(P,C),d.push(P),S===1&&A&&Fl.set(P,!0),C===1&&P.setAttribute(i,"true"),A||P.setAttribute(a,"true")}catch{}})};return w(l),p.clear(),ha++,function(){d.forEach(function(y){var P=xr.get(y)-1,k=f.get(y)-1;xr.set(y,P),f.set(y,k),P||(Fl.has(y)||y.removeAttribute(a),Fl.delete(y)),k||y.removeAttribute(i)}),ha--,ha||(xr=new WeakMap,xr=new WeakMap,Fl=new WeakMap,jl={})}},ep=function(r,l,i){i===void 0&&(i="data-aria-hidden");var a=Array.from(Array.isArray(r)?r:[r]),c=Xy(r);return c?(a.push.apply(a,Array.from(c.querySelectorAll("[aria-live], script"))),Jy(a,c,i,"aria-hidden")):function(){return null}},ql="Dialog",[tp,hx]=yt(ql),[qy,Ot]=tp(ql),np=r=>{const{__scopeDialog:l,children:i,open:a,defaultOpen:c,onOpenChange:f,modal:d=!0}=r,p=v.useRef(null),h=v.useRef(null),[g,w]=Nt({prop:a,defaultProp:c??!1,onChange:f,caller:ql});return T.jsx(qy,{scope:l,triggerRef:p,contentRef:h,contentId:_t(),titleId:_t(),descriptionId:_t(),open:g,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(y=>!y),[w]),modal:d,children:i})};np.displayName=ql;var rp="DialogTrigger",op=v.forwardRef((r,l)=>{const{__scopeDialog:i,...a}=r,c=Ot(rp,i),f=pe(l,c.triggerRef);return T.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Ua(c.open),...a,ref:f,onClick:re(r.onClick,c.onOpenToggle)})});op.displayName=rp;var $a="DialogPortal",[ew,lp]=tp($a,{forceMount:void 0}),ip=r=>{const{__scopeDialog:l,forceMount:i,children:a,container:c}=r,f=Ot($a,l);return T.jsx(ew,{scope:l,forceMount:i,children:v.Children.map(a,d=>T.jsx(kn,{present:i||f.open,children:T.jsx(Ba,{asChild:!0,container:c,children:d})}))})};ip.displayName=$a;var Ul="DialogOverlay",sp=v.forwardRef((r,l)=>{const i=lp(Ul,r.__scopeDialog),{forceMount:a=i.forceMount,...c}=r,f=Ot(Ul,r.__scopeDialog);return f.modal?T.jsx(kn,{present:a||f.open,children:T.jsx(nw,{...c,ref:l})}):null});sp.displayName=Ul;var tw=Pr("DialogOverlay.RemoveScroll"),nw=v.forwardRef((r,l)=>{const{__scopeDialog:i,...a}=r,c=Ot(Ul,i);return T.jsx(Va,{as:tw,allowPinchZoom:!0,shards:[c.contentRef],children:T.jsx(oe.div,{"data-state":Ua(c.open),...a,ref:l,style:{pointerEvents:"auto",...a.style}})})}),Hn="DialogContent",ap=v.forwardRef((r,l)=>{const i=lp(Hn,r.__scopeDialog),{forceMount:a=i.forceMount,...c}=r,f=Ot(Hn,r.__scopeDialog);return T.jsx(kn,{present:a||f.open,children:f.modal?T.jsx(rw,{...c,ref:l}):T.jsx(ow,{...c,ref:l})})});ap.displayName=Hn;var rw=v.forwardRef((r,l)=>{const i=Ot(Hn,r.__scopeDialog),a=v.useRef(null),c=pe(l,i.contentRef,a);return v.useEffect(()=>{const f=a.current;if(f)return ep(f)},[]),T.jsx(up,{...r,ref:c,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(r.onCloseAutoFocus,f=>{f.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:re(r.onPointerDownOutside,f=>{const d=f.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&f.preventDefault()}),onFocusOutside:re(r.onFocusOutside,f=>f.preventDefault())})}),ow=v.forwardRef((r,l)=>{const i=Ot(Hn,r.__scopeDialog),a=v.useRef(!1),c=v.useRef(!1);return T.jsx(up,{...r,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{r.onCloseAutoFocus?.(f),f.defaultPrevented||(a.current||i.triggerRef.current?.focus(),f.preventDefault()),a.current=!1,c.current=!1},onInteractOutside:f=>{r.onInteractOutside?.(f),f.defaultPrevented||(a.current=!0,f.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const d=f.target;i.triggerRef.current?.contains(d)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&c.current&&f.preventDefault()}})}),up=v.forwardRef((r,l)=>{const{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:f,...d}=r,p=Ot(Hn,i),h=v.useRef(null),g=pe(l,h);return bd(),T.jsxs(T.Fragment,{children:[T.jsx(za,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:c,onUnmountAutoFocus:f,children:T.jsx(Zl,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":Ua(p.open),...d,ref:g,onDismiss:()=>p.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(lw,{titleId:p.titleId}),T.jsx(sw,{contentRef:h,descriptionId:p.descriptionId})]})]})}),Ha="DialogTitle",cp=v.forwardRef((r,l)=>{const{__scopeDialog:i,...a}=r,c=Ot(Ha,i);return T.jsx(oe.h2,{id:c.titleId,...a,ref:l})});cp.displayName=Ha;var fp="DialogDescription",dp=v.forwardRef((r,l)=>{const{__scopeDialog:i,...a}=r,c=Ot(fp,i);return T.jsx(oe.p,{id:c.descriptionId,...a,ref:l})});dp.displayName=fp;var pp="DialogClose",mp=v.forwardRef((r,l)=>{const{__scopeDialog:i,...a}=r,c=Ot(pp,i);return T.jsx(oe.button,{type:"button",...a,ref:l,onClick:re(r.onClick,()=>c.onOpenChange(!1))})});mp.displayName=pp;function Ua(r){return r?"open":"closed"}var vp="DialogTitleWarning",[gx,hp]=jg(vp,{contentName:Hn,titleName:Ha,docsSlug:"dialog"}),lw=({titleId:r})=>{const l=hp(vp),i=`\`${l.contentName}\` requires a \`${l.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${l.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${l.docsSlug}`;return v.useEffect(()=>{if(r){const a=document.getElementById(r)}},[i,r]),null},iw="DialogDescriptionWarning",sw=({contentRef:r,descriptionId:l})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hp(iw).contentName}}.`;return v.useEffect(()=>{const c=r.current?.getAttribute("aria-describedby");if(l&&c){const f=document.getElementById(l)}},[a,r,l]),null},yx=np,wx=op,Sx=ip,xx=sp,Cx=ap,Ex=cp,Px=dp,kx=mp;function ei(r){const l=r+"CollectionProvider",[i,a]=yt(l),[c,f]=i(l,{collectionRef:{current:null},itemMap:new Map}),d=S=>{const{scope:C,children:N}=S,_=Me.useRef(null),D=Me.useRef(new Map).current;return T.jsx(c,{scope:C,itemMap:D,collectionRef:_,children:N})};d.displayName=l;const p=r+"CollectionSlot",h=Pr(p),g=Me.forwardRef((S,C)=>{const{scope:N,children:_}=S,D=f(p,N),L=pe(C,D.collectionRef);return T.jsx(h,{ref:L,children:_})});g.displayName=p;const w=r+"CollectionItemSlot",y="data-radix-collection-item",P=Pr(w),k=Me.forwardRef((S,C)=>{const{scope:N,children:_,...D}=S,L=Me.useRef(null),j=pe(C,L),b=f(w,N);return Me.useEffect(()=>(b.itemMap.set(L,{ref:L,...D}),()=>void b.itemMap.delete(L))),T.jsx(P,{[y]:"",ref:j,children:_})});k.displayName=w;function A(S){const C=f(r+"CollectionConsumer",S);return Me.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const D=Array.from(_.querySelectorAll(`[${y}]`));return Array.from(C.itemMap.values()).sort((b,V)=>D.indexOf(b.ref.current)-D.indexOf(V.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:g,ItemSlot:k},A,a]}var ti="Collapsible",[aw,gp]=yt(ti),[uw,Wa]=aw(ti),yp=v.forwardRef((r,l)=>{const{__scopeCollapsible:i,open:a,defaultOpen:c,disabled:f,onOpenChange:d,...p}=r,[h,g]=Nt({prop:a,defaultProp:c??!1,onChange:d,caller:ti});return T.jsx(uw,{scope:i,disabled:f,contentId:_t(),open:h,onOpenToggle:v.useCallback(()=>g(w=>!w),[g]),children:T.jsx(oe.div,{"data-state":Ka(h),"data-disabled":f?"":void 0,...p,ref:l})})});yp.displayName=ti;var wp="CollapsibleTrigger",Sp=v.forwardRef((r,l)=>{const{__scopeCollapsible:i,...a}=r,c=Wa(wp,i);return T.jsx(oe.button,{type:"button","aria-controls":c.contentId,"aria-expanded":c.open||!1,"data-state":Ka(c.open),"data-disabled":c.disabled?"":void 0,disabled:c.disabled,...a,ref:l,onClick:re(r.onClick,c.onOpenToggle)})});Sp.displayName=wp;var ba="CollapsibleContent",xp=v.forwardRef((r,l)=>{const{forceMount:i,...a}=r,c=Wa(ba,r.__scopeCollapsible);return T.jsx(kn,{present:i||c.open,children:({present:f})=>T.jsx(cw,{...a,ref:l,present:f})})});xp.displayName=ba;var cw=v.forwardRef((r,l)=>{const{__scopeCollapsible:i,present:a,children:c,...f}=r,d=Wa(ba,i),[p,h]=v.useState(a),g=v.useRef(null),w=pe(l,g),y=v.useRef(0),P=y.current,k=v.useRef(0),A=k.current,S=d.open||p,C=v.useRef(S),N=v.useRef(void 0);return v.useEffect(()=>{const _=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(_)},[]),be(()=>{const _=g.current;if(_){N.current=N.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const D=_.getBoundingClientRect();y.current=D.height,k.current=D.width,C.current||(_.style.transitionDuration=N.current.transitionDuration,_.style.animationName=N.current.animationName),h(a)}},[d.open,a]),T.jsx(oe.div,{"data-state":Ka(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!S,...f,ref:w,style:{"--radix-collapsible-content-height":P?`${P}px`:void 0,"--radix-collapsible-content-width":A?`${A}px`:void 0,...r.style},children:S&&c})});function Ka(r){return r?"open":"closed"}var fw=yp,dw=Sp,pw=xp,mw=v.createContext(void 0);function Co(r){const l=v.useContext(mw);return r||l||"ltr"}var Dt="Accordion",vw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ga,hw,gw]=ei(Dt),[ni,Rx]=yt(Dt,[gw,gp]),Qa=gp(),Cp=Me.forwardRef((r,l)=>{const{type:i,...a}=r,c=a,f=a;return T.jsx(Ga.Provider,{scope:r.__scopeAccordion,children:i==="multiple"?T.jsx(xw,{...f,ref:l}):T.jsx(Sw,{...c,ref:l})})});Cp.displayName=Dt;var[Ep,yw]=ni(Dt),[Pp,ww]=ni(Dt,{collapsible:!1}),Sw=Me.forwardRef((r,l)=>{const{value:i,defaultValue:a,onValueChange:c=()=>{},collapsible:f=!1,...d}=r,[p,h]=Nt({prop:i,defaultProp:a??"",onChange:c,caller:Dt});return T.jsx(Ep,{scope:r.__scopeAccordion,value:Me.useMemo(()=>p?[p]:[],[p]),onItemOpen:h,onItemClose:Me.useCallback(()=>f&&h(""),[f,h]),children:T.jsx(Pp,{scope:r.__scopeAccordion,collapsible:f,children:T.jsx(kp,{...d,ref:l})})})}),xw=Me.forwardRef((r,l)=>{const{value:i,defaultValue:a,onValueChange:c=()=>{},...f}=r,[d,p]=Nt({prop:i,defaultProp:a??[],onChange:c,caller:Dt}),h=Me.useCallback(w=>p((y=[])=>[...y,w]),[p]),g=Me.useCallback(w=>p((y=[])=>y.filter(P=>P!==w)),[p]);return T.jsx(Ep,{scope:r.__scopeAccordion,value:d,onItemOpen:h,onItemClose:g,children:T.jsx(Pp,{scope:r.__scopeAccordion,collapsible:!0,children:T.jsx(kp,{...f,ref:l})})})}),[Cw,ri]=ni(Dt),kp=Me.forwardRef((r,l)=>{const{__scopeAccordion:i,disabled:a,dir:c,orientation:f="vertical",...d}=r,p=Me.useRef(null),h=pe(p,l),g=hw(i),y=Co(c)==="ltr",P=re(r.onKeyDown,k=>{if(!vw.includes(k.key))return;const A=k.target,S=g().filter(G=>!G.ref.current?.disabled),C=S.findIndex(G=>G.ref.current===A),N=S.length;if(C===-1)return;k.preventDefault();let _=C;const D=0,L=N-1,j=()=>{_=C+1,_>L&&(_=D)},b=()=>{_=C-1,_{const{__scopeAccordion:i,value:a,...c}=r,f=ri(Wl,i),d=yw(Wl,i),p=Qa(i),h=_t(),g=a&&d.value.includes(a)||!1,w=f.disabled||r.disabled;return T.jsx(Ew,{scope:i,open:g,disabled:w,triggerId:h,children:T.jsx(fw,{"data-orientation":f.orientation,"data-state":Op(g),...p,...c,ref:l,disabled:w,open:g,onOpenChange:y=>{y?d.onItemOpen(a):d.onItemClose(a)}})})});Rp.displayName=Wl;var Tp="AccordionHeader",_p=Me.forwardRef((r,l)=>{const{__scopeAccordion:i,...a}=r,c=ri(Dt,i),f=Ya(Tp,i);return T.jsx(oe.h3,{"data-orientation":c.orientation,"data-state":Op(f.open),"data-disabled":f.disabled?"":void 0,...a,ref:l})});_p.displayName=Tp;var Ca="AccordionTrigger",Np=Me.forwardRef((r,l)=>{const{__scopeAccordion:i,...a}=r,c=ri(Dt,i),f=Ya(Ca,i),d=ww(Ca,i),p=Qa(i);return T.jsx(Ga.ItemSlot,{scope:i,children:T.jsx(dw,{"aria-disabled":f.open&&!d.collapsible||void 0,"data-orientation":c.orientation,id:f.triggerId,...p,...a,ref:l})})});Np.displayName=Ca;var Ip="AccordionContent",Ap=Me.forwardRef((r,l)=>{const{__scopeAccordion:i,...a}=r,c=ri(Dt,i),f=Ya(Ip,i),d=Qa(i);return T.jsx(pw,{role:"region","aria-labelledby":f.triggerId,"data-orientation":c.orientation,...d,...a,ref:l,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...r.style}})});Ap.displayName=Ip;function Op(r){return r?"open":"closed"}var Tx=Cp,_x=Rp,Nx=_p,Ix=Np,Ax=Ap,Pw="Label",Dp=v.forwardRef((r,l)=>T.jsx(oe.label,{...r,ref:l,onMouseDown:i=>{i.target.closest("button, input, select, textarea")||(r.onMouseDown?.(i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}}));Dp.displayName=Pw;var Ox=Dp,ga="rovingFocusGroup.onEntryFocus",kw={bubbles:!1,cancelable:!0},Eo="RovingFocusGroup",[Ea,Mp,Rw]=ei(Eo),[Tw,Lp]=yt(Eo,[Rw]),[_w,Nw]=Tw(Eo),Fp=v.forwardRef((r,l)=>T.jsx(Ea.Provider,{scope:r.__scopeRovingFocusGroup,children:T.jsx(Ea.Slot,{scope:r.__scopeRovingFocusGroup,children:T.jsx(Iw,{...r,ref:l})})}));Fp.displayName=Eo;var Iw=v.forwardRef((r,l)=>{const{__scopeRovingFocusGroup:i,orientation:a,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:w=!1,...y}=r,P=v.useRef(null),k=pe(l,P),A=Co(f),[S,C]=Nt({prop:d,defaultProp:p??null,onChange:h,caller:Eo}),[N,_]=v.useState(!1),D=Cn(g),L=Mp(i),j=v.useRef(!1),[b,V]=v.useState(0);return v.useEffect(()=>{const G=P.current;if(G)return G.addEventListener(ga,D),()=>G.removeEventListener(ga,D)},[D]),T.jsx(_w,{scope:i,orientation:a,dir:A,loop:c,currentTabStopId:S,onItemFocus:v.useCallback(G=>C(G),[C]),onItemShiftTab:v.useCallback(()=>_(!0),[]),onFocusableItemAdd:v.useCallback(()=>V(G=>G+1),[]),onFocusableItemRemove:v.useCallback(()=>V(G=>G-1),[]),children:T.jsx(oe.div,{tabIndex:N||b===0?-1:0,"data-orientation":a,...y,ref:k,style:{outline:"none",...r.style},onMouseDown:re(r.onMouseDown,()=>{j.current=!0}),onFocus:re(r.onFocus,G=>{const fe=!j.current;if(G.target===G.currentTarget&&fe&&!N){const ie=new CustomEvent(ga,kw);if(G.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const ne=L().filter(Z=>Z.focusable),ue=ne.find(Z=>Z.active),se=ne.find(Z=>Z.id===S),de=[ue,se,...ne].filter(Boolean).map(Z=>Z.ref.current);Bp(de,w)}}j.current=!1}),onBlur:re(r.onBlur,()=>_(!1))})})}),jp="RovingFocusGroupItem",zp=v.forwardRef((r,l)=>{const{__scopeRovingFocusGroup:i,focusable:a=!0,active:c=!1,tabStopId:f,children:d,...p}=r,h=_t(),g=f||h,w=Nw(jp,i),y=w.currentTabStopId===g,P=Mp(i),{onFocusableItemAdd:k,onFocusableItemRemove:A,currentTabStopId:S}=w;return v.useEffect(()=>{if(a)return k(),()=>A()},[a,k,A]),T.jsx(Ea.ItemSlot,{scope:i,id:g,focusable:a,active:c,children:T.jsx(oe.span,{tabIndex:y?0:-1,"data-orientation":w.orientation,...p,ref:l,onMouseDown:re(r.onMouseDown,C=>{a?w.onItemFocus(g):C.preventDefault()}),onFocus:re(r.onFocus,()=>w.onItemFocus(g)),onKeyDown:re(r.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){w.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const N=Dw(C,w.orientation,w.dir);if(N!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let D=P().filter(L=>L.focusable).map(L=>L.ref.current);if(N==="last")D.reverse();else if(N==="prev"||N==="next"){N==="prev"&&D.reverse();const L=D.indexOf(C.currentTarget);D=w.loop?Mw(D,L+1):D.slice(L+1)}setTimeout(()=>Bp(D))}}),children:typeof d=="function"?d({isCurrentTabStop:y,hasTabStop:S!=null}):d})})});zp.displayName=jp;var Aw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ow(r,l){return l!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Dw(r,l,i){const a=Ow(r.key,i);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Aw[a]}function Bp(r,l=!1){const i=document.activeElement;for(const a of r)if(a===i||(a.focus({preventScroll:l}),document.activeElement!==i))return}function Mw(r,l){return r.map((i,a)=>r[(l+a)%r.length])}var Lw=Fp,Fw=zp,oi="Tabs",[jw,Dx]=yt(oi,[Lp]),Vp=Lp(),[zw,Xa]=jw(oi),$p=v.forwardRef((r,l)=>{const{__scopeTabs:i,value:a,onValueChange:c,defaultValue:f,orientation:d="horizontal",dir:p,activationMode:h="automatic",...g}=r,w=Co(p),[y,P]=Nt({prop:a,onChange:c,defaultProp:f??"",caller:oi});return T.jsx(zw,{scope:i,baseId:_t(),value:y,onValueChange:P,orientation:d,dir:w,activationMode:h,children:T.jsx(oe.div,{dir:w,"data-orientation":d,...g,ref:l})})});$p.displayName=oi;var Hp="TabsList",Up=v.forwardRef((r,l)=>{const{__scopeTabs:i,loop:a=!0,...c}=r,f=Xa(Hp,i),d=Vp(i);return T.jsx(Lw,{asChild:!0,...d,orientation:f.orientation,dir:f.dir,loop:a,children:T.jsx(oe.div,{role:"tablist","aria-orientation":f.orientation,...c,ref:l})})});Up.displayName=Hp;var Wp="TabsTrigger",bp=v.forwardRef((r,l)=>{const{__scopeTabs:i,value:a,disabled:c=!1,...f}=r,d=Xa(Wp,i),p=Vp(i),h=Qp(d.baseId,a),g=Yp(d.baseId,a),w=a===d.value;return T.jsx(Fw,{asChild:!0,...p,focusable:!c,active:w,children:T.jsx(oe.button,{type:"button",role:"tab","aria-selected":w,"aria-controls":g,"data-state":w?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:h,...f,ref:l,onMouseDown:re(r.onMouseDown,y=>{!c&&y.button===0&&y.ctrlKey===!1?d.onValueChange(a):y.preventDefault()}),onKeyDown:re(r.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&d.onValueChange(a)}),onFocus:re(r.onFocus,()=>{const y=d.activationMode!=="manual";!w&&!c&&y&&d.onValueChange(a)})})})});bp.displayName=Wp;var Kp="TabsContent",Gp=v.forwardRef((r,l)=>{const{__scopeTabs:i,value:a,forceMount:c,children:f,...d}=r,p=Xa(Kp,i),h=Qp(p.baseId,a),g=Yp(p.baseId,a),w=a===p.value,y=v.useRef(w);return v.useEffect(()=>{const P=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(P)},[]),T.jsx(kn,{present:c||w,children:({present:P})=>T.jsx(oe.div,{"data-state":w?"active":"inactive","data-orientation":p.orientation,role:"tabpanel","aria-labelledby":h,hidden:!P,id:g,tabIndex:0,...d,ref:l,style:{...r.style,animationDuration:y.current?"0s":void 0},children:P&&f})})});Gp.displayName=Kp;function Qp(r,l){return`${r}-trigger-${l}`}function Yp(r,l){return`${r}-content-${l}`}var Mx=$p,Lx=Up,Fx=bp,jx=Gp;function bl(r,[l,i]){return Math.min(i,Math.max(l,r))}const Bw=["top","right","bottom","left"],En=Math.min,ut=Math.max,Kl=Math.round,zl=Math.floor,$t=r=>({x:r,y:r}),Vw={left:"right",right:"left",bottom:"top",top:"bottom"},$w={start:"end",end:"start"};function Pa(r,l,i){return ut(r,En(l,i))}function Jt(r,l){return typeof r=="function"?r(l):r}function qt(r){return r.split("-")[0]}function Tr(r){return r.split("-")[1]}function Za(r){return r==="x"?"y":"x"}function Ja(r){return r==="y"?"height":"width"}const Hw=new Set(["top","bottom"]);function Vt(r){return Hw.has(qt(r))?"y":"x"}function qa(r){return Za(Vt(r))}function Uw(r,l,i){i===void 0&&(i=!1);const a=Tr(r),c=qa(r),f=Ja(c);let d=c==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";return l.reference[f]>l.floating[f]&&(d=Gl(d)),[d,Gl(d)]}function Ww(r){const l=Gl(r);return[ka(r),l,ka(l)]}function ka(r){return r.replace(/start|end/g,l=>$w[l])}const Pd=["left","right"],kd=["right","left"],bw=["top","bottom"],Kw=["bottom","top"];function Gw(r,l,i){switch(r){case"top":case"bottom":return i?l?kd:Pd:l?Pd:kd;case"left":case"right":return l?bw:Kw;default:return[]}}function Qw(r,l,i,a){const c=Tr(r);let f=Gw(qt(r),i==="start",a);return c&&(f=f.map(d=>d+"-"+c),l&&(f=f.concat(f.map(ka)))),f}function Gl(r){return r.replace(/left|right|bottom|top/g,l=>Vw[l])}function Yw(r){return{top:0,right:0,bottom:0,left:0,...r}}function Xp(r){return typeof r!="number"?Yw(r):{top:r,right:r,bottom:r,left:r}}function Ql(r){const{x:l,y:i,width:a,height:c}=r;return{width:a,height:c,top:i,left:l,right:l+a,bottom:i+c,x:l,y:i}}function Rd(r,l,i){let{reference:a,floating:c}=r;const f=Vt(l),d=qa(l),p=Ja(d),h=qt(l),g=f==="y",w=a.x+a.width/2-c.width/2,y=a.y+a.height/2-c.height/2,P=a[p]/2-c[p]/2;let k;switch(h){case"top":k={x:w,y:a.y-c.height};break;case"bottom":k={x:w,y:a.y+a.height};break;case"right":k={x:a.x+a.width,y};break;case"left":k={x:a.x-c.width,y};break;default:k={x:a.x,y:a.y}}switch(Tr(l)){case"start":k[d]-=P*(i&&g?-1:1);break;case"end":k[d]+=P*(i&&g?-1:1);break}return k}const Xw=async(r,l,i)=>{const{placement:a="bottom",strategy:c="absolute",middleware:f=[],platform:d}=i,p=f.filter(Boolean),h=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:r,floating:l,strategy:c}),{x:w,y}=Rd(g,a,h),P=a,k={},A=0;for(let S=0;S({name:"arrow",options:r,async fn(l){const{x:i,y:a,placement:c,rects:f,platform:d,elements:p,middlewareData:h}=l,{element:g,padding:w=0}=Jt(r,l)||{};if(g==null)return{};const y=Xp(w),P={x:i,y:a},k=qa(c),A=Ja(k),S=await d.getDimensions(g),C=k==="y",N=C?"top":"left",_=C?"bottom":"right",D=C?"clientHeight":"clientWidth",L=f.reference[A]+f.reference[k]-P[k]-f.floating[A],j=P[k]-f.reference[k],b=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let V=b?b[D]:0;(!V||!await(d.isElement==null?void 0:d.isElement(b)))&&(V=p.floating[D]||f.floating[A]);const G=L/2-j/2,fe=V/2-S[A]/2-1,ie=En(y[N],fe),ne=En(y[_],fe),ue=ie,se=V-S[A]-ne,ce=V/2-S[A]/2+G,de=Pa(ue,ce,se),Z=!h.arrow&&Tr(c)!=null&&ce!==de&&f.reference[A]/2-(cece<=0)){var ne,ue;const ce=(((ne=f.flip)==null?void 0:ne.index)||0)+1,de=V[ce];if(de&&(!(y==="alignment"?_!==Vt(de):!1)||ie.every(F=>Vt(F.placement)===_?F.overflows[0]>0:!0)))return{data:{index:ce,overflows:ie},reset:{placement:de}};let Z=(ue=ie.filter(ae=>ae.overflows[0]<=0).sort((ae,F)=>ae.overflows[1]-F.overflows[1])[0])==null?void 0:ue.placement;if(!Z)switch(k){case"bestFit":{var se;const ae=(se=ie.filter(F=>{if(b){const W=Vt(F.placement);return W===_||W==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(W=>W>0).reduce((W,U)=>W+U,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:se[0];ae&&(Z=ae);break}case"initialPlacement":Z=p;break}if(c!==Z)return{reset:{placement:Z}}}return{}}}};function Td(r,l){return{top:r.top-l.height,right:r.right-l.width,bottom:r.bottom-l.height,left:r.left-l.width}}function _d(r){return Bw.some(l=>r[l]>=0)}const qw=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(l){const{rects:i}=l,{strategy:a="referenceHidden",...c}=Jt(r,l);switch(a){case"referenceHidden":{const f=await yo(l,{...c,elementContext:"reference"}),d=Td(f,i.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:_d(d)}}}case"escaped":{const f=await yo(l,{...c,altBoundary:!0}),d=Td(f,i.floating);return{data:{escapedOffsets:d,escaped:_d(d)}}}default:return{}}}}},Zp=new Set(["left","top"]);async function e0(r,l){const{placement:i,platform:a,elements:c}=r,f=await(a.isRTL==null?void 0:a.isRTL(c.floating)),d=qt(i),p=Tr(i),h=Vt(i)==="y",g=Zp.has(d)?-1:1,w=f&&h?-1:1,y=Jt(l,r);let{mainAxis:P,crossAxis:k,alignmentAxis:A}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return p&&typeof A=="number"&&(k=p==="end"?A*-1:A),h?{x:k*w,y:P*g}:{x:P*g,y:k*w}}const t0=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(l){var i,a;const{x:c,y:f,placement:d,middlewareData:p}=l,h=await e0(l,r);return d===((i=p.offset)==null?void 0:i.placement)&&(a=p.arrow)!=null&&a.alignmentOffset?{}:{x:c+h.x,y:f+h.y,data:{...h,placement:d}}}}},n0=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(l){const{x:i,y:a,placement:c}=l,{mainAxis:f=!0,crossAxis:d=!1,limiter:p={fn:C=>{let{x:N,y:_}=C;return{x:N,y:_}}},...h}=Jt(r,l),g={x:i,y:a},w=await yo(l,h),y=Vt(qt(c)),P=Za(y);let k=g[P],A=g[y];if(f){const C=P==="y"?"top":"left",N=P==="y"?"bottom":"right",_=k+w[C],D=k-w[N];k=Pa(_,k,D)}if(d){const C=y==="y"?"top":"left",N=y==="y"?"bottom":"right",_=A+w[C],D=A-w[N];A=Pa(_,A,D)}const S=p.fn({...l,[P]:k,[y]:A});return{...S,data:{x:S.x-i,y:S.y-a,enabled:{[P]:f,[y]:d}}}}}},r0=function(r){return r===void 0&&(r={}),{options:r,fn(l){const{x:i,y:a,placement:c,rects:f,middlewareData:d}=l,{offset:p=0,mainAxis:h=!0,crossAxis:g=!0}=Jt(r,l),w={x:i,y:a},y=Vt(c),P=Za(y);let k=w[P],A=w[y];const S=Jt(p,l),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const D=P==="y"?"height":"width",L=f.reference[P]-f.floating[D]+C.mainAxis,j=f.reference[P]+f.reference[D]-C.mainAxis;kj&&(k=j)}if(g){var N,_;const D=P==="y"?"width":"height",L=Zp.has(qt(c)),j=f.reference[y]-f.floating[D]+(L&&((N=d.offset)==null?void 0:N[y])||0)+(L?0:C.crossAxis),b=f.reference[y]+f.reference[D]+(L?0:((_=d.offset)==null?void 0:_[y])||0)-(L?C.crossAxis:0);Ab&&(A=b)}return{[P]:k,[y]:A}}}},o0=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(l){var i,a;const{placement:c,rects:f,platform:d,elements:p}=l,{apply:h=()=>{},...g}=Jt(r,l),w=await yo(l,g),y=qt(c),P=Tr(c),k=Vt(c)==="y",{width:A,height:S}=f.floating;let C,N;y==="top"||y==="bottom"?(C=y,N=P===(await(d.isRTL==null?void 0:d.isRTL(p.floating))?"start":"end")?"left":"right"):(N=y,C=P==="end"?"top":"bottom");const _=S-w.top-w.bottom,D=A-w.left-w.right,L=En(S-w[C],_),j=En(A-w[N],D),b=!l.middlewareData.shift;let V=L,G=j;if((i=l.middlewareData.shift)!=null&&i.enabled.x&&(G=D),(a=l.middlewareData.shift)!=null&&a.enabled.y&&(V=_),b&&!P){const ie=ut(w.left,0),ne=ut(w.right,0),ue=ut(w.top,0),se=ut(w.bottom,0);k?G=A-2*(ie!==0||ne!==0?ie+ne:ut(w.left,w.right)):V=S-2*(ue!==0||se!==0?ue+se:ut(w.top,w.bottom))}await h({...l,availableWidth:G,availableHeight:V});const fe=await d.getDimensions(p.floating);return A!==fe.width||S!==fe.height?{reset:{rects:!0}}:{}}}};function li(){return typeof window<"u"}function _r(r){return Jp(r)?(r.nodeName||"").toLowerCase():"#document"}function ct(r){var l;return(r==null||(l=r.ownerDocument)==null?void 0:l.defaultView)||window}function Ut(r){var l;return(l=(Jp(r)?r.ownerDocument:r.document)||window.document)==null?void 0:l.documentElement}function Jp(r){return li()?r instanceof Node||r instanceof ct(r).Node:!1}function It(r){return li()?r instanceof Element||r instanceof ct(r).Element:!1}function Ht(r){return li()?r instanceof HTMLElement||r instanceof ct(r).HTMLElement:!1}function Nd(r){return!li()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ct(r).ShadowRoot}const l0=new Set(["inline","contents"]);function Po(r){const{overflow:l,overflowX:i,overflowY:a,display:c}=At(r);return/auto|scroll|overlay|hidden|clip/.test(l+a+i)&&!l0.has(c)}const i0=new Set(["table","td","th"]);function s0(r){return i0.has(_r(r))}const a0=[":popover-open",":modal"];function ii(r){return a0.some(l=>{try{return r.matches(l)}catch{return!1}})}const u0=["transform","translate","scale","rotate","perspective"],c0=["transform","translate","scale","rotate","perspective","filter"],f0=["paint","layout","strict","content"];function eu(r){const l=tu(),i=It(r)?At(r):r;return u0.some(a=>i[a]?i[a]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!l&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!l&&(i.filter?i.filter!=="none":!1)||c0.some(a=>(i.willChange||"").includes(a))||f0.some(a=>(i.contain||"").includes(a))}function d0(r){let l=Pn(r);for(;Ht(l)&&!kr(l);){if(eu(l))return l;if(ii(l))return null;l=Pn(l)}return null}function tu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const p0=new Set(["html","body","#document"]);function kr(r){return p0.has(_r(r))}function At(r){return ct(r).getComputedStyle(r)}function si(r){return It(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Pn(r){if(_r(r)==="html")return r;const l=r.assignedSlot||r.parentNode||Nd(r)&&r.host||Ut(r);return Nd(l)?l.host:l}function qp(r){const l=Pn(r);return kr(l)?r.ownerDocument?r.ownerDocument.body:r.body:Ht(l)&&Po(l)?l:qp(l)}function wo(r,l,i){var a;l===void 0&&(l=[]),i===void 0&&(i=!0);const c=qp(r),f=c===((a=r.ownerDocument)==null?void 0:a.body),d=ct(c);if(f){const p=Ra(d);return l.concat(d,d.visualViewport||[],Po(c)?c:[],p&&i?wo(p):[])}return l.concat(c,wo(c,[],i))}function Ra(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function em(r){const l=At(r);let i=parseFloat(l.width)||0,a=parseFloat(l.height)||0;const c=Ht(r),f=c?r.offsetWidth:i,d=c?r.offsetHeight:a,p=Kl(i)!==f||Kl(a)!==d;return p&&(i=f,a=d),{width:i,height:a,$:p}}function nu(r){return It(r)?r:r.contextElement}function Er(r){const l=nu(r);if(!Ht(l))return $t(1);const i=l.getBoundingClientRect(),{width:a,height:c,$:f}=em(l);let d=(f?Kl(i.width):i.width)/a,p=(f?Kl(i.height):i.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!p||!Number.isFinite(p))&&(p=1),{x:d,y:p}}const m0=$t(0);function tm(r){const l=ct(r);return!tu()||!l.visualViewport?m0:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function v0(r,l,i){return l===void 0&&(l=!1),!i||l&&i!==ct(r)?!1:l}function Un(r,l,i,a){l===void 0&&(l=!1),i===void 0&&(i=!1);const c=r.getBoundingClientRect(),f=nu(r);let d=$t(1);l&&(a?It(a)&&(d=Er(a)):d=Er(r));const p=v0(f,i,a)?tm(f):$t(0);let h=(c.left+p.x)/d.x,g=(c.top+p.y)/d.y,w=c.width/d.x,y=c.height/d.y;if(f){const P=ct(f),k=a&&It(a)?ct(a):a;let A=P,S=Ra(A);for(;S&&a&&k!==A;){const C=Er(S),N=S.getBoundingClientRect(),_=At(S),D=N.left+(S.clientLeft+parseFloat(_.paddingLeft))*C.x,L=N.top+(S.clientTop+parseFloat(_.paddingTop))*C.y;h*=C.x,g*=C.y,w*=C.x,y*=C.y,h+=D,g+=L,A=ct(S),S=Ra(A)}}return Ql({width:w,height:y,x:h,y:g})}function ru(r,l){const i=si(r).scrollLeft;return l?l.left+i:Un(Ut(r)).left+i}function nm(r,l,i){i===void 0&&(i=!1);const a=r.getBoundingClientRect(),c=a.left+l.scrollLeft-(i?0:ru(r,a)),f=a.top+l.scrollTop;return{x:c,y:f}}function h0(r){let{elements:l,rect:i,offsetParent:a,strategy:c}=r;const f=c==="fixed",d=Ut(a),p=l?ii(l.floating):!1;if(a===d||p&&f)return i;let h={scrollLeft:0,scrollTop:0},g=$t(1);const w=$t(0),y=Ht(a);if((y||!y&&!f)&&((_r(a)!=="body"||Po(d))&&(h=si(a)),Ht(a))){const k=Un(a);g=Er(a),w.x=k.x+a.clientLeft,w.y=k.y+a.clientTop}const P=d&&!y&&!f?nm(d,h,!0):$t(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-h.scrollLeft*g.x+w.x+P.x,y:i.y*g.y-h.scrollTop*g.y+w.y+P.y}}function g0(r){return Array.from(r.getClientRects())}function y0(r){const l=Ut(r),i=si(r),a=r.ownerDocument.body,c=ut(l.scrollWidth,l.clientWidth,a.scrollWidth,a.clientWidth),f=ut(l.scrollHeight,l.clientHeight,a.scrollHeight,a.clientHeight);let d=-i.scrollLeft+ru(r);const p=-i.scrollTop;return At(a).direction==="rtl"&&(d+=ut(l.clientWidth,a.clientWidth)-c),{width:c,height:f,x:d,y:p}}function w0(r,l){const i=ct(r),a=Ut(r),c=i.visualViewport;let f=a.clientWidth,d=a.clientHeight,p=0,h=0;if(c){f=c.width,d=c.height;const g=tu();(!g||g&&l==="fixed")&&(p=c.offsetLeft,h=c.offsetTop)}return{width:f,height:d,x:p,y:h}}const S0=new Set(["absolute","fixed"]);function x0(r,l){const i=Un(r,!0,l==="fixed"),a=i.top+r.clientTop,c=i.left+r.clientLeft,f=Ht(r)?Er(r):$t(1),d=r.clientWidth*f.x,p=r.clientHeight*f.y,h=c*f.x,g=a*f.y;return{width:d,height:p,x:h,y:g}}function Id(r,l,i){let a;if(l==="viewport")a=w0(r,i);else if(l==="document")a=y0(Ut(r));else if(It(l))a=x0(l,i);else{const c=tm(r);a={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return Ql(a)}function rm(r,l){const i=Pn(r);return i===l||!It(i)||kr(i)?!1:At(i).position==="fixed"||rm(i,l)}function C0(r,l){const i=l.get(r);if(i)return i;let a=wo(r,[],!1).filter(p=>It(p)&&_r(p)!=="body"),c=null;const f=At(r).position==="fixed";let d=f?Pn(r):r;for(;It(d)&&!kr(d);){const p=At(d),h=eu(d);!h&&p.position==="fixed"&&(c=null),(f?!h&&!c:!h&&p.position==="static"&&!!c&&S0.has(c.position)||Po(d)&&!h&&rm(r,d))?a=a.filter(w=>w!==d):c=p,d=Pn(d)}return l.set(r,a),a}function E0(r){let{element:l,boundary:i,rootBoundary:a,strategy:c}=r;const d=[...i==="clippingAncestors"?ii(l)?[]:C0(l,this._c):[].concat(i),a],p=d[0],h=d.reduce((g,w)=>{const y=Id(l,w,c);return g.top=ut(y.top,g.top),g.right=En(y.right,g.right),g.bottom=En(y.bottom,g.bottom),g.left=ut(y.left,g.left),g},Id(l,p,c));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function P0(r){const{width:l,height:i}=em(r);return{width:l,height:i}}function k0(r,l,i){const a=Ht(l),c=Ut(l),f=i==="fixed",d=Un(r,!0,f,l);let p={scrollLeft:0,scrollTop:0};const h=$t(0);function g(){h.x=ru(c)}if(a||!a&&!f)if((_r(l)!=="body"||Po(c))&&(p=si(l)),a){const k=Un(l,!0,f,l);h.x=k.x+l.clientLeft,h.y=k.y+l.clientTop}else c&&g();f&&!a&&c&&g();const w=c&&!a&&!f?nm(c,p):$t(0),y=d.left+p.scrollLeft-h.x-w.x,P=d.top+p.scrollTop-h.y-w.y;return{x:y,y:P,width:d.width,height:d.height}}function ya(r){return At(r).position==="static"}function Ad(r,l){if(!Ht(r)||At(r).position==="fixed")return null;if(l)return l(r);let i=r.offsetParent;return Ut(r)===i&&(i=i.ownerDocument.body),i}function om(r,l){const i=ct(r);if(ii(r))return i;if(!Ht(r)){let c=Pn(r);for(;c&&!kr(c);){if(It(c)&&!ya(c))return c;c=Pn(c)}return i}let a=Ad(r,l);for(;a&&s0(a)&&ya(a);)a=Ad(a,l);return a&&kr(a)&&ya(a)&&!eu(a)?i:a||d0(r)||i}const R0=async function(r){const l=this.getOffsetParent||om,i=this.getDimensions,a=await i(r.floating);return{reference:k0(r.reference,await l(r.floating),r.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function T0(r){return At(r).direction==="rtl"}const _0={convertOffsetParentRelativeRectToViewportRelativeRect:h0,getDocumentElement:Ut,getClippingRect:E0,getOffsetParent:om,getElementRects:R0,getClientRects:g0,getDimensions:P0,getScale:Er,isElement:It,isRTL:T0};function lm(r,l){return r.x===l.x&&r.y===l.y&&r.width===l.width&&r.height===l.height}function N0(r,l){let i=null,a;const c=Ut(r);function f(){var p;clearTimeout(a),(p=i)==null||p.disconnect(),i=null}function d(p,h){p===void 0&&(p=!1),h===void 0&&(h=1),f();const g=r.getBoundingClientRect(),{left:w,top:y,width:P,height:k}=g;if(p||l(),!P||!k)return;const A=zl(y),S=zl(c.clientWidth-(w+P)),C=zl(c.clientHeight-(y+k)),N=zl(w),D={rootMargin:-A+"px "+-S+"px "+-C+"px "+-N+"px",threshold:ut(0,En(1,h))||1};let L=!0;function j(b){const V=b[0].intersectionRatio;if(V!==h){if(!L)return d();V?d(!1,V):a=setTimeout(()=>{d(!1,1e-7)},1e3)}V===1&&!lm(g,r.getBoundingClientRect())&&d(),L=!1}try{i=new IntersectionObserver(j,{...D,root:c.ownerDocument})}catch{i=new IntersectionObserver(j,D)}i.observe(r)}return d(!0),f}function I0(r,l,i,a){a===void 0&&(a={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,g=nu(r),w=c||f?[...g?wo(g):[],...wo(l)]:[];w.forEach(N=>{c&&N.addEventListener("scroll",i,{passive:!0}),f&&N.addEventListener("resize",i)});const y=g&&p?N0(g,i):null;let P=-1,k=null;d&&(k=new ResizeObserver(N=>{let[_]=N;_&&_.target===g&&k&&(k.unobserve(l),cancelAnimationFrame(P),P=requestAnimationFrame(()=>{var D;(D=k)==null||D.observe(l)})),i()}),g&&!h&&k.observe(g),k.observe(l));let A,S=h?Un(r):null;h&&C();function C(){const N=Un(r);S&&!lm(S,N)&&i(),S=N,A=requestAnimationFrame(C)}return i(),()=>{var N;w.forEach(_=>{c&&_.removeEventListener("scroll",i),f&&_.removeEventListener("resize",i)}),y?.(),(N=k)==null||N.disconnect(),k=null,h&&cancelAnimationFrame(A)}}const A0=t0,O0=n0,D0=Jw,M0=o0,L0=qw,Od=Zw,F0=r0,j0=(r,l,i)=>{const a=new Map,c={platform:_0,...i},f={...c.platform,_c:a};return Xw(r,l,{...c,platform:f})};var z0=typeof document<"u",B0=function(){},$l=z0?v.useLayoutEffect:B0;function Yl(r,l){if(r===l)return!0;if(typeof r!=typeof l)return!1;if(typeof r=="function"&&r.toString()===l.toString())return!0;let i,a,c;if(r&&l&&typeof r=="object"){if(Array.isArray(r)){if(i=r.length,i!==l.length)return!1;for(a=i;a--!==0;)if(!Yl(r[a],l[a]))return!1;return!0}if(c=Object.keys(r),i=c.length,i!==Object.keys(l).length)return!1;for(a=i;a--!==0;)if(!{}.hasOwnProperty.call(l,c[a]))return!1;for(a=i;a--!==0;){const f=c[a];if(!(f==="_owner"&&r.$$typeof)&&!Yl(r[f],l[f]))return!1}return!0}return r!==r&&l!==l}function im(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Dd(r,l){const i=im(r);return Math.round(l*i)/i}function wa(r){const l=v.useRef(r);return $l(()=>{l.current=r}),l}function V0(r){r===void 0&&(r={});const{placement:l="bottom",strategy:i="absolute",middleware:a=[],platform:c,elements:{reference:f,floating:d}={},transform:p=!0,whileElementsMounted:h,open:g}=r,[w,y]=v.useState({x:0,y:0,strategy:i,placement:l,middlewareData:{},isPositioned:!1}),[P,k]=v.useState(a);Yl(P,a)||k(a);const[A,S]=v.useState(null),[C,N]=v.useState(null),_=v.useCallback(F=>{F!==b.current&&(b.current=F,S(F))},[]),D=v.useCallback(F=>{F!==V.current&&(V.current=F,N(F))},[]),L=f||A,j=d||C,b=v.useRef(null),V=v.useRef(null),G=v.useRef(w),fe=h!=null,ie=wa(h),ne=wa(c),ue=wa(g),se=v.useCallback(()=>{if(!b.current||!V.current)return;const F={placement:l,strategy:i,middleware:P};ne.current&&(F.platform=ne.current),j0(b.current,V.current,F).then(W=>{const U={...W,isPositioned:ue.current!==!1};ce.current&&!Yl(G.current,U)&&(G.current=U,xo.flushSync(()=>{y(U)}))})},[P,l,i,ne,ue]);$l(()=>{g===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,y(F=>({...F,isPositioned:!1})))},[g]);const ce=v.useRef(!1);$l(()=>(ce.current=!0,()=>{ce.current=!1}),[]),$l(()=>{if(L&&(b.current=L),j&&(V.current=j),L&&j){if(ie.current)return ie.current(L,j,se);se()}},[L,j,se,ie,fe]);const de=v.useMemo(()=>({reference:b,floating:V,setReference:_,setFloating:D}),[_,D]),Z=v.useMemo(()=>({reference:L,floating:j}),[L,j]),ae=v.useMemo(()=>{const F={position:i,left:0,top:0};if(!Z.floating)return F;const W=Dd(Z.floating,w.x),U=Dd(Z.floating,w.y);return p?{...F,transform:"translate("+W+"px, "+U+"px)",...im(Z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:W,top:U}},[i,p,Z.floating,w.x,w.y]);return v.useMemo(()=>({...w,update:se,refs:de,elements:Z,floatingStyles:ae}),[w,se,de,Z,ae])}const $0=r=>{function l(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:r,fn(i){const{element:a,padding:c}=typeof r=="function"?r(i):r;return a&&l(a)?a.current!=null?Od({element:a.current,padding:c}).fn(i):{}:a?Od({element:a,padding:c}).fn(i):{}}}},H0=(r,l)=>({...A0(r),options:[r,l]}),U0=(r,l)=>({...O0(r),options:[r,l]}),W0=(r,l)=>({...F0(r),options:[r,l]}),b0=(r,l)=>({...D0(r),options:[r,l]}),K0=(r,l)=>({...M0(r),options:[r,l]}),G0=(r,l)=>({...L0(r),options:[r,l]}),Q0=(r,l)=>({...$0(r),options:[r,l]});var Y0="Arrow",sm=v.forwardRef((r,l)=>{const{children:i,width:a=10,height:c=5,...f}=r;return T.jsx(oe.svg,{...f,ref:l,width:a,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?i:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});sm.displayName=Y0;var X0=sm;function ou(r){const[l,i]=v.useState(void 0);return be(()=>{if(r){i({width:r.offsetWidth,height:r.offsetHeight});const a=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const f=c[0];let d,p;if("borderBoxSize"in f){const h=f.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,p=g.blockSize}else d=r.offsetWidth,p=r.offsetHeight;i({width:d,height:p})});return a.observe(r,{box:"border-box"}),()=>a.unobserve(r)}else i(void 0)},[r]),l}var lu="Popper",[am,ai]=yt(lu),[Z0,um]=am(lu),cm=r=>{const{__scopePopper:l,children:i}=r,[a,c]=v.useState(null);return T.jsx(Z0,{scope:l,anchor:a,onAnchorChange:c,children:i})};cm.displayName=lu;var fm="PopperAnchor",dm=v.forwardRef((r,l)=>{const{__scopePopper:i,virtualRef:a,...c}=r,f=um(fm,i),d=v.useRef(null),p=pe(l,d),h=v.useRef(null);return v.useEffect(()=>{const g=h.current;h.current=a?.current||d.current,g!==h.current&&f.onAnchorChange(h.current)}),a?null:T.jsx(oe.div,{...c,ref:p})});dm.displayName=fm;var iu="PopperContent",[J0,q0]=am(iu),pm=v.forwardRef((r,l)=>{const{__scopePopper:i,side:a="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,arrowPadding:p=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:w=0,sticky:y="partial",hideWhenDetached:P=!1,updatePositionStrategy:k="optimized",onPlaced:A,...S}=r,C=um(iu,i),[N,_]=v.useState(null),D=pe(l,q=>_(q)),[L,j]=v.useState(null),b=ou(L),V=b?.width??0,G=b?.height??0,fe=a+(f!=="center"?"-"+f:""),ie=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},ne=Array.isArray(g)?g:[g],ue=ne.length>0,se={padding:ie,boundary:ne.filter(tS),altBoundary:ue},{refs:ce,floatingStyles:de,placement:Z,isPositioned:ae,middlewareData:F}=V0({strategy:"fixed",placement:fe,whileElementsMounted:(...q)=>I0(...q,{animationFrame:k==="always"}),elements:{reference:C.anchor},middleware:[H0({mainAxis:c+G,alignmentAxis:d}),h&&U0({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?W0():void 0,...se}),h&&b0({...se}),K0({...se,apply:({elements:q,rects:ge,availableWidth:ze,availableHeight:xe})=>{const{width:we,height:Re}=ge.reference,He=q.floating.style;He.setProperty("--radix-popper-available-width",`${ze}px`),He.setProperty("--radix-popper-available-height",`${xe}px`),He.setProperty("--radix-popper-anchor-width",`${we}px`),He.setProperty("--radix-popper-anchor-height",`${Re}px`)}}),L&&Q0({element:L,padding:p}),nS({arrowWidth:V,arrowHeight:G}),P&&G0({strategy:"referenceHidden",...se})]}),[W,U]=hm(Z),me=Cn(A);be(()=>{ae&&me?.()},[ae,me]);const ye=F.arrow?.x,Je=F.arrow?.y,Oe=F.arrow?.centerOffset!==0,[ft,Le]=v.useState();return be(()=>{N&&Le(window.getComputedStyle(N).zIndex)},[N]),T.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:ae?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ft,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:T.jsx(J0,{scope:i,placedSide:W,onArrowChange:j,arrowX:ye,arrowY:Je,shouldHideArrow:Oe,children:T.jsx(oe.div,{"data-side":W,"data-align":U,...S,ref:D,style:{...S.style,animation:ae?void 0:"none"}})})})});pm.displayName=iu;var mm="PopperArrow",eS={top:"bottom",right:"left",bottom:"top",left:"right"},vm=v.forwardRef(function(l,i){const{__scopePopper:a,...c}=l,f=q0(mm,a),d=eS[f.placedSide];return T.jsx("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:T.jsx(X0,{...c,ref:i,style:{...c.style,display:"block"}})})});vm.displayName=mm;function tS(r){return r!==null}var nS=r=>({name:"transformOrigin",options:r,fn(l){const{placement:i,rects:a,middlewareData:c}=l,d=c.arrow?.centerOffset!==0,p=d?0:r.arrowWidth,h=d?0:r.arrowHeight,[g,w]=hm(i),y={start:"0%",center:"50%",end:"100%"}[w],P=(c.arrow?.x??0)+p/2,k=(c.arrow?.y??0)+h/2;let A="",S="";return g==="bottom"?(A=d?y:`${P}px`,S=`${-h}px`):g==="top"?(A=d?y:`${P}px`,S=`${a.floating.height+h}px`):g==="right"?(A=`${-h}px`,S=d?y:`${k}px`):g==="left"&&(A=`${a.floating.width+h}px`,S=d?y:`${k}px`),{data:{x:A,y:S}}}});function hm(r){const[l,i="center"]=r.split("-");return[l,i]}var gm=cm,ym=dm,wm=pm,Sm=vm;function su(r){const l=v.useRef({value:r,previous:r});return v.useMemo(()=>(l.current.value!==r&&(l.current.previous=l.current.value,l.current.value=r),l.current.previous),[r])}var xm=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"}),rS="VisuallyHidden",Cm=v.forwardRef((r,l)=>T.jsx(oe.span,{...r,ref:l,style:{...xm,...r.style}}));Cm.displayName=rS;var oS=Cm,lS=[" ","Enter","ArrowUp","ArrowDown"],iS=[" ","Enter"],Wn="Select",[ui,ci,sS]=ei(Wn),[Nr,zx]=yt(Wn,[sS,ai]),fi=ai(),[aS,Rn]=Nr(Wn),[uS,cS]=Nr(Wn),Em=r=>{const{__scopeSelect:l,children:i,open:a,defaultOpen:c,onOpenChange:f,value:d,defaultValue:p,onValueChange:h,dir:g,name:w,autoComplete:y,disabled:P,required:k,form:A}=r,S=fi(l),[C,N]=v.useState(null),[_,D]=v.useState(null),[L,j]=v.useState(!1),b=Co(g),[V,G]=Nt({prop:a,defaultProp:c??!1,onChange:f,caller:Wn}),[fe,ie]=Nt({prop:d,defaultProp:p,onChange:h,caller:Wn}),ne=v.useRef(null),ue=C?A||!!C.closest("form"):!0,[se,ce]=v.useState(new Set),de=Array.from(se).map(Z=>Z.props.value).join(";");return T.jsx(gm,{...S,children:T.jsxs(aS,{required:k,scope:l,trigger:C,onTriggerChange:N,valueNode:_,onValueNodeChange:D,valueNodeHasChildren:L,onValueNodeHasChildrenChange:j,contentId:_t(),value:fe,onValueChange:ie,open:V,onOpenChange:G,dir:b,triggerPointerDownPosRef:ne,disabled:P,children:[T.jsx(ui.Provider,{scope:l,children:T.jsx(uS,{scope:r.__scopeSelect,onNativeOptionAdd:v.useCallback(Z=>{ce(ae=>new Set(ae).add(Z))},[]),onNativeOptionRemove:v.useCallback(Z=>{ce(ae=>{const F=new Set(ae);return F.delete(Z),F})},[]),children:i})}),ue?T.jsxs(Gm,{"aria-hidden":!0,required:k,tabIndex:-1,name:w,autoComplete:y,value:fe,onChange:Z=>ie(Z.target.value),disabled:P,form:A,children:[fe===void 0?T.jsx("option",{value:""}):null,Array.from(se)]},de):null]})})};Em.displayName=Wn;var Pm="SelectTrigger",km=v.forwardRef((r,l)=>{const{__scopeSelect:i,disabled:a=!1,...c}=r,f=fi(i),d=Rn(Pm,i),p=d.disabled||a,h=pe(l,d.onTriggerChange),g=ci(i),w=v.useRef("touch"),[y,P,k]=Ym(S=>{const C=g().filter(D=>!D.disabled),N=C.find(D=>D.value===d.value),_=Xm(C,S,N);_!==void 0&&d.onValueChange(_.value)}),A=S=>{p||(d.onOpenChange(!0),k()),S&&(d.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return T.jsx(ym,{asChild:!0,...f,children:T.jsx(oe.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:p,"data-disabled":p?"":void 0,"data-placeholder":Qm(d.value)?"":void 0,...c,ref:h,onClick:re(c.onClick,S=>{S.currentTarget.focus(),w.current!=="mouse"&&A(S)}),onPointerDown:re(c.onPointerDown,S=>{w.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(A(S),S.preventDefault())}),onKeyDown:re(c.onKeyDown,S=>{const C=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&P(S.key),!(C&&S.key===" ")&&lS.includes(S.key)&&(A(),S.preventDefault())})})})});km.displayName=Pm;var Rm="SelectValue",Tm=v.forwardRef((r,l)=>{const{__scopeSelect:i,className:a,style:c,children:f,placeholder:d="",...p}=r,h=Rn(Rm,i),{onValueNodeHasChildrenChange:g}=h,w=f!==void 0,y=pe(l,h.onValueNodeChange);return be(()=>{g(w)},[g,w]),T.jsx(oe.span,{...p,ref:y,style:{pointerEvents:"none"},children:Qm(h.value)?T.jsx(T.Fragment,{children:d}):f})});Tm.displayName=Rm;var fS="SelectIcon",_m=v.forwardRef((r,l)=>{const{__scopeSelect:i,children:a,...c}=r;return T.jsx(oe.span,{"aria-hidden":!0,...c,ref:l,children:a||"▼"})});_m.displayName=fS;var dS="SelectPortal",Nm=r=>T.jsx(Ba,{asChild:!0,...r});Nm.displayName=dS;var bn="SelectContent",Im=v.forwardRef((r,l)=>{const i=Rn(bn,r.__scopeSelect),[a,c]=v.useState();if(be(()=>{c(new DocumentFragment)},[]),!i.open){const f=a;return f?xo.createPortal(T.jsx(Am,{scope:r.__scopeSelect,children:T.jsx(ui.Slot,{scope:r.__scopeSelect,children:T.jsx("div",{children:r.children})})}),f):null}return T.jsx(Om,{...r,ref:l})});Im.displayName=bn;var Tt=10,[Am,Tn]=Nr(bn),pS="SelectContentImpl",mS=Pr("SelectContent.RemoveScroll"),Om=v.forwardRef((r,l)=>{const{__scopeSelect:i,position:a="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,side:p,sideOffset:h,align:g,alignOffset:w,arrowPadding:y,collisionBoundary:P,collisionPadding:k,sticky:A,hideWhenDetached:S,avoidCollisions:C,...N}=r,_=Rn(bn,i),[D,L]=v.useState(null),[j,b]=v.useState(null),V=pe(l,q=>L(q)),[G,fe]=v.useState(null),[ie,ne]=v.useState(null),ue=ci(i),[se,ce]=v.useState(!1),de=v.useRef(!1);v.useEffect(()=>{if(D)return ep(D)},[D]),bd();const Z=v.useCallback(q=>{const[ge,...ze]=ue().map(Re=>Re.ref.current),[xe]=ze.slice(-1),we=document.activeElement;for(const Re of q)if(Re===we||(Re?.scrollIntoView({block:"nearest"}),Re===ge&&j&&(j.scrollTop=0),Re===xe&&j&&(j.scrollTop=j.scrollHeight),Re?.focus(),document.activeElement!==we))return},[ue,j]),ae=v.useCallback(()=>Z([G,D]),[Z,G,D]);v.useEffect(()=>{se&&ae()},[se,ae]);const{onOpenChange:F,triggerPointerDownPosRef:W}=_;v.useEffect(()=>{if(D){let q={x:0,y:0};const ge=xe=>{q={x:Math.abs(Math.round(xe.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(W.current?.y??0))}},ze=xe=>{q.x<=10&&q.y<=10?xe.preventDefault():D.contains(xe.target)||F(!1),document.removeEventListener("pointermove",ge),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",ze,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",ze,{capture:!0})}}},[D,F,W]),v.useEffect(()=>{const q=()=>F(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[F]);const[U,me]=Ym(q=>{const ge=ue().filter(we=>!we.disabled),ze=ge.find(we=>we.ref.current===document.activeElement),xe=Xm(ge,q,ze);xe&&setTimeout(()=>xe.ref.current.focus())}),ye=v.useCallback((q,ge,ze)=>{const xe=!de.current&&!ze;(_.value!==void 0&&_.value===ge||xe)&&(fe(q),xe&&(de.current=!0))},[_.value]),Je=v.useCallback(()=>D?.focus(),[D]),Oe=v.useCallback((q,ge,ze)=>{const xe=!de.current&&!ze;(_.value!==void 0&&_.value===ge||xe)&&ne(q)},[_.value]),ft=a==="popper"?Ta:Dm,Le=ft===Ta?{side:p,sideOffset:h,align:g,alignOffset:w,arrowPadding:y,collisionBoundary:P,collisionPadding:k,sticky:A,hideWhenDetached:S,avoidCollisions:C}:{};return T.jsx(Am,{scope:i,content:D,viewport:j,onViewportChange:b,itemRefCallback:ye,selectedItem:G,onItemLeave:Je,itemTextRefCallback:Oe,focusSelectedItem:ae,selectedItemText:ie,position:a,isPositioned:se,searchRef:U,children:T.jsx(Va,{as:mS,allowPinchZoom:!0,children:T.jsx(za,{asChild:!0,trapped:_.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:re(c,q=>{_.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(Zl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:T.jsx(ft,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:q=>q.preventDefault(),...N,...Le,onPlaced:()=>ce(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:re(N.onKeyDown,q=>{const ge=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!ge&&q.key.length===1&&me(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let xe=ue().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(q.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const we=q.target,Re=xe.indexOf(we);xe=xe.slice(Re+1)}setTimeout(()=>Z(xe)),q.preventDefault()}})})})})})})});Om.displayName=pS;var vS="SelectItemAlignedPosition",Dm=v.forwardRef((r,l)=>{const{__scopeSelect:i,onPlaced:a,...c}=r,f=Rn(bn,i),d=Tn(bn,i),[p,h]=v.useState(null),[g,w]=v.useState(null),y=pe(l,V=>w(V)),P=ci(i),k=v.useRef(!1),A=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:N,focusSelectedItem:_}=d,D=v.useCallback(()=>{if(f.trigger&&f.valueNode&&p&&g&&S&&C&&N){const V=f.trigger.getBoundingClientRect(),G=g.getBoundingClientRect(),fe=f.valueNode.getBoundingClientRect(),ie=N.getBoundingClientRect();if(f.dir!=="rtl"){const we=ie.left-G.left,Re=fe.left-we,He=V.left-Re,wt=V.width+He,Kn=Math.max(wt,G.width),Gn=window.innerWidth-Tt,_n=bl(Re,[Tt,Math.max(Tt,Gn-Kn)]);p.style.minWidth=wt+"px",p.style.left=_n+"px"}else{const we=G.right-ie.right,Re=window.innerWidth-fe.right-we,He=window.innerWidth-V.right-Re,wt=V.width+He,Kn=Math.max(wt,G.width),Gn=window.innerWidth-Tt,_n=bl(Re,[Tt,Math.max(Tt,Gn-Kn)]);p.style.minWidth=wt+"px",p.style.right=_n+"px"}const ne=P(),ue=window.innerHeight-Tt*2,se=S.scrollHeight,ce=window.getComputedStyle(g),de=parseInt(ce.borderTopWidth,10),Z=parseInt(ce.paddingTop,10),ae=parseInt(ce.borderBottomWidth,10),F=parseInt(ce.paddingBottom,10),W=de+Z+se+F+ae,U=Math.min(C.offsetHeight*5,W),me=window.getComputedStyle(S),ye=parseInt(me.paddingTop,10),Je=parseInt(me.paddingBottom,10),Oe=V.top+V.height/2-Tt,ft=ue-Oe,Le=C.offsetHeight/2,q=C.offsetTop+Le,ge=de+Z+q,ze=W-ge;if(ge<=Oe){const we=ne.length>0&&C===ne[ne.length-1].ref.current;p.style.bottom="0px";const Re=g.clientHeight-S.offsetTop-S.offsetHeight,He=Math.max(ft,Le+(we?Je:0)+Re+ae),wt=ge+He;p.style.height=wt+"px"}else{const we=ne.length>0&&C===ne[0].ref.current;p.style.top="0px";const He=Math.max(Oe,de+S.offsetTop+(we?ye:0)+Le)+ze;p.style.height=He+"px",S.scrollTop=ge-Oe+S.offsetTop}p.style.margin=`${Tt}px 0`,p.style.minHeight=U+"px",p.style.maxHeight=ue+"px",a?.(),requestAnimationFrame(()=>k.current=!0)}},[P,f.trigger,f.valueNode,p,g,S,C,N,f.dir,a]);be(()=>D(),[D]);const[L,j]=v.useState();be(()=>{g&&j(window.getComputedStyle(g).zIndex)},[g]);const b=v.useCallback(V=>{V&&A.current===!0&&(D(),_?.(),A.current=!1)},[D,_]);return T.jsx(gS,{scope:i,contentWrapper:p,shouldExpandOnScrollRef:k,onScrollButtonChange:b,children:T.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:T.jsx(oe.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});Dm.displayName=vS;var hS="SelectPopperPosition",Ta=v.forwardRef((r,l)=>{const{__scopeSelect:i,align:a="start",collisionPadding:c=Tt,...f}=r,d=fi(i);return T.jsx(wm,{...d,...f,ref:l,align:a,collisionPadding:c,style:{boxSizing:"border-box",...f.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)"}})});Ta.displayName=hS;var[gS,au]=Nr(bn,{}),_a="SelectViewport",Mm=v.forwardRef((r,l)=>{const{__scopeSelect:i,nonce:a,...c}=r,f=Tn(_a,i),d=au(_a,i),p=pe(l,f.onViewportChange),h=v.useRef(0);return T.jsxs(T.Fragment,{children:[T.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:a}),T.jsx(ui.Slot,{scope:i,children:T.jsx(oe.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:p,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:re(c.onScroll,g=>{const w=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:P}=d;if(P?.current&&y){const k=Math.abs(h.current-w.scrollTop);if(k>0){const A=window.innerHeight-Tt*2,S=parseFloat(y.style.minHeight),C=parseFloat(y.style.height),N=Math.max(S,C);if(N0?L:0,y.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});Mm.displayName=_a;var Lm="SelectGroup",[yS,wS]=Nr(Lm),SS=v.forwardRef((r,l)=>{const{__scopeSelect:i,...a}=r,c=_t();return T.jsx(yS,{scope:i,id:c,children:T.jsx(oe.div,{role:"group","aria-labelledby":c,...a,ref:l})})});SS.displayName=Lm;var Fm="SelectLabel",jm=v.forwardRef((r,l)=>{const{__scopeSelect:i,...a}=r,c=wS(Fm,i);return T.jsx(oe.div,{id:c.id,...a,ref:l})});jm.displayName=Fm;var Xl="SelectItem",[xS,zm]=Nr(Xl),Bm=v.forwardRef((r,l)=>{const{__scopeSelect:i,value:a,disabled:c=!1,textValue:f,...d}=r,p=Rn(Xl,i),h=Tn(Xl,i),g=p.value===a,[w,y]=v.useState(f??""),[P,k]=v.useState(!1),A=pe(l,_=>h.itemRefCallback?.(_,a,c)),S=_t(),C=v.useRef("touch"),N=()=>{c||(p.onValueChange(a),p.onOpenChange(!1))};if(a==="")throw new Error("A 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 T.jsx(xS,{scope:i,value:a,disabled:c,textId:S,isSelected:g,onItemTextChange:v.useCallback(_=>{y(D=>D||(_?.textContent??"").trim())},[]),children:T.jsx(ui.ItemSlot,{scope:i,value:a,disabled:c,textValue:w,children:T.jsx(oe.div,{role:"option","aria-labelledby":S,"data-highlighted":P?"":void 0,"aria-selected":g&&P,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:A,onFocus:re(d.onFocus,()=>k(!0)),onBlur:re(d.onBlur,()=>k(!1)),onClick:re(d.onClick,()=>{C.current!=="mouse"&&N()}),onPointerUp:re(d.onPointerUp,()=>{C.current==="mouse"&&N()}),onPointerDown:re(d.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:re(d.onPointerMove,_=>{C.current=_.pointerType,c?h.onItemLeave?.():C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(d.onPointerLeave,_=>{_.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:re(d.onKeyDown,_=>{h.searchRef?.current!==""&&_.key===" "||(iS.includes(_.key)&&N(),_.key===" "&&_.preventDefault())})})})})});Bm.displayName=Xl;var go="SelectItemText",Vm=v.forwardRef((r,l)=>{const{__scopeSelect:i,className:a,style:c,...f}=r,d=Rn(go,i),p=Tn(go,i),h=zm(go,i),g=cS(go,i),[w,y]=v.useState(null),P=pe(l,N=>y(N),h.onItemTextChange,N=>p.itemTextRefCallback?.(N,h.value,h.disabled)),k=w?.textContent,A=v.useMemo(()=>T.jsx("option",{value:h.value,disabled:h.disabled,children:k},h.value),[h.disabled,h.value,k]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=g;return be(()=>(S(A),()=>C(A)),[S,C,A]),T.jsxs(T.Fragment,{children:[T.jsx(oe.span,{id:h.textId,...f,ref:P}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?xo.createPortal(f.children,d.valueNode):null]})});Vm.displayName=go;var $m="SelectItemIndicator",Hm=v.forwardRef((r,l)=>{const{__scopeSelect:i,...a}=r;return zm($m,i).isSelected?T.jsx(oe.span,{"aria-hidden":!0,...a,ref:l}):null});Hm.displayName=$m;var Na="SelectScrollUpButton",Um=v.forwardRef((r,l)=>{const i=Tn(Na,r.__scopeSelect),a=au(Na,r.__scopeSelect),[c,f]=v.useState(!1),d=pe(l,a.onScrollButtonChange);return be(()=>{if(i.viewport&&i.isPositioned){let p=function(){const g=h.scrollTop>0;f(g)};const h=i.viewport;return p(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),c?T.jsx(bm,{...r,ref:d,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop-h.offsetHeight)}}):null});Um.displayName=Na;var Ia="SelectScrollDownButton",Wm=v.forwardRef((r,l)=>{const i=Tn(Ia,r.__scopeSelect),a=au(Ia,r.__scopeSelect),[c,f]=v.useState(!1),d=pe(l,a.onScrollButtonChange);return be(()=>{if(i.viewport&&i.isPositioned){let p=function(){const g=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),c?T.jsx(bm,{...r,ref:d,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop+h.offsetHeight)}}):null});Wm.displayName=Ia;var bm=v.forwardRef((r,l)=>{const{__scopeSelect:i,onAutoScroll:a,...c}=r,f=Tn("SelectScrollButton",i),d=v.useRef(null),p=ci(i),h=v.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),be(()=>{p().find(w=>w.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[p]),T.jsx(oe.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:re(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(a,50))}),onPointerMove:re(c.onPointerMove,()=>{f.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(a,50))}),onPointerLeave:re(c.onPointerLeave,()=>{h()})})}),CS="SelectSeparator",Km=v.forwardRef((r,l)=>{const{__scopeSelect:i,...a}=r;return T.jsx(oe.div,{"aria-hidden":!0,...a,ref:l})});Km.displayName=CS;var Aa="SelectArrow",ES=v.forwardRef((r,l)=>{const{__scopeSelect:i,...a}=r,c=fi(i),f=Rn(Aa,i),d=Tn(Aa,i);return f.open&&d.position==="popper"?T.jsx(Sm,{...c,...a,ref:l}):null});ES.displayName=Aa;var PS="SelectBubbleInput",Gm=v.forwardRef(({__scopeSelect:r,value:l,...i},a)=>{const c=v.useRef(null),f=pe(a,c),d=su(l);return v.useEffect(()=>{const p=c.current;if(!p)return;const h=window.HTMLSelectElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&w){const y=new Event("change",{bubbles:!0});w.call(p,l),p.dispatchEvent(y)}},[d,l]),T.jsx(oe.select,{...i,style:{...xm,...i.style},ref:f,defaultValue:l})});Gm.displayName=PS;function Qm(r){return r===""||r===void 0}function Ym(r){const l=Cn(r),i=v.useRef(""),a=v.useRef(0),c=v.useCallback(d=>{const p=i.current+d;l(p),(function h(g){i.current=g,window.clearTimeout(a.current),g!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(p)},[l]),f=v.useCallback(()=>{i.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[i,c,f]}function Xm(r,l,i){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=i?r.indexOf(i):-1;let d=kS(r,Math.max(f,0));c.length===1&&(d=d.filter(g=>g!==i));const h=d.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return h!==i?h:void 0}function kS(r,l){return r.map((i,a)=>r[(l+a)%r.length])}var Bx=Em,Vx=km,$x=Tm,Hx=_m,Ux=Nm,Wx=Im,bx=Mm,Kx=jm,Gx=Bm,Qx=Vm,Yx=Hm,Xx=Um,Zx=Wm,Jx=Km,[di,qx]=yt("Tooltip",[ai]),pi=ai(),Zm="TooltipProvider",RS=700,Oa="tooltip.open",[TS,uu]=di(Zm),Jm=r=>{const{__scopeTooltip:l,delayDuration:i=RS,skipDelayDuration:a=300,disableHoverableContent:c=!1,children:f}=r,d=v.useRef(!0),p=v.useRef(!1),h=v.useRef(0);return v.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),T.jsx(TS,{scope:l,isOpenDelayedRef:d,delayDuration:i,onOpen:v.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,a)},[a]),isPointerInTransitRef:p,onPointerInTransitChange:v.useCallback(g=>{p.current=g},[]),disableHoverableContent:c,children:f})};Jm.displayName=Zm;var So="Tooltip",[_S,mi]=di(So),qm=r=>{const{__scopeTooltip:l,children:i,open:a,defaultOpen:c,onOpenChange:f,disableHoverableContent:d,delayDuration:p}=r,h=uu(So,r.__scopeTooltip),g=pi(l),[w,y]=v.useState(null),P=_t(),k=v.useRef(0),A=d??h.disableHoverableContent,S=p??h.delayDuration,C=v.useRef(!1),[N,_]=Nt({prop:a,defaultProp:c??!1,onChange:V=>{V?(h.onOpen(),document.dispatchEvent(new CustomEvent(Oa))):h.onClose(),f?.(V)},caller:So}),D=v.useMemo(()=>N?C.current?"delayed-open":"instant-open":"closed",[N]),L=v.useCallback(()=>{window.clearTimeout(k.current),k.current=0,C.current=!1,_(!0)},[_]),j=v.useCallback(()=>{window.clearTimeout(k.current),k.current=0,_(!1)},[_]),b=v.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{C.current=!0,_(!0),k.current=0},S)},[S,_]);return v.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),T.jsx(gm,{...g,children:T.jsx(_S,{scope:l,contentId:P,open:N,stateAttribute:D,trigger:w,onTriggerChange:y,onTriggerEnter:v.useCallback(()=>{h.isOpenDelayedRef.current?b():L()},[h.isOpenDelayedRef,b,L]),onTriggerLeave:v.useCallback(()=>{A?j():(window.clearTimeout(k.current),k.current=0)},[j,A]),onOpen:L,onClose:j,disableHoverableContent:A,children:i})})};qm.displayName=So;var Da="TooltipTrigger",ev=v.forwardRef((r,l)=>{const{__scopeTooltip:i,...a}=r,c=mi(Da,i),f=uu(Da,i),d=pi(i),p=v.useRef(null),h=pe(l,p,c.onTriggerChange),g=v.useRef(!1),w=v.useRef(!1),y=v.useCallback(()=>g.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),T.jsx(ym,{asChild:!0,...d,children:T.jsx(oe.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...a,ref:h,onPointerMove:re(r.onPointerMove,P=>{P.pointerType!=="touch"&&!w.current&&!f.isPointerInTransitRef.current&&(c.onTriggerEnter(),w.current=!0)}),onPointerLeave:re(r.onPointerLeave,()=>{c.onTriggerLeave(),w.current=!1}),onPointerDown:re(r.onPointerDown,()=>{c.open&&c.onClose(),g.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:re(r.onFocus,()=>{g.current||c.onOpen()}),onBlur:re(r.onBlur,c.onClose),onClick:re(r.onClick,c.onClose)})})});ev.displayName=Da;var NS="TooltipPortal",[eC,IS]=di(NS,{forceMount:void 0}),Rr="TooltipContent",tv=v.forwardRef((r,l)=>{const i=IS(Rr,r.__scopeTooltip),{forceMount:a=i.forceMount,side:c="top",...f}=r,d=mi(Rr,r.__scopeTooltip);return T.jsx(kn,{present:a||d.open,children:d.disableHoverableContent?T.jsx(nv,{side:c,...f,ref:l}):T.jsx(AS,{side:c,...f,ref:l})})}),AS=v.forwardRef((r,l)=>{const i=mi(Rr,r.__scopeTooltip),a=uu(Rr,r.__scopeTooltip),c=v.useRef(null),f=pe(l,c),[d,p]=v.useState(null),{trigger:h,onClose:g}=i,w=c.current,{onPointerInTransitChange:y}=a,P=v.useCallback(()=>{p(null),y(!1)},[y]),k=v.useCallback((A,S)=>{const C=A.currentTarget,N={x:A.clientX,y:A.clientY},_=FS(N,C.getBoundingClientRect()),D=jS(N,_),L=zS(S.getBoundingClientRect()),j=VS([...D,...L]);p(j),y(!0)},[y]);return v.useEffect(()=>()=>P(),[P]),v.useEffect(()=>{if(h&&w){const A=C=>k(C,w),S=C=>k(C,h);return h.addEventListener("pointerleave",A),w.addEventListener("pointerleave",S),()=>{h.removeEventListener("pointerleave",A),w.removeEventListener("pointerleave",S)}}},[h,w,k,P]),v.useEffect(()=>{if(d){const A=S=>{const C=S.target,N={x:S.clientX,y:S.clientY},_=h?.contains(C)||w?.contains(C),D=!BS(N,d);_?P():D&&(P(),g())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[h,w,d,g,P]),T.jsx(nv,{...r,ref:f})}),[OS,DS]=di(So,{isInside:!1}),MS=_g("TooltipContent"),nv=v.forwardRef((r,l)=>{const{__scopeTooltip:i,children:a,"aria-label":c,onEscapeKeyDown:f,onPointerDownOutside:d,...p}=r,h=mi(Rr,i),g=pi(i),{onClose:w}=h;return v.useEffect(()=>(document.addEventListener(Oa,w),()=>document.removeEventListener(Oa,w)),[w]),v.useEffect(()=>{if(h.trigger){const y=P=>{P.target?.contains(h.trigger)&&w()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,w]),T.jsx(Zl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:y=>y.preventDefault(),onDismiss:w,children:T.jsxs(wm,{"data-state":h.stateAttribute,...g,...p,ref:l,style:{...p.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:[T.jsx(MS,{children:a}),T.jsx(OS,{scope:i,isInside:!0,children:T.jsx(oS,{id:h.contentId,role:"tooltip",children:c||a})})]})})});tv.displayName=Rr;var rv="TooltipArrow",LS=v.forwardRef((r,l)=>{const{__scopeTooltip:i,...a}=r,c=pi(i);return DS(rv,i).isInside?null:T.jsx(Sm,{...c,...a,ref:l})});LS.displayName=rv;function FS(r,l){const i=Math.abs(l.top-r.y),a=Math.abs(l.bottom-r.y),c=Math.abs(l.right-r.x),f=Math.abs(l.left-r.x);switch(Math.min(i,a,c,f)){case f:return"left";case c:return"right";case i:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function jS(r,l,i=5){const a=[];switch(l){case"top":a.push({x:r.x-i,y:r.y+i},{x:r.x+i,y:r.y+i});break;case"bottom":a.push({x:r.x-i,y:r.y-i},{x:r.x+i,y:r.y-i});break;case"left":a.push({x:r.x+i,y:r.y-i},{x:r.x+i,y:r.y+i});break;case"right":a.push({x:r.x-i,y:r.y-i},{x:r.x-i,y:r.y+i});break}return a}function zS(r){const{top:l,right:i,bottom:a,left:c}=r;return[{x:c,y:l},{x:i,y:l},{x:i,y:a},{x:c,y:a}]}function BS(r,l){const{x:i,y:a}=r;let c=!1;for(let f=0,d=l.length-1;fa!=P>a&&i<(y-g)*(a-w)/(P-w)+g&&(c=!c)}return c}function VS(r){const l=r.slice();return l.sort((i,a)=>i.xa.x?1:i.ya.y?1:0),$S(l)}function $S(r){if(r.length<=1)return r.slice();const l=[];for(let a=0;a=2;){const f=l[l.length-1],d=l[l.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))l.pop();else break}l.push(c)}l.pop();const i=[];for(let a=r.length-1;a>=0;a--){const c=r[a];for(;i.length>=2;){const f=i[i.length-1],d=i[i.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))i.pop();else break}i.push(c)}return i.pop(),l.length===1&&i.length===1&&l[0].x===i[0].x&&l[0].y===i[0].y?l:l.concat(i)}var tC=Jm,nC=qm,rC=ev,oC=tv,vi="Checkbox",[HS,lC]=yt(vi),[US,cu]=HS(vi);function WS(r){const{__scopeCheckbox:l,checked:i,children:a,defaultChecked:c,disabled:f,form:d,name:p,onCheckedChange:h,required:g,value:w="on",internal_do_not_use_render:y}=r,[P,k]=Nt({prop:i,defaultProp:c??!1,onChange:h,caller:vi}),[A,S]=v.useState(null),[C,N]=v.useState(null),_=v.useRef(!1),D=A?!!d||!!A.closest("form"):!0,L={checked:P,disabled:f,setChecked:k,control:A,setControl:S,name:p,form:d,value:w,hasConsumerStoppedPropagationRef:_,required:g,defaultChecked:xn(c)?!1:c,isFormControl:D,bubbleInput:C,setBubbleInput:N};return T.jsx(US,{scope:l,...L,children:GS(y)?y(L):a})}var ov="CheckboxTrigger",lv=v.forwardRef(({__scopeCheckbox:r,onKeyDown:l,onClick:i,...a},c)=>{const{control:f,value:d,disabled:p,checked:h,required:g,setControl:w,setChecked:y,hasConsumerStoppedPropagationRef:P,isFormControl:k,bubbleInput:A}=cu(ov,r),S=pe(c,w),C=v.useRef(h);return v.useEffect(()=>{const N=f?.form;if(N){const _=()=>y(C.current);return N.addEventListener("reset",_),()=>N.removeEventListener("reset",_)}},[f,y]),T.jsx(oe.button,{type:"button",role:"checkbox","aria-checked":xn(h)?"mixed":h,"aria-required":g,"data-state":uv(h),"data-disabled":p?"":void 0,disabled:p,value:d,...a,ref:S,onKeyDown:re(l,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:re(i,N=>{y(_=>xn(_)?!0:!_),A&&k&&(P.current=N.isPropagationStopped(),P.current||N.stopPropagation())})})});lv.displayName=ov;var bS=v.forwardRef((r,l)=>{const{__scopeCheckbox:i,name:a,checked:c,defaultChecked:f,required:d,disabled:p,value:h,onCheckedChange:g,form:w,...y}=r;return T.jsx(WS,{__scopeCheckbox:i,checked:c,defaultChecked:f,disabled:p,required:d,onCheckedChange:g,name:a,form:w,value:h,internal_do_not_use_render:({isFormControl:P})=>T.jsxs(T.Fragment,{children:[T.jsx(lv,{...y,ref:l,__scopeCheckbox:i}),P&&T.jsx(av,{__scopeCheckbox:i})]})})});bS.displayName=vi;var iv="CheckboxIndicator",KS=v.forwardRef((r,l)=>{const{__scopeCheckbox:i,forceMount:a,...c}=r,f=cu(iv,i);return T.jsx(kn,{present:a||xn(f.checked)||f.checked===!0,children:T.jsx(oe.span,{"data-state":uv(f.checked),"data-disabled":f.disabled?"":void 0,...c,ref:l,style:{pointerEvents:"none",...r.style}})})});KS.displayName=iv;var sv="CheckboxBubbleInput",av=v.forwardRef(({__scopeCheckbox:r,...l},i)=>{const{control:a,hasConsumerStoppedPropagationRef:c,checked:f,defaultChecked:d,required:p,disabled:h,name:g,value:w,form:y,bubbleInput:P,setBubbleInput:k}=cu(sv,r),A=pe(i,k),S=su(f),C=ou(a);v.useEffect(()=>{const _=P;if(!_)return;const D=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(D,"checked").set,b=!c.current;if(S!==f&&j){const V=new Event("click",{bubbles:b});_.indeterminate=xn(f),j.call(_,xn(f)?!1:f),_.dispatchEvent(V)}},[P,S,f,c]);const N=v.useRef(xn(f)?!1:f);return T.jsx(oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??N.current,required:p,disabled:h,name:g,value:w,form:y,...l,tabIndex:-1,ref:A,style:{...l.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});av.displayName=sv;function GS(r){return typeof r=="function"}function xn(r){return r==="indeterminate"}function uv(r){return xn(r)?"indeterminate":r?"checked":"unchecked"}var cv=["PageUp","PageDown"],fv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dv={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ir="Slider",[Ma,QS,YS]=ei(Ir),[pv,iC]=yt(Ir,[YS]),[XS,hi]=pv(Ir),mv=v.forwardRef((r,l)=>{const{name:i,min:a=0,max:c=100,step:f=1,orientation:d="horizontal",disabled:p=!1,minStepsBetweenThumbs:h=0,defaultValue:g=[a],value:w,onValueChange:y=()=>{},onValueCommit:P=()=>{},inverted:k=!1,form:A,...S}=r,C=v.useRef(new Set),N=v.useRef(0),D=d==="horizontal"?ZS:JS,[L=[],j]=Nt({prop:w,defaultProp:g,onChange:ne=>{[...C.current][N.current]?.focus(),y(ne)}}),b=v.useRef(L);function V(ne){const ue=rx(L,ne);ie(ne,ue)}function G(ne){ie(ne,N.current)}function fe(){const ne=b.current[N.current];L[N.current]!==ne&&P(L)}function ie(ne,ue,{commit:se}={commit:!1}){const ce=sx(f),de=ax(Math.round((ne-a)/f)*f+a,ce),Z=bl(de,[a,c]);j((ae=[])=>{const F=tx(ae,Z,ue);if(ix(F,h*f)){N.current=F.indexOf(Z);const W=String(F)!==String(ae);return W&&se&&P(F),W?F:ae}else return ae})}return T.jsx(XS,{scope:r.__scopeSlider,name:i,disabled:p,min:a,max:c,valueIndexToChangeRef:N,thumbs:C.current,values:L,orientation:d,form:A,children:T.jsx(Ma.Provider,{scope:r.__scopeSlider,children:T.jsx(Ma.Slot,{scope:r.__scopeSlider,children:T.jsx(D,{"aria-disabled":p,"data-disabled":p?"":void 0,...S,ref:l,onPointerDown:re(S.onPointerDown,()=>{p||(b.current=L)}),min:a,max:c,inverted:k,onSlideStart:p?void 0:V,onSlideMove:p?void 0:G,onSlideEnd:p?void 0:fe,onHomeKeyDown:()=>!p&&ie(a,0,{commit:!0}),onEndKeyDown:()=>!p&&ie(c,L.length-1,{commit:!0}),onStepKeyDown:({event:ne,direction:ue})=>{if(!p){const de=cv.includes(ne.key)||ne.shiftKey&&fv.includes(ne.key)?10:1,Z=N.current,ae=L[Z],F=f*de*ue;ie(ae+F,Z,{commit:!0})}}})})})})});mv.displayName=Ir;var[vv,hv]=pv(Ir,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ZS=v.forwardRef((r,l)=>{const{min:i,max:a,dir:c,inverted:f,onSlideStart:d,onSlideMove:p,onSlideEnd:h,onStepKeyDown:g,...w}=r,[y,P]=v.useState(null),k=pe(l,D=>P(D)),A=v.useRef(void 0),S=Co(c),C=S==="ltr",N=C&&!f||!C&&f;function _(D){const L=A.current||y.getBoundingClientRect(),j=[0,L.width],V=fu(j,N?[i,a]:[a,i]);return A.current=L,V(D-L.left)}return T.jsx(vv,{scope:r.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:T.jsx(gv,{dir:S,"data-orientation":"horizontal",...w,ref:k,style:{...w.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:D=>{const L=_(D.clientX);d?.(L)},onSlideMove:D=>{const L=_(D.clientX);p?.(L)},onSlideEnd:()=>{A.current=void 0,h?.()},onStepKeyDown:D=>{const j=dv[N?"from-left":"from-right"].includes(D.key);g?.({event:D,direction:j?-1:1})}})})}),JS=v.forwardRef((r,l)=>{const{min:i,max:a,inverted:c,onSlideStart:f,onSlideMove:d,onSlideEnd:p,onStepKeyDown:h,...g}=r,w=v.useRef(null),y=pe(l,w),P=v.useRef(void 0),k=!c;function A(S){const C=P.current||w.current.getBoundingClientRect(),N=[0,C.height],D=fu(N,k?[a,i]:[i,a]);return P.current=C,D(S-C.top)}return T.jsx(vv,{scope:r.__scopeSlider,startEdge:k?"bottom":"top",endEdge:k?"top":"bottom",size:"height",direction:k?1:-1,children:T.jsx(gv,{"data-orientation":"vertical",...g,ref:y,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const C=A(S.clientY);f?.(C)},onSlideMove:S=>{const C=A(S.clientY);d?.(C)},onSlideEnd:()=>{P.current=void 0,p?.()},onStepKeyDown:S=>{const N=dv[k?"from-bottom":"from-top"].includes(S.key);h?.({event:S,direction:N?-1:1})}})})}),gv=v.forwardRef((r,l)=>{const{__scopeSlider:i,onSlideStart:a,onSlideMove:c,onSlideEnd:f,onHomeKeyDown:d,onEndKeyDown:p,onStepKeyDown:h,...g}=r,w=hi(Ir,i);return T.jsx(oe.span,{...g,ref:l,onKeyDown:re(r.onKeyDown,y=>{y.key==="Home"?(d(y),y.preventDefault()):y.key==="End"?(p(y),y.preventDefault()):cv.concat(fv).includes(y.key)&&(h(y),y.preventDefault())}),onPointerDown:re(r.onPointerDown,y=>{const P=y.target;P.setPointerCapture(y.pointerId),y.preventDefault(),w.thumbs.has(P)?P.focus():a(y)}),onPointerMove:re(r.onPointerMove,y=>{y.target.hasPointerCapture(y.pointerId)&&c(y)}),onPointerUp:re(r.onPointerUp,y=>{const P=y.target;P.hasPointerCapture(y.pointerId)&&(P.releasePointerCapture(y.pointerId),f(y))})})}),yv="SliderTrack",wv=v.forwardRef((r,l)=>{const{__scopeSlider:i,...a}=r,c=hi(yv,i);return T.jsx(oe.span,{"data-disabled":c.disabled?"":void 0,"data-orientation":c.orientation,...a,ref:l})});wv.displayName=yv;var La="SliderRange",Sv=v.forwardRef((r,l)=>{const{__scopeSlider:i,...a}=r,c=hi(La,i),f=hv(La,i),d=v.useRef(null),p=pe(l,d),h=c.values.length,g=c.values.map(P=>Ev(P,c.min,c.max)),w=h>1?Math.min(...g):0,y=100-Math.max(...g);return T.jsx(oe.span,{"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,...a,ref:p,style:{...r.style,[f.startEdge]:w+"%",[f.endEdge]:y+"%"}})});Sv.displayName=La;var Fa="SliderThumb",xv=v.forwardRef((r,l)=>{const i=QS(r.__scopeSlider),[a,c]=v.useState(null),f=pe(l,p=>c(p)),d=v.useMemo(()=>a?i().findIndex(p=>p.ref.current===a):-1,[i,a]);return T.jsx(qS,{...r,ref:f,index:d})}),qS=v.forwardRef((r,l)=>{const{__scopeSlider:i,index:a,name:c,...f}=r,d=hi(Fa,i),p=hv(Fa,i),[h,g]=v.useState(null),w=pe(l,_=>g(_)),y=h?d.form||!!h.closest("form"):!0,P=ou(h),k=d.values[a],A=k===void 0?0:Ev(k,d.min,d.max),S=nx(a,d.values.length),C=P?.[p.size],N=C?ox(C,A,p.direction):0;return v.useEffect(()=>{if(h)return d.thumbs.add(h),()=>{d.thumbs.delete(h)}},[h,d.thumbs]),T.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[p.startEdge]:`calc(${A}% + ${N}px)`},children:[T.jsx(Ma.ItemSlot,{scope:r.__scopeSlider,children:T.jsx(oe.span,{role:"slider","aria-label":r["aria-label"]||S,"aria-valuemin":d.min,"aria-valuenow":k,"aria-valuemax":d.max,"aria-orientation":d.orientation,"data-orientation":d.orientation,"data-disabled":d.disabled?"":void 0,tabIndex:d.disabled?void 0:0,...f,ref:w,style:k===void 0?{display:"none"}:r.style,onFocus:re(r.onFocus,()=>{d.valueIndexToChangeRef.current=a})})}),y&&T.jsx(Cv,{name:c??(d.name?d.name+(d.values.length>1?"[]":""):void 0),form:d.form,value:k},a)]})});xv.displayName=Fa;var ex="RadioBubbleInput",Cv=v.forwardRef(({__scopeSlider:r,value:l,...i},a)=>{const c=v.useRef(null),f=pe(c,a),d=su(l);return v.useEffect(()=>{const p=c.current;if(!p)return;const h=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&w){const y=new Event("input",{bubbles:!0});w.call(p,l),p.dispatchEvent(y)}},[d,l]),T.jsx(oe.input,{style:{display:"none"},...i,ref:f,defaultValue:l})});Cv.displayName=ex;function tx(r=[],l,i){const a=[...r];return a[i]=l,a.sort((c,f)=>c-f)}function Ev(r,l,i){const f=100/(i-l)*(r-l);return bl(f,[0,100])}function nx(r,l){return l>2?`Value ${r+1} of ${l}`:l===2?["Minimum","Maximum"][r]:void 0}function rx(r,l){if(r.length===1)return 0;const i=r.map(c=>Math.abs(c-l)),a=Math.min(...i);return i.indexOf(a)}function ox(r,l,i){const a=r/2,f=fu([0,50],[0,a]);return(a-f(l)*i)*i}function lx(r){return r.slice(0,-1).map((l,i)=>r[i+1]-l)}function ix(r,l){if(l>0){const i=lx(r);return Math.min(...i)>=l}return!0}function fu(r,l){return i=>{if(r[0]===r[1]||l[0]===l[1])return l[0];const a=(l[1]-l[0])/(r[1]-r[0]);return l[0]+a*(i-r[0])}}function sx(r){return(String(r).split(".")[1]||"").length}function ax(r,l){const i=Math.pow(10,l);return Math.round(r*i)/i}var sC=mv,aC=wv,uC=Sv,cC=xv;export{tC as A,nC as B,Cx as C,Px as D,rC as E,oC as F,bS as G,Nx as H,vx as I,KS as J,sC as K,Lx as L,aC as M,uC as N,xx as O,Sx as P,cC as Q,dx as R,fx as S,Ex as T,kg as U,$x as V,mx as a,kx as b,yx as c,wx as d,_x as e,Ix as f,Ax as g,Tx as h,Ox as i,Mx as j,Fx as k,jx as l,Bx as m,Vx as n,Hx as o,Ux as p,Wx as q,xo as r,bx as s,Gx as t,Yx as u,Qx as v,Xx as w,Zx as x,Kx as y,Jx as z};