@wellesley/ui 1.0.417 → 1.0.419

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -66,4 +66,4 @@ import*as P from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import be,{forw
66
66
  *
67
67
  * This source code is licensed under the MIT license found in the
68
68
  * LICENSE file in the root directory of this source tree.
69
- */function A4(){if(DC)return Nt;DC=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=i,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return h(e)===l},Nt.isContextProvider=function(e){return h(e)===i},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return h(e)===s},Nt.isFragment=function(e){return h(e)===r},Nt.isLazy=function(e){return h(e)===p},Nt.isMemo=function(e){return h(e)===f},Nt.isPortal=function(e){return h(e)===n},Nt.isProfiler=function(e){return h(e)===a},Nt.isStrictMode=function(e){return h(e)===o},Nt.isSuspense=function(e){return h(e)===c},Nt.isSuspenseList=function(e){return h(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=h,Nt}function N4(){return IC||(IC=1,fy.exports=A4()),fy.exports}function FO(){if(kC)return dy;kC=1;var e=na(),t=ho();return dy=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function D4(){if(MC)return py;MC=1;var e=FO();return py=function(t){return e(t)&&t!=+t}}N4();var I4=D4();const k4=Ao(I4);var M4=FO();const L4=Ao(M4);var sv=function(e){return LO(e)&&e.indexOf("%")===e.length-1},Uo=function(e){return L4(e)&&!k4(e)},Pv=function(e){return Uo(e)||LO(e)};function sw(e){return(sw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j4=["viewBox","children"],F4=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],LC=["points","pathLength"],hy={svg:j4,polygon:LC,polyline:LC},BO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],B4=function(e,t,n){return function(r){return e(t,n,r),null}},q4=function(e,t,n){if(!jO(e)||"object"!==sw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];BO.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=B4(a,t,n))})),r},z4=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},W4=function(e,t,n,r){var o,a=null!==(o=null==hy?void 0:hy[r])&&void 0!==o?o:[];return!Ev(e)&&(r&&a.includes(t)||F4.includes(t))||BO.includes(t)},qO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(fo(e)&&(r=e.props),!jO(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;W4(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},U4=["children","width","height","viewBox","className","style","title","desc"];function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lw.apply(this,arguments)}function H4(e,t){if(null==e)return{};var n,r,o=V4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function V4(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G4(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,u=e.desc,s=H4(e,U4),c=o||{width:n,height:r,x:0,y:0},d=es("recharts-surface",a);return be.createElement("svg",lw({},qO(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),be.createElement("title",null,l),be.createElement("desc",null,u),t)}var vy,jC,my,FC,gy,BC,yy,qC,by,zC,xy,WC,wy,UC,_y,HC,_v=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function K4(){if(jC)return vy;return jC=1,vy=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}}function Y4(){if(FC)return my;FC=1;var e=K4();return my=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function zO(){if(BC)return gy;BC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return gy=function(t){return e.test(t)}}function X4(){if(qC)return yy;return qC=1,yy=function(e){return e.split("")}}function Q4(){if(zC)return by;zC=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return by=function(e){return e.match(d)||[]}}function Z4(){if(WC)return xy;WC=1;var e=X4(),t=zO(),n=Q4();return xy=function(r){return t(r)?n(r):e(r)}}function J4(){if(UC)return wy;UC=1;var e=Y4(),t=zO(),n=Z4(),r=d_();return wy=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),u=i?e(i,1).join(""):a.slice(1);return l[o]()+u}}}function e9(){if(HC)return _y;HC=1;var e=J4()("toUpperCase");return _y=e}var t9=e9();const WO=Ao(t9);function lv(e){return function(){return e}}const UO=Math.cos,Rv=Math.sin,Yo=Math.sqrt,Tv=Math.PI,cm=2*Tv,cw=Math.PI,uw=2*cw,sl=1e-6,n9=uw-sl;function HO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function r9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HO;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class o9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?HO:r9(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,l=n-e,u=r-t,s=a-e,c=i-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>sl)if(Math.abs(c*l-u*s)>sl&&o){let f=n-a,p=r-i,m=l*l+u*u,h=f*f+p*p,v=Math.sqrt(m),g=Math.sqrt(d),y=o*Math.tan((cw-Math.acos((m+d-h)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>sl&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),l=n*Math.sin(r),u=e+i,s=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>sl||Math.abs(this._y1-s)>sl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%uw+uw),d>n9?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>sl&&this._append`A${n},${n},0,${+(d>=cw)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function i9(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new o9(t)}const h_={draw(e,t){const n=Yo(t/Tv);e.moveTo(n,0),e.arc(0,0,n,0,cm)}},a9={draw(e,t){const n=Yo(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},VO=Yo(1/3),s9=2*VO,l9={draw(e,t){const n=Yo(t/s9),r=n*VO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},c9={draw(e,t){const n=Yo(t),r=-n/2;e.rect(r,r,n,n)}},u9=.8908130915292852,GO=Rv(Tv/10)/Rv(7*Tv/10),f9=Rv(cm/10)*GO,d9=-UO(cm/10)*GO,p9={draw(e,t){const n=Yo(t*u9),r=f9*n,o=d9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=cm*t/5,i=UO(a),l=Rv(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},$y=Yo(3),h9={draw(e,t){const n=-Yo(t/(3*$y));e.moveTo(0,2*n),e.lineTo(-$y*n,-n),e.lineTo($y*n,-n),e.closePath()}},Po=-.5,Ro=Yo(3)/2,fw=1/Yo(12),v9=3*(fw/2+1),m9={draw(e,t){const n=Yo(t/v9),r=n/2,o=n*fw,a=r,i=n*fw+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(Po*r-Ro*o,Ro*r+Po*o),e.lineTo(Po*a-Ro*i,Ro*a+Po*i),e.lineTo(Po*l-Ro*u,Ro*l+Po*u),e.lineTo(Po*r+Ro*o,Po*o-Ro*r),e.lineTo(Po*a+Ro*i,Po*i-Ro*a),e.lineTo(Po*l+Ro*u,Po*u-Ro*l),e.closePath()}};function g9(e,t){let n=null,r=i9(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:lv(e||h_),t="function"==typeof t?t:lv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:lv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:lv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Pd(e){return(Pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var y9=["type","size","sizeType"];function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dw.apply(this,arguments)}function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VC(Object(n),!0).forEach((function(t){b9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b9(e,t,n){return(t=x9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x9(e){var t=w9(e,"string");return"symbol"==Pd(t)?t:t+""}function w9(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _9(e,t){if(null==e)return{};var n,r,o=$9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KO={symbolCircle:h_,symbolCross:a9,symbolDiamond:l9,symbolSquare:c9,symbolStar:p9,symbolTriangle:h9,symbolWye:m9},S9=Math.PI/180,C9=function(e){var t="symbol".concat(WO(e));return KO[t]||h_},E9=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*S9;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},P9=function(e,t){KO["symbol".concat(WO(e))]=t},YO=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,i=e.sizeType,l=void 0===i?"area":i,u=GC(GC({},_9(e,y9)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=qO(u,!0);return c===+c&&d===+d&&a===+a?be.createElement("path",dw({},f,{className:es("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=C9(r),g9().type(t).size(E9(a,l,r))())})):null};function Qc(e){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pw.apply(this,arguments)}function KC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KC(Object(n),!0).forEach((function(t){Rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QO(r.key),r)}}function A9(e,t,n){return O9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N9(e,t,n){return t=Ov(t),D9(e,XO()?Reflect.construct(t,n||[],Ov(e).constructor):t.apply(e,n))}function D9(e,t){if(t&&("object"===Qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I9(e)}function I9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(XO=function(){return!!e})()}function Ov(e){return(Ov=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hw(e,t)}function hw(e,t){return(hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e,t,n){return(t=QO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QO(e){var t=M9(e,"string");return"symbol"==Qc(t)?t:t+""}function M9(e,t){if("object"!=Qc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}YO.registerSymbol=P9;var Sy,YC,Cy,XC,Ey,QC,Py,ZC,Ry,JC,Ty,eE,Oy,tE,Ay,nE,Ny,rE,Dy,oE,Iy,iE,ky,aE,My,sE,Ly,lE,jy,cE,Fy,uE,By,fE,qy,dE,zy,pE,Wy,hE,Uy,vE,Hy,mE,Vy,gE,Gy,yE,To=32,v_=function(){function e(){return T9(this,e),N9(this,e,arguments)}return k9(e,Yv),A9(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=To/2,r=To/6,o=To/3,a=e.inactive?t:e.color;if("plainline"===e.type)return be.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:To,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return be.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(To,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return be.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(To/8,"h").concat(To,"v").concat(3*To/4,"h").concat(-To,"z"),className:"recharts-legend-icon"});if(be.isValidElement(e.legendIcon)){var i=R9({},e);return delete i.legendIcon,be.cloneElement(e.legendIcon,i)}return be.createElement(YO,{fill:a,cx:n,cy:n,size:To,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,a=t.formatter,i=t.inactiveColor,l={x:0,y:0,width:To,height:To},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=es(Rd(Rd({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Ev(t.value)?null:t.value;_v(!Ev(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?i:t.color;return be.createElement("li",pw({className:c,style:u,key:"legend-item-".concat(n)},q4(e.props,t,n)),be.createElement(G4,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),be.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return be.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function L9(){if(YC)return Sy;YC=1;var e=sm();return Sy=function(){this.__data__=new e,this.size=0}}function j9(){if(XC)return Cy;return XC=1,Cy=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function F9(){if(QC)return Ey;return QC=1,Ey=function(e){return this.__data__.get(e)}}function B9(){if(ZC)return Py;return ZC=1,Py=function(e){return this.__data__.has(e)}}function q9(){if(JC)return Ry;JC=1;var e=sm(),t=c_(),n=u_();return Ry=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function m_(){if(eE)return Ty;eE=1;var e=sm(),t=L9(),n=j9(),r=F9(),o=B9(),a=q9();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,Ty=i}function z9(){if(tE)return Oy;tE=1;return Oy=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function W9(){if(nE)return Ay;return nE=1,Ay=function(e){return this.__data__.has(e)}}function ZO(){if(rE)return Ny;rE=1;var e=u_(),t=z9(),n=W9();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Ny=r}function U9(){if(oE)return Dy;return oE=1,Dy=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function JO(){if(iE)return Iy;return iE=1,Iy=function(e,t){return e.has(t)}}function eA(){if(aE)return ky;aE=1;var e=ZO(),t=U9(),n=JO();return ky=function(r,o,a,i,l,u){var s=1&a,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=s?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,a,i,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function tA(){if(sE)return My;sE=1;var e=Rr().Uint8Array;return My=e}function H9(){if(lE)return Ly;return lE=1,Ly=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function g_(){if(cE)return jy;return cE=1,jy=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function V9(){if(uE)return Fy;uE=1;var e=cu(),t=tA(),n=im(),r=eA(),o=H9(),a=g_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Fy=function(e,i,u,s,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var m=1&s;if(p||(p=a),e.size!=i.size&&!m)return!1;var h=f.get(e);if(h)return h==i;s|=2,f.set(e,i);var v=r(p(e),p(i),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function y_(){if(fE)return By;return fE=1,By=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function nA(){if(dE)return qy;dE=1;var e=y_(),t=Pr();return qy=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function G9(){if(pE)return zy;return pE=1,zy=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function rA(){if(hE)return Wy;return hE=1,Wy=function(){return[]}}function b_(){if(vE)return Uy;vE=1;var e=G9(),t=rA(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Uy=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function K9(){if(mE)return Hy;return mE=1,Hy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function Y9(){if(gE)return Vy;gE=1;var e=na(),t=ho();return Vy=function(n){return t(n)&&"[object Arguments]"==e(n)}}function x_(){if(yE)return Gy;yE=1;var e=Y9(),t=ho(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return Gy=a}Rd(v_,"displayName","Legend"),Rd(v_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Ky,bE,xE,Yy,wE,Xy,_E,Qy,$E,Zy,SE,gd={exports:{}};function X9(){if(bE)return Ky;return bE=1,Ky=function(){return!1}}function w_(){return xE||(xE=1,e=gd,t=gd.exports,n=Rr(),r=X9(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r,e.exports=l),gd.exports;var e,t,n,r,o,a,i,l}function um(){if(wE)return Yy;wE=1;var e=/^(?:0|[1-9]\d*)$/;return Yy=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function __(){if(_E)return Xy;_E=1;return Xy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function Q9(){if($E)return Qy;$E=1;var e=na(),t=__(),n=ho(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Qy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function fm(){if(SE)return Zy;return SE=1,Zy=function(e){return function(t){return e(t)}}}gd.exports;var CE,Jy,EE,eb,PE,tb,RE,nb,TE,rb,OE,ob,AE,ib,NE,ab,DE,sb,IE,lb,kE,cb,ME,ub,LE,fb,jE,db,FE,pb,BE,hb,qE,vb,zE,mb,WE,gb,UE,yb,HE,bb,VE,xb,GE,wb,KE,_b,YE,$b,XE,Sb,QE,Cb,ZE,Eb,JE,Pb,eP,Rb,tP,Tb,nP,Ob,rP,Ab,oP,Nb,iP,Db,aP,Ib,sP,kb,lP,Mb,cP,Lb,uP,jb,fP,Fb,dP,yd={exports:{}};function $_(){return CE||(CE=1,e=yd,t=yd.exports,n=NO(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),yd.exports;var e,t,n,r,o,a,i}function oA(){if(EE)return Jy;EE=1;var e=Q9(),t=fm(),n=$_(),r=n&&n.isTypedArray,o=r?t(r):e;return Jy=o}function iA(){if(PE)return eb;PE=1;var e=K9(),t=x_(),n=Pr(),r=w_(),o=um(),a=oA(),i=Object.prototype.hasOwnProperty;return eb=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&a(l),p=s||c||d||f,m=p?e(l.length,String):[],h=m.length;for(var v in l)(u||i.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,h)))&&m.push(v);return m}}function S_(){if(RE)return tb;RE=1;var e=Object.prototype;return tb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function aA(){if(TE)return nb;return TE=1,nb=function(e,t){return function(n){return e(t(n))}}}function Z9(){if(OE)return rb;OE=1;var e=aA()(Object.keys,Object);return rb=e}function sA(){if(AE)return ob;AE=1;var e=S_(),t=Z9(),n=Object.prototype.hasOwnProperty;return ob=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function Gd(){if(NE)return ib;NE=1;var e=rm(),t=__();return ib=function(n){return null!=n&&t(n.length)&&!e(n)}}function Kd(){if(DE)return ab;DE=1;var e=iA(),t=sA(),n=Gd();return ab=function(r){return n(r)?e(r):t(r)}}function lA(){if(IE)return sb;IE=1;var e=nA(),t=b_(),n=Kd();return sb=function(r){return e(r,n,t)}}function J9(){if(kE)return lb;kE=1;var e=lA(),t=Object.prototype.hasOwnProperty;return lb=function(n,r,o,a,i,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),m=l.get(r);if(p&&m)return p==r&&m==n;var h=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,l):a(g,y,f,n,r,l);if(!(void 0===b?g===y||i(g,y,o,a,l):b)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(h=!1)}return l.delete(n),l.delete(r),h}}function eL(){if(ME)return cb;ME=1;var e=xl()(Rr(),"DataView");return cb=e}function tL(){if(LE)return ub;LE=1;var e=xl()(Rr(),"Promise");return ub=e}function cA(){if(jE)return fb;jE=1;var e=xl()(Rr(),"Set");return fb=e}function uA(){if(FE)return db;FE=1;var e=xl()(Rr(),"WeakMap");return db=e}function Yd(){if(BE)return pb;BE=1;var e=eL(),t=c_(),n=tL(),r=cA(),o=uA(),a=na(),i=DO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),h=i(r),v=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return l;case m:return u;case h:return s;case v:return c}return t}),pb=g}function nL(){if(qE)return hb;qE=1;var e=m_(),t=eA(),n=V9(),r=J9(),o=Yd(),a=Pr(),i=w_(),l=oA(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return hb=function(f,p,m,h,v,g){var y=a(f),b=a(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,P=(x=x==u?c:x)==c,k=w==x;if(k&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(k&&!_)return g||(g=new e),y||l(f)?t(f,p,m,h,v,g):n(f,p,w,m,h,v,g);if(!(1&m)){var S=_&&d.call(f,"__wrapped__"),C=P&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,m,h,g)}}return!!k&&(g||(g=new e),r(f,p,m,h,v,g))}}function fA(){if(zE)return vb;zE=1;var e=nL(),t=ho();return vb=function n(r,o,a,i,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,l))},vb}function rL(){if(WE)return mb;WE=1;var e=m_(),t=fA();return mb=function(n,r,o,a){var i=o.length,l=i,u=!a;if(null==n)return!l;for(n=Object(n);i--;){var s=o[i];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<l;){var c=(s=o[i])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function dA(){if(UE)return gb;UE=1;var e=Do();return gb=function(t){return t==t&&!e(t)}}function oL(){if(HE)return yb;HE=1;var e=dA(),t=Kd();return yb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function pA(){if(VE)return bb;return VE=1,bb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function iL(){if(GE)return xb;GE=1;var e=rL(),t=oL(),n=pA();return xb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function aL(){if(KE)return wb;return KE=1,wb=function(e,t){return null!=e&&t in Object(e)}}function sL(){if(YE)return _b;YE=1;var e=kO(),t=x_(),n=Pr(),r=um(),o=__(),a=Vd();return _b=function(i,l,u){for(var s=-1,c=(l=e(l,i)).length,d=!1;++s<c;){var f=a(l[s]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++s!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function lL(){if(XE)return $b;XE=1;var e=aL(),t=sL();return $b=function(n,r){return null!=n&&t(n,r,e)}}function cL(){if(QE)return Sb;QE=1;var e=fA(),t=MO(),n=lL(),r=l_(),o=dA(),a=pA(),i=Vd();return Sb=function(l,u){return r(l)&&o(u)?a(i(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Xd(){if(ZE)return Cb;return ZE=1,Cb=function(e){return e}}function uL(){if(JE)return Eb;return JE=1,Eb=function(e){return function(t){return null==t?void 0:t[e]}}}function fL(){if(eP)return Pb;eP=1;var e=p_();return Pb=function(t){return function(n){return e(n,t)}}}function dL(){if(tP)return Rb;tP=1;var e=uL(),t=fL(),n=l_(),r=Vd();return Rb=function(o){return n(o)?e(r(o)):t(o)}}function C_(){if(nP)return Tb;nP=1;var e=iL(),t=cL(),n=Xd(),r=Pr(),o=dL();return Tb=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function pL(){if(rP)return Ob;return rP=1,Ob=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function hL(){if(oP)return Ab;return oP=1,Ab=function(e){return e!=e}}function vL(){if(iP)return Nb;return iP=1,Nb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function mL(){if(aP)return Db;aP=1;var e=pL(),t=hL(),n=vL();return Db=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function hA(){if(sP)return Ib;sP=1;var e=mL();return Ib=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function gL(){if(lP)return kb;return lP=1,kb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function vA(){if(cP)return Mb;return cP=1,Mb=function(){}}function yL(){if(uP)return Lb;uP=1;var e=cA(),t=vA(),n=g_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Lb=r}function bL(){if(fP)return jb;fP=1;var e=ZO(),t=hA(),n=gL(),r=JO(),o=yL(),a=g_();return jb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],m=p;if(u)f=!1,c=n;else if(d>=200){var h=l?null:o(i);if(h)return a(h);f=!1,c=r,m=new e}else m=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=m.length;y--;)if(m[y]===g)continue e;l&&m.push(g),p.push(v)}else c(m,g,u)||(m!==p&&m.push(g),p.push(v))}return p}}function xL(){if(dP)return Fb;dP=1;var e=C_(),t=bL();return Fb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}yd.exports;var wL=xL();const pP=Ao(wL);function mA(e,t,n){return!0===t?pP(e,n):Ev(t)?pP(e,t):e}function Zc(e){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _L=["ref"];function hP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hP(Object(n),!0).forEach((function(t){dm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yA(r.key),r)}}function SL(e,t,n){return vP(e.prototype,t),vP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CL(e,t,n){return t=Av(t),EL(e,gA()?Reflect.construct(t,n,Av(e).constructor):t.apply(e,n))}function EL(e,t){if(t&&("object"===Zc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return PL(e)}function PL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gA=function(){return!!e})()}function Av(e){return(Av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function RL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vw(e,t)}function vw(e,t){return(vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dm(e,t,n){return(t=yA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yA(e){var t=TL(e,"string");return"symbol"==Zc(t)?t:t+""}function TL(e,t){if("object"!=Zc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function OL(e,t){if(null==e)return{};var n,r,o=AL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AL(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NL(e){return e.value}function DL(e,t){if(be.isValidElement(e))return be.cloneElement(e,t);if("function"==typeof e)return be.createElement(e,t);t.ref;var n=OL(t,_L);return be.createElement(v_,n)}var Bb,gP,qb,yP,zb,bP,Wb,xP,Ub,wP,Hb,_P,Vb,$P,Gb,SP,Kb,CP,Yb,EP,Xb,PP,Qb,RP,Zb,TP,Jb,OP,e1,AP,t1,NP,n1,DP,r1,IP,o1,kP,i1,MP,a1,LP,s1,jP,mP=1,E_=function(){function e(){var t;$L(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return dm(t=CL(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return RL(e,Yv),SL(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>mP||Math.abs(t.height-this.lastBoundingBox.height)>mP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,l=r.margin,u=r.chartWidth,s=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===a&&"vertical"===o){t={left:((u||0)-this.getBBoxSnapshot().width)/2}}else t="right"===a?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===i){n={top:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Gi(Gi({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,l=t.payload,u=Gi(Gi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return be.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},DL(n,Gi(Gi({},this.props),{},{payload:mA(l,i,NL)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Gi(Gi({},this.defaultProps),e.props).layout;return"vertical"===n&&Uo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function IL(){if(gP)return Bb;gP=1;var e=cu(),t=x_(),n=Pr(),r=e?e.isConcatSpreadable:void 0;return Bb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function bA(){if(yP)return qb;yP=1;var e=y_(),t=IL();return qb=function n(r,o,a,i,l){var u=-1,s=r.length;for(a||(a=t),l||(l=[]);++u<s;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},qb}function kL(){if(bP)return zb;return bP=1,zb=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var u=i[e?l:++o];if(!1===n(a[u],u,a))break}return t}}}function ML(){if(xP)return Wb;xP=1;var e=kL()();return Wb=e}function LL(){if(wP)return Ub;wP=1;var e=ML(),t=Kd();return Ub=function(n,r){return n&&e(n,r,t)}}function jL(){if(_P)return Hb;_P=1;var e=Gd();return Hb=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var a=r.length,i=n?a:-1,l=Object(r);(n?i--:++i<a)&&!1!==o(l[i],i,l););return r}}}function FL(){if($P)return Vb;$P=1;var e=LL(),t=jL()(e);return Vb=t}function BL(){if(SP)return Gb;SP=1;var e=FL(),t=Gd();return Gb=function(n,r){var o=-1,a=t(n)?Array(n.length):[];return e(n,(function(e,t,n){a[++o]=r(e,t,n)})),a}}function qL(){if(CP)return Kb;return CP=1,Kb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function zL(){if(EP)return Yb;EP=1;var e=uu();return Yb=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!i&&t>n||i&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||u&&r&&a||!l&&a||!s)return-1}return 0}}function WL(){if(PP)return Xb;PP=1;var e=zL();return Xb=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,u=r.length;++o<l;){var s=e(a[o],i[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function UL(){if(RP)return Qb;RP=1;var e=f_(),t=p_(),n=C_(),r=BL(),o=qL(),a=fm(),i=WL(),l=Xd(),u=Pr();return Qb=function(s,c,d){c=c.length?e(c,(function(e){return u(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,a(n));var p=r(s,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return i(e,t,d)}))}}function P_(){if(TP)return Zb;return TP=1,Zb=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function xA(){if(OP)return Jb;OP=1;var e=P_(),t=Math.max;return Jb=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,l=t(a.length-r,0),u=Array(l);++i<l;)u[i]=a[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=a[i];return s[r]=o(u),e(n,this,s)}},Jb}function HL(){if(AP)return e1;return AP=1,e1=function(e){return function(){return e}}}function wA(){if(NP)return t1;NP=1;var e=xl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return t1=t}function VL(){if(DP)return n1;DP=1;var e=HL(),t=wA(),n=Xd();return n1=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function _A(){if(IP)return r1;IP=1;var e=Date.now;return r1=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},r1}function R_(){if(kP)return o1;kP=1;var e=VL(),t=_A()(e);return o1=t}function GL(){if(MP)return i1;MP=1;var e=Xd(),t=xA(),n=R_();return i1=function(r,o){return n(t(r,o,e),r+"")}}function KL(){if(LP)return a1;LP=1;var e=im(),t=Gd(),n=um(),r=Do();return a1=function(o,a,i){if(!r(i))return!1;var l=typeof a;return!!("number"==l?t(i)&&n(a,i.length):"string"==l&&a in i)&&e(i[a],o)}}function YL(){if(jP)return s1;jP=1;var e=bA(),t=UL(),n=GL(),r=KL(),o=n((function(n,o){if(null==n)return[];var a=o.length;return a>1&&r(n,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return s1=o}dm(E_,"displayName","Legend"),dm(E_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var XL=YL();const QL=Ao(XL);function Td(e){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mw.apply(this,arguments)}function ZL(e,t){return nj(e)||tj(e,t)||ej(e,t)||JL()}function JL(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ej(e,t){if(e){if("string"==typeof e)return FP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FP(e,t)}}function FP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function nj(e){if(Array.isArray(e))return e}function BP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BP(Object(n),!0).forEach((function(t){rj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rj(e,t,n){return(t=oj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oj(e){var t=ij(e,"string");return"symbol"==Td(t)?t:t+""}function ij(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function aj(e){return Array.isArray(e)&&Pv(e[0])&&Pv(e[1])?e.join(" ~ "):e}var sj=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,a=e.itemStyle,i=void 0===a?{}:a,l=e.labelStyle,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=l1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=l1({margin:0},u),w=!E4(m),x=w?m:"",_=es("recharts-default-tooltip",f),P=es("recharts-tooltip-label",p);w&&h&&null!=s&&(x=h(m,s));var k=g?{role:"status","aria-live":"assertive"}:{};return be.createElement("div",mw({className:_,style:y},k),be.createElement("p",{className:P,style:b},be.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?QL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=l1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||aj,a=e.value,l=e.name,u=a,d=l;if(null!=u&&null!=d){var f=o(a,l,e,t,s);if(Array.isArray(f)){var p=ZL(f,2);u=p[0],d=p[1]}else u=f}return be.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Pv(d)?be.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Pv(d)?be.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,be.createElement("span",{className:"recharts-tooltip-item-value"},u),be.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return be.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Od(e){return(Od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cv(e,t,n){return(t=lj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lj(e){var t=cj(e,"string");return"symbol"==Od(t)?t:t+""}function cj(e,t){if("object"!=Od(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var dd="recharts-tooltip-wrapper",uj={visibility:"hidden"};function fj(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return es(dd,cv(cv(cv(cv({},"".concat(dd,"-right"),Uo(n)&&t&&Uo(t.x)&&n>=t.x),"".concat(dd,"-left"),Uo(n)&&t&&Uo(t.x)&&n<t.x),"".concat(dd,"-bottom"),Uo(r)&&t&&Uo(t.y)&&r>=t.y),"".concat(dd,"-top"),Uo(r)&&t&&Uo(t.y)&&r<t.y))}function qP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&Uo(a[r]))return a[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?i[r]?c:d:i[r]?c<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function dj(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function pj(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&a?t=dj({translateX:n=qP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=qP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=uj,{cssProperties:t,cssClasses:fj({translateX:n,translateY:r,coordinate:a})}}function Jc(e){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zP(Object(n),!0).forEach((function(t){yw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SA(r.key),r)}}function mj(e,t,n){return vj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gj(e,t,n){return t=Nv(t),yj(e,$A()?Reflect.construct(t,n,Nv(e).constructor):t.apply(e,n))}function yj(e,t){if(t&&("object"===Jc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bj(e)}function bj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($A=function(){return!!e})()}function Nv(e){return(Nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gw(e,t)}function gw(e,t){return(gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yw(e,t,n){return(t=SA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SA(e){var t=wj(e,"string");return"symbol"==Jc(t)?t:t+""}function wj(e,t){if("object"!=Jc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Jc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UP=1,_j=function(){function e(){var t;hj(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yw(t=gj(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),yw(t,"handleKeyDown",(function(e){var n,r,o,a;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(a=t.props.coordinate)||void 0===a?void 0:a.y)&&void 0!==o?o:0}})})),t}return xj(e,Yv),mj(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>UP||Math.abs(e.height-this.state.lastBoundingBox.height)>UP)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.children,l=t.coordinate,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,v=pj({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),g=v.cssClasses,y=v.cssProperties,b=WP(WP({transition:s&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},h);return be.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),$j=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},$v={isSsr:$j(),get:function(e){return $v[e]},set:function(e,t){if("string"==typeof e)$v[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){$v[t]=e[t]}))}}};function eu(e){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HP(Object(n),!0).forEach((function(t){T_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EA(r.key),r)}}function Ej(e,t,n){return Cj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pj(e,t,n){return t=Dv(t),Rj(e,CA()?Reflect.construct(t,n||[],Dv(e).constructor):t.apply(e,n))}function Rj(e,t){if(t&&("object"===eu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tj(e)}function Tj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(CA=function(){return!!e})()}function Dv(e){return(Dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}function bw(e,t){return(bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T_(e,t,n){return(t=EA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EA(e){var t=Aj(e,"string");return"symbol"==eu(t)?t:t+""}function Aj(e,t){if("object"!=eu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Nj(e){return e.dataKey}function Dj(e,t){return be.isValidElement(e)?be.cloneElement(e,t):"function"==typeof e?be.createElement(e,t):be.createElement(sj,t)}var c1,GP,u1,KP,f1,YP,d1,XP,p1,QP,h1,ZP,O_=function(){function e(){return Sj(this,e),Pj(this,e,arguments)}return Oj(e,Yv),Ej(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.content,l=t.coordinate,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=mA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,Nj));var b=y.length>0;return be.createElement(_j,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:m,useTranslate3d:h,viewBox:v,wrapperStyle:g},Dj(i,VP(VP({},this.props),{},{payload:y})))}}])}();function Ij(){if(GP)return c1;GP=1;var e=Rr();return c1=function(){return e.Date.now()}}function kj(){if(KP)return u1;KP=1;var e=/\s/;return u1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function Mj(){if(YP)return f1;YP=1;var e=kj(),t=/^\s+/;return f1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function PA(){if(XP)return d1;XP=1;var e=Mj(),t=Do(),n=uu(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return d1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||a.test(l)?i(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function RA(){if(QP)return p1;QP=1;var e=Do(),t=Ij(),n=PA(),r=Math.max,o=Math.min;return p1=function(a,i,l){var u,s,c,d,f,p,m=0,h=!1,v=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),h?y(e):d}(p);if(v)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(l)&&(h=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,i):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},p1}function Lj(){if(ZP)return h1;ZP=1;var e=RA(),t=Do();return h1=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}T_(O_,"displayName","Tooltip"),T_(O_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!$v.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var jj=Lj();const Fj=Ao(jj);function Ad(e){return(Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JP(Object(n),!0).forEach((function(t){Bj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bj(e,t,n){return(t=qj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qj(e){var t=zj(e,"string");return"symbol"==Ad(t)?t:t+""}function zj(e,t){if("object"!=Ad(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ad(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Wj(e,t){return Gj(e)||Vj(e,t)||Hj(e,t)||Uj()}function Uj(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hj(e,t){if(e){if("string"==typeof e)return e2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e2(e,t)}}function e2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function Gj(e){if(Array.isArray(e))return e}var v1,t2,m1,n2,g1,r2,y1,o2,b1,i2,x1,a2,w1,s2,_1,l2,$1,c2,S1,u2,C1,f2,E1,d2,P1,p2,Kj=me((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,l=e.height,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=Ae(null),_=Ae();_.current=y,j6(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var P=Wj(Je({containerWidth:o.width,containerHeight:o.height}),2),k=P[0],S=P[1],C=nt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);Le((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};h>0&&(e=Fj(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,h]);var E=Vr((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;_v(sv(i)||sv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),_v(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=sv(i)?e:i,o=sv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),_v(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,u,c,d,n);var a=!Array.isArray(p)&&z4(p.type).endsWith("Chart");return be.Children.map(p,(function(e){return be.isValidElement(e)?Ji(e,uv({width:r,height:o},a?{style:uv({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,k,i]);return be.createElement("div",{id:v?"".concat(v):void 0,className:es("recharts-responsive-container",g),style:uv(uv({},w),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function A_(){if(t2)return v1;t2=1;var e=aA()(Object.getPrototypeOf,Object);return v1=e}function Yj(){if(n2)return m1;n2=1;var e=na(),t=A_(),n=ho(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return m1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==l}}function Xj(){if(r2)return g1;r2=1;var e=PA(),t=1/0;return g1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function TA(){if(o2)return y1;o2=1;var e=wA();return y1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function OA(){if(i2)return b1;i2=1;var e=Xj();return b1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function N_(){if(a2)return x1;return a2=1,x1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function AA(){if(s2)return w1;s2=1;var e=TA(),t=im(),n=Object.prototype.hasOwnProperty;return w1=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function pm(){if(l2)return _1;l2=1;var e=AA(),t=TA();return _1=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=a?a(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),i?t(o,s,c):e(o,s,c)}return o}}function NA(){if(c2)return $1;c2=1;var e=pm(),t=Kd();return $1=function(n,r){return n&&e(r,t(r),n)}}function Qj(){if(u2)return S1;return u2=1,S1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function Zj(){if(f2)return C1;f2=1;var e=Do(),t=S_(),n=Qj(),r=Object.prototype.hasOwnProperty;return C1=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var l in o)"constructor"==l&&(a||!r.call(o,l))||i.push(l);return i}}function D_(){if(d2)return E1;d2=1;var e=iA(),t=Zj(),n=Gd();return E1=function(r){return n(r)?e(r,!0):t(r)}}function Jj(){if(p2)return P1;p2=1;var e=pm(),t=D_();return P1=function(n,r){return n&&e(r,t(r),n)}}var h2,R1,v2,T1,m2,O1,g2,A1,y2,N1,b2,D1,x2,I1,w2,k1,_2,M1,$2,L1,S2,j1,C2,F1,E2,B1,P2,q1,R2,z1,T2,W1,O2,U1,A2,H1,N2,V1,D2,G1,I2,K1,k2,bd={exports:{}};function eF(){return h2||(h2=1,e=bd,t=bd.exports,n=Rr(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),bd.exports;var e,t,n,r,o,a,i}function hm(){if(v2)return R1;return v2=1,R1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function tF(){if(m2)return T1;m2=1;var e=pm(),t=b_();return T1=function(n,r){return e(n,t(n),r)}}function DA(){if(g2)return O1;g2=1;var e=y_(),t=A_(),n=b_(),r=rA(),o=Object.getOwnPropertySymbols;return O1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function nF(){if(y2)return A1;y2=1;var e=pm(),t=DA();return A1=function(n,r){return e(n,t(n),r)}}function rF(){if(b2)return N1;b2=1;var e=nA(),t=DA(),n=D_();return N1=function(r){return e(r,n,t)}}function oF(){if(x2)return D1;x2=1;var e=Object.prototype.hasOwnProperty;return D1=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function I_(){if(w2)return I1;w2=1;var e=tA();return I1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function iF(){if(_2)return k1;_2=1;var e=I_();return k1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function aF(){if($2)return M1;$2=1;var e=/\w*$/;return M1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function sF(){if(S2)return L1;S2=1;var e=cu(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return L1=function(e){return n?Object(n.call(e)):{}}}function lF(){if(C2)return j1;C2=1;var e=I_();return j1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function cF(){if(E2)return F1;E2=1;var e=I_(),t=iF(),n=aF(),r=sF(),o=lF();return F1=function(a,i,l){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+a);case"[object DataView]":return t(a,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,l);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function vm(){if(P2)return B1;P2=1;var e=Do(),t=Object.create;return B1=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function uF(){if(R2)return q1;R2=1;var e=vm(),t=A_(),n=S_();return q1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function fF(){if(T2)return z1;T2=1;var e=Yd(),t=ho();return z1=function(n){return t(n)&&"[object Map]"==e(n)}}function dF(){if(O2)return W1;O2=1;var e=fF(),t=fm(),n=$_(),r=n&&n.isMap,o=r?t(r):e;return W1=o}function pF(){if(A2)return U1;A2=1;var e=Yd(),t=ho();return U1=function(n){return t(n)&&"[object Set]"==e(n)}}function hF(){if(N2)return H1;N2=1;var e=pF(),t=fm(),n=$_(),r=n&&n.isSet,o=r?t(r):e;return H1=o}function IA(){if(D2)return V1;D2=1;var e=m_(),t=N_(),n=AA(),r=NA(),o=Jj(),a=eF(),i=hm(),l=tF(),u=nF(),s=lA(),c=rF(),d=Yd(),f=oF(),p=cF(),m=uF(),h=Pr(),v=w_(),g=dF(),y=Do(),b=hF(),w=Kd(),x=D_(),_="[object Arguments]",P="[object Function]",k="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[P]=S["[object WeakMap]"]=!1,V1=function C(E,N,O,T,R,A){var j,D=1&N,F=2&N,M=4&N;if(O&&(j=R?O(E,T,R,A):O(E)),void 0!==j)return j;if(!y(E))return E;var L=h(E);if(L){if(j=f(E),!D)return i(E,j)}else{var I=d(E),z=I==P||"[object GeneratorFunction]"==I;if(v(E))return a(E,D);if(I==k||I==_||z&&!R){if(j=F||z?{}:m(E),!D)return F?u(E,o(j,E)):l(E,r(j,E))}else{if(!S[I])return R?E:{};j=p(E,I,D)}}A||(A=new e);var W=A.get(E);if(W)return W;A.set(E,j),b(E)?E.forEach((function(e){j.add(C(e,N,O,e,E,A))})):g(E)&&E.forEach((function(e,t){j.set(t,C(e,N,O,t,E,A))}));var B=L?void 0:(M?F?c:s:F?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(j,t,C(e,N,O,t,E,A))})),j},V1}function vF(){if(I2)return G1;I2=1;var e=bA();return G1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function mF(){if(k2)return K1;k2=1;var e=vF(),t=xA(),n=R_();return K1=function(r){return n(t(r,void 0,e),r+"")}}bd.exports;const gF={light:"",dark:".dark"},kA=P.createContext(null);function MA(){const e=P.useContext(kA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const yF=P.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=P.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return k.jsx(kA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:a,className:se("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[k.jsx(bF,{id:l,config:r}),k.jsx(Kj,{children:n})]})})}));yF.displayName="Chart";const bF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(gF).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},DQ=O_,xF=P.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:v}=MA(),g=P.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=xw(v,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=v[i])?void 0:e.label)||i;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[i,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:h,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=xw(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):k.jsxs(k.Fragment,{children:[null!=i&&i.icon?k.jsx(i.icon,{}):!a&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));xF.displayName="ChartTooltip";const IQ=E_,wF=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=MA(),u=P.useRef({});return P.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?k.jsx("div",{ref:i,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=xw(l,e,i),c=!!o&&i===a;return k.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function xw(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}wF.displayName="ChartLegend";const _F=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),M2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a,className:i})=>k.jsxs("div",{onClick:n?void 0:o,className:se("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300",i),children:[r&&k.jsxs($O,{className:se("size-6 text-[10px]"),children:[k.jsx(SO,{src:r,alt:e}),k.jsx(CO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),a&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},disabled:n,className:"pointer-events-auto cursor-pointer",children:k.jsx(Uw,{size:16})})]});function mm(e){const t=Ae({value:e,previous:e});return Vr((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function gm(e){const[t,n]=Je(void 0);return pr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const LA="Checkbox",[$F,kQ]=Er(LA),[SF,CF]=$F(LA),EF=me(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=Je(null),p=Rt(t,(e=>f(e))),m=Ae(!1),h=!d||!!d.closest("form"),[v=!1,g]=Go({prop:o,defaultProp:a,onChange:s}),y=Ae(v);return Le((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),F(SF,{scope:n,state:v,disabled:l},F(at.button,le({type:"button",role:"checkbox","aria-checked":dl(v)?"mixed":v,"aria-required":i,"data-state":jA(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:We(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:We(e.onClick,(e=>{g((e=>!!dl(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&F(TF,{control:d,bubbles:!m.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),PF="CheckboxIndicator",RF=me(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=CF(PF,n);return F(No,{present:r||dl(a.state)||!0===a.state},F(at.span,le({"data-state":jA(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),TF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=dl(n),o.call(e,!dl(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"checkbox","aria-hidden":!0,defaultChecked:!dl(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dl(e){return"indeterminate"===e}function jA(e){return dl(e)?"indeterminate":e?"checked":"unchecked"}const FA=EF,OF=RF,AF=ea("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),k_=P.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const[i]=P.useState(o.checked),[l,u]=P.useState(!1);P.useEffect((()=>{i!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?k.jsx(d7,{...e}):k.jsx(Ww,{...e});return k.jsxs(FA,{ref:a,className:se(e,AF({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||i)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),k.jsx(OF,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));k_.displayName=FA.displayName;var L2=1,NF=.9,DF=.8,IF=.17,Y1=.1,X1=.999,kF=.9999,MF=.99,LF=/[\\\/_+.#"@\[\(\{&]/,jF=/[\\\/_+.#"@\[\(\{&]/g,FF=/[\s-]/,BA=/[\s-]/g;function ww(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?L2:MF;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var u,s,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=ww(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=L2:LF.test(e.charAt(p-1))?(u*=DF,(c=e.slice(o,p-1).match(jF))&&o>0&&(u*=Math.pow(X1,c.length))):FF.test(e.charAt(p-1))?(u*=NF,(d=e.slice(o,p-1).match(BA))&&o>0&&(u*=Math.pow(X1,d.length))):(u*=IF,o>0&&(u*=Math.pow(X1,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=kF)),(u<Y1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=ww(e,t,n,r,p+1,a+2,i))*Y1>u&&(u=s*Y1)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[l]=m,m}function j2(e){return e.toLowerCase().replace(BA," ")}function BF(e,t,n){return ww(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,j2(e),j2(t),0,0,{})}var pd='[cmdk-group=""]',Q1='[cmdk-group-items=""]',qF='[cmdk-group-heading=""]',M_='[cmdk-item=""]',F2=`${M_}:not([aria-disabled="true"])`,_w="cmdk-item-select",ul="data-value",zF=(e,t,n)=>BF(e,t,n),qA=P.createContext(void 0),Qd=()=>P.useContext(qA),zA=P.createContext(void 0),L_=()=>P.useContext(zA),WA=P.createContext(void 0),UA=P.forwardRef(((e,t)=>{let n=Gc((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Gc((()=>new Set)),o=Gc((()=>new Map)),a=Gc((()=>new Map)),i=Gc((()=>new Set)),l=HA(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=JF();vl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),vl((()=>{_(6,T)}),[]);let k=P.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=P.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:zF;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;A().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(Q1);t?t.appendChild(e.parentElement===t?e:e.closest(`${Q1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Q1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${pd}[${ul}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=A().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ul);k.setState("value",t||void 0)}function O(){var e,t,i,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=s}function T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(pd))?void 0:t.querySelector(qF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${M_}[aria-selected="true"]`)}function A(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(F2))}function j(e){let t=A()[e];t&&k.setState("value",t.getAttribute(ul))}function D(e){var t;let n=R(),r=A(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(ul))}function F(e){let t,n=R(),r=null==n?void 0:n.closest(pd);for(;r&&!t;)r=e>0?QF(r,pd):ZF(r,pd),t=null==r?void 0:r.querySelector(F2);t?k.setState("value",t.getAttribute(ul)):D(e)}let M=()=>j(A().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?F(1):D(1)},I=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?F(-1):D(-1)};return P.createElement(at.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(_w);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:tB},u),ym(e,(e=>P.createElement(zA.Provider,{value:k},P.createElement(qA.Provider,{value:S},e)))))})),WF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),a=P.useRef(null),i=P.useContext(WA),l=Qd(),u=HA(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;vl((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=VA(o,a,[e.value,e.children,a],e.keywords),d=L_(),f=ml((e=>e.value&&e.value===c.current)),p=ml((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(_w,m),()=>t.removeEventListener(_w,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(at.div,{ref:Nd([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:h,onClick:v?void 0:m},e.children)})),UF=P.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=P.useId(),l=P.useRef(null),u=P.useRef(null),s=P.useId(),c=Qd(),d=ml((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));vl((()=>c.group(i)),[]),VA(i,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:i,forceMount:o})),[o]);return P.createElement(at.div,{ref:Nd([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&P.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),ym(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(WA.Provider,{value:f},e)))))})),HF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),a=ml((e=>!e.search));return n||a?P.createElement(at.div,{ref:Nd([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),VF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=L_(),i=ml((e=>e.search)),l=ml((e=>e.value)),u=Qd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${M_}[${ul}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return P.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),P.createElement(at.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),GF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=P.useRef(null),i=P.useRef(null),l=Qd();return P.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),P.createElement(at.div,{ref:Nd([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},ym(e,(e=>P.createElement("div",{ref:Nd([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),KF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return P.createElement(em,{open:n,onOpenChange:r},P.createElement(tm,{container:i},P.createElement(au,{"cmdk-overlay":"",className:o}),P.createElement(su,{"aria-label":e.label,"cmdk-dialog":"",className:a},P.createElement(UA,{ref:t,...l}))))})),YF=P.forwardRef(((e,t)=>ml((e=>0===e.filtered.count))?P.createElement(at.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),XF=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return P.createElement(at.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ym(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Kr=Object.assign(UA,{List:GF,Item:WF,Input:VF,Group:UF,Separator:HF,Dialog:KF,Empty:YF,Loading:XF});function QF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ZF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function HA(e){let t=P.useRef(e);return vl((()=>{t.current=e})),t}var vl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Gc(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Nd(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ml(e){let t=L_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function VA(e,t,n,r=[]){let o=P.useRef(),a=Qd();return vl((()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));a.value(e,l,u),null==(i=t.current)||i.setAttribute(ul,l),o.current=l})),o}var JF=()=>{let[e,t]=P.useState(),n=Gc((()=>new Map));return vl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function eB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function ym({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(eB(t),{ref:t.ref},n(t.props.children)):n(t)}var tB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const nB=em,MQ=t_,rB=tm,LQ=lu,GA=P.forwardRef((({className:e,...t},n)=>(P.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),k.jsx(au,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));GA.displayName=au.displayName;const oB=ea("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),iB=ea("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),KA=P.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:a="big",children:i,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const m=k.jsxs(lu,{className:se(oB({closeVariant:o})),children:[k.jsx(Uw,{onClick:c,fill:"currentColor",className:se(iB({closeSize:a}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(rB,{children:[k.jsx(GA,{className:l,onClick:c}),r&&"insideCard"!==o&&m,k.jsxs(su,{ref:p,className:se("fixed left-[50%] top-[50%] z-100 grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...f,children:[e&&k.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),k.jsx("div",{className:se("p-m",u),children:i}),r&&"insideCard"===o&&m,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(NT,{color:"var(--slate-400)",size:24})}),k.jsx(YA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));KA.displayName=su.displayName;const aB=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});aB.displayName="DialogHeader";const YA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});YA.displayName="DialogFooter";const sB=P.forwardRef((({className:e,...t},n)=>k.jsx(Wd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));sB.displayName=Wd.displayName;const lB=P.forwardRef((({className:e,...t},n)=>k.jsx(Ud,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));lB.displayName=Ud.displayName;const XA=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));XA.displayName=Kr.displayName;const jQ=({children:e,...t})=>k.jsx(nB,{...t,children:k.jsx(KA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(XA,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),cB=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Kr.Input,{ref:n,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));cB.displayName=Kr.Input.displayName;const uB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));uB.displayName=Kr.List.displayName;const fB=P.forwardRef(((e,t)=>k.jsx(Kr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));fB.displayName=Kr.Empty.displayName;const dB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Group,{ref:n,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));dB.displayName=Kr.Group.displayName;const pB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));pB.displayName=Kr.Separator.displayName;const hB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Item,{ref:n,className:se("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));hB.displayName=Kr.Item.displayName;const vB=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Qa(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function B2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function QA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=B2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():B2(e[t],null)}}}}function wl(...e){return P.useCallback(QA(...e),e)}function mB(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=P.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function gB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},yB(r,...t)]}function yB(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}vB.displayName="CommandShortcut";var Iv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},bB=P[" useId ".trim().toString()]||(()=>{}),xB=0;function Z1(e){const[t,n]=P.useState(bB());return Iv((()=>{e||n((e=>e??String(xB++)))}),[e]),e||(t?`radix-${t}`:"")}function gl(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function wB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=_B({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=gl(n);return[i,P.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function _B({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=gl(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function ZA(e){const t=$B(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(CB);if(i){const e=i.props.children,r=a.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function $B(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=PB(n),o=EB(r,n.props);return n.type!==P.Fragment&&(o.ref=t?QA(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var SB=Symbol("radix.slottable");function CB(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===SB}function EB(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function PB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var RB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ra=RB.reduce(((e,t)=>{const n=ZA(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function TB(e,t){e&&$i.flushSync((()=>e.dispatchEvent(t)))}function OB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e);P.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var q2,AB="DismissableLayer",$w="dismissableLayer.update",NB="dismissableLayer.pointerDownOutside",DB="dismissableLayer.focusOutside",JA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eN=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=P.useContext(JA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),m=wl(t,(e=>d(e))),h=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(v),y=c?h.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=MB((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=LB((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return OB((e=>{y===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),P.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(q2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),z2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=q2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),z2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener($w,e),()=>document.removeEventListener($w,e)}),[]),k.jsx(ra.div,{...u,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Qa(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Qa(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Qa(e.onPointerDownCapture,x.onPointerDownCapture)})}));eN.displayName=AB;var IB="DismissableLayerBranch",kB=P.forwardRef(((e,t)=>{const n=P.useContext(JA),r=P.useRef(null),o=wl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(ra.div,{...e,ref:o})}));function MB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){tN(NB,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&tN(DB,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function z2(){const e=new CustomEvent($w);document.dispatchEvent(e)}function tN(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?TB(o,a):o.dispatchEvent(a)}kB.displayName=IB;var J1="focusScope.autoFocusOnMount",ex="focusScope.autoFocusOnUnmount",W2={bubbles:!1,cancelable:!0},jB="FocusScope",nN=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=P.useState(null),s=gl(o),c=gl(a),d=P.useRef(null),f=wl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ka(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ka(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ka(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){H2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(J1,W2);l.addEventListener(J1,s),l.dispatchEvent(t),t.defaultPrevented||(FB(UB(rN(l)),{select:!0}),document.activeElement===e&&Ka(l))}return()=>{l.removeEventListener(J1,s),setTimeout((()=>{const t=new CustomEvent(ex,W2);l.addEventListener(ex,c),l.dispatchEvent(t),t.defaultPrevented||Ka(e??document.body,{select:!0}),l.removeEventListener(ex,c),H2.remove(p)}),0)}}}),[l,s,c,p]);const m=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=BB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ka(a,{select:!0})):(e.preventDefault(),n&&Ka(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(ra.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})}));function FB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ka(r,{select:t}),document.activeElement!==n)return}function BB(e){const t=rN(e);return[U2(t,e),U2(t.reverse(),e)]}function rN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function U2(e,t){for(const n of e)if(!qB(n,{upTo:t}))return n}function qB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function zB(e){return e instanceof HTMLInputElement&&"select"in e}function Ka(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zB(e)&&t&&e.select()}}nN.displayName=jB;var H2=WB();function WB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=V2(e,t),e.unshift(t)},remove(t){var n;e=V2(e,t),null==(n=e[0])||n.resume()}}}function V2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function UB(e){return e.filter((e=>"A"!==e.tagName))}var HB="Portal",oN=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=P.useState(!1);Iv((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Gw.createPortal(k.jsx(ra.div,{...o,ref:t}),l):null}));function VB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}oN.displayName=HB;var bm=e=>{const{present:t,children:n}=e,r=GB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=wl(r.ref,KB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function GB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=VB(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=fv(r.current);a.current="mounted"===l?e:"none"}),[l]),Iv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=fv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Iv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=fv(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=fv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function fv(e){return(null==e?void 0:e.animationName)||"none"}function KB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}bm.displayName="Presence";var tx=0;function YB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??G2()),document.body.insertAdjacentElement("beforeend",e[1]??G2()),tx++,()=>{1===tx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),tx--}}),[])}function G2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var iN=KT(),nx=function(){},xm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:nx,onWheelCapture:nx,onTouchMoveCapture:nx}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=Zw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=GT([n,t]),_=fr(fr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:iN,removeScrollBar:s,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:y}),i?P.cloneElement(P.Children.only(l),fr(fr({},_),{ref:x})):P.createElement(g,fr({},_,{className:u,ref:x}),l))}));xm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xm.classNames={fullWidth:wd,zeroRight:xd};var Sw=!1;if(typeof window<"u")try{var dv=Object.defineProperty({},"passive",{get:function(){return Sw=!0,!0}});window.addEventListener("test",dv,dv),window.removeEventListener("test",dv,dv)}catch{Sw=!1}var Hc=!!Sw&&{passive:!1},XB=function(e){return"TEXTAREA"===e.tagName},aN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!XB(e)&&"visible"===n[t])},QB=function(e){return aN(e,"overflowY")},ZB=function(e){return aN(e,"overflowX")},K2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),sN(e,r)){var o=lN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},JB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},eq=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},sN=function(e,t){return"v"===e?QB(t):ZB(t)},lN=function(e,t){return"v"===e?JB(t):eq(t)},tq=function(e,t){return"h"===e&&"rtl"===t?-1:1},nq=function(e,t,n,r,o){var a=tq(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,u=t.contains(l),s=!1,c=i>0,d=0,f=0;do{var p=lN(e,l),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&sN(e,l)&&(d+=h,f+=m),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},pv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y2=function(e){return[e.deltaX,e.deltaY]},X2=function(e){return e&&"current"in e?e.current:e},rq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oq=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},iq=0,Vc=[];function aq(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(iq++)[0],a=P.useState(Jw)[0],i=P.useRef(e);P.useEffect((function(){i.current=e}),[e]),P.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=VT([e.lockRef.current],(e.shards||[]).map(X2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=P.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=pv(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-a[0],s="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=K2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=K2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return nq(p,t,e,"h"===p?u:s,!0)}),[]),u=P.useCallback((function(e){var n=e;if(Vc.length&&Vc[Vc.length-1]===a){var r="deltaY"in n?Y2(n):pv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&rq(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(X2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=P.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:sq(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=P.useCallback((function(e){n.current=pv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,Y2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,pv(t),t.target,l(t,e.lockRef.current))}),[]);P.useEffect((function(){return Vc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Hc),document.addEventListener("touchmove",u,Hc),document.addEventListener("touchstart",c,Hc),function(){Vc=Vc.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Hc),document.removeEventListener("touchmove",u,Hc),document.removeEventListener("touchstart",c,Hc)}}),[]);var p=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(a,{styles:oq(o)}):null,p?P.createElement(ZT,{gapMode:e.gapMode}):null)}function sq(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lq=XT(iN,aq);var cN=P.forwardRef((function(e,t){return P.createElement(xm,fr({},e,{ref:t,sideCar:lq}))}));cN.classNames=xm.classNames;var j_="Dialog",[uN,FQ]=gB(j_),[cq,Xo]=uN(j_),fN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=P.useRef(null),u=P.useRef(null),[s=!1,c]=wB({prop:r,defaultProp:o,onChange:a});return k.jsx(cq,{scope:t,triggerRef:l,contentRef:u,contentId:Z1(),titleId:Z1(),descriptionId:Z1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};fN.displayName=j_;var dN="DialogTrigger",pN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(dN,n),a=wl(t,o.triggerRef);return k.jsx(ra.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":q_(o.open),...r,ref:a,onClick:Qa(e.onClick,o.onOpenToggle)})}));pN.displayName=dN;var F_="DialogPortal",[uq,hN]=uN(F_,{forceMount:void 0}),vN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Xo(F_,t);return k.jsx(uq,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(bm,{present:n||a.open,children:k.jsx(oN,{asChild:!0,container:o,children:e})})))})};vN.displayName=F_;var kv="DialogOverlay",mN=P.forwardRef(((e,t)=>{const n=hN(kv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Xo(kv,e.__scopeDialog);return a.modal?k.jsx(bm,{present:r||a.open,children:k.jsx(dq,{...o,ref:t})}):null}));mN.displayName=kv;var fq=ZA("DialogOverlay.RemoveScroll"),dq=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(kv,n);return k.jsx(cN,{as:fq,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(ra.div,{"data-state":q_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),yl="DialogContent",gN=P.forwardRef(((e,t)=>{const n=hN(yl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Xo(yl,e.__scopeDialog);return k.jsx(bm,{present:r||a.open,children:a.modal?k.jsx(pq,{...o,ref:t}):k.jsx(hq,{...o,ref:t})})}));gN.displayName=yl;var pq=P.forwardRef(((e,t)=>{const n=Xo(yl,e.__scopeDialog),r=P.useRef(null),o=wl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return zd(e)}),[]),k.jsx(yN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qa(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Qa(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Qa(e.onFocusOutside,(e=>e.preventDefault()))})})),hq=P.forwardRef(((e,t)=>{const n=Xo(yl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(yN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),yN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Xo(yl,n),u=P.useRef(null),s=wl(t,u);return YB(),k.jsxs(k.Fragment,{children:[k.jsx(nN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:k.jsx(eN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q_(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(vq,{titleId:l.titleId}),k.jsx(gq,{contentRef:u,descriptionId:l.descriptionId})]})]})})),B_="DialogTitle",bN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(B_,n);return k.jsx(ra.h2,{id:o.titleId,...r,ref:t})}));bN.displayName=B_;var xN="DialogDescription",wN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(xN,n);return k.jsx(ra.p,{id:o.descriptionId,...r,ref:t})}));wN.displayName=xN;var _N="DialogClose",$N=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(_N,n);return k.jsx(ra.button,{type:"button",...r,ref:t,onClick:Qa(e.onClick,(()=>o.onOpenChange(!1)))})}));function q_(e){return e?"open":"closed"}$N.displayName=_N;var SN="DialogTitleWarning",[BQ,CN]=mB(SN,{contentName:yl,titleName:B_,docsSlug:"dialog"}),vq=({titleId:e})=>{const t=CN(SN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},mq="DialogDescriptionWarning",gq=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CN(mq).contentName}}.`;return P.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},yq=fN,bq=pN,xq=vN,wq=mN,_q=gN,$q=bN,Sq=wN,Cq=$N;function Eq(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const EN=be.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),fu=()=>{const e=be.useContext(EN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Eq("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const Pq=24,Rq=typeof window<"u"?ou:Le;function Q2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Tq(){return z_(/^Mac/)}function Oq(){return z_(/^iPhone/)}function Z2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Aq(){return z_(/^iPad/)||Tq()&&navigator.maxTouchPoints>1}function PN(){return Oq()||Aq()}function z_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const rx=typeof document<"u"&&window.visualViewport;function J2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function RN(e){for(J2(e)&&(e=e.parentElement);e&&!J2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Nq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ox,hv=0;function Dq(e={}){let{isDisabled:t}=e;Rq((()=>{if(!t)return hv++,1===hv&&PN()&&(ox=Iq()),()=>{hv--,0===hv&&(null==ox||ox())}}),[t])}function Iq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=Q2(kq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=Q2(hd(document,"touchstart",(n=>{e=RN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),hd(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),hd(document,"touchend",(e=>{let t=e.target;Cw(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),hd(document,"focus",(e=>{let t=e.target;Cw(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",rx&&(rx.height<window.innerHeight?requestAnimationFrame((()=>{eR(t)})):rx.addEventListener("resize",(()=>eR(t)),{once:!0}))})))}),!0),hd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function kq(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function hd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function eR(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=RN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function Cw(e){return e instanceof HTMLInputElement&&!Nq.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Mq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Lq(...e){return t=>e.forEach((e=>Mq(e,t)))}function TN(...e){return P.useCallback(Lq(...e),e)}const ON=new WeakMap;function Rn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&ON.set(e,r)}function jq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=ON.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function Fq(e){return 8*(Math.log(e+1)-2)}function ix(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Bq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},AN=.4,qq=.25,zq=100,NN=8,al=16,Ew=26,ax="vaul-dragging";function DN(e){const t=be.useRef(e);return be.useEffect((()=>{t.current=e})),be.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Wq({defaultProp:e,onChange:t}){const n=be.useState(e),[r]=n,o=be.useRef(r),a=DN(t);return be.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function IN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Wq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=DN(n);return[i,be.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function Uq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=IN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=be.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);be.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=be.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=be.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=be.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Tn(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=be.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),b=be.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return be.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===h,d=e>0;if(h===a-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),!s&&r>2&&!d)return void(i?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Tn(l)?window.innerHeight:window.innerWidth;if(r>AN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===h)return;b(g[h+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const Hq=()=>()=>{};function Vq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=fu(),a=be.useRef(null),i=Vr((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}be.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Bq(r&&!o?ix(document.body,{background:"black"}):Hq,ix(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=ix(t,{borderRadius:"8px",overflow:"hidden",...Tn(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*nn.DURATION)}}}),[t,n,i])}let vd=null;function Gq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=be.useState((()=>typeof window<"u"?window.location.href:"")),u=be.useRef(0),s=be.useCallback((()=>{if(Z2()&&null===vd&&e&&!a){vd={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=be.useCallback((()=>{if(Z2()&&null!==vd&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,vd),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),vd=null}}),[i]);return be.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),be.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,s,c]),{restorePositionSetting:c}}function kN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=qq,scrollLockTimeout:s=zq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:P=!1,preventScrollRestoration:k=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,A]=IN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[j,D]=be.useState(!1),[F,M]=be.useState(!1),[L,I]=be.useState(!1),z=be.useRef(null),W=be.useRef(null),B=be.useRef(null),$=be.useRef(null),U=be.useRef(null),H=be.useRef(!1),V=be.useRef(null),K=be.useRef(0),q=be.useRef(!1),G=be.useRef(0),Y=be.useRef(null),X=be.useRef((null==(O=Y.current)?void 0:O.getBoundingClientRect().height)||0),Q=be.useRef((null==(T=Y.current)?void 0:T.getBoundingClientRect().width)||0),J=be.useRef(0),Z=be.useCallback((e=>{a&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=Uq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:Y,fadeFromIndex:f,overlayRef:z,onSnapPointChange:Z,direction:w,container:E,snapToSequentialPoint:P});Dq({isDisabled:!R||F||!v||L||!j||!S||!_});const{restorePositionSetting:ue}=Gq({isOpen:R,modal:v,nested:y,hasBeenOpened:j,preventScrollRestoration:k,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=Y.current?vv(Y.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=U.current)?void 0:r.getTime())<s&&0===i||t)return U.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return U.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!F||!Y.current||(Y.current.classList.remove(ax),H.current=!1,M(!1),$.current=new Date),null==g||g(),e||A(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*nn.DURATION)}function fe(){if(!Y.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=vv(Y.current,w);Rn(Y.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(z.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return be.useEffect((()=>{var e;function t(){if(!Y.current||!S)return;if(Cw(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Y.current.getBoundingClientRect().height||0,i=o>.8*n;J.current||(J.current=o);const l=Y.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(q.current=!q.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||q.current){const e=Y.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),Y.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else Y.current.style.height=`${J.current}px`;a&&a.length>0&&!q.current?Y.current.style.bottom="0px":Y.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),be.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{jq(document.documentElement,"scrollBehavior")})),[R]),be.createElement(yq,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?D(!0):de(!0),A(e))},open:R},be.createElement(EN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:Y,overlayRef:z,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||Y.current&&!Y.current.contains(e.target)||(X.current=(null==(t=Y.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Y.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,PN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!F||!Y.current)return;Y.current.classList.remove(ax),H.current=!1,M(!1),$.current=new Date;const t=vv(Y.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=$.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>AN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=Y.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=Y.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(Y.current&&F){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(Y.current.classList.add(ax),H.current=!0,Rn(Y.current,{transition:"none"}),Rn(z.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=Fq(n),r=Math.min(-1*e,0)*t;return void Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Rn(z.current,{opacity:`${m}`,transition:"none"},!0)),s&&z.current&&i){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:F,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(Y.current,{transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;V.current&&window.clearTimeout(V.current),Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&Y.current&&(V.current=setTimeout((()=>{const e=vv(Y.current,w);Rn(Y.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const MN=be.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=fu(),u=TN(t,n),s=r&&r.length>0;return l?be.createElement(wq,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&s?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));MN.displayName="Drawer.Overlay";const LN=be.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:v,autoFocus:g}=fu(),[y,b]=be.useState(!1),w=TN(o,a),x=be.useRef(null),_=be.useRef(null),P=be.useRef(!1),k=m&&m.length>0;Vq();function S(e){x.current=null,P.current=!1,l(e)}return be.useEffect((()=>{k&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),be.createElement(_q,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&k?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(P.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return P.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,P.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));LN.displayName="Drawer.Content";const Kq=250,Yq=120,jN=be.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=fu(),m=be.useRef(null),h=be.useRef(!1);function v(){window.clearTimeout(m.current),h.current=!1}return be.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),(!i||0===i.length)&&s)return void o();if(l===i[i.length-1]&&s)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];u(n)}()}),Yq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),Kq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},be.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function Xq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=fu();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return be.createElement(kN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function Qq(e){const t=fu(),{container:n=t.container,...r}=e;return be.createElement(xq,{container:n,...r})}jN.displayName="Drawer.Handle";const Qo={Root:kN,NestedRoot:Xq,Content:LN,Overlay:MN,Trigger:bq,Portal:Qq,Handle:jN,Close:Cq,Title:$q,Description:Sq},Zq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Qo.Root,{direction:t,shouldScaleBackground:e,...n});Zq.displayName="Drawer";const qQ=Qo.Trigger,Jq=Qo.Portal,zQ=Qo.Close,FN=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));FN.displayName=Qo.Overlay.displayName;const ez=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(Jq,{children:[k.jsx(FN,{}),k.jsxs(Qo.Content,{ref:o,className:se("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));ez.displayName="DrawerContent";const tz=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});tz.displayName="DrawerHeader";const nz=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});nz.displayName="DrawerFooter";const rz=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));rz.displayName=Qo.Title.displayName;const oz=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function W_(e){const t=e+"CollectionProvider",[n,r]=Er(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",l=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=be.useRef(null),a=be.useRef(new Map).current;return be.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:be.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,a(i,n).collectionRef);return be.createElement(pl,{ref:o},r)})),ItemSlot:be.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=be.useRef(null),s=Rt(t,i),c=a(l,n);return be.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),be.createElement(pl,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return be.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}oz.displayName=Qo.Description.displayName;const iz=Ja(void 0);function Zd(e){const t=ru(iz);return e||t||"ltr"}const az=["top","right","bottom","left"],ts=Math.min,lo=Math.max,Mv=Math.round,mv=Math.floor,ns=e=>({x:e,y:e}),sz={left:"right",right:"left",bottom:"top",top:"bottom"},lz={start:"end",end:"start"};function Pw(e,t,n){return lo(e,ts(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function du(e){return e.split("-")[1]}function U_(e){return"x"===e?"y":"x"}function H_(e){return"y"===e?"height":"width"}function rs(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function V_(e){return U_(rs(e))}function cz(e,t,n){void 0===n&&(n=!1);const r=du(e),o=V_(e),a=H_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lv(i)),[i,Lv(i)]}function uz(e){const t=Lv(e);return[Rw(e),t,Rw(t)]}function Rw(e){return e.replace(/start|end/g,(e=>lz[e]))}function fz(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function dz(e,t,n,r){const o=du(e);let a=fz(Zi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Rw)))),a}function Lv(e){return e.replace(/left|right|bottom|top/g,(e=>sz[e]))}function pz(e){return{top:0,right:0,bottom:0,left:0,...e}}function BN(e){return"number"!=typeof e?pz(e):{top:e,right:e,bottom:e,left:e}}function jv(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function tR(e,t,n){let{reference:r,floating:o}=e;const a=rs(t),i=V_(t),l=H_(i),u=Zi(t),s="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(du(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const hz=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=tR(s,r,u),f=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:a,fn:h}=l[n],{x:v,y:g,data:y,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:i,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=tR(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Dd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qi(t,e),m=BN(p),h=l[f?"floating"===d?"reference":"floating":d],v=jv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=jv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+m.top)/b.y,bottom:(w.bottom-v.bottom+m.bottom)/b.y,left:(v.left-w.left+m.left)/b.x,right:(w.right-v.right+m.right)/b.x}}const vz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Qi(e,t)||{};if(null==s)return{};const d=BN(c),f={x:n,y:r},p=V_(o),m=H_(p),h=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let P=_?_[b]:0;(!P||!await(null==i.isElement?void 0:i.isElement(_)))&&(P=l.floating[b]||a.floating[m]);const k=w/2-x/2,S=P/2-h[m]/2-1,C=ts(d[g],S),E=ts(d[y],S),N=C,O=P-h[m]-E,T=P/2-h[m]/2+k,R=Pw(N,T,O),A=!u.arrow&&null!=du(o)&&T!==R&&a.reference[m]/2-(T<N?C:E)-h[m]/2<0,j=A?T<N?T-N:T-O:0;return{[p]:f[p]+j,data:{[p]:R,centerOffset:T-R-j,...A&&{alignmentOffset:j}},reset:A}}}),mz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Qi(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=rs(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!h?[Lv(l)]:uz(l)),_="none"!==m;!f&&_&&x.push(...dz(l,h,m,w));const P=[l,...x],k=await Dd(t,v),S=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(k[g]),d){const e=cz(o,i,w);S.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=rs(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function nR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rR(e){return az.some((t=>e[t]>=0))}const gz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=nR(await Dd(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rR(e)}}}case"escaped":{const e=nR(await Dd(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rR(e)}}}default:return{}}}}};async function yz(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Zi(n),l=du(n),u="y"===rs(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const bz=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,u=await yz(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},xz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Qi(e,t),s={x:n,y:r},c=await Dd(t,u),d=rs(Zi(o)),f=U_(d);let p=s[f],m=s[d];if(a){const e="y"===f?"bottom":"right";p=Pw(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=Pw(m+c["y"===d?"top":"left"],m,m-c[e])}const h=l.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}},wz=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=Qi(e,t),c={x:n,y:r},d=rs(o),f=U_(d);let p=c[f],m=c[d];const h=Qi(l,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis,n=a.reference[f]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Zi(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},_z=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...s}=Qi(e,t),c=await Dd(t,s),d=Zi(o),f=du(o),p="y"===rs(o),{width:m,height:h}=a.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=h-c.top-c.bottom,b=m-c.left-c.right,w=ts(h-c[v],y),x=ts(m-c[g],b),_=!t.middlewareData.shift;let P=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=y),_&&!f){const e=lo(c.left,0),t=lo(c.right,0),n=lo(c.top,0),r=lo(c.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:lo(c.left,c.right)):P=h-2*(0!==n||0!==r?n+r:lo(c.top,c.bottom))}await u({...t,availableWidth:k,availableHeight:P});const S=await i.getDimensions(l.floating);return m!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function wm(){return typeof window<"u"}function os(e){return qN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oa(e){var t;return null==(t=(qN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qN(e){return!!wm()&&(e instanceof Node||e instanceof uo(e).Node)}function xi(e){return!!wm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!wm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function oR(e){return!(!wm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Jd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Oo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $z(e){return["table","td","th"].includes(os(e))}function Sz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function G_(e){const t=K_(),n=xi(e)?Oo(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function zN(e){let t=tu(e);for(;wi(t)&&!_m(t);){if(G_(t))return t;if(Sz(t))return null;t=tu(t)}return null}function K_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _m(e){return["html","body","#document"].includes(os(e))}function Oo(e){return uo(e).getComputedStyle(e)}function $m(e){return xi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tu(e){if("html"===os(e))return e;const t=e.assignedSlot||e.parentNode||oR(e)&&e.host||oa(e);return oR(t)?t.host:t}function WN(e){const t=tu(e);return _m(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Jd(t)?t:WN(t)}function Id(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=WN(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=uo(o);if(a){const e=Cz(i);return t.concat(i,i.visualViewport||[],Jd(o)?o:[],e&&n?Id(e):[])}return t.concat(o,Id(o,[],n))}function Cz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UN(e){const t=Oo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Mv(n)!==a||Mv(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Y_(e){return xi(e)?e:e.contextElement}function Yc(e){const t=Y_(e);if(!wi(t))return ns(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=UN(t);let i=(a?Mv(n.width):n.width)/r,l=(a?Mv(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ez=ns(0);function HN(e){const t=uo(e);return K_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ez}function Pz(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function bl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Y_(e);let i=ns(1);t&&(r?xi(r)&&(i=Yc(r)):i=Yc(e));const l=Pz(a,n,r)?HN(a):ns(0);let u=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=uo(a),t=r&&xi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Yc(n),t=n.getBoundingClientRect(),r=Oo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=a,n=uo(n).frameElement}}return jv({width:c,height:d,x:u,y:s})}const Rz=[":popover-open",":modal"];function VN(e){let t=!1,n=0,r=0;if(Rz.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=zN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Tz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=oa(r),[i]=t?VN(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=ns(1);const s=ns(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==os(r)||Jd(a))&&(l=$m(r)),wi(r))){const e=bl(r);u=Yc(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Oz(e){return Array.from(e.getClientRects())}function GN(e){return bl(oa(e)).left+$m(e).scrollLeft}function Az(e){const t=oa(e),n=$m(e),r=e.ownerDocument.body,o=lo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=lo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+GN(e);const l=-n.scrollTop;return"rtl"===Oo(r).direction&&(i+=lo(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function Nz(e,t){const n=uo(e),r=oa(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=K_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function Dz(e,t){const n=bl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wi(e)?Yc(e):ns(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function iR(e,t,n){let r;if("viewport"===t)r=Nz(e,n);else if("document"===t)r=Az(oa(e));else if(xi(t))r=Dz(t,n);else{const n=HN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return jv(r)}function KN(e,t){const n=tu(e);return!(n===t||!xi(n)||_m(n))&&("fixed"===Oo(n).position||KN(n,t))}function Iz(e,t){const n=t.get(e);if(n)return n;let r=Id(e,[],!1).filter((e=>xi(e)&&"body"!==os(e))),o=null;const a="fixed"===Oo(e).position;let i=a?tu(e):e;for(;xi(i)&&!_m(i);){const t=Oo(i),n=G_(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Jd(i)&&!n&&KN(e,i))?r=r.filter((e=>e!==i)):o=t,i=tu(i)}return t.set(e,r),r}function kz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Iz(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=iR(t,n,o);return e.top=lo(r.top,e.top),e.right=ts(r.right,e.right),e.bottom=ts(r.bottom,e.bottom),e.left=lo(r.left,e.left),e}),iR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mz(e){const{width:t,height:n}=UN(e);return{width:t,height:n}}function Lz(e,t,n,r){const o=wi(t),a=oa(t),i="fixed"===n,l=bl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=ns(0);if(o||!o&&!i)if(("body"!==os(t)||Jd(a))&&(u=$m(t)),o){const e=bl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=GN(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,m]=VN(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function aR(e,t){return wi(e)&&"fixed"!==Oo(e).position?t?t(e):e.offsetParent:null}function YN(e,t){const n=uo(e);if(!wi(e))return n;let r=aR(e,t);for(;r&&$z(r)&&"static"===Oo(r).position;)r=aR(r,t);return r&&("html"===os(r)||"body"===os(r)&&"static"===Oo(r).position&&!G_(r))?n:r||zN(e)||n}const jz=async function(e){const t=this.getOffsetParent||YN,n=this.getDimensions;return{reference:Lz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Fz(e){return"rtl"===Oo(e).direction}const Bz={convertOffsetParentRelativeRectToViewportRelativeRect:Tz,getDocumentElement:oa,getClippingRect:kz,getOffsetParent:YN,getElementRects:jz,getClientRects:Oz,getDimensions:Mz,getScale:Yc,isElement:xi,isRTL:Fz};function qz(e,t){let n,r=null;const o=oa(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),a();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-mv(c)+"px "+-mv(o.clientWidth-(s+d))+"px "+-mv(o.clientHeight-(c+f))+"px "+-mv(s)+"px",threshold:lo(0,ts(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),a}function zz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,s=Y_(e),c=o||a?[...s?Id(s):[],...Id(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?qz(s,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let m,h=u?bl(e):null;return u&&function t(){const r=bl(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const Wz=xz,Uz=mz,Hz=_z,Vz=gz,sR=vz,Gz=wz,Kz=(e,t,n)=>{const r=new Map,o={platform:Bz,...n},a={...o.platform,_c:r};return hz(e,t,{...o,platform:a})};var Sv=typeof document<"u"?ou:Le;function Fv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Fv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Fv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function XN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lR(e,t){const n=XN(e);return Math.round(t*n)/n}function sx(e){const t=P.useRef(e);return Sv((()=>{t.current=e})),t}function Yz(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:s}=e,[c,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Fv(f,r)||p(r);const[m,h]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,h(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=a||m,x=i||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=sx(u),N=sx(o),O=sx(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),Kz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Fv(S.current,t)&&(S.current=t,$i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);Sv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);Sv((()=>(R.current=!0,()=>{R.current=!1})),[]),Sv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const A=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),j=P.useMemo((()=>({reference:w,floating:x})),[w,x]),D=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=lR(j.floating,c.x),r=lR(j.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...XN(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,j.floating,c.x,c.y]);return P.useMemo((()=>({...c,update:T,refs:A,elements:j,floatingStyles:D})),[c,T,A,j,D])}const Xz=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?sR({element:n.current,padding:r}).fn(t):{}:n?sR({element:n,padding:r}).fn(t):{}}}),Qz=(e,t)=>({...bz(e),options:[e,t]}),Zz=(e,t)=>({...Wz(e),options:[e,t]}),Jz=(e,t)=>({...Gz(e),options:[e,t]}),eW=(e,t)=>({...Uz(e),options:[e,t]}),tW=(e,t)=>({...Hz(e),options:[e,t]}),nW=(e,t)=>({...Vz(e),options:[e,t]}),rW=(e,t)=>({...Xz(e),options:[e,t]}),QN="Popper",[ZN,pu]=Er(QN),[oW,JN]=ZN(QN),iW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Je(null);return F(oW,{scope:t,anchor:r,onAnchorChange:o},n)},aW="PopperAnchor",sW=me(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=JN(aW,n),i=Ae(null),l=Rt(t,i);return Le((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:F(at.div,le({},o,{ref:l}))})),e3="PopperContent",[lW,WQ]=ZN(e3),cW=me(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...P}=e,k=JN(e3,c),[S,C]=Je(null),E=Rt(t,(e=>C(e))),[N,O]=Je(null),T=gm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,A=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:D,boundary:M.filter(uW),altBoundary:L},{refs:z,floatingStyles:W,placement:B,isPositioned:$,middlewareData:U}=Yz({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>zz(...e,{animationFrame:"always"===x}),elements:{reference:k.anchor},middleware:[Qz({mainAxis:f+A,alignmentAxis:m}),v&&Zz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?Jz():void 0,...I}),v&&eW({...I}),tW({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),N&&rW({element:N,padding:h}),fW({arrowWidth:R,arrowHeight:A}),w&&nW({strategy:"referenceHidden",...I})]}),[H,V]=t3(B),K=Gr(_);pr((()=>{$&&(null==K||K())}),[$,K]);const q=null===(o=U.arrow)||void 0===o?void 0:o.x,G=null===(a=U.arrow)||void 0===a?void 0:a.y,Y=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=Je();return pr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),F("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},F(lW,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:G,shouldHideArrow:Y},F(at.div,le({"data-side":H,"data-align":V},P,{ref:E,style:{...P.style,animation:$?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function uW(e){return null!==e}const fW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=t3(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function t3(e){const[t,n="center"]=e.split("-");return[t,n]}const Sm=iW,X_=sW,Q_=cW,lx="rovingFocusGroup.onEntryFocus",dW={bubbles:!1,cancelable:!0},Z_="RovingFocusGroup",[Tw,n3,pW]=W_(Z_),[hW,hu]=Er(Z_,[pW]),[vW,mW]=hW(Z_),gW=me(((e,t)=>F(Tw.Provider,{scope:e.__scopeRovingFocusGroup},F(Tw.Slot,{scope:e.__scopeRovingFocusGroup},F(yW,le({},e,{ref:t})))))),yW=me(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=Ae(null),f=Rt(t,d),p=Zd(a),[m=null,h]=Go({prop:i,defaultProp:l,onChange:u}),[v,g]=Je(!1),y=Gr(s),b=n3(n),w=Ae(!1),[x,_]=Je(0);return Le((()=>{const e=d.current;if(e)return e.addEventListener(lx,y),()=>e.removeEventListener(lx,y)}),[y]),F(vW,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:nt((e=>h(e)),[h]),onItemShiftTab:nt((()=>g(!0)),[]),onFocusableItemAdd:nt((()=>_((e=>e+1))),[]),onFocusableItemRemove:nt((()=>_((e=>e-1))),[])},F(at.div,le({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:We(e.onMouseDown,(()=>{w.current=!0})),onFocus:We(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(lx,dW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));r3([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:We(e.onBlur,(()=>g(!1)))})))})),bW="RovingFocusGroupItem",xW=me(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=co(),u=a||l,s=mW(bW,n),c=s.currentTabStopId===u,d=n3(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return Le((()=>{if(r)return f(),()=>p()}),[r,f,p]),F(Tw.ItemSlot,{scope:n,id:u,focusable:r,active:o},F(at.span,le({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:We(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:We(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:We(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=$W(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=s.loop?SW(n,r+1):n.slice(r+1)}setTimeout((()=>r3(n)))}}))})))})),wW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _W(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function $W(e,t,n){const r=_W(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return wW[r]}function r3(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const J_=gW,e$=xW,Ow=["Enter"," "],CW=["ArrowDown","PageUp","Home"],o3=["ArrowUp","PageDown","End"],EW=[...CW,...o3],PW={ltr:[...Ow,"ArrowRight"],rtl:[...Ow,"ArrowLeft"]},RW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cm="Menu",[kd,TW,OW]=W_(Cm),[_l,i3]=Er(Cm,[OW,pu,hu]),Em=pu(),a3=hu(),[s3,us]=_l(Cm),[AW,ep]=_l(Cm),NW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Em(t),[u,s]=Je(null),c=Ae(!1),d=Gr(a),f=Zd(o);return Le((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),F(Sm,l,F(s3,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},F(AW,{scope:t,onClose:nt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},l3=me(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Em(n);return F(X_,le({},o,r,{ref:t}))})),c3="MenuPortal",[DW,u3]=_l(c3,{forceMount:void 0}),IW=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=us(c3,t);return F(DW,{scope:t,forceMount:n},F(No,{present:n||a.open},F(Xw,{asChild:!0,container:o},r)))},Vo="MenuContent",[kW,t$]=_l(Vo),MW=me(((e,t)=>{const n=u3(Vo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=us(Vo,e.__scopeMenu),i=ep(Vo,e.__scopeMenu);return F(kd.Provider,{scope:e.__scopeMenu},F(No,{present:r||a.open},F(kd.Slot,{scope:e.__scopeMenu},i.modal?F(LW,le({},o,{ref:t})):F(jW,le({},o,{ref:t})))))})),LW=me(((e,t)=>{const n=us(Vo,e.__scopeMenu),r=Ae(null),o=Rt(t,r);return Le((()=>{const e=r.current;if(e)return zd(e)}),[]),F(n$,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:We(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),jW=me(((e,t)=>{const n=us(Vo,e.__scopeMenu);return F(n$,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),n$=me(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,v=us(Vo,n),g=ep(Vo,n),y=Em(n),b=a3(n),w=TW(n),[x,_]=Je(null),P=Ae(null),k=Rt(t,P,v.onContentChange),S=Ae(0),C=Ae(""),E=Ae(0),N=Ae(null),O=Ae("right"),T=Ae(0),R=m?qd:ls,A=m?{as:pl,allowPinchZoom:!0}:void 0;Le((()=>()=>window.clearTimeout(S.current)),[]),Qw();const j=nt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&iU(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return F(kW,{scope:n,searchRef:C,onItemEnter:nt((e=>{j(e)&&e.preventDefault()}),[j]),onItemLeave:nt((e=>{var t;j(e)||(null===(t=P.current)||void 0===t||t.focus(),_(null))}),[j]),onTriggerLeave:nt((e=>{j(e)&&e.preventDefault()}),[j]),pointerGraceTimerRef:E,onPointerGraceIntentChange:nt((e=>{N.current=e}),[])},F(R,A,F(Yw,{asChild:!0,trapped:o,onMountAutoFocus:We(a,(e=>{var t;e.preventDefault(),null===(t=P.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},F(Zv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},F(J_,le({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:We(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),F(Q_,le({role:"menu","aria-orientation":"vertical","data-state":g3(v.open),"data-radix-menu-content":"",dir:g.dir},y,h,{ref:k,style:{outline:"none",...h.style},onKeyDown:We(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=C.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=rU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=P.current;if(e.target!==o||!EW.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));o3.includes(e.key)&&a.reverse(),tU(a)})),onBlur:We(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:We(e.onPointerMove,Md((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),f3=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({role:"group"},r,{ref:t}))})),FW=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({},r,{ref:t}))})),Aw="MenuItem",cR="menu.itemSelect",r$=me(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=Ae(null),i=ep(Aw,e.__scopeMenu),l=t$(Aw,e.__scopeMenu),u=Rt(t,a),s=Ae(!1);return F(d3,le({},o,{ref:u,disabled:n,onClick:We(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(cR,{bubbles:!0,cancelable:!0});e.addEventListener(cR,(e=>null==r?void 0:r(e)),{once:!0}),WT(e,t),t.defaultPrevented?s.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:We(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:We(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Ow.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),d3=me(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=t$(Aw,n),l=a3(n),u=Ae(null),s=Rt(t,u),[c,d]=Je(!1),[f,p]=Je("");return Le((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),F(kd.ItemSlot,{scope:n,disabled:r,textValue:o??f},F(e$,le({asChild:!0},l,{focusable:!r}),F(at.div,le({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:We(e.onPointerMove,Md((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:We(e.onPointerLeave,Md((e=>i.onItemLeave(e)))),onFocus:We(e.onFocus,(()=>d(!0))),onBlur:We(e.onBlur,(()=>d(!1)))}))))})),BW=me(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return F(h3,{scope:e.__scopeMenu,checked:n},F(r$,le({role:"menuitemcheckbox","aria-checked":Bv(n)?"mixed":n},o,{ref:t,"data-state":o$(n),onSelect:We(o.onSelect,(()=>null==r?void 0:r(!!Bv(n)||!n)),{checkForDefaultPrevented:!1})})))})),qW="MenuRadioGroup",[zW,WW]=_l(qW,{value:void 0,onValueChange:()=>{}}),UW=me(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Gr(r);return F(zW,{scope:e.__scopeMenu,value:n,onValueChange:a},F(f3,le({},o,{ref:t})))})),HW="MenuRadioItem",VW=me(((e,t)=>{const{value:n,...r}=e,o=WW(HW,e.__scopeMenu),a=n===o.value;return F(h3,{scope:e.__scopeMenu,checked:a},F(r$,le({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":o$(a),onSelect:We(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),p3="MenuItemIndicator",[h3,GW]=_l(p3,{checked:!1}),KW=me(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=GW(p3,n);return F(No,{present:r||Bv(a.checked)||!0===a.checked},F(at.span,le({},o,{ref:t,"data-state":o$(a.checked)})))})),YW=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),v3="MenuSub",[XW,m3]=_l(v3),QW=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=us(v3,t),i=Em(t),[l,u]=Je(null),[s,c]=Je(null),d=Gr(o);return Le((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),F(Sm,i,F(s3,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},F(XW,{scope:t,contentId:co(),triggerId:co(),trigger:l,onTriggerChange:u},n)))},gv="MenuSubTrigger",ZW=me(((e,t)=>{const n=us(gv,e.__scopeMenu),r=ep(gv,e.__scopeMenu),o=m3(gv,e.__scopeMenu),a=t$(gv,e.__scopeMenu),i=Ae(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=nt((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return Le((()=>c),[c]),Le((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),F(l3,le({asChild:!0},s),F(d3,le({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":g3(n.open)},e,{ref:Qv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:We(e.onPointerMove,Md((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:We(e.onPointerLeave,Md((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,u=i?-5:5,s=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:We(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!PW[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),JW="MenuSubContent",eU=me(((e,t)=>{const n=u3(Vo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=us(Vo,e.__scopeMenu),i=ep(Vo,e.__scopeMenu),l=m3(JW,e.__scopeMenu),u=Ae(null),s=Rt(t,u);return F(kd.Provider,{scope:e.__scopeMenu},F(No,{present:r||a.open},F(kd.Slot,{scope:e.__scopeMenu},F(n$,le({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:We(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:We(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:We(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=RW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function g3(e){return e?"open":"closed"}function Bv(e){return"indeterminate"===e}function o$(e){return Bv(e)?"indeterminate":e?"checked":"unchecked"}function tU(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function rU(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=nU(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function oU(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function iU(e,t){if(!t)return!1;return oU({x:e.clientX,y:e.clientY},t)}function Md(e){return t=>"mouse"===t.pointerType?e(t):void 0}const aU=NW,sU=l3,lU=IW,cU=MW,uU=f3,fU=FW,dU=r$,pU=BW,hU=UW,vU=VW,mU=KW,gU=YW,yU=QW,bU=ZW,xU=eU,y3="DropdownMenu",[wU,UQ]=Er(y3,[i3]),Tr=i3(),[_U,b3]=wU(y3),$U=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=Tr(t),s=Ae(null),[c=!1,d]=Go({prop:o,defaultProp:a,onChange:i});return F(_U,{scope:t,triggerId:co(),triggerRef:s,contentId:co(),open:c,onOpenChange:d,onOpenToggle:nt((()=>d((e=>!e))),[d]),modal:l},F(aU,le({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},SU="DropdownMenuTrigger",CU=me(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=b3(SU,n),i=Tr(n);return F(sU,le({asChild:!0},i),F(at.button,le({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Qv(t,a.triggerRef),onPointerDown:We(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:We(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),EU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tr(t);return F(lU,le({},r,n))},PU="DropdownMenuContent",RU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=b3(PU,n),a=Tr(n),i=Ae(!1);return F(cU,le({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:We(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:We(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),TU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(uU,le({},o,r,{ref:t}))})),OU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(fU,le({},o,r,{ref:t}))})),AU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(dU,le({},o,r,{ref:t}))})),NU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(pU,le({},o,r,{ref:t}))})),DU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(hU,le({},o,r,{ref:t}))})),IU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(vU,le({},o,r,{ref:t}))})),kU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(mU,le({},o,r,{ref:t}))})),MU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(gU,le({},o,r,{ref:t}))})),LU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Tr(t),[l=!1,u]=Go({prop:r,defaultProp:a,onChange:o});return F(yU,le({},i,{open:l,onOpenChange:u}),n)},jU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(bU,le({},o,r,{ref:t}))})),FU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(xU,le({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),BU=$U,qU=CU,x3=EU,w3=RU,zU=TU,_3=OU,$3=AU,S3=NU,WU=DU,C3=IU,UU=kU,i$=MU,HU=LU,E3=jU,P3=FU,HQ=BU,VQ=qU,GQ=zU,KQ=x3,YQ=HU,XQ=WU,VU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(E3,{ref:o,className:se("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,k.jsx(DT,{className:"ml-auto h-4 w-4"})]})));VU.displayName=E3.displayName;const GU=P.forwardRef((({className:e,...t},n)=>k.jsx(P3,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));GU.displayName=P3.displayName;const KU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(x3,{children:k.jsx(w3,{ref:r,sideOffset:t,className:se("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-slate-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...n})})));KU.displayName=w3.displayName;const YU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx($3,{ref:r,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));YU.displayName=$3.displayName;const XU=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=k.jsx(k_,{size:"default",variant:"default",checked:n});return k.jsxs(S3,{ref:a,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));XU.displayName=S3.displayName;const QU=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(UU,{children:k.jsx(Ww,{size:20})})});return k.jsxs(C3,{ref:o,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));QU.displayName=C3.displayName;const ZU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(_3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));ZU.displayName=_3.displayName;const JU=P.forwardRef((({className:e,...t},n)=>k.jsx(i$,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));JU.displayName=i$.displayName;const eH=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});eH.displayName="DropdownMenuShortcut";const tH=me(((e,t)=>F(at.label,le({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),R3=tH,nH=ea("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T3=P.forwardRef((({className:e,...t},n)=>k.jsx(R3,{ref:n,className:se(nH(),e),...t})));function uR(e,[t,n]){return Math.min(n,Math.max(t,e))}T3.displayName=R3.displayName;const O3=me(((e,t)=>F(at.span,le({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),rH=O3,oH=[" ","Enter","ArrowUp","ArrowDown"],iH=[" ","Enter"],Pm="Select",[Rm,Tm,aH]=W_(Pm),[vu,QQ]=Er(Pm,[aH,pu]),a$=pu(),[sH,$l]=vu(Pm),[lH,cH]=vu(Pm),uH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:p}=e,m=a$(t),[h,v]=Je(null),[g,y]=Je(null),[b,w]=Je(!1),x=Zd(s),[_=!1,P]=Go({prop:r,defaultProp:o,onChange:a}),[k,S]=Go({prop:i,defaultProp:l,onChange:u}),C=Ae(null),E=!h||!!h.closest("form"),[N,O]=Je(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return F(Sm,m,F(sH,{required:p,scope:t,trigger:h,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:co(),value:k,onValueChange:S,open:_,onOpenChange:P,dir:x,triggerPointerDownPosRef:C,disabled:f},F(Rm.Provider,{scope:t},F(lH,{scope:e.__scopeSelect,onNativeOptionAdd:nt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:nt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?F(k3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>S(e.target.value),disabled:f},void 0===k?F("option",{value:""}):null,Array.from(N)):null))},fH="SelectTrigger",dH=me(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=a$(n),i=$l(fH,n),l=i.disabled||r,u=Rt(t,i.onTriggerChange),s=Tm(n),[c,d,f]=M3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=L3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return F(X_,le({asChild:!0},a),F(at.button,le({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":I3(i.value)?"":void 0},o,{ref:u,onClick:We(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:We(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:We(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&oH.includes(e.key)&&(p(),e.preventDefault())}))})))})),pH="SelectValue",hH=me(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=$l(pH,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=Rt(t,u.onValueNodeChange);return pr((()=>{s(c)}),[s,c]),F(at.span,le({},l,{ref:d,style:{pointerEvents:"none"}}),I3(u.value)?F(ls,null,i):a)})),vH=me(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return F(at.span,le({"aria-hidden":!0},o,{ref:t}),r||"▼")})),mH=e=>F(Xw,le({asChild:!0},e)),nu="SelectContent",gH=me(((e,t)=>{const n=$l(nu,e.__scopeSelect),[r,o]=Je();if(pr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?$i.createPortal(F(A3,{scope:e.__scopeSelect},F(Rm.Slot,{scope:e.__scopeSelect},F("div",null,e.children))),t):null}return F(yH,le({},e,{ref:t}))})),Ki=10,[A3,Sl]=vu(nu),yH=me(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:v,...g}=e,y=$l(nu,n),[b,w]=Je(null),[x,_]=Je(null),P=Rt(t,(e=>w(e))),[k,S]=Je(null),[C,E]=Je(null),N=Tm(n),[O,T]=Je(!1),R=Ae(!1);Le((()=>{if(b)return zd(b)}),[b]),Qw();const A=nt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),j=nt((()=>A([k,b])),[A,k,b]);Le((()=>{O&&j()}),[O,j]);const{onOpenChange:D,triggerPointerDownPosRef:M}=y;Le((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=M.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||D(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,D,M]),Le((()=>{const e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[D]);const[L,I]=M3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=L3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=nt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=nt((()=>null==b?void 0:b.focus()),[b]),B=nt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),$="popper"===r?fR:bH,U=$===fR?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:v}:{};return F(A3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:z,selectedItem:k,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:j,selectedItemText:C,position:r,isPositioned:O,searchRef:L},F(qd,{as:pl,allowPinchZoom:!0},F(Yw,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:We(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},F(Zv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},F($,le({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>T(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:We(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>A(t))),e.preventDefault()}}))}))))))})),bH=me(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=$l(nu,n),i=Sl(nu,n),[l,u]=Je(null),[s,c]=Je(null),d=Rt(t,(e=>c(e))),f=Tm(n),p=Ae(!1),m=Ae(!0),{viewport:h,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=i,b=nt((()=>{if(a.trigger&&a.valueNode&&l&&s&&h&&v&&g){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=g.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Ki,d=uR(a,[Ki,c-s]);l.style.minWidth=u+"px",l.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Ki,d=uR(a,[Ki,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Ki,c=h.scrollHeight,d=window.getComputedStyle(s),m=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(h),P=parseInt(_.paddingTop,10),k=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Ki,C=u-S,E=v.offsetHeight/2,N=m+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-h.offsetTop-h.offsetHeight,n=N+Math.max(C,E+(e?k:0)+t+b);l.style.height=n+"px"}else{const e=v===i[0].ref.current;l.style.top="0px";const t=Math.max(S,m+h.offsetTop+(e?P:0)+E)+O;l.style.height=t+"px",h.scrollTop=N-S+h.offsetTop}l.style.margin=`${Ki}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,s,h,v,g,a.dir,r]);pr((()=>b()),[b]);const[w,x]=Je();pr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=nt((e=>{e&&!0===m.current&&(b(),null==y||y(),m.current=!1)}),[b,y]);return F(xH,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},F("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},F(at.div,le({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),fR=me(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ki,...a}=e,i=a$(n);return F(Q_,le({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}}))})),[xH,s$]=vu(nu,{}),dR="SelectViewport",wH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Sl(dR,n),a=s$(dR,n),i=Rt(t,o.onViewportChange),l=Ae(0);return F(ls,null,F("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}"}}),F(Rm.Slot,{scope:n},F(at.div,le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:We(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Ki,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),_H="SelectGroup",[$H,SH]=vu(_H),CH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=co();return F($H,{scope:n,id:o},F(at.div,le({role:"group","aria-labelledby":o},r,{ref:t})))})),EH="SelectLabel",PH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=SH(EH,n);return F(at.div,le({id:o.id},r,{ref:t}))})),Nw="SelectItem",[RH,N3]=vu(Nw),TH=me(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=$l(Nw,n),u=Sl(Nw,n),s=l.value===r,[c,d]=Je(a??""),[f,p]=Je(!1),m=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=co(),v=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return F(RH,{scope:n,value:r,disabled:o,textId:h,isSelected:s,onItemTextChange:nt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},F(Rm.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},F(at.div,le({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:m,onFocus:We(i.onFocus,(()=>p(!0))),onBlur:We(i.onBlur,(()=>p(!1))),onPointerUp:We(i.onPointerUp,v),onPointerMove:We(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:We(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:We(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(iH.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),yv="SelectItemText",OH=me(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=$l(yv,n),l=Sl(yv,n),u=N3(yv,n),s=cH(yv,n),[c,d]=Je(null),f=Rt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=Vr((()=>F("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=s;return pr((()=>(h(m),()=>v(m))),[h,v,m]),F(ls,null,F(at.span,le({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?$i.createPortal(a.children,i.valueNode):null)})),AH="SelectItemIndicator",NH=me(((e,t)=>{const{__scopeSelect:n,...r}=e;return N3(AH,n).isSelected?F(at.span,le({"aria-hidden":!0},r,{ref:t})):null})),pR="SelectScrollUpButton",DH=me(((e,t)=>{const n=Sl(pR,e.__scopeSelect),r=s$(pR,e.__scopeSelect),[o,a]=Je(!1),i=Rt(t,r.onScrollButtonChange);return pr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?F(D3,le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),hR="SelectScrollDownButton",IH=me(((e,t)=>{const n=Sl(hR,e.__scopeSelect),r=s$(hR,e.__scopeSelect),[o,a]=Je(!1),i=Rt(t,r.onScrollButtonChange);return pr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?F(D3,le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),D3=me(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Sl("SelectScrollButton",n),i=Ae(null),l=Tm(n),u=nt((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return Le((()=>()=>u()),[u]),pr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),F(at.div,le({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:We(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:We(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:We(o.onPointerLeave,(()=>{u()}))}))})),kH=me(((e,t)=>{const{__scopeSelect:n,...r}=e;return F(at.div,le({"aria-hidden":!0},r,{ref:t}))}));function I3(e){return""===e||void 0===e}const k3=me(((e,t)=>{const{value:n,...r}=e,o=Ae(null),a=Rt(t,o),i=mm(n);return Le((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),F(O3,{asChild:!0},F("select",le({},r,{ref:a,defaultValue:n})))}));function M3(e){const t=Gr(e),n=Ae(""),r=Ae(0),o=nt((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=nt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return Le((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function L3(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=MH(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function MH(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}k3.displayName="BubbleSelect";const j3=uH,F3=dH,B3=hH,LH=vH,jH=mH,q3=gH,FH=wH,z3=CH,W3=PH,U3=TH,BH=OH,qH=NH,H3=DH,V3=IH,G3=kH,zH=j3,K3=P.forwardRef((({...e},t)=>k.jsx(zH,{ref:t,...e})));K3.displayName=j3.displayName;const Y3=P.forwardRef(((e,t)=>k.jsx(z3,{ref:t,...e})));Y3.displayName=z3.displayName;const X3=P.forwardRef(((e,t)=>k.jsx(B3,{ref:t,...e})));X3.displayName=B3.displayName;const l$=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a=()=>k.jsx(AT,{size:20}),...i},l)=>k.jsxs("div",{className:"w-full",children:[k.jsxs(F3,{ref:l,className:se("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(LH,{asChild:!0,children:a()})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(kT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx(c7,{size:16}),n]}):null]})));l$.displayName="SelectTriggerWrapper";const Q3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsx(l$,{ref:i,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));Q3.displayName=F3.displayName;const Z3=P.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=P.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(P.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return k.jsx(jH,{children:k.jsx(q3,{ref:o,className:se("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:k.jsx(FH,{className:se("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));Z3.displayName=q3.displayName;const J3=P.forwardRef((({className:e,...t},n)=>k.jsx(W3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));J3.displayName=W3.displayName;const eD=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=k.jsx(qH,{children:k.jsx(Ww,{size:20})});return k.jsxs(U3,{ref:a,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(BH,{children:r})}),t&&"right"===n&&i]})}));eD.displayName=U3.displayName;const tD=P.forwardRef((({className:e,...t},n)=>k.jsx(G3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));tD.displayName=G3.displayName;const WH=(e,t)=>{const n=P.useRef(null),[r,o]=P.useState(e.length);return P.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-slate-100 text-sm font-medium text-slate-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-slate-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},UH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=WH(t,r),d=t.length-c;return k.jsx(l$,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(_F,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(M2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(M2,{text:`+${d}`})]})})})}));UH.displayName="SelectMultiTrigger";const HH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},u)=>{const s=n?k.jsx(IT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(k_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&s]})}));HH.displayName="SelectCheckboxItem";const VH=P.forwardRef((({className:e,...t},n)=>k.jsx(H3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(i7,{size:16})})));VH.displayName=H3.displayName;const GH=P.forwardRef((({className:e,...t},n)=>k.jsx(V3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(AT,{size:16})})));GH.displayName=V3.displayName;const KH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));KH.displayName="SelectActions";const YH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));YH.displayName="SelectFooter";const ZQ=F6,nD=P.createContext({}),JQ=({...e})=>k.jsx(nD.Provider,{value:{name:e.name},children:k.jsx(B6,{...e})}),fs=()=>{const e=P.useContext(nD),t=P.useContext(rD),n=q6();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},rD=P.createContext({}),XH=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(rD.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));XH.displayName="FormItem";const QH=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=fs();return k.jsx(T3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));QH.displayName="FormLabel";const ZH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=fs();return k.jsx(cs,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));ZH.displayName="FormControl";const JH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=fs();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));JH.displayName="FormDescription";const eV=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=fs(),i=o?String(null==o?void 0:o.message):t;return i?k.jsxs("p",{ref:r,id:a,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(kT,{size:16,className:"text-red-dark"})," ",i]}):null}));eV.displayName="FormMessage";const tV=P.forwardRef((({...e},t)=>{const{name:n}=fs();return k.jsx(K3,{ref:t,name:n,...e})}));tV.displayName="FormSelect";const nV=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=fs();return k.jsx(Q3,{ref:r,id:o,className:e,...n,children:t})}));nV.displayName="FormSelectTrigger";const rV=P.forwardRef(((e,t)=>k.jsx(Z3,{ref:t,...e})));rV.displayName="FormSelectContent";const oV=P.forwardRef(((e,t)=>k.jsx(eD,{ref:t,...e})));oV.displayName="FormSelectItem";const iV=P.forwardRef(((e,t)=>k.jsx(Y3,{ref:t,...e})));iV.displayName="FormSelectGroup";const aV=P.forwardRef(((e,t)=>k.jsx(J3,{ref:t,...e})));aV.displayName="FormSelectLabel";const sV=P.forwardRef(((e,t)=>k.jsx(tD,{ref:t,...e})));sV.displayName="FormSelectSeparator";const lV=P.forwardRef(((e,t)=>k.jsx(X3,{ref:t,...e})));function dr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function c$(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Ja(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Vr((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Ja(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=Vr((()=>i),Object.values(i));return F(l.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,u=ru(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},cV(r,...t)]}function cV(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return Vr((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function is(e){const t=Ae(e);return Le((()=>{t.current=e})),Vr((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function oD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=uV({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=is(n);return[i,nt((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function uV({defaultProp:e,onChange:t}){const n=Je(e),[r]=n,o=Ae(r),a=is(t);return Le((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function fV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function dV(...e){return t=>e.forEach((e=>fV(e,t)))}function pV(...e){return nt(dV(...e),e)}function Cl(e){return e.split("-")[0]}function tp(e){return e.split("-")[1]}function mu(e){return["top","bottom"].includes(Cl(e))?"x":"y"}function u$(e){return"y"===e?"height":"width"}function vR(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,l=mu(t),u=u$(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(Cl(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(tp(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}lV.displayName="FormSelectValue";const hV=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=vR(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:h}=a[n],{x:v,y:g,data:y,reset:b}=await h({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=vR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function iD(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function qv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Ld(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=iD(p),h=l[f?"floating"===d?"reference":"floating":d],v=qv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=qv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),strategy:u}):i[d]);return{top:v.top-g.top+m.top,bottom:g.bottom-v.bottom+m.bottom,left:v.left-g.left+m.left,right:g.right-v.right+m.right}}const vV=Math.min,ll=Math.max;function Dw(e,t,n){return ll(e,vV(t,n))}const mR=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:u}=t;if(null==n)return{};const s=iD(r),c={x:o,y:a},d=mu(i),f=tp(i),p=u$(d),m=await u.getDimensions(n),h="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[h],P=w-m[p]-s[v],k=w/2-m[p]/2+x,S=Dw(_,k,P),C=("start"===f?s[h]:s[v])>0&&k!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?k<_?_-k:P-k:0),data:{[d]:S,centerOffset:k-S}}}}),mV={left:"right",right:"left",bottom:"top",top:"bottom"};function zv(e){return e.replace(/left|right|bottom|top/g,(e=>mV[e]))}function gV(e,t,n){void 0===n&&(n=!1);const r=tp(e),o=mu(e),a=u$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=zv(i)),{main:i,cross:zv(i)}}const yV={start:"end",end:"start"};function gR(e){return e.replace(/start|end/g,(e=>yV[e]))}const aD=["top","right","bottom","left"];aD.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const bV=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=Cl(r),v=[i,...d||(h!==i&&p?function(e){const t=zv(e);return[gR(e),t,gR(t)]}(i):[zv(i)])],g=await Ld(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[h]),c){const{main:e,cross:t}=gV(r,a,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function yR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bR(e){return aD.some((t=>e[t]>=0))}const xV=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=yR(await Ld(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:bR(t)}}}case"escaped":{const t=yR(await Ld(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:bR(t)}}}default:return{}}}}},wV=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Cl(n),l=tp(n),u="x"===mu(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function sD(e){return"x"===e?"y":"x"}const _V=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,s={x:n,y:r},c=await Ld(t,u),d=mu(Cl(o)),f=sD(d);let p=s[d],m=s[f];if(a){const e="y"===d?"bottom":"right";p=Dw(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=Dw(m+c["y"===f?"top":"left"],m,m-c[e])}const h=l.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},$V=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=mu(o),f=sD(d);let p=c[d],m=c[f];const h="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+v.mainAxis,n=a.reference[d]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(Cl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},SV=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...l}=e,u=await Ld(t,l),s=Cl(n),c=tp(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=ll(u.left,0),m=ll(u.right,0),h=ll(u.top,0),v=ll(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==v?h+v:ll(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:ll(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function lD(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ia(e){if(null==e)return window;if(!lD(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function np(e){return ia(e).getComputedStyle(e)}function Yi(e){return lD(e)?"":e?(e.nodeName||"").toLowerCase():""}function cD(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function _i(e){return e instanceof ia(e).HTMLElement}function as(e){return e instanceof ia(e).Element}function f$(e){return!(typeof ShadowRoot>"u")&&(e instanceof ia(e).ShadowRoot||e instanceof ShadowRoot)}function Om(e){const{overflow:t,overflowX:n,overflowY:r}=np(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function CV(e){return["table","td","th"].includes(Yi(e))}function xR(e){const t=/firefox/i.test(cD()),n=np(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function uD(){return!/^((?!chrome|android).)*safari/i.test(cD())}const wR=Math.min,$d=Math.max,Wv=Math.round;function Xi(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&_i(e)&&(u=e.offsetWidth>0&&Wv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Wv(l.height)/e.offsetHeight||1);const c=as(e)?ia(e):window,d=!uD()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/s,m=l.width/u,h=l.height/s;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function Za(e){return(t=e,(t instanceof ia(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Am(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fD(e){return Xi(Za(e)).left+Am(e).scrollLeft}function EV(e,t,n){const r=_i(t),o=Za(t),a=Xi(e,r&&function(e){const t=Xi(e);return Wv(t.width)!==e.offsetWidth||Wv(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Yi(t)||Om(o))&&(i=Am(t)),_i(t)){const e=Xi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=fD(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function dD(e){return"html"===Yi(e)?e:e.assignedSlot||e.parentNode||(f$(e)?e.host:null)||Za(e)}function _R(e){return _i(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Iw(e){const t=ia(e);let n=_R(e);for(;n&&CV(n)&&"static"===getComputedStyle(n).position;)n=_R(n);return n&&("html"===Yi(n)||"body"===Yi(n)&&"static"===getComputedStyle(n).position&&!xR(n))?t:n||function(e){let t=dD(e);for(f$(t)&&(t=t.host);_i(t)&&!["html","body"].includes(Yi(t));){if(xR(t))return t;t=t.parentNode}return null}(e)||t}function $R(e){if(_i(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Xi(e);return{width:t.width,height:t.height}}function pD(e){const t=dD(e);return["html","body","#document"].includes(Yi(t))?e.ownerDocument.body:_i(t)&&Om(t)?t:pD(t)}function Uv(e,t){var n;void 0===t&&(t=[]);const r=pD(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=ia(r),i=o?[a].concat(a.visualViewport||[],Om(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Uv(i))}function SR(e,t,n){return"viewport"===t?qv(function(e,t){const n=ia(e),r=Za(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=uD();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):as(t)?function(e,t){const n=Xi(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):qv(function(e){var t;const n=Za(e),r=Am(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=$d(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=$d(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+fD(e);const u=-r.scrollTop;return"rtl"===np(o||n).direction&&(l+=$d(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Za(e)))}function PV(e){const t=Uv(e),n=["absolute","fixed"].includes(np(e).position)&&_i(e)?Iw(e):e;return as(n)?t.filter((e=>as(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&f$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Yi(e))):[]}const RV={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?PV(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=SR(t,n,o);return e.top=$d(r.top,e.top),e.right=wR(r.right,e.right),e.bottom=wR(r.bottom,e.bottom),e.left=$d(r.left,e.left),e}),SR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=_i(n),a=Za(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Yi(n)||Om(a))&&(i=Am(n)),_i(n))){const e=Xi(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+l.x,y:t.y-i.scrollTop+l.y}},isElement:as,getDimensions:$R,getOffsetParent:Iw,getDocumentElement:Za,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:EV(t,Iw(n),r),floating:{...$R(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===np(e).direction};function TV(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,u=o&&!l,s=a&&!l,c=u||s?[...as(e)?Uv(e):[],...Uv(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),as(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Xi(e):null;return l&&function t(){const r=Xi(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const OV=(e,t,n)=>hV(e,t,{platform:RV,...n});var kw=typeof document<"u"?ou:Le;function Mw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Mw(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Mw(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function AV(e){const t=P.useRef(e);return kw((()=>{t.current=e})),t}function NV(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=P.useRef(null),i=P.useRef(null),l=AV(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Mw(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!a.current||!i.current||OV(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&$i.flushSync((()=>{c(e)}))}))}),[d,n,r]);kw((()=>{m.current&&p()}),[p]);const m=P.useRef(!1);kw((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=P.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{a.current=e,h()}),[h]),g=P.useCallback((e=>{i.current=e,h()}),[h]),y=P.useMemo((()=>({reference:a,floating:i})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const DV=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?mR({element:t.current,padding:n}).fn(e):{}:t?mR({element:t,padding:n}).fn(e):{}}};function IV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function kV(...e){return t=>e.forEach((e=>IV(e,t)))}const hD=me(((e,t)=>{const{children:n,...r}=e,o=qn.toArray(n),a=o.find(LV);if(a){const e=a.props.children,n=o.map((t=>t===a?qn.count(e)>1?qn.only(null):fo(e)?e.props.children:null:t));return F(Lw,le({},r,{ref:t}),fo(e)?Ji(e,void 0,n):null)}return F(Lw,le({},r,{ref:t}),n)}));hD.displayName="Slot";const Lw=me(((e,t)=>{const{children:n,...r}=e;return fo(n)?Ji(n,{...jV(r,n.props),ref:kV(t,n.ref)}):qn.count(n)>1?qn.only(null):null}));Lw.displayName="SlotClone";const MV=({children:e})=>F(ls,null,e);function LV(e){return fo(e)&&e.type===MV}function jV(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const FV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ss=FV.reduce(((e,t)=>{const n=me(((e,n)=>{const{asChild:r,...o}=e,a=r?hD:t;return Le((()=>{window[Symbol.for("radix-ui")]=!0}),[]),F(a,le({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function BV(e,t){e&&$i.flushSync((()=>e.dispatchEvent(t)))}function qV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function zV(...e){return t=>e.forEach((e=>qV(e,t)))}function vD(...e){return nt(zV(...e),e)}const Xa=null!=globalThis&&globalThis.document?ou:()=>{};function WV(e){const[t,n]=Je(void 0);return Xa((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const mD="Popper",[d$,Nm]=c$(mD),[UV,gD]=d$(mD),HV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Je(null);return F(UV,{scope:t,anchor:r,onAnchorChange:o},n)},VV="PopperAnchor",GV=me(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=gD(VV,n),i=Ae(null),l=vD(t,i);return Le((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:F(ss.div,le({},o,{ref:l}))})),Hv="PopperContent",[KV,eZ]=d$(Hv),[YV,XV]=d$(Hv,{hasParent:!1,positionUpdateFns:new Set}),QV=me(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,P=gD(Hv,c),[k,S]=Je(null),C=vD(t,(e=>S(e))),[E,N]=Je(null),O=WV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,A=d+("center"!==p?"-"+p:""),j="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},D=Array.isArray(v)?v:[v],M=D.length>0,L={padding:j,boundary:D.filter(JV),altBoundary:M},{reference:I,floating:z,strategy:W,x:B,y:$,placement:U,middlewareData:H,update:V}=NV({strategy:"fixed",placement:A,whileElementsMounted:TV,middleware:[eG(),wV({mainAxis:f+R,alignmentAxis:m}),w?_V({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?$V():void 0,...L}):void 0,E?DV({element:E,padding:h}):void 0,w?bV({...L}):void 0,SV({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),tG({arrowWidth:T,arrowHeight:R}),b?xV({strategy:"referenceHidden"}):void 0].filter(ZV)});Xa((()=>{I(P.anchor)}),[I,P.anchor]);const K=null!==B&&null!==$,[q,G]=yD(U),Y=is(x);Xa((()=>{K&&(null==Y||Y())}),[K,Y]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=null===(a=H.arrow)||void 0===a?void 0:a.y,J=0!==(null===(i=H.arrow)||void 0===i?void 0:i.centerOffset),[Z,ee]=Je();Xa((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=XV(Hv,c),re=!te;ou((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),Xa((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":G,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return F("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round($)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},F(KV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:J},re?F(YV,{scope:c,hasParent:!0,positionUpdateFns:ne},F(ss.div,oe)):F(ss.div,oe)))}));function ZV(e){return void 0!==e}function JV(e){return null!==e}const eG=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),tG=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=yD(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function yD(e){const[t,n="center"]=e.split("-");return[t,n]}const bD=HV,p$=GV,xD=QV,wD=me(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Gw.createPortal(F(ss.div,le({},o,{ref:t})),r):null}));function nG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function rG(...e){return t=>e.forEach((e=>nG(e,t)))}function oG(...e){return nt(rG(...e),e)}function iG(e,t){return ET(((e,n)=>t[e][n]??e),e)}const rp=e=>{const{present:t,children:n}=e,r=aG(t),o="function"==typeof n?n({present:r.isPresent}):qn.only(n),a=oG(r.ref,o.ref);return"function"==typeof n||r.isPresent?Ji(o,{ref:a}):null};function aG(e){const[t,n]=Je(),r=Ae({}),o=Ae(e),a=Ae("none"),i=e?"mounted":"unmounted",[l,u]=iG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Le((()=>{const e=bv(r.current);a.current="mounted"===l?e:"none"}),[l]),Xa((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=bv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xa((()=>{if(t){const e=e=>{const n=bv(r.current).includes(e.animationName);e.target===t&&n&&$i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=bv(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:nt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function bv(e){return(null==e?void 0:e.animationName)||"none"}function sG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function lG(...e){return t=>e.forEach((e=>sG(e,t)))}function cG(...e){return nt(lG(...e),e)}function uG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e);Le((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}rp.displayName="Presence";const jw="dismissableLayer.update",fG="dismissableLayer.pointerDownOutside",dG="dismissableLayer.focusOutside";let CR;const pG=Ja({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_D=me(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=ru(pG),[d,f]=Je(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=Je({}),h=cG(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=hG((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),P=vG((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p);return uG((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),Le((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(CR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ER(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=CR)}}),[d,p,r,c]),Le((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ER())}),[d,c]),Le((()=>{const e=()=>m({});return document.addEventListener(jw,e),()=>document.removeEventListener(jw,e)}),[]),F(ss.div,le({},s,{ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:dr(e.onFocusCapture,P.onFocusCapture),onBlurCapture:dr(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:dr(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function hG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e),r=Ae(!1),o=Ae((()=>{}));return Le((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){$D(fG,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e),r=Ae(!1);return Le((()=>{const e=e=>{e.target&&!r.current&&$D(dG,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ER(){const e=new CustomEvent(jw);document.dispatchEvent(e)}function $D(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?BV(o,a):o.dispatchEvent(a)}let cx;const SD="HoverCard",[CD,tZ]=c$(SD,[Nm]),h$=Nm(),[mG,Dm]=CD(SD),gG=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=h$(t),s=Ae(0),c=Ae(0),d=Ae(!1),f=Ae(!1),[p=!1,m]=oD({prop:r,defaultProp:o,onChange:a}),h=nt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>m(!0)),i)}),[i,m]),v=nt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>m(!1)),l))}),[l,m]),g=nt((()=>m(!1)),[m]);return Le((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),F(mG,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},F(bD,u,n))},yG="HoverCardTrigger",bG=me(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Dm(yG,n),a=h$(n);return F(p$,le({asChild:!0},a),F(ss.a,le({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:dr(e.onPointerEnter,Vv(o.onOpen)),onPointerLeave:dr(e.onPointerLeave,Vv(o.onClose)),onFocus:dr(e.onFocus,o.onOpen),onBlur:dr(e.onBlur,o.onClose),onTouchStart:dr(e.onTouchStart,(e=>e.preventDefault()))})))})),ED="HoverCardPortal",[xG,wG]=CD(ED,{forceMount:void 0}),_G=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Dm(ED,t);return F(xG,{scope:t,forceMount:n},F(rp,{present:n||a.open},F(wD,{asChild:!0,container:o},r)))},Fw="HoverCardContent",$G=me(((e,t)=>{const n=wG(Fw,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Dm(Fw,e.__scopeHoverCard);return F(rp,{present:r||a.open},F(SG,le({"data-state":a.open?"open":"closed"},o,{onPointerEnter:dr(e.onPointerEnter,Vv(a.onOpen)),onPointerLeave:dr(e.onPointerLeave,Vv(a.onClose)),ref:t})))})),SG=me(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Dm(Fw,n),s=h$(n),c=Ae(null),d=pV(t,c),[f,p]=Je(!1);return Le((()=>{if(f){const e=document.body;return cx=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=cx,e.style.webkitUserSelect=cx}}}),[f]),Le((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),Le((()=>{c.current&&CG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),F(_D,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:dr(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},F(xD,le({},s,l,{onPointerDown:dr(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Vv(e){return t=>"touch"===t.pointerType?void 0:e()}function CG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const EG=gG,PG=bG,RG=_G,PD=$G,nZ=EG,rZ=PG,oZ=RG,TG=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(PD,{ref:o,align:t,sideOffset:n,className:se("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));TG.displayName=PD.displayName;const RD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=fs();return k.jsx("input",{type:t,className:se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function OG(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},AG(r,...t)]}function AG(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function PR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function NG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=PR(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():PR(e[t],null)}}}}function DG(e){const t=IG(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(MG);if(i){const e=i.props.children,r=a.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function IG(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=jG(n),o=LG(r,n.props);return n.type!==P.Fragment&&(o.ref=t?NG(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}RD.displayName="Input";var kG=Symbol("radix.slottable");function MG(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===kG}function LG(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jG(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var FG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],TD=FG.reduce(((e,t)=>{const n=DG(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),v$="Progress",m$=100,[BG,iZ]=OG(v$),[qG,zG]=BG(v$),OD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=WG,...i}=e;(o||0===o)&&!RR(o)&&console.error(UG(`${o}`,"Progress"));const l=RR(o)?o:m$;null!==r&&!TR(r,l)&&console.error(HG(`${r}`,"Progress"));const u=TR(r,l)?r:null,s=Gv(u)?a(u,l):void 0;return k.jsx(qG,{scope:n,value:u,max:l,children:k.jsx(TD.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Gv(u)?u:void 0,"aria-valuetext":s,role:"progressbar","data-state":DD(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})}));OD.displayName=v$;var AD="ProgressIndicator",ND=P.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=zG(AD,n);return k.jsx(TD.div,{"data-state":DD(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function WG(e,t){return`${Math.round(e/t*100)}%`}function DD(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Gv(e){return"number"==typeof e}function RR(e){return Gv(e)&&!isNaN(e)&&e>0}function TR(e,t){return Gv(e)&&!isNaN(e)&&e<=t&&e>=0}function UG(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${m$}\`.`}function HG(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${m$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}ND.displayName=AD;var ID=OD,VG=ND;const GG=P.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>k.jsx(ID,{ref:o,className:se("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:k.jsx(VG,{className:se("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));GG.displayName=ID.displayName;const kD="Radio",[KG,MD]=Er(kD),[YG,XG]=KG(kD),QG=me(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=Je(null),f=Rt(t,(e=>d(e))),p=Ae(!1),m=!c||!!c.closest("form");return F(YG,{scope:n,checked:o,disabled:i},F(at.button,le({type:"button",role:"radio","aria-checked":o,"data-state":LD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:We(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&F(eK,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),ZG="RadioIndicator",JG=me(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=XG(ZG,n);return F(No,{present:r||a.checked},F(at.span,le({"data-state":LD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),eK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function LD(e){return e?"checked":"unchecked"}const tK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],jD="RadioGroup",[nK,aZ]=Er(jD,[hu,MD]),FD=hu(),BD=MD(),[rK,oK]=nK(jD),iK=me(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,p=FD(n),m=Zd(s),[h,v]=Go({prop:a,defaultProp:o,onChange:d});return F(rK,{scope:n,name:r,required:i,disabled:l,value:h,onValueChange:v},F(J_,le({asChild:!0},p,{orientation:u,dir:m,loop:c}),F(at.div,le({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:m},f,{ref:t}))))})),aK="RadioGroupItem",sK=me(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=oK(aK,n),i=a.disabled||r,l=FD(n),u=BD(n),s=Ae(null),c=Rt(t,s),d=a.value===o.value,f=Ae(!1);return Le((()=>{const e=e=>{tK.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),F(e$,le({asChild:!0},l,{focusable:!i,active:d}),F(QG,le({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:We((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:We(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),lK=me(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=BD(n);return F(JG,le({},o,r,{ref:t}))})),qD=iK,zD=sK,cK=lK,uK=P.forwardRef((({className:e,...t},n)=>k.jsx(qD,{className:se("grid gap-2",e),...t,ref:n})));uK.displayName=qD.displayName;const fK=P.forwardRef((({className:e,...t},n)=>k.jsx(zD,{ref:n,className:se("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:k.jsx(cK,{className:"flex items-center justify-center",children:k.jsx(s7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));fK.displayName=zD.displayName;const dK=em,sZ=t_,lZ=lu,pK=tm,WD=P.forwardRef((({className:e,...t},n)=>k.jsx(au,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));WD.displayName=au.displayName;const hK=ea("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),UD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>k.jsxs(pK,{children:[k.jsx(WD,{className:se("bg-slate-900/70",n)}),k.jsxs(su,{ref:a,className:se(hK({side:e}),t),...o,children:[r,k.jsxs(lu,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[k.jsx(Uw,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));UD.displayName=su.displayName;const HD=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});HD.displayName="SheetHeader";const vK=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vK.displayName="SheetFooter";const VD=P.forwardRef((({className:e,...t},n)=>k.jsx(Wd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));VD.displayName=Wd.displayName;const GD=P.forwardRef((({className:e,...t},n)=>k.jsx(Ud,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));GD.displayName=Ud.displayName;const[Im,cZ]=Er("Tooltip",[pu]),g$=pu(),mK="TooltipProvider",gK=700,Bw="tooltip.open",[yK,y$]=Im(mK),KD=e=>{const{__scopeTooltip:t,delayDuration:n=gK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=Je(!0),u=Ae(!1),s=Ae(0);return Le((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),F(yK,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:nt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:nt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:nt((e=>{u.current=e}),[]),disableHoverableContent:o},a)},b$="Tooltip",[bK,km]=Im(b$),YD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=y$(b$,e.__scopeTooltip),s=g$(t),[c,d]=Je(null),f=co(),p=Ae(0),m=i??u.disableHoverableContent,h=l??u.delayDuration,v=Ae(!1),[g=!1,y]=Go({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Bw))):u.onClose(),null==a||a(e)}}),b=Vr((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=nt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=nt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=nt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),h)}),[h,y]);return Le((()=>()=>window.clearTimeout(p.current)),[]),F(Sm,s,F(bK,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:nt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:nt((()=>{m?x():window.clearTimeout(p.current)}),[x,m]),onOpen:w,onClose:x,disableHoverableContent:m},n))},OR="TooltipTrigger",XD=me(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=km(OR,n),a=y$(OR,n),i=g$(n),l=Rt(t,Ae(null),o.onTriggerChange),u=Ae(!1),s=Ae(!1),c=nt((()=>u.current=!1),[]);return Le((()=>()=>document.removeEventListener("pointerup",c)),[c]),F(X_,le({asChild:!0},i),F(at.button,le({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:We(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:We(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:We(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:We(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:We(e.onBlur,o.onClose),onClick:We(e.onClick,o.onClose)})))})),xK="TooltipPortal",[uZ,wK]=Im(xK,{forceMount:void 0}),jd="TooltipContent",QD=me(((e,t)=>{const n=wK(jd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=km(jd,e.__scopeTooltip);return F(No,{present:r||i.open},i.disableHoverableContent?F(ZD,le({side:o},a,{ref:t})):F(_K,le({side:o},a,{ref:t})))})),_K=me(((e,t)=>{const n=km(jd,e.__scopeTooltip),r=y$(jd,e.__scopeTooltip),o=Ae(null),a=Rt(t,o),[i,l]=Je(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=nt((()=>{l(null),d(!1)}),[d]),p=nt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=RK([...CK(r,SK(r,n.getBoundingClientRect())),...EK(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return Le((()=>()=>f()),[f]),Le((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),Le((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!PK(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),F(ZD,le({},e,{ref:a}))})),[$K,fZ]=Im(b$,{isInside:!1}),ZD=me(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=km(jd,n),s=g$(n),{onClose:c}=u;return Le((()=>(document.addEventListener(Bw,c),()=>document.removeEventListener(Bw,c))),[c]),Le((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),F(Zv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},F(Q_,le({"data-state":u.stateAttribute},s,l,{ref:t,style:{...l.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)"}}),F(Kw,null,r),F($K,{scope:n,isInside:!0},F(rH,{id:u.contentId,role:"tooltip"},o||r))))}));function SK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function CK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function EK(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function PK(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function RK(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),TK(t)}function TK(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const OK=KD,AK=YD,NK=XD,JD=QD,eI=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},DK=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},IK=e=>DK(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>IK(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const tI=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),PT("requestMicroFrontendFetch"),PT("sendMicroFrontendFetchResponse");const kK={deviceType:eI()},Mm=z6({name:"ui",initialState:kK,reducers:{},extraReducers:e=>{e.addCase(tI,((e,{payload:t})=>{e.deviceType=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var ux,AR,fx,NR,dx,DR,px,IR,hx,kR,vx,MR,mx,LR,gx,jR,yx,FR,bx,BR,xx,qR,wx,zR,_x,WR,$x,UR,Sx,HR,Cx,VR,Ex,GR,Px,KR,Rx,YR,Tx,XR,Ox,QR,Ax,ZR,Nx,JR,Dx,eT,Ix,tT,kx,nT,Mx,rT,Lx,oT,jx,iT,Fx,aT,Bx,sT,qx,lT,zx,cT,Wx,uT,Ux,fT,Hx,dT,Vx,pT,Gx,hT,Kx,vT,Yx,mT,Xx,gT;function nI(){if(AR)return ux;AR=1;var e=uA(),t=e&&new e;return ux=t}function rI(){if(NR)return fx;NR=1;var e=Xd(),t=nI();return fx=t?function(e,n){return t.set(e,n),e}:e}function Lm(){if(DR)return dx;DR=1;var e=vm(),t=Do();return dx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},dx}function MK(){if(IR)return px;IR=1;var e=Lm(),t=Rr();return px=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},px}function oI(){if(kR)return hx;kR=1;var e=Math.max;return hx=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,u=-1,s=n.length,c=e(i-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function iI(){if(MR)return vx;MR=1;var e=Math.max;return vx=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++s<c;)f[m+s]=n[s];for(;++l<u;)(p||a<i)&&(f[m+r[l]]=t[a++]);return f}}function LK(){if(LR)return mx;return LR=1,mx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function x$(){if(jR)return gx;return jR=1,gx=function(){}}function w$(){if(FR)return yx;FR=1;var e=vm(),t=x$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,yx=n}function aI(){if(BR)return bx;BR=1;var e=nI(),t=vA();return bx=e?function(t){return e.get(t)}:t}function jK(){if(qR)return xx;qR=1;return xx={}}function FK(){if(zR)return wx;zR=1;var e=jK(),t=Object.prototype.hasOwnProperty;return wx=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],l=i.func;if(null==l||l==n)return i.name}return r}}function sI(){if(WR)return _x;WR=1;var e=vm(),t=x$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,_x=n}function BK(){if(UR)return $x;UR=1;var e=w$(),t=sI(),n=hm();return $x=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function qK(){if(HR)return Sx;HR=1;var e=w$(),t=sI(),n=x$(),r=Pr(),o=ho(),a=BK(),i=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,Sx=l}function zK(){if(VR)return Cx;VR=1;var e=w$(),t=aI(),n=FK(),r=qK();return Cx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var l=t(i);return!!l&&o===l[0]}}function lI(){if(GR)return Ex;GR=1;var e=rI(),t=_A()(e);return Ex=t}function WK(){if(KR)return Px;KR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Px=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function UK(){if(YR)return Rx;YR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Rx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function HK(){if(XR)return Tx;XR=1;var e=N_(),t=hA(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Tx=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function cI(){if(QR)return Ox;QR=1;var e=WK(),t=UK(),n=R_(),r=HK();return Ox=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function uI(){if(ZR)return Ax;ZR=1;var e=zK(),t=lI(),n=cI();return Ax=function(r,o,a,i,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],h=a.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=i,n(h,r,o)}}function fI(){if(JR)return Nx;return JR=1,Nx=function(e){return e.placeholder}}function VK(){if(eT)return Dx;eT=1;var e=hm(),t=um(),n=Math.min;return Dx=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var u=o[i];r[i]=t(u,a)?l[u]:void 0}return r}}function _$(){if(tT)return Ix;tT=1;var e="__lodash_placeholder__";return Ix=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,i[a++]=r)}return i}}function dI(){if(nT)return kx;nT=1;var e=oI(),t=iI(),n=LK(),r=Lm(),o=uI(),a=fI(),i=VK(),l=_$(),u=Rr();return kx=function s(c,d,f,p,m,h,v,g,y,b){var w=128&d,x=1&d,_=2&d,P=24&d,k=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(P)var T=a(C),R=n(N,T);if(p&&(N=e(N,p,m,P)),h&&(N=t(N,h,v,P)),E-=R,P&&E<b){var A=l(N,T);return o(c,d,s,C.placeholder,f,N,A,g,y,b-E)}var j=x?f:this,D=_?j[c]:c;return E=N.length,g?N=i(N,g):k&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(D=S||r(D)),D.apply(j,N)}},kx}function GK(){if(rT)return Mx;rT=1;var e=P_(),t=Lm(),n=dI(),r=uI(),o=fI(),a=_$(),i=Rr();return Mx=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=h.length)<s?r(l,u,n,t.placeholder,void 0,f,h,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Mx}function KK(){if(oT)return Lx;oT=1;var e=P_(),t=Lm(),n=Rr();return Lx=function(r,o,a,i){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=i.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Lx}function YK(){if(iT)return jx;iT=1;var e=oI(),t=iI(),n=_$(),r="__lodash_placeholder__",o=128,a=Math.min;return jx=function(i,l){var u=i[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&i[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return i;1&s&&(i[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var m=i[3];i[3]=m?e(m,p,l[4]):p,i[4]=m?n(i[3],r):l[4]}return(p=l[5])&&(m=i[5],i[5]=m?t(m,p,l[6]):p,i[6]=m?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),s&o&&(i[8]=null==i[8]?l[8]:a(i[8],l[8])),null==i[9]&&(i[9]=l[9]),i[0]=l[0],i[1]=c,i}}function $$(){if(aT)return Fx;aT=1;var e=rI(),t=MK(),n=GK(),r=dI(),o=KK(),a=aI(),i=YK(),l=lI(),u=cI(),s=OA(),c=Math.max;return Fx=function(d,f,p,m,h,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=h?h.length:0,64&f){var x=m,_=h;m=h=void 0}var P=b?void 0:a(d),k=[d,f,p,m,h,x,_,v,g,y];if(P&&i(k,P),d=k[0],f=k[1],p=k[2],m=k[3],h=k[4],!(y=k[9]=void 0===k[9]?b?0:d.length:c(k[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||h.length?r.apply(void 0,k):o(d,f,p,m);else var S=t(d,f,p);return u((P?e:l)(S,k),d,f)}}function XK(){if(sT)return Bx;sT=1;var e=$$();return Bx=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function QK(){if(lT)return qx;lT=1;var e=IA();return qx=function(t){return e(t,4)}}function ZK(){if(cT)return zx;cT=1;var e=$$();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},zx=t}function JK(){if(uT)return Wx;uT=1;var e=na(),t=ho(),n=Yj();return Wx=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function eY(){if(fT)return Ux;fT=1;var e=Yd(),t=ho();return Ux=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function tY(){if(dT)return Hx;dT=1;var e=IA(),t=C_();return Hx=function(n){return t("function"==typeof n?n:e(n,1))}}function nY(){if(pT)return Vx;pT=1;var e=$$(),t=mF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Vx=n}function rY(){if(hT)return Gx;hT=1;var e=f_(),t=hm(),n=Pr(),r=uu(),o=IO(),a=Vd(),i=d_();return Gx=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function oY(){return vT||(vT=1,Kx={ary:XK(),assign:NA(),clone:QK(),curry:ZK(),forEach:N_(),isArray:Pr(),isError:JK(),isFunction:rm(),isWeakMap:eY(),iteratee:tY(),keys:sA(),rearg:nY(),toInteger:OA(),toPath:rY()}),Kx}function iY(){if(mT)return Yx;mT=1;var e=TT(),t=oY();return Yx=function(n,r,o){return e(t,n,r,o)}}function aY(){if(gT)return Xx;gT=1;var e=iY()("debounce",RA());return e.placeholder=RT(),Xx=e}var sY=aY();const lY=Ao(sY);function yT(e,t,n=window){const r=Ae(t);Le((()=>{r.current=t}),[t]),Le((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const cY=e=>{const t=lY(150)(e);yT("resize",t),yT("orientationchange",t)},dZ=()=>{const e=W6();cY((()=>{const t=eI();e(tI(t))}))},pZ=()=>Xv(Mm.selectors.selectDeviceType),uY=()=>Xv(Mm.selectors.selectIsMobile),hZ=()=>Xv(Mm.selectors.selectIsTablet),vZ=()=>Xv(Mm.selectors.selectIsDesktop);function bT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const fY="sidebar_state",dY=604800,pY="12rem",hY="18rem",vY="2rem",mY="b",pI=P.createContext(null);function jm(){const e=P.useContext(pI);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const gY=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=uY(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,m=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${fY}=${t}; path=/; max-age=${dY}`}),[n,p]),h=P.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);P.useEffect((()=>{const e=e=>{e.key===mY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:m,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:h})),[v,p,m,u,s,c,h]);return k.jsx(pI.Provider,{value:g,children:k.jsx(KD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":pY,"--sidebar-width-icon":vY,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));gY.displayName="SidebarProvider";const yY=P.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=jm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?k.jsx(dK,{open:s,onOpenChange:c,children:k.jsxs(UD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":hY},side:e,children:[k.jsxs(HD,{className:"sr-only",children:[k.jsx(VD,{children:"Sidebar"}),k.jsx(GD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[k.jsx("div",{className:se("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),k.jsx("div",{className:se("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:k.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));yY.displayName="Sidebar";const bY=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=jm();return k.jsx(Bd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?k.jsx(m7,{size:16}):k.jsx(h7,{size:16})})}));bY.displayName="SidebarTrigger";const xY=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=jm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));xY.displayName="SidebarRail";const wY=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));wY.displayName="SidebarInset";const _Y=P.forwardRef((({className:e,...t},n)=>k.jsx(RD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));_Y.displayName="SidebarInput";const $Y=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));$Y.displayName="SidebarHeader";const SY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));SY.displayName="SidebarFooter";const CY=P.forwardRef((({className:e,...t},n)=>k.jsx(i$,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));CY.displayName="SidebarSeparator";const EY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));EY.displayName="SidebarContent";const PY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));PY.displayName="SidebarGroup";const RY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?cs:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));RY.displayName="SidebarGroupLabel";const TY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?cs:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));TY.displayName="SidebarGroupAction";const OY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));OY.displayName="SidebarGroupContent";const AY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));AY.displayName="SidebarMenu";const NY=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));NY.displayName="SidebarMenuItem";const DY=ea("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),IY=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?cs:"button",{isMobile:s,state:c}=jm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(DY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),k.jsxs(YD,{children:[k.jsx(XD,{asChild:!0,children:d}),k.jsx(QD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));IY.displayName="SidebarMenuButton";const kY=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?cs:"button";return k.jsx(a,{ref:o,"data-sidebar":"menu-action",className:se("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));kY.displayName="SidebarMenuAction";const MY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));MY.displayName="SidebarMenuBadge";const LY=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(bT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(bT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));LY.displayName="SidebarMenuSkeleton";const jY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));jY.displayName="SidebarMenuSub";const FY=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));FY.displayName="SidebarMenuSubItem";const BY=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?cs:"a";return k.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));BY.displayName="SidebarMenuSubButton";const hI="Switch",[qY,mZ]=Er(hI),[zY,WY]=qY(hI),UY=me(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=Je(null),p=Rt(t,(e=>f(e))),m=Ae(!1),h=!d||!!d.closest("form"),[v=!1,g]=Go({prop:o,defaultProp:a,onChange:s});return F(zY,{scope:n,checked:v,disabled:l},F(at.button,le({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":vI(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:We(e.onClick,(e=>{g((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&F(GY,{control:d,bubbles:!m.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),HY="SwitchThumb",VY=me(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=WY(HY,n);return F(at.span,le({"data-state":vI(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),GY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function vI(e){return e?"checked":"unchecked"}const mI=UY,KY=VY,YY=P.forwardRef((({className:e,...t},n)=>k.jsx(mI,{className:se("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:k.jsx(KY,{className:se("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-slate-300":t.disabled})})})));YY.displayName=mI.displayName;const gI="Tabs",[XY,gZ]=Er(gI,[hu]),yI=hu(),[QY,S$]=XY(gI),ZY=me(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Zd(l),[d,f]=Go({prop:r,onChange:o,defaultProp:a});return F(QY,{scope:n,baseId:co(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},F(at.div,le({dir:c,"data-orientation":i},s,{ref:t})))})),JY="TabsList",eX=me(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=S$(JY,n),i=yI(n);return F(J_,le({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),F(at.div,le({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),tX="TabsTrigger",nX=me(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=S$(tX,n),l=yI(n),u=bI(i.baseId,r),s=xI(i.baseId,r),c=r===i.value;return F(e$,le({asChild:!0},l,{focusable:!o,active:c}),F(at.button,le({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:We(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:We(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:We(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),rX="TabsContent",oX=me(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=S$(rX,n),u=bI(l.baseId,r),s=xI(l.baseId,r),c=r===l.value,d=Ae(c);return Le((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),F(No,{present:o||c},(({present:n})=>F(at.div,le({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function bI(e,t){return`${e}-trigger-${t}`}function xI(e,t){return`${e}-content-${t}`}const iX=ZY,wI=eX,_I=nX,$I=oX,yZ=iX,aX=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(wI,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));aX.displayName=wI.displayName;const sX=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(_I,{ref:o,className:t?se("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-blue_100","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));sX.displayName=_I.displayName;const lX=P.forwardRef((({className:e,...t},n)=>k.jsx($I,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));lX.displayName=$I.displayName;const cX=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));cX.displayName="Table";const uX=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));uX.displayName="TableHeader";const fX=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));fX.displayName="TableBody";const dX=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));dX.displayName="TableFooter";const pX=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));pX.displayName="TableRow";const hX=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));hX.displayName="TableHead";const vX=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));vX.displayName="TableCell";const mX=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));mX.displayName="TableCaption";const gX=(e,t)=>se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),yX=P.forwardRef((({className:e,...t},n)=>{const{error:r}=fs();return k.jsx("textarea",{className:gX(!!r,e),ref:n,...t})}));yX.displayName="Textarea";const bZ=OK,bX=AK,xX=NK,wX=ea("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),SI=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>k.jsx(JD,{ref:a,sideOffset:t,className:se(wX({size:n,theme:r,className:e})),...o})));SI.displayName=JD.displayName;const xZ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(bX,{children:[k.jsx(xX,{className:n,...r,children:e}),t&&k.jsx(SI,{...o,children:t})]}),wZ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})});function _X(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function CI(...e){return t=>e.forEach((e=>_X(e,t)))}function EI(...e){return nt(CI(...e),e)}let Qx=0;function $X(){Le((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:xT()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:xT()),Qx++,()=>{1===Qx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Qx--}}),[])}function xT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function SX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function CX(...e){return t=>e.forEach((e=>SX(e,t)))}function EX(...e){return nt(CX(...e),e)}const Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",wT={bubbles:!1,cancelable:!0},PX=me(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=Je(null),s=is(o),c=is(a),d=Ae(null),f=EX(t,(e=>u(e))),p=Ae({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Le((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:cl(d.current,{select:!0})},t=function(e){p.paused||!l||l.contains(e.relatedTarget)||cl(d.current,{select:!0})};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),Le((()=>{if(l){$T.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(Zx,wT);l.addEventListener(Zx,s),l.dispatchEvent(t),t.defaultPrevented||(RX(DX(PI(l)),{select:!0}),document.activeElement===e&&cl(l))}return()=>{l.removeEventListener(Zx,s),setTimeout((()=>{const t=new CustomEvent(Jx,wT);l.addEventListener(Jx,c),l.dispatchEvent(t),t.defaultPrevented||cl(e??document.body,{select:!0}),l.removeEventListener(Jx,c),$T.remove(p)}),0)}}}),[l,s,c,p]);const m=nt((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=TX(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&cl(a,{select:!0})):(e.preventDefault(),n&&cl(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return F(ss.div,le({tabIndex:-1},i,{ref:f,onKeyDown:m}))}));function RX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cl(r,{select:t}),document.activeElement!==n)return}function TX(e){const t=PI(e);return[_T(t,e),_T(t.reverse(),e)]}function PI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _T(e,t){for(const n of e)if(!OX(n,{upTo:t}))return n}function OX(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function AX(e){return e instanceof HTMLInputElement&&"select"in e}function cl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AX(e)&&t&&e.select()}}const $T=NX();function NX(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ST(e,t),e.unshift(t)},remove(t){var n;e=ST(e,t),null===(n=e[0])||void 0===n||n.resume()}}}function ST(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function DX(e){return e.filter((e=>"A"!==e.tagName))}const IX=P.useId||(()=>{});let kX=0;function MX(e){const[t,n]=P.useState(IX());return Xa((()=>{e||n((e=>e??String(kX++)))}),[e]),e||(t?`radix-${t}`:"")}const RI=me(((e,t)=>{const{children:n,...r}=e,o=qn.toArray(n),a=o.find(jX);if(a){const e=a.props.children,n=o.map((t=>t===a?qn.count(e)>1?qn.only(null):fo(e)?e.props.children:null:t));return F(qw,le({},r,{ref:t}),fo(e)?Ji(e,void 0,n):null)}return F(qw,le({},r,{ref:t}),n)}));RI.displayName="Slot";const qw=me(((e,t)=>{const{children:n,...r}=e;return fo(n)?Ji(n,{...FX(r,n.props),ref:CI(t,n.ref)}):qn.count(n)>1?qn.only(null):null}));qw.displayName="SlotClone";const LX=({children:e})=>F(ls,null,e);function jX(e){return fo(e)&&e.type===LX}function FX(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const TI="Popover",[OI,_Z]=c$(TI,[Nm]),Fm=Nm(),[BX,El]=OI(TI),qX=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Fm(t),u=Ae(null),[s,c]=Je(!1),[d=!1,f]=oD({prop:r,defaultProp:o,onChange:a});return F(bD,l,F(BX,{scope:t,contentId:MX(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:nt((()=>f((e=>!e))),[f]),hasCustomAnchor:s,onCustomAnchorAdd:nt((()=>c(!0)),[]),onCustomAnchorRemove:nt((()=>c(!1)),[]),modal:i},n))},zX="PopoverAnchor",WX=me(((e,t)=>{const{__scopePopover:n,...r}=e,o=El(zX,n),a=Fm(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return Le((()=>(i(),()=>l())),[i,l]),F(p$,le({},a,r,{ref:t}))})),UX="PopoverTrigger",HX=me(((e,t)=>{const{__scopePopover:n,...r}=e,o=El(UX,n),a=Fm(n),i=EI(t,o.triggerRef),l=F(ss.button,le({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":DI(o.open)},r,{ref:i,onClick:dr(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:F(p$,le({asChild:!0},a),l)})),AI="PopoverPortal",[VX,GX]=OI(AI,{forceMount:void 0}),KX=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=El(AI,t);return F(VX,{scope:t,forceMount:n},F(rp,{present:n||a.open},F(wD,{asChild:!0,container:o},r)))},Fd="PopoverContent",YX=me(((e,t)=>{const n=GX(Fd,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=El(Fd,e.__scopePopover);return F(rp,{present:r||a.open},a.modal?F(XX,le({},o,{ref:t})):F(QX,le({},o,{ref:t})))})),XX=me(((e,t)=>{const n=El(Fd,e.__scopePopover),r=Ae(null),o=EI(t,r),a=Ae(!1);return Le((()=>{const e=r.current;if(e)return zd(e)}),[]),F(qd,{as:RI,allowPinchZoom:!0},F(NI,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dr(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:dr(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:dr(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),QX=me(((e,t)=>{const n=El(Fd,e.__scopePopover),r=Ae(!1);return F(NI,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))})),NI=me(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onInteractOutside:c,...d}=e,f=El(Fd,n),p=Fm(n);return $X(),F(PX,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},F(_D,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onDismiss:()=>f.onOpenChange(!1)},F(xD,le({"data-state":DI(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function DI(e){return e?"open":"closed"}const ZX=qX,JX=WX,eQ=HX,tQ=KX,nQ=YX;function $Z({...e}){return k.jsx(ZX,{"data-slot":"popover",...e})}function SZ({...e}){return k.jsx(eQ,{"data-slot":"popover-trigger",...e})}function CZ({className:e,align:t="center",sideOffset:n=4,...r}){return k.jsx(tQ,{children:k.jsx(nQ,{"data-slot":"popover-content",align:t,sideOffset:n,className:se("origin-(--radix-popover-content-transform-origin) outline-hidden z-50 flex w-[100vw] max-w-[600px] flex-col gap-xs rounded-lg border border-slate-200 bg-popover px-none py-xs text-popover-foreground shadow-[0_0_12px_0_rgba(0,0,0,0.15)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})}function EZ({...e}){return k.jsx(JX,{"data-slot":"popover-anchor",...e})}const PZ=({as:e="div",children:t,className:n,...r})=>F(e,{className:se(n),...r},t);function rQ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function oQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},iQ(r,...t)]}function iQ(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function II(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function aQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sQ({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=II(n);return[i,P.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function sQ({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=II(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Kv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function CT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=CT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():CT(e[t],null)}}}}function MI(...e){return P.useCallback(kI(...e),e)}var LI=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),a=o.find(cQ);if(a){const e=a.props.children,n=o.map((t=>t===a?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(zw,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(zw,{...r,ref:t,children:n})}));LI.displayName="Slot";var zw=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=fQ(n),o=uQ(r,n.props);return n.type!==P.Fragment&&(o.ref=t?kI(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));zw.displayName="SlotClone";var lQ=({children:e})=>k.jsx(k.Fragment,{children:e});function cQ(e){return P.isValidElement(e)&&e.type===lQ}function uQ(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function fQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var dQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],C$=dQ.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?LI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function pQ(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var jI=e=>{const{present:t,children:n}=e,r=hQ(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=MI(r.ref,vQ(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function hQ(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=pQ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=xv(r.current);a.current="mounted"===l?e:"none"}),[l]),Kv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=xv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Kv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=xv(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=xv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function xv(e){return(null==e?void 0:e.animationName)||"none"}function vQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}jI.displayName="Presence";var mQ=P.useId||(()=>{}),gQ=0;function yQ(e){const[t,n]=P.useState(mQ());return Kv((()=>{e||n((e=>e??String(gQ++)))}),[e]),e||(t?`radix-${t}`:"")}var E$="Collapsible",[bQ,RZ]=oQ(E$),[xQ,P$]=bQ(E$),FI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=aQ({prop:r,defaultProp:o,onChange:i});return k.jsx(xQ,{scope:n,disabled:a,contentId:yQ(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(C$.div,{"data-state":T$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));FI.displayName=E$;var BI="CollapsibleTrigger",qI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=P$(BI,n);return k.jsx(C$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":T$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:rQ(e.onClick,o.onOpenToggle)})}));qI.displayName=BI;var R$="CollapsibleContent",zI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=P$(R$,e.__scopeCollapsible);return k.jsx(jI,{present:n||o.open,children:({present:e})=>k.jsx(wQ,{...r,ref:t,present:e})})}));zI.displayName=R$;var wQ=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=P$(R$,n),[l,u]=P.useState(r),s=P.useRef(null),c=MI(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),m=p.current,h=i.open||l,v=P.useRef(h),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),Kv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[i.open,r]),k.jsx(C$.div,{"data-state":T$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&o})}));function T$(e){return e?"open":"closed"}var _Q=FI;const TZ=_Q,OZ=qI,AZ=zI;export{OQ as AlertDialog,Q5 as AlertDialogAction,Z5 as AlertDialogCancel,V5 as AlertDialogContent,X5 as AlertDialogDescription,K5 as AlertDialogFooter,G5 as AlertDialogHeader,gO as AlertDialogOverlay,H5 as AlertDialogPortal,Y5 as AlertDialogTitle,AQ as AlertDialogTrigger,$O as Avatar,CO as AvatarFallback,SO as AvatarImage,Bd as Button,PQ as ButtonLoader,sM as Card,fM as CardContent,uM as CardDescription,dM as CardFooter,lM as CardHeader,cM as CardTitle,GM as Carousel,KM as CarouselContent,YM as CarouselItem,QM as CarouselNext,XM as CarouselPrevious,yF as ChartContainer,IQ as ChartLegend,wF as ChartLegendContent,bF as ChartStyle,DQ as ChartTooltip,xF as ChartTooltipContent,k_ as Checkbox,M2 as ChipsItem,_F as ChipsWrapper,TZ as Collapsible,AZ as CollapsibleContent,OZ as CollapsibleTrigger,XA as Command,jQ as CommandDialog,fB as CommandEmpty,dB as CommandGroup,cB as CommandInput,hB as CommandItem,uB as CommandList,pB as CommandSeparator,vB as CommandShortcut,nB as Dialog,LQ as DialogClose,KA as DialogContent,lB as DialogDescription,YA as DialogFooter,aB as DialogHeader,GA as DialogOverlay,rB as DialogPortal,sB as DialogTitle,MQ as DialogTrigger,Zq as Drawer,zQ as DrawerClose,ez as DrawerContent,oz as DrawerDescription,nz as DrawerFooter,tz as DrawerHeader,FN as DrawerOverlay,Jq as DrawerPortal,rz as DrawerTitle,qQ as DrawerTrigger,HQ as DropdownMenu,XU as DropdownMenuCheckboxItem,KU as DropdownMenuContent,GQ as DropdownMenuGroup,YU as DropdownMenuItem,ZU as DropdownMenuLabel,KQ as DropdownMenuPortal,XQ as DropdownMenuRadioGroup,QU as DropdownMenuRadioItem,JU as DropdownMenuSeparator,eH as DropdownMenuShortcut,YQ as DropdownMenuSub,GU as DropdownMenuSubContent,VU as DropdownMenuSubTrigger,VQ as DropdownMenuTrigger,ZQ as Form,ZH as FormControl,JH as FormDescription,JQ as FormField,XH as FormItem,QH as FormLabel,eV as FormMessage,tV as FormSelect,rV as FormSelectContent,iV as FormSelectGroup,oV as FormSelectItem,aV as FormSelectLabel,sV as FormSelectSeparator,nV as FormSelectTrigger,lV as FormSelectValue,nZ as HoverCard,TG as HoverCardContent,oZ as HoverCardPortal,rZ as HoverCardTrigger,RD as Input,wZ as InputFile,T3 as Label,$Z as Popover,EZ as PopoverAnchor,CZ as PopoverContent,SZ as PopoverTrigger,GG as Progress,uK as RadioGroup,fK as RadioGroupItem,K3 as Select,KH as SelectActions,HH as SelectCheckboxItem,Z3 as SelectContent,YH as SelectFooter,Y3 as SelectGroup,eD as SelectItem,J3 as SelectLabel,UH as SelectMultiTrigger,GH as SelectScrollDownButton,VH as SelectScrollUpButton,tD as SelectSeparator,Q3 as SelectTrigger,X3 as SelectValue,dK as Sheet,lZ as SheetClose,UD as SheetContent,GD as SheetDescription,vK as SheetFooter,HD as SheetHeader,WD as SheetOverlay,pK as SheetPortal,VD as SheetTitle,sZ as SheetTrigger,yY as Sidebar,EY as SidebarContent,SY as SidebarFooter,PY as SidebarGroup,TY as SidebarGroupAction,OY as SidebarGroupContent,RY as SidebarGroupLabel,$Y as SidebarHeader,_Y as SidebarInput,wY as SidebarInset,AY as SidebarMenu,kY as SidebarMenuAction,MY as SidebarMenuBadge,IY as SidebarMenuButton,NY as SidebarMenuItem,LY as SidebarMenuSkeleton,jY as SidebarMenuSub,BY as SidebarMenuSubButton,FY as SidebarMenuSubItem,gY as SidebarProvider,xY as SidebarRail,CY as SidebarSeparator,bY as SidebarTrigger,bT as Skeleton,YY as Switch,cX as Table,fX as TableBody,mX as TableCaption,vX as TableCell,dX as TableFooter,hX as TableHead,uX as TableHeader,pX as TableRow,yZ as Tabs,lX as TabsContent,aX as TabsList,sX as TabsTrigger,yX as Textarea,bX as Tooltip,SI as TooltipContent,bZ as TooltipProvider,xX as TooltipTrigger,xZ as TooltipWrapper,Vw as buttonVariants,se as cn,gX as getTextareaClassName,PZ as styledElement,Mm as uiSlice,nm as useCarousel,pZ as useDeviceType,dZ as useDeviceTypeUpdater,fs as useFormField,vZ as useIsDesktop,uY as useIsMobile,hZ as useIsTablet,jm as useSidebar};
69
+ */function A4(){if(DC)return Nt;DC=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=i,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return h(e)===l},Nt.isContextProvider=function(e){return h(e)===i},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return h(e)===s},Nt.isFragment=function(e){return h(e)===r},Nt.isLazy=function(e){return h(e)===p},Nt.isMemo=function(e){return h(e)===f},Nt.isPortal=function(e){return h(e)===n},Nt.isProfiler=function(e){return h(e)===a},Nt.isStrictMode=function(e){return h(e)===o},Nt.isSuspense=function(e){return h(e)===c},Nt.isSuspenseList=function(e){return h(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=h,Nt}function N4(){return IC||(IC=1,fy.exports=A4()),fy.exports}function FO(){if(kC)return dy;kC=1;var e=na(),t=ho();return dy=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function D4(){if(MC)return py;MC=1;var e=FO();return py=function(t){return e(t)&&t!=+t}}N4();var I4=D4();const k4=Ao(I4);var M4=FO();const L4=Ao(M4);var sv=function(e){return LO(e)&&e.indexOf("%")===e.length-1},Uo=function(e){return L4(e)&&!k4(e)},Pv=function(e){return Uo(e)||LO(e)};function sw(e){return(sw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j4=["viewBox","children"],F4=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],LC=["points","pathLength"],hy={svg:j4,polygon:LC,polyline:LC},BO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],B4=function(e,t,n){return function(r){return e(t,n,r),null}},q4=function(e,t,n){if(!jO(e)||"object"!==sw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];BO.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=B4(a,t,n))})),r},z4=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},W4=function(e,t,n,r){var o,a=null!==(o=null==hy?void 0:hy[r])&&void 0!==o?o:[];return!Ev(e)&&(r&&a.includes(t)||F4.includes(t))||BO.includes(t)},qO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(fo(e)&&(r=e.props),!jO(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;W4(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},U4=["children","width","height","viewBox","className","style","title","desc"];function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lw.apply(this,arguments)}function H4(e,t){if(null==e)return{};var n,r,o=V4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function V4(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G4(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,u=e.desc,s=H4(e,U4),c=o||{width:n,height:r,x:0,y:0},d=es("recharts-surface",a);return be.createElement("svg",lw({},qO(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),be.createElement("title",null,l),be.createElement("desc",null,u),t)}var vy,jC,my,FC,gy,BC,yy,qC,by,zC,xy,WC,wy,UC,_y,HC,_v=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function K4(){if(jC)return vy;return jC=1,vy=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}}function Y4(){if(FC)return my;FC=1;var e=K4();return my=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function zO(){if(BC)return gy;BC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return gy=function(t){return e.test(t)}}function X4(){if(qC)return yy;return qC=1,yy=function(e){return e.split("")}}function Q4(){if(zC)return by;zC=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return by=function(e){return e.match(d)||[]}}function Z4(){if(WC)return xy;WC=1;var e=X4(),t=zO(),n=Q4();return xy=function(r){return t(r)?n(r):e(r)}}function J4(){if(UC)return wy;UC=1;var e=Y4(),t=zO(),n=Z4(),r=d_();return wy=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),u=i?e(i,1).join(""):a.slice(1);return l[o]()+u}}}function e9(){if(HC)return _y;HC=1;var e=J4()("toUpperCase");return _y=e}var t9=e9();const WO=Ao(t9);function lv(e){return function(){return e}}const UO=Math.cos,Rv=Math.sin,Yo=Math.sqrt,Tv=Math.PI,cm=2*Tv,cw=Math.PI,uw=2*cw,sl=1e-6,n9=uw-sl;function HO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function r9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HO;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class o9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?HO:r9(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,l=n-e,u=r-t,s=a-e,c=i-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>sl)if(Math.abs(c*l-u*s)>sl&&o){let f=n-a,p=r-i,m=l*l+u*u,h=f*f+p*p,v=Math.sqrt(m),g=Math.sqrt(d),y=o*Math.tan((cw-Math.acos((m+d-h)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>sl&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),l=n*Math.sin(r),u=e+i,s=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>sl||Math.abs(this._y1-s)>sl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%uw+uw),d>n9?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>sl&&this._append`A${n},${n},0,${+(d>=cw)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function i9(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new o9(t)}const h_={draw(e,t){const n=Yo(t/Tv);e.moveTo(n,0),e.arc(0,0,n,0,cm)}},a9={draw(e,t){const n=Yo(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},VO=Yo(1/3),s9=2*VO,l9={draw(e,t){const n=Yo(t/s9),r=n*VO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},c9={draw(e,t){const n=Yo(t),r=-n/2;e.rect(r,r,n,n)}},u9=.8908130915292852,GO=Rv(Tv/10)/Rv(7*Tv/10),f9=Rv(cm/10)*GO,d9=-UO(cm/10)*GO,p9={draw(e,t){const n=Yo(t*u9),r=f9*n,o=d9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=cm*t/5,i=UO(a),l=Rv(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},$y=Yo(3),h9={draw(e,t){const n=-Yo(t/(3*$y));e.moveTo(0,2*n),e.lineTo(-$y*n,-n),e.lineTo($y*n,-n),e.closePath()}},Po=-.5,Ro=Yo(3)/2,fw=1/Yo(12),v9=3*(fw/2+1),m9={draw(e,t){const n=Yo(t/v9),r=n/2,o=n*fw,a=r,i=n*fw+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(Po*r-Ro*o,Ro*r+Po*o),e.lineTo(Po*a-Ro*i,Ro*a+Po*i),e.lineTo(Po*l-Ro*u,Ro*l+Po*u),e.lineTo(Po*r+Ro*o,Po*o-Ro*r),e.lineTo(Po*a+Ro*i,Po*i-Ro*a),e.lineTo(Po*l+Ro*u,Po*u-Ro*l),e.closePath()}};function g9(e,t){let n=null,r=i9(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:lv(e||h_),t="function"==typeof t?t:lv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:lv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:lv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Pd(e){return(Pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var y9=["type","size","sizeType"];function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dw.apply(this,arguments)}function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VC(Object(n),!0).forEach((function(t){b9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b9(e,t,n){return(t=x9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x9(e){var t=w9(e,"string");return"symbol"==Pd(t)?t:t+""}function w9(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _9(e,t){if(null==e)return{};var n,r,o=$9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $9(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KO={symbolCircle:h_,symbolCross:a9,symbolDiamond:l9,symbolSquare:c9,symbolStar:p9,symbolTriangle:h9,symbolWye:m9},S9=Math.PI/180,C9=function(e){var t="symbol".concat(WO(e));return KO[t]||h_},E9=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*S9;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},P9=function(e,t){KO["symbol".concat(WO(e))]=t},YO=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,i=e.sizeType,l=void 0===i?"area":i,u=GC(GC({},_9(e,y9)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=qO(u,!0);return c===+c&&d===+d&&a===+a?be.createElement("path",dw({},f,{className:es("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=C9(r),g9().type(t).size(E9(a,l,r))())})):null};function Qc(e){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pw.apply(this,arguments)}function KC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KC(Object(n),!0).forEach((function(t){Rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QO(r.key),r)}}function A9(e,t,n){return O9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N9(e,t,n){return t=Ov(t),D9(e,XO()?Reflect.construct(t,n||[],Ov(e).constructor):t.apply(e,n))}function D9(e,t){if(t&&("object"===Qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I9(e)}function I9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(XO=function(){return!!e})()}function Ov(e){return(Ov=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hw(e,t)}function hw(e,t){return(hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e,t,n){return(t=QO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QO(e){var t=M9(e,"string");return"symbol"==Qc(t)?t:t+""}function M9(e,t){if("object"!=Qc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}YO.registerSymbol=P9;var Sy,YC,Cy,XC,Ey,QC,Py,ZC,Ry,JC,Ty,eE,Oy,tE,Ay,nE,Ny,rE,Dy,oE,Iy,iE,ky,aE,My,sE,Ly,lE,jy,cE,Fy,uE,By,fE,qy,dE,zy,pE,Wy,hE,Uy,vE,Hy,mE,Vy,gE,Gy,yE,To=32,v_=function(){function e(){return T9(this,e),N9(this,e,arguments)}return k9(e,Yv),A9(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=To/2,r=To/6,o=To/3,a=e.inactive?t:e.color;if("plainline"===e.type)return be.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:To,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return be.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(To,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return be.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(To/8,"h").concat(To,"v").concat(3*To/4,"h").concat(-To,"z"),className:"recharts-legend-icon"});if(be.isValidElement(e.legendIcon)){var i=R9({},e);return delete i.legendIcon,be.cloneElement(e.legendIcon,i)}return be.createElement(YO,{fill:a,cx:n,cy:n,size:To,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,a=t.formatter,i=t.inactiveColor,l={x:0,y:0,width:To,height:To},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=es(Rd(Rd({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Ev(t.value)?null:t.value;_v(!Ev(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?i:t.color;return be.createElement("li",pw({className:c,style:u,key:"legend-item-".concat(n)},q4(e.props,t,n)),be.createElement(G4,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),be.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return be.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function L9(){if(YC)return Sy;YC=1;var e=sm();return Sy=function(){this.__data__=new e,this.size=0}}function j9(){if(XC)return Cy;return XC=1,Cy=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function F9(){if(QC)return Ey;return QC=1,Ey=function(e){return this.__data__.get(e)}}function B9(){if(ZC)return Py;return ZC=1,Py=function(e){return this.__data__.has(e)}}function q9(){if(JC)return Ry;JC=1;var e=sm(),t=c_(),n=u_();return Ry=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function m_(){if(eE)return Ty;eE=1;var e=sm(),t=L9(),n=j9(),r=F9(),o=B9(),a=q9();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,Ty=i}function z9(){if(tE)return Oy;tE=1;return Oy=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function W9(){if(nE)return Ay;return nE=1,Ay=function(e){return this.__data__.has(e)}}function ZO(){if(rE)return Ny;rE=1;var e=u_(),t=z9(),n=W9();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Ny=r}function U9(){if(oE)return Dy;return oE=1,Dy=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function JO(){if(iE)return Iy;return iE=1,Iy=function(e,t){return e.has(t)}}function eA(){if(aE)return ky;aE=1;var e=ZO(),t=U9(),n=JO();return ky=function(r,o,a,i,l,u){var s=1&a,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=s?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,a,i,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function tA(){if(sE)return My;sE=1;var e=Rr().Uint8Array;return My=e}function H9(){if(lE)return Ly;return lE=1,Ly=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function g_(){if(cE)return jy;return cE=1,jy=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function V9(){if(uE)return Fy;uE=1;var e=cu(),t=tA(),n=im(),r=eA(),o=H9(),a=g_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Fy=function(e,i,u,s,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var m=1&s;if(p||(p=a),e.size!=i.size&&!m)return!1;var h=f.get(e);if(h)return h==i;s|=2,f.set(e,i);var v=r(p(e),p(i),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function y_(){if(fE)return By;return fE=1,By=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function nA(){if(dE)return qy;dE=1;var e=y_(),t=Pr();return qy=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function G9(){if(pE)return zy;return pE=1,zy=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function rA(){if(hE)return Wy;return hE=1,Wy=function(){return[]}}function b_(){if(vE)return Uy;vE=1;var e=G9(),t=rA(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Uy=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function K9(){if(mE)return Hy;return mE=1,Hy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function Y9(){if(gE)return Vy;gE=1;var e=na(),t=ho();return Vy=function(n){return t(n)&&"[object Arguments]"==e(n)}}function x_(){if(yE)return Gy;yE=1;var e=Y9(),t=ho(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return Gy=a}Rd(v_,"displayName","Legend"),Rd(v_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Ky,bE,xE,Yy,wE,Xy,_E,Qy,$E,Zy,SE,gd={exports:{}};function X9(){if(bE)return Ky;return bE=1,Ky=function(){return!1}}function w_(){return xE||(xE=1,e=gd,t=gd.exports,n=Rr(),r=X9(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r,e.exports=l),gd.exports;var e,t,n,r,o,a,i,l}function um(){if(wE)return Yy;wE=1;var e=/^(?:0|[1-9]\d*)$/;return Yy=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function __(){if(_E)return Xy;_E=1;return Xy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function Q9(){if($E)return Qy;$E=1;var e=na(),t=__(),n=ho(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Qy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function fm(){if(SE)return Zy;return SE=1,Zy=function(e){return function(t){return e(t)}}}gd.exports;var CE,Jy,EE,eb,PE,tb,RE,nb,TE,rb,OE,ob,AE,ib,NE,ab,DE,sb,IE,lb,kE,cb,ME,ub,LE,fb,jE,db,FE,pb,BE,hb,qE,vb,zE,mb,WE,gb,UE,yb,HE,bb,VE,xb,GE,wb,KE,_b,YE,$b,XE,Sb,QE,Cb,ZE,Eb,JE,Pb,eP,Rb,tP,Tb,nP,Ob,rP,Ab,oP,Nb,iP,Db,aP,Ib,sP,kb,lP,Mb,cP,Lb,uP,jb,fP,Fb,dP,yd={exports:{}};function $_(){return CE||(CE=1,e=yd,t=yd.exports,n=NO(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),yd.exports;var e,t,n,r,o,a,i}function oA(){if(EE)return Jy;EE=1;var e=Q9(),t=fm(),n=$_(),r=n&&n.isTypedArray,o=r?t(r):e;return Jy=o}function iA(){if(PE)return eb;PE=1;var e=K9(),t=x_(),n=Pr(),r=w_(),o=um(),a=oA(),i=Object.prototype.hasOwnProperty;return eb=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&a(l),p=s||c||d||f,m=p?e(l.length,String):[],h=m.length;for(var v in l)(u||i.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,h)))&&m.push(v);return m}}function S_(){if(RE)return tb;RE=1;var e=Object.prototype;return tb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function aA(){if(TE)return nb;return TE=1,nb=function(e,t){return function(n){return e(t(n))}}}function Z9(){if(OE)return rb;OE=1;var e=aA()(Object.keys,Object);return rb=e}function sA(){if(AE)return ob;AE=1;var e=S_(),t=Z9(),n=Object.prototype.hasOwnProperty;return ob=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function Gd(){if(NE)return ib;NE=1;var e=rm(),t=__();return ib=function(n){return null!=n&&t(n.length)&&!e(n)}}function Kd(){if(DE)return ab;DE=1;var e=iA(),t=sA(),n=Gd();return ab=function(r){return n(r)?e(r):t(r)}}function lA(){if(IE)return sb;IE=1;var e=nA(),t=b_(),n=Kd();return sb=function(r){return e(r,n,t)}}function J9(){if(kE)return lb;kE=1;var e=lA(),t=Object.prototype.hasOwnProperty;return lb=function(n,r,o,a,i,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),m=l.get(r);if(p&&m)return p==r&&m==n;var h=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,l):a(g,y,f,n,r,l);if(!(void 0===b?g===y||i(g,y,o,a,l):b)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(h=!1)}return l.delete(n),l.delete(r),h}}function eL(){if(ME)return cb;ME=1;var e=xl()(Rr(),"DataView");return cb=e}function tL(){if(LE)return ub;LE=1;var e=xl()(Rr(),"Promise");return ub=e}function cA(){if(jE)return fb;jE=1;var e=xl()(Rr(),"Set");return fb=e}function uA(){if(FE)return db;FE=1;var e=xl()(Rr(),"WeakMap");return db=e}function Yd(){if(BE)return pb;BE=1;var e=eL(),t=c_(),n=tL(),r=cA(),o=uA(),a=na(),i=DO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),h=i(r),v=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return l;case m:return u;case h:return s;case v:return c}return t}),pb=g}function nL(){if(qE)return hb;qE=1;var e=m_(),t=eA(),n=V9(),r=J9(),o=Yd(),a=Pr(),i=w_(),l=oA(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return hb=function(f,p,m,h,v,g){var y=a(f),b=a(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,P=(x=x==u?c:x)==c,k=w==x;if(k&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(k&&!_)return g||(g=new e),y||l(f)?t(f,p,m,h,v,g):n(f,p,w,m,h,v,g);if(!(1&m)){var S=_&&d.call(f,"__wrapped__"),C=P&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,m,h,g)}}return!!k&&(g||(g=new e),r(f,p,m,h,v,g))}}function fA(){if(zE)return vb;zE=1;var e=nL(),t=ho();return vb=function n(r,o,a,i,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,l))},vb}function rL(){if(WE)return mb;WE=1;var e=m_(),t=fA();return mb=function(n,r,o,a){var i=o.length,l=i,u=!a;if(null==n)return!l;for(n=Object(n);i--;){var s=o[i];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<l;){var c=(s=o[i])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function dA(){if(UE)return gb;UE=1;var e=Do();return gb=function(t){return t==t&&!e(t)}}function oL(){if(HE)return yb;HE=1;var e=dA(),t=Kd();return yb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function pA(){if(VE)return bb;return VE=1,bb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function iL(){if(GE)return xb;GE=1;var e=rL(),t=oL(),n=pA();return xb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function aL(){if(KE)return wb;return KE=1,wb=function(e,t){return null!=e&&t in Object(e)}}function sL(){if(YE)return _b;YE=1;var e=kO(),t=x_(),n=Pr(),r=um(),o=__(),a=Vd();return _b=function(i,l,u){for(var s=-1,c=(l=e(l,i)).length,d=!1;++s<c;){var f=a(l[s]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++s!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function lL(){if(XE)return $b;XE=1;var e=aL(),t=sL();return $b=function(n,r){return null!=n&&t(n,r,e)}}function cL(){if(QE)return Sb;QE=1;var e=fA(),t=MO(),n=lL(),r=l_(),o=dA(),a=pA(),i=Vd();return Sb=function(l,u){return r(l)&&o(u)?a(i(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Xd(){if(ZE)return Cb;return ZE=1,Cb=function(e){return e}}function uL(){if(JE)return Eb;return JE=1,Eb=function(e){return function(t){return null==t?void 0:t[e]}}}function fL(){if(eP)return Pb;eP=1;var e=p_();return Pb=function(t){return function(n){return e(n,t)}}}function dL(){if(tP)return Rb;tP=1;var e=uL(),t=fL(),n=l_(),r=Vd();return Rb=function(o){return n(o)?e(r(o)):t(o)}}function C_(){if(nP)return Tb;nP=1;var e=iL(),t=cL(),n=Xd(),r=Pr(),o=dL();return Tb=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function pL(){if(rP)return Ob;return rP=1,Ob=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function hL(){if(oP)return Ab;return oP=1,Ab=function(e){return e!=e}}function vL(){if(iP)return Nb;return iP=1,Nb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function mL(){if(aP)return Db;aP=1;var e=pL(),t=hL(),n=vL();return Db=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function hA(){if(sP)return Ib;sP=1;var e=mL();return Ib=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function gL(){if(lP)return kb;return lP=1,kb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function vA(){if(cP)return Mb;return cP=1,Mb=function(){}}function yL(){if(uP)return Lb;uP=1;var e=cA(),t=vA(),n=g_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Lb=r}function bL(){if(fP)return jb;fP=1;var e=ZO(),t=hA(),n=gL(),r=JO(),o=yL(),a=g_();return jb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],m=p;if(u)f=!1,c=n;else if(d>=200){var h=l?null:o(i);if(h)return a(h);f=!1,c=r,m=new e}else m=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=m.length;y--;)if(m[y]===g)continue e;l&&m.push(g),p.push(v)}else c(m,g,u)||(m!==p&&m.push(g),p.push(v))}return p}}function xL(){if(dP)return Fb;dP=1;var e=C_(),t=bL();return Fb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}yd.exports;var wL=xL();const pP=Ao(wL);function mA(e,t,n){return!0===t?pP(e,n):Ev(t)?pP(e,t):e}function Zc(e){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _L=["ref"];function hP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hP(Object(n),!0).forEach((function(t){dm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yA(r.key),r)}}function SL(e,t,n){return vP(e.prototype,t),vP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CL(e,t,n){return t=Av(t),EL(e,gA()?Reflect.construct(t,n,Av(e).constructor):t.apply(e,n))}function EL(e,t){if(t&&("object"===Zc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return PL(e)}function PL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gA=function(){return!!e})()}function Av(e){return(Av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function RL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vw(e,t)}function vw(e,t){return(vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dm(e,t,n){return(t=yA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yA(e){var t=TL(e,"string");return"symbol"==Zc(t)?t:t+""}function TL(e,t){if("object"!=Zc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function OL(e,t){if(null==e)return{};var n,r,o=AL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AL(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NL(e){return e.value}function DL(e,t){if(be.isValidElement(e))return be.cloneElement(e,t);if("function"==typeof e)return be.createElement(e,t);t.ref;var n=OL(t,_L);return be.createElement(v_,n)}var Bb,gP,qb,yP,zb,bP,Wb,xP,Ub,wP,Hb,_P,Vb,$P,Gb,SP,Kb,CP,Yb,EP,Xb,PP,Qb,RP,Zb,TP,Jb,OP,e1,AP,t1,NP,n1,DP,r1,IP,o1,kP,i1,MP,a1,LP,s1,jP,mP=1,E_=function(){function e(){var t;$L(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return dm(t=CL(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return RL(e,Yv),SL(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>mP||Math.abs(t.height-this.lastBoundingBox.height)>mP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,l=r.margin,u=r.chartWidth,s=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===a&&"vertical"===o){t={left:((u||0)-this.getBBoxSnapshot().width)/2}}else t="right"===a?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===i){n={top:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Gi(Gi({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,l=t.payload,u=Gi(Gi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return be.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},DL(n,Gi(Gi({},this.props),{},{payload:mA(l,i,NL)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Gi(Gi({},this.defaultProps),e.props).layout;return"vertical"===n&&Uo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function IL(){if(gP)return Bb;gP=1;var e=cu(),t=x_(),n=Pr(),r=e?e.isConcatSpreadable:void 0;return Bb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function bA(){if(yP)return qb;yP=1;var e=y_(),t=IL();return qb=function n(r,o,a,i,l){var u=-1,s=r.length;for(a||(a=t),l||(l=[]);++u<s;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},qb}function kL(){if(bP)return zb;return bP=1,zb=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var u=i[e?l:++o];if(!1===n(a[u],u,a))break}return t}}}function ML(){if(xP)return Wb;xP=1;var e=kL()();return Wb=e}function LL(){if(wP)return Ub;wP=1;var e=ML(),t=Kd();return Ub=function(n,r){return n&&e(n,r,t)}}function jL(){if(_P)return Hb;_P=1;var e=Gd();return Hb=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var a=r.length,i=n?a:-1,l=Object(r);(n?i--:++i<a)&&!1!==o(l[i],i,l););return r}}}function FL(){if($P)return Vb;$P=1;var e=LL(),t=jL()(e);return Vb=t}function BL(){if(SP)return Gb;SP=1;var e=FL(),t=Gd();return Gb=function(n,r){var o=-1,a=t(n)?Array(n.length):[];return e(n,(function(e,t,n){a[++o]=r(e,t,n)})),a}}function qL(){if(CP)return Kb;return CP=1,Kb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function zL(){if(EP)return Yb;EP=1;var e=uu();return Yb=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!i&&t>n||i&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||u&&r&&a||!l&&a||!s)return-1}return 0}}function WL(){if(PP)return Xb;PP=1;var e=zL();return Xb=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,u=r.length;++o<l;){var s=e(a[o],i[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function UL(){if(RP)return Qb;RP=1;var e=f_(),t=p_(),n=C_(),r=BL(),o=qL(),a=fm(),i=WL(),l=Xd(),u=Pr();return Qb=function(s,c,d){c=c.length?e(c,(function(e){return u(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,a(n));var p=r(s,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return i(e,t,d)}))}}function P_(){if(TP)return Zb;return TP=1,Zb=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function xA(){if(OP)return Jb;OP=1;var e=P_(),t=Math.max;return Jb=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,l=t(a.length-r,0),u=Array(l);++i<l;)u[i]=a[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=a[i];return s[r]=o(u),e(n,this,s)}},Jb}function HL(){if(AP)return e1;return AP=1,e1=function(e){return function(){return e}}}function wA(){if(NP)return t1;NP=1;var e=xl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return t1=t}function VL(){if(DP)return n1;DP=1;var e=HL(),t=wA(),n=Xd();return n1=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function _A(){if(IP)return r1;IP=1;var e=Date.now;return r1=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},r1}function R_(){if(kP)return o1;kP=1;var e=VL(),t=_A()(e);return o1=t}function GL(){if(MP)return i1;MP=1;var e=Xd(),t=xA(),n=R_();return i1=function(r,o){return n(t(r,o,e),r+"")}}function KL(){if(LP)return a1;LP=1;var e=im(),t=Gd(),n=um(),r=Do();return a1=function(o,a,i){if(!r(i))return!1;var l=typeof a;return!!("number"==l?t(i)&&n(a,i.length):"string"==l&&a in i)&&e(i[a],o)}}function YL(){if(jP)return s1;jP=1;var e=bA(),t=UL(),n=GL(),r=KL(),o=n((function(n,o){if(null==n)return[];var a=o.length;return a>1&&r(n,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return s1=o}dm(E_,"displayName","Legend"),dm(E_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var XL=YL();const QL=Ao(XL);function Td(e){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mw.apply(this,arguments)}function ZL(e,t){return nj(e)||tj(e,t)||ej(e,t)||JL()}function JL(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ej(e,t){if(e){if("string"==typeof e)return FP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FP(e,t)}}function FP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function nj(e){if(Array.isArray(e))return e}function BP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BP(Object(n),!0).forEach((function(t){rj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rj(e,t,n){return(t=oj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oj(e){var t=ij(e,"string");return"symbol"==Td(t)?t:t+""}function ij(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function aj(e){return Array.isArray(e)&&Pv(e[0])&&Pv(e[1])?e.join(" ~ "):e}var sj=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,a=e.itemStyle,i=void 0===a?{}:a,l=e.labelStyle,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=l1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=l1({margin:0},u),w=!E4(m),x=w?m:"",_=es("recharts-default-tooltip",f),P=es("recharts-tooltip-label",p);w&&h&&null!=s&&(x=h(m,s));var k=g?{role:"status","aria-live":"assertive"}:{};return be.createElement("div",mw({className:_,style:y},k),be.createElement("p",{className:P,style:b},be.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?QL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=l1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||aj,a=e.value,l=e.name,u=a,d=l;if(null!=u&&null!=d){var f=o(a,l,e,t,s);if(Array.isArray(f)){var p=ZL(f,2);u=p[0],d=p[1]}else u=f}return be.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Pv(d)?be.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Pv(d)?be.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,be.createElement("span",{className:"recharts-tooltip-item-value"},u),be.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return be.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Od(e){return(Od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cv(e,t,n){return(t=lj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lj(e){var t=cj(e,"string");return"symbol"==Od(t)?t:t+""}function cj(e,t){if("object"!=Od(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var dd="recharts-tooltip-wrapper",uj={visibility:"hidden"};function fj(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return es(dd,cv(cv(cv(cv({},"".concat(dd,"-right"),Uo(n)&&t&&Uo(t.x)&&n>=t.x),"".concat(dd,"-left"),Uo(n)&&t&&Uo(t.x)&&n<t.x),"".concat(dd,"-bottom"),Uo(r)&&t&&Uo(t.y)&&r>=t.y),"".concat(dd,"-top"),Uo(r)&&t&&Uo(t.y)&&r<t.y))}function qP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&Uo(a[r]))return a[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?i[r]?c:d:i[r]?c<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function dj(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function pj(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&a?t=dj({translateX:n=qP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=qP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=uj,{cssProperties:t,cssClasses:fj({translateX:n,translateY:r,coordinate:a})}}function Jc(e){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zP(Object(n),!0).forEach((function(t){yw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SA(r.key),r)}}function mj(e,t,n){return vj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gj(e,t,n){return t=Nv(t),yj(e,$A()?Reflect.construct(t,n,Nv(e).constructor):t.apply(e,n))}function yj(e,t){if(t&&("object"===Jc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bj(e)}function bj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($A=function(){return!!e})()}function Nv(e){return(Nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gw(e,t)}function gw(e,t){return(gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yw(e,t,n){return(t=SA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SA(e){var t=wj(e,"string");return"symbol"==Jc(t)?t:t+""}function wj(e,t){if("object"!=Jc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Jc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UP=1,_j=function(){function e(){var t;hj(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yw(t=gj(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),yw(t,"handleKeyDown",(function(e){var n,r,o,a;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(a=t.props.coordinate)||void 0===a?void 0:a.y)&&void 0!==o?o:0}})})),t}return xj(e,Yv),mj(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>UP||Math.abs(e.height-this.state.lastBoundingBox.height)>UP)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.children,l=t.coordinate,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,v=pj({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),g=v.cssClasses,y=v.cssProperties,b=WP(WP({transition:s&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},h);return be.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),$j=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},$v={isSsr:$j(),get:function(e){return $v[e]},set:function(e,t){if("string"==typeof e)$v[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){$v[t]=e[t]}))}}};function eu(e){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HP(Object(n),!0).forEach((function(t){T_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EA(r.key),r)}}function Ej(e,t,n){return Cj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pj(e,t,n){return t=Dv(t),Rj(e,CA()?Reflect.construct(t,n||[],Dv(e).constructor):t.apply(e,n))}function Rj(e,t){if(t&&("object"===eu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tj(e)}function Tj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(CA=function(){return!!e})()}function Dv(e){return(Dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}function bw(e,t){return(bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T_(e,t,n){return(t=EA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EA(e){var t=Aj(e,"string");return"symbol"==eu(t)?t:t+""}function Aj(e,t){if("object"!=eu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=eu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Nj(e){return e.dataKey}function Dj(e,t){return be.isValidElement(e)?be.cloneElement(e,t):"function"==typeof e?be.createElement(e,t):be.createElement(sj,t)}var c1,GP,u1,KP,f1,YP,d1,XP,p1,QP,h1,ZP,O_=function(){function e(){return Sj(this,e),Pj(this,e,arguments)}return Oj(e,Yv),Ej(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.content,l=t.coordinate,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=mA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,Nj));var b=y.length>0;return be.createElement(_j,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:m,useTranslate3d:h,viewBox:v,wrapperStyle:g},Dj(i,VP(VP({},this.props),{},{payload:y})))}}])}();function Ij(){if(GP)return c1;GP=1;var e=Rr();return c1=function(){return e.Date.now()}}function kj(){if(KP)return u1;KP=1;var e=/\s/;return u1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function Mj(){if(YP)return f1;YP=1;var e=kj(),t=/^\s+/;return f1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function PA(){if(XP)return d1;XP=1;var e=Mj(),t=Do(),n=uu(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return d1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||a.test(l)?i(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function RA(){if(QP)return p1;QP=1;var e=Do(),t=Ij(),n=PA(),r=Math.max,o=Math.min;return p1=function(a,i,l){var u,s,c,d,f,p,m=0,h=!1,v=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),h?y(e):d}(p);if(v)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(l)&&(h=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,i):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},p1}function Lj(){if(ZP)return h1;ZP=1;var e=RA(),t=Do();return h1=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}T_(O_,"displayName","Tooltip"),T_(O_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!$v.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var jj=Lj();const Fj=Ao(jj);function Ad(e){return(Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JP(Object(n),!0).forEach((function(t){Bj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bj(e,t,n){return(t=qj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qj(e){var t=zj(e,"string");return"symbol"==Ad(t)?t:t+""}function zj(e,t){if("object"!=Ad(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ad(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Wj(e,t){return Gj(e)||Vj(e,t)||Hj(e,t)||Uj()}function Uj(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hj(e,t){if(e){if("string"==typeof e)return e2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e2(e,t)}}function e2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vj(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function Gj(e){if(Array.isArray(e))return e}var v1,t2,m1,n2,g1,r2,y1,o2,b1,i2,x1,a2,w1,s2,_1,l2,$1,c2,S1,u2,C1,f2,E1,d2,P1,p2,Kj=me((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,l=e.height,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=Ae(null),_=Ae();_.current=y,j6(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var P=Wj(Je({containerWidth:o.width,containerHeight:o.height}),2),k=P[0],S=P[1],C=nt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);Le((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};h>0&&(e=Fj(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,h]);var E=Vr((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;_v(sv(i)||sv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),_v(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=sv(i)?e:i,o=sv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),_v(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,u,c,d,n);var a=!Array.isArray(p)&&z4(p.type).endsWith("Chart");return be.Children.map(p,(function(e){return be.isValidElement(e)?Ji(e,uv({width:r,height:o},a?{style:uv({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,k,i]);return be.createElement("div",{id:v?"".concat(v):void 0,className:es("recharts-responsive-container",g),style:uv(uv({},w),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function A_(){if(t2)return v1;t2=1;var e=aA()(Object.getPrototypeOf,Object);return v1=e}function Yj(){if(n2)return m1;n2=1;var e=na(),t=A_(),n=ho(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return m1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==l}}function Xj(){if(r2)return g1;r2=1;var e=PA(),t=1/0;return g1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function TA(){if(o2)return y1;o2=1;var e=wA();return y1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function OA(){if(i2)return b1;i2=1;var e=Xj();return b1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function N_(){if(a2)return x1;return a2=1,x1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function AA(){if(s2)return w1;s2=1;var e=TA(),t=im(),n=Object.prototype.hasOwnProperty;return w1=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function pm(){if(l2)return _1;l2=1;var e=AA(),t=TA();return _1=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=a?a(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),i?t(o,s,c):e(o,s,c)}return o}}function NA(){if(c2)return $1;c2=1;var e=pm(),t=Kd();return $1=function(n,r){return n&&e(r,t(r),n)}}function Qj(){if(u2)return S1;return u2=1,S1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function Zj(){if(f2)return C1;f2=1;var e=Do(),t=S_(),n=Qj(),r=Object.prototype.hasOwnProperty;return C1=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var l in o)"constructor"==l&&(a||!r.call(o,l))||i.push(l);return i}}function D_(){if(d2)return E1;d2=1;var e=iA(),t=Zj(),n=Gd();return E1=function(r){return n(r)?e(r,!0):t(r)}}function Jj(){if(p2)return P1;p2=1;var e=pm(),t=D_();return P1=function(n,r){return n&&e(r,t(r),n)}}var h2,R1,v2,T1,m2,O1,g2,A1,y2,N1,b2,D1,x2,I1,w2,k1,_2,M1,$2,L1,S2,j1,C2,F1,E2,B1,P2,q1,R2,z1,T2,W1,O2,U1,A2,H1,N2,V1,D2,G1,I2,K1,k2,bd={exports:{}};function eF(){return h2||(h2=1,e=bd,t=bd.exports,n=Rr(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),bd.exports;var e,t,n,r,o,a,i}function hm(){if(v2)return R1;return v2=1,R1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function tF(){if(m2)return T1;m2=1;var e=pm(),t=b_();return T1=function(n,r){return e(n,t(n),r)}}function DA(){if(g2)return O1;g2=1;var e=y_(),t=A_(),n=b_(),r=rA(),o=Object.getOwnPropertySymbols;return O1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function nF(){if(y2)return A1;y2=1;var e=pm(),t=DA();return A1=function(n,r){return e(n,t(n),r)}}function rF(){if(b2)return N1;b2=1;var e=nA(),t=DA(),n=D_();return N1=function(r){return e(r,n,t)}}function oF(){if(x2)return D1;x2=1;var e=Object.prototype.hasOwnProperty;return D1=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function I_(){if(w2)return I1;w2=1;var e=tA();return I1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function iF(){if(_2)return k1;_2=1;var e=I_();return k1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function aF(){if($2)return M1;$2=1;var e=/\w*$/;return M1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function sF(){if(S2)return L1;S2=1;var e=cu(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return L1=function(e){return n?Object(n.call(e)):{}}}function lF(){if(C2)return j1;C2=1;var e=I_();return j1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function cF(){if(E2)return F1;E2=1;var e=I_(),t=iF(),n=aF(),r=sF(),o=lF();return F1=function(a,i,l){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+a);case"[object DataView]":return t(a,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,l);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function vm(){if(P2)return B1;P2=1;var e=Do(),t=Object.create;return B1=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function uF(){if(R2)return q1;R2=1;var e=vm(),t=A_(),n=S_();return q1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function fF(){if(T2)return z1;T2=1;var e=Yd(),t=ho();return z1=function(n){return t(n)&&"[object Map]"==e(n)}}function dF(){if(O2)return W1;O2=1;var e=fF(),t=fm(),n=$_(),r=n&&n.isMap,o=r?t(r):e;return W1=o}function pF(){if(A2)return U1;A2=1;var e=Yd(),t=ho();return U1=function(n){return t(n)&&"[object Set]"==e(n)}}function hF(){if(N2)return H1;N2=1;var e=pF(),t=fm(),n=$_(),r=n&&n.isSet,o=r?t(r):e;return H1=o}function IA(){if(D2)return V1;D2=1;var e=m_(),t=N_(),n=AA(),r=NA(),o=Jj(),a=eF(),i=hm(),l=tF(),u=nF(),s=lA(),c=rF(),d=Yd(),f=oF(),p=cF(),m=uF(),h=Pr(),v=w_(),g=dF(),y=Do(),b=hF(),w=Kd(),x=D_(),_="[object Arguments]",P="[object Function]",k="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[P]=S["[object WeakMap]"]=!1,V1=function C(E,N,O,T,R,A){var j,D=1&N,F=2&N,M=4&N;if(O&&(j=R?O(E,T,R,A):O(E)),void 0!==j)return j;if(!y(E))return E;var L=h(E);if(L){if(j=f(E),!D)return i(E,j)}else{var I=d(E),z=I==P||"[object GeneratorFunction]"==I;if(v(E))return a(E,D);if(I==k||I==_||z&&!R){if(j=F||z?{}:m(E),!D)return F?u(E,o(j,E)):l(E,r(j,E))}else{if(!S[I])return R?E:{};j=p(E,I,D)}}A||(A=new e);var W=A.get(E);if(W)return W;A.set(E,j),b(E)?E.forEach((function(e){j.add(C(e,N,O,e,E,A))})):g(E)&&E.forEach((function(e,t){j.set(t,C(e,N,O,t,E,A))}));var B=L?void 0:(M?F?c:s:F?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(j,t,C(e,N,O,t,E,A))})),j},V1}function vF(){if(I2)return G1;I2=1;var e=bA();return G1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function mF(){if(k2)return K1;k2=1;var e=vF(),t=xA(),n=R_();return K1=function(r){return n(t(r,void 0,e),r+"")}}bd.exports;const gF={light:"",dark:".dark"},kA=P.createContext(null);function MA(){const e=P.useContext(kA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const yF=P.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=P.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return k.jsx(kA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:a,className:se("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[k.jsx(bF,{id:l,config:r}),k.jsx(Kj,{children:n})]})})}));yF.displayName="Chart";const bF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(gF).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},DQ=O_,xF=P.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:v}=MA(),g=P.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=xw(v,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=v[i])?void 0:e.label)||i;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[i,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:h,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=xw(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):k.jsxs(k.Fragment,{children:[null!=i&&i.icon?k.jsx(i.icon,{}):!a&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));xF.displayName="ChartTooltip";const IQ=E_,wF=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=MA(),u=P.useRef({});return P.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?k.jsx("div",{ref:i,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=xw(l,e,i),c=!!o&&i===a;return k.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function xw(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}wF.displayName="ChartLegend";const _F=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),M2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a,className:i})=>k.jsxs("div",{onClick:n?void 0:o,className:se("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300",i),children:[r&&k.jsxs($O,{className:se("size-6 text-[10px]"),children:[k.jsx(SO,{src:r,alt:e}),k.jsx(CO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),a&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},disabled:n,className:"pointer-events-auto cursor-pointer",children:k.jsx(Uw,{size:16})})]});function mm(e){const t=Ae({value:e,previous:e});return Vr((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function gm(e){const[t,n]=Je(void 0);return pr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const LA="Checkbox",[$F,kQ]=Er(LA),[SF,CF]=$F(LA),EF=me(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=Je(null),p=Rt(t,(e=>f(e))),m=Ae(!1),h=!d||!!d.closest("form"),[v=!1,g]=Go({prop:o,defaultProp:a,onChange:s}),y=Ae(v);return Le((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),F(SF,{scope:n,state:v,disabled:l},F(at.button,le({type:"button",role:"checkbox","aria-checked":dl(v)?"mixed":v,"aria-required":i,"data-state":jA(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:We(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:We(e.onClick,(e=>{g((e=>!!dl(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&F(TF,{control:d,bubbles:!m.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),PF="CheckboxIndicator",RF=me(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=CF(PF,n);return F(No,{present:r||dl(a.state)||!0===a.state},F(at.span,le({"data-state":jA(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),TF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=dl(n),o.call(e,!dl(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"checkbox","aria-hidden":!0,defaultChecked:!dl(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dl(e){return"indeterminate"===e}function jA(e){return dl(e)?"indeterminate":e?"checked":"unchecked"}const FA=EF,OF=RF,AF=ea("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),k_=P.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const[i]=P.useState(o.checked),[l,u]=P.useState(!1);P.useEffect((()=>{i!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?k.jsx(d7,{...e}):k.jsx(Ww,{...e});return k.jsxs(FA,{ref:a,className:se(e,AF({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||i)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),k.jsx(OF,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));k_.displayName=FA.displayName;var L2=1,NF=.9,DF=.8,IF=.17,Y1=.1,X1=.999,kF=.9999,MF=.99,LF=/[\\\/_+.#"@\[\(\{&]/,jF=/[\\\/_+.#"@\[\(\{&]/g,FF=/[\s-]/,BA=/[\s-]/g;function ww(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?L2:MF;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var u,s,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=ww(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=L2:LF.test(e.charAt(p-1))?(u*=DF,(c=e.slice(o,p-1).match(jF))&&o>0&&(u*=Math.pow(X1,c.length))):FF.test(e.charAt(p-1))?(u*=NF,(d=e.slice(o,p-1).match(BA))&&o>0&&(u*=Math.pow(X1,d.length))):(u*=IF,o>0&&(u*=Math.pow(X1,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=kF)),(u<Y1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=ww(e,t,n,r,p+1,a+2,i))*Y1>u&&(u=s*Y1)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[l]=m,m}function j2(e){return e.toLowerCase().replace(BA," ")}function BF(e,t,n){return ww(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,j2(e),j2(t),0,0,{})}var pd='[cmdk-group=""]',Q1='[cmdk-group-items=""]',qF='[cmdk-group-heading=""]',M_='[cmdk-item=""]',F2=`${M_}:not([aria-disabled="true"])`,_w="cmdk-item-select",ul="data-value",zF=(e,t,n)=>BF(e,t,n),qA=P.createContext(void 0),Qd=()=>P.useContext(qA),zA=P.createContext(void 0),L_=()=>P.useContext(zA),WA=P.createContext(void 0),UA=P.forwardRef(((e,t)=>{let n=Gc((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Gc((()=>new Set)),o=Gc((()=>new Map)),a=Gc((()=>new Map)),i=Gc((()=>new Set)),l=HA(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=JF();vl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),vl((()=>{_(6,T)}),[]);let k=P.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=P.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:zF;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;A().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(Q1);t?t.appendChild(e.parentElement===t?e:e.closest(`${Q1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Q1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${pd}[${ul}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=A().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ul);k.setState("value",t||void 0)}function O(){var e,t,i,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=s}function T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(pd))?void 0:t.querySelector(qF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${M_}[aria-selected="true"]`)}function A(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(F2))}function j(e){let t=A()[e];t&&k.setState("value",t.getAttribute(ul))}function D(e){var t;let n=R(),r=A(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(ul))}function F(e){let t,n=R(),r=null==n?void 0:n.closest(pd);for(;r&&!t;)r=e>0?QF(r,pd):ZF(r,pd),t=null==r?void 0:r.querySelector(F2);t?k.setState("value",t.getAttribute(ul)):D(e)}let M=()=>j(A().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?F(1):D(1)},I=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?F(-1):D(-1)};return P.createElement(at.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(_w);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:tB},u),ym(e,(e=>P.createElement(zA.Provider,{value:k},P.createElement(qA.Provider,{value:S},e)))))})),WF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),a=P.useRef(null),i=P.useContext(WA),l=Qd(),u=HA(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;vl((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=VA(o,a,[e.value,e.children,a],e.keywords),d=L_(),f=ml((e=>e.value&&e.value===c.current)),p=ml((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(_w,m),()=>t.removeEventListener(_w,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(at.div,{ref:Nd([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:h,onClick:v?void 0:m},e.children)})),UF=P.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=P.useId(),l=P.useRef(null),u=P.useRef(null),s=P.useId(),c=Qd(),d=ml((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));vl((()=>c.group(i)),[]),VA(i,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:i,forceMount:o})),[o]);return P.createElement(at.div,{ref:Nd([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&P.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),ym(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(WA.Provider,{value:f},e)))))})),HF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),a=ml((e=>!e.search));return n||a?P.createElement(at.div,{ref:Nd([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),VF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=L_(),i=ml((e=>e.search)),l=ml((e=>e.value)),u=Qd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${M_}[${ul}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return P.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),P.createElement(at.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),GF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=P.useRef(null),i=P.useRef(null),l=Qd();return P.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),P.createElement(at.div,{ref:Nd([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},ym(e,(e=>P.createElement("div",{ref:Nd([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),KF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return P.createElement(em,{open:n,onOpenChange:r},P.createElement(tm,{container:i},P.createElement(au,{"cmdk-overlay":"",className:o}),P.createElement(su,{"aria-label":e.label,"cmdk-dialog":"",className:a},P.createElement(UA,{ref:t,...l}))))})),YF=P.forwardRef(((e,t)=>ml((e=>0===e.filtered.count))?P.createElement(at.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),XF=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return P.createElement(at.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ym(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Kr=Object.assign(UA,{List:GF,Item:WF,Input:VF,Group:UF,Separator:HF,Dialog:KF,Empty:YF,Loading:XF});function QF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ZF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function HA(e){let t=P.useRef(e);return vl((()=>{t.current=e})),t}var vl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Gc(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Nd(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ml(e){let t=L_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function VA(e,t,n,r=[]){let o=P.useRef(),a=Qd();return vl((()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));a.value(e,l,u),null==(i=t.current)||i.setAttribute(ul,l),o.current=l})),o}var JF=()=>{let[e,t]=P.useState(),n=Gc((()=>new Map));return vl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function eB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function ym({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(eB(t),{ref:t.ref},n(t.props.children)):n(t)}var tB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const nB=em,MQ=t_,rB=tm,LQ=lu,GA=P.forwardRef((({className:e,...t},n)=>(P.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),k.jsx(au,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));GA.displayName=au.displayName;const oB=ea("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),iB=ea("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),KA=P.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:a="big",children:i,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const m=k.jsxs(lu,{className:se(oB({closeVariant:o})),children:[k.jsx(Uw,{onClick:c,fill:"currentColor",className:se(iB({closeSize:a}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(rB,{children:[k.jsx(GA,{className:l,onClick:c}),r&&"insideCard"!==o&&m,k.jsxs(su,{ref:p,className:se("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...f,children:[e&&k.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),k.jsx("div",{className:se("p-m",u),children:i}),r&&"insideCard"===o&&m,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(NT,{color:"var(--slate-400)",size:24})}),k.jsx(YA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));KA.displayName=su.displayName;const aB=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});aB.displayName="DialogHeader";const YA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});YA.displayName="DialogFooter";const sB=P.forwardRef((({className:e,...t},n)=>k.jsx(Wd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));sB.displayName=Wd.displayName;const lB=P.forwardRef((({className:e,...t},n)=>k.jsx(Ud,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));lB.displayName=Ud.displayName;const XA=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));XA.displayName=Kr.displayName;const jQ=({children:e,...t})=>k.jsx(nB,{...t,children:k.jsx(KA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(XA,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),cB=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Kr.Input,{ref:n,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));cB.displayName=Kr.Input.displayName;const uB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));uB.displayName=Kr.List.displayName;const fB=P.forwardRef(((e,t)=>k.jsx(Kr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));fB.displayName=Kr.Empty.displayName;const dB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Group,{ref:n,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));dB.displayName=Kr.Group.displayName;const pB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));pB.displayName=Kr.Separator.displayName;const hB=P.forwardRef((({className:e,...t},n)=>k.jsx(Kr.Item,{ref:n,className:se("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));hB.displayName=Kr.Item.displayName;const vB=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Qa(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function B2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function QA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=B2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():B2(e[t],null)}}}}function wl(...e){return P.useCallback(QA(...e),e)}function mB(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=P.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function gB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},yB(r,...t)]}function yB(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}vB.displayName="CommandShortcut";var Iv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},bB=P[" useId ".trim().toString()]||(()=>{}),xB=0;function Z1(e){const[t,n]=P.useState(bB());return Iv((()=>{e||n((e=>e??String(xB++)))}),[e]),e||(t?`radix-${t}`:"")}function gl(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function wB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=_B({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=gl(n);return[i,P.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function _B({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=gl(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function ZA(e){const t=$B(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(CB);if(i){const e=i.props.children,r=a.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function $B(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=PB(n),o=EB(r,n.props);return n.type!==P.Fragment&&(o.ref=t?QA(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var SB=Symbol("radix.slottable");function CB(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===SB}function EB(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function PB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var RB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ra=RB.reduce(((e,t)=>{const n=ZA(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function TB(e,t){e&&$i.flushSync((()=>e.dispatchEvent(t)))}function OB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e);P.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var q2,AB="DismissableLayer",$w="dismissableLayer.update",NB="dismissableLayer.pointerDownOutside",DB="dismissableLayer.focusOutside",JA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eN=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=P.useContext(JA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),m=wl(t,(e=>d(e))),h=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(v),y=c?h.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=MB((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=LB((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return OB((e=>{y===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),P.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(q2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),z2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=q2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),z2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener($w,e),()=>document.removeEventListener($w,e)}),[]),k.jsx(ra.div,{...u,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Qa(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Qa(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Qa(e.onPointerDownCapture,x.onPointerDownCapture)})}));eN.displayName=AB;var IB="DismissableLayerBranch",kB=P.forwardRef(((e,t)=>{const n=P.useContext(JA),r=P.useRef(null),o=wl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(ra.div,{...e,ref:o})}));function MB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){tN(NB,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LB(e,t=(null==globalThis?void 0:globalThis.document)){const n=gl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&tN(DB,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function z2(){const e=new CustomEvent($w);document.dispatchEvent(e)}function tN(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?TB(o,a):o.dispatchEvent(a)}kB.displayName=IB;var J1="focusScope.autoFocusOnMount",ex="focusScope.autoFocusOnUnmount",W2={bubbles:!1,cancelable:!0},jB="FocusScope",nN=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=P.useState(null),s=gl(o),c=gl(a),d=P.useRef(null),f=wl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ka(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ka(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ka(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){H2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(J1,W2);l.addEventListener(J1,s),l.dispatchEvent(t),t.defaultPrevented||(FB(UB(rN(l)),{select:!0}),document.activeElement===e&&Ka(l))}return()=>{l.removeEventListener(J1,s),setTimeout((()=>{const t=new CustomEvent(ex,W2);l.addEventListener(ex,c),l.dispatchEvent(t),t.defaultPrevented||Ka(e??document.body,{select:!0}),l.removeEventListener(ex,c),H2.remove(p)}),0)}}}),[l,s,c,p]);const m=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=BB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ka(a,{select:!0})):(e.preventDefault(),n&&Ka(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(ra.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})}));function FB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ka(r,{select:t}),document.activeElement!==n)return}function BB(e){const t=rN(e);return[U2(t,e),U2(t.reverse(),e)]}function rN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function U2(e,t){for(const n of e)if(!qB(n,{upTo:t}))return n}function qB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function zB(e){return e instanceof HTMLInputElement&&"select"in e}function Ka(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zB(e)&&t&&e.select()}}nN.displayName=jB;var H2=WB();function WB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=V2(e,t),e.unshift(t)},remove(t){var n;e=V2(e,t),null==(n=e[0])||n.resume()}}}function V2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function UB(e){return e.filter((e=>"A"!==e.tagName))}var HB="Portal",oN=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=P.useState(!1);Iv((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Gw.createPortal(k.jsx(ra.div,{...o,ref:t}),l):null}));function VB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}oN.displayName=HB;var bm=e=>{const{present:t,children:n}=e,r=GB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=wl(r.ref,KB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function GB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=VB(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=fv(r.current);a.current="mounted"===l?e:"none"}),[l]),Iv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=fv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Iv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=fv(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=fv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function fv(e){return(null==e?void 0:e.animationName)||"none"}function KB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}bm.displayName="Presence";var tx=0;function YB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??G2()),document.body.insertAdjacentElement("beforeend",e[1]??G2()),tx++,()=>{1===tx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),tx--}}),[])}function G2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var iN=KT(),nx=function(){},xm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:nx,onWheelCapture:nx,onTouchMoveCapture:nx}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=Zw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=GT([n,t]),_=fr(fr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:iN,removeScrollBar:s,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:y}),i?P.cloneElement(P.Children.only(l),fr(fr({},_),{ref:x})):P.createElement(g,fr({},_,{className:u,ref:x}),l))}));xm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xm.classNames={fullWidth:wd,zeroRight:xd};var Sw=!1;if(typeof window<"u")try{var dv=Object.defineProperty({},"passive",{get:function(){return Sw=!0,!0}});window.addEventListener("test",dv,dv),window.removeEventListener("test",dv,dv)}catch{Sw=!1}var Hc=!!Sw&&{passive:!1},XB=function(e){return"TEXTAREA"===e.tagName},aN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!XB(e)&&"visible"===n[t])},QB=function(e){return aN(e,"overflowY")},ZB=function(e){return aN(e,"overflowX")},K2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),sN(e,r)){var o=lN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},JB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},eq=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},sN=function(e,t){return"v"===e?QB(t):ZB(t)},lN=function(e,t){return"v"===e?JB(t):eq(t)},tq=function(e,t){return"h"===e&&"rtl"===t?-1:1},nq=function(e,t,n,r,o){var a=tq(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,u=t.contains(l),s=!1,c=i>0,d=0,f=0;do{var p=lN(e,l),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&sN(e,l)&&(d+=h,f+=m),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},pv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y2=function(e){return[e.deltaX,e.deltaY]},X2=function(e){return e&&"current"in e?e.current:e},rq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oq=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},iq=0,Vc=[];function aq(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(iq++)[0],a=P.useState(Jw)[0],i=P.useRef(e);P.useEffect((function(){i.current=e}),[e]),P.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=VT([e.lockRef.current],(e.shards||[]).map(X2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=P.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=pv(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-a[0],s="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=K2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=K2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return nq(p,t,e,"h"===p?u:s,!0)}),[]),u=P.useCallback((function(e){var n=e;if(Vc.length&&Vc[Vc.length-1]===a){var r="deltaY"in n?Y2(n):pv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&rq(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(X2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=P.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:sq(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=P.useCallback((function(e){n.current=pv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,Y2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,pv(t),t.target,l(t,e.lockRef.current))}),[]);P.useEffect((function(){return Vc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Hc),document.addEventListener("touchmove",u,Hc),document.addEventListener("touchstart",c,Hc),function(){Vc=Vc.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Hc),document.removeEventListener("touchmove",u,Hc),document.removeEventListener("touchstart",c,Hc)}}),[]);var p=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(a,{styles:oq(o)}):null,p?P.createElement(ZT,{gapMode:e.gapMode}):null)}function sq(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lq=XT(iN,aq);var cN=P.forwardRef((function(e,t){return P.createElement(xm,fr({},e,{ref:t,sideCar:lq}))}));cN.classNames=xm.classNames;var j_="Dialog",[uN,FQ]=gB(j_),[cq,Xo]=uN(j_),fN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=P.useRef(null),u=P.useRef(null),[s=!1,c]=wB({prop:r,defaultProp:o,onChange:a});return k.jsx(cq,{scope:t,triggerRef:l,contentRef:u,contentId:Z1(),titleId:Z1(),descriptionId:Z1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};fN.displayName=j_;var dN="DialogTrigger",pN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(dN,n),a=wl(t,o.triggerRef);return k.jsx(ra.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":q_(o.open),...r,ref:a,onClick:Qa(e.onClick,o.onOpenToggle)})}));pN.displayName=dN;var F_="DialogPortal",[uq,hN]=uN(F_,{forceMount:void 0}),vN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Xo(F_,t);return k.jsx(uq,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(bm,{present:n||a.open,children:k.jsx(oN,{asChild:!0,container:o,children:e})})))})};vN.displayName=F_;var kv="DialogOverlay",mN=P.forwardRef(((e,t)=>{const n=hN(kv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Xo(kv,e.__scopeDialog);return a.modal?k.jsx(bm,{present:r||a.open,children:k.jsx(dq,{...o,ref:t})}):null}));mN.displayName=kv;var fq=ZA("DialogOverlay.RemoveScroll"),dq=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(kv,n);return k.jsx(cN,{as:fq,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(ra.div,{"data-state":q_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),yl="DialogContent",gN=P.forwardRef(((e,t)=>{const n=hN(yl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Xo(yl,e.__scopeDialog);return k.jsx(bm,{present:r||a.open,children:a.modal?k.jsx(pq,{...o,ref:t}):k.jsx(hq,{...o,ref:t})})}));gN.displayName=yl;var pq=P.forwardRef(((e,t)=>{const n=Xo(yl,e.__scopeDialog),r=P.useRef(null),o=wl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return zd(e)}),[]),k.jsx(yN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qa(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Qa(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Qa(e.onFocusOutside,(e=>e.preventDefault()))})})),hq=P.forwardRef(((e,t)=>{const n=Xo(yl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(yN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),yN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Xo(yl,n),u=P.useRef(null),s=wl(t,u);return YB(),k.jsxs(k.Fragment,{children:[k.jsx(nN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:k.jsx(eN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q_(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(vq,{titleId:l.titleId}),k.jsx(gq,{contentRef:u,descriptionId:l.descriptionId})]})]})})),B_="DialogTitle",bN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(B_,n);return k.jsx(ra.h2,{id:o.titleId,...r,ref:t})}));bN.displayName=B_;var xN="DialogDescription",wN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(xN,n);return k.jsx(ra.p,{id:o.descriptionId,...r,ref:t})}));wN.displayName=xN;var _N="DialogClose",$N=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xo(_N,n);return k.jsx(ra.button,{type:"button",...r,ref:t,onClick:Qa(e.onClick,(()=>o.onOpenChange(!1)))})}));function q_(e){return e?"open":"closed"}$N.displayName=_N;var SN="DialogTitleWarning",[BQ,CN]=mB(SN,{contentName:yl,titleName:B_,docsSlug:"dialog"}),vq=({titleId:e})=>{const t=CN(SN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},mq="DialogDescriptionWarning",gq=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CN(mq).contentName}}.`;return P.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},yq=fN,bq=pN,xq=vN,wq=mN,_q=gN,$q=bN,Sq=wN,Cq=$N;function Eq(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const EN=be.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),fu=()=>{const e=be.useContext(EN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Eq("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const Pq=24,Rq=typeof window<"u"?ou:Le;function Q2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Tq(){return z_(/^Mac/)}function Oq(){return z_(/^iPhone/)}function Z2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Aq(){return z_(/^iPad/)||Tq()&&navigator.maxTouchPoints>1}function PN(){return Oq()||Aq()}function z_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const rx=typeof document<"u"&&window.visualViewport;function J2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function RN(e){for(J2(e)&&(e=e.parentElement);e&&!J2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Nq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ox,hv=0;function Dq(e={}){let{isDisabled:t}=e;Rq((()=>{if(!t)return hv++,1===hv&&PN()&&(ox=Iq()),()=>{hv--,0===hv&&(null==ox||ox())}}),[t])}function Iq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=Q2(kq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=Q2(hd(document,"touchstart",(n=>{e=RN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),hd(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),hd(document,"touchend",(e=>{let t=e.target;Cw(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),hd(document,"focus",(e=>{let t=e.target;Cw(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",rx&&(rx.height<window.innerHeight?requestAnimationFrame((()=>{eR(t)})):rx.addEventListener("resize",(()=>eR(t)),{once:!0}))})))}),!0),hd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function kq(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function hd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function eR(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=RN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function Cw(e){return e instanceof HTMLInputElement&&!Nq.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Mq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Lq(...e){return t=>e.forEach((e=>Mq(e,t)))}function TN(...e){return P.useCallback(Lq(...e),e)}const ON=new WeakMap;function Rn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&ON.set(e,r)}function jq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=ON.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function Fq(e){return 8*(Math.log(e+1)-2)}function ix(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Bq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},AN=.4,qq=.25,zq=100,NN=8,al=16,Ew=26,ax="vaul-dragging";function DN(e){const t=be.useRef(e);return be.useEffect((()=>{t.current=e})),be.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Wq({defaultProp:e,onChange:t}){const n=be.useState(e),[r]=n,o=be.useRef(r),a=DN(t);return be.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function IN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Wq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=DN(n);return[i,be.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function Uq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=IN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=be.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);be.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=be.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=be.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=be.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Tn(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=be.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),b=be.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return be.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===h,d=e>0;if(h===a-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),!s&&r>2&&!d)return void(i?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Tn(l)?window.innerHeight:window.innerWidth;if(r>AN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===h)return;b(g[h+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const Hq=()=>()=>{};function Vq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=fu(),a=be.useRef(null),i=Vr((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}be.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Bq(r&&!o?ix(document.body,{background:"black"}):Hq,ix(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=ix(t,{borderRadius:"8px",overflow:"hidden",...Tn(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*nn.DURATION)}}}),[t,n,i])}let vd=null;function Gq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=be.useState((()=>typeof window<"u"?window.location.href:"")),u=be.useRef(0),s=be.useCallback((()=>{if(Z2()&&null===vd&&e&&!a){vd={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=be.useCallback((()=>{if(Z2()&&null!==vd&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,vd),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),vd=null}}),[i]);return be.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),be.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,s,c]),{restorePositionSetting:c}}function kN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=qq,scrollLockTimeout:s=zq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:P=!1,preventScrollRestoration:k=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,A]=IN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[j,D]=be.useState(!1),[F,M]=be.useState(!1),[L,I]=be.useState(!1),z=be.useRef(null),W=be.useRef(null),B=be.useRef(null),$=be.useRef(null),U=be.useRef(null),H=be.useRef(!1),V=be.useRef(null),K=be.useRef(0),q=be.useRef(!1),G=be.useRef(0),Y=be.useRef(null),X=be.useRef((null==(O=Y.current)?void 0:O.getBoundingClientRect().height)||0),Q=be.useRef((null==(T=Y.current)?void 0:T.getBoundingClientRect().width)||0),J=be.useRef(0),Z=be.useCallback((e=>{a&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=Uq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:Y,fadeFromIndex:f,overlayRef:z,onSnapPointChange:Z,direction:w,container:E,snapToSequentialPoint:P});Dq({isDisabled:!R||F||!v||L||!j||!S||!_});const{restorePositionSetting:ue}=Gq({isOpen:R,modal:v,nested:y,hasBeenOpened:j,preventScrollRestoration:k,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=Y.current?vv(Y.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=U.current)?void 0:r.getTime())<s&&0===i||t)return U.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return U.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!F||!Y.current||(Y.current.classList.remove(ax),H.current=!1,M(!1),$.current=new Date),null==g||g(),e||A(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*nn.DURATION)}function fe(){if(!Y.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=vv(Y.current,w);Rn(Y.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(z.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return be.useEffect((()=>{var e;function t(){if(!Y.current||!S)return;if(Cw(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Y.current.getBoundingClientRect().height||0,i=o>.8*n;J.current||(J.current=o);const l=Y.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(q.current=!q.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||q.current){const e=Y.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),Y.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else Y.current.style.height=`${J.current}px`;a&&a.length>0&&!q.current?Y.current.style.bottom="0px":Y.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),be.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{jq(document.documentElement,"scrollBehavior")})),[R]),be.createElement(yq,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?D(!0):de(!0),A(e))},open:R},be.createElement(EN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:Y,overlayRef:z,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||Y.current&&!Y.current.contains(e.target)||(X.current=(null==(t=Y.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Y.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,PN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!F||!Y.current)return;Y.current.classList.remove(ax),H.current=!1,M(!1),$.current=new Date;const t=vv(Y.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=$.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>AN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=Y.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=Y.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(Y.current&&F){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(Y.current.classList.add(ax),H.current=!0,Rn(Y.current,{transition:"none"}),Rn(z.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=Fq(n),r=Math.min(-1*e,0)*t;return void Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Rn(z.current,{opacity:`${m}`,transition:"none"},!0)),s&&z.current&&i){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Rn(Y.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:F,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(Y.current,{transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;V.current&&window.clearTimeout(V.current),Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&Y.current&&(V.current=setTimeout((()=>{const e=vv(Y.current,w);Rn(Y.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(Y.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const MN=be.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=fu(),u=TN(t,n),s=r&&r.length>0;return l?be.createElement(wq,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&s?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));MN.displayName="Drawer.Overlay";const LN=be.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:v,autoFocus:g}=fu(),[y,b]=be.useState(!1),w=TN(o,a),x=be.useRef(null),_=be.useRef(null),P=be.useRef(!1),k=m&&m.length>0;Vq();function S(e){x.current=null,P.current=!1,l(e)}return be.useEffect((()=>{k&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),be.createElement(_q,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&k?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(P.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return P.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,P.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));LN.displayName="Drawer.Content";const Kq=250,Yq=120,jN=be.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=fu(),m=be.useRef(null),h=be.useRef(!1);function v(){window.clearTimeout(m.current),h.current=!1}return be.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),(!i||0===i.length)&&s)return void o();if(l===i[i.length-1]&&s)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];u(n)}()}),Yq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),Kq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},be.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function Xq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=fu();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return be.createElement(kN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function Qq(e){const t=fu(),{container:n=t.container,...r}=e;return be.createElement(xq,{container:n,...r})}jN.displayName="Drawer.Handle";const Qo={Root:kN,NestedRoot:Xq,Content:LN,Overlay:MN,Trigger:bq,Portal:Qq,Handle:jN,Close:Cq,Title:$q,Description:Sq},Zq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Qo.Root,{direction:t,shouldScaleBackground:e,...n});Zq.displayName="Drawer";const qQ=Qo.Trigger,Jq=Qo.Portal,zQ=Qo.Close,FN=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));FN.displayName=Qo.Overlay.displayName;const ez=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(Jq,{children:[k.jsx(FN,{}),k.jsxs(Qo.Content,{ref:o,className:se("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));ez.displayName="DrawerContent";const tz=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});tz.displayName="DrawerHeader";const nz=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});nz.displayName="DrawerFooter";const rz=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));rz.displayName=Qo.Title.displayName;const oz=P.forwardRef((({className:e,...t},n)=>k.jsx(Qo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function W_(e){const t=e+"CollectionProvider",[n,r]=Er(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",l=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=be.useRef(null),a=be.useRef(new Map).current;return be.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:be.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,a(i,n).collectionRef);return be.createElement(pl,{ref:o},r)})),ItemSlot:be.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=be.useRef(null),s=Rt(t,i),c=a(l,n);return be.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),be.createElement(pl,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return be.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}oz.displayName=Qo.Description.displayName;const iz=Ja(void 0);function Zd(e){const t=ru(iz);return e||t||"ltr"}const az=["top","right","bottom","left"],ts=Math.min,lo=Math.max,Mv=Math.round,mv=Math.floor,ns=e=>({x:e,y:e}),sz={left:"right",right:"left",bottom:"top",top:"bottom"},lz={start:"end",end:"start"};function Pw(e,t,n){return lo(e,ts(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function du(e){return e.split("-")[1]}function U_(e){return"x"===e?"y":"x"}function H_(e){return"y"===e?"height":"width"}function rs(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function V_(e){return U_(rs(e))}function cz(e,t,n){void 0===n&&(n=!1);const r=du(e),o=V_(e),a=H_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lv(i)),[i,Lv(i)]}function uz(e){const t=Lv(e);return[Rw(e),t,Rw(t)]}function Rw(e){return e.replace(/start|end/g,(e=>lz[e]))}function fz(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function dz(e,t,n,r){const o=du(e);let a=fz(Zi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Rw)))),a}function Lv(e){return e.replace(/left|right|bottom|top/g,(e=>sz[e]))}function pz(e){return{top:0,right:0,bottom:0,left:0,...e}}function BN(e){return"number"!=typeof e?pz(e):{top:e,right:e,bottom:e,left:e}}function jv(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function tR(e,t,n){let{reference:r,floating:o}=e;const a=rs(t),i=V_(t),l=H_(i),u=Zi(t),s="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(du(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const hz=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=tR(s,r,u),f=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:a,fn:h}=l[n],{x:v,y:g,data:y,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:i,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=tR(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Dd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qi(t,e),m=BN(p),h=l[f?"floating"===d?"reference":"floating":d],v=jv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=jv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+m.top)/b.y,bottom:(w.bottom-v.bottom+m.bottom)/b.y,left:(v.left-w.left+m.left)/b.x,right:(w.right-v.right+m.right)/b.x}}const vz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Qi(e,t)||{};if(null==s)return{};const d=BN(c),f={x:n,y:r},p=V_(o),m=H_(p),h=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let P=_?_[b]:0;(!P||!await(null==i.isElement?void 0:i.isElement(_)))&&(P=l.floating[b]||a.floating[m]);const k=w/2-x/2,S=P/2-h[m]/2-1,C=ts(d[g],S),E=ts(d[y],S),N=C,O=P-h[m]-E,T=P/2-h[m]/2+k,R=Pw(N,T,O),A=!u.arrow&&null!=du(o)&&T!==R&&a.reference[m]/2-(T<N?C:E)-h[m]/2<0,j=A?T<N?T-N:T-O:0;return{[p]:f[p]+j,data:{[p]:R,centerOffset:T-R-j,...A&&{alignmentOffset:j}},reset:A}}}),mz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Qi(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=rs(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!h?[Lv(l)]:uz(l)),_="none"!==m;!f&&_&&x.push(...dz(l,h,m,w));const P=[l,...x],k=await Dd(t,v),S=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(k[g]),d){const e=cz(o,i,w);S.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=rs(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function nR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rR(e){return az.some((t=>e[t]>=0))}const gz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=nR(await Dd(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rR(e)}}}case"escaped":{const e=nR(await Dd(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rR(e)}}}default:return{}}}}};async function yz(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Zi(n),l=du(n),u="y"===rs(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const bz=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,u=await yz(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},xz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Qi(e,t),s={x:n,y:r},c=await Dd(t,u),d=rs(Zi(o)),f=U_(d);let p=s[f],m=s[d];if(a){const e="y"===f?"bottom":"right";p=Pw(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=Pw(m+c["y"===d?"top":"left"],m,m-c[e])}const h=l.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}},wz=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=Qi(e,t),c={x:n,y:r},d=rs(o),f=U_(d);let p=c[f],m=c[d];const h=Qi(l,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis,n=a.reference[f]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Zi(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},_z=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...s}=Qi(e,t),c=await Dd(t,s),d=Zi(o),f=du(o),p="y"===rs(o),{width:m,height:h}=a.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=h-c.top-c.bottom,b=m-c.left-c.right,w=ts(h-c[v],y),x=ts(m-c[g],b),_=!t.middlewareData.shift;let P=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=y),_&&!f){const e=lo(c.left,0),t=lo(c.right,0),n=lo(c.top,0),r=lo(c.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:lo(c.left,c.right)):P=h-2*(0!==n||0!==r?n+r:lo(c.top,c.bottom))}await u({...t,availableWidth:k,availableHeight:P});const S=await i.getDimensions(l.floating);return m!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function wm(){return typeof window<"u"}function os(e){return qN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oa(e){var t;return null==(t=(qN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qN(e){return!!wm()&&(e instanceof Node||e instanceof uo(e).Node)}function xi(e){return!!wm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!wm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function oR(e){return!(!wm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Jd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Oo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $z(e){return["table","td","th"].includes(os(e))}function Sz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function G_(e){const t=K_(),n=xi(e)?Oo(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function zN(e){let t=tu(e);for(;wi(t)&&!_m(t);){if(G_(t))return t;if(Sz(t))return null;t=tu(t)}return null}function K_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _m(e){return["html","body","#document"].includes(os(e))}function Oo(e){return uo(e).getComputedStyle(e)}function $m(e){return xi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tu(e){if("html"===os(e))return e;const t=e.assignedSlot||e.parentNode||oR(e)&&e.host||oa(e);return oR(t)?t.host:t}function WN(e){const t=tu(e);return _m(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Jd(t)?t:WN(t)}function Id(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=WN(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=uo(o);if(a){const e=Cz(i);return t.concat(i,i.visualViewport||[],Jd(o)?o:[],e&&n?Id(e):[])}return t.concat(o,Id(o,[],n))}function Cz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UN(e){const t=Oo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Mv(n)!==a||Mv(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Y_(e){return xi(e)?e:e.contextElement}function Yc(e){const t=Y_(e);if(!wi(t))return ns(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=UN(t);let i=(a?Mv(n.width):n.width)/r,l=(a?Mv(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ez=ns(0);function HN(e){const t=uo(e);return K_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ez}function Pz(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function bl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Y_(e);let i=ns(1);t&&(r?xi(r)&&(i=Yc(r)):i=Yc(e));const l=Pz(a,n,r)?HN(a):ns(0);let u=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=uo(a),t=r&&xi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Yc(n),t=n.getBoundingClientRect(),r=Oo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=a,n=uo(n).frameElement}}return jv({width:c,height:d,x:u,y:s})}const Rz=[":popover-open",":modal"];function VN(e){let t=!1,n=0,r=0;if(Rz.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=zN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Tz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=oa(r),[i]=t?VN(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=ns(1);const s=ns(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==os(r)||Jd(a))&&(l=$m(r)),wi(r))){const e=bl(r);u=Yc(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Oz(e){return Array.from(e.getClientRects())}function GN(e){return bl(oa(e)).left+$m(e).scrollLeft}function Az(e){const t=oa(e),n=$m(e),r=e.ownerDocument.body,o=lo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=lo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+GN(e);const l=-n.scrollTop;return"rtl"===Oo(r).direction&&(i+=lo(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function Nz(e,t){const n=uo(e),r=oa(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=K_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function Dz(e,t){const n=bl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wi(e)?Yc(e):ns(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function iR(e,t,n){let r;if("viewport"===t)r=Nz(e,n);else if("document"===t)r=Az(oa(e));else if(xi(t))r=Dz(t,n);else{const n=HN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return jv(r)}function KN(e,t){const n=tu(e);return!(n===t||!xi(n)||_m(n))&&("fixed"===Oo(n).position||KN(n,t))}function Iz(e,t){const n=t.get(e);if(n)return n;let r=Id(e,[],!1).filter((e=>xi(e)&&"body"!==os(e))),o=null;const a="fixed"===Oo(e).position;let i=a?tu(e):e;for(;xi(i)&&!_m(i);){const t=Oo(i),n=G_(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Jd(i)&&!n&&KN(e,i))?r=r.filter((e=>e!==i)):o=t,i=tu(i)}return t.set(e,r),r}function kz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Iz(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=iR(t,n,o);return e.top=lo(r.top,e.top),e.right=ts(r.right,e.right),e.bottom=ts(r.bottom,e.bottom),e.left=lo(r.left,e.left),e}),iR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mz(e){const{width:t,height:n}=UN(e);return{width:t,height:n}}function Lz(e,t,n,r){const o=wi(t),a=oa(t),i="fixed"===n,l=bl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=ns(0);if(o||!o&&!i)if(("body"!==os(t)||Jd(a))&&(u=$m(t)),o){const e=bl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=GN(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,m]=VN(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function aR(e,t){return wi(e)&&"fixed"!==Oo(e).position?t?t(e):e.offsetParent:null}function YN(e,t){const n=uo(e);if(!wi(e))return n;let r=aR(e,t);for(;r&&$z(r)&&"static"===Oo(r).position;)r=aR(r,t);return r&&("html"===os(r)||"body"===os(r)&&"static"===Oo(r).position&&!G_(r))?n:r||zN(e)||n}const jz=async function(e){const t=this.getOffsetParent||YN,n=this.getDimensions;return{reference:Lz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Fz(e){return"rtl"===Oo(e).direction}const Bz={convertOffsetParentRelativeRectToViewportRelativeRect:Tz,getDocumentElement:oa,getClippingRect:kz,getOffsetParent:YN,getElementRects:jz,getClientRects:Oz,getDimensions:Mz,getScale:Yc,isElement:xi,isRTL:Fz};function qz(e,t){let n,r=null;const o=oa(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),a();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-mv(c)+"px "+-mv(o.clientWidth-(s+d))+"px "+-mv(o.clientHeight-(c+f))+"px "+-mv(s)+"px",threshold:lo(0,ts(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),a}function zz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,s=Y_(e),c=o||a?[...s?Id(s):[],...Id(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?qz(s,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let m,h=u?bl(e):null;return u&&function t(){const r=bl(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const Wz=xz,Uz=mz,Hz=_z,Vz=gz,sR=vz,Gz=wz,Kz=(e,t,n)=>{const r=new Map,o={platform:Bz,...n},a={...o.platform,_c:r};return hz(e,t,{...o,platform:a})};var Sv=typeof document<"u"?ou:Le;function Fv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Fv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Fv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function XN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lR(e,t){const n=XN(e);return Math.round(t*n)/n}function sx(e){const t=P.useRef(e);return Sv((()=>{t.current=e})),t}function Yz(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:s}=e,[c,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Fv(f,r)||p(r);const[m,h]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,h(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=a||m,x=i||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=sx(u),N=sx(o),O=sx(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),Kz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Fv(S.current,t)&&(S.current=t,$i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);Sv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);Sv((()=>(R.current=!0,()=>{R.current=!1})),[]),Sv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const A=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),j=P.useMemo((()=>({reference:w,floating:x})),[w,x]),D=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=lR(j.floating,c.x),r=lR(j.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...XN(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,j.floating,c.x,c.y]);return P.useMemo((()=>({...c,update:T,refs:A,elements:j,floatingStyles:D})),[c,T,A,j,D])}const Xz=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?sR({element:n.current,padding:r}).fn(t):{}:n?sR({element:n,padding:r}).fn(t):{}}}),Qz=(e,t)=>({...bz(e),options:[e,t]}),Zz=(e,t)=>({...Wz(e),options:[e,t]}),Jz=(e,t)=>({...Gz(e),options:[e,t]}),eW=(e,t)=>({...Uz(e),options:[e,t]}),tW=(e,t)=>({...Hz(e),options:[e,t]}),nW=(e,t)=>({...Vz(e),options:[e,t]}),rW=(e,t)=>({...Xz(e),options:[e,t]}),QN="Popper",[ZN,pu]=Er(QN),[oW,JN]=ZN(QN),iW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Je(null);return F(oW,{scope:t,anchor:r,onAnchorChange:o},n)},aW="PopperAnchor",sW=me(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=JN(aW,n),i=Ae(null),l=Rt(t,i);return Le((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:F(at.div,le({},o,{ref:l}))})),e3="PopperContent",[lW,WQ]=ZN(e3),cW=me(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...P}=e,k=JN(e3,c),[S,C]=Je(null),E=Rt(t,(e=>C(e))),[N,O]=Je(null),T=gm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,A=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:D,boundary:M.filter(uW),altBoundary:L},{refs:z,floatingStyles:W,placement:B,isPositioned:$,middlewareData:U}=Yz({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>zz(...e,{animationFrame:"always"===x}),elements:{reference:k.anchor},middleware:[Qz({mainAxis:f+A,alignmentAxis:m}),v&&Zz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?Jz():void 0,...I}),v&&eW({...I}),tW({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),N&&rW({element:N,padding:h}),fW({arrowWidth:R,arrowHeight:A}),w&&nW({strategy:"referenceHidden",...I})]}),[H,V]=t3(B),K=Gr(_);pr((()=>{$&&(null==K||K())}),[$,K]);const q=null===(o=U.arrow)||void 0===o?void 0:o.x,G=null===(a=U.arrow)||void 0===a?void 0:a.y,Y=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=Je();return pr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),F("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},F(lW,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:G,shouldHideArrow:Y},F(at.div,le({"data-side":H,"data-align":V},P,{ref:E,style:{...P.style,animation:$?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function uW(e){return null!==e}const fW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=t3(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function t3(e){const[t,n="center"]=e.split("-");return[t,n]}const Sm=iW,X_=sW,Q_=cW,lx="rovingFocusGroup.onEntryFocus",dW={bubbles:!1,cancelable:!0},Z_="RovingFocusGroup",[Tw,n3,pW]=W_(Z_),[hW,hu]=Er(Z_,[pW]),[vW,mW]=hW(Z_),gW=me(((e,t)=>F(Tw.Provider,{scope:e.__scopeRovingFocusGroup},F(Tw.Slot,{scope:e.__scopeRovingFocusGroup},F(yW,le({},e,{ref:t})))))),yW=me(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=Ae(null),f=Rt(t,d),p=Zd(a),[m=null,h]=Go({prop:i,defaultProp:l,onChange:u}),[v,g]=Je(!1),y=Gr(s),b=n3(n),w=Ae(!1),[x,_]=Je(0);return Le((()=>{const e=d.current;if(e)return e.addEventListener(lx,y),()=>e.removeEventListener(lx,y)}),[y]),F(vW,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:nt((e=>h(e)),[h]),onItemShiftTab:nt((()=>g(!0)),[]),onFocusableItemAdd:nt((()=>_((e=>e+1))),[]),onFocusableItemRemove:nt((()=>_((e=>e-1))),[])},F(at.div,le({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:We(e.onMouseDown,(()=>{w.current=!0})),onFocus:We(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(lx,dW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));r3([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:We(e.onBlur,(()=>g(!1)))})))})),bW="RovingFocusGroupItem",xW=me(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=co(),u=a||l,s=mW(bW,n),c=s.currentTabStopId===u,d=n3(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return Le((()=>{if(r)return f(),()=>p()}),[r,f,p]),F(Tw.ItemSlot,{scope:n,id:u,focusable:r,active:o},F(at.span,le({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:We(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:We(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:We(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=$W(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=s.loop?SW(n,r+1):n.slice(r+1)}setTimeout((()=>r3(n)))}}))})))})),wW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _W(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function $W(e,t,n){const r=_W(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return wW[r]}function r3(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const J_=gW,e$=xW,Ow=["Enter"," "],CW=["ArrowDown","PageUp","Home"],o3=["ArrowUp","PageDown","End"],EW=[...CW,...o3],PW={ltr:[...Ow,"ArrowRight"],rtl:[...Ow,"ArrowLeft"]},RW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cm="Menu",[kd,TW,OW]=W_(Cm),[_l,i3]=Er(Cm,[OW,pu,hu]),Em=pu(),a3=hu(),[s3,us]=_l(Cm),[AW,ep]=_l(Cm),NW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Em(t),[u,s]=Je(null),c=Ae(!1),d=Gr(a),f=Zd(o);return Le((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),F(Sm,l,F(s3,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},F(AW,{scope:t,onClose:nt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},l3=me(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Em(n);return F(X_,le({},o,r,{ref:t}))})),c3="MenuPortal",[DW,u3]=_l(c3,{forceMount:void 0}),IW=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=us(c3,t);return F(DW,{scope:t,forceMount:n},F(No,{present:n||a.open},F(Xw,{asChild:!0,container:o},r)))},Vo="MenuContent",[kW,t$]=_l(Vo),MW=me(((e,t)=>{const n=u3(Vo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=us(Vo,e.__scopeMenu),i=ep(Vo,e.__scopeMenu);return F(kd.Provider,{scope:e.__scopeMenu},F(No,{present:r||a.open},F(kd.Slot,{scope:e.__scopeMenu},i.modal?F(LW,le({},o,{ref:t})):F(jW,le({},o,{ref:t})))))})),LW=me(((e,t)=>{const n=us(Vo,e.__scopeMenu),r=Ae(null),o=Rt(t,r);return Le((()=>{const e=r.current;if(e)return zd(e)}),[]),F(n$,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:We(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),jW=me(((e,t)=>{const n=us(Vo,e.__scopeMenu);return F(n$,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),n$=me(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,v=us(Vo,n),g=ep(Vo,n),y=Em(n),b=a3(n),w=TW(n),[x,_]=Je(null),P=Ae(null),k=Rt(t,P,v.onContentChange),S=Ae(0),C=Ae(""),E=Ae(0),N=Ae(null),O=Ae("right"),T=Ae(0),R=m?qd:ls,A=m?{as:pl,allowPinchZoom:!0}:void 0;Le((()=>()=>window.clearTimeout(S.current)),[]),Qw();const j=nt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&iU(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return F(kW,{scope:n,searchRef:C,onItemEnter:nt((e=>{j(e)&&e.preventDefault()}),[j]),onItemLeave:nt((e=>{var t;j(e)||(null===(t=P.current)||void 0===t||t.focus(),_(null))}),[j]),onTriggerLeave:nt((e=>{j(e)&&e.preventDefault()}),[j]),pointerGraceTimerRef:E,onPointerGraceIntentChange:nt((e=>{N.current=e}),[])},F(R,A,F(Yw,{asChild:!0,trapped:o,onMountAutoFocus:We(a,(e=>{var t;e.preventDefault(),null===(t=P.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},F(Zv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},F(J_,le({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:We(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),F(Q_,le({role:"menu","aria-orientation":"vertical","data-state":g3(v.open),"data-radix-menu-content":"",dir:g.dir},y,h,{ref:k,style:{outline:"none",...h.style},onKeyDown:We(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=C.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=rU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=P.current;if(e.target!==o||!EW.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));o3.includes(e.key)&&a.reverse(),tU(a)})),onBlur:We(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:We(e.onPointerMove,Md((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),f3=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({role:"group"},r,{ref:t}))})),FW=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({},r,{ref:t}))})),Aw="MenuItem",cR="menu.itemSelect",r$=me(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=Ae(null),i=ep(Aw,e.__scopeMenu),l=t$(Aw,e.__scopeMenu),u=Rt(t,a),s=Ae(!1);return F(d3,le({},o,{ref:u,disabled:n,onClick:We(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(cR,{bubbles:!0,cancelable:!0});e.addEventListener(cR,(e=>null==r?void 0:r(e)),{once:!0}),WT(e,t),t.defaultPrevented?s.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:We(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:We(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Ow.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),d3=me(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=t$(Aw,n),l=a3(n),u=Ae(null),s=Rt(t,u),[c,d]=Je(!1),[f,p]=Je("");return Le((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),F(kd.ItemSlot,{scope:n,disabled:r,textValue:o??f},F(e$,le({asChild:!0},l,{focusable:!r}),F(at.div,le({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:We(e.onPointerMove,Md((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:We(e.onPointerLeave,Md((e=>i.onItemLeave(e)))),onFocus:We(e.onFocus,(()=>d(!0))),onBlur:We(e.onBlur,(()=>d(!1)))}))))})),BW=me(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return F(h3,{scope:e.__scopeMenu,checked:n},F(r$,le({role:"menuitemcheckbox","aria-checked":Bv(n)?"mixed":n},o,{ref:t,"data-state":o$(n),onSelect:We(o.onSelect,(()=>null==r?void 0:r(!!Bv(n)||!n)),{checkForDefaultPrevented:!1})})))})),qW="MenuRadioGroup",[zW,WW]=_l(qW,{value:void 0,onValueChange:()=>{}}),UW=me(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Gr(r);return F(zW,{scope:e.__scopeMenu,value:n,onValueChange:a},F(f3,le({},o,{ref:t})))})),HW="MenuRadioItem",VW=me(((e,t)=>{const{value:n,...r}=e,o=WW(HW,e.__scopeMenu),a=n===o.value;return F(h3,{scope:e.__scopeMenu,checked:a},F(r$,le({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":o$(a),onSelect:We(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),p3="MenuItemIndicator",[h3,GW]=_l(p3,{checked:!1}),KW=me(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=GW(p3,n);return F(No,{present:r||Bv(a.checked)||!0===a.checked},F(at.span,le({},o,{ref:t,"data-state":o$(a.checked)})))})),YW=me(((e,t)=>{const{__scopeMenu:n,...r}=e;return F(at.div,le({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),v3="MenuSub",[XW,m3]=_l(v3),QW=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=us(v3,t),i=Em(t),[l,u]=Je(null),[s,c]=Je(null),d=Gr(o);return Le((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),F(Sm,i,F(s3,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},F(XW,{scope:t,contentId:co(),triggerId:co(),trigger:l,onTriggerChange:u},n)))},gv="MenuSubTrigger",ZW=me(((e,t)=>{const n=us(gv,e.__scopeMenu),r=ep(gv,e.__scopeMenu),o=m3(gv,e.__scopeMenu),a=t$(gv,e.__scopeMenu),i=Ae(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=nt((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return Le((()=>c),[c]),Le((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),F(l3,le({asChild:!0},s),F(d3,le({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":g3(n.open)},e,{ref:Qv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:We(e.onPointerMove,Md((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:We(e.onPointerLeave,Md((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,u=i?-5:5,s=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:We(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!PW[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),JW="MenuSubContent",eU=me(((e,t)=>{const n=u3(Vo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=us(Vo,e.__scopeMenu),i=ep(Vo,e.__scopeMenu),l=m3(JW,e.__scopeMenu),u=Ae(null),s=Rt(t,u);return F(kd.Provider,{scope:e.__scopeMenu},F(No,{present:r||a.open},F(kd.Slot,{scope:e.__scopeMenu},F(n$,le({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:We(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:We(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:We(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=RW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function g3(e){return e?"open":"closed"}function Bv(e){return"indeterminate"===e}function o$(e){return Bv(e)?"indeterminate":e?"checked":"unchecked"}function tU(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function rU(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=nU(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function oU(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function iU(e,t){if(!t)return!1;return oU({x:e.clientX,y:e.clientY},t)}function Md(e){return t=>"mouse"===t.pointerType?e(t):void 0}const aU=NW,sU=l3,lU=IW,cU=MW,uU=f3,fU=FW,dU=r$,pU=BW,hU=UW,vU=VW,mU=KW,gU=YW,yU=QW,bU=ZW,xU=eU,y3="DropdownMenu",[wU,UQ]=Er(y3,[i3]),Tr=i3(),[_U,b3]=wU(y3),$U=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=Tr(t),s=Ae(null),[c=!1,d]=Go({prop:o,defaultProp:a,onChange:i});return F(_U,{scope:t,triggerId:co(),triggerRef:s,contentId:co(),open:c,onOpenChange:d,onOpenToggle:nt((()=>d((e=>!e))),[d]),modal:l},F(aU,le({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},SU="DropdownMenuTrigger",CU=me(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=b3(SU,n),i=Tr(n);return F(sU,le({asChild:!0},i),F(at.button,le({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Qv(t,a.triggerRef),onPointerDown:We(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:We(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),EU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tr(t);return F(lU,le({},r,n))},PU="DropdownMenuContent",RU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=b3(PU,n),a=Tr(n),i=Ae(!1);return F(cU,le({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:We(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:We(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),TU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(uU,le({},o,r,{ref:t}))})),OU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(fU,le({},o,r,{ref:t}))})),AU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(dU,le({},o,r,{ref:t}))})),NU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(pU,le({},o,r,{ref:t}))})),DU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(hU,le({},o,r,{ref:t}))})),IU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(vU,le({},o,r,{ref:t}))})),kU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(mU,le({},o,r,{ref:t}))})),MU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(gU,le({},o,r,{ref:t}))})),LU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Tr(t),[l=!1,u]=Go({prop:r,defaultProp:a,onChange:o});return F(yU,le({},i,{open:l,onOpenChange:u}),n)},jU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(bU,le({},o,r,{ref:t}))})),FU=me(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tr(n);return F(xU,le({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),BU=$U,qU=CU,x3=EU,w3=RU,zU=TU,_3=OU,$3=AU,S3=NU,WU=DU,C3=IU,UU=kU,i$=MU,HU=LU,E3=jU,P3=FU,HQ=BU,VQ=qU,GQ=zU,KQ=x3,YQ=HU,XQ=WU,VU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(E3,{ref:o,className:se("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,k.jsx(DT,{className:"ml-auto h-4 w-4"})]})));VU.displayName=E3.displayName;const GU=P.forwardRef((({className:e,...t},n)=>k.jsx(P3,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));GU.displayName=P3.displayName;const KU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(x3,{children:k.jsx(w3,{ref:r,sideOffset:t,className:se("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-slate-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...n})})));KU.displayName=w3.displayName;const YU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx($3,{ref:r,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));YU.displayName=$3.displayName;const XU=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=k.jsx(k_,{size:"default",variant:"default",checked:n});return k.jsxs(S3,{ref:a,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));XU.displayName=S3.displayName;const QU=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(UU,{children:k.jsx(Ww,{size:20})})});return k.jsxs(C3,{ref:o,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));QU.displayName=C3.displayName;const ZU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(_3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));ZU.displayName=_3.displayName;const JU=P.forwardRef((({className:e,...t},n)=>k.jsx(i$,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));JU.displayName=i$.displayName;const eH=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});eH.displayName="DropdownMenuShortcut";const tH=me(((e,t)=>F(at.label,le({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),R3=tH,nH=ea("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T3=P.forwardRef((({className:e,...t},n)=>k.jsx(R3,{ref:n,className:se(nH(),e),...t})));function uR(e,[t,n]){return Math.min(n,Math.max(t,e))}T3.displayName=R3.displayName;const O3=me(((e,t)=>F(at.span,le({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),rH=O3,oH=[" ","Enter","ArrowUp","ArrowDown"],iH=[" ","Enter"],Pm="Select",[Rm,Tm,aH]=W_(Pm),[vu,QQ]=Er(Pm,[aH,pu]),a$=pu(),[sH,$l]=vu(Pm),[lH,cH]=vu(Pm),uH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:p}=e,m=a$(t),[h,v]=Je(null),[g,y]=Je(null),[b,w]=Je(!1),x=Zd(s),[_=!1,P]=Go({prop:r,defaultProp:o,onChange:a}),[k,S]=Go({prop:i,defaultProp:l,onChange:u}),C=Ae(null),E=!h||!!h.closest("form"),[N,O]=Je(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return F(Sm,m,F(sH,{required:p,scope:t,trigger:h,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:co(),value:k,onValueChange:S,open:_,onOpenChange:P,dir:x,triggerPointerDownPosRef:C,disabled:f},F(Rm.Provider,{scope:t},F(lH,{scope:e.__scopeSelect,onNativeOptionAdd:nt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:nt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?F(k3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>S(e.target.value),disabled:f},void 0===k?F("option",{value:""}):null,Array.from(N)):null))},fH="SelectTrigger",dH=me(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=a$(n),i=$l(fH,n),l=i.disabled||r,u=Rt(t,i.onTriggerChange),s=Tm(n),[c,d,f]=M3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=L3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return F(X_,le({asChild:!0},a),F(at.button,le({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":I3(i.value)?"":void 0},o,{ref:u,onClick:We(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:We(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:We(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&oH.includes(e.key)&&(p(),e.preventDefault())}))})))})),pH="SelectValue",hH=me(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=$l(pH,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=Rt(t,u.onValueNodeChange);return pr((()=>{s(c)}),[s,c]),F(at.span,le({},l,{ref:d,style:{pointerEvents:"none"}}),I3(u.value)?F(ls,null,i):a)})),vH=me(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return F(at.span,le({"aria-hidden":!0},o,{ref:t}),r||"▼")})),mH=e=>F(Xw,le({asChild:!0},e)),nu="SelectContent",gH=me(((e,t)=>{const n=$l(nu,e.__scopeSelect),[r,o]=Je();if(pr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?$i.createPortal(F(A3,{scope:e.__scopeSelect},F(Rm.Slot,{scope:e.__scopeSelect},F("div",null,e.children))),t):null}return F(yH,le({},e,{ref:t}))})),Ki=10,[A3,Sl]=vu(nu),yH=me(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:v,...g}=e,y=$l(nu,n),[b,w]=Je(null),[x,_]=Je(null),P=Rt(t,(e=>w(e))),[k,S]=Je(null),[C,E]=Je(null),N=Tm(n),[O,T]=Je(!1),R=Ae(!1);Le((()=>{if(b)return zd(b)}),[b]),Qw();const A=nt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),j=nt((()=>A([k,b])),[A,k,b]);Le((()=>{O&&j()}),[O,j]);const{onOpenChange:D,triggerPointerDownPosRef:M}=y;Le((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=M.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||D(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,D,M]),Le((()=>{const e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[D]);const[L,I]=M3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=L3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=nt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=nt((()=>null==b?void 0:b.focus()),[b]),B=nt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),$="popper"===r?fR:bH,U=$===fR?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:v}:{};return F(A3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:z,selectedItem:k,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:j,selectedItemText:C,position:r,isPositioned:O,searchRef:L},F(qd,{as:pl,allowPinchZoom:!0},F(Yw,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:We(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},F(Zv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},F($,le({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>T(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:We(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>A(t))),e.preventDefault()}}))}))))))})),bH=me(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=$l(nu,n),i=Sl(nu,n),[l,u]=Je(null),[s,c]=Je(null),d=Rt(t,(e=>c(e))),f=Tm(n),p=Ae(!1),m=Ae(!0),{viewport:h,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=i,b=nt((()=>{if(a.trigger&&a.valueNode&&l&&s&&h&&v&&g){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=g.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Ki,d=uR(a,[Ki,c-s]);l.style.minWidth=u+"px",l.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Ki,d=uR(a,[Ki,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Ki,c=h.scrollHeight,d=window.getComputedStyle(s),m=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(h),P=parseInt(_.paddingTop,10),k=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Ki,C=u-S,E=v.offsetHeight/2,N=m+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-h.offsetTop-h.offsetHeight,n=N+Math.max(C,E+(e?k:0)+t+b);l.style.height=n+"px"}else{const e=v===i[0].ref.current;l.style.top="0px";const t=Math.max(S,m+h.offsetTop+(e?P:0)+E)+O;l.style.height=t+"px",h.scrollTop=N-S+h.offsetTop}l.style.margin=`${Ki}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,s,h,v,g,a.dir,r]);pr((()=>b()),[b]);const[w,x]=Je();pr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=nt((e=>{e&&!0===m.current&&(b(),null==y||y(),m.current=!1)}),[b,y]);return F(xH,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},F("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},F(at.div,le({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),fR=me(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ki,...a}=e,i=a$(n);return F(Q_,le({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}}))})),[xH,s$]=vu(nu,{}),dR="SelectViewport",wH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Sl(dR,n),a=s$(dR,n),i=Rt(t,o.onViewportChange),l=Ae(0);return F(ls,null,F("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}"}}),F(Rm.Slot,{scope:n},F(at.div,le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:We(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Ki,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),_H="SelectGroup",[$H,SH]=vu(_H),CH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=co();return F($H,{scope:n,id:o},F(at.div,le({role:"group","aria-labelledby":o},r,{ref:t})))})),EH="SelectLabel",PH=me(((e,t)=>{const{__scopeSelect:n,...r}=e,o=SH(EH,n);return F(at.div,le({id:o.id},r,{ref:t}))})),Nw="SelectItem",[RH,N3]=vu(Nw),TH=me(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=$l(Nw,n),u=Sl(Nw,n),s=l.value===r,[c,d]=Je(a??""),[f,p]=Je(!1),m=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=co(),v=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return F(RH,{scope:n,value:r,disabled:o,textId:h,isSelected:s,onItemTextChange:nt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},F(Rm.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},F(at.div,le({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:m,onFocus:We(i.onFocus,(()=>p(!0))),onBlur:We(i.onBlur,(()=>p(!1))),onPointerUp:We(i.onPointerUp,v),onPointerMove:We(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:We(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:We(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(iH.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),yv="SelectItemText",OH=me(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=$l(yv,n),l=Sl(yv,n),u=N3(yv,n),s=cH(yv,n),[c,d]=Je(null),f=Rt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=Vr((()=>F("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=s;return pr((()=>(h(m),()=>v(m))),[h,v,m]),F(ls,null,F(at.span,le({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?$i.createPortal(a.children,i.valueNode):null)})),AH="SelectItemIndicator",NH=me(((e,t)=>{const{__scopeSelect:n,...r}=e;return N3(AH,n).isSelected?F(at.span,le({"aria-hidden":!0},r,{ref:t})):null})),pR="SelectScrollUpButton",DH=me(((e,t)=>{const n=Sl(pR,e.__scopeSelect),r=s$(pR,e.__scopeSelect),[o,a]=Je(!1),i=Rt(t,r.onScrollButtonChange);return pr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?F(D3,le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),hR="SelectScrollDownButton",IH=me(((e,t)=>{const n=Sl(hR,e.__scopeSelect),r=s$(hR,e.__scopeSelect),[o,a]=Je(!1),i=Rt(t,r.onScrollButtonChange);return pr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?F(D3,le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),D3=me(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Sl("SelectScrollButton",n),i=Ae(null),l=Tm(n),u=nt((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return Le((()=>()=>u()),[u]),pr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),F(at.div,le({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:We(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:We(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:We(o.onPointerLeave,(()=>{u()}))}))})),kH=me(((e,t)=>{const{__scopeSelect:n,...r}=e;return F(at.div,le({"aria-hidden":!0},r,{ref:t}))}));function I3(e){return""===e||void 0===e}const k3=me(((e,t)=>{const{value:n,...r}=e,o=Ae(null),a=Rt(t,o),i=mm(n);return Le((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),F(O3,{asChild:!0},F("select",le({},r,{ref:a,defaultValue:n})))}));function M3(e){const t=Gr(e),n=Ae(""),r=Ae(0),o=nt((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=nt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return Le((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function L3(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=MH(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function MH(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}k3.displayName="BubbleSelect";const j3=uH,F3=dH,B3=hH,LH=vH,jH=mH,q3=gH,FH=wH,z3=CH,W3=PH,U3=TH,BH=OH,qH=NH,H3=DH,V3=IH,G3=kH,zH=j3,K3=P.forwardRef((({...e},t)=>k.jsx(zH,{ref:t,...e})));K3.displayName=j3.displayName;const Y3=P.forwardRef(((e,t)=>k.jsx(z3,{ref:t,...e})));Y3.displayName=z3.displayName;const X3=P.forwardRef(((e,t)=>k.jsx(B3,{ref:t,...e})));X3.displayName=B3.displayName;const l$=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a=()=>k.jsx(AT,{size:20}),...i},l)=>k.jsxs("div",{className:"w-full",children:[k.jsxs(F3,{ref:l,className:se("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(LH,{asChild:!0,children:a()})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(kT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx(c7,{size:16}),n]}):null]})));l$.displayName="SelectTriggerWrapper";const Q3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsx(l$,{ref:i,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));Q3.displayName=F3.displayName;const Z3=P.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=P.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(P.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return k.jsx(jH,{children:k.jsx(q3,{ref:o,className:se("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:k.jsx(FH,{className:se("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));Z3.displayName=q3.displayName;const J3=P.forwardRef((({className:e,...t},n)=>k.jsx(W3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));J3.displayName=W3.displayName;const eD=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=k.jsx(qH,{children:k.jsx(Ww,{size:20})});return k.jsxs(U3,{ref:a,className:se("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(BH,{children:r})}),t&&"right"===n&&i]})}));eD.displayName=U3.displayName;const tD=P.forwardRef((({className:e,...t},n)=>k.jsx(G3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));tD.displayName=G3.displayName;const WH=(e,t)=>{const n=P.useRef(null),[r,o]=P.useState(e.length);return P.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-slate-100 text-sm font-medium text-slate-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-slate-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},UH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=WH(t,r),d=t.length-c;return k.jsx(l$,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(_F,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(M2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(M2,{text:`+${d}`})]})})})}));UH.displayName="SelectMultiTrigger";const HH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},u)=>{const s=n?k.jsx(IT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(k_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&s]})}));HH.displayName="SelectCheckboxItem";const VH=P.forwardRef((({className:e,...t},n)=>k.jsx(H3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(i7,{size:16})})));VH.displayName=H3.displayName;const GH=P.forwardRef((({className:e,...t},n)=>k.jsx(V3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(AT,{size:16})})));GH.displayName=V3.displayName;const KH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));KH.displayName="SelectActions";const YH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));YH.displayName="SelectFooter";const ZQ=F6,nD=P.createContext({}),JQ=({...e})=>k.jsx(nD.Provider,{value:{name:e.name},children:k.jsx(B6,{...e})}),fs=()=>{const e=P.useContext(nD),t=P.useContext(rD),n=q6();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},rD=P.createContext({}),XH=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(rD.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));XH.displayName="FormItem";const QH=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=fs();return k.jsx(T3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));QH.displayName="FormLabel";const ZH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=fs();return k.jsx(cs,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));ZH.displayName="FormControl";const JH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=fs();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));JH.displayName="FormDescription";const eV=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=fs(),i=o?String(null==o?void 0:o.message):t;return i?k.jsxs("p",{ref:r,id:a,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(kT,{size:16,className:"text-red-dark"})," ",i]}):null}));eV.displayName="FormMessage";const tV=P.forwardRef((({...e},t)=>{const{name:n}=fs();return k.jsx(K3,{ref:t,name:n,...e})}));tV.displayName="FormSelect";const nV=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=fs();return k.jsx(Q3,{ref:r,id:o,className:e,...n,children:t})}));nV.displayName="FormSelectTrigger";const rV=P.forwardRef(((e,t)=>k.jsx(Z3,{ref:t,...e})));rV.displayName="FormSelectContent";const oV=P.forwardRef(((e,t)=>k.jsx(eD,{ref:t,...e})));oV.displayName="FormSelectItem";const iV=P.forwardRef(((e,t)=>k.jsx(Y3,{ref:t,...e})));iV.displayName="FormSelectGroup";const aV=P.forwardRef(((e,t)=>k.jsx(J3,{ref:t,...e})));aV.displayName="FormSelectLabel";const sV=P.forwardRef(((e,t)=>k.jsx(tD,{ref:t,...e})));sV.displayName="FormSelectSeparator";const lV=P.forwardRef(((e,t)=>k.jsx(X3,{ref:t,...e})));function dr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function c$(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Ja(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Vr((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Ja(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=Vr((()=>i),Object.values(i));return F(l.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,u=ru(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},cV(r,...t)]}function cV(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return Vr((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function is(e){const t=Ae(e);return Le((()=>{t.current=e})),Vr((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function oD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=uV({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=is(n);return[i,nt((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function uV({defaultProp:e,onChange:t}){const n=Je(e),[r]=n,o=Ae(r),a=is(t);return Le((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function fV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function dV(...e){return t=>e.forEach((e=>fV(e,t)))}function pV(...e){return nt(dV(...e),e)}function Cl(e){return e.split("-")[0]}function tp(e){return e.split("-")[1]}function mu(e){return["top","bottom"].includes(Cl(e))?"x":"y"}function u$(e){return"y"===e?"height":"width"}function vR(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,l=mu(t),u=u$(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(Cl(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(tp(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}lV.displayName="FormSelectValue";const hV=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=vR(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:h}=a[n],{x:v,y:g,data:y,reset:b}=await h({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=vR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function iD(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function qv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Ld(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=iD(p),h=l[f?"floating"===d?"reference":"floating":d],v=qv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=qv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),strategy:u}):i[d]);return{top:v.top-g.top+m.top,bottom:g.bottom-v.bottom+m.bottom,left:v.left-g.left+m.left,right:g.right-v.right+m.right}}const vV=Math.min,ll=Math.max;function Dw(e,t,n){return ll(e,vV(t,n))}const mR=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:u}=t;if(null==n)return{};const s=iD(r),c={x:o,y:a},d=mu(i),f=tp(i),p=u$(d),m=await u.getDimensions(n),h="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[h],P=w-m[p]-s[v],k=w/2-m[p]/2+x,S=Dw(_,k,P),C=("start"===f?s[h]:s[v])>0&&k!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?k<_?_-k:P-k:0),data:{[d]:S,centerOffset:k-S}}}}),mV={left:"right",right:"left",bottom:"top",top:"bottom"};function zv(e){return e.replace(/left|right|bottom|top/g,(e=>mV[e]))}function gV(e,t,n){void 0===n&&(n=!1);const r=tp(e),o=mu(e),a=u$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=zv(i)),{main:i,cross:zv(i)}}const yV={start:"end",end:"start"};function gR(e){return e.replace(/start|end/g,(e=>yV[e]))}const aD=["top","right","bottom","left"];aD.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const bV=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=Cl(r),v=[i,...d||(h!==i&&p?function(e){const t=zv(e);return[gR(e),t,gR(t)]}(i):[zv(i)])],g=await Ld(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[h]),c){const{main:e,cross:t}=gV(r,a,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function yR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bR(e){return aD.some((t=>e[t]>=0))}const xV=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=yR(await Ld(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:bR(t)}}}case"escaped":{const t=yR(await Ld(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:bR(t)}}}default:return{}}}}},wV=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Cl(n),l=tp(n),u="x"===mu(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function sD(e){return"x"===e?"y":"x"}const _V=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,s={x:n,y:r},c=await Ld(t,u),d=mu(Cl(o)),f=sD(d);let p=s[d],m=s[f];if(a){const e="y"===d?"bottom":"right";p=Dw(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=Dw(m+c["y"===f?"top":"left"],m,m-c[e])}const h=l.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},$V=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=mu(o),f=sD(d);let p=c[d],m=c[f];const h="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+v.mainAxis,n=a.reference[d]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(Cl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},SV=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...l}=e,u=await Ld(t,l),s=Cl(n),c=tp(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=ll(u.left,0),m=ll(u.right,0),h=ll(u.top,0),v=ll(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==v?h+v:ll(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:ll(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function lD(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ia(e){if(null==e)return window;if(!lD(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function np(e){return ia(e).getComputedStyle(e)}function Yi(e){return lD(e)?"":e?(e.nodeName||"").toLowerCase():""}function cD(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function _i(e){return e instanceof ia(e).HTMLElement}function as(e){return e instanceof ia(e).Element}function f$(e){return!(typeof ShadowRoot>"u")&&(e instanceof ia(e).ShadowRoot||e instanceof ShadowRoot)}function Om(e){const{overflow:t,overflowX:n,overflowY:r}=np(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function CV(e){return["table","td","th"].includes(Yi(e))}function xR(e){const t=/firefox/i.test(cD()),n=np(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function uD(){return!/^((?!chrome|android).)*safari/i.test(cD())}const wR=Math.min,$d=Math.max,Wv=Math.round;function Xi(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&_i(e)&&(u=e.offsetWidth>0&&Wv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Wv(l.height)/e.offsetHeight||1);const c=as(e)?ia(e):window,d=!uD()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/s,m=l.width/u,h=l.height/s;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function Za(e){return(t=e,(t instanceof ia(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Am(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fD(e){return Xi(Za(e)).left+Am(e).scrollLeft}function EV(e,t,n){const r=_i(t),o=Za(t),a=Xi(e,r&&function(e){const t=Xi(e);return Wv(t.width)!==e.offsetWidth||Wv(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Yi(t)||Om(o))&&(i=Am(t)),_i(t)){const e=Xi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=fD(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function dD(e){return"html"===Yi(e)?e:e.assignedSlot||e.parentNode||(f$(e)?e.host:null)||Za(e)}function _R(e){return _i(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Iw(e){const t=ia(e);let n=_R(e);for(;n&&CV(n)&&"static"===getComputedStyle(n).position;)n=_R(n);return n&&("html"===Yi(n)||"body"===Yi(n)&&"static"===getComputedStyle(n).position&&!xR(n))?t:n||function(e){let t=dD(e);for(f$(t)&&(t=t.host);_i(t)&&!["html","body"].includes(Yi(t));){if(xR(t))return t;t=t.parentNode}return null}(e)||t}function $R(e){if(_i(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Xi(e);return{width:t.width,height:t.height}}function pD(e){const t=dD(e);return["html","body","#document"].includes(Yi(t))?e.ownerDocument.body:_i(t)&&Om(t)?t:pD(t)}function Uv(e,t){var n;void 0===t&&(t=[]);const r=pD(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=ia(r),i=o?[a].concat(a.visualViewport||[],Om(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Uv(i))}function SR(e,t,n){return"viewport"===t?qv(function(e,t){const n=ia(e),r=Za(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=uD();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):as(t)?function(e,t){const n=Xi(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):qv(function(e){var t;const n=Za(e),r=Am(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=$d(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=$d(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+fD(e);const u=-r.scrollTop;return"rtl"===np(o||n).direction&&(l+=$d(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Za(e)))}function PV(e){const t=Uv(e),n=["absolute","fixed"].includes(np(e).position)&&_i(e)?Iw(e):e;return as(n)?t.filter((e=>as(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&f$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Yi(e))):[]}const RV={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?PV(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=SR(t,n,o);return e.top=$d(r.top,e.top),e.right=wR(r.right,e.right),e.bottom=wR(r.bottom,e.bottom),e.left=$d(r.left,e.left),e}),SR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=_i(n),a=Za(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Yi(n)||Om(a))&&(i=Am(n)),_i(n))){const e=Xi(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+l.x,y:t.y-i.scrollTop+l.y}},isElement:as,getDimensions:$R,getOffsetParent:Iw,getDocumentElement:Za,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:EV(t,Iw(n),r),floating:{...$R(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===np(e).direction};function TV(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,u=o&&!l,s=a&&!l,c=u||s?[...as(e)?Uv(e):[],...Uv(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),as(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Xi(e):null;return l&&function t(){const r=Xi(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const OV=(e,t,n)=>hV(e,t,{platform:RV,...n});var kw=typeof document<"u"?ou:Le;function Mw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Mw(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Mw(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function AV(e){const t=P.useRef(e);return kw((()=>{t.current=e})),t}function NV(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=P.useRef(null),i=P.useRef(null),l=AV(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Mw(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!a.current||!i.current||OV(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&$i.flushSync((()=>{c(e)}))}))}),[d,n,r]);kw((()=>{m.current&&p()}),[p]);const m=P.useRef(!1);kw((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=P.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{a.current=e,h()}),[h]),g=P.useCallback((e=>{i.current=e,h()}),[h]),y=P.useMemo((()=>({reference:a,floating:i})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const DV=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?mR({element:t.current,padding:n}).fn(e):{}:t?mR({element:t,padding:n}).fn(e):{}}};function IV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function kV(...e){return t=>e.forEach((e=>IV(e,t)))}const hD=me(((e,t)=>{const{children:n,...r}=e,o=qn.toArray(n),a=o.find(LV);if(a){const e=a.props.children,n=o.map((t=>t===a?qn.count(e)>1?qn.only(null):fo(e)?e.props.children:null:t));return F(Lw,le({},r,{ref:t}),fo(e)?Ji(e,void 0,n):null)}return F(Lw,le({},r,{ref:t}),n)}));hD.displayName="Slot";const Lw=me(((e,t)=>{const{children:n,...r}=e;return fo(n)?Ji(n,{...jV(r,n.props),ref:kV(t,n.ref)}):qn.count(n)>1?qn.only(null):null}));Lw.displayName="SlotClone";const MV=({children:e})=>F(ls,null,e);function LV(e){return fo(e)&&e.type===MV}function jV(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const FV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ss=FV.reduce(((e,t)=>{const n=me(((e,n)=>{const{asChild:r,...o}=e,a=r?hD:t;return Le((()=>{window[Symbol.for("radix-ui")]=!0}),[]),F(a,le({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function BV(e,t){e&&$i.flushSync((()=>e.dispatchEvent(t)))}function qV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function zV(...e){return t=>e.forEach((e=>qV(e,t)))}function vD(...e){return nt(zV(...e),e)}const Xa=null!=globalThis&&globalThis.document?ou:()=>{};function WV(e){const[t,n]=Je(void 0);return Xa((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const mD="Popper",[d$,Nm]=c$(mD),[UV,gD]=d$(mD),HV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Je(null);return F(UV,{scope:t,anchor:r,onAnchorChange:o},n)},VV="PopperAnchor",GV=me(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=gD(VV,n),i=Ae(null),l=vD(t,i);return Le((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:F(ss.div,le({},o,{ref:l}))})),Hv="PopperContent",[KV,eZ]=d$(Hv),[YV,XV]=d$(Hv,{hasParent:!1,positionUpdateFns:new Set}),QV=me(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,P=gD(Hv,c),[k,S]=Je(null),C=vD(t,(e=>S(e))),[E,N]=Je(null),O=WV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,A=d+("center"!==p?"-"+p:""),j="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},D=Array.isArray(v)?v:[v],M=D.length>0,L={padding:j,boundary:D.filter(JV),altBoundary:M},{reference:I,floating:z,strategy:W,x:B,y:$,placement:U,middlewareData:H,update:V}=NV({strategy:"fixed",placement:A,whileElementsMounted:TV,middleware:[eG(),wV({mainAxis:f+R,alignmentAxis:m}),w?_V({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?$V():void 0,...L}):void 0,E?DV({element:E,padding:h}):void 0,w?bV({...L}):void 0,SV({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),tG({arrowWidth:T,arrowHeight:R}),b?xV({strategy:"referenceHidden"}):void 0].filter(ZV)});Xa((()=>{I(P.anchor)}),[I,P.anchor]);const K=null!==B&&null!==$,[q,G]=yD(U),Y=is(x);Xa((()=>{K&&(null==Y||Y())}),[K,Y]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=null===(a=H.arrow)||void 0===a?void 0:a.y,J=0!==(null===(i=H.arrow)||void 0===i?void 0:i.centerOffset),[Z,ee]=Je();Xa((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=XV(Hv,c),re=!te;ou((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),Xa((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":G,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return F("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round($)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},F(KV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:J},re?F(YV,{scope:c,hasParent:!0,positionUpdateFns:ne},F(ss.div,oe)):F(ss.div,oe)))}));function ZV(e){return void 0!==e}function JV(e){return null!==e}const eG=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),tG=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=yD(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function yD(e){const[t,n="center"]=e.split("-");return[t,n]}const bD=HV,p$=GV,xD=QV,wD=me(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Gw.createPortal(F(ss.div,le({},o,{ref:t})),r):null}));function nG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function rG(...e){return t=>e.forEach((e=>nG(e,t)))}function oG(...e){return nt(rG(...e),e)}function iG(e,t){return ET(((e,n)=>t[e][n]??e),e)}const rp=e=>{const{present:t,children:n}=e,r=aG(t),o="function"==typeof n?n({present:r.isPresent}):qn.only(n),a=oG(r.ref,o.ref);return"function"==typeof n||r.isPresent?Ji(o,{ref:a}):null};function aG(e){const[t,n]=Je(),r=Ae({}),o=Ae(e),a=Ae("none"),i=e?"mounted":"unmounted",[l,u]=iG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Le((()=>{const e=bv(r.current);a.current="mounted"===l?e:"none"}),[l]),Xa((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=bv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xa((()=>{if(t){const e=e=>{const n=bv(r.current).includes(e.animationName);e.target===t&&n&&$i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=bv(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:nt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function bv(e){return(null==e?void 0:e.animationName)||"none"}function sG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function lG(...e){return t=>e.forEach((e=>sG(e,t)))}function cG(...e){return nt(lG(...e),e)}function uG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e);Le((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}rp.displayName="Presence";const jw="dismissableLayer.update",fG="dismissableLayer.pointerDownOutside",dG="dismissableLayer.focusOutside";let CR;const pG=Ja({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_D=me(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=ru(pG),[d,f]=Je(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=Je({}),h=cG(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=hG((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),P=vG((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p);return uG((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),Le((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(CR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ER(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=CR)}}),[d,p,r,c]),Le((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ER())}),[d,c]),Le((()=>{const e=()=>m({});return document.addEventListener(jw,e),()=>document.removeEventListener(jw,e)}),[]),F(ss.div,le({},s,{ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:dr(e.onFocusCapture,P.onFocusCapture),onBlurCapture:dr(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:dr(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function hG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e),r=Ae(!1),o=Ae((()=>{}));return Le((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){$D(fG,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vG(e,t=(null==globalThis?void 0:globalThis.document)){const n=is(e),r=Ae(!1);return Le((()=>{const e=e=>{e.target&&!r.current&&$D(dG,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ER(){const e=new CustomEvent(jw);document.dispatchEvent(e)}function $D(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?BV(o,a):o.dispatchEvent(a)}let cx;const SD="HoverCard",[CD,tZ]=c$(SD,[Nm]),h$=Nm(),[mG,Dm]=CD(SD),gG=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=h$(t),s=Ae(0),c=Ae(0),d=Ae(!1),f=Ae(!1),[p=!1,m]=oD({prop:r,defaultProp:o,onChange:a}),h=nt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>m(!0)),i)}),[i,m]),v=nt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>m(!1)),l))}),[l,m]),g=nt((()=>m(!1)),[m]);return Le((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),F(mG,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},F(bD,u,n))},yG="HoverCardTrigger",bG=me(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Dm(yG,n),a=h$(n);return F(p$,le({asChild:!0},a),F(ss.a,le({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:dr(e.onPointerEnter,Vv(o.onOpen)),onPointerLeave:dr(e.onPointerLeave,Vv(o.onClose)),onFocus:dr(e.onFocus,o.onOpen),onBlur:dr(e.onBlur,o.onClose),onTouchStart:dr(e.onTouchStart,(e=>e.preventDefault()))})))})),ED="HoverCardPortal",[xG,wG]=CD(ED,{forceMount:void 0}),_G=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Dm(ED,t);return F(xG,{scope:t,forceMount:n},F(rp,{present:n||a.open},F(wD,{asChild:!0,container:o},r)))},Fw="HoverCardContent",$G=me(((e,t)=>{const n=wG(Fw,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Dm(Fw,e.__scopeHoverCard);return F(rp,{present:r||a.open},F(SG,le({"data-state":a.open?"open":"closed"},o,{onPointerEnter:dr(e.onPointerEnter,Vv(a.onOpen)),onPointerLeave:dr(e.onPointerLeave,Vv(a.onClose)),ref:t})))})),SG=me(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Dm(Fw,n),s=h$(n),c=Ae(null),d=pV(t,c),[f,p]=Je(!1);return Le((()=>{if(f){const e=document.body;return cx=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=cx,e.style.webkitUserSelect=cx}}}),[f]),Le((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),Le((()=>{c.current&&CG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),F(_D,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:dr(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},F(xD,le({},s,l,{onPointerDown:dr(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Vv(e){return t=>"touch"===t.pointerType?void 0:e()}function CG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const EG=gG,PG=bG,RG=_G,PD=$G,nZ=EG,rZ=PG,oZ=RG,TG=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(PD,{ref:o,align:t,sideOffset:n,className:se("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));TG.displayName=PD.displayName;const RD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=fs();return k.jsx("input",{type:t,className:se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function OG(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},AG(r,...t)]}function AG(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function PR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function NG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=PR(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():PR(e[t],null)}}}}function DG(e){const t=IG(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(MG);if(i){const e=i.props.children,r=a.map((t=>t===i?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function IG(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=jG(n),o=LG(r,n.props);return n.type!==P.Fragment&&(o.ref=t?NG(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}RD.displayName="Input";var kG=Symbol("radix.slottable");function MG(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===kG}function LG(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jG(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var FG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],TD=FG.reduce(((e,t)=>{const n=DG(`Primitive.${t}`),r=P.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),v$="Progress",m$=100,[BG,iZ]=OG(v$),[qG,zG]=BG(v$),OD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=WG,...i}=e;(o||0===o)&&!RR(o)&&console.error(UG(`${o}`,"Progress"));const l=RR(o)?o:m$;null!==r&&!TR(r,l)&&console.error(HG(`${r}`,"Progress"));const u=TR(r,l)?r:null,s=Gv(u)?a(u,l):void 0;return k.jsx(qG,{scope:n,value:u,max:l,children:k.jsx(TD.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Gv(u)?u:void 0,"aria-valuetext":s,role:"progressbar","data-state":DD(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})}));OD.displayName=v$;var AD="ProgressIndicator",ND=P.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=zG(AD,n);return k.jsx(TD.div,{"data-state":DD(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function WG(e,t){return`${Math.round(e/t*100)}%`}function DD(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Gv(e){return"number"==typeof e}function RR(e){return Gv(e)&&!isNaN(e)&&e>0}function TR(e,t){return Gv(e)&&!isNaN(e)&&e<=t&&e>=0}function UG(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${m$}\`.`}function HG(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${m$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}ND.displayName=AD;var ID=OD,VG=ND;const GG=P.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>k.jsx(ID,{ref:o,className:se("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:k.jsx(VG,{className:se("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));GG.displayName=ID.displayName;const kD="Radio",[KG,MD]=Er(kD),[YG,XG]=KG(kD),QG=me(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=Je(null),f=Rt(t,(e=>d(e))),p=Ae(!1),m=!c||!!c.closest("form");return F(YG,{scope:n,checked:o,disabled:i},F(at.button,le({type:"button",role:"radio","aria-checked":o,"data-state":LD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:We(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&F(eK,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),ZG="RadioIndicator",JG=me(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=XG(ZG,n);return F(No,{present:r||a.checked},F(at.span,le({"data-state":LD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),eK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function LD(e){return e?"checked":"unchecked"}const tK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],jD="RadioGroup",[nK,aZ]=Er(jD,[hu,MD]),FD=hu(),BD=MD(),[rK,oK]=nK(jD),iK=me(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,p=FD(n),m=Zd(s),[h,v]=Go({prop:a,defaultProp:o,onChange:d});return F(rK,{scope:n,name:r,required:i,disabled:l,value:h,onValueChange:v},F(J_,le({asChild:!0},p,{orientation:u,dir:m,loop:c}),F(at.div,le({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:m},f,{ref:t}))))})),aK="RadioGroupItem",sK=me(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=oK(aK,n),i=a.disabled||r,l=FD(n),u=BD(n),s=Ae(null),c=Rt(t,s),d=a.value===o.value,f=Ae(!1);return Le((()=>{const e=e=>{tK.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),F(e$,le({asChild:!0},l,{focusable:!i,active:d}),F(QG,le({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:We((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:We(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),lK=me(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=BD(n);return F(JG,le({},o,r,{ref:t}))})),qD=iK,zD=sK,cK=lK,uK=P.forwardRef((({className:e,...t},n)=>k.jsx(qD,{className:se("grid gap-2",e),...t,ref:n})));uK.displayName=qD.displayName;const fK=P.forwardRef((({className:e,...t},n)=>k.jsx(zD,{ref:n,className:se("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:k.jsx(cK,{className:"flex items-center justify-center",children:k.jsx(s7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));fK.displayName=zD.displayName;const dK=em,sZ=t_,lZ=lu,pK=tm,WD=P.forwardRef((({className:e,...t},n)=>k.jsx(au,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));WD.displayName=au.displayName;const hK=ea("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),UD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>k.jsxs(pK,{children:[k.jsx(WD,{className:se("bg-slate-900/70",n)}),k.jsxs(su,{ref:a,className:se(hK({side:e}),t),...o,children:[r,k.jsxs(lu,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[k.jsx(Uw,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));UD.displayName=su.displayName;const HD=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});HD.displayName="SheetHeader";const vK=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vK.displayName="SheetFooter";const VD=P.forwardRef((({className:e,...t},n)=>k.jsx(Wd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));VD.displayName=Wd.displayName;const GD=P.forwardRef((({className:e,...t},n)=>k.jsx(Ud,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));GD.displayName=Ud.displayName;const[Im,cZ]=Er("Tooltip",[pu]),g$=pu(),mK="TooltipProvider",gK=700,Bw="tooltip.open",[yK,y$]=Im(mK),KD=e=>{const{__scopeTooltip:t,delayDuration:n=gK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=Je(!0),u=Ae(!1),s=Ae(0);return Le((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),F(yK,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:nt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:nt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:nt((e=>{u.current=e}),[]),disableHoverableContent:o},a)},b$="Tooltip",[bK,km]=Im(b$),YD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=y$(b$,e.__scopeTooltip),s=g$(t),[c,d]=Je(null),f=co(),p=Ae(0),m=i??u.disableHoverableContent,h=l??u.delayDuration,v=Ae(!1),[g=!1,y]=Go({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Bw))):u.onClose(),null==a||a(e)}}),b=Vr((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=nt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=nt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=nt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),h)}),[h,y]);return Le((()=>()=>window.clearTimeout(p.current)),[]),F(Sm,s,F(bK,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:nt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:nt((()=>{m?x():window.clearTimeout(p.current)}),[x,m]),onOpen:w,onClose:x,disableHoverableContent:m},n))},OR="TooltipTrigger",XD=me(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=km(OR,n),a=y$(OR,n),i=g$(n),l=Rt(t,Ae(null),o.onTriggerChange),u=Ae(!1),s=Ae(!1),c=nt((()=>u.current=!1),[]);return Le((()=>()=>document.removeEventListener("pointerup",c)),[c]),F(X_,le({asChild:!0},i),F(at.button,le({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:We(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:We(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:We(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:We(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:We(e.onBlur,o.onClose),onClick:We(e.onClick,o.onClose)})))})),xK="TooltipPortal",[uZ,wK]=Im(xK,{forceMount:void 0}),jd="TooltipContent",QD=me(((e,t)=>{const n=wK(jd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=km(jd,e.__scopeTooltip);return F(No,{present:r||i.open},i.disableHoverableContent?F(ZD,le({side:o},a,{ref:t})):F(_K,le({side:o},a,{ref:t})))})),_K=me(((e,t)=>{const n=km(jd,e.__scopeTooltip),r=y$(jd,e.__scopeTooltip),o=Ae(null),a=Rt(t,o),[i,l]=Je(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=nt((()=>{l(null),d(!1)}),[d]),p=nt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=RK([...CK(r,SK(r,n.getBoundingClientRect())),...EK(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return Le((()=>()=>f()),[f]),Le((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),Le((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!PK(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),F(ZD,le({},e,{ref:a}))})),[$K,fZ]=Im(b$,{isInside:!1}),ZD=me(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=km(jd,n),s=g$(n),{onClose:c}=u;return Le((()=>(document.addEventListener(Bw,c),()=>document.removeEventListener(Bw,c))),[c]),Le((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),F(Zv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},F(Q_,le({"data-state":u.stateAttribute},s,l,{ref:t,style:{...l.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)"}}),F(Kw,null,r),F($K,{scope:n,isInside:!0},F(rH,{id:u.contentId,role:"tooltip"},o||r))))}));function SK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function CK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function EK(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function PK(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function RK(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),TK(t)}function TK(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const OK=KD,AK=YD,NK=XD,JD=QD,eI=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},DK=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},IK=e=>DK(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>IK(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const tI=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),PT("requestMicroFrontendFetch"),PT("sendMicroFrontendFetchResponse");const kK={deviceType:eI()},Mm=z6({name:"ui",initialState:kK,reducers:{},extraReducers:e=>{e.addCase(tI,((e,{payload:t})=>{e.deviceType=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var ux,AR,fx,NR,dx,DR,px,IR,hx,kR,vx,MR,mx,LR,gx,jR,yx,FR,bx,BR,xx,qR,wx,zR,_x,WR,$x,UR,Sx,HR,Cx,VR,Ex,GR,Px,KR,Rx,YR,Tx,XR,Ox,QR,Ax,ZR,Nx,JR,Dx,eT,Ix,tT,kx,nT,Mx,rT,Lx,oT,jx,iT,Fx,aT,Bx,sT,qx,lT,zx,cT,Wx,uT,Ux,fT,Hx,dT,Vx,pT,Gx,hT,Kx,vT,Yx,mT,Xx,gT;function nI(){if(AR)return ux;AR=1;var e=uA(),t=e&&new e;return ux=t}function rI(){if(NR)return fx;NR=1;var e=Xd(),t=nI();return fx=t?function(e,n){return t.set(e,n),e}:e}function Lm(){if(DR)return dx;DR=1;var e=vm(),t=Do();return dx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},dx}function MK(){if(IR)return px;IR=1;var e=Lm(),t=Rr();return px=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},px}function oI(){if(kR)return hx;kR=1;var e=Math.max;return hx=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,u=-1,s=n.length,c=e(i-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function iI(){if(MR)return vx;MR=1;var e=Math.max;return vx=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++s<c;)f[m+s]=n[s];for(;++l<u;)(p||a<i)&&(f[m+r[l]]=t[a++]);return f}}function LK(){if(LR)return mx;return LR=1,mx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function x$(){if(jR)return gx;return jR=1,gx=function(){}}function w$(){if(FR)return yx;FR=1;var e=vm(),t=x$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,yx=n}function aI(){if(BR)return bx;BR=1;var e=nI(),t=vA();return bx=e?function(t){return e.get(t)}:t}function jK(){if(qR)return xx;qR=1;return xx={}}function FK(){if(zR)return wx;zR=1;var e=jK(),t=Object.prototype.hasOwnProperty;return wx=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],l=i.func;if(null==l||l==n)return i.name}return r}}function sI(){if(WR)return _x;WR=1;var e=vm(),t=x$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,_x=n}function BK(){if(UR)return $x;UR=1;var e=w$(),t=sI(),n=hm();return $x=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function qK(){if(HR)return Sx;HR=1;var e=w$(),t=sI(),n=x$(),r=Pr(),o=ho(),a=BK(),i=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,Sx=l}function zK(){if(VR)return Cx;VR=1;var e=w$(),t=aI(),n=FK(),r=qK();return Cx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var l=t(i);return!!l&&o===l[0]}}function lI(){if(GR)return Ex;GR=1;var e=rI(),t=_A()(e);return Ex=t}function WK(){if(KR)return Px;KR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Px=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function UK(){if(YR)return Rx;YR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Rx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function HK(){if(XR)return Tx;XR=1;var e=N_(),t=hA(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Tx=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function cI(){if(QR)return Ox;QR=1;var e=WK(),t=UK(),n=R_(),r=HK();return Ox=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function uI(){if(ZR)return Ax;ZR=1;var e=zK(),t=lI(),n=cI();return Ax=function(r,o,a,i,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],h=a.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=i,n(h,r,o)}}function fI(){if(JR)return Nx;return JR=1,Nx=function(e){return e.placeholder}}function VK(){if(eT)return Dx;eT=1;var e=hm(),t=um(),n=Math.min;return Dx=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var u=o[i];r[i]=t(u,a)?l[u]:void 0}return r}}function _$(){if(tT)return Ix;tT=1;var e="__lodash_placeholder__";return Ix=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,i[a++]=r)}return i}}function dI(){if(nT)return kx;nT=1;var e=oI(),t=iI(),n=LK(),r=Lm(),o=uI(),a=fI(),i=VK(),l=_$(),u=Rr();return kx=function s(c,d,f,p,m,h,v,g,y,b){var w=128&d,x=1&d,_=2&d,P=24&d,k=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(P)var T=a(C),R=n(N,T);if(p&&(N=e(N,p,m,P)),h&&(N=t(N,h,v,P)),E-=R,P&&E<b){var A=l(N,T);return o(c,d,s,C.placeholder,f,N,A,g,y,b-E)}var j=x?f:this,D=_?j[c]:c;return E=N.length,g?N=i(N,g):k&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(D=S||r(D)),D.apply(j,N)}},kx}function GK(){if(rT)return Mx;rT=1;var e=P_(),t=Lm(),n=dI(),r=uI(),o=fI(),a=_$(),i=Rr();return Mx=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=h.length)<s?r(l,u,n,t.placeholder,void 0,f,h,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Mx}function KK(){if(oT)return Lx;oT=1;var e=P_(),t=Lm(),n=Rr();return Lx=function(r,o,a,i){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=i.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Lx}function YK(){if(iT)return jx;iT=1;var e=oI(),t=iI(),n=_$(),r="__lodash_placeholder__",o=128,a=Math.min;return jx=function(i,l){var u=i[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&i[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return i;1&s&&(i[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var m=i[3];i[3]=m?e(m,p,l[4]):p,i[4]=m?n(i[3],r):l[4]}return(p=l[5])&&(m=i[5],i[5]=m?t(m,p,l[6]):p,i[6]=m?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),s&o&&(i[8]=null==i[8]?l[8]:a(i[8],l[8])),null==i[9]&&(i[9]=l[9]),i[0]=l[0],i[1]=c,i}}function $$(){if(aT)return Fx;aT=1;var e=rI(),t=MK(),n=GK(),r=dI(),o=KK(),a=aI(),i=YK(),l=lI(),u=cI(),s=OA(),c=Math.max;return Fx=function(d,f,p,m,h,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=h?h.length:0,64&f){var x=m,_=h;m=h=void 0}var P=b?void 0:a(d),k=[d,f,p,m,h,x,_,v,g,y];if(P&&i(k,P),d=k[0],f=k[1],p=k[2],m=k[3],h=k[4],!(y=k[9]=void 0===k[9]?b?0:d.length:c(k[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||h.length?r.apply(void 0,k):o(d,f,p,m);else var S=t(d,f,p);return u((P?e:l)(S,k),d,f)}}function XK(){if(sT)return Bx;sT=1;var e=$$();return Bx=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function QK(){if(lT)return qx;lT=1;var e=IA();return qx=function(t){return e(t,4)}}function ZK(){if(cT)return zx;cT=1;var e=$$();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},zx=t}function JK(){if(uT)return Wx;uT=1;var e=na(),t=ho(),n=Yj();return Wx=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function eY(){if(fT)return Ux;fT=1;var e=Yd(),t=ho();return Ux=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function tY(){if(dT)return Hx;dT=1;var e=IA(),t=C_();return Hx=function(n){return t("function"==typeof n?n:e(n,1))}}function nY(){if(pT)return Vx;pT=1;var e=$$(),t=mF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Vx=n}function rY(){if(hT)return Gx;hT=1;var e=f_(),t=hm(),n=Pr(),r=uu(),o=IO(),a=Vd(),i=d_();return Gx=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function oY(){return vT||(vT=1,Kx={ary:XK(),assign:NA(),clone:QK(),curry:ZK(),forEach:N_(),isArray:Pr(),isError:JK(),isFunction:rm(),isWeakMap:eY(),iteratee:tY(),keys:sA(),rearg:nY(),toInteger:OA(),toPath:rY()}),Kx}function iY(){if(mT)return Yx;mT=1;var e=TT(),t=oY();return Yx=function(n,r,o){return e(t,n,r,o)}}function aY(){if(gT)return Xx;gT=1;var e=iY()("debounce",RA());return e.placeholder=RT(),Xx=e}var sY=aY();const lY=Ao(sY);function yT(e,t,n=window){const r=Ae(t);Le((()=>{r.current=t}),[t]),Le((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const cY=e=>{const t=lY(150)(e);yT("resize",t),yT("orientationchange",t)},dZ=()=>{const e=W6();cY((()=>{const t=eI();e(tI(t))}))},pZ=()=>Xv(Mm.selectors.selectDeviceType),uY=()=>Xv(Mm.selectors.selectIsMobile),hZ=()=>Xv(Mm.selectors.selectIsTablet),vZ=()=>Xv(Mm.selectors.selectIsDesktop);function bT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const fY="sidebar_state",dY=604800,pY="12rem",hY="18rem",vY="2rem",mY="b",pI=P.createContext(null);function jm(){const e=P.useContext(pI);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const gY=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=uY(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,m=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${fY}=${t}; path=/; max-age=${dY}`}),[n,p]),h=P.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);P.useEffect((()=>{const e=e=>{e.key===mY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:m,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:h})),[v,p,m,u,s,c,h]);return k.jsx(pI.Provider,{value:g,children:k.jsx(KD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":pY,"--sidebar-width-icon":vY,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));gY.displayName="SidebarProvider";const yY=P.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=jm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?k.jsx(dK,{open:s,onOpenChange:c,children:k.jsxs(UD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":hY},side:e,children:[k.jsxs(HD,{className:"sr-only",children:[k.jsx(VD,{children:"Sidebar"}),k.jsx(GD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[k.jsx("div",{className:se("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),k.jsx("div",{className:se("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:k.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));yY.displayName="Sidebar";const bY=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=jm();return k.jsx(Bd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?k.jsx(m7,{size:16}):k.jsx(h7,{size:16})})}));bY.displayName="SidebarTrigger";const xY=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=jm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));xY.displayName="SidebarRail";const wY=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));wY.displayName="SidebarInset";const _Y=P.forwardRef((({className:e,...t},n)=>k.jsx(RD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));_Y.displayName="SidebarInput";const $Y=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));$Y.displayName="SidebarHeader";const SY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));SY.displayName="SidebarFooter";const CY=P.forwardRef((({className:e,...t},n)=>k.jsx(i$,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));CY.displayName="SidebarSeparator";const EY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));EY.displayName="SidebarContent";const PY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));PY.displayName="SidebarGroup";const RY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?cs:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));RY.displayName="SidebarGroupLabel";const TY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?cs:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));TY.displayName="SidebarGroupAction";const OY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));OY.displayName="SidebarGroupContent";const AY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));AY.displayName="SidebarMenu";const NY=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));NY.displayName="SidebarMenuItem";const DY=ea("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),IY=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?cs:"button",{isMobile:s,state:c}=jm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(DY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),k.jsxs(YD,{children:[k.jsx(XD,{asChild:!0,children:d}),k.jsx(QD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));IY.displayName="SidebarMenuButton";const kY=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?cs:"button";return k.jsx(a,{ref:o,"data-sidebar":"menu-action",className:se("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));kY.displayName="SidebarMenuAction";const MY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));MY.displayName="SidebarMenuBadge";const LY=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(bT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(bT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));LY.displayName="SidebarMenuSkeleton";const jY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));jY.displayName="SidebarMenuSub";const FY=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));FY.displayName="SidebarMenuSubItem";const BY=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?cs:"a";return k.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));BY.displayName="SidebarMenuSubButton";const hI="Switch",[qY,mZ]=Er(hI),[zY,WY]=qY(hI),UY=me(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=Je(null),p=Rt(t,(e=>f(e))),m=Ae(!1),h=!d||!!d.closest("form"),[v=!1,g]=Go({prop:o,defaultProp:a,onChange:s});return F(zY,{scope:n,checked:v,disabled:l},F(at.button,le({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":vI(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:We(e.onClick,(e=>{g((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&F(GY,{control:d,bubbles:!m.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),HY="SwitchThumb",VY=me(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=WY(HY,n);return F(at.span,le({"data-state":vI(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),GY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=mm(n),l=gm(t);return Le((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),F("input",le({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function vI(e){return e?"checked":"unchecked"}const mI=UY,KY=VY,YY=P.forwardRef((({className:e,...t},n)=>k.jsx(mI,{className:se("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:k.jsx(KY,{className:se("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-slate-300":t.disabled})})})));YY.displayName=mI.displayName;const gI="Tabs",[XY,gZ]=Er(gI,[hu]),yI=hu(),[QY,S$]=XY(gI),ZY=me(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Zd(l),[d,f]=Go({prop:r,onChange:o,defaultProp:a});return F(QY,{scope:n,baseId:co(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},F(at.div,le({dir:c,"data-orientation":i},s,{ref:t})))})),JY="TabsList",eX=me(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=S$(JY,n),i=yI(n);return F(J_,le({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),F(at.div,le({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),tX="TabsTrigger",nX=me(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=S$(tX,n),l=yI(n),u=bI(i.baseId,r),s=xI(i.baseId,r),c=r===i.value;return F(e$,le({asChild:!0},l,{focusable:!o,active:c}),F(at.button,le({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:We(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:We(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:We(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),rX="TabsContent",oX=me(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=S$(rX,n),u=bI(l.baseId,r),s=xI(l.baseId,r),c=r===l.value,d=Ae(c);return Le((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),F(No,{present:o||c},(({present:n})=>F(at.div,le({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function bI(e,t){return`${e}-trigger-${t}`}function xI(e,t){return`${e}-content-${t}`}const iX=ZY,wI=eX,_I=nX,$I=oX,yZ=iX,aX=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(wI,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));aX.displayName=wI.displayName;const sX=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(_I,{ref:o,className:t?se("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-blue_100","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));sX.displayName=_I.displayName;const lX=P.forwardRef((({className:e,...t},n)=>k.jsx($I,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));lX.displayName=$I.displayName;const cX=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));cX.displayName="Table";const uX=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));uX.displayName="TableHeader";const fX=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));fX.displayName="TableBody";const dX=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));dX.displayName="TableFooter";const pX=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));pX.displayName="TableRow";const hX=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));hX.displayName="TableHead";const vX=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));vX.displayName="TableCell";const mX=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));mX.displayName="TableCaption";const gX=(e,t)=>se("flex w-full rounded-m px-4 py-3.5 text-base text-slate-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),yX=P.forwardRef((({className:e,...t},n)=>{const{error:r}=fs();return k.jsx("textarea",{className:gX(!!r,e),ref:n,...t})}));yX.displayName="Textarea";const bZ=OK,bX=AK,xX=NK,wX=ea("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),SI=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>k.jsx(JD,{ref:a,sideOffset:t,className:se(wX({size:n,theme:r,className:e})),...o})));SI.displayName=JD.displayName;const xZ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(bX,{children:[k.jsx(xX,{className:n,...r,children:e}),t&&k.jsx(SI,{...o,children:t})]}),wZ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})});function _X(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function CI(...e){return t=>e.forEach((e=>_X(e,t)))}function EI(...e){return nt(CI(...e),e)}let Qx=0;function $X(){Le((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:xT()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:xT()),Qx++,()=>{1===Qx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Qx--}}),[])}function xT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function SX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function CX(...e){return t=>e.forEach((e=>SX(e,t)))}function EX(...e){return nt(CX(...e),e)}const Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",wT={bubbles:!1,cancelable:!0},PX=me(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=Je(null),s=is(o),c=is(a),d=Ae(null),f=EX(t,(e=>u(e))),p=Ae({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Le((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:cl(d.current,{select:!0})},t=function(e){p.paused||!l||l.contains(e.relatedTarget)||cl(d.current,{select:!0})};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),Le((()=>{if(l){$T.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(Zx,wT);l.addEventListener(Zx,s),l.dispatchEvent(t),t.defaultPrevented||(RX(DX(PI(l)),{select:!0}),document.activeElement===e&&cl(l))}return()=>{l.removeEventListener(Zx,s),setTimeout((()=>{const t=new CustomEvent(Jx,wT);l.addEventListener(Jx,c),l.dispatchEvent(t),t.defaultPrevented||cl(e??document.body,{select:!0}),l.removeEventListener(Jx,c),$T.remove(p)}),0)}}}),[l,s,c,p]);const m=nt((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=TX(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&cl(a,{select:!0})):(e.preventDefault(),n&&cl(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return F(ss.div,le({tabIndex:-1},i,{ref:f,onKeyDown:m}))}));function RX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cl(r,{select:t}),document.activeElement!==n)return}function TX(e){const t=PI(e);return[_T(t,e),_T(t.reverse(),e)]}function PI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _T(e,t){for(const n of e)if(!OX(n,{upTo:t}))return n}function OX(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function AX(e){return e instanceof HTMLInputElement&&"select"in e}function cl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AX(e)&&t&&e.select()}}const $T=NX();function NX(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ST(e,t),e.unshift(t)},remove(t){var n;e=ST(e,t),null===(n=e[0])||void 0===n||n.resume()}}}function ST(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function DX(e){return e.filter((e=>"A"!==e.tagName))}const IX=P.useId||(()=>{});let kX=0;function MX(e){const[t,n]=P.useState(IX());return Xa((()=>{e||n((e=>e??String(kX++)))}),[e]),e||(t?`radix-${t}`:"")}const RI=me(((e,t)=>{const{children:n,...r}=e,o=qn.toArray(n),a=o.find(jX);if(a){const e=a.props.children,n=o.map((t=>t===a?qn.count(e)>1?qn.only(null):fo(e)?e.props.children:null:t));return F(qw,le({},r,{ref:t}),fo(e)?Ji(e,void 0,n):null)}return F(qw,le({},r,{ref:t}),n)}));RI.displayName="Slot";const qw=me(((e,t)=>{const{children:n,...r}=e;return fo(n)?Ji(n,{...FX(r,n.props),ref:CI(t,n.ref)}):qn.count(n)>1?qn.only(null):null}));qw.displayName="SlotClone";const LX=({children:e})=>F(ls,null,e);function jX(e){return fo(e)&&e.type===LX}function FX(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const TI="Popover",[OI,_Z]=c$(TI,[Nm]),Fm=Nm(),[BX,El]=OI(TI),qX=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Fm(t),u=Ae(null),[s,c]=Je(!1),[d=!1,f]=oD({prop:r,defaultProp:o,onChange:a});return F(bD,l,F(BX,{scope:t,contentId:MX(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:nt((()=>f((e=>!e))),[f]),hasCustomAnchor:s,onCustomAnchorAdd:nt((()=>c(!0)),[]),onCustomAnchorRemove:nt((()=>c(!1)),[]),modal:i},n))},zX="PopoverAnchor",WX=me(((e,t)=>{const{__scopePopover:n,...r}=e,o=El(zX,n),a=Fm(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return Le((()=>(i(),()=>l())),[i,l]),F(p$,le({},a,r,{ref:t}))})),UX="PopoverTrigger",HX=me(((e,t)=>{const{__scopePopover:n,...r}=e,o=El(UX,n),a=Fm(n),i=EI(t,o.triggerRef),l=F(ss.button,le({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":DI(o.open)},r,{ref:i,onClick:dr(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:F(p$,le({asChild:!0},a),l)})),AI="PopoverPortal",[VX,GX]=OI(AI,{forceMount:void 0}),KX=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=El(AI,t);return F(VX,{scope:t,forceMount:n},F(rp,{present:n||a.open},F(wD,{asChild:!0,container:o},r)))},Fd="PopoverContent",YX=me(((e,t)=>{const n=GX(Fd,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=El(Fd,e.__scopePopover);return F(rp,{present:r||a.open},a.modal?F(XX,le({},o,{ref:t})):F(QX,le({},o,{ref:t})))})),XX=me(((e,t)=>{const n=El(Fd,e.__scopePopover),r=Ae(null),o=EI(t,r),a=Ae(!1);return Le((()=>{const e=r.current;if(e)return zd(e)}),[]),F(qd,{as:RI,allowPinchZoom:!0},F(NI,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dr(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:dr(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:dr(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),QX=me(((e,t)=>{const n=El(Fd,e.__scopePopover),r=Ae(!1);return F(NI,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))})),NI=me(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onInteractOutside:c,...d}=e,f=El(Fd,n),p=Fm(n);return $X(),F(PX,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},F(_D,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onDismiss:()=>f.onOpenChange(!1)},F(xD,le({"data-state":DI(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function DI(e){return e?"open":"closed"}const ZX=qX,JX=WX,eQ=HX,tQ=KX,nQ=YX;function $Z({...e}){return k.jsx(ZX,{"data-slot":"popover",...e})}function SZ({...e}){return k.jsx(eQ,{"data-slot":"popover-trigger",...e})}function CZ({className:e,align:t="center",sideOffset:n=4,...r}){return k.jsx(tQ,{children:k.jsx(nQ,{"data-slot":"popover-content",align:t,sideOffset:n,className:se("origin-(--radix-popover-content-transform-origin) outline-hidden z-50 flex w-[100vw] max-w-[600px] flex-col gap-xs rounded-lg border border-slate-200 bg-popover px-none py-xs text-popover-foreground shadow-[0_0_12px_0_rgba(0,0,0,0.15)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})}function EZ({...e}){return k.jsx(JX,{"data-slot":"popover-anchor",...e})}const PZ=({as:e="div",children:t,className:n,...r})=>F(e,{className:se(n),...r},t);function rQ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function oQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>P.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return P.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=P.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=P.useMemo((()=>l),Object.values(l));return k.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=P.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},iQ(r,...t)]}function iQ(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return P.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function II(e){const t=P.useRef(e);return P.useEffect((()=>{t.current=e})),P.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function aQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sQ({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=II(n);return[i,P.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function sQ({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=II(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Kv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function CT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=CT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():CT(e[t],null)}}}}function MI(...e){return P.useCallback(kI(...e),e)}var LI=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),a=o.find(cQ);if(a){const e=a.props.children,n=o.map((t=>t===a?P.Children.count(e)>1?P.Children.only(null):P.isValidElement(e)?e.props.children:null:t));return k.jsx(zw,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(zw,{...r,ref:t,children:n})}));LI.displayName="Slot";var zw=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=fQ(n),o=uQ(r,n.props);return n.type!==P.Fragment&&(o.ref=t?kI(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));zw.displayName="SlotClone";var lQ=({children:e})=>k.jsx(k.Fragment,{children:e});function cQ(e){return P.isValidElement(e)&&e.type===lQ}function uQ(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function fQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var dQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],C$=dQ.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?LI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function pQ(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var jI=e=>{const{present:t,children:n}=e,r=hQ(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=MI(r.ref,vQ(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function hQ(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=pQ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=xv(r.current);a.current="mounted"===l?e:"none"}),[l]),Kv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=xv(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Kv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=xv(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=xv(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function xv(e){return(null==e?void 0:e.animationName)||"none"}function vQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}jI.displayName="Presence";var mQ=P.useId||(()=>{}),gQ=0;function yQ(e){const[t,n]=P.useState(mQ());return Kv((()=>{e||n((e=>e??String(gQ++)))}),[e]),e||(t?`radix-${t}`:"")}var E$="Collapsible",[bQ,RZ]=oQ(E$),[xQ,P$]=bQ(E$),FI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=aQ({prop:r,defaultProp:o,onChange:i});return k.jsx(xQ,{scope:n,disabled:a,contentId:yQ(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(C$.div,{"data-state":T$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));FI.displayName=E$;var BI="CollapsibleTrigger",qI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=P$(BI,n);return k.jsx(C$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":T$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:rQ(e.onClick,o.onOpenToggle)})}));qI.displayName=BI;var R$="CollapsibleContent",zI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=P$(R$,e.__scopeCollapsible);return k.jsx(jI,{present:n||o.open,children:({present:e})=>k.jsx(wQ,{...r,ref:t,present:e})})}));zI.displayName=R$;var wQ=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=P$(R$,n),[l,u]=P.useState(r),s=P.useRef(null),c=MI(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),m=p.current,h=i.open||l,v=P.useRef(h),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),Kv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[i.open,r]),k.jsx(C$.div,{"data-state":T$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&o})}));function T$(e){return e?"open":"closed"}var _Q=FI;const TZ=_Q,OZ=qI,AZ=zI;export{OQ as AlertDialog,Q5 as AlertDialogAction,Z5 as AlertDialogCancel,V5 as AlertDialogContent,X5 as AlertDialogDescription,K5 as AlertDialogFooter,G5 as AlertDialogHeader,gO as AlertDialogOverlay,H5 as AlertDialogPortal,Y5 as AlertDialogTitle,AQ as AlertDialogTrigger,$O as Avatar,CO as AvatarFallback,SO as AvatarImage,Bd as Button,PQ as ButtonLoader,sM as Card,fM as CardContent,uM as CardDescription,dM as CardFooter,lM as CardHeader,cM as CardTitle,GM as Carousel,KM as CarouselContent,YM as CarouselItem,QM as CarouselNext,XM as CarouselPrevious,yF as ChartContainer,IQ as ChartLegend,wF as ChartLegendContent,bF as ChartStyle,DQ as ChartTooltip,xF as ChartTooltipContent,k_ as Checkbox,M2 as ChipsItem,_F as ChipsWrapper,TZ as Collapsible,AZ as CollapsibleContent,OZ as CollapsibleTrigger,XA as Command,jQ as CommandDialog,fB as CommandEmpty,dB as CommandGroup,cB as CommandInput,hB as CommandItem,uB as CommandList,pB as CommandSeparator,vB as CommandShortcut,nB as Dialog,LQ as DialogClose,KA as DialogContent,lB as DialogDescription,YA as DialogFooter,aB as DialogHeader,GA as DialogOverlay,rB as DialogPortal,sB as DialogTitle,MQ as DialogTrigger,Zq as Drawer,zQ as DrawerClose,ez as DrawerContent,oz as DrawerDescription,nz as DrawerFooter,tz as DrawerHeader,FN as DrawerOverlay,Jq as DrawerPortal,rz as DrawerTitle,qQ as DrawerTrigger,HQ as DropdownMenu,XU as DropdownMenuCheckboxItem,KU as DropdownMenuContent,GQ as DropdownMenuGroup,YU as DropdownMenuItem,ZU as DropdownMenuLabel,KQ as DropdownMenuPortal,XQ as DropdownMenuRadioGroup,QU as DropdownMenuRadioItem,JU as DropdownMenuSeparator,eH as DropdownMenuShortcut,YQ as DropdownMenuSub,GU as DropdownMenuSubContent,VU as DropdownMenuSubTrigger,VQ as DropdownMenuTrigger,ZQ as Form,ZH as FormControl,JH as FormDescription,JQ as FormField,XH as FormItem,QH as FormLabel,eV as FormMessage,tV as FormSelect,rV as FormSelectContent,iV as FormSelectGroup,oV as FormSelectItem,aV as FormSelectLabel,sV as FormSelectSeparator,nV as FormSelectTrigger,lV as FormSelectValue,nZ as HoverCard,TG as HoverCardContent,oZ as HoverCardPortal,rZ as HoverCardTrigger,RD as Input,wZ as InputFile,T3 as Label,$Z as Popover,EZ as PopoverAnchor,CZ as PopoverContent,SZ as PopoverTrigger,GG as Progress,uK as RadioGroup,fK as RadioGroupItem,K3 as Select,KH as SelectActions,HH as SelectCheckboxItem,Z3 as SelectContent,YH as SelectFooter,Y3 as SelectGroup,eD as SelectItem,J3 as SelectLabel,UH as SelectMultiTrigger,GH as SelectScrollDownButton,VH as SelectScrollUpButton,tD as SelectSeparator,Q3 as SelectTrigger,X3 as SelectValue,dK as Sheet,lZ as SheetClose,UD as SheetContent,GD as SheetDescription,vK as SheetFooter,HD as SheetHeader,WD as SheetOverlay,pK as SheetPortal,VD as SheetTitle,sZ as SheetTrigger,yY as Sidebar,EY as SidebarContent,SY as SidebarFooter,PY as SidebarGroup,TY as SidebarGroupAction,OY as SidebarGroupContent,RY as SidebarGroupLabel,$Y as SidebarHeader,_Y as SidebarInput,wY as SidebarInset,AY as SidebarMenu,kY as SidebarMenuAction,MY as SidebarMenuBadge,IY as SidebarMenuButton,NY as SidebarMenuItem,LY as SidebarMenuSkeleton,jY as SidebarMenuSub,BY as SidebarMenuSubButton,FY as SidebarMenuSubItem,gY as SidebarProvider,xY as SidebarRail,CY as SidebarSeparator,bY as SidebarTrigger,bT as Skeleton,YY as Switch,cX as Table,fX as TableBody,mX as TableCaption,vX as TableCell,dX as TableFooter,hX as TableHead,uX as TableHeader,pX as TableRow,yZ as Tabs,lX as TabsContent,aX as TabsList,sX as TabsTrigger,yX as Textarea,bX as Tooltip,SI as TooltipContent,bZ as TooltipProvider,xX as TooltipTrigger,xZ as TooltipWrapper,Vw as buttonVariants,se as cn,gX as getTextareaClassName,PZ as styledElement,Mm as uiSlice,nm as useCarousel,pZ as useDeviceType,dZ as useDeviceTypeUpdater,fs as useFormField,vZ as useIsDesktop,uY as useIsMobile,hZ as useIsTablet,jm as useSidebar};