mobigrid-module 1.1.25-beta.3 → 1.1.25-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +13 -0
- 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.js
CHANGED
@@ -23,7 +23,7 @@ const wi=(...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 Ri(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Mi(...t){return e.useCallback(Ri(...t),t)}function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ai,_i={exports:{}},Di={};var Bi,Fi,Wi={};function Vi(){return Bi||(Bi=1,"production"!==lt.env.NODE_ENV&&function(){var e=t,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"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator;var h=e.__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 p: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 f: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 T(){}T.__reactDisabledLog=!0;var L,N=h.ReactCurrentDispatcher;function R(e,t,r){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+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=N.current,N.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:T,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 p="\n"+l[c].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,p),p}}while(c>=1&&u>=0);break}}}finally{I=!1,N.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 f=e?e.displayName||e.name:"",d=f?R(f):"";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 R(e);switch(e){case u:return R("Suspense");case p:return R("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return _(e.render,!1);case f: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 Y,q,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 p="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){Y||(Y=!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,p),c&&function(e,t){var r=function(){q||(q=!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,p)}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!==f)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===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===f||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 pe=function(e,t,r){return ue(e,t,r,!1)},fe=function(e,t,r){return ue(e,t,r,!0)};Wi.Fragment=o,Wi.jsx=pe,Wi.jsxs=fe}()),Wi}var Hi=(Fi||(Fi=1,"production"===lt.env.NODE_ENV?_i.exports=function(){if(Ai)return Di;Ai=1;var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__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 Di.Fragment=n,Di.jsx=l,Di.jsxs=l,Di}():_i.exports=Vi()),_i.exports),Ui=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(Yi);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Hi.jsx(Gi,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Hi.jsx(Gi,{...o,ref:r,children:n})}));Ui.displayName="Slot";var Gi=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=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}(n);return e.cloneElement(n,{...qi(o,n.props),ref:r?Ri(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));Gi.displayName="SlotClone";var $i=({children:e})=>Hi.jsx(Hi.Fragment,{children:e});function Yi(t){return e.isValidElement(t)&&t.type===$i}function qi(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 Xi=xo("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"}}),Ki=e.forwardRef((function(t,r){var n=t.className,o=t.variant,i=t.size,a=t.asChild,l=void 0!==a&&a,s=g(t,["className","variant","size","asChild"]),c=l?Ui:"button";return e.createElement(c,d({className:yi(Xi({variant:o,size:i,className:n})),ref:r},s))}));Ki.displayName="Button";var Ji=function(){return Ji=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},Ji.apply(this,arguments)};function Zi(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 Qi(e){return"multiple"===e.mode}function ea(e){return"range"===e.mode}function ta(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var ra={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 na=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ce(e,"LLLL y",t)},formatDay:function(e,t){return Ce(e,"d",t)},formatMonthCaption:function(e,t){return Ce(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ce(e,"cccccc",t)},formatYearCaption:function(e,t){return Ce(e,"yyyy",t)}}),oa=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Ce(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 Ce(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ia=o(void 0);function aa(e){var t,r,n,o,i,a=e.initialProps,l=(r=ra,n=te,o=new Date,{captionLayout:"buttons",classNames:r,formatters:na,labels:oa,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=W(n):t&&(i=new Date(t,0,1)),o?a=F(o):r&&(a=new Date(r,11,31)),{fromDate:i?L(i):void 0,toDate:a?L(a):void 0}}(a),c=s.fromDate,u=s.toDate,p=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===p||c&&u||(p="buttons"),(ta(a)||Qi(a)||ea(a))&&(i=a.onSelect);var f=Ji(Ji(Ji({},l),a),{captionLayout:p,classNames:Ji(Ji({},l.classNames),a.classNames),components:Ji({},a.components),formatters:Ji(Ji({},l.formatters),a.formatters),fromDate:c,labels:Ji(Ji({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Ji(Ji({},l.modifiers),a.modifiers),modifiersClassNames:Ji(Ji({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Ji(Ji({},l.styles),a.styles),toDate:u});return Hi.jsx(ia.Provider,{value:f,children:e.children})}function la(){var e=i(ia);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function sa(e){var t=la(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Hi.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 ca(e){return Hi.jsx("svg",Ji({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Hi.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 ua(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=la(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ca;return Hi.jsxs("div",{className:l,style:s,children:[Hi.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Hi.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Hi.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Hi.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function pa(e){var t,r=la(),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 Hi.jsx(Hi.Fragment,{});if(!o)return Hi.jsx(Hi.Fragment,{});var p=[];if(function(e,t,r){const[n,o]=T(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=W(n),d=n.getMonth();d<=o.getMonth();d++)p.push(Ie(f,d));else for(f=W(new Date),d=0;d<=11;d++)p.push(Ie(f,d));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ua;return Hi.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=Ie(W(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:p.map((function(e){return Hi.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function fa(e){var t,r=e.displayMonth,n=la(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,p=n.labels.labelYearDropdown,f=[];if(!o)return Hi.jsx(Hi.Fragment,{});if(!i)return Hi.jsx(Hi.Fragment,{});for(var d=o.getFullYear(),g=i.getFullYear(),y=d;y<=g;y++)f.push(Ae(H(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ua;return Hi.jsx(h,{name:"years","aria-label":p(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ae(W(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map((function(e){return Hi.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function da(){var e=la(),t=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&&B(i,o)<0&&(o=j(i,-1*(s-1))),a&&B(o,a)<0&&(o=a),W(o)}(e),r=function(e,t){var r=a(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=W(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var ga=o(void 0);function ya(e){var t=la(),r=da(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=W(e),i=B(W(j(o,n)),o),a=[],l=0;l<i;l++){var s=j(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=W(e);if(!r)return j(l,a);if(!(B(r,e)<i))return j(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=W(e);if(!r)return j(a,-i);if(!(B(a,r)<=0))return j(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Re(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Ne(e,r)?o(j(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Hi.jsx(ga.Provider,{value:c,children:e.children})}function ha(){var e=i(ga);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function va(e){var t,r=la(),n=r.classNames,o=r.styles,i=r.components,a=ha().goToMonth,l=function(t){a(j(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:sa,c=Hi.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Hi.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Hi.jsx("div",{className:n.vhidden,children:c}),Hi.jsx(pa,{onChange:l,displayMonth:e.displayMonth}),Hi.jsx(fa,{onChange:l,displayMonth:e.displayMonth})]})}function ma(e){return Hi.jsx("svg",Ji({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Hi.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 ba(e){return Hi.jsx("svg",Ji({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Hi.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 wa=r((function(e,t){var r=la(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Ji(Ji({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Hi.jsx("button",Ji({},e,{ref:t,type:"button",className:a,style:l}))}));function Oa(e){var t,r,n=la(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,p=n.components;if(!e.nextMonth&&!e.previousMonth)return Hi.jsx(Hi.Fragment,{});var f=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==p?void 0:p.IconRight)&&void 0!==t?t:ba,v=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:ma;return Hi.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Hi.jsx(wa,{name:"previous-month","aria-label":f,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Hi.jsx(h,{className:a.nav_icon,style:l.nav_icon}):Hi.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Hi.jsx(wa,{name:"next-month","aria-label":g,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Hi.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Hi.jsx(h,{className:a.nav_icon,style:l.nav_icon})})]})}function xa(e){var t=la().numberOfMonths,r=ha(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Re(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),p=t>1&&(c||!s);return Hi.jsx(Oa,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:p,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function ja(e){var t,r,n=la(),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:sa;return r=i?Hi.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Hi.jsx(va,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(va,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Hi.jsx(xa,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Hi.jsx(xa,{displayMonth:e.displayMonth,id:e.id})]}),Hi.jsx("div",{className:o.caption,style:a.caption,children:r})}function ka(e){var t=la(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Hi.jsx("tfoot",{className:o,style:n.tfoot,children:Hi.jsx("tr",{children:Hi.jsx("td",{colSpan:8,children:r})})}):Hi.jsx(Hi.Fragment,{})}function Ea(){var e=la(),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?P(new Date):S(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=x(n,i);o.push(a)}return o}(o,i,a);return Hi.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Hi.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Hi.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 Sa(){var e,t=la(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Ea;return Hi.jsx("thead",{style:n.head,className:r.head,children:Hi.jsx(i,{})})}function Pa(e){var t=la(),r=t.locale,n=t.formatters.formatDay;return Hi.jsx(Hi.Fragment,{children:n(e.date,{locale:r})})}var Ca=o(void 0);function za(e){if(!Qi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Hi.jsx(Ca.Provider,{value:t,children:e.children})}return Hi.jsx(Ta,{initialProps:e.initialProps,children:e.children})}function Ta(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 _(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?Zi([],n):[];if(r.selected){var u=c.findIndex((function(t){return _(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 Hi.jsx(Ca.Provider,{value:l,children:r})}function La(){var e=i(Ca);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Na,Ra=o(void 0);function Ma(e){if(!ea(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Hi.jsx(Ra.Provider,{value:t,children:e.children})}return Hi.jsx(Ia,{initialProps:e.initialProps,children:e.children})}function Ia(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],_(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:Me(i,l-1),before:x(i,l-1)}),i&&a&&c.disabled.push({after:i,before:x(i,l-1)}),!i&&a&&c.disabled.push({after:Me(a,l-1),before:x(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:x(i,1-s)}),c.disabled.push({after:x(i,s-1)})),i&&a){var u=s-(N(a,i)+1);c.disabled.push({before:Me(i,u)}),c.disabled.push({after:x(a,u)})}!i&&a&&(c.disabled.push({before:x(a,1-s)}),c.disabled.push({after:x(a,s-1)}))}return Hi.jsx(Ra.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(_(o,e)&&_(n,e))return;if(_(o,e))return{from:o,to:void 0};if(_(n,e))return;return Le(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Le(e,o)?{from:o,to:e}:{from:e,to:o}:n?Ne(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 Aa(){var e=i(Ra);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function _a(e){return Array.isArray(e)?Zi([],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"}(Na||(Na={}));var Da=Na.Selected,Ba=Na.Disabled,Fa=Na.Hidden,Wa=Na.Today,Va=Na.RangeEnd,Ha=Na.RangeMiddle,Ua=Na.RangeStart,Ga=Na.Outside;var $a=o(void 0);function Ya(e){var t=la(),r=function(e,t,r){var n,o=((n={})[Da]=_a(e.selected),n[Ba]=_a(e.disabled),n[Fa]=_a(e.hidden),n[Wa]=[e.today],n[Va]=[],n[Ha]=[],n[Ua]=[],n[Ga]=[],n);return e.fromDate&&o[Ba].push({before:e.fromDate}),e.toDate&&o[Ba].push({after:e.toDate}),Qi(e)?o[Ba]=o[Ba].concat(t.modifiers[Ba]):ea(e)&&(o[Ba]=o[Ba].concat(r.modifiers[Ba]),o[Ua]=r.modifiers[Ua],o[Ha]=r.modifiers[Ha],o[Va]=r.modifiers[Va]),o}(t,La(),Aa()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=_a(n)})),t}(t.modifiers),o=Ji(Ji({},r),n);return Hi.jsx($a.Provider,{value:o,children:e.children})}function qa(){var e=i($a);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Xa(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(D(t))return _(e,t);if(function(e){return Array.isArray(e)&&e.every(D)}(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?(N(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),N(e,n)>=0&&N(o,e)>=0):o?_(o,e):!!n&&_(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=N(t.before,e)>0,n=N(t.after,e)<0;return Le(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?N(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?N(t.before,e)>0:"function"==typeof t&&t(e)}))}function Ka(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Xa(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Re(e,r)&&(o.outside=!0),o}function Ja(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,p=o.locale,f={day:x,week:R,month:j,year:M,startOfWeek:function(e){return o.ISOWeek?P(e):S(e,{locale:p,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?G(e):U(e,{locale:p,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?f=I([c,f]):"after"===n&&u&&(f=A([u,f]));var d=!0;if(i){var g=Ka(f,i);d=!g.disabled&&!g.hidden}return d?f:l.count>365?l.lastFocused:Ja(f,{moveBy:r,direction:n,context:o,modifiers:i,retry:Ji(Ji({},l),{count:l.count+1})})}var Za=o(void 0);function Qa(e){var t=ha(),r=qa(),n=a(),o=n[0],i=n[1],l=a(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=W(e[0]),i=F(e[e.length-1]),a=o;a<=i;){var l=Ka(a,t);if(l.disabled||l.hidden)a=x(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=x(a,1)}}return n||r}(t.displayMonths,r),p=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){i(e)},d=la(),g=function(e,n){if(o){var i=Ja(o,{moveBy:e,direction:n,context:d,modifiers:r});_(o,i)||(t.goToDate(i,o),f(i))}},y={focusedDay:o,focusTarget:p,blur:function(){c(o),i(void 0)},focus:f,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return Hi.jsx(Za.Provider,{value:y,children:e.children})}function el(){var e=i(Za);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var tl=o(void 0);function rl(e){if(!ta(e.initialProps)){var t={selected:void 0};return Hi.jsx(tl.Provider,{value:t,children:e.children})}return Hi.jsx(nl,{initialProps:e.initialProps,children:e.children})}function nl(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 Hi.jsx(tl.Provider,{value:n,children:r})}function ol(){var e=i(tl);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function il(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(Na).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function al(e,t,r){var n,o,i,a=la(),s=el(),c=function(e,t){return Ka(e,qa(),t)}(e,t),u=function(e,t){var r=la(),n=ol(),o=La(),i=Aa(),a=el(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,p=a.blur,f=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;ta(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):Qi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):ea(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;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;p(),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}(e,c),p=function(){var e=la(),t=ol(),r=La(),n=Aa();return ta(e)?t.selected:Qi(e)?r.selected:ea(e)?n.selected:void 0}(),f=Boolean(a.onDayClick||"default"!==a.mode);l((function(){var t;c.outside||s.focusedDay&&f&&_(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,f,c.outside]);var d=il(a,c).join(" "),g=function(e,t){var r=Ji({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Ji(Ji({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(a,c),y=Boolean(c.outside&&!a.showOutsideDays||c.hidden),h=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Pa,v={style:g,className:d,children:Hi.jsx(h,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&_(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&_(s.focusedDay,e),w=Ji(Ji(Ji({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||m?0:-1,n)),u);return{isButton:f,isHidden:y,activeModifiers:c,selectedDays:p,buttonProps:w,divProps:v}}function ll(e){var t=c(null),r=al(e.date,e.displayMonth,t);return r.isHidden?Hi.jsx("div",{role:"gridcell"}):r.isButton?Hi.jsx(wa,Ji({name:"day",ref:t},r.buttonProps)):Hi.jsx("div",Ji({},r.divProps))}function sl(e){var t=e.number,r=e.dates,n=la(),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 Hi.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Hi.jsx(wa,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function cl(e){var t,r,n,o=la(),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:ll,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:sl;return l&&(n=Hi.jsx("td",{className:a.cell,style:i.cell,children:Hi.jsx(u,{number:e.weekNumber,dates:e.dates})})),Hi.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Hi.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Hi.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+O(e)/1e3)}(t))}))]})}function ul(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?G(t):U(t,r),o=(null==r?void 0:r.ISOWeek)?P(e):S(e,r),i=N(n,o),a=[],l=0;l<=i;l++)a.push(x(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?re(t):oe(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 pl(e){var t,r,n,o=la(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,p=o.weekStartsOn,f=o.firstWeekContainsDate,d=o.ISOWeek,g=function(e,t){var r=ul(W(e),F(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Te(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=R(i,6-n),l=ul(R(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:p,firstWeekContainsDate:f}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:Sa,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:cl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ka;return Hi.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Hi.jsx(y,{}),Hi.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Hi.jsx(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Hi.jsx(v,{displayMonth:e.displayMonth})]})}var fl="undefined"!=typeof window&&window.document&&window.document.createElement?s:l,dl=!1,gl=0;function yl(){return"react-day-picker-".concat(++gl)}function hl(e){var t,r,n=la(),o=n.dir,i=n.classNames,s=n.styles,c=n.components,u=ha().displayMonths,p=function(e){var t,r=null!=e?e:dl?yl():null,n=a(r),o=n[0],i=n[1];return fl((function(){null===o&&i(yl())}),[]),l((function(){!1===dl&&(dl=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],g=s.month,y=0===e.displayIndex,h=e.displayIndex===u.length-1,v=!y&&!h;"rtl"===o&&(h=(t=[y,h])[0],y=t[1]),y&&(d.push(i.caption_start),g=Ji(Ji({},g),s.caption_start)),h&&(d.push(i.caption_end),g=Ji(Ji({},g),s.caption_end)),v&&(d.push(i.caption_between),g=Ji(Ji({},g),s.caption_between));var m=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:ja;return Hi.jsxs("div",{className:d.join(" "),style:g,children:[Hi.jsx(m,{id:p,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Hi.jsx(pl,{id:f,"aria-labelledby":p,displayMonth:e.displayMonth})]},e.displayIndex)}function vl(e){var t=la(),r=t.classNames,n=t.styles;return Hi.jsx("div",{className:r.months,style:n.months,children:e.children})}function ml(e){var t,r,n=e.initialProps,o=la(),i=el(),s=ha(),c=a(!1),u=c[0],p=c[1];l((function(){o.initialFocus&&i.focusTarget&&(u||(i.focus(i.focusTarget),p(!0)))}),[o.initialFocus,u,i.focus,i.focusTarget,i]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var d=Ji(Ji({},o.styles.root),o.style),g=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Ji(Ji({},e),((r={})[t]=n[t],r))}),{}),y=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:vl;return Hi.jsx("div",Ji({className:f.join(" "),style:d,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},g,{children:Hi.jsx(y,{children:s.displayMonths.map((function(e,t){return Hi.jsx(hl,{displayIndex:t,displayMonth:e},t)}))})}))}function bl(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 Hi.jsx(aa,{initialProps:r,children:Hi.jsx(ya,{children:Hi.jsx(rl,{initialProps:r,children:Hi.jsx(za,{initialProps:r,children:Hi.jsx(Ma,{initialProps:r,children:Hi.jsx(Ya,{children:Hi.jsx(Qa,{children:t})})})})})})})}function wl(e){return Hi.jsx(bl,Ji({},e,{children:Hi.jsx(ml,{initialProps:e})}))}function Ol(t){var r=t.className,n=t.classNames,o=t.showOutsideDays,i=void 0===o||o,a=g(t,["className","classNames","showOutsideDays"]);return e.createElement(wl,d({showOutsideDays:i,className:yi("p-3",r),classNames:d({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:yi(Xi({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:yi("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"===a.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:yi(Xi({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"},n),components:{IconLeft:function(){return e.createElement(Pi,{className:"h-4 w-4"})},IconRight:function(){return e.createElement(Ci,{className:"h-4 w-4"})}}},a))}function xl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function jl(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},kl(o,...r)]}function kl(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Ol.displayName="Calendar";var El=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?Ui:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Hi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function Sl(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}var Pl,Cl="dismissableLayer.update",zl="dismissableLayer.pointerDownOutside",Tl="dismissableLayer.focusOutside",Ll=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nl=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Ll),[p,f]=e.useState(null),d=p?.ownerDocument??globalThis?.document,[,g]=e.useState({}),y=Mi(r,(e=>f(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(v),b=p?h.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=Sl(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Ml(zl,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{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(t,r=globalThis?.document){const n=Sl(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Ml(Tl,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{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(t,r=globalThis?.document){const n=Sl(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),e.useEffect((()=>{if(p)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Pl=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Rl(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=Pl)}}),[p,d,n,u]),e.useEffect((()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Rl())}),[p,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Cl,e),()=>document.removeEventListener(Cl,e)}),[]),Hi.jsx(El.div,{...c,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:xl(t.onFocusCapture,j.onFocusCapture),onBlurCapture:xl(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:xl(t.onPointerDownCapture,x.onPointerDownCapture)})}));Nl.displayName="DismissableLayer";function Rl(){const e=new CustomEvent(Cl);document.dispatchEvent(e)}function Ml(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&p.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Ll),o=e.useRef(null),i=Mi(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Hi.jsx(El.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Il=0;function Al(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_l()),document.body.insertAdjacentElement("beforeend",e[1]??_l()),Il++,()=>{1===Il&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Il--}}),[])}function _l(){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 Dl="focusScope.autoFocusOnMount",Bl="focusScope.autoFocusOnUnmount",Fl={bubbles:!1,cancelable:!0},Wl=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Sl(i),p=Sl(a),f=e.useRef(null),d=Mi(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:Gl(f.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Gl(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Gl(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]),e.useEffect((()=>{if(s){$l.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Dl,Fl);s.addEventListener(Dl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gl(n,{select:t}),document.activeElement!==r)return}((e=Vl(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Gl(s))}return()=>{s.removeEventListener(Dl,u),setTimeout((()=>{const e=new CustomEvent(Bl,Fl);s.addEventListener(Bl,p),s.dispatchEvent(e),e.defaultPrevented||Gl(t??document.body,{select:!0}),s.removeEventListener(Bl,p),$l.remove(g)}),0)}}var e}),[s,u,p,g]);const y=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Vl(e),r=Hl(t,e),n=Hl(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Gl(i,{select:!0})):(e.preventDefault(),n&&Gl(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Hi.jsx(El.div,{tabIndex:-1,...l,ref:d,onKeyDown:y})}));function Vl(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 Hl(e,t){for(const r of e)if(!Ul(r,{upTo:t}))return r}function Ul(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 Gl(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()}}Wl.displayName="FocusScope";var $l=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Yl(e,t),e.unshift(t)},remove(t){e=Yl(e,t),e[0]?.resume()}}}();function Yl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ql=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},Xl=e["useId".toString()]||(()=>{}),Kl=0;function Jl(t){const[r,n]=e.useState(Xl());return ql((()=>{n((e=>e??String(Kl++)))}),[t]),r?`radix-${r}`:""}const Zl=["top","right","bottom","left"],Ql=Math.min,es=Math.max,ts=Math.round,rs=Math.floor,ns=e=>({x:e,y:e}),os={left:"right",right:"left",bottom:"top",top:"bottom"},is={start:"end",end:"start"};function as(e,t,r){return es(e,Ql(t,r))}function ls(e,t){return"function"==typeof e?e(t):e}function ss(e){return e.split("-")[0]}function cs(e){return e.split("-")[1]}function us(e){return"x"===e?"y":"x"}function ps(e){return"y"===e?"height":"width"}function fs(e){return["top","bottom"].includes(ss(e))?"y":"x"}function ds(e){return us(fs(e))}function gs(e){return e.replace(/start|end/g,(e=>is[e]))}function ys(e){return e.replace(/left|right|bottom|top/g,(e=>os[e]))}function hs(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 vs(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 ms(e,t,r){let{reference:n,floating:o}=e;const i=fs(t),a=ds(t),l=ps(a),s=ss(t),c="y"===i,u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,f=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:p};break;case"left":d={x:n.x-o.width,y:p};break;default:d={x:n.x,y:n.y}}switch(cs(t)){case"start":d[a]-=f*(r&&c?-1:1);break;case"end":d[a]+=f*(r&&c?-1:1)}return d}async function bs(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:p="floating",altBoundary:f=!1,padding:d=0}=ls(t,e),g=hs(d),y=l[f?"floating"===p?"reference":"floating":p],h=vs(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"===p?{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=vs(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 ws(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Os(e){return Zl.some((t=>e[t]>=0))}function xs(){return"undefined"!=typeof window}function js(e){return Ss(e)?(e.nodeName||"").toLowerCase():"#document"}function ks(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Es(e){var t;return null==(t=(Ss(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ss(e){return!!xs()&&(e instanceof Node||e instanceof ks(e).Node)}function Ps(e){return!!xs()&&(e instanceof Element||e instanceof ks(e).Element)}function Cs(e){return!!xs()&&(e instanceof HTMLElement||e instanceof ks(e).HTMLElement)}function zs(e){return!(!xs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ks(e).ShadowRoot)}function Ts(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=As(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ls(e){return["table","td","th"].includes(js(e))}function Ns(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rs(e){const t=Ms(),r=Ps(e)?As(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 Ms(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Is(e){return["html","body","#document"].includes(js(e))}function As(e){return ks(e).getComputedStyle(e)}function _s(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ds(e){if("html"===js(e))return e;const t=e.assignedSlot||e.parentNode||zs(e)&&e.host||Es(e);return zs(t)?t.host:t}function Bs(e){const t=Ds(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cs(t)&&Ts(t)?t:Bs(t)}function Fs(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Bs(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ks(o);if(i){const e=Ws(a);return t.concat(a,a.visualViewport||[],Ts(o)?o:[],e&&r?Fs(e):[])}return t.concat(o,Fs(o,[],r))}function Ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vs(e){const t=As(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Cs(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ts(r)!==i||ts(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Hs(e){return Ps(e)?e:e.contextElement}function Us(e){const t=Hs(e);if(!Cs(t))return ns(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Vs(t);let a=(i?ts(r.width):r.width)/n,l=(i?ts(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Gs=ns(0);function $s(e){const t=ks(e);return Ms()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Gs}function Ys(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Hs(e);let a=ns(1);t&&(n?Ps(n)&&(a=Us(n)):a=Us(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ks(e))&&t}(i,r,n)?$s(i):ns(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(i){const e=ks(i),t=n&&Ps(n)?ks(n):n;let r=e,o=Ws(r);for(;o&&n&&t!==r;){const e=Us(o),t=o.getBoundingClientRect(),n=As(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,p*=e.y,s+=i,c+=a,r=ks(o),o=Ws(r)}}return vs({width:u,height:p,x:s,y:c})}function qs(e,t){const r=_s(e).scrollLeft;return t?t.left+r:Ys(Es(e)).left+r}function Xs(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:qs(e,n)),y:n.top+t.scrollTop}}function Ks(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ks(e),n=Es(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=Ms();(!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=Es(e),r=_s(e),n=e.ownerDocument.body,o=es(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=es(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+qs(e);const l=-r.scrollTop;return"rtl"===As(n).direction&&(a+=es(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Es(e));else if(Ps(t))n=function(e,t){const r=Ys(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Cs(e)?Us(e):ns(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=$s(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vs(n)}function Js(e,t){const r=Ds(e);return!(r===t||!Ps(r)||Is(r))&&("fixed"===As(r).position||Js(r,t))}function Zs(e,t,r){const n=Cs(t),o=Es(t),i="fixed"===r,a=Ys(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=ns(0);if(n||!n&&!i)if(("body"!==js(t)||Ts(o))&&(l=_s(t)),n){const e=Ys(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=qs(o));const c=!o||n||i?ns(0):Xs(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 Qs(e){return"static"===As(e).position}function ec(e,t){if(!Cs(e)||"fixed"===As(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Es(e)===r&&(r=r.ownerDocument.body),r}function tc(e,t){const r=ks(e);if(Ns(e))return r;if(!Cs(e)){let t=Ds(e);for(;t&&!Is(t);){if(Ps(t)&&!Qs(t))return t;t=Ds(t)}return r}let n=ec(e,t);for(;n&&Ls(n)&&Qs(n);)n=ec(n,t);return n&&Is(n)&&Qs(n)&&!Rs(n)?r:n||function(e){let t=Ds(e);for(;Cs(t)&&!Is(t);){if(Rs(t))return t;if(Ns(t))return null;t=Ds(t)}return null}(e)||r}const rc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=Es(n),l=!!t&&Ns(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=ns(1);const u=ns(0),p=Cs(n);if((p||!p&&!i)&&(("body"!==js(n)||Ts(a))&&(s=_s(n)),Cs(n))){const e=Ys(n);c=Us(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||p||i?ns(0):Xs(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+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:Es,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Ns(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Fs(e,[],!1).filter((e=>Ps(e)&&"body"!==js(e))),o=null;const i="fixed"===As(e).position;let a=i?Ds(e):e;for(;Ps(a)&&!Is(a);){const t=As(a),r=Rs(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ts(a)&&!r&&Js(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ds(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=Ks(t,r,o);return e.top=es(n.top,e.top),e.right=Ql(n.right,e.right),e.bottom=Ql(n.bottom,e.bottom),e.left=es(n.left,e.left),e}),Ks(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:tc,getElementRects:async function(e){const t=this.getOffsetParent||tc,r=this.getDimensions,n=await r(e.floating);return{reference:Zs(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}=Vs(e);return{width:t,height:r}},getScale:Us,isElement:Ps,isRTL:function(e){return"rtl"===As(e).direction}};function nc(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=Hs(e),u=o||i?[...c?Fs(c):[],...Fs(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const p=c&&l?function(e,t){let r,n=null;const o=Es(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:p,height:f}=e.getBoundingClientRect();if(l||t(),!p||!f)return;const d={rootMargin:-rs(u)+"px "+-rs(o.clientWidth-(c+p))+"px "+-rs(o.clientHeight-(u+f))+"px "+-rs(c)+"px",threshold:es(0,Ql(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 f,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?Ys(e):null;return s&&function t(){const n=Ys(e);!y||n.x===y.x&&n.y===y.y&&n.width===y.width&&n.height===y.height||r();y=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==p||p(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(f)}}const oc=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=ss(r),l=cs(r),s="y"===fs(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,p=ls(t,e);let{mainAxis:f,crossAxis:d,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof g&&(d="end"===l?-1*g:g),s?{x:d*u,y:f*c}:{x:f*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}}}}},ic=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}=ls(e,t),c={x:r,y:n},u=await bs(t,s),p=fs(ss(o)),f=us(p);let d=c[f],g=c[p];if(i){const e="y"===f?"bottom":"right";d=as(d+u["y"===f?"top":"left"],d,d-u[e])}if(a){const e="y"===p?"bottom":"right";g=as(g+u["y"===p?"top":"left"],g,g-u[e])}const y=l.fn({...t,[f]:d,[p]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:i,[p]:a}}}}}},ac=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:p=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...h}=ls(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=ss(o),m=fs(l),b=ss(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(b||!y?[ys(l)]:function(e){const t=ys(e);return[gs(e),t,gs(t)]}(l)),x="none"!==g;!f&&x&&O.push(...function(e,t,r,n){const o=cs(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[]}}(ss(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(gs)))),i}(l,y,g,w));const j=[l,...O],k=await bs(t,h),E=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&E.push(k[v]),p){const e=function(e,t,r){void 0===r&&(r=!1);const n=cs(e),o=ds(e),i=ps(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ys(a)),[a,ys(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=fs(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{}}}},lc=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}=ls(e,t),u=await bs(t,c),p=ss(o),f=cs(o),d="y"===fs(o),{width:g,height:y}=i.floating;let h,v;"top"===p||"bottom"===p?(h=p,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=p,h="end"===f?"top":"bottom");const m=y-u.top-u.bottom,b=g-u.left-u.right,w=Ql(y-u[h],m),O=Ql(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&&!f){const e=es(u.left,0),t=es(u.right,0),r=es(u.top,0),n=es(u.bottom,0);d?k=g-2*(0!==e||0!==t?e+t:es(u.left,u.right)):j=y-2*(0!==r||0!==n?r+n:es(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}}:{}}}},sc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ls(e,t);switch(n){case"referenceHidden":{const e=ws(await bs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Os(e)}}}case"escaped":{const e=ws(await bs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Os(e)}}}default:return{}}}}},cc=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}=ls(e,t)||{};if(null==c)return{};const p=hs(u),f={x:r,y:n},d=ds(o),g=ps(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]-f[d]-i.floating[g],O=f[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=Ql(p[v],E),P=Ql(p[m],E),C=S,z=j-y[g]-P,T=j/2-y[g]/2+k,L=as(C,T,z),N=!s.arrow&&null!=cs(o)&&T!==L&&i.reference[g]/2-(T<C?S:P)-y[g]/2<0,R=N?T<C?T-C:T-z:0;return{[d]:f[d]+R,data:{[d]:L,centerOffset:T-L-R,...N&&{alignmentOffset:R}},reset:N}}}),uc=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}=ls(e,t),u={x:r,y:n},p=fs(o),f=us(p);let d=u[f],g=u[p];const y=ls(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,r=i.reference[f]+i.reference[e]-h.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,m;const e="y"===f?"width":"height",t=["top","left"].includes(ss(o)),r=i.reference[p]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[p])||0)+(t?0:h.crossAxis),n=i.reference[p]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[p])||0)-(t?h.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[f]:d,[p]:g}}}},pc=(e,t,r)=>{const n=new Map,o={platform:rc,...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:p}=ms(c,n,s),f=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:p,initialPlacement:n,placement:f,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,p=null!=v?v:p,d={...d,[i]:{...d[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:p}=ms(c,f,s))),r=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var fc="undefined"!=typeof document?s:l;function dc(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(!dc(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)&&!dc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function gc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yc(e,t){const r=gc(e);return Math.round(t*r)/r}function hc(t){const r=e.useRef(t);return fc((()=>{r.current=t})),r}const vc=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?cc({element:r.current,padding:n}).fn(t):{}:r?cc({element:r,padding:n}).fn(t):{};var o}}),mc=(e,t)=>({...oc(e),options:[e,t]}),bc=(e,t)=>({...ic(e),options:[e,t]}),wc=(e,t)=>({...uc(e),options:[e,t]}),Oc=(e,t)=>({...ac(e),options:[e,t]}),xc=(e,t)=>({...lc(e),options:[e,t]}),jc=(e,t)=>({...sc(e),options:[e,t]}),kc=(e,t)=>({...vc(e),options:[e,t]});var Ec=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Hi.jsx(El.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Hi.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Ec.displayName="Arrow";var Sc=Ec;function Pc(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var Cc="Popper",[zc,Tc]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Pc(o,...r)]}(Cc),[Lc,Nc]=zc(Cc),Rc=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return Hi.jsx(Lc,{scope:r,anchor:o,onAnchorChange:i,children:n})};Rc.displayName=Cc;var Mc="PopperAnchor",Ic=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=Nc(Mc,n),l=e.useRef(null),s=Mi(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Hi.jsx(El.div,{...i,ref:s})}));Ic.displayName=Mc;var Ac="PopperContent",[_c,Dc]=zc(Ac),Bc=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:h,...v}=t,m=Nc(Ac,n),[b,w]=e.useState(null),O=Mi(r,(e=>w(e))),[x,j]=e.useState(null),k=function(t){const[r,n]=e.useState(void 0);return ql((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}(x),E=k?.width??0,S=k?.height??0,P=o+("center"!==a?"-"+a:""),C="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(Hc),altBoundary:T},{refs:N,floatingStyles:R,placement:M,isPositioned:I,middlewareData:A}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[f,d]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[g,y]=e.useState(o);dc(g,o)||y(o);const[h,v]=e.useState(null),[m,b]=e.useState(null),w=e.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),O=e.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),x=a||h,j=l||m,k=e.useRef(null),E=e.useRef(null),S=e.useRef(f),P=null!=c,C=hc(c),z=hc(i),T=hc(u),L=e.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:r,strategy:n,middleware:g};z.current&&(e.platform=z.current),pc(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};N.current&&!dc(S.current,t)&&(S.current=t,p.flushSync((()=>{d(t)})))}))}),[g,r,n,z,T]);fc((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);fc((()=>(N.current=!0,()=>{N.current=!1})),[]),fc((()=>{if(x&&(k.current=x),j&&(E.current=j),x&&j){if(C.current)return C.current(x,j,L);L()}}),[x,j,L,C,P]);const R=e.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:O})),[w,O]),M=e.useMemo((()=>({reference:x,floating:j})),[x,j]),I=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=yc(M.floating,f.x),r=yc(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...gc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,M.floating,f.x,f.y]);return e.useMemo((()=>({...f,update:L,refs:R,elements:M,floatingStyles:I})),[f,L,R,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>nc(...e,{animationFrame:"always"===y}),elements:{reference:m.anchor},middleware:[mc({mainAxis:i+S,alignmentAxis:l}),c&&bc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?wc():void 0,...L}),c&&Oc({...L}),xc({...L,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&&kc({element:x,padding:s}),Uc({arrowWidth:E,arrowHeight:S}),g&&jc({strategy:"referenceHidden",...L})]}),[_,D]=Gc(M),B=Sl(h);ql((()=>{I&&B?.()}),[I,B]);const F=A.arrow?.x,W=A.arrow?.y,V=0!==A.arrow?.centerOffset,[H,U]=e.useState();return ql((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Hi.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.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:t.dir,children:Hi.jsx(_c,{scope:n,placedSide:_,onArrowChange:j,arrowX:F,arrowY:W,shouldHideArrow:V,children:Hi.jsx(El.div,{"data-side":_,"data-align":D,...v,ref:O,style:{...v.style,animation:I?void 0:"none"}})})})}));Bc.displayName=Ac;var Fc="PopperArrow",Wc={top:"bottom",right:"left",bottom:"top",left:"right"},Vc=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Dc(Fc,r),i=Wc[o.placedSide];return Hi.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:Hi.jsx(Sc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Hc(e){return null!==e}Vc.displayName=Fc;var Uc=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]=Gc(r),u={start:"0%",center:"50%",end:"100%"}[c],p=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let d="",g="";return"bottom"===s?(d=i?u:`${p}px`,g=-l+"px"):"top"===s?(d=i?u:`${p}px`,g=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",g=i?u:`${f}px`):"left"===s&&(d=`${n.floating.width+l}px`,g=i?u:`${f}px`),{data:{x:d,y:g}}}});function Gc(e){const[t,r="center"]=e.split("-");return[t,r]}var $c=Rc,Yc=Ic,qc=Bc,Xc=Vc,Kc=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);ql((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?f.createPortal(Hi.jsx(El.div,{...o,ref:r}),l):null}));Kc.displayName="Portal";var Jc=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Zc(o.current);a.current="mounted"===s?e:"none"}),[s]),ql((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=Zc(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),ql((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=Zc(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=Zc(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Mi(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 n||o.isPresent?e.cloneElement(i,{ref:a}):null};function Zc(e){return e?.animationName||"none"}function Qc({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=Sl(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=Sl(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}Jc.displayName="Presence";var eu=new WeakMap,tu=new WeakMap,ru={},nu=0,ou=function(e){return e&&(e.host||ou(e.parentNode))},iu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=ou(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]);ru[r]||(ru[r]=new WeakMap);var i=ru[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=(eu.get(e)||0)+1,c=(i.get(e)||0)+1;eu.set(e,s),i.set(e,c),a.push(e),1===s&&o&&tu.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(),nu++,function(){a.forEach((function(e){var t=eu.get(e)-1,o=i.get(e)-1;eu.set(e,t),i.set(e,o),t||(tu.has(e)||e.removeAttribute(n),tu.delete(e)),o||e.removeAttribute(r)})),--nu||(eu=new WeakMap,eu=new WeakMap,tu=new WeakMap,ru={})}},au=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]"))),iu(n,o,r,"aria-hidden")):function(){return null}},lu="right-scroll-bar-position",su="width-before-scroll-bar";function cu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var uu="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,pu=new WeakMap;function fu(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return cu(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return uu((function(){var t=pu.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||cu(e,null)})),n.forEach((function(e){r.has(e)||cu(e,o)}))}pu.set(i,e)}),[e]),i}function du(e){return e}var gu=function(t){var r=t.sideCar,n=g(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,d({},n))};gu.isSideCarExport=!0;var yu=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=du);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=d({async:!0,ssr:!1},e),t}(),hu=function(){},vu=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:hu,onWheelCapture:hu,onTouchMoveCapture:hu}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,p=t.enabled,f=t.shards,y=t.sideCar,h=t.noIsolation,v=t.inert,m=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,O=t.gapMode,x=g(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=y,k=fu([n,r]),E=d(d({},x),i);return e.createElement(e.Fragment,null,p&&e.createElement(j,{sideCar:yu,removeScrollBar:u,shards:f,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:O}),l?e.cloneElement(e.Children.only(s),d(d({},E),{ref:k})):e.createElement(w,d({},E,{className:c,ref:k}),s))}));vu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vu.classNames={fullWidth:su,zeroRight:lu};function mu(){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 bu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=mu())&&(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)}}},wu=function(){var t,r=(t=bu(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},Ou={left:0,top:0,right:0,gap:0},xu=function(e){return parseInt(e||"",10)||0},ju=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ou;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[xu(r),xu(n),xu(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])}},ku=wu(),Eu="data-scroll-locked",Su=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(Eu,"] {\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(lu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(su," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(lu," .").concat(lu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(su," .").concat(su," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Eu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Pu=function(){var e=parseInt(document.body.getAttribute(Eu)||"0",10);return isFinite(e)?e:0},Cu=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Eu,(Pu()+1).toString()),function(){var e=Pu()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}}),[]);var a=e.useMemo((function(){return ju(i)}),[i]);return e.createElement(ku,{styles:Su(a,!r,i,n?"":"!important")})},zu=!1;if("undefined"!=typeof window)try{var Tu=Object.defineProperty({},"passive",{get:function(){return zu=!0,!0}});window.addEventListener("test",Tu,Tu),window.removeEventListener("test",Tu,Tu)}catch(e){zu=!1}var Lu=!!zu&&{passive:!1},Nu=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])},Ru=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Mu(e,n)){var o=Iu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Mu=function(e,t){return"v"===e?function(e){return Nu(e,"overflowY")}(t):function(e){return Nu(e,"overflowX")}(t)},Iu=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},Au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_u=function(e){return[e.deltaX,e.deltaY]},Du=function(e){return e&&"current"in e?e.current:e},Bu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Fu=0,Wu=[];function Vu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hu,Uu=(Hu=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Fu++)[0],a=e.useState(wu)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=v([t.lockRef.current],(t.shards||[]).map(Du),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Au(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,p=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===p&&"range"===u.type)return!1;var f=Ru(p,u);if(!f)return!0;if(f?r=p:(r="v"===p?"h":"v",f=Ru(p,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var d=o.current||r;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,p=0,f=0;do{var d=Iu(e,l),g=d[0],y=d[1]-d[2]-i*g;(g||y)&&Mu(e,l)&&(p+=y,f+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(p)<1||!o)?c=!0:u||!(Math.abs(f)<1)&&o||(c=!0),c}(d,t,e,"h"===d?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Wu.length&&Wu[Wu.length-1]===a){var n="deltaY"in t?_u(t):Au(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Du).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:Vu(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),p=e.useCallback((function(e){n.current=Au(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,_u(e),e.target,s(e,t.lockRef.current))}),[]),d=e.useCallback((function(e){u(e.type,Au(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Wu.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Lu),document.addEventListener("touchmove",c,Lu),document.addEventListener("touchstart",p,Lu),function(){Wu=Wu.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Lu),document.removeEventListener("touchmove",c,Lu),document.removeEventListener("touchstart",p,Lu)}}),[]);var g=t.removeScrollBar,y=t.inert;return e.createElement(e.Fragment,null,y?e.createElement(a,{styles:Bu(i)}):null,g?e.createElement(Cu,{gapMode:t.gapMode}):null)},yu.useMedium(Hu),gu),Gu=e.forwardRef((function(t,r){return e.createElement(vu,d({},t,{ref:r,sideCar:Uu}))}));Gu.classNames=vu.classNames;var $u="Popover",[Yu,qu]=jl($u,[Tc]),Xu=Tc(),[Ku,Ju]=Yu($u),Zu=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=Xu(r),c=e.useRef(null),[u,p]=e.useState(!1),[f=!1,d]=Qc({prop:o,defaultProp:i,onChange:a});return Hi.jsx($c,{...s,children:Hi.jsx(Ku,{scope:r,contentId:Jl(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>p(!1)),[]),modal:l,children:n})})};Zu.displayName=$u;var Qu="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=Ju(Qu,n),a=Xu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),Hi.jsx(Yc,{...a,...o,ref:r})})).displayName=Qu;var ep="PopoverTrigger",tp=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Ju(ep,r),i=Xu(r),a=Mi(t,o.triggerRef),l=Hi.jsx(El.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fp(o.open),...n,ref:a,onClick:xl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Hi.jsx(Yc,{asChild:!0,...i,children:l})}));tp.displayName=ep;var rp="PopoverPortal",[np,op]=Yu(rp,{forceMount:void 0}),ip=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Ju(rp,t);return Hi.jsx(np,{scope:t,forceMount:r,children:Hi.jsx(Jc,{present:r||i.open,children:Hi.jsx(Kc,{asChild:!0,container:o,children:n})})})};ip.displayName=rp;var ap="PopoverContent",lp=e.forwardRef(((e,t)=>{const r=op(ap,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Ju(ap,e.__scopePopover);return Hi.jsx(Jc,{present:n||i.open,children:i.modal?Hi.jsx(sp,{...o,ref:t}):Hi.jsx(cp,{...o,ref:t})})}));lp.displayName=ap;var sp=e.forwardRef(((t,r)=>{const n=Ju(ap,t.__scopePopover),o=e.useRef(null),i=Mi(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return au(e)}),[]),Hi.jsx(Gu,{as:Ui,allowPinchZoom:!0,children:Hi.jsx(up,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xl(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:xl(t.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:xl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),cp=e.forwardRef(((t,r)=>{const n=Ju(ap,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return Hi.jsx(up,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),up=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...p}=e,f=Ju(ap,r),d=Xu(r);return Al(),Hi.jsx(Wl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Hi.jsx(Nl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:Hi.jsx(qc,{"data-state":fp(f.open),role:"dialog",id:f.contentId,...d,...p,ref:t,style:{...p.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)"}})})})})),pp="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Ju(pp,r);return Hi.jsx(El.button,{type:"button",...n,ref:t,onClick:xl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=pp;function fp(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Xu(r);return Hi.jsx(Xc,{...o,...n,ref:t})})).displayName="PopoverArrow";var dp=ip,gp=lp,yp=Zu,hp=tp,vp=e.forwardRef((function(t,r){var n=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,l=void 0===a?4:a,s=g(t,["className","align","sideOffset"]);return e.createElement(dp,null,e.createElement(gp,d({ref:r,align:i,sideOffset:l,className:yi("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",n)},s)))}));function mp(e,[t,r]){return Math.min(r,Math.max(t,e))}function bp(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}vp.displayName=gp.displayName;var wp=e.createContext(void 0);var Op=e.forwardRef(((e,t)=>Hi.jsx(El.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}})));Op.displayName="VisuallyHidden";var xp=[" ","Enter","ArrowUp","ArrowDown"],jp=[" ","Enter"],kp="Select",[Ep,Sp,Pp]=function(r){const n=r+"CollectionProvider",[o,i]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},bp(o,...r)]}(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:r,children:n}=e,o=t.useRef(null),i=t.useRef(new Map).current;return Hi.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=n;const c=r+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Mi(t,l(c,r).collectionRef);return Hi.jsx(Ui,{ref:o,children:n})}));u.displayName=c;const p=r+"CollectionItemSlot",f="data-radix-collection-item",d=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,a=t.useRef(null),s=Mi(r,a),c=l(p,n);return t.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Hi.jsx(Ui,{[f]:"",ref:s,children:o})}));return d.displayName=p,[{Provider:s,Slot:u,ItemSlot:d},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(kp),[Cp,zp]=jl(kp,[Pp,Tc]),Tp=Tc(),[Lp,Np]=Cp(kp),[Rp,Mp]=Cp(kp),Ip=t=>{const{__scopeSelect:r,children:n,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:p,autoComplete:f,disabled:d,required:g,form:y}=t,h=Tp(r),[v,m]=e.useState(null),[b,w]=e.useState(null),[O,x]=e.useState(!1),j=function(t){const r=e.useContext(wp);return t||r||"ltr"}(u),[k=!1,E]=Qc({prop:o,defaultProp:i,onChange:a}),[S,P]=Qc({prop:l,defaultProp:s,onChange:c}),C=e.useRef(null),z=!v||(y||!!v.closest("form")),[T,L]=e.useState(new Set),N=Array.from(T).map((e=>e.props.value)).join(";");return Hi.jsx($c,{...h,children:Hi.jsxs(Lp,{required:g,scope:r,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Jl(),value:S,onValueChange:P,open:k,onOpenChange:E,dir:j,triggerPointerDownPosRef:C,disabled:d,children:[Hi.jsx(Ep.Provider,{scope:r,children:Hi.jsx(Rp,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{L((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{L((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:n})}),z?Hi.jsxs(xf,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:f,value:S,onChange:e=>P(e.target.value),disabled:d,form:y,children:[void 0===S?Hi.jsx("option",{value:""}):null,Array.from(T)]},N):null]})})};Ip.displayName=kp;var Ap="SelectTrigger",_p=e.forwardRef(((t,r)=>{const{__scopeSelect:n,disabled:o=!1,...i}=t,a=Tp(n),l=Np(Ap,n),s=l.disabled||o,c=Mi(r,l.onTriggerChange),u=Sp(n),p=e.useRef("touch"),[f,d,g]=jf((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=kf(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 Hi.jsx(Yc,{asChild:!0,...a,children:Hi.jsx(El.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":Of(l.value)?"":void 0,...i,ref:c,onClick:xl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)})),onPointerDown:xl(i.onPointerDown,(e=>{p.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:xl(i.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||xp.includes(e.key)&&(y(),e.preventDefault())}))})})}));_p.displayName=Ap;var Dp="SelectValue",Bp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=Np(Dp,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,p=Mi(t,s.onValueNodeChange);return ql((()=>{c(u)}),[c,u]),Hi.jsx(El.span,{...l,ref:p,style:{pointerEvents:"none"},children:Of(s.value)?Hi.jsx(Hi.Fragment,{children:a}):i})}));Bp.displayName=Dp;var Fp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Hi.jsx(El.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Fp.displayName="SelectIcon";var Wp=e=>Hi.jsx(Kc,{asChild:!0,...e});Wp.displayName="SelectPortal";var Vp="SelectContent",Hp=e.forwardRef(((t,r)=>{const n=Np(Vp,t.__scopeSelect),[o,i]=e.useState();if(ql((()=>{i(new DocumentFragment)}),[]),!n.open){const e=o;return e?p.createPortal(Hi.jsx(Gp,{scope:t.__scopeSelect,children:Hi.jsx(Ep.Slot,{scope:t.__scopeSelect,children:Hi.jsx("div",{children:t.children})})}),e):null}return Hi.jsx(Yp,{...t,ref:r})}));Hp.displayName=Vp;var Up=10,[Gp,$p]=Cp(Vp),Yp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v,...m}=t,b=Np(Vp,n),[w,O]=e.useState(null),[x,j]=e.useState(null),k=Mi(r,(e=>O(e))),[E,S]=e.useState(null),[P,C]=e.useState(null),z=Sp(n),[T,L]=e.useState(!1),N=e.useRef(!1);e.useEffect((()=>{if(w)return au(w)}),[w]),Al();const R=e.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=e.useCallback((()=>R([E,w])),[R,E,w]);e.useEffect((()=>{T&&M()}),[T,M]);const{onOpenChange:I,triggerPointerDownPosRef:A}=b;e.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]),e.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]=jf((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=kf(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(N.current=!0))}),[b.value]),F=e.useCallback((()=>w?.focus()),[w]),W=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Xp:qp,H=V===Xp?{side:s,sideOffset:c,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v}:{};return Hi.jsx(Gp,{scope:n,content:w,viewport:x,onViewportChange:j,itemRefCallback:B,selectedItem:E,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:T,searchRef:_,children:Hi.jsx(Gu,{as:Ui,allowPinchZoom:!0,children:Hi.jsx(Wl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:xl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Hi.jsx(Nl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Hi.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>L(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:xl(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((()=>R(t))),e.preventDefault()}}))})})})})})}));Yp.displayName="SelectContentImpl";var qp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onPlaced:o,...i}=t,a=Np(Vp,n),l=$p(Vp,n),[s,c]=e.useState(null),[u,p]=e.useState(null),f=Mi(r,(e=>p(e))),d=Sp(n),g=e.useRef(!1),y=e.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=e.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-Up,p=mp(i,[Up,Math.max(Up,u-c)]);s.style.minWidth=l+"px",s.style.left=p+"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-Up,p=mp(i,[Up,Math.max(Up,u-c)]);s.style.minWidth=l+"px",s.style.right=p+"px"}const i=d(),l=window.innerHeight-2*Up,c=h.scrollHeight,p=window.getComputedStyle(u),f=parseInt(p.borderTopWidth,10),y=parseInt(p.paddingTop,10),b=parseInt(p.borderBottomWidth,10),w=f+y+c+parseInt(p.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-Up,S=l-E,P=v.offsetHeight/2,C=f+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,f+h.offsetTop+(e?j:0)+P)+z;s.style.height=t+"px",h.scrollTop=C-E+h.offsetTop}s.style.margin=`${Up}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]);ql((()=>w()),[w]);const[O,x]=e.useState();ql((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const j=e.useCallback((e=>{e&&!0===y.current&&(w(),b?.(),y.current=!1)}),[w,b]);return Hi.jsx(Kp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:Hi.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Hi.jsx(El.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));qp.displayName="SelectItemAlignedPosition";var Xp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Up,...i}=e,a=Tp(r);return Hi.jsx(qc,{...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)"}})}));Xp.displayName="SelectPopperPosition";var[Kp,Jp]=Cp(Vp,{}),Zp="SelectViewport",Qp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,nonce:o,...i}=t,a=$p(Zp,n),l=Jp(Zp,n),s=Mi(r,a.onViewportChange),c=e.useRef(0);return Hi.jsxs(Hi.Fragment,{children:[Hi.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}),Hi.jsx(Ep.Slot,{scope:n,children:Hi.jsx(El.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xl(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*Up,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}))})})]})}));Qp.displayName=Zp;var ef="SelectGroup",[tf,rf]=Cp(ef);e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Jl();return Hi.jsx(tf,{scope:r,id:o,children:Hi.jsx(El.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=ef;var nf="SelectLabel",of=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=rf(nf,r);return Hi.jsx(El.div,{id:o.id,...n,ref:t})}));of.displayName=nf;var af="SelectItem",[lf,sf]=Cp(af),cf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...l}=t,s=Np(af,n),c=$p(af,n),u=s.value===o,[p,f]=e.useState(a??""),[d,g]=e.useState(!1),y=Mi(r,(e=>c.itemRefCallback?.(e,o,i))),h=Jl(),v=e.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 Hi.jsx(lf,{scope:n,value:o,disabled:i,textId:h,isSelected:u,onItemTextChange:e.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:Hi.jsx(Ep.ItemSlot,{scope:n,value:o,disabled:i,textValue:p,children:Hi.jsx(El.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:xl(l.onFocus,(()=>g(!0))),onBlur:xl(l.onBlur,(()=>g(!1))),onClick:xl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:xl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:xl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:xl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:xl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:xl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(jp.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));cf.displayName=af;var uf="SelectItemText",pf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,className:o,style:i,...a}=t,l=Np(uf,n),s=$p(uf,n),c=sf(uf,n),u=Mp(uf,n),[f,d]=e.useState(null),g=Mi(r,(e=>d(e)),c.onItemTextChange,(e=>s.itemTextRefCallback?.(e,c.value,c.disabled))),y=f?.textContent,h=e.useMemo((()=>Hi.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value)),[c.disabled,c.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:m}=u;return ql((()=>(v(h),()=>m(h))),[v,m,h]),Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(El.span,{id:c.textId,...a,ref:g}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?p.createPortal(a.children,l.valueNode):null]})}));pf.displayName=uf;var ff="SelectItemIndicator",df=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return sf(ff,r).isSelected?Hi.jsx(El.span,{"aria-hidden":!0,...n,ref:t}):null}));df.displayName=ff;var gf="SelectScrollUpButton",yf=e.forwardRef(((t,r)=>{const n=$p(gf,t.__scopeSelect),o=Jp(gf,t.__scopeSelect),[i,a]=e.useState(!1),l=Mi(r,o.onScrollButtonChange);return ql((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Hi.jsx(mf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));yf.displayName=gf;var hf="SelectScrollDownButton",vf=e.forwardRef(((t,r)=>{const n=$p(hf,t.__scopeSelect),o=Jp(hf,t.__scopeSelect),[i,a]=e.useState(!1),l=Mi(r,o.onScrollButtonChange);return ql((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Hi.jsx(mf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));vf.displayName=hf;var mf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=t,a=$p("SelectScrollButton",n),l=e.useRef(null),s=Sp(n),c=e.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),ql((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Hi.jsx(El.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:xl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:xl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:xl(i.onPointerLeave,(()=>{c()}))})})),bf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Hi.jsx(El.div,{"aria-hidden":!0,...n,ref:t})}));bf.displayName="SelectSeparator";var wf="SelectArrow";function Of(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Tp(r),i=Np(wf,r),a=$p(wf,r);return i.open&&"popper"===a.position?Hi.jsx(Xc,{...o,...n,ref:t}):null})).displayName=wf;var xf=e.forwardRef(((t,r)=>{const{value:n,...o}=t,i=e.useRef(null),a=Mi(r,i),l=function(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}(n);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),Hi.jsx(Op,{asChild:!0,children:Hi.jsx("select",{...o,ref:a,defaultValue:n})})}));function jf(t){const r=Sl(t),n=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=n.current+e;r(t),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[r]),a=e.useCallback((()=>{n.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[n,i,a]}function kf(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}xf.displayName="BubbleSelect";var Ef=_p,Sf=Fp,Pf=Wp,Cf=Hp,zf=Qp,Tf=of,Lf=cf,Nf=pf,Rf=df,Mf=yf,If=vf,Af=bf,_f=Ip,Df=Bp,Bf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=g(t,["className","children"]);return e.createElement(Ef,d({ref:r,className:yi("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",n)},i),o,e.createElement(Sf,{asChild:!0},e.createElement(Si,{className:"h-4 w-4 opacity-50"})))}));Bf.displayName=Ef.displayName;var Ff=e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Mf,d({ref:r,className:yi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(zi,{className:"h-4 w-4"}))}));Ff.displayName=Mf.displayName;var Wf=e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(If,d({ref:r,className:yi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(Si,{className:"h-4 w-4"}))}));Wf.displayName=If.displayName;var Vf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,l=g(t,["className","children","position"]);return e.createElement(Pf,null,e.createElement(Cf,d({ref:r,className:yi("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"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a},l),e.createElement(Ff,null),e.createElement(zf,{className:yi("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),e.createElement(Wf,null)))}));Vf.displayName=Cf.displayName,e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Tf,d({ref:r,className:yi("px-2 py-1.5 text-sm font-semibold",n)},o))})).displayName=Tf.displayName;var Hf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=g(t,["className","children"]);return e.createElement(Lf,d({ref:r,className:yi("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",n)},i),e.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement(Rf,null,e.createElement(Ei,{className:"h-4 w-4"}))),e.createElement(Nf,null,o))}));function Uf(t){var r=t.className,n=t.dateFrom,o=t.dateTo,i=t.handleDateChange,a=e.useState({from:n||new Date(2022,0,20),to:o||x(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:S(e),to:U(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:W(e),to:F(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return j(e,-t,r)}(new Date,1);return{from:W(e),to:F(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:H(e),to:V(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return M(e,-t,r)}(new Date,1);return{from:H(e),to:V(e)}}}];return e.createElement("div",{className:yi("grid gap-2",r)},e.createElement(yp,null,e.createElement(hp,{asChild:!0},e.createElement(Ki,{id:"date",variant:"outline",className:yi("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},e.createElement(ki,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?e.createElement(e.Fragment,null,Ce(l.from,"LLL dd, y")," -"," ",Ce(l.to,"LLL dd, y")):Ce(l.from,"LLL dd, y"):e.createElement("span",null,"Choisissez une date"))),e.createElement(vp,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},e.createElement(_f,{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)}}},e.createElement(Bf,{className:"w-[300px]"},e.createElement(Df,{placeholder:"Sélectionnez un préréglage"})),e.createElement(Vf,{position:"popper"},c.map((function(t){return e.createElement(Hf,{key:t.label,value:t.label},t.label)})))),e.createElement("div",{className:"rounded-md border"},e.createElement(Ol,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Hf.displayName=Lf.displayName,e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Af,d({ref:r,className:yi("-mx-1 my-1 h-px bg-muted",n)},o))})).displayName=Af.displayName;var Gf=e.forwardRef((function(t,r){var n=t.className,o=t.type,i=g(t,["className","type"]);return e.createElement("input",d({type:o,className:yi("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",n),ref:r},i))}));function $f(t){var r=this,n=t.title,o=t.filters,i=t.setFilters,l=t.configFilters,s=t.onSearch,c=t.count,p=t.isLoading,f=t.setCurrentPage,g=e.useState(o),v=g[0],m=g[1],b=a(!1),w=b[0],O=b[1],x=e.useMemo((function(){return JSON.stringify(v)!==JSON.stringify(o)}),[v,o]),j=function(){return y(r,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return m(o),x?[4,f(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return s(),[2]}}))}))};return e.createElement("div",{className:"flex flex-col gap-2"},e.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},e.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"},e.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),n,e.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},c)),e.createElement("div",{className:"border-b border-gray-100 mb-4"}),e.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},e.createElement(Uf,{dateFrom:o.fromDate,dateTo:o.toDate,handleDateChange:function(e){i(d(d({},o),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),l&&l.map((function(t,r){return e.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&e.createElement(Gf,{type:"text",placeholder:t.placeholder,value:o[t.name],onChange:function(e){var r;return i(d(d({},o),((r={})[t.name]=e.target.value,r)))},onKeyDown:function(e){"Enter"===e.key&&j()}}),"Select"===t.type&&e.createElement(_f,{disabled:t.disabled||0===t.options.length,value:o[t.name],onValueChange:function(e){var r;i(d(d({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}},e.createElement(Bf,null,e.createElement(Df,{placeholder:t.placeholder})),e.createElement(Vf,null,u((function(){return t.options.map((function(t,r){return e.createElement(Hf,{key:"".concat(t.VALUE,"-").concat(r),value:t.VALUE||"_empty"},t.NAME)}))}),[t.options]))))})),e.createElement("div",{className:"flex gap-2 ml-auto"},l.some((function(e){return"Export"===e.type}))&&e.createElement(Ki,{disabled:w,onClick:function(){return y(r,void 0,void 0,(function(){var e,t;return h(this,(function(i){switch(i.label){case 0:return O(!0),e=l.find((function(e){return"Export"===e.type})),[4,(a=null==e?void 0:e.ctx,y(r,void 0,void 0,(function(){var e,t,r,i,l,s;return h(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(a),t=0,r=Object.entries(o);t<r.length;t++){var n=r[t],i=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===i||"toDate"===i){var s=new Date(l);e+="&".concat(i,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(i,"=").concat(l)}}return e}())];case 1:if(!(e=c.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=c.sent(),r=window.URL.createObjectURL(t),(i=document.createElement("a")).href=r,l="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),i.download=l,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i),[3,4];case 3:return s=c.sent(),console.error("Export error:",s),[3,4];case 4:return[2]}}))})))];case 1:return i.sent(),t=setInterval((function(){O(!1),clearInterval(t)}),3e4),[2]}var a}))}))},size:"sm"},e.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"},e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"7 10 12 15 17 10"}),e.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),e.createElement(Ki,{size:"sm",onClick:j,disabled:p},x?e.createElement(e.Fragment,null,e.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"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):e.createElement(e.Fragment,null,e.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"},e.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),e.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
26
|
+
*/function Ri(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Mi(...t){return e.useCallback(Ri(...t),t)}function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ai,_i={exports:{}},Di={};var Bi,Fi,Wi={};function Vi(){return Bi||(Bi=1,"production"!==lt.env.NODE_ENV&&function(){var e=t,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"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator;var h=e.__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 p: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 f: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 T(){}T.__reactDisabledLog=!0;var L,N=h.ReactCurrentDispatcher;function R(e,t,r){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+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=N.current,N.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:T,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 p="\n"+l[c].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),"function"==typeof e&&M.set(e,p),p}}while(c>=1&&u>=0);break}}}finally{I=!1,N.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 f=e?e.displayName||e.name:"",d=f?R(f):"";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 R(e);switch(e){case u:return R("Suspense");case p:return R("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return _(e.render,!1);case f: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 Y,q,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 p="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){Y||(Y=!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,p),c&&function(e,t){var r=function(){q||(q=!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,p)}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!==f)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===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===f||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 pe=function(e,t,r){return ue(e,t,r,!1)},fe=function(e,t,r){return ue(e,t,r,!0)};Wi.Fragment=o,Wi.jsx=pe,Wi.jsxs=fe}()),Wi}var Hi=(Fi||(Fi=1,"production"===lt.env.NODE_ENV?_i.exports=function(){if(Ai)return Di;Ai=1;var e=t,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__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 Di.Fragment=n,Di.jsx=l,Di.jsxs=l,Di}():_i.exports=Vi()),_i.exports),Ui=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(Yi);if(a){const t=a.props.children,n=i.map((r=>r===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return Hi.jsx(Gi,{...o,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return Hi.jsx(Gi,{...o,ref:r,children:n})}));Ui.displayName="Slot";var Gi=e.forwardRef(((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=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}(n);return e.cloneElement(n,{...qi(o,n.props),ref:r?Ri(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));Gi.displayName="SlotClone";var $i=({children:e})=>Hi.jsx(Hi.Fragment,{children:e});function Yi(t){return e.isValidElement(t)&&t.type===$i}function qi(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 Xi=xo("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"}}),Ki=e.forwardRef((function(t,r){var n=t.className,o=t.variant,i=t.size,a=t.asChild,l=void 0!==a&&a,s=g(t,["className","variant","size","asChild"]),c=l?Ui:"button";return e.createElement(c,d({className:yi(Xi({variant:o,size:i,className:n})),ref:r},s))}));Ki.displayName="Button";var Ji=function(){return Ji=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},Ji.apply(this,arguments)};function Zi(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 Qi(e){return"multiple"===e.mode}function ea(e){return"range"===e.mode}function ta(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var ra={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 na=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ce(e,"LLLL y",t)},formatDay:function(e,t){return Ce(e,"d",t)},formatMonthCaption:function(e,t){return Ce(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ce(e,"cccccc",t)},formatYearCaption:function(e,t){return Ce(e,"yyyy",t)}}),oa=Object.freeze({__proto__:null,labelDay:function(e,t,r){return Ce(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 Ce(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ia=o(void 0);function aa(e){var t,r,n,o,i,a=e.initialProps,l=(r=ra,n=te,o=new Date,{captionLayout:"buttons",classNames:r,formatters:na,labels:oa,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=W(n):t&&(i=new Date(t,0,1)),o?a=F(o):r&&(a=new Date(r,11,31)),{fromDate:i?L(i):void 0,toDate:a?L(a):void 0}}(a),c=s.fromDate,u=s.toDate,p=null!==(t=a.captionLayout)&&void 0!==t?t:l.captionLayout;"buttons"===p||c&&u||(p="buttons"),(ta(a)||Qi(a)||ea(a))&&(i=a.onSelect);var f=Ji(Ji(Ji({},l),a),{captionLayout:p,classNames:Ji(Ji({},l.classNames),a.classNames),components:Ji({},a.components),formatters:Ji(Ji({},l.formatters),a.formatters),fromDate:c,labels:Ji(Ji({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Ji(Ji({},l.modifiers),a.modifiers),modifiersClassNames:Ji(Ji({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Ji(Ji({},l.styles),a.styles),toDate:u});return Hi.jsx(ia.Provider,{value:f,children:e.children})}function la(){var e=i(ia);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function sa(e){var t=la(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Hi.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 ca(e){return Hi.jsx("svg",Ji({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Hi.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 ua(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=la(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:ca;return Hi.jsxs("div",{className:l,style:s,children:[Hi.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Hi.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Hi.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Hi.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function pa(e){var t,r=la(),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 Hi.jsx(Hi.Fragment,{});if(!o)return Hi.jsx(Hi.Fragment,{});var p=[];if(function(e,t,r){const[n,o]=T(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var f=W(n),d=n.getMonth();d<=o.getMonth();d++)p.push(Ie(f,d));else for(f=W(new Date),d=0;d<=11;d++)p.push(Ie(f,d));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ua;return Hi.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=Ie(W(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:p.map((function(e){return Hi.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function fa(e){var t,r=e.displayMonth,n=la(),o=n.fromDate,i=n.toDate,a=n.locale,l=n.styles,s=n.classNames,c=n.components,u=n.formatters.formatYearCaption,p=n.labels.labelYearDropdown,f=[];if(!o)return Hi.jsx(Hi.Fragment,{});if(!i)return Hi.jsx(Hi.Fragment,{});for(var d=o.getFullYear(),g=i.getFullYear(),y=d;y<=g;y++)f.push(Ae(H(new Date),y));var h=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ua;return Hi.jsx(h,{name:"years","aria-label":p(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ae(W(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:f.map((function(e){return Hi.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function da(){var e=la(),t=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&&B(i,o)<0&&(o=j(i,-1*(s-1))),a&&B(o,a)<0&&(o=a),W(o)}(e),r=function(e,t){var r=a(e),n=r[0];return[void 0===t?n:t,r[1]]}(t,e.month),n=r[0],o=r[1];return[n,function(t){var r;if(!e.disableNavigation){var n=W(t);o(n),null===(r=e.onMonthChange)||void 0===r||r.call(e,n)}}]}var ga=o(void 0);function ya(e){var t=la(),r=da(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=W(e),i=B(W(j(o,n)),o),a=[],l=0;l<i;l++){var s=j(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=W(e);if(!r)return j(l,a);if(!(B(r,e)<i))return j(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=W(e);if(!r)return j(a,-i);if(!(B(a,r)<=0))return j(a,-i)}}(n,t),s=function(e){return i.some((function(t){return Re(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&Ne(e,r)?o(j(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Hi.jsx(ga.Provider,{value:c,children:e.children})}function ha(){var e=i(ga);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function va(e){var t,r=la(),n=r.classNames,o=r.styles,i=r.components,a=ha().goToMonth,l=function(t){a(j(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:sa,c=Hi.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Hi.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Hi.jsx("div",{className:n.vhidden,children:c}),Hi.jsx(pa,{onChange:l,displayMonth:e.displayMonth}),Hi.jsx(fa,{onChange:l,displayMonth:e.displayMonth})]})}function ma(e){return Hi.jsx("svg",Ji({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Hi.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 ba(e){return Hi.jsx("svg",Ji({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Hi.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 wa=r((function(e,t){var r=la(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Ji(Ji({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Hi.jsx("button",Ji({},e,{ref:t,type:"button",className:a,style:l}))}));function Oa(e){var t,r,n=la(),o=n.dir,i=n.locale,a=n.classNames,l=n.styles,s=n.labels,c=s.labelPrevious,u=s.labelNext,p=n.components;if(!e.nextMonth&&!e.previousMonth)return Hi.jsx(Hi.Fragment,{});var f=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==p?void 0:p.IconRight)&&void 0!==t?t:ba,v=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:ma;return Hi.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Hi.jsx(wa,{name:"previous-month","aria-label":f,className:d,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Hi.jsx(h,{className:a.nav_icon,style:l.nav_icon}):Hi.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Hi.jsx(wa,{name:"next-month","aria-label":g,className:y,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Hi.jsx(v,{className:a.nav_icon,style:l.nav_icon}):Hi.jsx(h,{className:a.nav_icon,style:l.nav_icon})})]})}function xa(e){var t=la().numberOfMonths,r=ha(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return Re(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),p=t>1&&(c||!s);return Hi.jsx(Oa,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:p,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function ja(e){var t,r,n=la(),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:sa;return r=i?Hi.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Hi.jsx(va,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(va,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Hi.jsx(xa,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Hi.jsx(xa,{displayMonth:e.displayMonth,id:e.id})]}),Hi.jsx("div",{className:o.caption,style:a.caption,children:r})}function ka(e){var t=la(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Hi.jsx("tfoot",{className:o,style:n.tfoot,children:Hi.jsx("tr",{children:Hi.jsx("td",{colSpan:8,children:r})})}):Hi.jsx(Hi.Fragment,{})}function Ea(){var e=la(),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?P(new Date):S(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=x(n,i);o.push(a)}return o}(o,i,a);return Hi.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Hi.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Hi.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 Sa(){var e,t=la(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Ea;return Hi.jsx("thead",{style:n.head,className:r.head,children:Hi.jsx(i,{})})}function Pa(e){var t=la(),r=t.locale,n=t.formatters.formatDay;return Hi.jsx(Hi.Fragment,{children:n(e.date,{locale:r})})}var Ca=o(void 0);function za(e){if(!Qi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Hi.jsx(Ca.Provider,{value:t,children:e.children})}return Hi.jsx(Ta,{initialProps:e.initialProps,children:e.children})}function Ta(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 _(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?Zi([],n):[];if(r.selected){var u=c.findIndex((function(t){return _(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 Hi.jsx(Ca.Provider,{value:l,children:r})}function La(){var e=i(Ca);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Na,Ra=o(void 0);function Ma(e){if(!ea(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Hi.jsx(Ra.Provider,{value:t,children:e.children})}return Hi.jsx(Ia,{initialProps:e.initialProps,children:e.children})}function Ia(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],_(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:Me(i,l-1),before:x(i,l-1)}),i&&a&&c.disabled.push({after:i,before:x(i,l-1)}),!i&&a&&c.disabled.push({after:Me(a,l-1),before:x(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:x(i,1-s)}),c.disabled.push({after:x(i,s-1)})),i&&a){var u=s-(N(a,i)+1);c.disabled.push({before:Me(i,u)}),c.disabled.push({after:x(a,u)})}!i&&a&&(c.disabled.push({before:x(a,1-s)}),c.disabled.push({after:x(a,s-1)}))}return Hi.jsx(Ra.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(_(o,e)&&_(n,e))return;if(_(o,e))return{from:o,to:void 0};if(_(n,e))return;return Le(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Le(e,o)?{from:o,to:e}:{from:e,to:o}:n?Ne(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 Aa(){var e=i(Ra);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function _a(e){return Array.isArray(e)?Zi([],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"}(Na||(Na={}));var Da=Na.Selected,Ba=Na.Disabled,Fa=Na.Hidden,Wa=Na.Today,Va=Na.RangeEnd,Ha=Na.RangeMiddle,Ua=Na.RangeStart,Ga=Na.Outside;var $a=o(void 0);function Ya(e){var t=la(),r=function(e,t,r){var n,o=((n={})[Da]=_a(e.selected),n[Ba]=_a(e.disabled),n[Fa]=_a(e.hidden),n[Wa]=[e.today],n[Va]=[],n[Ha]=[],n[Ua]=[],n[Ga]=[],n);return e.fromDate&&o[Ba].push({before:e.fromDate}),e.toDate&&o[Ba].push({after:e.toDate}),Qi(e)?o[Ba]=o[Ba].concat(t.modifiers[Ba]):ea(e)&&(o[Ba]=o[Ba].concat(r.modifiers[Ba]),o[Ua]=r.modifiers[Ua],o[Ha]=r.modifiers[Ha],o[Va]=r.modifiers[Va]),o}(t,La(),Aa()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=_a(n)})),t}(t.modifiers),o=Ji(Ji({},r),n);return Hi.jsx($a.Provider,{value:o,children:e.children})}function qa(){var e=i($a);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Xa(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(D(t))return _(e,t);if(function(e){return Array.isArray(e)&&e.every(D)}(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?(N(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),N(e,n)>=0&&N(o,e)>=0):o?_(o,e):!!n&&_(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=N(t.before,e)>0,n=N(t.after,e)<0;return Le(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?N(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?N(t.before,e)>0:"function"==typeof t&&t(e)}))}function Ka(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Xa(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!Re(e,r)&&(o.outside=!0),o}function Ja(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,p=o.locale,f={day:x,week:R,month:j,year:M,startOfWeek:function(e){return o.ISOWeek?P(e):S(e,{locale:p,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?G(e):U(e,{locale:p,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?f=I([c,f]):"after"===n&&u&&(f=A([u,f]));var d=!0;if(i){var g=Ka(f,i);d=!g.disabled&&!g.hidden}return d?f:l.count>365?l.lastFocused:Ja(f,{moveBy:r,direction:n,context:o,modifiers:i,retry:Ji(Ji({},l),{count:l.count+1})})}var Za=o(void 0);function Qa(e){var t=ha(),r=qa(),n=a(),o=n[0],i=n[1],l=a(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=W(e[0]),i=F(e[e.length-1]),a=o;a<=i;){var l=Ka(a,t);if(l.disabled||l.hidden)a=x(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=x(a,1)}}return n||r}(t.displayMonths,r),p=(null!=o?o:s&&t.isDateDisplayed(s))?s:u,f=function(e){i(e)},d=la(),g=function(e,n){if(o){var i=Ja(o,{moveBy:e,direction:n,context:d,modifiers:r});_(o,i)||(t.goToDate(i,o),f(i))}},y={focusedDay:o,focusTarget:p,blur:function(){c(o),i(void 0)},focus:f,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return Hi.jsx(Za.Provider,{value:y,children:e.children})}function el(){var e=i(Za);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var tl=o(void 0);function rl(e){if(!ta(e.initialProps)){var t={selected:void 0};return Hi.jsx(tl.Provider,{value:t,children:e.children})}return Hi.jsx(nl,{initialProps:e.initialProps,children:e.children})}function nl(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 Hi.jsx(tl.Provider,{value:n,children:r})}function ol(){var e=i(tl);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function il(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(Na).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function al(e,t,r){var n,o,i,a=la(),s=el(),c=function(e,t){return Ka(e,qa(),t)}(e,t),u=function(e,t){var r=la(),n=ol(),o=La(),i=Aa(),a=el(),l=a.focusDayAfter,s=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,p=a.blur,f=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;ta(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):Qi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):ea(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;f(e),null===(o=r.onDayFocus)||void 0===o||o.call(r,e,t,n)},onBlur:function(n){var o;p(),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}(e,c),p=function(){var e=la(),t=ol(),r=La(),n=Aa();return ta(e)?t.selected:Qi(e)?r.selected:ea(e)?n.selected:void 0}(),f=Boolean(a.onDayClick||"default"!==a.mode);l((function(){var t;c.outside||s.focusedDay&&f&&_(s.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[s.focusedDay,e,r,f,c.outside]);var d=il(a,c).join(" "),g=function(e,t){var r=Ji({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Ji(Ji({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(a,c),y=Boolean(c.outside&&!a.showOutsideDays||c.hidden),h=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:Pa,v={style:g,className:d,children:Hi.jsx(h,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},m=s.focusTarget&&_(s.focusTarget,e)&&!c.outside,b=s.focusedDay&&_(s.focusedDay,e),w=Ji(Ji(Ji({},v),((n={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,n.tabIndex=b||m?0:-1,n)),u);return{isButton:f,isHidden:y,activeModifiers:c,selectedDays:p,buttonProps:w,divProps:v}}function ll(e){var t=c(null),r=al(e.date,e.displayMonth,t);return r.isHidden?Hi.jsx("div",{role:"gridcell"}):r.isButton?Hi.jsx(wa,Ji({name:"day",ref:t},r.buttonProps)):Hi.jsx("div",Ji({},r.divProps))}function sl(e){var t=e.number,r=e.dates,n=la(),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 Hi.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Hi.jsx(wa,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function cl(e){var t,r,n,o=la(),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:ll,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:sl;return l&&(n=Hi.jsx("td",{className:a.cell,style:i.cell,children:Hi.jsx(u,{number:e.weekNumber,dates:e.dates})})),Hi.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Hi.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Hi.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+O(e)/1e3)}(t))}))]})}function ul(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?G(t):U(t,r),o=(null==r?void 0:r.ISOWeek)?P(e):S(e,r),i=N(n,o),a=[],l=0;l<=i;l++)a.push(x(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?re(t):oe(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 pl(e){var t,r,n,o=la(),i=o.locale,a=o.classNames,l=o.styles,s=o.hideHead,c=o.fixedWeeks,u=o.components,p=o.weekStartsOn,f=o.firstWeekContainsDate,d=o.ISOWeek,g=function(e,t){var r=ul(W(e),F(e),t);if(null==t?void 0:t.useFixedWeeks){var n=Te(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=R(i,6-n),l=ul(R(i,1),a,t);r.push.apply(r,l)}}return r}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:d,locale:i,weekStartsOn:p,firstWeekContainsDate:f}),y=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:Sa,h=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:cl,v=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ka;return Hi.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Hi.jsx(y,{}),Hi.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Hi.jsx(h,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Hi.jsx(v,{displayMonth:e.displayMonth})]})}var fl="undefined"!=typeof window&&window.document&&window.document.createElement?s:l,dl=!1,gl=0;function yl(){return"react-day-picker-".concat(++gl)}function hl(e){var t,r,n=la(),o=n.dir,i=n.classNames,s=n.styles,c=n.components,u=ha().displayMonths,p=function(e){var t,r=null!=e?e:dl?yl():null,n=a(r),o=n[0],i=n[1];return fl((function(){null===o&&i(yl())}),[]),l((function(){!1===dl&&(dl=!0)}),[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0}(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],g=s.month,y=0===e.displayIndex,h=e.displayIndex===u.length-1,v=!y&&!h;"rtl"===o&&(h=(t=[y,h])[0],y=t[1]),y&&(d.push(i.caption_start),g=Ji(Ji({},g),s.caption_start)),h&&(d.push(i.caption_end),g=Ji(Ji({},g),s.caption_end)),v&&(d.push(i.caption_between),g=Ji(Ji({},g),s.caption_between));var m=null!==(r=null==c?void 0:c.Caption)&&void 0!==r?r:ja;return Hi.jsxs("div",{className:d.join(" "),style:g,children:[Hi.jsx(m,{id:p,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Hi.jsx(pl,{id:f,"aria-labelledby":p,displayMonth:e.displayMonth})]},e.displayIndex)}function vl(e){var t=la(),r=t.classNames,n=t.styles;return Hi.jsx("div",{className:r.months,style:n.months,children:e.children})}function ml(e){var t,r,n=e.initialProps,o=la(),i=el(),s=ha(),c=a(!1),u=c[0],p=c[1];l((function(){o.initialFocus&&i.focusTarget&&(u||(i.focus(i.focusTarget),p(!0)))}),[o.initialFocus,u,i.focus,i.focusTarget,i]);var f=[o.classNames.root,o.className];o.numberOfMonths>1&&f.push(o.classNames.multiple_months),o.showWeekNumber&&f.push(o.classNames.with_weeknumber);var d=Ji(Ji({},o.styles.root),o.style),g=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Ji(Ji({},e),((r={})[t]=n[t],r))}),{}),y=null!==(r=null===(t=n.components)||void 0===t?void 0:t.Months)&&void 0!==r?r:vl;return Hi.jsx("div",Ji({className:f.join(" "),style:d,dir:o.dir,id:o.id,nonce:n.nonce,title:n.title,lang:n.lang},g,{children:Hi.jsx(y,{children:s.displayMonths.map((function(e,t){return Hi.jsx(hl,{displayIndex:t,displayMonth:e},t)}))})}))}function bl(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 Hi.jsx(aa,{initialProps:r,children:Hi.jsx(ya,{children:Hi.jsx(rl,{initialProps:r,children:Hi.jsx(za,{initialProps:r,children:Hi.jsx(Ma,{initialProps:r,children:Hi.jsx(Ya,{children:Hi.jsx(Qa,{children:t})})})})})})})}function wl(e){return Hi.jsx(bl,Ji({},e,{children:Hi.jsx(ml,{initialProps:e})}))}function Ol(t){var r=t.className,n=t.classNames,o=t.showOutsideDays,i=void 0===o||o,a=g(t,["className","classNames","showOutsideDays"]);return e.createElement(wl,d({showOutsideDays:i,className:yi("p-3",r),classNames:d({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:yi(Xi({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:yi("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"===a.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:yi(Xi({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"},n),components:{IconLeft:function(){return e.createElement(Pi,{className:"h-4 w-4"})},IconRight:function(){return e.createElement(Ci,{className:"h-4 w-4"})}}},a))}function xl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function jl(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},kl(o,...r)]}function kl(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}Ol.displayName="Calendar";var El=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...o}=e,i=n?Ui:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Hi.jsx(i,{...o,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function Sl(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}var Pl,Cl="dismissableLayer.update",zl="dismissableLayer.pointerDownOutside",Tl="dismissableLayer.focusOutside",Ll=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nl=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=t,u=e.useContext(Ll),[p,f]=e.useState(null),d=p?.ownerDocument??globalThis?.document,[,g]=e.useState({}),y=Mi(r,(e=>f(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(v),b=p?h.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=m,x=function(t,r=globalThis?.document){const n=Sl(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Ml(zl,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,n]),{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(t,r=globalThis?.document){const n=Sl(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Ml(Tl,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{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(t,r=globalThis?.document){const n=Sl(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),e.useEffect((()=>{if(p)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Pl=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Rl(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=Pl)}}),[p,d,n,u]),e.useEffect((()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Rl())}),[p,u]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(Cl,e),()=>document.removeEventListener(Cl,e)}),[]),Hi.jsx(El.div,{...c,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:xl(t.onFocusCapture,j.onFocusCapture),onBlurCapture:xl(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:xl(t.onPointerDownCapture,x.onPointerDownCapture)})}));Nl.displayName="DismissableLayer";function Rl(){const e=new CustomEvent(Cl);document.dispatchEvent(e)}function Ml(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&p.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}e.forwardRef(((t,r)=>{const n=e.useContext(Ll),o=e.useRef(null),i=Mi(r,o);return e.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),Hi.jsx(El.div,{...t,ref:i})})).displayName="DismissableLayerBranch";var Il=0;function Al(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_l()),document.body.insertAdjacentElement("beforeend",e[1]??_l()),Il++,()=>{1===Il&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Il--}}),[])}function _l(){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 Dl="focusScope.autoFocusOnMount",Bl="focusScope.autoFocusOnUnmount",Fl={bubbles:!1,cancelable:!0},Wl=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=Sl(i),p=Sl(a),f=e.useRef(null),d=Mi(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:Gl(f.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Gl(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Gl(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]),e.useEffect((()=>{if(s){$l.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Dl,Fl);s.addEventListener(Dl,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gl(n,{select:t}),document.activeElement!==r)return}((e=Vl(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Gl(s))}return()=>{s.removeEventListener(Dl,u),setTimeout((()=>{const e=new CustomEvent(Bl,Fl);s.addEventListener(Bl,p),s.dispatchEvent(e),e.defaultPrevented||Gl(t??document.body,{select:!0}),s.removeEventListener(Bl,p),$l.remove(g)}),0)}}var e}),[s,u,p,g]);const y=e.useCallback((e=>{if(!n&&!o)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Vl(e),r=Hl(t,e),n=Hl(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Gl(i,{select:!0})):(e.preventDefault(),n&&Gl(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return Hi.jsx(El.div,{tabIndex:-1,...l,ref:d,onKeyDown:y})}));function Vl(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 Hl(e,t){for(const r of e)if(!Ul(r,{upTo:t}))return r}function Ul(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 Gl(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()}}Wl.displayName="FocusScope";var $l=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Yl(e,t),e.unshift(t)},remove(t){e=Yl(e,t),e[0]?.resume()}}}();function Yl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var ql=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},Xl=e["useId".toString()]||(()=>{}),Kl=0;function Jl(t){const[r,n]=e.useState(Xl());return ql((()=>{n((e=>e??String(Kl++)))}),[t]),r?`radix-${r}`:""}const Zl=["top","right","bottom","left"],Ql=Math.min,es=Math.max,ts=Math.round,rs=Math.floor,ns=e=>({x:e,y:e}),os={left:"right",right:"left",bottom:"top",top:"bottom"},is={start:"end",end:"start"};function as(e,t,r){return es(e,Ql(t,r))}function ls(e,t){return"function"==typeof e?e(t):e}function ss(e){return e.split("-")[0]}function cs(e){return e.split("-")[1]}function us(e){return"x"===e?"y":"x"}function ps(e){return"y"===e?"height":"width"}function fs(e){return["top","bottom"].includes(ss(e))?"y":"x"}function ds(e){return us(fs(e))}function gs(e){return e.replace(/start|end/g,(e=>is[e]))}function ys(e){return e.replace(/left|right|bottom|top/g,(e=>os[e]))}function hs(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 vs(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 ms(e,t,r){let{reference:n,floating:o}=e;const i=fs(t),a=ds(t),l=ps(a),s=ss(t),c="y"===i,u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,f=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:p};break;case"left":d={x:n.x-o.width,y:p};break;default:d={x:n.x,y:n.y}}switch(cs(t)){case"start":d[a]-=f*(r&&c?-1:1);break;case"end":d[a]+=f*(r&&c?-1:1)}return d}async function bs(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:p="floating",altBoundary:f=!1,padding:d=0}=ls(t,e),g=hs(d),y=l[f?"floating"===p?"reference":"floating":p],h=vs(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"===p?{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=vs(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 ws(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Os(e){return Zl.some((t=>e[t]>=0))}function xs(){return"undefined"!=typeof window}function js(e){return Ss(e)?(e.nodeName||"").toLowerCase():"#document"}function ks(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Es(e){var t;return null==(t=(Ss(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ss(e){return!!xs()&&(e instanceof Node||e instanceof ks(e).Node)}function Ps(e){return!!xs()&&(e instanceof Element||e instanceof ks(e).Element)}function Cs(e){return!!xs()&&(e instanceof HTMLElement||e instanceof ks(e).HTMLElement)}function zs(e){return!(!xs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ks(e).ShadowRoot)}function Ts(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=As(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ls(e){return["table","td","th"].includes(js(e))}function Ns(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rs(e){const t=Ms(),r=Ps(e)?As(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 Ms(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Is(e){return["html","body","#document"].includes(js(e))}function As(e){return ks(e).getComputedStyle(e)}function _s(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ds(e){if("html"===js(e))return e;const t=e.assignedSlot||e.parentNode||zs(e)&&e.host||Es(e);return zs(t)?t.host:t}function Bs(e){const t=Ds(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cs(t)&&Ts(t)?t:Bs(t)}function Fs(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Bs(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ks(o);if(i){const e=Ws(a);return t.concat(a,a.visualViewport||[],Ts(o)?o:[],e&&r?Fs(e):[])}return t.concat(o,Fs(o,[],r))}function Ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vs(e){const t=As(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Cs(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=ts(r)!==i||ts(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Hs(e){return Ps(e)?e:e.contextElement}function Us(e){const t=Hs(e);if(!Cs(t))return ns(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Vs(t);let a=(i?ts(r.width):r.width)/n,l=(i?ts(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Gs=ns(0);function $s(e){const t=ks(e);return Ms()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Gs}function Ys(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Hs(e);let a=ns(1);t&&(n?Ps(n)&&(a=Us(n)):a=Us(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ks(e))&&t}(i,r,n)?$s(i):ns(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(i){const e=ks(i),t=n&&Ps(n)?ks(n):n;let r=e,o=Ws(r);for(;o&&n&&t!==r;){const e=Us(o),t=o.getBoundingClientRect(),n=As(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,p*=e.y,s+=i,c+=a,r=ks(o),o=Ws(r)}}return vs({width:u,height:p,x:s,y:c})}function qs(e,t){const r=_s(e).scrollLeft;return t?t.left+r:Ys(Es(e)).left+r}function Xs(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:qs(e,n)),y:n.top+t.scrollTop}}function Ks(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ks(e),n=Es(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=Ms();(!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=Es(e),r=_s(e),n=e.ownerDocument.body,o=es(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=es(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+qs(e);const l=-r.scrollTop;return"rtl"===As(n).direction&&(a+=es(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Es(e));else if(Ps(t))n=function(e,t){const r=Ys(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Cs(e)?Us(e):ns(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=$s(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vs(n)}function Js(e,t){const r=Ds(e);return!(r===t||!Ps(r)||Is(r))&&("fixed"===As(r).position||Js(r,t))}function Zs(e,t,r){const n=Cs(t),o=Es(t),i="fixed"===r,a=Ys(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=ns(0);if(n||!n&&!i)if(("body"!==js(t)||Ts(o))&&(l=_s(t)),n){const e=Ys(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=qs(o));const c=!o||n||i?ns(0):Xs(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 Qs(e){return"static"===As(e).position}function ec(e,t){if(!Cs(e)||"fixed"===As(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Es(e)===r&&(r=r.ownerDocument.body),r}function tc(e,t){const r=ks(e);if(Ns(e))return r;if(!Cs(e)){let t=Ds(e);for(;t&&!Is(t);){if(Ps(t)&&!Qs(t))return t;t=Ds(t)}return r}let n=ec(e,t);for(;n&&Ls(n)&&Qs(n);)n=ec(n,t);return n&&Is(n)&&Qs(n)&&!Rs(n)?r:n||function(e){let t=Ds(e);for(;Cs(t)&&!Is(t);){if(Rs(t))return t;if(Ns(t))return null;t=Ds(t)}return null}(e)||r}const rc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=Es(n),l=!!t&&Ns(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=ns(1);const u=ns(0),p=Cs(n);if((p||!p&&!i)&&(("body"!==js(n)||Ts(a))&&(s=_s(n)),Cs(n))){const e=Ys(n);c=Us(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!a||p||i?ns(0):Xs(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+f.x,y:r.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:Es,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Ns(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Fs(e,[],!1).filter((e=>Ps(e)&&"body"!==js(e))),o=null;const i="fixed"===As(e).position;let a=i?Ds(e):e;for(;Ps(a)&&!Is(a);){const t=As(a),r=Rs(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ts(a)&&!r&&Js(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ds(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=Ks(t,r,o);return e.top=es(n.top,e.top),e.right=Ql(n.right,e.right),e.bottom=Ql(n.bottom,e.bottom),e.left=es(n.left,e.left),e}),Ks(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:tc,getElementRects:async function(e){const t=this.getOffsetParent||tc,r=this.getDimensions,n=await r(e.floating);return{reference:Zs(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}=Vs(e);return{width:t,height:r}},getScale:Us,isElement:Ps,isRTL:function(e){return"rtl"===As(e).direction}};function nc(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=Hs(e),u=o||i?[...c?Fs(c):[],...Fs(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const p=c&&l?function(e,t){let r,n=null;const o=Es(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:p,height:f}=e.getBoundingClientRect();if(l||t(),!p||!f)return;const d={rootMargin:-rs(u)+"px "+-rs(o.clientWidth-(c+p))+"px "+-rs(o.clientHeight-(u+f))+"px "+-rs(c)+"px",threshold:es(0,Ql(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 f,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?Ys(e):null;return s&&function t(){const n=Ys(e);!y||n.x===y.x&&n.y===y.y&&n.width===y.width&&n.height===y.height||r();y=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==p||p(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(f)}}const oc=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=ss(r),l=cs(r),s="y"===fs(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,p=ls(t,e);let{mainAxis:f,crossAxis:d,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof g&&(d="end"===l?-1*g:g),s?{x:d*u,y:f*c}:{x:f*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}}}}},ic=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}=ls(e,t),c={x:r,y:n},u=await bs(t,s),p=fs(ss(o)),f=us(p);let d=c[f],g=c[p];if(i){const e="y"===f?"bottom":"right";d=as(d+u["y"===f?"top":"left"],d,d-u[e])}if(a){const e="y"===p?"bottom":"right";g=as(g+u["y"===p?"top":"left"],g,g-u[e])}const y=l.fn({...t,[f]:d,[p]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:i,[p]:a}}}}}},ac=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:p=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...h}=ls(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=ss(o),m=fs(l),b=ss(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(b||!y?[ys(l)]:function(e){const t=ys(e);return[gs(e),t,gs(t)]}(l)),x="none"!==g;!f&&x&&O.push(...function(e,t,r,n){const o=cs(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[]}}(ss(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(gs)))),i}(l,y,g,w));const j=[l,...O],k=await bs(t,h),E=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&E.push(k[v]),p){const e=function(e,t,r){void 0===r&&(r=!1);const n=cs(e),o=ds(e),i=ps(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ys(a)),[a,ys(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=fs(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{}}}},lc=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}=ls(e,t),u=await bs(t,c),p=ss(o),f=cs(o),d="y"===fs(o),{width:g,height:y}=i.floating;let h,v;"top"===p||"bottom"===p?(h=p,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=p,h="end"===f?"top":"bottom");const m=y-u.top-u.bottom,b=g-u.left-u.right,w=Ql(y-u[h],m),O=Ql(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&&!f){const e=es(u.left,0),t=es(u.right,0),r=es(u.top,0),n=es(u.bottom,0);d?k=g-2*(0!==e||0!==t?e+t:es(u.left,u.right)):j=y-2*(0!==r||0!==n?r+n:es(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}}:{}}}},sc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ls(e,t);switch(n){case"referenceHidden":{const e=ws(await bs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Os(e)}}}case"escaped":{const e=ws(await bs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Os(e)}}}default:return{}}}}},cc=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}=ls(e,t)||{};if(null==c)return{};const p=hs(u),f={x:r,y:n},d=ds(o),g=ps(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]-f[d]-i.floating[g],O=f[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=Ql(p[v],E),P=Ql(p[m],E),C=S,z=j-y[g]-P,T=j/2-y[g]/2+k,L=as(C,T,z),N=!s.arrow&&null!=cs(o)&&T!==L&&i.reference[g]/2-(T<C?S:P)-y[g]/2<0,R=N?T<C?T-C:T-z:0;return{[d]:f[d]+R,data:{[d]:L,centerOffset:T-L-R,...N&&{alignmentOffset:R}},reset:N}}}),uc=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}=ls(e,t),u={x:r,y:n},p=fs(o),f=us(p);let d=u[f],g=u[p];const y=ls(l,t),h="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,r=i.reference[f]+i.reference[e]-h.mainAxis;d<t?d=t:d>r&&(d=r)}if(c){var v,m;const e="y"===f?"width":"height",t=["top","left"].includes(ss(o)),r=i.reference[p]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[p])||0)+(t?0:h.crossAxis),n=i.reference[p]+i.reference[e]+(t?0:(null==(m=a.offset)?void 0:m[p])||0)-(t?h.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[f]:d,[p]:g}}}},pc=(e,t,r)=>{const n=new Map,o={platform:rc,...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:p}=ms(c,n,s),f=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:p,initialPlacement:n,placement:f,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,p=null!=v?v:p,d={...d,[i]:{...d[i],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:p}=ms(c,f,s))),r=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})};var fc="undefined"!=typeof document?s:l;function dc(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(!dc(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)&&!dc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function gc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yc(e,t){const r=gc(e);return Math.round(t*r)/r}function hc(t){const r=e.useRef(t);return fc((()=>{r.current=t})),r}const vc=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?cc({element:r.current,padding:n}).fn(t):{}:r?cc({element:r,padding:n}).fn(t):{};var o}}),mc=(e,t)=>({...oc(e),options:[e,t]}),bc=(e,t)=>({...ic(e),options:[e,t]}),wc=(e,t)=>({...uc(e),options:[e,t]}),Oc=(e,t)=>({...ac(e),options:[e,t]}),xc=(e,t)=>({...lc(e),options:[e,t]}),jc=(e,t)=>({...sc(e),options:[e,t]}),kc=(e,t)=>({...vc(e),options:[e,t]});var Ec=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Hi.jsx(El.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Hi.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Ec.displayName="Arrow";var Sc=Ec;function Pc(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}var Cc="Popper",[zc,Tc]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Pc(o,...r)]}(Cc),[Lc,Nc]=zc(Cc),Rc=t=>{const{__scopePopper:r,children:n}=t,[o,i]=e.useState(null);return Hi.jsx(Lc,{scope:r,anchor:o,onAnchorChange:i,children:n})};Rc.displayName=Cc;var Mc="PopperAnchor",Ic=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:o,...i}=t,a=Nc(Mc,n),l=e.useRef(null),s=Mi(r,l);return e.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Hi.jsx(El.div,{...i,ref:s})}));Ic.displayName=Mc;var Ac="PopperContent",[_c,Dc]=zc(Ac),Bc=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:h,...v}=t,m=Nc(Ac,n),[b,w]=e.useState(null),O=Mi(r,(e=>w(e))),[x,j]=e.useState(null),k=function(t){const[r,n]=e.useState(void 0);return ql((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}(x),E=k?.width??0,S=k?.height??0,P=o+("center"!==a?"-"+a:""),C="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],T=z.length>0,L={padding:C,boundary:z.filter(Hc),altBoundary:T},{refs:N,floatingStyles:R,placement:M,isPositioned:I,middlewareData:A}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[f,d]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[g,y]=e.useState(o);dc(g,o)||y(o);const[h,v]=e.useState(null),[m,b]=e.useState(null),w=e.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),O=e.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),x=a||h,j=l||m,k=e.useRef(null),E=e.useRef(null),S=e.useRef(f),P=null!=c,C=hc(c),z=hc(i),T=hc(u),L=e.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:r,strategy:n,middleware:g};z.current&&(e.platform=z.current),pc(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};N.current&&!dc(S.current,t)&&(S.current=t,p.flushSync((()=>{d(t)})))}))}),[g,r,n,z,T]);fc((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);fc((()=>(N.current=!0,()=>{N.current=!1})),[]),fc((()=>{if(x&&(k.current=x),j&&(E.current=j),x&&j){if(C.current)return C.current(x,j,L);L()}}),[x,j,L,C,P]);const R=e.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:O})),[w,O]),M=e.useMemo((()=>({reference:x,floating:j})),[x,j]),I=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=yc(M.floating,f.x),r=yc(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...gc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,M.floating,f.x,f.y]);return e.useMemo((()=>({...f,update:L,refs:R,elements:M,floatingStyles:I})),[f,L,R,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>nc(...e,{animationFrame:"always"===y}),elements:{reference:m.anchor},middleware:[mc({mainAxis:i+S,alignmentAxis:l}),c&&bc({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?wc():void 0,...L}),c&&Oc({...L}),xc({...L,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&&kc({element:x,padding:s}),Uc({arrowWidth:E,arrowHeight:S}),g&&jc({strategy:"referenceHidden",...L})]}),[_,D]=Gc(M),B=Sl(h);ql((()=>{I&&B?.()}),[I,B]);const F=A.arrow?.x,W=A.arrow?.y,V=0!==A.arrow?.centerOffset,[H,U]=e.useState();return ql((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Hi.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.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:t.dir,children:Hi.jsx(_c,{scope:n,placedSide:_,onArrowChange:j,arrowX:F,arrowY:W,shouldHideArrow:V,children:Hi.jsx(El.div,{"data-side":_,"data-align":D,...v,ref:O,style:{...v.style,animation:I?void 0:"none"}})})})}));Bc.displayName=Ac;var Fc="PopperArrow",Wc={top:"bottom",right:"left",bottom:"top",left:"right"},Vc=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Dc(Fc,r),i=Wc[o.placedSide];return Hi.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:Hi.jsx(Sc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Hc(e){return null!==e}Vc.displayName=Fc;var Uc=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]=Gc(r),u={start:"0%",center:"50%",end:"100%"}[c],p=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let d="",g="";return"bottom"===s?(d=i?u:`${p}px`,g=-l+"px"):"top"===s?(d=i?u:`${p}px`,g=`${n.floating.height+l}px`):"right"===s?(d=-l+"px",g=i?u:`${f}px`):"left"===s&&(d=`${n.floating.width+l}px`,g=i?u:`${f}px`),{data:{x:d,y:g}}}});function Gc(e){const[t,r="center"]=e.split("-");return[t,r]}var $c=Rc,Yc=Ic,qc=Bc,Xc=Vc,Kc=e.forwardRef(((t,r)=>{const{container:n,...o}=t,[i,a]=e.useState(!1);ql((()=>a(!0)),[]);const l=n||i&&globalThis?.document?.body;return l?f.createPortal(Hi.jsx(El.div,{...o,ref:r}),l):null}));Kc.displayName="Portal";var Jc=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Zc(o.current);a.current="mounted"===s?e:"none"}),[s]),ql((()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=Zc(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),ql((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=Zc(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},l=e=>{e.target===r&&(a.current=Zc(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=Mi(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 n||o.isPresent?e.cloneElement(i,{ref:a}):null};function Zc(e){return e?.animationName||"none"}function Qc({prop:t,defaultProp:r,onChange:n=()=>{}}){const[o,i]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[o]=n,i=e.useRef(o),a=Sl(r);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),n}({defaultProp:r,onChange:n}),a=void 0!==t,l=a?t:o,s=Sl(n);return[l,e.useCallback((e=>{if(a){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else i(e)}),[a,t,i,s])]}Jc.displayName="Presence";var eu=new WeakMap,tu=new WeakMap,ru={},nu=0,ou=function(e){return e&&(e.host||ou(e.parentNode))},iu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=ou(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]);ru[r]||(ru[r]=new WeakMap);var i=ru[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=(eu.get(e)||0)+1,c=(i.get(e)||0)+1;eu.set(e,s),i.set(e,c),a.push(e),1===s&&o&&tu.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(),nu++,function(){a.forEach((function(e){var t=eu.get(e)-1,o=i.get(e)-1;eu.set(e,t),i.set(e,o),t||(tu.has(e)||e.removeAttribute(n),tu.delete(e)),o||e.removeAttribute(r)})),--nu||(eu=new WeakMap,eu=new WeakMap,tu=new WeakMap,ru={})}},au=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]"))),iu(n,o,r,"aria-hidden")):function(){return null}},lu="right-scroll-bar-position",su="width-before-scroll-bar";function cu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var uu="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,pu=new WeakMap;function fu(e,t){var r,n,o,i=(r=null,n=function(t){return e.forEach((function(e){return cu(e,t)}))},(o=a((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade);return uu((function(){var t=pu.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach((function(e){n.has(e)||cu(e,null)})),n.forEach((function(e){r.has(e)||cu(e,o)}))}pu.set(i,e)}),[e]),i}function du(e){return e}var gu=function(t){var r=t.sideCar,n=g(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,d({},n))};gu.isSideCarExport=!0;var yu=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=du);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=d({async:!0,ssr:!1},e),t}(),hu=function(){},vu=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:hu,onWheelCapture:hu,onTouchMoveCapture:hu}),i=o[0],a=o[1],l=t.forwardProps,s=t.children,c=t.className,u=t.removeScrollBar,p=t.enabled,f=t.shards,y=t.sideCar,h=t.noIsolation,v=t.inert,m=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,O=t.gapMode,x=g(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=y,k=fu([n,r]),E=d(d({},x),i);return e.createElement(e.Fragment,null,p&&e.createElement(j,{sideCar:yu,removeScrollBar:u,shards:f,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:O}),l?e.cloneElement(e.Children.only(s),d(d({},E),{ref:k})):e.createElement(w,d({},E,{className:c,ref:k}),s))}));vu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vu.classNames={fullWidth:su,zeroRight:lu};function mu(){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 bu=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=mu())&&(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)}}},wu=function(){var t,r=(t=bu(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},Ou={left:0,top:0,right:0,gap:0},xu=function(e){return parseInt(e||"",10)||0},ju=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ou;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[xu(r),xu(n),xu(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])}},ku=wu(),Eu="data-scroll-locked",Su=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(Eu,"] {\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(lu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(su," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(lu," .").concat(lu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(su," .").concat(su," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Eu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Pu=function(){var e=parseInt(document.body.getAttribute(Eu)||"0",10);return isFinite(e)?e:0},Cu=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Eu,(Pu()+1).toString()),function(){var e=Pu()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}}),[]);var a=e.useMemo((function(){return ju(i)}),[i]);return e.createElement(ku,{styles:Su(a,!r,i,n?"":"!important")})},zu=!1;if("undefined"!=typeof window)try{var Tu=Object.defineProperty({},"passive",{get:function(){return zu=!0,!0}});window.addEventListener("test",Tu,Tu),window.removeEventListener("test",Tu,Tu)}catch(e){zu=!1}var Lu=!!zu&&{passive:!1},Nu=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])},Ru=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Mu(e,n)){var o=Iu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Mu=function(e,t){return"v"===e?function(e){return Nu(e,"overflowY")}(t):function(e){return Nu(e,"overflowX")}(t)},Iu=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},Au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_u=function(e){return[e.deltaX,e.deltaY]},Du=function(e){return e&&"current"in e?e.current:e},Bu=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Fu=0,Wu=[];function Vu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hu,Uu=(Hu=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),i=e.useState(Fu++)[0],a=e.useState(wu)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=v([t.lockRef.current],(t.shards||[]).map(Du),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,i=Au(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,p=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===p&&"range"===u.type)return!1;var f=Ru(p,u);if(!f)return!0;if(f?r=p:(r="v"===p?"h":"v",f=Ru(p,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=r),!r)return!0;var d=o.current||r;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,p=0,f=0;do{var d=Iu(e,l),g=d[0],y=d[1]-d[2]-i*g;(g||y)&&Mu(e,l)&&(p+=y,f+=g),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return u&&(Math.abs(p)<1||!o)?c=!0:u||!(Math.abs(f)<1)&&o||(c=!0),c}(d,t,e,"h"===d?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(Wu.length&&Wu[Wu.length-1]===a){var n="deltaY"in t?_u(t):Au(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(l.current.shards||[]).map(Du).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?s(t,i[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,n,o){var i={name:e,delta:t,target:n,should:o,shadowParent:Vu(n)};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),p=e.useCallback((function(e){n.current=Au(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,_u(e),e.target,s(e,t.lockRef.current))}),[]),d=e.useCallback((function(e){u(e.type,Au(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return Wu.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Lu),document.addEventListener("touchmove",c,Lu),document.addEventListener("touchstart",p,Lu),function(){Wu=Wu.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Lu),document.removeEventListener("touchmove",c,Lu),document.removeEventListener("touchstart",p,Lu)}}),[]);var g=t.removeScrollBar,y=t.inert;return e.createElement(e.Fragment,null,y?e.createElement(a,{styles:Bu(i)}):null,g?e.createElement(Cu,{gapMode:t.gapMode}):null)},yu.useMedium(Hu),gu),Gu=e.forwardRef((function(t,r){return e.createElement(vu,d({},t,{ref:r,sideCar:Uu}))}));Gu.classNames=vu.classNames;var $u="Popover",[Yu,qu]=jl($u,[Tc]),Xu=Tc(),[Ku,Ju]=Yu($u),Zu=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=t,s=Xu(r),c=e.useRef(null),[u,p]=e.useState(!1),[f=!1,d]=Qc({prop:o,defaultProp:i,onChange:a});return Hi.jsx($c,{...s,children:Hi.jsx(Ku,{scope:r,contentId:Jl(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>p(!1)),[]),modal:l,children:n})})};Zu.displayName=$u;var Qu="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...o}=t,i=Ju(Qu,n),a=Xu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return e.useEffect((()=>(l(),()=>s())),[l,s]),Hi.jsx(Yc,{...a,...o,ref:r})})).displayName=Qu;var ep="PopoverTrigger",tp=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Ju(ep,r),i=Xu(r),a=Mi(t,o.triggerRef),l=Hi.jsx(El.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fp(o.open),...n,ref:a,onClick:xl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Hi.jsx(Yc,{asChild:!0,...i,children:l})}));tp.displayName=ep;var rp="PopoverPortal",[np,op]=Yu(rp,{forceMount:void 0}),ip=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Ju(rp,t);return Hi.jsx(np,{scope:t,forceMount:r,children:Hi.jsx(Jc,{present:r||i.open,children:Hi.jsx(Kc,{asChild:!0,container:o,children:n})})})};ip.displayName=rp;var ap="PopoverContent",lp=e.forwardRef(((e,t)=>{const r=op(ap,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Ju(ap,e.__scopePopover);return Hi.jsx(Jc,{present:n||i.open,children:i.modal?Hi.jsx(sp,{...o,ref:t}):Hi.jsx(cp,{...o,ref:t})})}));lp.displayName=ap;var sp=e.forwardRef(((t,r)=>{const n=Ju(ap,t.__scopePopover),o=e.useRef(null),i=Mi(r,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return au(e)}),[]),Hi.jsx(Gu,{as:Ui,allowPinchZoom:!0,children:Hi.jsx(up,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xl(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:xl(t.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:xl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),cp=e.forwardRef(((t,r)=>{const n=Ju(ap,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return Hi.jsx(up,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||n.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const r=e.target,a=n.triggerRef.current?.contains(r);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),up=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...p}=e,f=Ju(ap,r),d=Xu(r);return Al(),Hi.jsx(Wl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Hi.jsx(Nl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:Hi.jsx(qc,{"data-state":fp(f.open),role:"dialog",id:f.contentId,...d,...p,ref:t,style:{...p.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)"}})})})})),pp="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Ju(pp,r);return Hi.jsx(El.button,{type:"button",...n,ref:t,onClick:xl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=pp;function fp(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Xu(r);return Hi.jsx(Xc,{...o,...n,ref:t})})).displayName="PopoverArrow";var dp=ip,gp=lp,yp=Zu,hp=tp,vp=e.forwardRef((function(t,r){var n=t.className,o=t.align,i=void 0===o?"center":o,a=t.sideOffset,l=void 0===a?4:a,s=g(t,["className","align","sideOffset"]);return e.createElement(dp,null,e.createElement(gp,d({ref:r,align:i,sideOffset:l,className:yi("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",n)},s)))}));function mp(e,[t,r]){return Math.min(r,Math.max(t,e))}function bp(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}vp.displayName=gp.displayName;var wp=e.createContext(void 0);var Op=e.forwardRef(((e,t)=>Hi.jsx(El.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}})));Op.displayName="VisuallyHidden";var xp=[" ","Enter","ArrowUp","ArrowDown"],jp=[" ","Enter"],kp="Select",[Ep,Sp,Pp]=function(r){const n=r+"CollectionProvider",[o,i]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:o}})),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;function l(r){const{scope:n,children:o,...l}=r,s=n?.[t][a]||i,c=e.useMemo((()=>l),Object.values(l));return Hi.jsx(s.Provider,{value:c,children:o})}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t][a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},bp(o,...r)]}(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:r,children:n}=e,o=t.useRef(null),i=t.useRef(new Map).current;return Hi.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=n;const c=r+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Mi(t,l(c,r).collectionRef);return Hi.jsx(Ui,{ref:o,children:n})}));u.displayName=c;const p=r+"CollectionItemSlot",f="data-radix-collection-item",d=t.forwardRef(((e,r)=>{const{scope:n,children:o,...i}=e,a=t.useRef(null),s=Mi(r,a),c=l(p,n);return t.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Hi.jsx(Ui,{[f]:"",ref:s,children:o})}));return d.displayName=p,[{Provider:s,Slot:u,ItemSlot:d},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[n.collectionRef,n.itemMap])},i]}(kp),[Cp,zp]=jl(kp,[Pp,Tc]),Tp=Tc(),[Lp,Np]=Cp(kp),[Rp,Mp]=Cp(kp),Ip=t=>{const{__scopeSelect:r,children:n,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:p,autoComplete:f,disabled:d,required:g,form:y}=t,h=Tp(r),[v,m]=e.useState(null),[b,w]=e.useState(null),[O,x]=e.useState(!1),j=function(t){const r=e.useContext(wp);return t||r||"ltr"}(u),[k=!1,E]=Qc({prop:o,defaultProp:i,onChange:a}),[S,P]=Qc({prop:l,defaultProp:s,onChange:c}),C=e.useRef(null),z=!v||(y||!!v.closest("form")),[T,L]=e.useState(new Set),N=Array.from(T).map((e=>e.props.value)).join(";");return Hi.jsx($c,{...h,children:Hi.jsxs(Lp,{required:g,scope:r,trigger:v,onTriggerChange:m,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Jl(),value:S,onValueChange:P,open:k,onOpenChange:E,dir:j,triggerPointerDownPosRef:C,disabled:d,children:[Hi.jsx(Ep.Provider,{scope:r,children:Hi.jsx(Rp,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{L((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{L((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:n})}),z?Hi.jsxs(xf,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:f,value:S,onChange:e=>P(e.target.value),disabled:d,form:y,children:[void 0===S?Hi.jsx("option",{value:""}):null,Array.from(T)]},N):null]})})};Ip.displayName=kp;var Ap="SelectTrigger",_p=e.forwardRef(((t,r)=>{const{__scopeSelect:n,disabled:o=!1,...i}=t,a=Tp(n),l=Np(Ap,n),s=l.disabled||o,c=Mi(r,l.onTriggerChange),u=Sp(n),p=e.useRef("touch"),[f,d,g]=jf((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=kf(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 Hi.jsx(Yc,{asChild:!0,...a,children:Hi.jsx(El.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":Of(l.value)?"":void 0,...i,ref:c,onClick:xl(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)})),onPointerDown:xl(i.onPointerDown,(e=>{p.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:xl(i.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||xp.includes(e.key)&&(y(),e.preventDefault())}))})})}));_p.displayName=Ap;var Dp="SelectValue",Bp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=Np(Dp,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,p=Mi(t,s.onValueNodeChange);return ql((()=>{c(u)}),[c,u]),Hi.jsx(El.span,{...l,ref:p,style:{pointerEvents:"none"},children:Of(s.value)?Hi.jsx(Hi.Fragment,{children:a}):i})}));Bp.displayName=Dp;var Fp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Hi.jsx(El.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Fp.displayName="SelectIcon";var Wp=e=>Hi.jsx(Kc,{asChild:!0,...e});Wp.displayName="SelectPortal";var Vp="SelectContent",Hp=e.forwardRef(((t,r)=>{const n=Np(Vp,t.__scopeSelect),[o,i]=e.useState();if(ql((()=>{i(new DocumentFragment)}),[]),!n.open){const e=o;return e?p.createPortal(Hi.jsx(Gp,{scope:t.__scopeSelect,children:Hi.jsx(Ep.Slot,{scope:t.__scopeSelect,children:Hi.jsx("div",{children:t.children})})}),e):null}return Hi.jsx(Yp,{...t,ref:r})}));Hp.displayName=Vp;var Up=10,[Gp,$p]=Cp(Vp),Yp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:s,sideOffset:c,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v,...m}=t,b=Np(Vp,n),[w,O]=e.useState(null),[x,j]=e.useState(null),k=Mi(r,(e=>O(e))),[E,S]=e.useState(null),[P,C]=e.useState(null),z=Sp(n),[T,L]=e.useState(!1),N=e.useRef(!1);e.useEffect((()=>{if(w)return au(w)}),[w]),Al();const R=e.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=e.useCallback((()=>R([E,w])),[R,E,w]);e.useEffect((()=>{T&&M()}),[T,M]);const{onOpenChange:I,triggerPointerDownPosRef:A}=b;e.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]),e.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]=jf((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=kf(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(N.current=!0))}),[b.value]),F=e.useCallback((()=>w?.focus()),[w]),W=e.useCallback(((e,t,r)=>{const n=!N.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Xp:qp,H=V===Xp?{side:s,sideOffset:c,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:d,collisionPadding:g,sticky:y,hideWhenDetached:h,avoidCollisions:v}:{};return Hi.jsx(Gp,{scope:n,content:w,viewport:x,onViewportChange:j,itemRefCallback:B,selectedItem:E,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:T,searchRef:_,children:Hi.jsx(Gu,{as:Ui,allowPinchZoom:!0,children:Hi.jsx(Wl,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:xl(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Hi.jsx(Nl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Hi.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...m,...H,onPlaced:()=>L(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:xl(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((()=>R(t))),e.preventDefault()}}))})})})})})}));Yp.displayName="SelectContentImpl";var qp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onPlaced:o,...i}=t,a=Np(Vp,n),l=$p(Vp,n),[s,c]=e.useState(null),[u,p]=e.useState(null),f=Mi(r,(e=>p(e))),d=Sp(n),g=e.useRef(!1),y=e.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:m,focusSelectedItem:b}=l,w=e.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-Up,p=mp(i,[Up,Math.max(Up,u-c)]);s.style.minWidth=l+"px",s.style.left=p+"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-Up,p=mp(i,[Up,Math.max(Up,u-c)]);s.style.minWidth=l+"px",s.style.right=p+"px"}const i=d(),l=window.innerHeight-2*Up,c=h.scrollHeight,p=window.getComputedStyle(u),f=parseInt(p.borderTopWidth,10),y=parseInt(p.paddingTop,10),b=parseInt(p.borderBottomWidth,10),w=f+y+c+parseInt(p.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-Up,S=l-E,P=v.offsetHeight/2,C=f+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,f+h.offsetTop+(e?j:0)+P)+z;s.style.height=t+"px",h.scrollTop=C-E+h.offsetTop}s.style.margin=`${Up}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]);ql((()=>w()),[w]);const[O,x]=e.useState();ql((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const j=e.useCallback((e=>{e&&!0===y.current&&(w(),b?.(),y.current=!1)}),[w,b]);return Hi.jsx(Kp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:Hi.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Hi.jsx(El.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));qp.displayName="SelectItemAlignedPosition";var Xp=e.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Up,...i}=e,a=Tp(r);return Hi.jsx(qc,{...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)"}})}));Xp.displayName="SelectPopperPosition";var[Kp,Jp]=Cp(Vp,{}),Zp="SelectViewport",Qp=e.forwardRef(((t,r)=>{const{__scopeSelect:n,nonce:o,...i}=t,a=$p(Zp,n),l=Jp(Zp,n),s=Mi(r,a.onViewportChange),c=e.useRef(0);return Hi.jsxs(Hi.Fragment,{children:[Hi.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}),Hi.jsx(Ep.Slot,{scope:n,children:Hi.jsx(El.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xl(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*Up,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}))})})]})}));Qp.displayName=Zp;var ef="SelectGroup",[tf,rf]=Cp(ef);e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Jl();return Hi.jsx(tf,{scope:r,id:o,children:Hi.jsx(El.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=ef;var nf="SelectLabel",of=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=rf(nf,r);return Hi.jsx(El.div,{id:o.id,...n,ref:t})}));of.displayName=nf;var af="SelectItem",[lf,sf]=Cp(af),cf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...l}=t,s=Np(af,n),c=$p(af,n),u=s.value===o,[p,f]=e.useState(a??""),[d,g]=e.useState(!1),y=Mi(r,(e=>c.itemRefCallback?.(e,o,i))),h=Jl(),v=e.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 Hi.jsx(lf,{scope:n,value:o,disabled:i,textId:h,isSelected:u,onItemTextChange:e.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:Hi.jsx(Ep.ItemSlot,{scope:n,value:o,disabled:i,textValue:p,children:Hi.jsx(El.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:xl(l.onFocus,(()=>g(!0))),onBlur:xl(l.onBlur,(()=>g(!1))),onClick:xl(l.onClick,(()=>{"mouse"!==v.current&&m()})),onPointerUp:xl(l.onPointerUp,(()=>{"mouse"===v.current&&m()})),onPointerDown:xl(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:xl(l.onPointerMove,(e=>{v.current=e.pointerType,i?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:xl(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:xl(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(jp.includes(e.key)&&m()," "===e.key&&e.preventDefault())}))})})})}));cf.displayName=af;var uf="SelectItemText",pf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,className:o,style:i,...a}=t,l=Np(uf,n),s=$p(uf,n),c=sf(uf,n),u=Mp(uf,n),[f,d]=e.useState(null),g=Mi(r,(e=>d(e)),c.onItemTextChange,(e=>s.itemTextRefCallback?.(e,c.value,c.disabled))),y=f?.textContent,h=e.useMemo((()=>Hi.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value)),[c.disabled,c.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:m}=u;return ql((()=>(v(h),()=>m(h))),[v,m,h]),Hi.jsxs(Hi.Fragment,{children:[Hi.jsx(El.span,{id:c.textId,...a,ref:g}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?p.createPortal(a.children,l.valueNode):null]})}));pf.displayName=uf;var ff="SelectItemIndicator",df=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return sf(ff,r).isSelected?Hi.jsx(El.span,{"aria-hidden":!0,...n,ref:t}):null}));df.displayName=ff;var gf="SelectScrollUpButton",yf=e.forwardRef(((t,r)=>{const n=$p(gf,t.__scopeSelect),o=Jp(gf,t.__scopeSelect),[i,a]=e.useState(!1),l=Mi(r,o.onScrollButtonChange);return ql((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Hi.jsx(mf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));yf.displayName=gf;var hf="SelectScrollDownButton",vf=e.forwardRef(((t,r)=>{const n=$p(hf,t.__scopeSelect),o=Jp(hf,t.__scopeSelect),[i,a]=e.useState(!1),l=Mi(r,o.onScrollButtonChange);return ql((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?Hi.jsx(mf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));vf.displayName=hf;var mf=e.forwardRef(((t,r)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=t,a=$p("SelectScrollButton",n),l=e.useRef(null),s=Sp(n),c=e.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),ql((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Hi.jsx(El.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:xl(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:xl(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:xl(i.onPointerLeave,(()=>{c()}))})})),bf=e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Hi.jsx(El.div,{"aria-hidden":!0,...n,ref:t})}));bf.displayName="SelectSeparator";var wf="SelectArrow";function Of(e){return""===e||void 0===e}e.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Tp(r),i=Np(wf,r),a=$p(wf,r);return i.open&&"popper"===a.position?Hi.jsx(Xc,{...o,...n,ref:t}):null})).displayName=wf;var xf=e.forwardRef(((t,r)=>{const{value:n,...o}=t,i=e.useRef(null),a=Mi(r,i),l=function(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}(n);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),Hi.jsx(Op,{asChild:!0,children:Hi.jsx("select",{...o,ref:a,defaultValue:n})})}));function jf(t){const r=Sl(t),n=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=n.current+e;r(t),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[r]),a=e.useCallback((()=>{n.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[n,i,a]}function kf(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}xf.displayName="BubbleSelect";var Ef=_p,Sf=Fp,Pf=Wp,Cf=Hp,zf=Qp,Tf=of,Lf=cf,Nf=pf,Rf=df,Mf=yf,If=vf,Af=bf,_f=Ip,Df=Bp,Bf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=g(t,["className","children"]);return e.createElement(Ef,d({ref:r,className:yi("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",n)},i),o,e.createElement(Sf,{asChild:!0},e.createElement(Si,{className:"h-4 w-4 opacity-50"})))}));Bf.displayName=Ef.displayName;var Ff=e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Mf,d({ref:r,className:yi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(zi,{className:"h-4 w-4"}))}));Ff.displayName=Mf.displayName;var Wf=e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(If,d({ref:r,className:yi("flex cursor-default items-center justify-center py-1",n)},o),e.createElement(Si,{className:"h-4 w-4"}))}));Wf.displayName=If.displayName;var Vf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=t.position,a=void 0===i?"popper":i,l=g(t,["className","children","position"]);return e.createElement(Pf,null,e.createElement(Cf,d({ref:r,className:yi("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"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a},l),e.createElement(Ff,null),e.createElement(zf,{className:yi("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),e.createElement(Wf,null)))}));Vf.displayName=Cf.displayName,e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Tf,d({ref:r,className:yi("px-2 py-1.5 text-sm font-semibold",n)},o))})).displayName=Tf.displayName;var Hf=e.forwardRef((function(t,r){var n=t.className,o=t.children,i=g(t,["className","children"]);return e.createElement(Lf,d({ref:r,className:yi("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",n)},i),e.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},e.createElement(Rf,null,e.createElement(Ei,{className:"h-4 w-4"}))),e.createElement(Nf,null,o))}));function Uf(t){var r=t.className,n=t.dateFrom,o=t.dateTo,i=t.handleDateChange,a=e.useState({from:n||new Date(2022,0,20),to:o||x(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:S(e),to:U(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:W(e),to:F(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return j(e,-t,r)}(new Date,1);return{from:W(e),to:F(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:H(e),to:V(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return M(e,-t,r)}(new Date,1);return{from:H(e),to:V(e)}}}];return e.createElement("div",{className:yi("grid gap-2",r)},e.createElement(yp,null,e.createElement(hp,{asChild:!0},e.createElement(Ki,{id:"date",variant:"outline",className:yi("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},e.createElement(ki,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?e.createElement(e.Fragment,null,Ce(l.from,"LLL dd, y")," -"," ",Ce(l.to,"LLL dd, y")):Ce(l.from,"LLL dd, y"):e.createElement("span",null,"Choisissez une date"))),e.createElement(vp,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},e.createElement(_f,{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)}}},e.createElement(Bf,{className:"w-[300px]"},e.createElement(Df,{placeholder:"Sélectionnez un préréglage"})),e.createElement(Vf,{position:"popper"},c.map((function(t){return e.createElement(Hf,{key:t.label,value:t.label},t.label)})))),e.createElement("div",{className:"rounded-md border"},e.createElement(Ol,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Hf.displayName=Lf.displayName,e.forwardRef((function(t,r){var n=t.className,o=g(t,["className"]);return e.createElement(Af,d({ref:r,className:yi("-mx-1 my-1 h-px bg-muted",n)},o))})).displayName=Af.displayName;var Gf=e.forwardRef((function(t,r){var n=t.className,o=t.type,i=g(t,["className","type"]);return e.createElement("input",d({type:o,className:yi("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",n),ref:r},i))}));function $f(t){var r=this,n=t.title,o=t.filters,i=t.setFilters,l=t.configFilters,s=t.onSearch,c=t.count,p=t.isLoading,f=t.setCurrentPage,g=e.useState(o),v=g[0],m=g[1],b=a(!1),w=b[0],O=b[1],x=e.useMemo((function(){return JSON.stringify(v)!==JSON.stringify(o)}),[v,o]),j=function(){return y(r,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return m(o),x?[4,f(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return s(),[2]}}))}))};return e.createElement("div",{className:"flex flex-col gap-2"},e.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},e.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"},e.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),n,e.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},c)),e.createElement("div",{className:"border-b border-gray-100 mb-4"}),e.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},e.createElement(Uf,{dateFrom:o.fromDate,dateTo:o.toDate,handleDateChange:function(e){i(d(d({},o),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),l&&l.map((function(t,r){return e.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&e.createElement(Gf,{type:"text",placeholder:t.placeholder,value:o[t.name],onChange:function(e){var r;e.target.value?i(d(d({},o),((r={})[t.name]=e.target.value,r))):(delete o[t.name],i(d({},o)))},onKeyDown:function(e){"Enter"===e.key&&j()}}),"Select"===t.type&&e.createElement(_f,{disabled:t.disabled||0===t.options.length,value:o[t.name],onValueChange:function(e){var r;i(d(d({},o),((r={})[t.name]="_empty"===e?void 0:e,r)))}},e.createElement(Bf,null,e.createElement(Df,{placeholder:t.placeholder})),e.createElement(Vf,null,u((function(){return t.options.map((function(t,r){return e.createElement(Hf,{key:"".concat(t.VALUE,"-").concat(r),value:t.VALUE||"_empty"},t.NAME)}))}),[t.options]))))})),e.createElement("div",{className:"flex gap-2 ml-auto"},l.some((function(e){return"Export"===e.type}))&&e.createElement(Ki,{disabled:w,onClick:function(){return y(r,void 0,void 0,(function(){var e,t;return h(this,(function(i){switch(i.label){case 0:return O(!0),e=l.find((function(e){return"Export"===e.type})),[4,(a=null==e?void 0:e.ctx,y(r,void 0,void 0,(function(){var e,t,r,i,l,s;return h(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(a),t=0,r=Object.entries(o);t<r.length;t++){var n=r[t],i=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===i||"toDate"===i){var s=new Date(l);e+="&".concat(i,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(i,"=").concat(l)}}return e}())];case 1:if(!(e=c.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=c.sent(),r=window.URL.createObjectURL(t),(i=document.createElement("a")).href=r,l="".concat(n.replace(/\s+/g,"_"),"_").concat(o.fromDate,"_").concat(o.toDate,"_.csv"),i.download=l,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i),[3,4];case 3:return s=c.sent(),console.error("Export error:",s),[3,4];case 4:return[2]}}))})))];case 1:return i.sent(),t=setInterval((function(){O(!1),clearInterval(t)}),3e4),[2]}var a}))}))},size:"sm"},e.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"},e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"7 10 12 15 17 10"}),e.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),e.createElement(Ki,{size:"sm",onClick:j,disabled:p},x?e.createElement(e.Fragment,null,e.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"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):e.createElement(e.Fragment,null,e.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"},e.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),e.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
27
27
|
/**
|
28
28
|
* table-core
|
29
29
|
*
|