mobigrid-module 1.1.25-beta.4 → 1.1.25-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -23,7 +23,7 @@ const pi=(...e)=>e.filter(((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t)
|
|
23
23
|
*
|
24
24
|
* This source code is licensed under the ISC license.
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
26
|
-
*/function Ei(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Si(...e){return n.useCallback(Ei(...e),e)}function Pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ci,zi={exports:{}},Ri={};var Ti,Li,Ni={};function Mi(){return Ti||(Ti=1,"production"!==Qe.env.NODE_ENV&&function(){var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator;var h=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var m;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return b(e)+".Consumer";case l:return b(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case d:var r=e,g=r._payload,y=r._init;try{return w(y(g))}catch(e){return null}}return null}m=Symbol.for("react.module.reference");var O,x,j,k,E,S,P,C=Object.assign,z=0;function R(){}R.__reactDisabledLog=!0;var T,L=h.ReactCurrentDispatcher;function N(e,t,r){if(void 0===T)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return"\n"+T+e}var M,I=!1,A="function"==typeof WeakMap?WeakMap:Map;function _(e,t){if(!e||I)return"";var r,n=M.get(e);if(void 0!==n)return n;I=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=L.current,L.current=null,function(){if(0===z){O=console.log,x=console.info,j=console.warn,k=console.error,E=console.group,S=console.groupCollapsed,P=console.groupEnd;var e={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=r.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{I=!1,L.current=o,function(){if(0==--z){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:O}),info:C({},e,{value:x}),warn:C({},e,{value:j}),error:C({},e,{value:k}),group:C({},e,{value:E}),groupCollapsed:C({},e,{value:S}),groupEnd:C({},e,{value:P})})}z<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?N(p):"";return"function"==typeof e&&M.set(e,d),d}function D(e,t,r){if(null==e)return"";if("function"==typeof e)return _(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return N(e);switch(e){case u:return N("Suspense");case f:return N("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return _(e.render,!1);case p:return D(e.type,t,r);case d:var n=e,o=n._payload,i=n._init;try{return D(i(o),t,r)}catch(e){}}return""}M=new A;var B=Object.prototype.hasOwnProperty,F={},W=h.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);W.setExtraStackFrame(r)}else W.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function G(e){return""+e}function $(e){if(function(e){try{return G(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),G(e)}var q,Y,X,K=h.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};X={};function Z(e,t,n,o,i){var a,l={},s=null,c=null;for(a in void 0!==n&&($(n),s=""+n),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&($(t.key),s=""+t.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&K.current&&t&&K.current.stateNode!==t){var r=w(K.current.type);X[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(K.current.type),e.ref),X[r]=!0)}}(t,i)),t)B.call(t,a)&&!J.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){q||(q=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(l,f),c&&function(e,t){var r=function(){Y||(Y=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(l,f)}return function(e,t,n,o,i,a,l){var s={$$typeof:r,type:e,key:t,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,K.current,l)}var Q,ee=h.ReactCurrentOwner,te=h.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);te.setExtraStackFrame(r)}else te.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=w(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ie[r]){ie[r]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&ae(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=y&&e[y]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ne(i.value)&&ae(i.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==p)return;t=r.propTypes}if(t){var n=w(r);!function(e,t,r,n,o){var i=Function.call.bind(B);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof l),V(null)),l instanceof Error&&!(l.message in F)&&(F[l.message]=!0,V(o),v("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ce={};function ue(e,t,n,y,h,b){var O=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||void 0!==e.getModuleId)}(e);if(!O){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var j;x+=oe(),null===e?j="null":U(e)?j="array":void 0!==e&&e.$$typeof===r?(j="<"+(w(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,x)}var k=Z(e,t,n,h,b);if(null==k)return k;if(O){var E=t.children;if(void 0!==E)if(y)if(U(E)){for(var S=0;S<E.length;S++)le(E[S],e);Object.freeze&&Object.freeze(E)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(E,e)}if(B.call(t,"key")){var P=w(e),C=Object.keys(t).filter((function(e){return"key"!==e})),z=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+z])v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',z,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+z]=!0}return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(k):se(k),k}var fe=function(e,t,r){return ue(e,t,r,!1)},pe=function(e,t,r){return ue(e,t,r,!0)};Ni.Fragment=o,Ni.jsx=fe,Ni.jsxs=pe}()),Ni}var Ii=(Li||(Li=1,"production"===Qe.env.NODE_ENV?zi.exports=function(){if(Ci)return Ri;Ci=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var l,s={},c=null,u=null;for(l in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,l)&&!a.hasOwnProperty(l)&&(s[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps)void 0===s[l]&&(s[l]=t[l]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}return Ri.Fragment=n,Ri.jsx=l,Ri.jsxs=l,Ri}():zi.exports=Mi()),zi.exports),Ai=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Bi);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Ii.jsx(_i,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Ii.jsx(_i,{...o,ref:t,children:r})}));Ai.displayName="Slot";var _i=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return n.cloneElement(r,{...Fi(o,r.props),ref:t?Ei(t,e):e})}return n.Children.count(r)>1?n.Children.only(null):null}));_i.displayName="SlotClone";var Di=({children:e})=>Ii.jsx(Ii.Fragment,{children:e});function Bi(e){return n.isValidElement(e)&&e.type===Di}function Fi(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}var Wi=go("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Vi=n.forwardRef((function(e,t){var r=e.className,o=e.variant,l=e.size,s=e.asChild,c=void 0!==s&&s,u=a(e,["className","variant","size","asChild"]),f=c?Ai:"button";return n.createElement(f,i({className:li(Wi({variant:o,size:l,className:r})),ref:t},u))}));Vi.displayName="Button";var Hi=function(){return Hi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Hi.apply(this,arguments)};function Ui(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Gi(e){return"multiple"===e.mode}function $i(e){return"range"===e.mode}function qi(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Yi={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var Xi=Object.freeze({__proto__:null,formatCaption:function(e,t){return we(e,"LLLL y",t)},formatDay:function(e,t){return we(e,"d",t)},formatMonthCaption:function(e,t){return we(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return we(e,"cccccc",t)},formatYearCaption:function(e,t){return we(e,"yyyy",t)}}),Ki=Object.freeze({__proto__:null,labelDay:function(e,t,r){return we(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return we(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Ji=e.createContext(void 0);function Zi(e){var t,r,n,o,i,a=e.initialProps,l=(r=Yi,n=q,o=new Date,{captionLayout:"buttons",classNames:r,formatters:Xi,labels:Ki,locale:n,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),s=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=N(n):t&&(i=new Date(t,0,1)),o?a=L(o):r&&(a=new Date(r,11,31)),{fromDate:i?j(i):void 0,toDate:a?j(a):void 0}}(a),c=s.fromDate,u=s.toDate,f=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===f||c&&u||(f="buttons"),(qi(a)||Gi(a)||$i(a))&&(i=a.onSelect);var p=Hi(Hi(Hi({},l),a),{captionLayout:f,classNames:Hi(Hi({},l.classNames),a.classNames),components:Hi({},a.components),formatters:Hi(Hi({},l.formatters),a.formatters),fromDate:c,labels:Hi(Hi({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Hi(Hi({},l.modifiers),a.modifiers),modifiersClassNames:Hi(Hi({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Hi(Hi({},l.styles),a.styles),toDate:u});return Ii.jsx(Ji.Provider,{value:p,children:e.children})}function Qi(){var t=e.useContext(Ji);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function ea(e){var t=Qi(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Ii.jsx("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function ta(e){return Ii.jsx("svg",Hi({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Ii.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ra(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=Qi(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ta;return Ii.jsxs("div",{className:l,style:s,children:[Ii.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Ii.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Ii.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Ii.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function na(e){var t,r=Qi(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return Ii.jsx(Ii.Fragment,{});if(!o)return Ii.jsx(Ii.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=x(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var p=N(n),d=n.getMonth();d<=o.getMonth();d++)f.push(Pe(p,d));else for(p=N(new Date),d=0;d<=11;d++)f.push(Pe(p,d));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ra;return Ii.jsx(g,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Pe(N(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Ii.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function oa(e){var t,r=e.displayMonth,n=Qi(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,p=[];if(!o)return Ii.jsx(Ii.Fragment,{});if(!i)return Ii.jsx(Ii.Fragment,{});for(var d=o.getFullYear(),g=i.getFullYear(),y=d;y<=g;y++)p.push(Ce(I(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ra;return Ii.jsx(h,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ce(N(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:p.map((function(e){return Ii.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function ia(){var t=Qi(),r=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&T(i,o)<0&&(o=y(i,-1*(s-1))),a&&T(o,a)<0&&(o=a),N(o)}(t),n=function(t,r){var n=e.useState(t),o=n[0];return[void 0===r?o:r,n[1]]}(r,t.month),o=n[0],i=n[1];return[o,function(e){var r;if(!t.disableNavigation){var n=N(e);i(n),null===(r=t.onMonthChange)||void 0===r||r.call(t,n)}}]}var aa=e.createContext(void 0);function la(e){var t=Qi(),r=ia(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=N(e),i=T(N(y(o,n)),o),a=[],l=0;l<i;l++){var s=y(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=N(e);if(!r)return y(l,a);if(!(T(r,e)<i))return y(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=N(e);if(!r)return y(a,-i);if(!(T(a,r)<=0))return y(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Ee(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&ke(e,r)?o(y(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Ii.jsx(aa.Provider,{value:c,children:e.children})}function sa(){var t=e.useContext(aa);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function ca(e){var t,r=Qi(),n=r.classNames,o=r.styles,i=r.components,a=sa().goToMonth,l=function(t){a(y(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:ea,c=Ii.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Ii.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Ii.jsx("div",{className:n.vhidden,children:c}),Ii.jsx(na,{onChange:l,displayMonth:e.displayMonth}),Ii.jsx(oa,{onChange:l,displayMonth:e.displayMonth})]})}function ua(e){return Ii.jsx("svg",Hi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Ii.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function fa(e){return Ii.jsx("svg",Hi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Ii.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pa=e.forwardRef((function(e,t){var r=Qi(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Hi(Hi({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Ii.jsx("button",Hi({},e,{ref:t,type:"button",className:a,style:l}))}));function da(e){var t,r,n=Qi(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return Ii.jsx(Ii.Fragment,{});var p=c(e.previousMonth,{locale:i}),d=[a.nav_button,a.nav_button_previous].join(" "),g=u(e.nextMonth,{locale:i}),y=[a.nav_button,a.nav_button_next].join(" "),h=null!==(t=null==f?void 0:f.IconRight)&&void 0!==t?t:fa,v=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:ua;return Ii.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Ii.jsx(pa,{name:"previous-month","aria-label":p,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Ii.jsx(h,{className:a.nav_icon,style:l.nav_icon}):Ii.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Ii.jsx(pa,{name:"next-month","aria-label":g,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Ii.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Ii.jsx(h,{className:a.nav_icon,style:l.nav_icon})})]})}function ga(e){var t=Qi().numberOfMonths,r=sa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Ee(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Ii.jsx(da,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function ya(e){var t,r,n=Qi(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:ea;return r=i?Ii.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Ii.jsx(ca,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(ca,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Ii.jsx(ga,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Ii.jsx(ga,{displayMonth:e.displayMonth,id:e.id})]}),Ii.jsx("div",{className:o.caption,style:a.caption,children:r})}function ha(e){var t=Qi(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Ii.jsx("tfoot",{className:o,style:n.tfoot,children:Ii.jsx("tr",{children:Ii.jsx("td",{colSpan:8,children:r})})}):Ii.jsx(Ii.Fragment,{})}function va(){var e=Qi(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?b(new Date):m(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=g(n,i);o.push(a)}return o}(o,i,a);return Ii.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Ii.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Ii.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function ma(){var e,t=Qi(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:va;return Ii.jsx("thead",{style:n.head,className:r.head,children:Ii.jsx(i,{})})}function ba(e){var t=Qi(),r=t.locale,n=t.formatters.formatDay;return Ii.jsx(Ii.Fragment,{children:n(e.date,{locale:r})})}var wa=e.createContext(void 0);function Oa(e){if(!Gi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Ii.jsx(wa.Provider,{value:t,children:e.children})}return Ii.jsx(xa,{initialProps:e.initialProps,children:e.children})}function xa(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return z(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?Ui([],n):[];if(r.selected){var u=c.findIndex((function(t){return z(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return Ii.jsx(wa.Provider,{value:l,children:r})}function ja(){var t=e.useContext(wa);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var ka,Ea=e.createContext(void 0);function Sa(e){if(!$i(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Ii.jsx(Ea.Provider,{value:t,children:e.children})}return Ii.jsx(Pa,{initialProps:e.initialProps,children:e.children})}function Pa(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],z(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:Se(i,l-1),before:g(i,l-1)}),i&&a&&c.disabled.push({after:i,before:g(i,l-1)}),!i&&a&&c.disabled.push({after:Se(a,l-1),before:g(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:g(i,1-s)}),c.disabled.push({after:g(i,s-1)})),i&&a){var u=s-(k(a,i)+1);c.disabled.push({before:Se(i,u)}),c.disabled.push({after:g(a,u)})}!i&&a&&(c.disabled.push({before:g(a,1-s)}),c.disabled.push({after:g(a,s-1)}))}return Ii.jsx(Ea.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(z(o,e)&&z(n,e))return;if(z(o,e))return{from:o,to:void 0};if(z(n,e))return;return je(n,e)?{from:e,to:o}:{from:n,to:e}}return o?je(e,o)?{from:o,to:e}:{from:e,to:o}:n?ke(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Ca(){var t=e.useContext(Ea);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function za(e){return Array.isArray(e)?Ui([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(ka||(ka={}));var Ra=ka.Selected,Ta=ka.Disabled,La=ka.Hidden,Na=ka.Today,Ma=ka.RangeEnd,Ia=ka.RangeMiddle,Aa=ka.RangeStart,_a=ka.Outside;var Da=e.createContext(void 0);function Ba(e){var t=Qi(),r=function(e,t,r){var n,o=((n={})[Ra]=za(e.selected),n[Ta]=za(e.disabled),n[La]=za(e.hidden),n[Na]=[e.today],n[Ma]=[],n[Ia]=[],n[Aa]=[],n[_a]=[],n);return e.fromDate&&o[Ta].push({before:e.fromDate}),e.toDate&&o[Ta].push({after:e.toDate}),Gi(e)?o[Ta]=o[Ta].concat(t.modifiers[Ta]):$i(e)&&(o[Ta]=o[Ta].concat(r.modifiers[Ta]),o[Aa]=r.modifiers[Aa],o[Ia]=r.modifiers[Ia],o[Ma]=r.modifiers[Ma]),o}(t,ja(),Ca()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=za(n)})),t}(t.modifiers),o=Hi(Hi({},r),n);return Ii.jsx(Da.Provider,{value:o,children:e.children})}function Fa(){var t=e.useContext(Da);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Wa(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(R(t))return z(e,t);if(function(e){return Array.isArray(e)&&e.every(R)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(k(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),k(e,n)>=0&&k(o,e)>=0):o?z(o,e):!!n&&z(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=k(t.before,e)>0,n=k(t.after,e)<0;return je(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?k(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?k(t.before,e)>0:"function"==typeof t&&t(e)}))}function Va(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Wa(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Ee(e,r)&&(o.outside=!0),o}function Ha(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,f=o.locale,p={day:g,week:E,month:y,year:S,startOfWeek:function(e){return o.ISOWeek?b(e):m(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?_(e):A(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?p=P([c,p]):"after"===n&&u&&(p=C([u,p]));var d=!0;if(i){var h=Va(p,i);d=!h.disabled&&!h.hidden}return d?p:l.count>365?l.lastFocused:Ha(p,{moveBy:r,direction:n,context:o,modifiers:i,retry:Hi(Hi({},l),{count:l.count+1})})}var Ua=e.createContext(void 0);function Ga(t){var r=sa(),n=Fa(),o=e.useState(),i=o[0],a=o[1],l=e.useState(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=N(e[0]),i=L(e[e.length-1]),a=o;a<=i;){var l=Va(a,t);if(l.disabled||l.hidden)a=g(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=g(a,1)}}return n||r}(r.displayMonths,n),f=(null!=i?i:s&&r.isDateDisplayed(s))?s:u,p=function(e){a(e)},d=Qi(),y=function(e,t){if(i){var o=Ha(i,{moveBy:e,direction:t,context:d,modifiers:n});z(i,o)||(r.goToDate(o,i),p(o))}},h={focusedDay:i,focusTarget:f,blur:function(){c(i),a(void 0)},focus:p,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return Ii.jsx(Ua.Provider,{value:h,children:t.children})}function $a(){var t=e.useContext(Ua);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var qa=e.createContext(void 0);function Ya(e){if(!qi(e.initialProps)){var t={selected:void 0};return Ii.jsx(qa.Provider,{value:t,children:e.children})}return Ii.jsx(Xa,{initialProps:e.initialProps,children:e.children})}function Xa(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return Ii.jsx(qa.Provider,{value:n,children:r})}function Ka(){var t=e.useContext(qa);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Ja(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(ka).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function Za(t,r,n){var o,i,a,l=Qi(),s=$a(),c=function(e,t){return Va(e,Fa(),t)}(t,r),u=function(e,t){var r=Qi(),n=Ka(),o=ja(),i=Ca(),a=$a(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,f=a.blur,p=a.focus,d=a.focusMonthBefore,g=a.focusMonthAfter,y=a.focusYearBefore,h=a.focusYearAfter,v=a.focusStartOfWeek,m=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;qi(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):Gi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):$i(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;p(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;f(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():d();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():g();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),m()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(t,c),f=function(){var e=Qi(),t=Ka(),r=ja(),n=Ca();return qi(e)?t.selected:Gi(e)?r.selected:$i(e)?n.selected:void 0}(),p=Boolean(l.onDayClick||"default"!==l.mode);e.useEffect((function(){var e;c.outside||s.focusedDay&&p&&z(s.focusedDay,t)&&(null===(e=n.current)||void 0===e||e.focus())}),[s.focusedDay,t,n,p,c.outside]);var d=Ja(l,c).join(" "),g=function(e,t){var r=Hi({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Hi(Hi({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),y=Boolean(c.outside&&!l.showOutsideDays||c.hidden),h=null!==(a=null===(i=l.components)||void 0===i?void 0:i.DayContent)&&void 0!==a?a:ba,v={style:g,className:d,children:Ii.jsx(h,{date:t,displayMonth:r,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&z(s.focusTarget,t)&&!c.outside,b=s.focusedDay&&z(s.focusedDay,t),w=Hi(Hi(Hi({},v),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||m?0:-1,o)),u);return{isButton:p,isHidden:y,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:v}}function Qa(t){var r=e.useRef(null),n=Za(t.date,t.displayMonth,r);return n.isHidden?Ii.jsx("div",{role:"gridcell"}):n.isButton?Ii.jsx(pa,Hi({name:"day",ref:r},n.buttonProps)):Ii.jsx("div",Hi({},n.divProps))}function el(e){var t=e.number,r=e.dates,n=Qi(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return Ii.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Ii.jsx(pa,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function tl(e){var t,r,n,o=Qi(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:Qa,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:el;return l&&(n=Ii.jsx("td",{className:a.cell,style:i.cell,children:Ii.jsx(u,{number:e.weekNumber,dates:e.dates})})),Ii.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Ii.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Ii.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+d(e)/1e3)}(t))}))]})}function rl(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?_(t):A(t,r),o=(null==r?void 0:r.ISOWeek)?b(e):m(e,r),i=k(n,o),a=[],l=0;l<=i;l++)a.push(g(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?Y(t):K(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function nl(e){var t,r,n,o=Qi(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,f=o.weekStartsOn,p=o.firstWeekContainsDate,d=o.ISOWeek,g=function(e,t){var r=rl(N(e),L(e),t);if(null==t?void 0:t.useFixedWeeks){var n=xe(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=E(i,6-n),l=rl(E(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:f,firstWeekContainsDate:p}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:ma,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:tl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ha;return Ii.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Ii.jsx(y,{}),Ii.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Ii.jsx(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Ii.jsx(v,{displayMonth:e.displayMonth})]})}var ol="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,il=!1,al=0;function ll(){return"react-day-picker-".concat(++al)}function sl(t){var r,n,o=Qi(),i=o.dir,a=o.classNames,l=o.styles,s=o.components,c=sa().displayMonths,u=function(t){var r,n=null!=t?t:il?ll():null,o=e.useState(n),i=o[0],a=o[1];return ol((function(){null===i&&a(ll())}),[]),e.useEffect((function(){!1===il&&(il=!0)}),[]),null!==(r=null!=t?t:i)&&void 0!==r?r:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),f=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,p=[a.month],d=l.month,g=0===t.displayIndex,y=t.displayIndex===c.length-1,h=!g&&!y;"rtl"===i&&(y=(r=[g,y])[0],g=r[1]),g&&(p.push(a.caption_start),d=Hi(Hi({},d),l.caption_start)),y&&(p.push(a.caption_end),d=Hi(Hi({},d),l.caption_end)),h&&(p.push(a.caption_between),d=Hi(Hi({},d),l.caption_between));var v=null!==(n=null==s?void 0:s.Caption)&&void 0!==n?n:ya;return Ii.jsxs("div",{className:p.join(" "),style:d,children:[Ii.jsx(v,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),Ii.jsx(nl,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function cl(e){var t=Qi(),r=t.classNames,n=t.styles;return Ii.jsx("div",{className:r.months,style:n.months,children:e.children})}function ul(t){var r,n,o=t.initialProps,i=Qi(),a=$a(),l=sa(),s=e.useState(!1),c=s[0],u=s[1];e.useEffect((function(){i.initialFocus&&a.focusTarget&&(c||(a.focus(a.focusTarget),u(!0)))}),[i.initialFocus,c,a.focus,a.focusTarget,a]);var f=[i.classNames.root,i.className];i.numberOfMonths>1&&f.push(i.classNames.multiple_months),i.showWeekNumber&&f.push(i.classNames.with_weeknumber);var p=Hi(Hi({},i.styles.root),i.style),d=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Hi(Hi({},e),((r={})[t]=o[t],r))}),{}),g=null!==(n=null===(r=o.components)||void 0===r?void 0:r.Months)&&void 0!==n?n:cl;return Ii.jsx("div",Hi({className:f.join(" "),style:p,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},d,{children:Ii.jsx(g,{children:l.displayMonths.map((function(e,t){return Ii.jsx(sl,{displayIndex:t,displayMonth:e},t)}))})}))}function fl(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return Ii.jsx(Zi,{initialProps:r,children:Ii.jsx(la,{children:Ii.jsx(Ya,{initialProps:r,children:Ii.jsx(Oa,{initialProps:r,children:Ii.jsx(Sa,{initialProps:r,children:Ii.jsx(Ba,{children:Ii.jsx(Ga,{children:t})})})})})})})}function pl(e){return Ii.jsx(fl,Hi({},e,{children:Ii.jsx(ul,{initialProps:e})}))}function dl(e){var t=e.className,r=e.classNames,o=e.showOutsideDays,l=void 0===o||o,s=a(e,["className","classNames","showOutsideDays"]);return n.createElement(pl,i({showOutsideDays:l,className:li("p-3",t),classNames:i({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:li(Wi({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:li("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===s.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:li(Wi({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},r),components:{IconLeft:function(){return n.createElement(bi,{className:"h-4 w-4"})},IconRight:function(){return n.createElement(wi,{className:"h-4 w-4"})}}},s))}function gl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function yl(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;r=[...r,o];const l=t=>{const{scope:r,children:o,...l}=t,s=r?.[e]?.[a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e]?.[a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},hl(o,...t)]}function hl(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}dl.displayName="Calendar";var vl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?Ai:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Ii.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function ml(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>t.current?.(...e)),[])}var bl,wl="dismissableLayer.update",Ol="dismissableLayer.pointerDownOutside",xl="dismissableLayer.focusOutside",jl=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kl=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(jl),[f,p]=n.useState(null),d=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),y=Si(t,(e=>p(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(v),b=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(e,t=globalThis?.document){const r=ml(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){Sl(Ol,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),d),j=function(e,t=globalThis?.document){const r=ml(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Sl(xl,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),d);return function(e,t=globalThis?.document){const r=ml(e);n.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(bl=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),El(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=bl)}}),[f,d,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),El())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(wl,e),()=>document.removeEventListener(wl,e)}),[]),Ii.jsx(vl.div,{...c,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:gl(e.onFocusCapture,j.onFocusCapture),onBlurCapture:gl(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:gl(e.onPointerDownCapture,x.onPointerDownCapture)})}));kl.displayName="DismissableLayer";function El(){const e=new CustomEvent(wl);document.dispatchEvent(e)}function Sl(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(jl),o=n.useRef(null),i=Si(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Ii.jsx(vl.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Pl=0;function Cl(){n.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zl()),document.body.insertAdjacentElement("beforeend",e[1]??zl()),Pl++,()=>{1===Pl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Pl--}}),[])}function zl(){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 Rl="focusScope.autoFocusOnMount",Tl="focusScope.autoFocusOnUnmount",Ll={bubbles:!1,cancelable:!0},Nl=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=ml(i),f=ml(a),p=n.useRef(null),d=Si(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?p.current=t:_l(p.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||_l(p.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&_l(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),n.useEffect((()=>{if(s){Dl.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Rl,Ll);s.addEventListener(Rl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_l(n,{select:t}),document.activeElement!==r)return}((e=Ml(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&_l(s))}return()=>{s.removeEventListener(Rl,u),setTimeout((()=>{const e=new CustomEvent(Tl,Ll);s.addEventListener(Tl,f),s.dispatchEvent(e),e.defaultPrevented||_l(t??document.body,{select:!0}),s.removeEventListener(Tl,f),Dl.remove(g)}),0)}}var e}),[s,u,f,g]);const y=n.useCallback((e=>{if(!r&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Ml(e),r=Il(t,e),n=Il(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&_l(i,{select:!0})):(e.preventDefault(),r&&_l(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Ii.jsx(vl.div,{tabIndex:-1,...l,ref:d,onKeyDown:y})}));function Ml(e){const t=[],r=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(;r.nextNode();)t.push(r.currentNode);return t}function Il(e,t){for(const r of e)if(!Al(r,{upTo:t}))return r}function Al(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 _l(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Nl.displayName="FocusScope";var Dl=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Bl(e,t),e.unshift(t)},remove(t){e=Bl(e,t),e[0]?.resume()}}}();function Bl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Fl=Boolean(globalThis?.document)?n.useLayoutEffect:()=>{},Wl=n["useId".toString()]||(()=>{}),Vl=0;function Hl(e){const[t,r]=n.useState(Wl());return Fl((()=>{r((e=>e??String(Vl++)))}),[e]),t?`radix-${t}`:""}const Ul=["top","right","bottom","left"],Gl=Math.min,$l=Math.max,ql=Math.round,Yl=Math.floor,Xl=e=>({x:e,y:e}),Kl={left:"right",right:"left",bottom:"top",top:"bottom"},Jl={start:"end",end:"start"};function Zl(e,t,r){return $l(e,Gl(t,r))}function Ql(e,t){return"function"==typeof e?e(t):e}function es(e){return e.split("-")[0]}function ts(e){return e.split("-")[1]}function rs(e){return"x"===e?"y":"x"}function ns(e){return"y"===e?"height":"width"}function os(e){return["top","bottom"].includes(es(e))?"y":"x"}function is(e){return rs(os(e))}function as(e){return e.replace(/start|end/g,(e=>Jl[e]))}function ls(e){return e.replace(/left|right|bottom|top/g,(e=>Kl[e]))}function ss(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function cs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function us(e,t,r){let{reference:n,floating:o}=e;const i=os(t),a=is(t),l=ns(a),s=es(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[l]/2-o[l]/2;let d;switch(s){case"top":d={x:u,y:n.y-o.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-o.width,y:f};break;default:d={x:n.x,y:n.y}}switch(ts(t)){case"start":d[a]-=p*(r&&c?-1:1);break;case"end":d[a]+=p*(r&&c?-1:1)}return d}async function fs(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Ql(t,e),g=ss(d),y=l[p?"floating"===f?"reference":"floating":f],h=cs(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(y)))||r?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:s}):v);return{top:(h.top-w.top+g.top)/b.y,bottom:(w.bottom-h.bottom+g.bottom)/b.y,left:(h.left-w.left+g.left)/b.x,right:(w.right-h.right+g.right)/b.x}}function ps(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ds(e){return Ul.some((t=>e[t]>=0))}function gs(){return"undefined"!=typeof window}function ys(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function hs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function vs(e){var t;return null==(t=(ms(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ms(e){return!!gs()&&(e instanceof Node||e instanceof hs(e).Node)}function bs(e){return!!gs()&&(e instanceof Element||e instanceof hs(e).Element)}function ws(e){return!!gs()&&(e instanceof HTMLElement||e instanceof hs(e).HTMLElement)}function Os(e){return!(!gs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof hs(e).ShadowRoot)}function xs(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Cs(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function js(e){return["table","td","th"].includes(ys(e))}function ks(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Es(e){const t=Ss(),r=bs(e)?Cs(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Ss(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ps(e){return["html","body","#document"].includes(ys(e))}function Cs(e){return hs(e).getComputedStyle(e)}function zs(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rs(e){if("html"===ys(e))return e;const t=e.assignedSlot||e.parentNode||Os(e)&&e.host||vs(e);return Os(t)?t.host:t}function Ts(e){const t=Rs(e);return Ps(t)?e.ownerDocument?e.ownerDocument.body:e.body:ws(t)&&xs(t)?t:Ts(t)}function Ls(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Ts(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=hs(o);if(i){const e=Ns(a);return t.concat(a,a.visualViewport||[],xs(o)?o:[],e&&r?Ls(e):[])}return t.concat(o,Ls(o,[],r))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ms(e){const t=Cs(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ws(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ql(r)!==i||ql(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Is(e){return bs(e)?e:e.contextElement}function As(e){const t=Is(e);if(!ws(t))return Xl(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ms(t);let a=(i?ql(r.width):r.width)/n,l=(i?ql(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const _s=Xl(0);function Ds(e){const t=hs(e);return Ss()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_s}function Bs(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Is(e);let a=Xl(1);t&&(n?bs(n)&&(a=As(n)):a=As(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==hs(e))&&t}(i,r,n)?Ds(i):Xl(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=hs(i),t=n&&bs(n)?hs(n):n;let r=e,o=Ns(r);for(;o&&n&&t!==r;){const e=As(o),t=o.getBoundingClientRect(),n=Cs(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,r=hs(o),o=Ns(r)}}return cs({width:u,height:f,x:s,y:c})}function Fs(e,t){const r=zs(e).scrollLeft;return t?t.left+r:Bs(vs(e)).left+r}function Ws(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Fs(e,n)),y:n.top+t.scrollTop}}function Vs(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=hs(e),n=vs(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=Ss();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=vs(e),r=zs(e),n=e.ownerDocument.body,o=$l(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=$l(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Fs(e);const l=-r.scrollTop;return"rtl"===Cs(n).direction&&(a+=$l(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(vs(e));else if(bs(t))n=function(e,t){const r=Bs(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ws(e)?As(e):Xl(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Ds(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cs(n)}function Hs(e,t){const r=Rs(e);return!(r===t||!bs(r)||Ps(r))&&("fixed"===Cs(r).position||Hs(r,t))}function Us(e,t,r){const n=ws(t),o=vs(t),i="fixed"===r,a=Bs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Xl(0);if(n||!n&&!i)if(("body"!==ys(t)||xs(o))&&(l=zs(t)),n){const e=Bs(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Fs(o));const c=!o||n||i?Xl(0):Ws(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function Gs(e){return"static"===Cs(e).position}function $s(e,t){if(!ws(e)||"fixed"===Cs(e).position)return null;if(t)return t(e);let r=e.offsetParent;return vs(e)===r&&(r=r.ownerDocument.body),r}function qs(e,t){const r=hs(e);if(ks(e))return r;if(!ws(e)){let t=Rs(e);for(;t&&!Ps(t);){if(bs(t)&&!Gs(t))return t;t=Rs(t)}return r}let n=$s(e,t);for(;n&&js(n)&&Gs(n);)n=$s(n,t);return n&&Ps(n)&&Gs(n)&&!Es(n)?r:n||function(e){let t=Rs(e);for(;ws(t)&&!Ps(t);){if(Es(t))return t;if(ks(t))return null;t=Rs(t)}return null}(e)||r}const Ys={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=vs(n),l=!!t&&ks(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=Xl(1);const u=Xl(0),f=ws(n);if((f||!f&&!i)&&(("body"!==ys(n)||xs(a))&&(s=zs(n)),ws(n))){const e=Bs(n);c=As(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||f||i?Xl(0):Ws(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:vs,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?ks(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Ls(e,[],!1).filter((e=>bs(e)&&"body"!==ys(e))),o=null;const i="fixed"===Cs(e).position;let a=i?Rs(e):e;for(;bs(a)&&!Ps(a);){const t=Cs(a),r=Es(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||xs(a)&&!r&&Hs(e,a))?n=n.filter((e=>e!==a)):o=t,a=Rs(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=Vs(t,r,o);return e.top=$l(n.top,e.top),e.right=Gl(n.right,e.right),e.bottom=Gl(n.bottom,e.bottom),e.left=$l(n.left,e.left),e}),Vs(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:qs,getElementRects:async function(e){const t=this.getOffsetParent||qs,r=this.getDimensions,n=await r(e.floating);return{reference:Us(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Ms(e);return{width:t,height:r}},getScale:As,isElement:bs,isRTL:function(e){return"rtl"===Cs(e).direction}};function Xs(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Is(e),u=o||i?[...c?Ls(c):[],...Ls(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const f=c&&l?function(e,t){let r,n=null;const o=vs(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const d={rootMargin:-Yl(u)+"px "+-Yl(o.clientWidth-(c+f))+"px "+-Yl(o.clientHeight-(u+p))+"px "+-Yl(c)+"px",threshold:$l(0,Gl(1,s))||1};let g=!0;function y(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}g=!1}try{n=new IntersectionObserver(y,{...d,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,d)}n.observe(e)}(!0),i}(c,r):null;let p,d=-1,g=null;a&&(g=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),r()})),c&&!s&&g.observe(c),g.observe(t));let y=s?Bs(e):null;return s&&function t(){const n=Bs(e);!y||n.x===y.x&&n.y===y.y&&n.width===y.width&&n.height===y.height||r();y=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==f||f(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(p)}}const Ks=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=es(r),l=ts(r),s="y"===os(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=Ql(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof g&&(d="end"===l?-1*g:g),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Js=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=Ql(e,t),c={x:r,y:n},u=await fs(t,s),f=os(es(o)),p=rs(f);let d=c[p],g=c[f];if(i){const e="y"===p?"bottom":"right";d=Zl(d+u["y"===p?"top":"left"],d,d-u[e])}if(a){const e="y"===f?"bottom":"right";g=Zl(g+u["y"===f?"top":"left"],g,g-u[e])}const y=l.fn({...t,[p]:d,[f]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:i,[f]:a}}}}}},Zs=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...h}=Ql(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=es(o),m=os(l),b=es(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=p||(b||!y?[ls(l)]:function(e){const t=ls(e);return[as(e),t,as(t)]}(l)),x="none"!==g;!p&&x&&O.push(...function(e,t,r,n){const o=ts(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(es(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(as)))),i}(l,y,g,w));const j=[l,...O],k=await fs(t,h),E=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&E.push(k[v]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=ts(e),o=is(e),i=ns(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ls(a)),[a,ls(a)]}(o,a,w);E.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:E}],!E.every((e=>e<=0))){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let r=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!r)switch(d){case"bestFit":{var z;const e=null==(z=S.filter((e=>{if(x){const t=os(e.placement);return t===m||"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:z[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},Qs=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=Ql(e,t),u=await fs(t,c),f=es(o),p=ts(o),d="y"===os(o),{width:g,height:y}=i.floating;let h,v;"top"===f||"bottom"===f?(h=f,v=p===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,h="end"===p?"top":"bottom");const m=y-u.top-u.bottom,b=g-u.left-u.right,w=Gl(y-u[h],m),O=Gl(g-u[v],b),x=!t.middlewareData.shift;let j=w,k=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(j=m),x&&!p){const e=$l(u.left,0),t=$l(u.right,0),r=$l(u.top,0),n=$l(u.bottom,0);d?k=g-2*(0!==e||0!==t?e+t:$l(u.left,u.right)):j=y-2*(0!==r||0!==n?r+n:$l(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:j});const E=await a.getDimensions(l.floating);return g!==E.width||y!==E.height?{reset:{rects:!0}}:{}}}},ec=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ql(e,t);switch(n){case"referenceHidden":{const e=ps(await fs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ds(e)}}}case"escaped":{const e=ps(await fs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:ds(e)}}}default:return{}}}}},tc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=Ql(e,t)||{};if(null==c)return{};const f=ss(u),p={x:r,y:n},d=is(o),g=ns(d),y=await a.getDimensions(c),h="y"===d,v=h?"top":"left",m=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[d]-p[d]-i.floating[g],O=p[d]-i.reference[d],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=x?x[b]:0;j&&await(null==a.isElement?void 0:a.isElement(x))||(j=l.floating[b]||i.floating[g]);const k=w/2-O/2,E=j/2-y[g]/2-1,S=Gl(f[v],E),P=Gl(f[m],E),C=S,z=j-y[g]-P,R=j/2-y[g]/2+k,T=Zl(C,R,z),L=!s.arrow&&null!=ts(o)&&R!==T&&i.reference[g]/2-(R<C?S:P)-y[g]/2<0,N=L?R<C?R-C:R-z:0;return{[d]:p[d]+N,data:{[d]:T,centerOffset:R-T-N,...L&&{alignmentOffset:N}},reset:L}}}),rc=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Ql(e,t),u={x:r,y:n},f=os(o),p=rs(f);let d=u[p],g=u[f];const y=Ql(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+h.mainAxis,r=i.reference[p]+i.reference[e]-h.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,m;const e="y"===p?"width":"height",t=["top","left"].includes(es(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[f])||0)+(t?0:h.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[f])||0)-(t?h.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[p]:d,[f]:g}}}},nc=(e,t,r)=>{const n=new Map,o={platform:Ys,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=us(c,n,s),p=n,d={},g=0;for(let r=0;r<l.length;r++){const{name:i,fn:y}=l[r],{x:h,y:v,data:m,reset:b}=await y({x:u,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=v?v:f,d={...d,[i]:{...d[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=us(c,p,s))),r=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var oc="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function ic(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!ic(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ic(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ac(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lc(e,t){const r=ac(e);return Math.round(t*r)/r}function sc(e){const t=n.useRef(e);return oc((()=>{t.current=e})),t}const cc=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?tc({element:r.current,padding:n}).fn(t):{}:r?tc({element:r,padding:n}).fn(t):{};var o}}),uc=(e,t)=>({...Ks(e),options:[e,t]}),fc=(e,t)=>({...Js(e),options:[e,t]}),pc=(e,t)=>({...rc(e),options:[e,t]}),dc=(e,t)=>({...Zs(e),options:[e,t]}),gc=(e,t)=>({...Qs(e),options:[e,t]}),yc=(e,t)=>({...ec(e),options:[e,t]}),hc=(e,t)=>({...cc(e),options:[e,t]});var vc=n.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Ii.jsx(vl.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Ii.jsx("polygon",{points:"0,0 30,0 15,10"})})}));vc.displayName="Arrow";var mc=vc;function bc(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}var wc="Popper",[Oc,xc]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},bc(o,...t)]}(wc),[jc,kc]=Oc(wc),Ec=e=>{const{__scopePopper:t,children:r}=e,[o,i]=n.useState(null);return Ii.jsx(jc,{scope:t,anchor:o,onAnchorChange:i,children:r})};Ec.displayName=wc;var Sc="PopperAnchor",Pc=n.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:o,...i}=e,a=kc(Sc,r),l=n.useRef(null),s=Si(t,l);return n.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Ii.jsx(vl.div,{...i,ref:s})}));Pc.displayName=Sc;var Cc="PopperContent",[zc,Rc]=Oc(Cc),Tc=n.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:l="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:h,...v}=e,m=kc(Cc,r),[b,w]=n.useState(null),O=Si(t,(e=>w(e))),[x,j]=n.useState(null),k=function(e){const[t,r]=n.useState(void 0);return Fl((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}(x),E=k?.width??0,S=k?.height??0,P=i+("center"!==l?"-"+l:""),C="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},z=Array.isArray(f)?f:[f],R=z.length>0,T={padding:C,boundary:z.filter(Ic),altBoundary:R},{refs:L,floatingStyles:N,placement:M,isPositioned:I,middlewareData:A}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:a,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[p,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=n.useState(i);ic(g,i)||y(i);const[h,v]=n.useState(null),[m,b]=n.useState(null),w=n.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),O=n.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),x=l||h,j=s||m,k=n.useRef(null),E=n.useRef(null),S=n.useRef(p),P=null!=u,C=sc(u),z=sc(a),R=sc(f),T=n.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:t,strategy:r,middleware:g};z.current&&(e.platform=z.current),nc(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};L.current&&!ic(S.current,t)&&(S.current=t,o.flushSync((()=>{d(t)})))}))}),[g,t,r,z,R]);oc((()=>{!1===f&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[f]);const L=n.useRef(!1);oc((()=>(L.current=!0,()=>{L.current=!1})),[]),oc((()=>{if(x&&(k.current=x),j&&(E.current=j),x&&j){if(C.current)return C.current(x,j,T);T()}}),[x,j,T,C,P]);const N=n.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:O})),[w,O]),M=n.useMemo((()=>({reference:x,floating:j})),[x,j]),I=n.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=lc(M.floating,p.x),n=lc(M.floating,p.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...ac(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,M.floating,p.x,p.y]);return n.useMemo((()=>({...p,update:T,refs:N,elements:M,floatingStyles:I})),[p,T,N,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>Xs(...e,{animationFrame:"always"===y}),elements:{reference:m.anchor},middleware:[uc({mainAxis:a+S,alignmentAxis:s}),u&&fc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?pc():void 0,...T}),u&&dc({...T}),gc({...T,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&hc({element:x,padding:c}),Ac({arrowWidth:E,arrowHeight:S}),g&&yc({strategy:"referenceHidden",...T})]}),[_,D]=_c(M),B=ml(h);Fl((()=>{I&&B?.()}),[I,B]);const F=A.arrow?.x,W=A.arrow?.y,V=0!==A.arrow?.centerOffset,[H,U]=n.useState();return Fl((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Ii.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:I?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Ii.jsx(zc,{scope:r,placedSide:_,onArrowChange:j,arrowX:F,arrowY:W,shouldHideArrow:V,children:Ii.jsx(vl.div,{"data-side":_,"data-align":D,...v,ref:O,style:{...v.style,animation:I?void 0:"none"}})})})}));Tc.displayName=Cc;var Lc="PopperArrow",Nc={top:"bottom",right:"left",bottom:"top",left:"right"},Mc=n.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Rc(Lc,r),i=Nc[o.placedSide];return Ii.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Ii.jsx(mc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Ic(e){return null!==e}Mc.displayName=Lc;var Ac=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=_c(r),u={start:"0%",center:"50%",end:"100%"}[c],f=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2;let d="",g="";return"bottom"===s?(d=i?u:`${f}px`,g=-l+"px"):"top"===s?(d=i?u:`${f}px`,g=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",g=i?u:`${p}px`):"left"===s&&(d=`${n.floating.width+l}px`,g=i?u:`${p}px`),{data:{x:d,y:g}}}});function _c(e){const[t,r="center"]=e.split("-");return[t,r]}var Dc=Ec,Bc=Pc,Fc=Tc,Wc=Mc,Vc=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Fl((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Ii.jsx(vl.div,{...i,ref:r}),s):null}));Vc.displayName="Portal";var Hc=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=Uc(o.current);a.current="mounted"===s?e:"none"}),[s]),Fl((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=Uc(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Fl((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=Uc(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=Uc(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=Si(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?n.cloneElement(i,{ref:a}):null};function Uc(e){return e?.animationName||"none"}function Gc({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[o]=r,i=n.useRef(o),a=ml(t);return n.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,l=a?e:o,s=ml(r);return[l,n.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s])]}Hc.displayName="Presence";var $c=new WeakMap,qc=new WeakMap,Yc={},Xc=0,Kc=function(e){return e&&(e.host||Kc(e.parentNode))},Jc=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=Kc(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Yc[r]||(Yc[r]=new WeakMap);var i=Yc[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=($c.get(e)||0)+1,c=(i.get(e)||0)+1;$c.set(e,s),i.set(e,c),a.push(e),1===s&&o&&qc.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),Xc++,function(){a.forEach((function(e){var t=$c.get(e)-1,o=i.get(e)-1;$c.set(e,t),i.set(e,o),t||(qc.has(e)||e.removeAttribute(n),qc.delete(e)),o||e.removeAttribute(r)})),--Xc||($c=new WeakMap,$c=new WeakMap,qc=new WeakMap,Yc={})}},Zc=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Jc(n,o,r,"aria-hidden")):function(){return null}},Qc="right-scroll-bar-position",eu="width-before-scroll-bar";function tu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ru="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,nu=new WeakMap;function ou(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return tu(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return ru((function(){var e=nu.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||tu(e,null)})),n.forEach((function(e){r.has(e)||tu(e,o)}))}nu.set(a,t)}),[t]),a}function iu(e){return e}var au=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};au.isSideCarExport=!0;var lu=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=iu);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=i({async:!0,ssr:!1},e),t}(),su=function(){},cu=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:su,onWheelCapture:su,onTouchMoveCapture:su}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,p=e.removeScrollBar,d=e.enabled,g=e.shards,y=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=y,k=ou([r,t]),E=i(i({},x),l);return n.createElement(n.Fragment,null,d&&n.createElement(j,{sideCar:lu,removeScrollBar:p,shards:g,noIsolation:h,inert:v,setCallbacks:s,allowPinchZoom:!!m,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},E),{ref:k})):n.createElement(w,i({},E,{className:f,ref:k}),u))}));cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cu.classNames={fullWidth:eu,zeroRight:Qc};function uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var fu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=uu())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pu=function(){var e,t=(e=fu(),function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},du={left:0,top:0,right:0,gap:0},gu=function(e){return parseInt(e||"",10)||0},yu=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return du;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[gu(r),gu(n),gu(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},hu=pu(),vu="data-scroll-locked",mu=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(vu,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Qc," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(eu," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Qc," .").concat(Qc," {\n right: 0 ").concat(n,";\n }\n \n .").concat(eu," .").concat(eu," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(vu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},bu=function(){var e=parseInt(document.body.getAttribute(vu)||"0",10);return isFinite(e)?e:0},wu=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(vu,(bu()+1).toString()),function(){var e=bu()-1;e<=0?document.body.removeAttribute(vu):document.body.setAttribute(vu,e.toString())}}),[]);var a=n.useMemo((function(){return yu(i)}),[i]);return n.createElement(hu,{styles:mu(a,!t,i,r?"":"!important")})},Ou=!1;if("undefined"!=typeof window)try{var xu=Object.defineProperty({},"passive",{get:function(){return Ou=!0,!0}});window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch(e){Ou=!1}var ju=!!Ou&&{passive:!1},ku=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},Eu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Su(e,n)){var o=Pu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Su=function(e,t){return"v"===e?function(e){return ku(e,"overflowY")}(t):function(e){return ku(e,"overflowX")}(t)},Pu=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zu=function(e){return[e.deltaX,e.deltaY]},Ru=function(e){return e&&"current"in e?e.current:e},Tu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Lu=0,Nu=[];function Mu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Iu,Au=(Iu=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Lu++)[0],a=n.useState(pu)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(Ru),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=Cu(e),a=r.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var p=Eu(f,u);if(!p)return!0;if(p?n=f:(n="v"===f?"h":"v",p=Eu(f,u)),!p)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var d=o.current||n;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,p=0;do{var d=Pu(e,l),g=d[0],y=d[1]-d[2]-i*g;(g||y)&&Su(e,l)&&(f+=y,p+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(p)<1)&&o||(c=!0),c}(d,t,e,"h"===d?s:c,!0)}),[]),u=n.useCallback((function(e){var r=e;if(Nu.length&&Nu[Nu.length-1]===a){var n="deltaY"in r?zu(r):Cu(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Ru).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Mu(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),p=n.useCallback((function(e){r.current=Cu(e),o.current=void 0}),[]),d=n.useCallback((function(t){f(t.type,zu(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,Cu(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return Nu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ju),document.addEventListener("touchmove",u,ju),document.addEventListener("touchstart",p,ju),function(){Nu=Nu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,ju),document.removeEventListener("touchmove",u,ju),document.removeEventListener("touchstart",p,ju)}}),[]);var y=e.removeScrollBar,h=e.inert;return n.createElement(n.Fragment,null,h?n.createElement(a,{styles:Tu(i)}):null,y?n.createElement(wu,{gapMode:e.gapMode}):null)},lu.useMedium(Iu),au),_u=n.forwardRef((function(e,t){return n.createElement(cu,i({},e,{ref:t,sideCar:Au}))}));_u.classNames=cu.classNames;var Du="Popover",[Bu,Fu]=yl(Du,[xc]),Wu=xc(),[Vu,Hu]=Bu(Du),Uu=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,s=Wu(t),c=n.useRef(null),[u,f]=n.useState(!1),[p=!1,d]=Gc({prop:o,defaultProp:i,onChange:a});return Ii.jsx(Dc,{...s,children:Ii.jsx(Vu,{scope:t,contentId:Hl(),triggerRef:c,open:p,onOpenChange:d,onOpenToggle:n.useCallback((()=>d((e=>!e))),[d]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:n.useCallback((()=>f(!1)),[]),modal:l,children:r})})};Uu.displayName=Du;var Gu="PopoverAnchor";n.forwardRef(((e,t)=>{const{__scopePopover:r,...o}=e,i=Hu(Gu,r),a=Wu(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return n.useEffect((()=>(l(),()=>s())),[l,s]),Ii.jsx(Bc,{...a,...o,ref:t})})).displayName=Gu;var $u="PopoverTrigger",qu=n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Hu($u,r),i=Wu(r),a=Si(t,o.triggerRef),l=Ii.jsx(vl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":of(o.open),...n,ref:a,onClick:gl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Ii.jsx(Bc,{asChild:!0,...i,children:l})}));qu.displayName=$u;var Yu="PopoverPortal",[Xu,Ku]=Bu(Yu,{forceMount:void 0}),Ju=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Hu(Yu,t);return Ii.jsx(Xu,{scope:t,forceMount:r,children:Ii.jsx(Hc,{present:r||i.open,children:Ii.jsx(Vc,{asChild:!0,container:o,children:n})})})};Ju.displayName=Yu;var Zu="PopoverContent",Qu=n.forwardRef(((e,t)=>{const r=Ku(Zu,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Hu(Zu,e.__scopePopover);return Ii.jsx(Hc,{present:n||i.open,children:i.modal?Ii.jsx(ef,{...o,ref:t}):Ii.jsx(tf,{...o,ref:t})})}));Qu.displayName=Zu;var ef=n.forwardRef(((e,t)=>{const r=Hu(Zu,e.__scopePopover),o=n.useRef(null),i=Si(t,o),a=n.useRef(!1);return n.useEffect((()=>{const e=o.current;if(e)return Zc(e)}),[]),Ii.jsx(_u,{as:Ai,allowPinchZoom:!0,children:Ii.jsx(rf,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gl(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:gl(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:gl(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),tf=n.forwardRef(((e,t)=>{const r=Hu(Zu,e.__scopePopover),o=n.useRef(!1),i=n.useRef(!1);return Ii.jsx(rf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),rf=n.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...f}=e,p=Hu(Zu,r),d=Wu(r);return Cl(),Ii.jsx(Nl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Ii.jsx(kl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:Ii.jsx(Fc,{"data-state":of(p.open),role:"dialog",id:p.contentId,...d,...f,ref:t,style:{...f.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)"}})})})})),nf="PopoverClose";n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Hu(nf,r);return Ii.jsx(vl.button,{type:"button",...n,ref:t,onClick:gl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=nf;function of(e){return e?"open":"closed"}n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Wu(r);return Ii.jsx(Wc,{...o,...n,ref:t})})).displayName="PopoverArrow";var af=Ju,lf=Qu,sf=Uu,cf=qu,uf=n.forwardRef((function(e,t){var r=e.className,o=e.align,l=void 0===o?"center":o,s=e.sideOffset,c=void 0===s?4:s,u=a(e,["className","align","sideOffset"]);return n.createElement(af,null,n.createElement(lf,i({ref:t,align:l,sideOffset:c,className:li("z-50 w-72 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",r)},u)))}));function ff(e,[t,r]){return Math.min(r,Math.max(t,e))}function pf(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}uf.displayName=lf.displayName;var df=n.createContext(void 0);var gf=n.forwardRef(((e,t)=>Ii.jsx(vl.span,{...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}})));gf.displayName="VisuallyHidden";var yf=[" ","Enter","ArrowUp","ArrowDown"],hf=[" ","Enter"],vf="Select",[mf,bf,wf]=function(t){const r=t+"CollectionProvider",[o,i]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},pf(o,...t)]}(r),[a,l]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:r,children:n}=t,o=e.useRef(null),i=e.useRef(new Map).current;return Ii.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=r;const c=t+"CollectionSlot",u=e.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Si(t,l(c,r).collectionRef);return Ii.jsx(Ai,{ref:o,children:n})}));u.displayName=c;const f=t+"CollectionItemSlot",p="data-radix-collection-item",d=e.forwardRef(((t,r)=>{const{scope:n,children:o,...i}=t,a=e.useRef(null),s=Si(r,a),c=l(f,n);return e.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Ii.jsx(Ai,{[p]:"",ref:s,children:o})}));return d.displayName=f,[{Provider:s,Slot:u,ItemSlot:d},function(r){const n=l(t+"CollectionConsumer",r);return e.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(vf),[Of,xf]=yl(vf,[wf,xc]),jf=xc(),[kf,Ef]=Of(vf),[Sf,Pf]=Of(vf),Cf=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:d,required:g,form:y}=e,h=jf(t),[v,m]=n.useState(null),[b,w]=n.useState(null),[O,x]=n.useState(!1),j=function(e){const t=n.useContext(df);return e||t||"ltr"}(u),[k=!1,E]=Gc({prop:o,defaultProp:i,onChange:a}),[S,P]=Gc({prop:l,defaultProp:s,onChange:c}),C=n.useRef(null),z=!v||(y||!!v.closest("form")),[R,T]=n.useState(new Set),L=Array.from(R).map((e=>e.props.value)).join(";");return Ii.jsx(Dc,{...h,children:Ii.jsxs(kf,{required:g,scope:t,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Hl(),value:S,onValueChange:P,open:k,onOpenChange:E,dir:j,triggerPointerDownPosRef:C,disabled:d,children:[Ii.jsx(mf.Provider,{scope:t,children:Ii.jsx(Sf,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:n.useCallback((e=>{T((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:r})}),z?Ii.jsxs(gp,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:S,onChange:e=>P(e.target.value),disabled:d,form:y,children:[void 0===S?Ii.jsx("option",{value:""}):null,Array.from(R)]},L):null]})})};Cf.displayName=vf;var zf="SelectTrigger",Rf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,a=jf(r),l=Ef(zf,r),s=l.disabled||o,c=Si(t,l.onTriggerChange),u=bf(r),f=n.useRef("touch"),[p,d,g]=yp((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=hp(t,e,r);void 0!==n&&l.onValueChange(n.value)})),y=e=>{s||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return Ii.jsx(Bc,{asChild:!0,...a,children:Ii.jsx(vl.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":dp(l.value)?"":void 0,...i,ref:c,onClick:gl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&y(e)})),onPointerDown:gl(i.onPointerDown,(e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())})),onKeyDown:gl(i.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||yf.includes(e.key)&&(y(),e.preventDefault())}))})})}));Rf.displayName=zf;var Tf="SelectValue",Lf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=Ef(Tf,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Si(t,s.onValueNodeChange);return Fl((()=>{c(u)}),[c,u]),Ii.jsx(vl.span,{...l,ref:f,style:{pointerEvents:"none"},children:dp(s.value)?Ii.jsx(Ii.Fragment,{children:a}):i})}));Lf.displayName=Tf;var Nf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Ii.jsx(vl.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Nf.displayName="SelectIcon";var Mf=e=>Ii.jsx(Vc,{asChild:!0,...e});Mf.displayName="SelectPortal";var If="SelectContent",Af=n.forwardRef(((e,t)=>{const r=Ef(If,e.__scopeSelect),[i,a]=n.useState();if(Fl((()=>{a(new DocumentFragment)}),[]),!r.open){const t=i;return t?o.createPortal(Ii.jsx(Df,{scope:e.__scopeSelect,children:Ii.jsx(mf.Slot,{scope:e.__scopeSelect,children:Ii.jsx("div",{children:e.children})})}),t):null}return Ii.jsx(Ff,{...e,ref:t})}));Af.displayName=If;var _f=10,[Df,Bf]=Of(If),Ff=n.forwardRef(((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v,...m}=e,b=Ef(If,r),[w,O]=n.useState(null),[x,j]=n.useState(null),k=Si(t,(e=>O(e))),[E,S]=n.useState(null),[P,C]=n.useState(null),z=bf(r),[R,T]=n.useState(!1),L=n.useRef(!1);n.useEffect((()=>{if(w)return Zc(w)}),[w]),Cl();const N=n.useCallback((e=>{const[t,...r]=z().map((e=>e.ref.current)),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&x&&(x.scrollTop=0),r===n&&x&&(x.scrollTop=x.scrollHeight),r?.focus(),document.activeElement!==o)return}}),[z,x]),M=n.useCallback((()=>N([E,w])),[N,E,w]);n.useEffect((()=>{R&&M()}),[R,M]);const{onOpenChange:I,triggerPointerDownPosRef:A}=b;n.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(A.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():w.contains(r.target)||I(!1),document.removeEventListener("pointermove",t),A.current=null};return null!==A.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}}),[w,I,A]),n.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[_,D]=yp((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=hp(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(L.current=!0))}),[b.value]),F=n.useCallback((()=>w?.focus()),[w]),W=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Vf:Wf,H=V===Vf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v}:{};return Ii.jsx(Df,{scope:r,content:w,viewport:x,onViewportChange:j,itemRefCallback:B,selectedItem:E,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:R,searchRef:_,children:Ii.jsx(_u,{as:Ai,allowPinchZoom:!0,children:Ii.jsx(Nl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:gl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Ii.jsx(kl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Ii.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:gl(m.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||D(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().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 r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout((()=>N(t))),e.preventDefault()}}))})})})})})}));Ff.displayName="SelectContentImpl";var Wf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,a=Ef(If,r),l=Bf(If,r),[s,c]=n.useState(null),[u,f]=n.useState(null),p=Si(t,(e=>f(e))),d=bf(r),g=n.useRef(!1),y=n.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=n.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&h&&v&&m){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=m.getBoundingClientRect();if("rtl"!==a.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-_f,f=ff(i,[_f,Math.max(_f,u-c)]);s.style.minWidth=l+"px",s.style.left=f+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-_f,f=ff(i,[_f,Math.max(_f,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=d(),l=window.innerHeight-2*_f,c=h.scrollHeight,f=window.getComputedStyle(u),p=parseInt(f.borderTopWidth,10),y=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),w=p+y+c+parseInt(f.paddingBottom,10)+b,O=Math.min(5*v.offsetHeight,w),x=window.getComputedStyle(h),j=parseInt(x.paddingTop,10),k=parseInt(x.paddingBottom,10),E=e.top+e.height/2-_f,S=l-E,P=v.offsetHeight/2,C=p+y+(v.offsetTop+P),z=w-C;if(C<=E){const e=i.length>0&&v===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-h.offsetTop-h.offsetHeight,r=C+Math.max(S,P+(e?k:0)+t+b);s.style.height=r+"px"}else{const e=i.length>0&&v===i[0].ref.current;s.style.top="0px";const t=Math.max(E,p+h.offsetTop+(e?j:0)+P)+z;s.style.height=t+"px",h.scrollTop=C-E+h.offsetTop}s.style.margin=`${_f}px 0`,s.style.minHeight=O+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame((()=>g.current=!0))}}),[d,a.trigger,a.valueNode,s,u,h,v,m,a.dir,o]);Fl((()=>w()),[w]);const[O,x]=n.useState();Fl((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const j=n.useCallback((e=>{e&&!0===y.current&&(w(),b?.(),y.current=!1)}),[w,b]);return Ii.jsx(Hf,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:Ii.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Ii.jsx(vl.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Wf.displayName="SelectItemAlignedPosition";var Vf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=_f,...i}=e,a=jf(r);return Ii.jsx(Fc,{...a,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Vf.displayName="SelectPopperPosition";var[Hf,Uf]=Of(If,{}),Gf="SelectViewport",$f=n.forwardRef(((e,t)=>{const{__scopeSelect:r,nonce:o,...i}=e,a=Bf(Gf,r),l=Uf(Gf,r),s=Si(t,a.onViewportChange),c=n.useRef(0);return Ii.jsxs(Ii.Fragment,{children:[Ii.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),Ii.jsx(mf.Slot,{scope:r,children:Ii.jsx(vl.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:gl(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=l;if(n?.current&&r){const e=Math.abs(c.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*_f,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));$f.displayName=Gf;var qf="SelectGroup",[Yf,Xf]=Of(qf);n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Hl();return Ii.jsx(Yf,{scope:r,id:o,children:Ii.jsx(vl.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=qf;var Kf="SelectLabel",Jf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Xf(Kf,r);return Ii.jsx(vl.div,{id:o.id,...n,ref:t})}));Jf.displayName=Kf;var Zf="SelectItem",[Qf,ep]=Of(Zf),tp=n.forwardRef(((e,t)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...l}=e,s=Ef(Zf,r),c=Bf(Zf,r),u=s.value===o,[f,p]=n.useState(a??""),[d,g]=n.useState(!1),y=Si(t,(e=>c.itemRefCallback?.(e,o,i))),h=Hl(),v=n.useRef("touch"),m=()=>{i||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)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 Ii.jsx(Qf,{scope:r,value:o,disabled:i,textId:h,isSelected:u,onItemTextChange:n.useCallback((e=>{p((t=>t||(e?.textContent??"").trim()))}),[]),children:Ii.jsx(mf.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:Ii.jsx(vl.div,{role:"option","aria-labelledby":h,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:y,onFocus:gl(l.onFocus,(()=>g(!0))),onBlur:gl(l.onBlur,(()=>g(!1))),onClick:gl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:gl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:gl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:gl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:gl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:gl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(hf.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));tp.displayName=Zf;var rp="SelectItemText",np=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:i,style:a,...l}=e,s=Ef(rp,r),c=Bf(rp,r),u=ep(rp,r),f=Pf(rp,r),[p,d]=n.useState(null),g=Si(t,(e=>d(e)),u.onItemTextChange,(e=>c.itemTextRefCallback?.(e,u.value,u.disabled))),y=p?.textContent,h=n.useMemo((()=>Ii.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value)),[u.disabled,u.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:m}=f;return Fl((()=>(v(h),()=>m(h))),[v,m,h]),Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(vl.span,{id:u.textId,...l,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?o.createPortal(l.children,s.valueNode):null]})}));np.displayName=rp;var op="SelectItemIndicator",ip=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return ep(op,r).isSelected?Ii.jsx(vl.span,{"aria-hidden":!0,...n,ref:t}):null}));ip.displayName=op;var ap="SelectScrollUpButton",lp=n.forwardRef(((e,t)=>{const r=Bf(ap,e.__scopeSelect),o=Uf(ap,e.__scopeSelect),[i,a]=n.useState(!1),l=Si(t,o.onScrollButtonChange);return Fl((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Ii.jsx(up,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));lp.displayName=ap;var sp="SelectScrollDownButton",cp=n.forwardRef(((e,t)=>{const r=Bf(sp,e.__scopeSelect),o=Uf(sp,e.__scopeSelect),[i,a]=n.useState(!1),l=Si(t,o.onScrollButtonChange);return Fl((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Ii.jsx(up,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));cp.displayName=sp;var up=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,a=Bf("SelectScrollButton",r),l=n.useRef(null),s=bf(r),c=n.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return n.useEffect((()=>()=>c()),[c]),Fl((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Ii.jsx(vl.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:gl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:gl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:gl(i.onPointerLeave,(()=>{c()}))})})),fp=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Ii.jsx(vl.div,{"aria-hidden":!0,...n,ref:t})}));fp.displayName="SelectSeparator";var pp="SelectArrow";function dp(e){return""===e||void 0===e}n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=jf(r),i=Ef(pp,r),a=Bf(pp,r);return i.open&&"popper"===a.position?Ii.jsx(Wc,{...o,...n,ref:t}):null})).displayName=pp;var gp=n.forwardRef(((e,t)=>{const{value:r,...o}=e,i=n.useRef(null),a=Si(t,i),l=function(e){const t=n.useRef({value:e,previous:e});return n.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(r);return n.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),Ii.jsx(gf,{asChild:!0,children:Ii.jsx("select",{...o,ref:a,defaultValue:r})})}));function yp(e){const t=ml(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback((e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(n)}),[t]),a=n.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return n.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function hp(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===n.length&&(i=i.filter((e=>e!==r)));const s=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return s!==r?s:void 0}gp.displayName="BubbleSelect";var vp=Rf,mp=Nf,bp=Mf,wp=Af,Op=$f,xp=Jf,jp=tp,kp=np,Ep=ip,Sp=lp,Pp=cp,Cp=fp,zp=Cf,Rp=Lf,Tp=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(vp,i({ref:t,className:li("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r)},l),o,n.createElement(mp,{asChild:!0},n.createElement(mi,{className:"h-4 w-4 opacity-50"})))}));Tp.displayName=vp.displayName;var Lp=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Sp,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(Oi,{className:"h-4 w-4"}))}));Lp.displayName=Sp.displayName;var Np=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Pp,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(mi,{className:"h-4 w-4"}))}));Np.displayName=Pp.displayName;var Mp=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=e.position,s=void 0===l?"popper":l,c=a(e,["className","children","position"]);return n.createElement(bp,null,n.createElement(wp,i({ref:t,className:li("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s},c),n.createElement(Lp,null),n.createElement(Op,{className:li("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),n.createElement(Np,null)))}));Mp.displayName=wp.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(xp,i({ref:t,className:li("px-2 py-1.5 text-sm font-semibold",r)},o))})).displayName=xp.displayName;var Ip=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(jp,i({ref:t,className:li("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r)},l),n.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},n.createElement(Ep,null,n.createElement(vi,{className:"h-4 w-4"}))),n.createElement(kp,null,o))}));function Ap(e){var t=e.className,r=e.dateFrom,o=e.dateTo,i=e.handleDateChange,a=n.useState({from:r||new Date(2022,0,20),to:o||g(new Date(2022,0,20),20)}),l=a[0],s=a[1],c=[{label:"Hier",getValue:function(){var e=new Date;return e.setDate(e.getDate()-1),{from:e,to:e}}},{label:"Cette semaine",getValue:function(){var e=new Date;return{from:m(e),to:A(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:N(e),to:L(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return y(e,-t,r)}(new Date,1);return{from:N(e),to:L(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:I(e),to:M(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return S(e,-t,r)}(new Date,1);return{from:I(e),to:M(e)}}}];return n.createElement("div",{className:li("grid gap-2",t)},n.createElement(sf,null,n.createElement(cf,{asChild:!0},n.createElement(Vi,{id:"date",variant:"outline",className:li("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},n.createElement(hi,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?n.createElement(n.Fragment,null,we(l.from,"LLL dd, y")," -"," ",we(l.to,"LLL dd, y")):we(l.from,"LLL dd, y"):n.createElement("span",null,"Choisissez une date"))),n.createElement(uf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},n.createElement(zp,{onValueChange:function(e){var t=c.find((function(t){return t.label===e}));if(t){var r=t.getValue();s(r),null==i||i(r)}}},n.createElement(Tp,{className:"w-[300px]"},n.createElement(Rp,{placeholder:"Sélectionnez un préréglage"})),n.createElement(Mp,{position:"popper"},c.map((function(e){return n.createElement(Ip,{key:e.label,value:e.label},e.label)})))),n.createElement("div",{className:"rounded-md border"},n.createElement(dl,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Ip.displayName=jp.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Cp,i({ref:t,className:li("-mx-1 my-1 h-px bg-muted",r)},o))})).displayName=Cp.displayName;var _p=n.forwardRef((function(e,t){var r=e.className,o=e.type,l=a(e,["className","type"]);return n.createElement("input",i({type:o,className:li("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t},l))}));function Dp(t){var r=this,o=t.title,a=t.filters,c=t.setFilters,u=t.configFilters,f=t.onSearch,p=t.count,d=t.isLoading,g=t.setCurrentPage,y=n.useState(a),h=y[0],v=y[1],m=e.useState(!1),b=m[0],w=m[1],O=n.useMemo((function(){return JSON.stringify(h)!==JSON.stringify(a)}),[h,a]),x=function(){return l(r,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return v(a),O?[4,g(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return f(),[2]}}))}))};return n.createElement("div",{className:"flex flex-col gap-2"},n.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(0, 137, 149)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"inline-block mr-2"},n.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),n.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),n.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),n.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),n.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),n.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),o,n.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},p)),n.createElement("div",{className:"border-b border-gray-100 mb-4"}),n.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},n.createElement(Ap,{dateFrom:a.fromDate,dateTo:a.toDate,handleDateChange:function(e){c(i(i({},a),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),u&&u.map((function(t,r){return n.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&n.createElement(_p,{type:"text",placeholder:t.placeholder,value:a[t.name],onChange:function(e){var r;return c(i(i({},a),((r={})[t.name]=e.target.value,r)))},onKeyDown:function(e){"Enter"===e.key&&x()}}),"Select"===t.type&&n.createElement(zp,{disabled:t.disabled||0===t.options.length,value:a[t.name],onValueChange:function(e){var r;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}},n.createElement(Tp,null,n.createElement(Rp,{placeholder:t.placeholder})),n.createElement(Mp,null,e.useMemo((function(){return t.options.map((function(e,t){return n.createElement(Ip,{key:"".concat(e.VALUE,"-").concat(t),value:e.VALUE||"_empty"},e.NAME)}))}),[t.options]))))})),n.createElement("div",{className:"flex gap-2 ml-auto"},u.some((function(e){return"Export"===e.type}))&&n.createElement(Vi,{disabled:b,onClick:function(){return l(r,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return w(!0),e=u.find((function(e){return"Export"===e.type})),[4,(i=null==e?void 0:e.ctx,l(r,void 0,void 0,(function(){var e,t,r,n,l,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(i),t=0,r=Object.entries(a);t<r.length;t++){var n=r[t],o=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===o||"toDate"===o){var s=new Date(l);e+="&".concat(o,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(o,"=").concat(l)}}return e}())];case 1:if(!(e=s.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=s.sent(),r=window.URL.createObjectURL(t),(n=document.createElement("a")).href=r,l="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),n.download=l,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n),[3,4];case 3:return c=s.sent(),console.error("Export error:",c),[3,4];case 4:return[2]}}))})))];case 1:return n.sent(),t=setInterval((function(){w(!1),clearInterval(t)}),3e4),[2]}var i}))}))},size:"sm"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.createElement("polyline",{points:"7 10 12 15 17 10"}),n.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),n.createElement(Vi,{size:"sm",onClick:x,disabled:d},O?n.createElement(n.Fragment,null,n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("circle",{cx:"11",cy:"11",r:"8"}),n.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):n.createElement(n.Fragment,null,n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"reload-icon","aria-hidden":"true"},n.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),n.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
26
|
+
*/function Ei(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Si(...e){return n.useCallback(Ei(...e),e)}function Pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ci,zi={exports:{}},Ri={};var Ti,Li,Ni={};function Mi(){return Ti||(Ti=1,"production"!==Qe.env.NODE_ENV&&function(){var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator;var h=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var m;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return b(e)+".Consumer";case l:return b(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case d:var r=e,g=r._payload,y=r._init;try{return w(y(g))}catch(e){return null}}return null}m=Symbol.for("react.module.reference");var O,x,j,k,E,S,P,C=Object.assign,z=0;function R(){}R.__reactDisabledLog=!0;var T,L=h.ReactCurrentDispatcher;function N(e,t,r){if(void 0===T)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return"\n"+T+e}var M,I=!1,A="function"==typeof WeakMap?WeakMap:Map;function _(e,t){if(!e||I)return"";var r,n=M.get(e);if(void 0!==n)return n;I=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=L.current,L.current=null,function(){if(0===z){O=console.log,x=console.info,j=console.warn,k=console.error,E=console.group,S=console.groupCollapsed,P=console.groupEnd;var e={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=r.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{I=!1,L.current=o,function(){if(0==--z){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:O}),info:C({},e,{value:x}),warn:C({},e,{value:j}),error:C({},e,{value:k}),group:C({},e,{value:E}),groupCollapsed:C({},e,{value:S}),groupEnd:C({},e,{value:P})})}z<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?N(p):"";return"function"==typeof e&&M.set(e,d),d}function D(e,t,r){if(null==e)return"";if("function"==typeof e)return _(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return N(e);switch(e){case u:return N("Suspense");case f:return N("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return _(e.render,!1);case p:return D(e.type,t,r);case d:var n=e,o=n._payload,i=n._init;try{return D(i(o),t,r)}catch(e){}}return""}M=new A;var B=Object.prototype.hasOwnProperty,F={},W=h.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);W.setExtraStackFrame(r)}else W.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function G(e){return""+e}function $(e){if(function(e){try{return G(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),G(e)}var q,Y,X,K=h.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};X={};function Z(e,t,n,o,i){var a,l={},s=null,c=null;for(a in void 0!==n&&($(n),s=""+n),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&($(t.key),s=""+t.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&K.current&&t&&K.current.stateNode!==t){var r=w(K.current.type);X[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(K.current.type),e.ref),X[r]=!0)}}(t,i)),t)B.call(t,a)&&!J.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){q||(q=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(l,f),c&&function(e,t){var r=function(){Y||(Y=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(l,f)}return function(e,t,n,o,i,a,l){var s={$$typeof:r,type:e,key:t,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,K.current,l)}var Q,ee=h.ReactCurrentOwner,te=h.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=D(e.type,e._source,t?t.type:null);te.setExtraStackFrame(r)}else te.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=w(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ie[r]){ie[r]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&ae(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=y&&e[y]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ne(i.value)&&ae(i.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==p)return;t=r.propTypes}if(t){var n=w(r);!function(e,t,r,n,o){var i=Function.call.bind(B);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof l),V(null)),l instanceof Error&&!(l.message in F)&&(F[l.message]=!0,V(o),v("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ce={};function ue(e,t,n,y,h,b){var O=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||void 0!==e.getModuleId)}(e);if(!O){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var j;x+=oe(),null===e?j="null":U(e)?j="array":void 0!==e&&e.$$typeof===r?(j="<"+(w(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,x)}var k=Z(e,t,n,h,b);if(null==k)return k;if(O){var E=t.children;if(void 0!==E)if(y)if(U(E)){for(var S=0;S<E.length;S++)le(E[S],e);Object.freeze&&Object.freeze(E)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(E,e)}if(B.call(t,"key")){var P=w(e),C=Object.keys(t).filter((function(e){return"key"!==e})),z=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+z])v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',z,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+z]=!0}return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(k):se(k),k}var fe=function(e,t,r){return ue(e,t,r,!1)},pe=function(e,t,r){return ue(e,t,r,!0)};Ni.Fragment=o,Ni.jsx=fe,Ni.jsxs=pe}()),Ni}var Ii=(Li||(Li=1,"production"===Qe.env.NODE_ENV?zi.exports=function(){if(Ci)return Ri;Ci=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var l,s={},c=null,u=null;for(l in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,l)&&!a.hasOwnProperty(l)&&(s[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps)void 0===s[l]&&(s[l]=t[l]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}return Ri.Fragment=n,Ri.jsx=l,Ri.jsxs=l,Ri}():zi.exports=Mi()),zi.exports),Ai=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Bi);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Ii.jsx(_i,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Ii.jsx(_i,{...o,ref:t,children:r})}));Ai.displayName="Slot";var _i=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return n.cloneElement(r,{...Fi(o,r.props),ref:t?Ei(t,e):e})}return n.Children.count(r)>1?n.Children.only(null):null}));_i.displayName="SlotClone";var Di=({children:e})=>Ii.jsx(Ii.Fragment,{children:e});function Bi(e){return n.isValidElement(e)&&e.type===Di}function Fi(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}var Wi=go("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Vi=n.forwardRef((function(e,t){var r=e.className,o=e.variant,l=e.size,s=e.asChild,c=void 0!==s&&s,u=a(e,["className","variant","size","asChild"]),f=c?Ai:"button";return n.createElement(f,i({className:li(Wi({variant:o,size:l,className:r})),ref:t},u))}));Vi.displayName="Button";var Hi=function(){return Hi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Hi.apply(this,arguments)};function Ui(e,t,r){for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Gi(e){return"multiple"===e.mode}function $i(e){return"range"===e.mode}function qi(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Yi={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var Xi=Object.freeze({__proto__:null,formatCaption:function(e,t){return we(e,"LLLL y",t)},formatDay:function(e,t){return we(e,"d",t)},formatMonthCaption:function(e,t){return we(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return we(e,"cccccc",t)},formatYearCaption:function(e,t){return we(e,"yyyy",t)}}),Ki=Object.freeze({__proto__:null,labelDay:function(e,t,r){return we(e,"do MMMM (EEEE)",r)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return we(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Ji=e.createContext(void 0);function Zi(e){var t,r,n,o,i,a=e.initialProps,l=(r=Yi,n=q,o=new Date,{captionLayout:"buttons",classNames:r,formatters:Xi,labels:Ki,locale:n,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),s=function(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return n?i=N(n):t&&(i=new Date(t,0,1)),o?a=L(o):r&&(a=new Date(r,11,31)),{fromDate:i?j(i):void 0,toDate:a?j(a):void 0}}(a),c=s.fromDate,u=s.toDate,f=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===f||c&&u||(f="buttons"),(qi(a)||Gi(a)||$i(a))&&(i=a.onSelect);var p=Hi(Hi(Hi({},l),a),{captionLayout:f,classNames:Hi(Hi({},l.classNames),a.classNames),components:Hi({},a.components),formatters:Hi(Hi({},l.formatters),a.formatters),fromDate:c,labels:Hi(Hi({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Hi(Hi({},l.modifiers),a.modifiers),modifiersClassNames:Hi(Hi({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Hi(Hi({},l.styles),a.styles),toDate:u});return Ii.jsx(Ji.Provider,{value:p,children:e.children})}function Qi(){var t=e.useContext(Ji);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function ea(e){var t=Qi(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Ii.jsx("div",{className:n.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function ta(e){return Ii.jsx("svg",Hi({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Ii.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ra(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=Qi(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ta;return Ii.jsxs("div",{className:l,style:s,children:[Ii.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Ii.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Ii.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Ii.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function na(e){var t,r=Qi(),n=r.fromDate,o=r.toDate,i=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,s=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!n)return Ii.jsx(Ii.Fragment,{});if(!o)return Ii.jsx(Ii.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=x(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var p=N(n),d=n.getMonth();d<=o.getMonth();d++)f.push(Pe(p,d));else for(p=N(new Date),d=0;d<=11;d++)f.push(Pe(p,d));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ra;return Ii.jsx(g,{name:"months","aria-label":u(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var r=Number(t.target.value),n=Pe(N(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Ii.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function oa(e){var t,r=e.displayMonth,n=Qi(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,p=[];if(!o)return Ii.jsx(Ii.Fragment,{});if(!i)return Ii.jsx(Ii.Fragment,{});for(var d=o.getFullYear(),g=i.getFullYear(),y=d;y<=g;y++)p.push(Ce(I(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ra;return Ii.jsx(h,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ce(N(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:p.map((function(e){return Ii.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function ia(){var t=Qi(),r=function(e){var t=e.month,r=e.defaultMonth,n=e.today,o=t||r||n||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&T(i,o)<0&&(o=y(i,-1*(s-1))),a&&T(o,a)<0&&(o=a),N(o)}(t),n=function(t,r){var n=e.useState(t),o=n[0];return[void 0===r?o:r,n[1]]}(r,t.month),o=n[0],i=n[1];return[o,function(e){var r;if(!t.disableNavigation){var n=N(e);i(n),null===(r=t.onMonthChange)||void 0===r||r.call(t,n)}}]}var aa=e.createContext(void 0);function la(e){var t=Qi(),r=ia(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=N(e),i=T(N(y(o,n)),o),a=[],l=0;l<i;l++){var s=y(o,l);a.push(s)}return r&&(a=a.reverse()),a}(n,t),a=function(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=n?i:1,l=N(e);if(!r)return y(l,a);if(!(T(r,e)<i))return y(l,a)}}(n,t),l=function(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,o=t.numberOfMonths,i=n?void 0===o?1:o:1,a=N(e);if(!r)return y(a,-i);if(!(T(a,r)<=0))return y(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Ee(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&ke(e,r)?o(y(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Ii.jsx(aa.Provider,{value:c,children:e.children})}function sa(){var t=e.useContext(aa);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function ca(e){var t,r=Qi(),n=r.classNames,o=r.styles,i=r.components,a=sa().goToMonth,l=function(t){a(y(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:ea,c=Ii.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Ii.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Ii.jsx("div",{className:n.vhidden,children:c}),Ii.jsx(na,{onChange:l,displayMonth:e.displayMonth}),Ii.jsx(oa,{onChange:l,displayMonth:e.displayMonth})]})}function ua(e){return Ii.jsx("svg",Hi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Ii.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function fa(e){return Ii.jsx("svg",Hi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Ii.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pa=e.forwardRef((function(e,t){var r=Qi(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Hi(Hi({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Ii.jsx("button",Hi({},e,{ref:t,type:"button",className:a,style:l}))}));function da(e){var t,r,n=Qi(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return Ii.jsx(Ii.Fragment,{});var p=c(e.previousMonth,{locale:i}),d=[a.nav_button,a.nav_button_previous].join(" "),g=u(e.nextMonth,{locale:i}),y=[a.nav_button,a.nav_button_next].join(" "),h=null!==(t=null==f?void 0:f.IconRight)&&void 0!==t?t:fa,v=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:ua;return Ii.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Ii.jsx(pa,{name:"previous-month","aria-label":p,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Ii.jsx(h,{className:a.nav_icon,style:l.nav_icon}):Ii.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Ii.jsx(pa,{name:"next-month","aria-label":g,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Ii.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Ii.jsx(h,{className:a.nav_icon,style:l.nav_icon})})]})}function ga(e){var t=Qi().numberOfMonths,r=sa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Ee(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Ii.jsx(da,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function ya(e){var t,r,n=Qi(),o=n.classNames,i=n.disableNavigation,a=n.styles,l=n.captionLayout,s=n.components,c=null!==(t=null==s?void 0:s.CaptionLabel)&&void 0!==t?t:ea;return r=i?Ii.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Ii.jsx(ca,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(ca,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Ii.jsx(ga,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Ii.jsx(ga,{displayMonth:e.displayMonth,id:e.id})]}),Ii.jsx("div",{className:o.caption,style:a.caption,children:r})}function ha(e){var t=Qi(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Ii.jsx("tfoot",{className:o,style:n.tfoot,children:Ii.jsx("tr",{children:Ii.jsx("td",{colSpan:8,children:r})})}):Ii.jsx(Ii.Fragment,{})}function va(){var e=Qi(),t=e.classNames,r=e.styles,n=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,c=function(e,t,r){for(var n=r?b(new Date):m(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=g(n,i);o.push(a)}return o}(o,i,a);return Ii.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Ii.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Ii.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":s(e,{locale:o}),children:l(e,{locale:o})},n)}))]})}function ma(){var e,t=Qi(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:va;return Ii.jsx("thead",{style:n.head,className:r.head,children:Ii.jsx(i,{})})}function ba(e){var t=Qi(),r=t.locale,n=t.formatters.formatDay;return Ii.jsx(Ii.Fragment,{children:n(e.date,{locale:r})})}var wa=e.createContext(void 0);function Oa(e){if(!Gi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Ii.jsx(wa.Provider,{value:t,children:e.children})}return Ii.jsx(xa,{initialProps:e.initialProps,children:e.children})}function xa(e){var t=e.initialProps,r=e.children,n=t.selected,o=t.min,i=t.max,a={disabled:[]};n&&a.disabled.push((function(e){var t=i&&n.length>i-1,r=n.some((function(t){return z(t,e)}));return Boolean(t&&!r)}));var l={selected:n,onDayClick:function(e,r,a){var l,s;if((null===(l=t.onDayClick)||void 0===l||l.call(t,e,r,a),!Boolean(r.selected&&o&&(null==n?void 0:n.length)===o))&&!Boolean(!r.selected&&i&&(null==n?void 0:n.length)===i)){var c=n?Ui([],n):[];if(r.selected){var u=c.findIndex((function(t){return z(e,t)}));c.splice(u,1)}else c.push(e);null===(s=t.onSelect)||void 0===s||s.call(t,c,e,r,a)}},modifiers:a};return Ii.jsx(wa.Provider,{value:l,children:r})}function ja(){var t=e.useContext(wa);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var ka,Ea=e.createContext(void 0);function Sa(e){if(!$i(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Ii.jsx(Ea.Provider,{value:t,children:e.children})}return Ii.jsx(Pa,{initialProps:e.initialProps,children:e.children})}function Pa(e){var t=e.initialProps,r=e.children,n=t.selected,o=n||{},i=o.from,a=o.to,l=t.min,s=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],z(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),l&&(i&&!a&&c.disabled.push({after:Se(i,l-1),before:g(i,l-1)}),i&&a&&c.disabled.push({after:i,before:g(i,l-1)}),!i&&a&&c.disabled.push({after:Se(a,l-1),before:g(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:g(i,1-s)}),c.disabled.push({after:g(i,s-1)})),i&&a){var u=s-(k(a,i)+1);c.disabled.push({before:Se(i,u)}),c.disabled.push({after:g(a,u)})}!i&&a&&(c.disabled.push({before:g(a,1-s)}),c.disabled.push({after:g(a,s-1)}))}return Ii.jsx(Ea.Provider,{value:{selected:n,onDayClick:function(e,r,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,r,o);var l=function(e,t){var r=t||{},n=r.from,o=r.to;if(n&&o){if(z(o,e)&&z(n,e))return;if(z(o,e))return{from:o,to:void 0};if(z(n,e))return;return je(n,e)?{from:e,to:o}:{from:n,to:e}}return o?je(e,o)?{from:o,to:e}:{from:e,to:o}:n?ke(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}(e,n);null===(a=t.onSelect)||void 0===a||a.call(t,l,e,r,o)},modifiers:c},children:r})}function Ca(){var t=e.useContext(Ea);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function za(e){return Array.isArray(e)?Ui([],e):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(ka||(ka={}));var Ra=ka.Selected,Ta=ka.Disabled,La=ka.Hidden,Na=ka.Today,Ma=ka.RangeEnd,Ia=ka.RangeMiddle,Aa=ka.RangeStart,_a=ka.Outside;var Da=e.createContext(void 0);function Ba(e){var t=Qi(),r=function(e,t,r){var n,o=((n={})[Ra]=za(e.selected),n[Ta]=za(e.disabled),n[La]=za(e.hidden),n[Na]=[e.today],n[Ma]=[],n[Ia]=[],n[Aa]=[],n[_a]=[],n);return e.fromDate&&o[Ta].push({before:e.fromDate}),e.toDate&&o[Ta].push({after:e.toDate}),Gi(e)?o[Ta]=o[Ta].concat(t.modifiers[Ta]):$i(e)&&(o[Ta]=o[Ta].concat(r.modifiers[Ta]),o[Aa]=r.modifiers[Aa],o[Ia]=r.modifiers[Ia],o[Ma]=r.modifiers[Ma]),o}(t,ja(),Ca()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=za(n)})),t}(t.modifiers),o=Hi(Hi({},r),n);return Ii.jsx(Da.Provider,{value:o,children:e.children})}function Fa(){var t=e.useContext(Da);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Wa(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(R(t))return z(e,t);if(function(e){return Array.isArray(e)&&e.every(R)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,n=t.from,o=t.to;return n&&o?(k(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),k(e,n)>=0&&k(o,e)>=0):o?z(o,e):!!n&&z(n,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=k(t.before,e)>0,n=k(t.after,e)<0;return je(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?k(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?k(t.before,e)>0:"function"==typeof t&&t(e)}))}function Va(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Wa(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Ee(e,r)&&(o.outside=!0),o}function Ha(e,t){var r=t.moveBy,n=t.direction,o=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=o.weekStartsOn,c=o.fromDate,u=o.toDate,f=o.locale,p={day:g,week:E,month:y,year:S,startOfWeek:function(e){return o.ISOWeek?b(e):m(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?_(e):A(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?p=P([c,p]):"after"===n&&u&&(p=C([u,p]));var d=!0;if(i){var h=Va(p,i);d=!h.disabled&&!h.hidden}return d?p:l.count>365?l.lastFocused:Ha(p,{moveBy:r,direction:n,context:o,modifiers:i,retry:Hi(Hi({},l),{count:l.count+1})})}var Ua=e.createContext(void 0);function Ga(t){var r=sa(),n=Fa(),o=e.useState(),i=o[0],a=o[1],l=e.useState(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=N(e[0]),i=L(e[e.length-1]),a=o;a<=i;){var l=Va(a,t);if(l.disabled||l.hidden)a=g(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=g(a,1)}}return n||r}(r.displayMonths,n),f=(null!=i?i:s&&r.isDateDisplayed(s))?s:u,p=function(e){a(e)},d=Qi(),y=function(e,t){if(i){var o=Ha(i,{moveBy:e,direction:t,context:d,modifiers:n});z(i,o)||(r.goToDate(o,i),p(o))}},h={focusedDay:i,focusTarget:f,blur:function(){c(i),a(void 0)},focus:p,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return Ii.jsx(Ua.Provider,{value:h,children:t.children})}function $a(){var t=e.useContext(Ua);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var qa=e.createContext(void 0);function Ya(e){if(!qi(e.initialProps)){var t={selected:void 0};return Ii.jsx(qa.Provider,{value:t,children:e.children})}return Ii.jsx(Xa,{initialProps:e.initialProps,children:e.children})}function Xa(e){var t=e.initialProps,r=e.children,n={selected:t.selected,onDayClick:function(e,r,n){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,n),!r.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,r,n):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,r,n)}};return Ii.jsx(qa.Provider,{value:n,children:r})}function Ka(){var t=e.useContext(qa);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Ja(e,t){var r=[e.classNames.day];return Object.keys(t).forEach((function(t){var n=e.modifiersClassNames[t];if(n)r.push(n);else if(function(e){return Object.values(ka).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function Za(t,r,n){var o,i,a,l=Qi(),s=$a(),c=function(e,t){return Va(e,Fa(),t)}(t,r),u=function(e,t){var r=Qi(),n=Ka(),o=ja(),i=Ca(),a=$a(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,f=a.blur,p=a.focus,d=a.focusMonthBefore,g=a.focusMonthAfter,y=a.focusYearBefore,h=a.focusYearAfter,v=a.focusStartOfWeek,m=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;qi(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):Gi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):$i(r)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a)},onFocus:function(n){var o;p(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;f(),null===(o=r.onDayBlur)||void 0===o||o.call(r,e,t,n)},onKeyDown:function(n){var o;switch(n.key){case"ArrowLeft":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?l():s();break;case"ArrowRight":n.preventDefault(),n.stopPropagation(),"rtl"===r.dir?s():l();break;case"ArrowDown":n.preventDefault(),n.stopPropagation(),c();break;case"ArrowUp":n.preventDefault(),n.stopPropagation(),u();break;case"PageUp":n.preventDefault(),n.stopPropagation(),n.shiftKey?y():d();break;case"PageDown":n.preventDefault(),n.stopPropagation(),n.shiftKey?h():g();break;case"Home":n.preventDefault(),n.stopPropagation(),v();break;case"End":n.preventDefault(),n.stopPropagation(),m()}null===(o=r.onDayKeyDown)||void 0===o||o.call(r,e,t,n)},onKeyUp:function(n){var o;null===(o=r.onDayKeyUp)||void 0===o||o.call(r,e,t,n)},onMouseEnter:function(n){var o;null===(o=r.onDayMouseEnter)||void 0===o||o.call(r,e,t,n)},onMouseLeave:function(n){var o;null===(o=r.onDayMouseLeave)||void 0===o||o.call(r,e,t,n)},onPointerEnter:function(n){var o;null===(o=r.onDayPointerEnter)||void 0===o||o.call(r,e,t,n)},onPointerLeave:function(n){var o;null===(o=r.onDayPointerLeave)||void 0===o||o.call(r,e,t,n)},onTouchCancel:function(n){var o;null===(o=r.onDayTouchCancel)||void 0===o||o.call(r,e,t,n)},onTouchEnd:function(n){var o;null===(o=r.onDayTouchEnd)||void 0===o||o.call(r,e,t,n)},onTouchMove:function(n){var o;null===(o=r.onDayTouchMove)||void 0===o||o.call(r,e,t,n)},onTouchStart:function(n){var o;null===(o=r.onDayTouchStart)||void 0===o||o.call(r,e,t,n)}};return b}(t,c),f=function(){var e=Qi(),t=Ka(),r=ja(),n=Ca();return qi(e)?t.selected:Gi(e)?r.selected:$i(e)?n.selected:void 0}(),p=Boolean(l.onDayClick||"default"!==l.mode);e.useEffect((function(){var e;c.outside||s.focusedDay&&p&&z(s.focusedDay,t)&&(null===(e=n.current)||void 0===e||e.focus())}),[s.focusedDay,t,n,p,c.outside]);var d=Ja(l,c).join(" "),g=function(e,t){var r=Hi({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Hi(Hi({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),y=Boolean(c.outside&&!l.showOutsideDays||c.hidden),h=null!==(a=null===(i=l.components)||void 0===i?void 0:i.DayContent)&&void 0!==a?a:ba,v={style:g,className:d,children:Ii.jsx(h,{date:t,displayMonth:r,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&z(s.focusTarget,t)&&!c.outside,b=s.focusedDay&&z(s.focusedDay,t),w=Hi(Hi(Hi({},v),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||m?0:-1,o)),u);return{isButton:p,isHidden:y,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:v}}function Qa(t){var r=e.useRef(null),n=Za(t.date,t.displayMonth,r);return n.isHidden?Ii.jsx("div",{role:"gridcell"}):n.isButton?Ii.jsx(pa,Hi({name:"day",ref:r},n.buttonProps)):Ii.jsx("div",Hi({},n.divProps))}function el(e){var t=e.number,r=e.dates,n=Qi(),o=n.onWeekNumberClick,i=n.styles,a=n.classNames,l=n.locale,s=n.labels.labelWeekNumber,c=(0,n.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return Ii.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Ii.jsx(pa,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function tl(e){var t,r,n,o=Qi(),i=o.styles,a=o.classNames,l=o.showWeekNumber,s=o.components,c=null!==(t=null==s?void 0:s.Day)&&void 0!==t?t:Qa,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:el;return l&&(n=Ii.jsx("td",{className:a.cell,style:i.cell,children:Ii.jsx(u,{number:e.weekNumber,dates:e.dates})})),Ii.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Ii.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Ii.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+d(e)/1e3)}(t))}))]})}function rl(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?_(t):A(t,r),o=(null==r?void 0:r.ISOWeek)?b(e):m(e,r),i=k(n,o),a=[],l=0;l<=i;l++)a.push(g(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?Y(t):K(t,r),o=e.find((function(e){return e.weekNumber===n}));return o?(o.dates.push(t),e):(e.push({weekNumber:n,dates:[t]}),e)}),[])}function nl(e){var t,r,n,o=Qi(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,f=o.weekStartsOn,p=o.firstWeekContainsDate,d=o.ISOWeek,g=function(e,t){var r=rl(N(e),L(e),t);if(null==t?void 0:t.useFixedWeeks){var n=xe(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=E(i,6-n),l=rl(E(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:f,firstWeekContainsDate:p}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:ma,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:tl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ha;return Ii.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Ii.jsx(y,{}),Ii.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Ii.jsx(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Ii.jsx(v,{displayMonth:e.displayMonth})]})}var ol="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,il=!1,al=0;function ll(){return"react-day-picker-".concat(++al)}function sl(t){var r,n,o=Qi(),i=o.dir,a=o.classNames,l=o.styles,s=o.components,c=sa().displayMonths,u=function(t){var r,n=null!=t?t:il?ll():null,o=e.useState(n),i=o[0],a=o[1];return ol((function(){null===i&&a(ll())}),[]),e.useEffect((function(){!1===il&&(il=!0)}),[]),null!==(r=null!=t?t:i)&&void 0!==r?r:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),f=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,p=[a.month],d=l.month,g=0===t.displayIndex,y=t.displayIndex===c.length-1,h=!g&&!y;"rtl"===i&&(y=(r=[g,y])[0],g=r[1]),g&&(p.push(a.caption_start),d=Hi(Hi({},d),l.caption_start)),y&&(p.push(a.caption_end),d=Hi(Hi({},d),l.caption_end)),h&&(p.push(a.caption_between),d=Hi(Hi({},d),l.caption_between));var v=null!==(n=null==s?void 0:s.Caption)&&void 0!==n?n:ya;return Ii.jsxs("div",{className:p.join(" "),style:d,children:[Ii.jsx(v,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),Ii.jsx(nl,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function cl(e){var t=Qi(),r=t.classNames,n=t.styles;return Ii.jsx("div",{className:r.months,style:n.months,children:e.children})}function ul(t){var r,n,o=t.initialProps,i=Qi(),a=$a(),l=sa(),s=e.useState(!1),c=s[0],u=s[1];e.useEffect((function(){i.initialFocus&&a.focusTarget&&(c||(a.focus(a.focusTarget),u(!0)))}),[i.initialFocus,c,a.focus,a.focusTarget,a]);var f=[i.classNames.root,i.className];i.numberOfMonths>1&&f.push(i.classNames.multiple_months),i.showWeekNumber&&f.push(i.classNames.with_weeknumber);var p=Hi(Hi({},i.styles.root),i.style),d=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Hi(Hi({},e),((r={})[t]=o[t],r))}),{}),g=null!==(n=null===(r=o.components)||void 0===r?void 0:r.Months)&&void 0!==n?n:cl;return Ii.jsx("div",Hi({className:f.join(" "),style:p,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},d,{children:Ii.jsx(g,{children:l.displayMonths.map((function(e,t){return Ii.jsx(sl,{displayIndex:t,displayMonth:e},t)}))})}))}function fl(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children"]);return Ii.jsx(Zi,{initialProps:r,children:Ii.jsx(la,{children:Ii.jsx(Ya,{initialProps:r,children:Ii.jsx(Oa,{initialProps:r,children:Ii.jsx(Sa,{initialProps:r,children:Ii.jsx(Ba,{children:Ii.jsx(Ga,{children:t})})})})})})})}function pl(e){return Ii.jsx(fl,Hi({},e,{children:Ii.jsx(ul,{initialProps:e})}))}function dl(e){var t=e.className,r=e.classNames,o=e.showOutsideDays,l=void 0===o||o,s=a(e,["className","classNames","showOutsideDays"]);return n.createElement(pl,i({showOutsideDays:l,className:li("p-3",t),classNames:i({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:li(Wi({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:li("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===s.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:li(Wi({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},r),components:{IconLeft:function(){return n.createElement(bi,{className:"h-4 w-4"})},IconRight:function(){return n.createElement(wi,{className:"h-4 w-4"})}}},s))}function gl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function yl(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;r=[...r,o];const l=t=>{const{scope:r,children:o,...l}=t,s=r?.[e]?.[a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e]?.[a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},hl(o,...t)]}function hl(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}dl.displayName="Calendar";var vl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?Ai:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Ii.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function ml(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>t.current?.(...e)),[])}var bl,wl="dismissableLayer.update",Ol="dismissableLayer.pointerDownOutside",xl="dismissableLayer.focusOutside",jl=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kl=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(jl),[f,p]=n.useState(null),d=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),y=Si(t,(e=>p(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(v),b=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(e,t=globalThis?.document){const r=ml(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){Sl(Ol,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));O&&!r&&(i?.(e),l?.(e),e.defaultPrevented||s?.())}),d),j=function(e,t=globalThis?.document){const r=ml(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Sl(xl,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||s?.())}),d);return function(e,t=globalThis?.document){const r=ml(e);n.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(bl=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),El(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=bl)}}),[f,d,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),El())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(wl,e),()=>document.removeEventListener(wl,e)}),[]),Ii.jsx(vl.div,{...c,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:gl(e.onFocusCapture,j.onFocusCapture),onBlurCapture:gl(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:gl(e.onPointerDownCapture,x.onPointerDownCapture)})}));kl.displayName="DismissableLayer";function El(){const e=new CustomEvent(wl);document.dispatchEvent(e)}function Sl(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(jl),o=n.useRef(null),i=Si(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Ii.jsx(vl.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Pl=0;function Cl(){n.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zl()),document.body.insertAdjacentElement("beforeend",e[1]??zl()),Pl++,()=>{1===Pl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Pl--}}),[])}function zl(){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 Rl="focusScope.autoFocusOnMount",Tl="focusScope.autoFocusOnUnmount",Ll={bubbles:!1,cancelable:!0},Nl=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=ml(i),f=ml(a),p=n.useRef(null),d=Si(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?p.current=t:_l(p.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||_l(p.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&_l(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[o,s,g.paused]),n.useEffect((()=>{if(s){Dl.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Rl,Ll);s.addEventListener(Rl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_l(n,{select:t}),document.activeElement!==r)return}((e=Ml(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&_l(s))}return()=>{s.removeEventListener(Rl,u),setTimeout((()=>{const e=new CustomEvent(Tl,Ll);s.addEventListener(Tl,f),s.dispatchEvent(e),e.defaultPrevented||_l(t??document.body,{select:!0}),s.removeEventListener(Tl,f),Dl.remove(g)}),0)}}var e}),[s,u,f,g]);const y=n.useCallback((e=>{if(!r&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Ml(e),r=Il(t,e),n=Il(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&_l(i,{select:!0})):(e.preventDefault(),r&&_l(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Ii.jsx(vl.div,{tabIndex:-1,...l,ref:d,onKeyDown:y})}));function Ml(e){const t=[],r=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(;r.nextNode();)t.push(r.currentNode);return t}function Il(e,t){for(const r of e)if(!Al(r,{upTo:t}))return r}function Al(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 _l(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Nl.displayName="FocusScope";var Dl=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Bl(e,t),e.unshift(t)},remove(t){e=Bl(e,t),e[0]?.resume()}}}();function Bl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Fl=Boolean(globalThis?.document)?n.useLayoutEffect:()=>{},Wl=n["useId".toString()]||(()=>{}),Vl=0;function Hl(e){const[t,r]=n.useState(Wl());return Fl((()=>{r((e=>e??String(Vl++)))}),[e]),t?`radix-${t}`:""}const Ul=["top","right","bottom","left"],Gl=Math.min,$l=Math.max,ql=Math.round,Yl=Math.floor,Xl=e=>({x:e,y:e}),Kl={left:"right",right:"left",bottom:"top",top:"bottom"},Jl={start:"end",end:"start"};function Zl(e,t,r){return $l(e,Gl(t,r))}function Ql(e,t){return"function"==typeof e?e(t):e}function es(e){return e.split("-")[0]}function ts(e){return e.split("-")[1]}function rs(e){return"x"===e?"y":"x"}function ns(e){return"y"===e?"height":"width"}function os(e){return["top","bottom"].includes(es(e))?"y":"x"}function is(e){return rs(os(e))}function as(e){return e.replace(/start|end/g,(e=>Jl[e]))}function ls(e){return e.replace(/left|right|bottom|top/g,(e=>Kl[e]))}function ss(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function cs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function us(e,t,r){let{reference:n,floating:o}=e;const i=os(t),a=is(t),l=ns(a),s=es(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[l]/2-o[l]/2;let d;switch(s){case"top":d={x:u,y:n.y-o.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-o.width,y:f};break;default:d={x:n.x,y:n.y}}switch(ts(t)){case"start":d[a]-=p*(r&&c?-1:1);break;case"end":d[a]+=p*(r&&c?-1:1)}return d}async function fs(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Ql(t,e),g=ss(d),y=l[p?"floating"===f?"reference":"floating":f],h=cs(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(y)))||r?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:s}):v);return{top:(h.top-w.top+g.top)/b.y,bottom:(w.bottom-h.bottom+g.bottom)/b.y,left:(h.left-w.left+g.left)/b.x,right:(w.right-h.right+g.right)/b.x}}function ps(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ds(e){return Ul.some((t=>e[t]>=0))}function gs(){return"undefined"!=typeof window}function ys(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function hs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function vs(e){var t;return null==(t=(ms(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ms(e){return!!gs()&&(e instanceof Node||e instanceof hs(e).Node)}function bs(e){return!!gs()&&(e instanceof Element||e instanceof hs(e).Element)}function ws(e){return!!gs()&&(e instanceof HTMLElement||e instanceof hs(e).HTMLElement)}function Os(e){return!(!gs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof hs(e).ShadowRoot)}function xs(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Cs(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function js(e){return["table","td","th"].includes(ys(e))}function ks(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Es(e){const t=Ss(),r=bs(e)?Cs(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Ss(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ps(e){return["html","body","#document"].includes(ys(e))}function Cs(e){return hs(e).getComputedStyle(e)}function zs(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rs(e){if("html"===ys(e))return e;const t=e.assignedSlot||e.parentNode||Os(e)&&e.host||vs(e);return Os(t)?t.host:t}function Ts(e){const t=Rs(e);return Ps(t)?e.ownerDocument?e.ownerDocument.body:e.body:ws(t)&&xs(t)?t:Ts(t)}function Ls(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Ts(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=hs(o);if(i){const e=Ns(a);return t.concat(a,a.visualViewport||[],xs(o)?o:[],e&&r?Ls(e):[])}return t.concat(o,Ls(o,[],r))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ms(e){const t=Cs(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ws(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ql(r)!==i||ql(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Is(e){return bs(e)?e:e.contextElement}function As(e){const t=Is(e);if(!ws(t))return Xl(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ms(t);let a=(i?ql(r.width):r.width)/n,l=(i?ql(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const _s=Xl(0);function Ds(e){const t=hs(e);return Ss()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_s}function Bs(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Is(e);let a=Xl(1);t&&(n?bs(n)&&(a=As(n)):a=As(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==hs(e))&&t}(i,r,n)?Ds(i):Xl(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=hs(i),t=n&&bs(n)?hs(n):n;let r=e,o=Ns(r);for(;o&&n&&t!==r;){const e=As(o),t=o.getBoundingClientRect(),n=Cs(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,r=hs(o),o=Ns(r)}}return cs({width:u,height:f,x:s,y:c})}function Fs(e,t){const r=zs(e).scrollLeft;return t?t.left+r:Bs(vs(e)).left+r}function Ws(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Fs(e,n)),y:n.top+t.scrollTop}}function Vs(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=hs(e),n=vs(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=Ss();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=vs(e),r=zs(e),n=e.ownerDocument.body,o=$l(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=$l(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Fs(e);const l=-r.scrollTop;return"rtl"===Cs(n).direction&&(a+=$l(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(vs(e));else if(bs(t))n=function(e,t){const r=Bs(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ws(e)?As(e):Xl(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Ds(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cs(n)}function Hs(e,t){const r=Rs(e);return!(r===t||!bs(r)||Ps(r))&&("fixed"===Cs(r).position||Hs(r,t))}function Us(e,t,r){const n=ws(t),o=vs(t),i="fixed"===r,a=Bs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Xl(0);if(n||!n&&!i)if(("body"!==ys(t)||xs(o))&&(l=zs(t)),n){const e=Bs(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Fs(o));const c=!o||n||i?Xl(0):Ws(o,l);return{x:a.left+l.scrollLeft-s.x-c.x,y:a.top+l.scrollTop-s.y-c.y,width:a.width,height:a.height}}function Gs(e){return"static"===Cs(e).position}function $s(e,t){if(!ws(e)||"fixed"===Cs(e).position)return null;if(t)return t(e);let r=e.offsetParent;return vs(e)===r&&(r=r.ownerDocument.body),r}function qs(e,t){const r=hs(e);if(ks(e))return r;if(!ws(e)){let t=Rs(e);for(;t&&!Ps(t);){if(bs(t)&&!Gs(t))return t;t=Rs(t)}return r}let n=$s(e,t);for(;n&&js(n)&&Gs(n);)n=$s(n,t);return n&&Ps(n)&&Gs(n)&&!Es(n)?r:n||function(e){let t=Rs(e);for(;ws(t)&&!Ps(t);){if(Es(t))return t;if(ks(t))return null;t=Rs(t)}return null}(e)||r}const Ys={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=vs(n),l=!!t&&ks(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=Xl(1);const u=Xl(0),f=ws(n);if((f||!f&&!i)&&(("body"!==ys(n)||xs(a))&&(s=zs(n)),ws(n))){const e=Bs(n);c=As(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||f||i?Xl(0):Ws(a,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:vs,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?ks(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Ls(e,[],!1).filter((e=>bs(e)&&"body"!==ys(e))),o=null;const i="fixed"===Cs(e).position;let a=i?Rs(e):e;for(;bs(a)&&!Ps(a);){const t=Cs(a),r=Es(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||xs(a)&&!r&&Hs(e,a))?n=n.filter((e=>e!==a)):o=t,a=Rs(a)}return t.set(e,n),n}(t,this._c):[].concat(r),a=[...i,n],l=a[0],s=a.reduce(((e,r)=>{const n=Vs(t,r,o);return e.top=$l(n.top,e.top),e.right=Gl(n.right,e.right),e.bottom=Gl(n.bottom,e.bottom),e.left=$l(n.left,e.left),e}),Vs(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:qs,getElementRects:async function(e){const t=this.getOffsetParent||qs,r=this.getDimensions,n=await r(e.floating);return{reference:Us(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Ms(e);return{width:t,height:r}},getScale:As,isElement:bs,isRTL:function(e){return"rtl"===Cs(e).direction}};function Xs(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Is(e),u=o||i?[...c?Ls(c):[],...Ls(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const f=c&&l?function(e,t){let r,n=null;const o=vs(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const d={rootMargin:-Yl(u)+"px "+-Yl(o.clientWidth-(c+f))+"px "+-Yl(o.clientHeight-(u+p))+"px "+-Yl(c)+"px",threshold:$l(0,Gl(1,s))||1};let g=!0;function y(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}g=!1}try{n=new IntersectionObserver(y,{...d,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,d)}n.observe(e)}(!0),i}(c,r):null;let p,d=-1,g=null;a&&(g=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),r()})),c&&!s&&g.observe(c),g.observe(t));let y=s?Bs(e):null;return s&&function t(){const n=Bs(e);!y||n.x===y.x&&n.y===y.y&&n.width===y.width&&n.height===y.height||r();y=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==f||f(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(p)}}const Ks=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=es(r),l=ts(r),s="y"===os(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=Ql(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof g&&(d="end"===l?-1*g:g),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Js=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=Ql(e,t),c={x:r,y:n},u=await fs(t,s),f=os(es(o)),p=rs(f);let d=c[p],g=c[f];if(i){const e="y"===p?"bottom":"right";d=Zl(d+u["y"===p?"top":"left"],d,d-u[e])}if(a){const e="y"===f?"bottom":"right";g=Zl(g+u["y"===f?"top":"left"],g,g-u[e])}const y=l.fn({...t,[p]:d,[f]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:i,[f]:a}}}}}},Zs=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...h}=Ql(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=es(o),m=os(l),b=es(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=p||(b||!y?[ls(l)]:function(e){const t=ls(e);return[as(e),t,as(t)]}(l)),x="none"!==g;!p&&x&&O.push(...function(e,t,r,n){const o=ts(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(es(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(as)))),i}(l,y,g,w));const j=[l,...O],k=await fs(t,h),E=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&E.push(k[v]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=ts(e),o=is(e),i=ns(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ls(a)),[a,ls(a)]}(o,a,w);E.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:E}],!E.every((e=>e<=0))){var P,C;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let r=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!r)switch(d){case"bestFit":{var z;const e=null==(z=S.filter((e=>{if(x){const t=os(e.placement);return t===m||"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:z[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},Qs=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=Ql(e,t),u=await fs(t,c),f=es(o),p=ts(o),d="y"===os(o),{width:g,height:y}=i.floating;let h,v;"top"===f||"bottom"===f?(h=f,v=p===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,h="end"===p?"top":"bottom");const m=y-u.top-u.bottom,b=g-u.left-u.right,w=Gl(y-u[h],m),O=Gl(g-u[v],b),x=!t.middlewareData.shift;let j=w,k=O;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(k=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(j=m),x&&!p){const e=$l(u.left,0),t=$l(u.right,0),r=$l(u.top,0),n=$l(u.bottom,0);d?k=g-2*(0!==e||0!==t?e+t:$l(u.left,u.right)):j=y-2*(0!==r||0!==n?r+n:$l(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:j});const E=await a.getDimensions(l.floating);return g!==E.width||y!==E.height?{reset:{rects:!0}}:{}}}},ec=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ql(e,t);switch(n){case"referenceHidden":{const e=ps(await fs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ds(e)}}}case"escaped":{const e=ps(await fs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:ds(e)}}}default:return{}}}}},tc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=Ql(e,t)||{};if(null==c)return{};const f=ss(u),p={x:r,y:n},d=is(o),g=ns(d),y=await a.getDimensions(c),h="y"===d,v=h?"top":"left",m=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[d]-p[d]-i.floating[g],O=p[d]-i.reference[d],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=x?x[b]:0;j&&await(null==a.isElement?void 0:a.isElement(x))||(j=l.floating[b]||i.floating[g]);const k=w/2-O/2,E=j/2-y[g]/2-1,S=Gl(f[v],E),P=Gl(f[m],E),C=S,z=j-y[g]-P,R=j/2-y[g]/2+k,T=Zl(C,R,z),L=!s.arrow&&null!=ts(o)&&R!==T&&i.reference[g]/2-(R<C?S:P)-y[g]/2<0,N=L?R<C?R-C:R-z:0;return{[d]:p[d]+N,data:{[d]:T,centerOffset:R-T-N,...L&&{alignmentOffset:N}},reset:L}}}),rc=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Ql(e,t),u={x:r,y:n},f=os(o),p=rs(f);let d=u[p],g=u[f];const y=Ql(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+h.mainAxis,r=i.reference[p]+i.reference[e]-h.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,m;const e="y"===p?"width":"height",t=["top","left"].includes(es(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[f])||0)+(t?0:h.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[f])||0)-(t?h.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[p]:d,[f]:g}}}},nc=(e,t,r)=>{const n=new Map,o={platform:Ys,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=us(c,n,s),p=n,d={},g=0;for(let r=0;r<l.length;r++){const{name:i,fn:y}=l[r],{x:h,y:v,data:m,reset:b}=await y({x:u,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=v?v:f,d={...d,[i]:{...d[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=us(c,p,s))),r=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var oc="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function ic(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!ic(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ic(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ac(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lc(e,t){const r=ac(e);return Math.round(t*r)/r}function sc(e){const t=n.useRef(e);return oc((()=>{t.current=e})),t}const cc=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?tc({element:r.current,padding:n}).fn(t):{}:r?tc({element:r,padding:n}).fn(t):{};var o}}),uc=(e,t)=>({...Ks(e),options:[e,t]}),fc=(e,t)=>({...Js(e),options:[e,t]}),pc=(e,t)=>({...rc(e),options:[e,t]}),dc=(e,t)=>({...Zs(e),options:[e,t]}),gc=(e,t)=>({...Qs(e),options:[e,t]}),yc=(e,t)=>({...ec(e),options:[e,t]}),hc=(e,t)=>({...cc(e),options:[e,t]});var vc=n.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Ii.jsx(vl.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Ii.jsx("polygon",{points:"0,0 30,0 15,10"})})}));vc.displayName="Arrow";var mc=vc;function bc(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}var wc="Popper",[Oc,xc]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},bc(o,...t)]}(wc),[jc,kc]=Oc(wc),Ec=e=>{const{__scopePopper:t,children:r}=e,[o,i]=n.useState(null);return Ii.jsx(jc,{scope:t,anchor:o,onAnchorChange:i,children:r})};Ec.displayName=wc;var Sc="PopperAnchor",Pc=n.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:o,...i}=e,a=kc(Sc,r),l=n.useRef(null),s=Si(t,l);return n.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Ii.jsx(vl.div,{...i,ref:s})}));Pc.displayName=Sc;var Cc="PopperContent",[zc,Rc]=Oc(Cc),Tc=n.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:l="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:h,...v}=e,m=kc(Cc,r),[b,w]=n.useState(null),O=Si(t,(e=>w(e))),[x,j]=n.useState(null),k=function(e){const[t,r]=n.useState(void 0);return Fl((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}(x),E=k?.width??0,S=k?.height??0,P=i+("center"!==l?"-"+l:""),C="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},z=Array.isArray(f)?f:[f],R=z.length>0,T={padding:C,boundary:z.filter(Ic),altBoundary:R},{refs:L,floatingStyles:N,placement:M,isPositioned:I,middlewareData:A}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:a,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[p,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=n.useState(i);ic(g,i)||y(i);const[h,v]=n.useState(null),[m,b]=n.useState(null),w=n.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),O=n.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),x=l||h,j=s||m,k=n.useRef(null),E=n.useRef(null),S=n.useRef(p),P=null!=u,C=sc(u),z=sc(a),R=sc(f),T=n.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:t,strategy:r,middleware:g};z.current&&(e.platform=z.current),nc(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};L.current&&!ic(S.current,t)&&(S.current=t,o.flushSync((()=>{d(t)})))}))}),[g,t,r,z,R]);oc((()=>{!1===f&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[f]);const L=n.useRef(!1);oc((()=>(L.current=!0,()=>{L.current=!1})),[]),oc((()=>{if(x&&(k.current=x),j&&(E.current=j),x&&j){if(C.current)return C.current(x,j,T);T()}}),[x,j,T,C,P]);const N=n.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:O})),[w,O]),M=n.useMemo((()=>({reference:x,floating:j})),[x,j]),I=n.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=lc(M.floating,p.x),n=lc(M.floating,p.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...ac(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,M.floating,p.x,p.y]);return n.useMemo((()=>({...p,update:T,refs:N,elements:M,floatingStyles:I})),[p,T,N,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>Xs(...e,{animationFrame:"always"===y}),elements:{reference:m.anchor},middleware:[uc({mainAxis:a+S,alignmentAxis:s}),u&&fc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?pc():void 0,...T}),u&&dc({...T}),gc({...T,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),x&&hc({element:x,padding:c}),Ac({arrowWidth:E,arrowHeight:S}),g&&yc({strategy:"referenceHidden",...T})]}),[_,D]=_c(M),B=ml(h);Fl((()=>{I&&B?.()}),[I,B]);const F=A.arrow?.x,W=A.arrow?.y,V=0!==A.arrow?.centerOffset,[H,U]=n.useState();return Fl((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Ii.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:I?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Ii.jsx(zc,{scope:r,placedSide:_,onArrowChange:j,arrowX:F,arrowY:W,shouldHideArrow:V,children:Ii.jsx(vl.div,{"data-side":_,"data-align":D,...v,ref:O,style:{...v.style,animation:I?void 0:"none"}})})})}));Tc.displayName=Cc;var Lc="PopperArrow",Nc={top:"bottom",right:"left",bottom:"top",left:"right"},Mc=n.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Rc(Lc,r),i=Nc[o.placedSide];return Ii.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Ii.jsx(mc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Ic(e){return null!==e}Mc.displayName=Lc;var Ac=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=_c(r),u={start:"0%",center:"50%",end:"100%"}[c],f=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2;let d="",g="";return"bottom"===s?(d=i?u:`${f}px`,g=-l+"px"):"top"===s?(d=i?u:`${f}px`,g=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",g=i?u:`${p}px`):"left"===s&&(d=`${n.floating.width+l}px`,g=i?u:`${p}px`),{data:{x:d,y:g}}}});function _c(e){const[t,r="center"]=e.split("-");return[t,r]}var Dc=Ec,Bc=Pc,Fc=Tc,Wc=Mc,Vc=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Fl((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Ii.jsx(vl.div,{...i,ref:r}),s):null}));Vc.displayName="Portal";var Hc=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=Uc(o.current);a.current="mounted"===s?e:"none"}),[s]),Fl((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=Uc(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Fl((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=Uc(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=Uc(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=Si(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?n.cloneElement(i,{ref:a}):null};function Uc(e){return e?.animationName||"none"}function Gc({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[o]=r,i=n.useRef(o),a=ml(t);return n.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,l=a?e:o,s=ml(r);return[l,n.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s])]}Hc.displayName="Presence";var $c=new WeakMap,qc=new WeakMap,Yc={},Xc=0,Kc=function(e){return e&&(e.host||Kc(e.parentNode))},Jc=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=Kc(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Yc[r]||(Yc[r]=new WeakMap);var i=Yc[r],a=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=($c.get(e)||0)+1,c=(i.get(e)||0)+1;$c.set(e,s),i.set(e,c),a.push(e),1===s&&o&&qc.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),l.clear(),Xc++,function(){a.forEach((function(e){var t=$c.get(e)-1,o=i.get(e)-1;$c.set(e,t),i.set(e,o),t||(qc.has(e)||e.removeAttribute(n),qc.delete(e)),o||e.removeAttribute(r)})),--Xc||($c=new WeakMap,$c=new WeakMap,qc=new WeakMap,Yc={})}},Zc=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Jc(n,o,r,"aria-hidden")):function(){return null}},Qc="right-scroll-bar-position",eu="width-before-scroll-bar";function tu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ru="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,nu=new WeakMap;function ou(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return tu(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return ru((function(){var e=nu.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||tu(e,null)})),n.forEach((function(e){r.has(e)||tu(e,o)}))}nu.set(a,t)}),[t]),a}function iu(e){return e}var au=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};au.isSideCarExport=!0;var lu=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=iu);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=i({async:!0,ssr:!1},e),t}(),su=function(){},cu=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:su,onWheelCapture:su,onTouchMoveCapture:su}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,p=e.removeScrollBar,d=e.enabled,g=e.shards,y=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=y,k=ou([r,t]),E=i(i({},x),l);return n.createElement(n.Fragment,null,d&&n.createElement(j,{sideCar:lu,removeScrollBar:p,shards:g,noIsolation:h,inert:v,setCallbacks:s,allowPinchZoom:!!m,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},E),{ref:k})):n.createElement(w,i({},E,{className:f,ref:k}),u))}));cu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cu.classNames={fullWidth:eu,zeroRight:Qc};function uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var fu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=uu())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pu=function(){var e,t=(e=fu(),function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},du={left:0,top:0,right:0,gap:0},gu=function(e){return parseInt(e||"",10)||0},yu=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return du;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[gu(r),gu(n),gu(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},hu=pu(),vu="data-scroll-locked",mu=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(vu,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Qc," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(eu," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Qc," .").concat(Qc," {\n right: 0 ").concat(n,";\n }\n \n .").concat(eu," .").concat(eu," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(vu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},bu=function(){var e=parseInt(document.body.getAttribute(vu)||"0",10);return isFinite(e)?e:0},wu=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(vu,(bu()+1).toString()),function(){var e=bu()-1;e<=0?document.body.removeAttribute(vu):document.body.setAttribute(vu,e.toString())}}),[]);var a=n.useMemo((function(){return yu(i)}),[i]);return n.createElement(hu,{styles:mu(a,!t,i,r?"":"!important")})},Ou=!1;if("undefined"!=typeof window)try{var xu=Object.defineProperty({},"passive",{get:function(){return Ou=!0,!0}});window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch(e){Ou=!1}var ju=!!Ou&&{passive:!1},ku=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},Eu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Su(e,n)){var o=Pu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Su=function(e,t){return"v"===e?function(e){return ku(e,"overflowY")}(t):function(e){return ku(e,"overflowX")}(t)},Pu=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zu=function(e){return[e.deltaX,e.deltaY]},Ru=function(e){return e&&"current"in e?e.current:e},Tu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Lu=0,Nu=[];function Mu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Iu,Au=(Iu=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Lu++)[0],a=n.useState(pu)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(Ru),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=Cu(e),a=r.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,f=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var p=Eu(f,u);if(!p)return!0;if(p?n=f:(n="v"===f?"h":"v",p=Eu(f,u)),!p)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var d=o.current||n;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,s=t.contains(l),c=!1,u=a>0,f=0,p=0;do{var d=Pu(e,l),g=d[0],y=d[1]-d[2]-i*g;(g||y)&&Su(e,l)&&(f+=y,p+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(f)<1||!o)?c=!0:u||!(Math.abs(p)<1)&&o||(c=!0),c}(d,t,e,"h"===d?s:c,!0)}),[]),u=n.useCallback((function(e){var r=e;if(Nu.length&&Nu[Nu.length-1]===a){var n="deltaY"in r?zu(r):Cu(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Ru).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Mu(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),p=n.useCallback((function(e){r.current=Cu(e),o.current=void 0}),[]),d=n.useCallback((function(t){f(t.type,zu(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,Cu(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return Nu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ju),document.addEventListener("touchmove",u,ju),document.addEventListener("touchstart",p,ju),function(){Nu=Nu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,ju),document.removeEventListener("touchmove",u,ju),document.removeEventListener("touchstart",p,ju)}}),[]);var y=e.removeScrollBar,h=e.inert;return n.createElement(n.Fragment,null,h?n.createElement(a,{styles:Tu(i)}):null,y?n.createElement(wu,{gapMode:e.gapMode}):null)},lu.useMedium(Iu),au),_u=n.forwardRef((function(e,t){return n.createElement(cu,i({},e,{ref:t,sideCar:Au}))}));_u.classNames=cu.classNames;var Du="Popover",[Bu,Fu]=yl(Du,[xc]),Wu=xc(),[Vu,Hu]=Bu(Du),Uu=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,s=Wu(t),c=n.useRef(null),[u,f]=n.useState(!1),[p=!1,d]=Gc({prop:o,defaultProp:i,onChange:a});return Ii.jsx(Dc,{...s,children:Ii.jsx(Vu,{scope:t,contentId:Hl(),triggerRef:c,open:p,onOpenChange:d,onOpenToggle:n.useCallback((()=>d((e=>!e))),[d]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:n.useCallback((()=>f(!1)),[]),modal:l,children:r})})};Uu.displayName=Du;var Gu="PopoverAnchor";n.forwardRef(((e,t)=>{const{__scopePopover:r,...o}=e,i=Hu(Gu,r),a=Wu(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return n.useEffect((()=>(l(),()=>s())),[l,s]),Ii.jsx(Bc,{...a,...o,ref:t})})).displayName=Gu;var $u="PopoverTrigger",qu=n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Hu($u,r),i=Wu(r),a=Si(t,o.triggerRef),l=Ii.jsx(vl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":of(o.open),...n,ref:a,onClick:gl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Ii.jsx(Bc,{asChild:!0,...i,children:l})}));qu.displayName=$u;var Yu="PopoverPortal",[Xu,Ku]=Bu(Yu,{forceMount:void 0}),Ju=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Hu(Yu,t);return Ii.jsx(Xu,{scope:t,forceMount:r,children:Ii.jsx(Hc,{present:r||i.open,children:Ii.jsx(Vc,{asChild:!0,container:o,children:n})})})};Ju.displayName=Yu;var Zu="PopoverContent",Qu=n.forwardRef(((e,t)=>{const r=Ku(Zu,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Hu(Zu,e.__scopePopover);return Ii.jsx(Hc,{present:n||i.open,children:i.modal?Ii.jsx(ef,{...o,ref:t}):Ii.jsx(tf,{...o,ref:t})})}));Qu.displayName=Zu;var ef=n.forwardRef(((e,t)=>{const r=Hu(Zu,e.__scopePopover),o=n.useRef(null),i=Si(t,o),a=n.useRef(!1);return n.useEffect((()=>{const e=o.current;if(e)return Zc(e)}),[]),Ii.jsx(_u,{as:Ai,allowPinchZoom:!0,children:Ii.jsx(rf,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gl(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:gl(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:gl(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),tf=n.forwardRef(((e,t)=>{const r=Hu(Zu,e.__scopePopover),o=n.useRef(!1),i=n.useRef(!1);return Ii.jsx(rf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),rf=n.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...f}=e,p=Hu(Zu,r),d=Wu(r);return Cl(),Ii.jsx(Nl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Ii.jsx(kl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:Ii.jsx(Fc,{"data-state":of(p.open),role:"dialog",id:p.contentId,...d,...f,ref:t,style:{...f.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)"}})})})})),nf="PopoverClose";n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Hu(nf,r);return Ii.jsx(vl.button,{type:"button",...n,ref:t,onClick:gl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=nf;function of(e){return e?"open":"closed"}n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Wu(r);return Ii.jsx(Wc,{...o,...n,ref:t})})).displayName="PopoverArrow";var af=Ju,lf=Qu,sf=Uu,cf=qu,uf=n.forwardRef((function(e,t){var r=e.className,o=e.align,l=void 0===o?"center":o,s=e.sideOffset,c=void 0===s?4:s,u=a(e,["className","align","sideOffset"]);return n.createElement(af,null,n.createElement(lf,i({ref:t,align:l,sideOffset:c,className:li("z-50 w-72 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",r)},u)))}));function ff(e,[t,r]){return Math.min(r,Math.max(t,e))}function pf(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}uf.displayName=lf.displayName;var df=n.createContext(void 0);var gf=n.forwardRef(((e,t)=>Ii.jsx(vl.span,{...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}})));gf.displayName="VisuallyHidden";var yf=[" ","Enter","ArrowUp","ArrowDown"],hf=[" ","Enter"],vf="Select",[mf,bf,wf]=function(t){const r=t+"CollectionProvider",[o,i]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Ii.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},pf(o,...t)]}(r),[a,l]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:r,children:n}=t,o=e.useRef(null),i=e.useRef(new Map).current;return Ii.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=r;const c=t+"CollectionSlot",u=e.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Si(t,l(c,r).collectionRef);return Ii.jsx(Ai,{ref:o,children:n})}));u.displayName=c;const f=t+"CollectionItemSlot",p="data-radix-collection-item",d=e.forwardRef(((t,r)=>{const{scope:n,children:o,...i}=t,a=e.useRef(null),s=Si(r,a),c=l(f,n);return e.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Ii.jsx(Ai,{[p]:"",ref:s,children:o})}));return d.displayName=f,[{Provider:s,Slot:u,ItemSlot:d},function(r){const n=l(t+"CollectionConsumer",r);return e.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(vf),[Of,xf]=yl(vf,[wf,xc]),jf=xc(),[kf,Ef]=Of(vf),[Sf,Pf]=Of(vf),Cf=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:d,required:g,form:y}=e,h=jf(t),[v,m]=n.useState(null),[b,w]=n.useState(null),[O,x]=n.useState(!1),j=function(e){const t=n.useContext(df);return e||t||"ltr"}(u),[k=!1,E]=Gc({prop:o,defaultProp:i,onChange:a}),[S,P]=Gc({prop:l,defaultProp:s,onChange:c}),C=n.useRef(null),z=!v||(y||!!v.closest("form")),[R,T]=n.useState(new Set),L=Array.from(R).map((e=>e.props.value)).join(";");return Ii.jsx(Dc,{...h,children:Ii.jsxs(kf,{required:g,scope:t,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Hl(),value:S,onValueChange:P,open:k,onOpenChange:E,dir:j,triggerPointerDownPosRef:C,disabled:d,children:[Ii.jsx(mf.Provider,{scope:t,children:Ii.jsx(Sf,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:n.useCallback((e=>{T((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:r})}),z?Ii.jsxs(gp,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:S,onChange:e=>P(e.target.value),disabled:d,form:y,children:[void 0===S?Ii.jsx("option",{value:""}):null,Array.from(R)]},L):null]})})};Cf.displayName=vf;var zf="SelectTrigger",Rf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,a=jf(r),l=Ef(zf,r),s=l.disabled||o,c=Si(t,l.onTriggerChange),u=bf(r),f=n.useRef("touch"),[p,d,g]=yp((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=hp(t,e,r);void 0!==n&&l.onValueChange(n.value)})),y=e=>{s||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return Ii.jsx(Bc,{asChild:!0,...a,children:Ii.jsx(vl.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":dp(l.value)?"":void 0,...i,ref:c,onClick:gl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&y(e)})),onPointerDown:gl(i.onPointerDown,(e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())})),onKeyDown:gl(i.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||yf.includes(e.key)&&(y(),e.preventDefault())}))})})}));Rf.displayName=zf;var Tf="SelectValue",Lf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=Ef(Tf,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Si(t,s.onValueNodeChange);return Fl((()=>{c(u)}),[c,u]),Ii.jsx(vl.span,{...l,ref:f,style:{pointerEvents:"none"},children:dp(s.value)?Ii.jsx(Ii.Fragment,{children:a}):i})}));Lf.displayName=Tf;var Nf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Ii.jsx(vl.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Nf.displayName="SelectIcon";var Mf=e=>Ii.jsx(Vc,{asChild:!0,...e});Mf.displayName="SelectPortal";var If="SelectContent",Af=n.forwardRef(((e,t)=>{const r=Ef(If,e.__scopeSelect),[i,a]=n.useState();if(Fl((()=>{a(new DocumentFragment)}),[]),!r.open){const t=i;return t?o.createPortal(Ii.jsx(Df,{scope:e.__scopeSelect,children:Ii.jsx(mf.Slot,{scope:e.__scopeSelect,children:Ii.jsx("div",{children:e.children})})}),t):null}return Ii.jsx(Ff,{...e,ref:t})}));Af.displayName=If;var _f=10,[Df,Bf]=Of(If),Ff=n.forwardRef(((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v,...m}=e,b=Ef(If,r),[w,O]=n.useState(null),[x,j]=n.useState(null),k=Si(t,(e=>O(e))),[E,S]=n.useState(null),[P,C]=n.useState(null),z=bf(r),[R,T]=n.useState(!1),L=n.useRef(!1);n.useEffect((()=>{if(w)return Zc(w)}),[w]),Cl();const N=n.useCallback((e=>{const[t,...r]=z().map((e=>e.ref.current)),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&x&&(x.scrollTop=0),r===n&&x&&(x.scrollTop=x.scrollHeight),r?.focus(),document.activeElement!==o)return}}),[z,x]),M=n.useCallback((()=>N([E,w])),[N,E,w]);n.useEffect((()=>{R&&M()}),[R,M]);const{onOpenChange:I,triggerPointerDownPosRef:A}=b;n.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(A.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():w.contains(r.target)||I(!1),document.removeEventListener("pointermove",t),A.current=null};return null!==A.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}}),[w,I,A]),n.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[_,D]=yp((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=hp(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(L.current=!0))}),[b.value]),F=n.useCallback((()=>w?.focus()),[w]),W=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Vf:Wf,H=V===Vf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v}:{};return Ii.jsx(Df,{scope:r,content:w,viewport:x,onViewportChange:j,itemRefCallback:B,selectedItem:E,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:R,searchRef:_,children:Ii.jsx(_u,{as:Ai,allowPinchZoom:!0,children:Ii.jsx(Nl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:gl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Ii.jsx(kl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Ii.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:gl(m.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||D(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().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 r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout((()=>N(t))),e.preventDefault()}}))})})})})})}));Ff.displayName="SelectContentImpl";var Wf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,a=Ef(If,r),l=Bf(If,r),[s,c]=n.useState(null),[u,f]=n.useState(null),p=Si(t,(e=>f(e))),d=bf(r),g=n.useRef(!1),y=n.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=n.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&h&&v&&m){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=m.getBoundingClientRect();if("rtl"!==a.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-_f,f=ff(i,[_f,Math.max(_f,u-c)]);s.style.minWidth=l+"px",s.style.left=f+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,l=e.width+a,c=Math.max(l,t.width),u=window.innerWidth-_f,f=ff(i,[_f,Math.max(_f,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=d(),l=window.innerHeight-2*_f,c=h.scrollHeight,f=window.getComputedStyle(u),p=parseInt(f.borderTopWidth,10),y=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),w=p+y+c+parseInt(f.paddingBottom,10)+b,O=Math.min(5*v.offsetHeight,w),x=window.getComputedStyle(h),j=parseInt(x.paddingTop,10),k=parseInt(x.paddingBottom,10),E=e.top+e.height/2-_f,S=l-E,P=v.offsetHeight/2,C=p+y+(v.offsetTop+P),z=w-C;if(C<=E){const e=i.length>0&&v===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-h.offsetTop-h.offsetHeight,r=C+Math.max(S,P+(e?k:0)+t+b);s.style.height=r+"px"}else{const e=i.length>0&&v===i[0].ref.current;s.style.top="0px";const t=Math.max(E,p+h.offsetTop+(e?j:0)+P)+z;s.style.height=t+"px",h.scrollTop=C-E+h.offsetTop}s.style.margin=`${_f}px 0`,s.style.minHeight=O+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame((()=>g.current=!0))}}),[d,a.trigger,a.valueNode,s,u,h,v,m,a.dir,o]);Fl((()=>w()),[w]);const[O,x]=n.useState();Fl((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const j=n.useCallback((e=>{e&&!0===y.current&&(w(),b?.(),y.current=!1)}),[w,b]);return Ii.jsx(Hf,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:Ii.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Ii.jsx(vl.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Wf.displayName="SelectItemAlignedPosition";var Vf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=_f,...i}=e,a=jf(r);return Ii.jsx(Fc,{...a,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Vf.displayName="SelectPopperPosition";var[Hf,Uf]=Of(If,{}),Gf="SelectViewport",$f=n.forwardRef(((e,t)=>{const{__scopeSelect:r,nonce:o,...i}=e,a=Bf(Gf,r),l=Uf(Gf,r),s=Si(t,a.onViewportChange),c=n.useRef(0);return Ii.jsxs(Ii.Fragment,{children:[Ii.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),Ii.jsx(mf.Slot,{scope:r,children:Ii.jsx(vl.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:gl(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=l;if(n?.current&&r){const e=Math.abs(c.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*_f,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),l=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));$f.displayName=Gf;var qf="SelectGroup",[Yf,Xf]=Of(qf);n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Hl();return Ii.jsx(Yf,{scope:r,id:o,children:Ii.jsx(vl.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=qf;var Kf="SelectLabel",Jf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Xf(Kf,r);return Ii.jsx(vl.div,{id:o.id,...n,ref:t})}));Jf.displayName=Kf;var Zf="SelectItem",[Qf,ep]=Of(Zf),tp=n.forwardRef(((e,t)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...l}=e,s=Ef(Zf,r),c=Bf(Zf,r),u=s.value===o,[f,p]=n.useState(a??""),[d,g]=n.useState(!1),y=Si(t,(e=>c.itemRefCallback?.(e,o,i))),h=Hl(),v=n.useRef("touch"),m=()=>{i||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)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 Ii.jsx(Qf,{scope:r,value:o,disabled:i,textId:h,isSelected:u,onItemTextChange:n.useCallback((e=>{p((t=>t||(e?.textContent??"").trim()))}),[]),children:Ii.jsx(mf.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:Ii.jsx(vl.div,{role:"option","aria-labelledby":h,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:y,onFocus:gl(l.onFocus,(()=>g(!0))),onBlur:gl(l.onBlur,(()=>g(!1))),onClick:gl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:gl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:gl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:gl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:gl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:gl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(hf.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));tp.displayName=Zf;var rp="SelectItemText",np=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:i,style:a,...l}=e,s=Ef(rp,r),c=Bf(rp,r),u=ep(rp,r),f=Pf(rp,r),[p,d]=n.useState(null),g=Si(t,(e=>d(e)),u.onItemTextChange,(e=>c.itemTextRefCallback?.(e,u.value,u.disabled))),y=p?.textContent,h=n.useMemo((()=>Ii.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value)),[u.disabled,u.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:m}=f;return Fl((()=>(v(h),()=>m(h))),[v,m,h]),Ii.jsxs(Ii.Fragment,{children:[Ii.jsx(vl.span,{id:u.textId,...l,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?o.createPortal(l.children,s.valueNode):null]})}));np.displayName=rp;var op="SelectItemIndicator",ip=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return ep(op,r).isSelected?Ii.jsx(vl.span,{"aria-hidden":!0,...n,ref:t}):null}));ip.displayName=op;var ap="SelectScrollUpButton",lp=n.forwardRef(((e,t)=>{const r=Bf(ap,e.__scopeSelect),o=Uf(ap,e.__scopeSelect),[i,a]=n.useState(!1),l=Si(t,o.onScrollButtonChange);return Fl((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Ii.jsx(up,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));lp.displayName=ap;var sp="SelectScrollDownButton",cp=n.forwardRef(((e,t)=>{const r=Bf(sp,e.__scopeSelect),o=Uf(sp,e.__scopeSelect),[i,a]=n.useState(!1),l=Si(t,o.onScrollButtonChange);return Fl((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Ii.jsx(up,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));cp.displayName=sp;var up=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,a=Bf("SelectScrollButton",r),l=n.useRef(null),s=bf(r),c=n.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return n.useEffect((()=>()=>c()),[c]),Fl((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Ii.jsx(vl.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:gl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:gl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:gl(i.onPointerLeave,(()=>{c()}))})})),fp=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Ii.jsx(vl.div,{"aria-hidden":!0,...n,ref:t})}));fp.displayName="SelectSeparator";var pp="SelectArrow";function dp(e){return""===e||void 0===e}n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=jf(r),i=Ef(pp,r),a=Bf(pp,r);return i.open&&"popper"===a.position?Ii.jsx(Wc,{...o,...n,ref:t}):null})).displayName=pp;var gp=n.forwardRef(((e,t)=>{const{value:r,...o}=e,i=n.useRef(null),a=Si(t,i),l=function(e){const t=n.useRef({value:e,previous:e});return n.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(r);return n.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),Ii.jsx(gf,{asChild:!0,children:Ii.jsx("select",{...o,ref:a,defaultValue:r})})}));function yp(e){const t=ml(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback((e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(n)}),[t]),a=n.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return n.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function hp(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===n.length&&(i=i.filter((e=>e!==r)));const s=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return s!==r?s:void 0}gp.displayName="BubbleSelect";var vp=Rf,mp=Nf,bp=Mf,wp=Af,Op=$f,xp=Jf,jp=tp,kp=np,Ep=ip,Sp=lp,Pp=cp,Cp=fp,zp=Cf,Rp=Lf,Tp=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(vp,i({ref:t,className:li("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r)},l),o,n.createElement(mp,{asChild:!0},n.createElement(mi,{className:"h-4 w-4 opacity-50"})))}));Tp.displayName=vp.displayName;var Lp=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Sp,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(Oi,{className:"h-4 w-4"}))}));Lp.displayName=Sp.displayName;var Np=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Pp,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(mi,{className:"h-4 w-4"}))}));Np.displayName=Pp.displayName;var Mp=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=e.position,s=void 0===l?"popper":l,c=a(e,["className","children","position"]);return n.createElement(bp,null,n.createElement(wp,i({ref:t,className:li("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s},c),n.createElement(Lp,null),n.createElement(Op,{className:li("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),n.createElement(Np,null)))}));Mp.displayName=wp.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(xp,i({ref:t,className:li("px-2 py-1.5 text-sm font-semibold",r)},o))})).displayName=xp.displayName;var Ip=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(jp,i({ref:t,className:li("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r)},l),n.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},n.createElement(Ep,null,n.createElement(vi,{className:"h-4 w-4"}))),n.createElement(kp,null,o))}));function Ap(e){var t=e.className,r=e.dateFrom,o=e.dateTo,i=e.handleDateChange,a=n.useState({from:r||new Date(2022,0,20),to:o||g(new Date(2022,0,20),20)}),l=a[0],s=a[1],c=[{label:"Hier",getValue:function(){var e=new Date;return e.setDate(e.getDate()-1),{from:e,to:e}}},{label:"Cette semaine",getValue:function(){var e=new Date;return{from:m(e),to:A(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:N(e),to:L(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return y(e,-t,r)}(new Date,1);return{from:N(e),to:L(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:I(e),to:M(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return S(e,-t,r)}(new Date,1);return{from:I(e),to:M(e)}}}];return n.createElement("div",{className:li("grid gap-2",t)},n.createElement(sf,null,n.createElement(cf,{asChild:!0},n.createElement(Vi,{id:"date",variant:"outline",className:li("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},n.createElement(hi,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?n.createElement(n.Fragment,null,we(l.from,"LLL dd, y")," -"," ",we(l.to,"LLL dd, y")):we(l.from,"LLL dd, y"):n.createElement("span",null,"Choisissez une date"))),n.createElement(uf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},n.createElement(zp,{onValueChange:function(e){var t=c.find((function(t){return t.label===e}));if(t){var r=t.getValue();s(r),null==i||i(r)}}},n.createElement(Tp,{className:"w-[300px]"},n.createElement(Rp,{placeholder:"Sélectionnez un préréglage"})),n.createElement(Mp,{position:"popper"},c.map((function(e){return n.createElement(Ip,{key:e.label,value:e.label},e.label)})))),n.createElement("div",{className:"rounded-md border"},n.createElement(dl,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Ip.displayName=jp.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Cp,i({ref:t,className:li("-mx-1 my-1 h-px bg-muted",r)},o))})).displayName=Cp.displayName;var _p=n.forwardRef((function(e,t){var r=e.className,o=e.type,l=a(e,["className","type"]);return n.createElement("input",i({type:o,className:li("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t},l))}));function Dp(t){var r=this,o=t.title,a=t.filters,c=t.setFilters,u=t.configFilters,f=t.onSearch,p=t.count,d=t.isLoading,g=t.setCurrentPage,y=n.useState(a),h=y[0],v=y[1],m=e.useState(!1),b=m[0],w=m[1],O=n.useMemo((function(){return JSON.stringify(h)!==JSON.stringify(a)}),[h,a]),x=function(){return l(r,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return v(a),O?[4,g(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return f(),[2]}}))}))};return n.createElement("div",{className:"flex flex-col gap-2"},n.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(0, 137, 149)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"inline-block mr-2"},n.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),n.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),n.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),n.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),n.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),n.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),o,n.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},p)),n.createElement("div",{className:"border-b border-gray-100 mb-4"}),n.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},n.createElement(Ap,{dateFrom:a.fromDate,dateTo:a.toDate,handleDateChange:function(e){c(i(i({},a),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),u&&u.map((function(t,r){return n.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&n.createElement(_p,{type:"text",placeholder:t.placeholder,value:a[t.name],onChange:function(e){var r;e.target.value?c(i(i({},a),((r={})[t.name]=e.target.value,r))):(delete a[t.name],c(i({},a)))},onKeyDown:function(e){"Enter"===e.key&&x()}}),"Select"===t.type&&n.createElement(zp,{disabled:t.disabled||0===t.options.length,value:a[t.name],onValueChange:function(e){var r;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}},n.createElement(Tp,null,n.createElement(Rp,{placeholder:t.placeholder})),n.createElement(Mp,null,e.useMemo((function(){return t.options.map((function(e,t){return n.createElement(Ip,{key:"".concat(e.VALUE,"-").concat(t),value:e.VALUE||"_empty"},e.NAME)}))}),[t.options]))))})),n.createElement("div",{className:"flex gap-2 ml-auto"},u.some((function(e){return"Export"===e.type}))&&n.createElement(Vi,{disabled:b,onClick:function(){return l(r,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return w(!0),e=u.find((function(e){return"Export"===e.type})),[4,(i=null==e?void 0:e.ctx,l(r,void 0,void 0,(function(){var e,t,r,n,l,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(i),t=0,r=Object.entries(a);t<r.length;t++){var n=r[t],o=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===o||"toDate"===o){var s=new Date(l);e+="&".concat(o,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(o,"=").concat(l)}}return e}())];case 1:if(!(e=s.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=s.sent(),r=window.URL.createObjectURL(t),(n=document.createElement("a")).href=r,l="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),n.download=l,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n),[3,4];case 3:return c=s.sent(),console.error("Export error:",c),[3,4];case 4:return[2]}}))})))];case 1:return n.sent(),t=setInterval((function(){w(!1),clearInterval(t)}),3e4),[2]}var i}))}))},size:"sm"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.createElement("polyline",{points:"7 10 12 15 17 10"}),n.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),n.createElement(Vi,{size:"sm",onClick:x,disabled:d},O?n.createElement(n.Fragment,null,n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("circle",{cx:"11",cy:"11",r:"8"}),n.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):n.createElement(n.Fragment,null,n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"reload-icon","aria-hidden":"true"},n.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),n.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
27
27
|
/**
|
28
28
|
* table-core
|
29
29
|
*
|