ui-mathilde-web 0.11.9 → 0.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-mathilde-web.js
CHANGED
|
@@ -10235,7 +10235,7 @@ const vS = "card-module__mth_card_indicator__lfgp3", Tb = {
|
|
|
10235
10235
|
maximumFractionDigits: 2,
|
|
10236
10236
|
minimumFractionDigits: 0
|
|
10237
10237
|
}).format(c);
|
|
10238
|
-
return /* @__PURE__ */ B("div", { className: `${Tb.mth_card_indicator} flex flex-col border bg-white
|
|
10238
|
+
return /* @__PURE__ */ B("div", { className: `${Tb.mth_card_indicator} flex flex-col border bg-white p-5`, children: [
|
|
10239
10239
|
/* @__PURE__ */ p("div", { className: "flex justify-end", children: /* @__PURE__ */ p(
|
|
10240
10240
|
$a,
|
|
10241
10241
|
{
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",o=0;o<arguments.length;o++){var i=arguments[o];i&&(a=s(a,r(i)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var i in a)e.call(a,i)&&a[i]&&(o=s(o,i));return o}function s(a,o){return o?a?a+" "+o:a+o:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(nh);var sr=nh.exports;const sk=eh(sr);var ql={exports:{}};function rh(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:r}=typeof n=="boolean"?{immediate:n}:n;let s,a,o,i,l;function c(){const u=Date.now()-i;if(u<e&&u>=0)o=setTimeout(c,e-u);else if(o=void 0,!r){const h=s,g=a;s=void 0,a=void 0,l=t.apply(h,g)}}const d=function(...u){if(s&&this!==s)throw new Error("Debounced method called with different contexts.");s=this,a=u,i=Date.now();const h=r&&!o;if(o||(o=setTimeout(c,e)),h){const g=s,m=a;s=void 0,a=void 0,l=t.apply(g,m)}return l};return d.clear=()=>{o&&(clearTimeout(o),o=void 0)},d.flush=()=>{if(!o)return;const u=s,h=a;s=void 0,a=void 0,l=t.apply(u,h),clearTimeout(o),o=void 0},d}ql.exports.debounce=rh,ql.exports=rh;var ak=ql.exports;const ok=eh(ak);var ik=Object.defineProperty,lk=(t,e,n)=>e in t?ik(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>(lk(t,typeof e!="symbol"?e+"":e,n),n);const ck=300,dk=0;class uk extends _.PureComponent{constructor(e){super(e),ot(this,"container"),ot(this,"scrolling"),ot(this,"started"),ot(this,"pressed"),ot(this,"isMobile",!1),ot(this,"internal"),ot(this,"scrollLeft"),ot(this,"scrollTop"),ot(this,"clientX"),ot(this,"clientY"),ot(this,"onEndScroll",()=>{this.scrolling=!1,!this.pressed&&this.started&&this.processEnd()}),ot(this,"onScroll",()=>{const n=this.container.current;(n.scrollLeft!==this.scrollLeft||n.scrollTop!==this.scrollTop)&&(this.scrolling=!0,this.processScroll(),this.onEndScroll())}),ot(this,"onTouchStart",n=>{const{nativeMobileScroll:r}=this.props;if(this.isDraggable(n.target))if(this.internal=!0,r&&this.scrolling)this.pressed=!0;else{const s=n.touches[0];this.processClick(s.clientX,s.clientY),!r&&this.props.stopPropagation&&n.stopPropagation()}}),ot(this,"onTouchEnd",()=>{const{nativeMobileScroll:n}=this.props;this.pressed&&(this.started&&(!this.scrolling||!n)?this.processEnd():this.pressed=!1,this.forceUpdate())}),ot(this,"onTouchMove",n=>{const{nativeMobileScroll:r}=this.props;if(this.pressed&&(!r||!this.isMobile)){const s=n.touches[0];s&&this.processMove(s.clientX,s.clientY),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation()}}),ot(this,"onMouseDown",n=>{var r,s;this.isDraggable(n.target)&&this.isScrollable()&&(this.internal=!0,((s=(r=this.props)==null?void 0:r.buttons)==null?void 0:s.indexOf(n.button))!==-1&&(this.processClick(n.clientX,n.clientY),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation()))}),ot(this,"onMouseMove",n=>{this.pressed&&(this.processMove(n.clientX,n.clientY),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation())}),ot(this,"onMouseUp",n=>{this.pressed&&(this.started?this.processEnd():(this.internal=!1,this.pressed=!1,this.forceUpdate(),this.props.onClick&&this.props.onClick(n)),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation())}),this.container=_.createRef(),this.onEndScroll=ok(this.onEndScroll,ck),this.scrolling=!1,this.started=!1,this.pressed=!1,this.internal=!1,this.getRef=this.getRef.bind(this)}componentDidMount(){const{nativeMobileScroll:e}=this.props,n=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),n.addEventListener("touchstart",this.onTouchStart,{passive:!1}),n.addEventListener("mousedown",this.onMouseDown,{passive:!1}),e&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())}componentWillUnmount(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)}getElement(){return this.container.current}isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}isDraggable(e){const n=this.props.ignoreElements;if(n){const r=e.closest(n);return r===null||r.contains(this.getElement())}else return!0}isScrollable(){const e=this.container.current;return e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}processClick(e,n){const r=this.container.current;this.scrollLeft=r==null?void 0:r.scrollLeft,this.scrollTop=r==null?void 0:r.scrollTop,this.clientX=e,this.clientY=n,this.pressed=!0}processStart(e=!0){const{onStartScroll:n}=this.props;this.started=!0,e&&document.body.classList.add("cursor-grab"),n&&n({external:!this.internal}),this.forceUpdate()}processScroll(){if(this.started){const{onScroll:e}=this.props;e&&e({external:!this.internal})}else this.processStart(!1)}processMove(e,n){const{horizontal:r,vertical:s,activationDistance:a,onScroll:o}=this.props,i=this.container.current;this.started?(r&&(i.scrollLeft-=e-this.clientX),s&&(i.scrollTop-=n-this.clientY),o&&o({external:!this.internal}),this.clientX=e,this.clientY=n,this.scrollLeft=i.scrollLeft,this.scrollTop=i.scrollTop):(r&&Math.abs(e-this.clientX)>a||s&&Math.abs(n-this.clientY)>a)&&(this.clientX=e,this.clientY=n,this.processStart())}processEnd(){const{onEndScroll:e}=this.props;this.container.current&&e&&e({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("cursor-grab"),this.forceUpdate()}getRef(e){[this.container,this.props.innerRef].forEach(n=>{n&&(typeof n=="function"?n(e):n.current=e)})}render(){const{children:e,draggingClassName:n,className:r,style:s,hideScrollbars:a}=this.props;return f.jsx("div",{className:sk(r,this.pressed&&n,{"!scroll-auto [&>*]:pointer-events-none [&>*]:cursor-grab":this.pressed,"overflow-auto":this.isMobile,"overflow-hidden !overflow-x-hidden [overflow:-moz-scrollbars-none] [scrollbar-width:none]":a,"[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent":a}),style:s,ref:this.getRef,onScroll:this.onScroll,children:e})}}ot(uk,"defaultProps",{nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},buttons:[dk]});const aa=_.forwardRef(({className:t,color:e="default",theme:n={},...r},s)=>{const a=se(ge().checkbox,n);return f.jsx("input",{ref:s,type:"checkbox",className:Q(a.root.base,a.root.color[e],t),...r})});aa.displayName="Checkbox";const oa=({children:t,className:e,color:n="default",theme:r={},value:s,...a})=>{const o=se(ge().helperText,r);return f.jsx("p",{className:Q(o.root.base,o.root.colors[n],e),...a,children:s??t??""})};oa.displayName="HelperText";const ds=_.forwardRef(({addon:t,className:e,color:n="gray",helperText:r,icon:s,rightIcon:a,shadow:o,sizing:i="md",theme:l={},type:c="text",...d},u)=>{const h=se(ge().textInput,l);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Q(h.base,e),children:[t&&f.jsx("span",{className:h.addon,children:t}),f.jsxs("div",{className:h.field.base,children:[s&&f.jsx("div",{className:h.field.icon.base,children:f.jsx(s,{className:h.field.icon.svg})}),a&&f.jsx("div",{"data-testid":"right-icon",className:h.field.rightIcon.base,children:f.jsx(a,{className:h.field.rightIcon.svg})}),f.jsx("input",{className:Q(h.field.input.base,h.field.input.colors[n],h.field.input.sizes[i],h.field.input.withIcon[s?"on":"off"],h.field.input.withRightIcon[a?"on":"off"],h.field.input.withAddon[t?"on":"off"],h.field.input.withShadow[o?"on":"off"]),type:c,...d,ref:u})]})]}),r&&f.jsx(oa,{color:n,children:r})]})});ds.displayName="TextInput";const sh=_.createContext(void 0);function Co(){const t=_.useContext(sh);if(!t)throw new Error("useDatePickerContext should be used within the DatePickerContext provider!");return t}var ze=(t=>(t[t.Days=0]="Days",t[t.Months=1]="Months",t[t.Years=2]="Years",t[t.Decades=3]="Decades",t))(ze||{}),ah=(t=>(t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday",t))(ah||{});const ia=(t,e,n)=>{const r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();if(e&&n){const s=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),a=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();return r>=s&&r<=a}if(e){const s=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();return r>=s}if(n){const s=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();return r<=s}return!0},Oo=(t,e)=>(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t.getTime()===e.getTime()),fk=(t,e,n)=>(ia(t,e,n)||(e&&t<e?t=e:n&&t>n&&(t=n)),t),hk=(t,e)=>{const n=new Date(t.getFullYear(),t.getMonth(),1);let s=n.getDay()-e;return s<0&&(s+=7),$l(n,-s)},gk=(t,e)=>{const n=[],r=new Date(0);r.setDate(r.getDate()-r.getDay()+e);const s=new Intl.DateTimeFormat(t,{weekday:"short"});for(let a=0;a<7;a++)n.push(s.format($l(r,a)));return n},$l=(t,e)=>{const n=new Date(t);return n.setDate(n.getDate()+e),n},mk=(t,e)=>{const n=new Date(t);return n.setMonth(n.getMonth()+e),n},us=(t,e)=>{const n=new Date(t);return n.setFullYear(n.getFullYear()+e),n},la=(t,e,n)=>{let r={day:"numeric",month:"long",year:"numeric"};return n&&(r=n),new Intl.DateTimeFormat(t,r).format(e)},fs=(t,e)=>{const n=t.getFullYear();return Math.floor(n/e)*e},pk=(t,e)=>{const n=t.getFullYear(),r=e+9;return n>=e&&n<=r},bk=({theme:t={}})=>{const{theme:e,weekStart:n,minDate:r,maxDate:s,viewDate:a,selectedDate:o,changeSelectedDate:i,language:l}=Co(),c=se(e.views.days,t),d=gk(l,n),u=hk(a,n);return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:c.header.base,children:d.map((h,g)=>f.jsx("span",{className:c.header.title,children:h},g))}),f.jsx("div",{className:c.items.base,children:[...Array(42)].map((h,g)=>{const m=$l(u,g),p=la(l,m,{day:"numeric"}),b=Oo(o,m),y=!ia(m,r,s);return f.jsx("button",{disabled:y,type:"button",className:Q(c.items.item.base,b&&c.items.item.selected,y&&c.items.item.disabled),onClick:()=>{y||i(m,!0)},children:p},g)})})]})},yk=({theme:t={}})=>{const{theme:e,selectedDate:n,viewDate:r,setViewDate:s,setView:a}=Co(),o=se(e.views.decades,t);return f.jsx("div",{className:o.items.base,children:[...Array(12)].map((i,l)=>{const d=fs(r,100)-10+l*10,u=new Date(d,0,1),h=us(u,9),g=pk(r,d),m=!ia(r,u,h);return f.jsx("button",{disabled:m,type:"button",className:Q(o.items.item.base,g&&o.items.item.selected,m&&o.items.item.disabled),onClick:()=>{m||(s(us(r,d-n.getFullYear())),a(ze.Years))},children:d},l)})})},wk=({theme:t={}})=>{const{theme:e,minDate:n,maxDate:r,selectedDate:s,viewDate:a,language:o,setViewDate:i,setView:l}=Co(),c=se(e.views.months,t);return f.jsx("div",{className:c.items.base,children:[...Array(12)].map((d,u)=>{const h=new Date(a.getTime());h.setMonth(u);const g=la(o,h,{month:"short"}),m=Oo(s,h),p=!ia(h,n,r);return f.jsx("button",{disabled:p,type:"button",className:Q(c.items.item.base,m&&c.items.item.selected,p&&c.items.item.disabled),onClick:()=>{p||(i(h),l(ze.Days))},children:g},u)})})},vk=({theme:t={}})=>{const{theme:e,selectedDate:n,minDate:r,maxDate:s,viewDate:a,setViewDate:o,setView:i}=Co(),l=se(e.views.years,t);return f.jsx("div",{className:l.items.base,children:[...Array(12)].map((c,d)=>{const h=fs(a,10)-1+d*1,g=new Date(a.getTime());g.setFullYear(h);const m=Oo(n,g),p=!ia(g,r,s);return f.jsx("button",{disabled:p,type:"button",className:Q(l.items.item.base,m&&l.items.item.selected,p&&l.items.item.disabled),onClick:()=>{p||(o(g),i(ze.Months))},children:h},d)})})},xk=({title:t,open:e,inline:n=!1,autoHide:r=!0,showClearButton:s=!0,labelClearButton:a="Clear",showTodayButton:o=!0,labelTodayButton:i="Today",defaultDate:l=new Date,minDate:c,maxDate:d,language:u="en",weekStart:h=ah.Sunday,className:g,theme:m={},onSelectedDateChanged:p,...b},y)=>{const w=se(ge().datepicker,m);l=fk(l,c,d);const[k,v]=_.useState(e),[x,S]=_.useState(ze.Days),[N,M]=_.useState(l),[P,T]=_.useState(l),W=_.useRef(null),F=_.useRef(null),C=(ee,j)=>{M(ee),p&&p(ee),r&&x===ze.Days&&j==!0&&!n&&v(!1)},O=()=>{C(l,!0),l&&T(l)};_.useImperativeHandle(y,()=>({focus(){var ee;(ee=W.current)==null||ee.focus()},clear(){O()}}));const E=ee=>{switch(ee){case ze.Decades:return f.jsx(yk,{theme:w.views.decades});case ze.Years:return f.jsx(vk,{theme:w.views.years});case ze.Months:return f.jsx(wk,{theme:w.views.months});case ze.Days:default:return f.jsx(bk,{theme:w.views.days})}},B=()=>{switch(x){case ze.Days:return ze.Months;case ze.Months:return ze.Years;case ze.Years:return ze.Decades}return x},U=()=>{switch(x){case ze.Decades:return`${fs(P,100)} - ${fs(P,100)+90}`;case ze.Years:return`${fs(P,10)} - ${fs(P,10)+9}`;case ze.Months:return la(u,P,{year:"numeric"});case ze.Days:default:return la(u,P,{month:"long",year:"numeric"})}},G=(ee,j,V)=>{switch(ee){case ze.Days:return new Date(mk(j,V));case ze.Months:return new Date(us(j,V));case ze.Years:return new Date(us(j,V*10));case ze.Decades:return new Date(us(j,V*100));default:return new Date(us(j,V*10))}};return _.useEffect(()=>{const ee=j=>{var R,I;const V=(R=F==null?void 0:F.current)==null?void 0:R.contains(j.target),L=(I=W==null?void 0:W.current)==null?void 0:I.contains(j.target);!V&&!L&&v(!1)};return document.addEventListener("mousedown",ee),()=>{document.removeEventListener("mousedown",ee)}},[W,F,v]),f.jsx(sh.Provider,{value:{theme:w,language:u,minDate:c,maxDate:d,weekStart:h,isOpen:k,setIsOpen:v,view:x,setView:S,viewDate:P,setViewDate:T,selectedDate:N,setSelectedDate:M,changeSelectedDate:C},children:f.jsxs("div",{className:Q(w.root.base,g),children:[!n&&f.jsx(ds,{theme:w.root.input,icon:Ex,ref:W,onFocus:()=>{Oo(P,N)||T(N),v(!0)},value:N&&la(u,N),readOnly:!0,...b}),(k||n)&&f.jsx("div",{ref:F,className:Q(w.popup.root.base,n&&w.popup.root.inline),children:f.jsxs("div",{className:w.popup.root.inner,children:[f.jsxs("div",{className:w.popup.header.base,children:[t&&f.jsx("div",{className:w.popup.header.title,children:t}),f.jsxs("div",{className:w.popup.header.selectors.base,children:[f.jsx("button",{type:"button",className:Q(w.popup.header.selectors.button.base,w.popup.header.selectors.button.prev),onClick:()=>T(G(x,P,-1)),children:f.jsx(Dx,{})}),f.jsx("button",{type:"button",className:Q(w.popup.header.selectors.button.base,w.popup.header.selectors.button.view),onClick:()=>S(B()),children:U()}),f.jsx("button",{type:"button",className:Q(w.popup.header.selectors.button.base,w.popup.header.selectors.button.next),onClick:()=>T(G(x,P,1)),children:f.jsx(Mx,{})})]})]}),f.jsx("div",{className:w.popup.view.base,children:E(x)}),(s||o)&&f.jsxs("div",{className:w.popup.footer.base,children:[o&&f.jsx("button",{type:"button",className:Q(w.popup.footer.button.base,w.popup.footer.button.today),onClick:()=>{const ee=new Date;C(ee,!0),T(ee)},children:i}),s&&f.jsx("button",{type:"button",className:Q(w.popup.footer.button.base,w.popup.footer.button.clear),onClick:()=>{C(l,!0),l&&T(l)},children:a})]})]})})]})})},oh=_.forwardRef(xk);oh.displayName="Datepicker";function Do(){return typeof window<"u"}function Mr(t){return ih(t)?(t.nodeName||"").toLowerCase():"#document"}function Mt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function fn(t){var e;return(e=(ih(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ih(t){return Do()?t instanceof Node||t instanceof Mt(t).Node:!1}function Te(t){return Do()?t instanceof Element||t instanceof Mt(t).Element:!1}function ht(t){return Do()?t instanceof HTMLElement||t instanceof Mt(t).HTMLElement:!1}function ec(t){return!Do()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Mt(t).ShadowRoot}function ca(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Zt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function kk(t){return["table","td","th"].includes(Mr(t))}function Mo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function tc(t){const e=nc(),n=Te(t)?Zt(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function _k(t){let e=Ln(t);for(;ht(e)&&!ar(e);){if(tc(e))return e;if(Mo(e))return null;e=Ln(e)}return null}function nc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ar(t){return["html","body","#document"].includes(Mr(t))}function Zt(t){return Mt(t).getComputedStyle(t)}function Eo(t){return Te(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Mr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ec(t)&&t.host||fn(t);return ec(e)?e.host:e}function lh(t){const e=Ln(t);return ar(e)?t.ownerDocument?t.ownerDocument.body:t.body:ht(e)&&ca(e)?e:lh(e)}function or(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=lh(t),a=s===((r=t.ownerDocument)==null?void 0:r.body),o=Mt(s);if(a){const i=rc(o);return e.concat(o,o.visualViewport||[],ca(s)?s:[],i&&n?or(i):[])}return e.concat(s,or(s,[],n))}function rc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function hn(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function tt(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ec(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function sc(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function ch(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function dh(t){return t.mozInputSource===0&&t.isTrusted?!0:ic()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function ac(t){return Sk()?!1:!ic()&&t.width===0&&t.height===0||ic()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function oc(){return/apple/i.test(navigator.vendor)}function ic(){const t=/android/i;return t.test(sc())||t.test(ch())}function uh(){return sc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Sk(){return ch().includes("jsdom/")}function To(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function Ck(t){return"nativeEvent"in t}function Ok(t){return t.matches("html,body")}function _t(t){return(t==null?void 0:t.ownerDocument)||document}function lc(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function ir(t){return"composedPath"in t?t.composedPath()[0]:t.target}const Dk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function cc(t){return ht(t)&&t.matches(Dk)}function gt(t){t.preventDefault(),t.stopPropagation()}function fh(t){return t?t.getAttribute("role")==="combobox"&&cc(t):!1}const Mk=["top","right","bottom","left"],hh=["start","end"],gh=Mk.reduce((t,e)=>t.concat(e,e+"-"+hh[0],e+"-"+hh[1]),[]),hs=Math.min,Er=Math.max,Po=Math.round,gs=Math.floor,gn=t=>({x:t,y:t}),Ek={left:"right",right:"left",bottom:"top",top:"bottom"},Tk={start:"end",end:"start"};function dc(t,e,n){return Er(t,hs(e,n))}function ms(t,e){return typeof t=="function"?t(e):t}function Fn(t){return t.split("-")[0]}function mn(t){return t.split("-")[1]}function mh(t){return t==="x"?"y":"x"}function uc(t){return t==="y"?"height":"width"}function No(t){return["top","bottom"].includes(Fn(t))?"y":"x"}function fc(t){return mh(No(t))}function ph(t,e,n){n===void 0&&(n=!1);const r=mn(t),s=fc(t),a=uc(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=Io(o)),[o,Io(o)]}function Pk(t){const e=Io(t);return[jo(t),e,jo(e)]}function jo(t){return t.replace(/start|end/g,e=>Tk[e])}function Nk(t,e,n){const r=["left","right"],s=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?a:o;default:return[]}}function jk(t,e,n,r){const s=mn(t);let a=Nk(Fn(t),n==="start",r);return s&&(a=a.map(o=>o+"-"+s),e&&(a=a.concat(a.map(jo)))),a}function Io(t){return t.replace(/left|right|bottom|top/g,e=>Ek[e])}function Ik(t){return{top:0,right:0,bottom:0,left:0,...t}}function bh(t){return typeof t!="number"?Ik(t):{top:t,right:t,bottom:t,left:t}}function Ao(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function yh(t,e,n){let{reference:r,floating:s}=t;const a=No(e),o=fc(e),i=uc(o),l=Fn(e),c=a==="y",d=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,h=r[i]/2-s[i]/2;let g;switch(l){case"top":g={x:d,y:r.y-s.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-s.width,y:u};break;default:g={x:r.x,y:r.y}}switch(mn(e)){case"start":g[o]-=h*(n&&c?-1:1);break;case"end":g[o]+=h*(n&&c?-1:1);break}return g}const Ak=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:o}=n,i=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:u}=yh(c,r,l),h=r,g={},m=0;for(let p=0;p<i.length;p++){const{name:b,fn:y}=i[p],{x:w,y:k,data:v,reset:x}=await y({x:d,y:u,initialPlacement:r,placement:h,strategy:s,middlewareData:g,rects:c,platform:o,elements:{reference:t,floating:e}});d=w??d,u=k??u,g={...g,[b]:{...g[b],...v}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):x.rects),{x:d,y:u}=yh(c,h,l)),p=-1)}return{x:d,y:u,placement:h,strategy:s,middlewareData:g}};async function hc(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:a,rects:o,elements:i,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=ms(e,t),m=bh(g),b=i[h?u==="floating"?"reference":"floating":u],y=Ao(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{...o.floating,x:r,y:s}:o.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),v=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},x=Ao(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:k,strategy:l}):w);return{top:(y.top-x.top+m.top)/v.y,bottom:(x.bottom-y.bottom+m.bottom)/v.y,left:(y.left-x.left+m.left)/v.x,right:(x.right-y.right+m.right)/v.x}}const Rk=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:a,platform:o,elements:i,middlewareData:l}=e,{element:c,padding:d=0}=ms(t,e)||{};if(c==null)return{};const u=bh(d),h={x:n,y:r},g=fc(s),m=uc(g),p=await o.getDimensions(c),b=g==="y",y=b?"top":"left",w=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=a.reference[m]+a.reference[g]-h[g]-a.floating[m],x=h[g]-a.reference[g],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let N=S?S[k]:0;(!N||!await(o.isElement==null?void 0:o.isElement(S)))&&(N=i.floating[k]||a.floating[m]);const M=v/2-x/2,P=N/2-p[m]/2-1,T=hs(u[y],P),W=hs(u[w],P),F=T,C=N-p[m]-W,O=N/2-p[m]/2+M,E=dc(F,O,C),B=!l.arrow&&mn(s)!=null&&O!==E&&a.reference[m]/2-(O<F?T:W)-p[m]/2<0,U=B?O<F?O-F:O-C:0;return{[g]:h[g]+U,data:{[g]:E,centerOffset:O-E-U,...B&&{alignmentOffset:U}},reset:B}}});function Lk(t,e,n){return(t?[...n.filter(s=>mn(s)===t),...n.filter(s=>mn(s)!==t)]:n.filter(s=>Fn(s)===s)).filter(s=>t?mn(s)===t||(e?jo(s)!==s:!1):!0)}const Fk=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,s;const{rects:a,middlewareData:o,placement:i,platform:l,elements:c}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:h=gh,autoAlignment:g=!0,...m}=ms(t,e),p=u!==void 0||h===gh?Lk(u||null,g,h):h,b=await hc(e,m),y=((n=o.autoPlacement)==null?void 0:n.index)||0,w=p[y];if(w==null)return{};const k=ph(w,a,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(i!==w)return{reset:{placement:p[0]}};const v=[b[Fn(w)],b[k[0]],b[k[1]]],x=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:w,overflows:v}],S=p[y+1];if(S)return{data:{index:y+1,overflows:x},reset:{placement:S}};const N=x.map(T=>{const W=mn(T.placement);return[T.placement,W&&d?T.overflows.slice(0,2).reduce((F,C)=>F+C,0):T.overflows[0],T.overflows]}).sort((T,W)=>T[1]-W[1]),P=((s=N.filter(T=>T[2].slice(0,mn(T[0])?2:3).every(W=>W<=0))[0])==null?void 0:s[0])||N[0][0];return P!==i?{data:{index:y+1,overflows:x},reset:{placement:P}}:{}}}},Bk=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:a,rects:o,initialPlacement:i,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=ms(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Fn(s),w=Fn(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),v=h||(w||!p?[Io(i)]:Pk(i));!h&&m!=="none"&&v.push(...jk(i,p,m,k));const x=[i,...v],S=await hc(e,b),N=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&N.push(S[y]),u){const F=ph(s,o,k);N.push(S[F[0]],S[F[1]])}if(M=[...M,{placement:s,overflows:N}],!N.every(F=>F<=0)){var P,T;const F=(((P=a.flip)==null?void 0:P.index)||0)+1,C=x[F];if(C)return{data:{index:F,overflows:M},reset:{placement:C}};let O=(T=M.filter(E=>E.overflows[0]<=0).sort((E,B)=>E.overflows[1]-B.overflows[1])[0])==null?void 0:T.placement;if(!O)switch(g){case"bestFit":{var W;const E=(W=M.map(B=>[B.placement,B.overflows.filter(U=>U>0).reduce((U,G)=>U+G,0)]).sort((B,U)=>B[1]-U[1])[0])==null?void 0:W[0];E&&(O=E);break}case"initialPlacement":O=i;break}if(s!==O)return{reset:{placement:O}}}return{}}}};async function Wk(t,e){const{placement:n,platform:r,elements:s}=t,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Fn(n),i=mn(n),l=No(n)==="y",c=["left","top"].includes(o)?-1:1,d=a&&l?-1:1,u=ms(e,t);let{mainAxis:h,crossAxis:g,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return i&&typeof m=="number"&&(g=i==="end"?m*-1:m),l?{x:g*d,y:h*c}:{x:h*c,y:g*d}}const zk=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:a,placement:o,middlewareData:i}=e,l=await Wk(e,t);return o===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:{...l,placement:o}}}}},Hk=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:i={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...l}=ms(t,e),c={x:n,y:r},d=await hc(e,l),u=No(Fn(s)),h=mh(u);let g=c[h],m=c[u];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=g+d[b],k=g-d[y];g=dc(w,g,k)}if(o){const b=u==="y"?"top":"left",y=u==="y"?"bottom":"right",w=m+d[b],k=m-d[y];m=dc(w,m,k)}const p=i.fn({...e,[h]:g,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r}}}}};function wh(t){const e=Zt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ht(t),a=s?t.offsetWidth:n,o=s?t.offsetHeight:r,i=Po(n)!==a||Po(r)!==o;return i&&(n=a,r=o),{width:n,height:r,$:i}}function gc(t){return Te(t)?t:t.contextElement}function ps(t){const e=gc(t);if(!ht(e))return gn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:a}=wh(e);let o=(a?Po(n.width):n.width)/r,i=(a?Po(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const Yk=gn(0);function vh(t){const e=Mt(t);return!nc()||!e.visualViewport?Yk:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Vk(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Mt(t)?!1:e}function Tr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),a=gc(t);let o=gn(1);e&&(r?Te(r)&&(o=ps(r)):o=ps(t));const i=Vk(a,n,r)?vh(a):gn(0);let l=(s.left+i.x)/o.x,c=(s.top+i.y)/o.y,d=s.width/o.x,u=s.height/o.y;if(a){const h=Mt(a),g=r&&Te(r)?Mt(r):r;let m=h,p=rc(m);for(;p&&r&&g!==m;){const b=ps(p),y=p.getBoundingClientRect(),w=Zt(p),k=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*b.x,v=y.top+(p.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=k,c+=v,m=Mt(p),p=rc(m)}}return Ao({width:d,height:u,x:l,y:c})}function mc(t,e){const n=Eo(t).scrollLeft;return e?e.left+n:Tr(fn(t)).left+n}function xh(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:mc(t,r)),a=r.top+e.scrollTop;return{x:s,y:a}}function Uk(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const a=s==="fixed",o=fn(r),i=e?Mo(e.floating):!1;if(r===o||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=gn(1);const d=gn(0),u=ht(r);if((u||!u&&!a)&&((Mr(r)!=="body"||ca(o))&&(l=Eo(r)),ht(r))){const g=Tr(r);c=ps(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const h=o&&!u&&!a?xh(o,l,!0):gn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function Xk(t){return Array.from(t.getClientRects())}function Gk(t){const e=fn(t),n=Eo(t),r=t.ownerDocument.body,s=Er(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=Er(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+mc(t);const i=-n.scrollTop;return Zt(r).direction==="rtl"&&(o+=Er(e.clientWidth,r.clientWidth)-s),{width:s,height:a,x:o,y:i}}function Kk(t,e){const n=Mt(t),r=fn(t),s=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,i=0,l=0;if(s){a=s.width,o=s.height;const c=nc();(!c||c&&e==="fixed")&&(i=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:i,y:l}}function Qk(t,e){const n=Tr(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,a=ht(t)?ps(t):gn(1),o=t.clientWidth*a.x,i=t.clientHeight*a.y,l=s*a.x,c=r*a.y;return{width:o,height:i,x:l,y:c}}function kh(t,e,n){let r;if(e==="viewport")r=Kk(t,n);else if(e==="document")r=Gk(fn(t));else if(Te(e))r=Qk(e,n);else{const s=vh(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Ao(r)}function _h(t,e){const n=Ln(t);return n===e||!Te(n)||ar(n)?!1:Zt(n).position==="fixed"||_h(n,e)}function Zk(t,e){const n=e.get(t);if(n)return n;let r=or(t,[],!1).filter(i=>Te(i)&&Mr(i)!=="body"),s=null;const a=Zt(t).position==="fixed";let o=a?Ln(t):t;for(;Te(o)&&!ar(o);){const i=Zt(o),l=tc(o);!l&&i.position==="fixed"&&(s=null),(a?!l&&!s:!l&&i.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ca(o)&&!l&&_h(t,o))?r=r.filter(d=>d!==o):s=i,o=Ln(o)}return e.set(t,r),r}function Jk(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Mo(e)?[]:Zk(e,this._c):[].concat(n),r],i=o[0],l=o.reduce((c,d)=>{const u=kh(e,d,s);return c.top=Er(u.top,c.top),c.right=hs(u.right,c.right),c.bottom=hs(u.bottom,c.bottom),c.left=Er(u.left,c.left),c},kh(e,i,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qk(t){const{width:e,height:n}=wh(t);return{width:e,height:n}}function $k(t,e,n){const r=ht(e),s=fn(e),a=n==="fixed",o=Tr(t,!0,a,e);let i={scrollLeft:0,scrollTop:0};const l=gn(0);if(r||!r&&!a)if((Mr(e)!=="body"||ca(s))&&(i=Eo(e)),r){const h=Tr(e,!0,a,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&(l.x=mc(s));const c=s&&!r&&!a?xh(s,i):gn(0),d=o.left+i.scrollLeft-l.x-c.x,u=o.top+i.scrollTop-l.y-c.y;return{x:d,y:u,width:o.width,height:o.height}}function pc(t){return Zt(t).position==="static"}function Sh(t,e){if(!ht(t)||Zt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return fn(t)===n&&(n=n.ownerDocument.body),n}function Ch(t,e){const n=Mt(t);if(Mo(t))return n;if(!ht(t)){let s=Ln(t);for(;s&&!ar(s);){if(Te(s)&&!pc(s))return s;s=Ln(s)}return n}let r=Sh(t,e);for(;r&&kk(r)&&pc(r);)r=Sh(r,e);return r&&ar(r)&&pc(r)&&!tc(r)?n:r||_k(t)||n}const e1=async function(t){const e=this.getOffsetParent||Ch,n=this.getDimensions,r=await n(t.floating);return{reference:$k(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function t1(t){return Zt(t).direction==="rtl"}const n1={convertOffsetParentRelativeRectToViewportRelativeRect:Uk,getDocumentElement:fn,getClippingRect:Jk,getOffsetParent:Ch,getElementRects:e1,getClientRects:Xk,getDimensions:qk,getScale:ps,isElement:Te,isRTL:t1};function Oh(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function r1(t,e){let n=null,r;const s=fn(t);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function o(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const c=t.getBoundingClientRect(),{left:d,top:u,width:h,height:g}=c;if(i||e(),!h||!g)return;const m=gs(u),p=gs(s.clientWidth-(d+h)),b=gs(s.clientHeight-(u+g)),y=gs(d),k={rootMargin:-m+"px "+-p+"px "+-b+"px "+-y+"px",threshold:Er(0,hs(1,l))||1};let v=!0;function x(S){const N=S[0].intersectionRatio;if(N!==l){if(!v)return o();N?o(!1,N):r=setTimeout(()=>{o(!1,1e-7)},1e3)}N===1&&!Oh(c,t.getBoundingClientRect())&&o(),v=!1}try{n=new IntersectionObserver(x,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(x,k)}n.observe(t)}return o(!0),a}function Dh(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=gc(t),d=s||a?[...c?or(c):[],...or(e)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const u=c&&i?r1(c,n):null;let h=-1,g=null;o&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),n()}),c&&!l&&g.observe(c),g.observe(e));let m,p=l?Tr(t):null;l&&b();function b(){const y=Tr(t);p&&!Oh(p,y)&&n(),p=y,m=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u==null||u(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(m)}}const s1=zk,a1=Fk,o1=Hk,i1=Bk,Mh=Rk,l1=(t,e,n)=>{const r=new Map,s={platform:n1,...n},a={...s.platform,_c:r};return Ak(t,e,{...s,platform:a})};var Ro=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Lo(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Lo(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&t.$$typeof)&&!Lo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Eh(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Th(t,e){const n=Eh(t);return Math.round(e*n)/n}function bc(t){const e=z.useRef(t);return Ro(()=>{e.current=t}),e}function c1(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:o}={},transform:i=!0,whileElementsMounted:l,open:c}=t,[d,u]=z.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,g]=z.useState(r);Lo(h,r)||g(r);const[m,p]=z.useState(null),[b,y]=z.useState(null),w=z.useCallback(G=>{G!==S.current&&(S.current=G,p(G))},[]),k=z.useCallback(G=>{G!==N.current&&(N.current=G,y(G))},[]),v=a||m,x=o||b,S=z.useRef(null),N=z.useRef(null),M=z.useRef(d),P=l!=null,T=bc(l),W=bc(s),F=bc(c),C=z.useCallback(()=>{if(!S.current||!N.current)return;const G={placement:e,strategy:n,middleware:h};W.current&&(G.platform=W.current),l1(S.current,N.current,G).then(ee=>{const j={...ee,isPositioned:F.current!==!1};O.current&&!Lo(M.current,j)&&(M.current=j,yx.flushSync(()=>{u(j)}))})},[h,e,n,W,F]);Ro(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(G=>({...G,isPositioned:!1})))},[c]);const O=z.useRef(!1);Ro(()=>(O.current=!0,()=>{O.current=!1}),[]),Ro(()=>{if(v&&(S.current=v),x&&(N.current=x),v&&x){if(T.current)return T.current(v,x,C);C()}},[v,x,C,T,P]);const E=z.useMemo(()=>({reference:S,floating:N,setReference:w,setFloating:k}),[w,k]),B=z.useMemo(()=>({reference:v,floating:x}),[v,x]),U=z.useMemo(()=>{const G={position:n,left:0,top:0};if(!B.floating)return G;const ee=Th(B.floating,d.x),j=Th(B.floating,d.y);return i?{...G,transform:"translate("+ee+"px, "+j+"px)",...Eh(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:j}},[n,i,B.floating,d.x,d.y]);return z.useMemo(()=>({...d,update:C,refs:E,elements:B,floatingStyles:U}),[d,C,E,B,U])}const d1=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Mh({element:r.current,padding:s}).fn(n):{}:r?Mh({element:r,padding:s}).fn(n):{}}}},u1=(t,e)=>({...s1(t),options:[t,e]}),f1=(t,e)=>({...o1(t),options:[t,e]}),h1=(t,e)=>({...i1(t),options:[t,e]}),g1=(t,e)=>({...a1(t),options:[t,e]}),m1=(t,e)=>({...d1(t),options:[t,e]});/*!
|
|
6
6
|
* tabbable 6.2.0
|
|
7
7
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
8
|
-
*/var p1=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Fo=p1.join(","),Ph=typeof Element>"u",bs=Ph?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bo=!Ph&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Wo=function t(e,n){var r;n===void 0&&(n=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",o=a||n&&e&&t(e.parentNode);return o},b1=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},y1=function(e,n,r){if(Wo(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(Fo));return n&&bs.call(e,Fo)&&s.unshift(e),s=s.filter(r),s},w1=function t(e,n,r){for(var s=[],a=Array.from(e);a.length;){var o=a.shift();if(!Wo(o,!1))if(o.tagName==="SLOT"){var i=o.assignedElements(),l=i.length?i:o.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:o,candidates:c})}else{var d=bs.call(o,Fo);d&&r.filter(o)&&(n||!e.includes(o))&&s.push(o);var u=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),h=!Wo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(u&&h){var g=t(u===!0?o.children:u.children,!0,r);r.flatten?s.push.apply(s,g):s.push({scopeParent:o,candidates:g})}else a.unshift.apply(a,o.children)}}return s},Nh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},jh=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||b1(e))&&!Nh(e)?0:e.tabIndex},v1=function(e,n){var r=jh(e);return r<0&&n&&!Nh(e)?0:r},x1=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ih=function(e){return e.tagName==="INPUT"},k1=function(e){return Ih(e)&&e.type==="hidden"},_1=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},S1=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},C1=function(e){if(!e.name)return!0;var n=e.form||Bo(e),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=S1(s,e.form);return!a||a===e},O1=function(e){return Ih(e)&&e.type==="radio"},D1=function(e){return O1(e)&&!C1(e)},M1=function(e){var n,r=e&&Bo(e),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==e){var o,i,l;for(a=!!((o=s)!==null&&o!==void 0&&(i=o.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!a&&s;){var c,d,u;r=Bo(s),s=(c=r)===null||c===void 0?void 0:c.host,a=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return a},Ah=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},E1=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=bs.call(e,"details>summary:first-of-type"),o=a?e.parentElement:e;if(bs.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof s=="function"){for(var i=e;e;){var l=e.parentElement,c=Bo(e);if(l&&!l.shadowRoot&&s(l)===!0)return Ah(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(M1(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ah(e);return!1},T1=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return bs.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},P1=function(e,n){return!(n.disabled||Wo(n)||k1(n)||E1(n,e)||_1(n)||T1(n))},yc=function(e,n){return!(D1(n)||jh(n)<0||!P1(e,n))},N1=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},j1=function t(e){var n=[],r=[];return e.forEach(function(s,a){var o=!!s.scopeParent,i=o?s.scopeParent:s,l=v1(i,o),c=o?t(s.candidates):i;l===0?o?n.push.apply(n,c):n.push(i):r.push({documentOrder:a,tabIndex:l,item:s,isScope:o,content:c})}),r.sort(x1).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},zo=function(e,n){n=n||{};var r;return n.getShadowRoot?r=w1([e],n.includeContainer,{filter:yc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:N1}):r=y1(e,n.includeContainer,yc.bind(null,n)),j1(r)},I1=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return bs.call(e,Fo)===!1?!1:yc(n,e)};function Rh(t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const A1=z.useInsertionEffect||(t=>t());function pn(t){const e=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return A1(()=>{e.current=t}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}const wc="ArrowUp",da="ArrowDown",ys="ArrowLeft",ws="ArrowRight";function Ho(t,e,n){return Math.floor(t/e)!==n}function ua(t,e){return e<0||e>=t.current.length}function vc(t,e){return yt(t,{disabledIndices:e})}function Lh(t,e){return yt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function yt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=e===void 0?{}:e;const o=t.current,i=s?c=>s.includes(c):c=>{const d=o[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-a:a;while(l>=0&&l<=o.length-1&&i(l));return l}function R1(t,e){let{event:n,orientation:r,loop:s,cols:a,disabledIndices:o,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===wc){if(d&>(n),c===-1)u=l;else if(u=yt(t,{startingIndex:u,amount:a,decrement:!0,disabledIndices:o}),s&&(c-a<i||u<0)){const h=c%a,g=l%a,m=l-(g-h);g===h?u=l:u=g>h?m:m-a}ua(t,u)&&(u=c)}if(n.key===da&&(d&>(n),c===-1?u=i:(u=yt(t,{startingIndex:c,amount:a,disabledIndices:o}),s&&c+a>l&&(u=yt(t,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),ua(t,u)&&(u=c)),r==="both"){const h=gs(c/a);n.key===ws&&(d&>(n),c%a!==a-1?(u=yt(t,{startingIndex:c,disabledIndices:o}),s&&Ho(u,a,h)&&(u=yt(t,{startingIndex:c-c%a-1,disabledIndices:o}))):s&&(u=yt(t,{startingIndex:c-c%a-1,disabledIndices:o})),Ho(u,a,h)&&(u=c)),n.key===ys&&(d&>(n),c%a!==0?(u=yt(t,{startingIndex:c,disabledIndices:o,decrement:!0}),s&&Ho(u,a,h)&&(u=yt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):s&&(u=yt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),Ho(u,a,h)&&(u=c));const g=gs(l/a)===h;ua(t,u)&&(s&&g?u=n.key===ys?l:yt(t,{startingIndex:c-c%a-1,disabledIndices:o}):u=c)}return u}function L1(t,e,n){const r=[];let s=0;return t.forEach((a,o)=>{let{width:i,height:l}=a;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+o+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let h=0;h<l;h++)d.push(s+u+h*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=o}),c=!0):s++}}),[...r]}function F1(t,e,n,r,s){if(t===-1)return-1;const a=n.indexOf(t);switch(s){case"tl":return a;case"tr":return a+e[t].width-1;case"bl":return a+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function B1(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let Fh=0;function Bn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(Fh);const a=()=>t==null?void 0:t.focus({preventScroll:n});s?a():Fh=requestAnimationFrame(a)}var Ie=typeof document<"u"?_.useLayoutEffect:_.useEffect;function W1(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function z1(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const Bh=z.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function H1(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,a]=z.useState(()=>new Map),o=z.useCallback(l=>{a(c=>new Map(c).set(l,null))},[]),i=z.useCallback(l=>{a(c=>{const d=new Map(c);return d.delete(l),d})},[]);return Ie(()=>{const l=new Map(s);Array.from(l.keys()).sort(W1).forEach((d,u)=>{l.set(d,u)}),z1(s,l)||a(l)},[s]),z.createElement(Bh.Provider,{value:z.useMemo(()=>({register:o,unregister:i,map:s,elementsRef:n,labelsRef:r}),[o,i,s,n,r])},e)}function Y1(t){let{label:e}=t===void 0?{}:t;const[n,r]=z.useState(null),s=z.useRef(null),{register:a,unregister:o,map:i,elementsRef:l,labelsRef:c}=z.useContext(Bh),d=z.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var h;const g=e!==void 0;c.current[n]=g?e:(h=u==null?void 0:u.textContent)!=null?h:null}},[n,l,c,e]);return Ie(()=>{const u=s.current;if(u)return a(u),()=>{o(u)}},[a,o]),Ie(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),z.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function fa(){return fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fa.apply(this,arguments)}let xc=!1,V1=0;const Wh=()=>"floating-ui-"+V1++;function U1(){const[t,e]=z.useState(()=>xc?Wh():void 0);return Ie(()=>{t==null&&e(Wh())},[]),z.useEffect(()=>{xc||(xc=!0)},[]),t}const Yo=z.useId||U1;function X1(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(s=>s!==n))||[])}}}const G1=z.createContext(null),K1=z.createContext(null),Vo=()=>{var t;return((t=z.useContext(G1))==null?void 0:t.id)||null},ha=()=>z.useContext(K1);function Pr(t){return"data-floating-ui-"+t}function bn(t){const e=_.useRef(t);return Ie(()=>{e.current=t}),e}const zh=Pr("safe-polygon");function kc(t,e,n){return n&&!To(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Q1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:{domReference:o,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:h=!1,restMs:g=0,move:m=!0}=e,p=ha(),b=Vo(),y=bn(u),w=bn(d),k=z.useRef(),v=z.useRef(),x=z.useRef(),S=z.useRef(),N=z.useRef(!0),M=z.useRef(!1),P=z.useRef(()=>{}),T=z.useCallback(()=>{var O;const E=(O=s.current.openEvent)==null?void 0:O.type;return(E==null?void 0:E.includes("mouse"))&&E!=="mousedown"},[s]);z.useEffect(()=>{if(!c)return;function O(E){let{open:B}=E;B||(clearTimeout(v.current),clearTimeout(S.current),N.current=!0)}return a.on("openchange",O),()=>{a.off("openchange",O)}},[c,a]),z.useEffect(()=>{if(!c||!y.current||!n)return;function O(B){T()&&r(!1,B,"hover")}const E=_t(i).documentElement;return E.addEventListener("mouseleave",O),()=>{E.removeEventListener("mouseleave",O)}},[i,n,r,c,y,T]);const W=z.useCallback(function(O,E,B){E===void 0&&(E=!0),B===void 0&&(B="hover");const U=kc(w.current,"close",k.current);U&&!x.current?(clearTimeout(v.current),v.current=setTimeout(()=>r(!1,O,B),U)):E&&(clearTimeout(v.current),r(!1,O,B))},[w,r]),F=z.useCallback(()=>{P.current(),x.current=void 0},[]),C=z.useCallback(()=>{if(M.current){const O=_t(l.floating.current).body;O.style.pointerEvents="",O.removeAttribute(zh),M.current=!1}},[l]);return z.useEffect(()=>{if(!c)return;function O(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function E(G){if(clearTimeout(v.current),N.current=!1,h&&!To(k.current)||g>0&&kc(w.current,"open")===0)return;const ee=kc(w.current,"open",k.current);ee?v.current=setTimeout(()=>{r(!0,G,"hover")},ee):r(!0,G,"hover")}function B(G){if(O())return;P.current();const ee=_t(i);if(clearTimeout(S.current),y.current){n||clearTimeout(v.current),x.current=y.current({...t,tree:p,x:G.clientX,y:G.clientY,onClose(){C(),F(),W(G,!0,"safe-polygon")}});const V=x.current;ee.addEventListener("mousemove",V),P.current=()=>{ee.removeEventListener("mousemove",V)};return}(k.current==="touch"?!tt(i,G.relatedTarget):!0)&&W(G)}function U(G){O()||y.current==null||y.current({...t,tree:p,x:G.clientX,y:G.clientY,onClose(){C(),F(),W(G)}})(G)}if(Te(o)){const G=o;return n&&G.addEventListener("mouseleave",U),i==null||i.addEventListener("mouseleave",U),m&&G.addEventListener("mousemove",E,{once:!0}),G.addEventListener("mouseenter",E),G.addEventListener("mouseleave",B),()=>{n&&G.removeEventListener("mouseleave",U),i==null||i.removeEventListener("mouseleave",U),m&&G.removeEventListener("mousemove",E),G.removeEventListener("mouseenter",E),G.removeEventListener("mouseleave",B)}}},[o,i,c,t,h,g,m,W,F,C,r,n,p,w,y,s]),Ie(()=>{var O;if(c&&n&&(O=y.current)!=null&&O.__options.blockPointerEvents&&T()){const B=_t(i).body;if(B.setAttribute(zh,""),B.style.pointerEvents="none",M.current=!0,Te(o)&&i){var E;const U=o,G=p==null||(E=p.nodesRef.current.find(ee=>ee.id===b))==null||(E=E.context)==null?void 0:E.elements.floating;return G&&(G.style.pointerEvents=""),U.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{U.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,o,p,y,T]),Ie(()=>{n||(k.current=void 0,F(),C())},[n,F,C]),z.useEffect(()=>()=>{F(),clearTimeout(v.current),clearTimeout(S.current),C()},[c,o,F,C]),z.useMemo(()=>{if(!c)return{};function O(E){k.current=E.pointerType}return{reference:{onPointerDown:O,onPointerEnter:O,onMouseMove(E){n||g===0||(clearTimeout(S.current),S.current=setTimeout(()=>{N.current||r(!0,E.nativeEvent,"hover")},g))}},floating:{onMouseEnter(){clearTimeout(v.current)},onMouseLeave(E){W(E.nativeEvent,!1)}}}},[c,g,n,r,W])}function Z1(t,e){var n;let r=[],s=(n=t.find(a=>a.id===e))==null?void 0:n.parentId;for(;s;){const a=t.find(o=>o.id===s);s=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Nr(t,e){let n=t.filter(s=>{var a;return s.parentId===e&&((a=s.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=t.filter(s=>{var a;return(a=r)==null?void 0:a.some(o=>{var i;return s.parentId===o.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function J1(t,e){let n,r=-1;function s(a,o){o>r&&(n=a,r=o),Nr(t,a).forEach(l=>{s(l.id,o+1)})}return s(e,0),t.find(a=>a.id===n)}let vs=new WeakMap,Uo=new WeakSet,Xo={},_c=0;const q1=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hh=t=>t&&(t.host||Hh(t.parentNode)),$1=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Hh(n);return t.contains(r)?r:null}).filter(n=>n!=null);function e_(t,e,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=$1(e,t),i=new Set,l=new Set(o),c=[];Xo[s]||(Xo[s]=new WeakMap);const d=Xo[s];o.forEach(u),h(e),i.clear();function u(g){!g||i.has(g)||(i.add(g),g.parentNode&&u(g.parentNode))}function h(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,m=>{if(i.has(m))h(m);else{const p=a?m.getAttribute(a):null,b=p!==null&&p!=="false",y=(vs.get(m)||0)+1,w=(d.get(m)||0)+1;vs.set(m,y),d.set(m,w),c.push(m),y===1&&b&&Uo.add(m),w===1&&m.setAttribute(s,""),!b&&a&&m.setAttribute(a,"true")}})}return _c++,()=>{c.forEach(g=>{const m=(vs.get(g)||0)-1,p=(d.get(g)||0)-1;vs.set(g,m),d.set(g,p),m||(!Uo.has(g)&&a&&g.removeAttribute(a),Uo.delete(g)),p||g.removeAttribute(s)}),_c--,_c||(vs=new WeakMap,vs=new WeakMap,Uo=new WeakSet,Xo={})}}function Yh(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=_t(t[0]).body;return e_(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const ga=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vh(t,e){const n=zo(t,ga());e==="prev"&&n.reverse();const r=n.indexOf(hn(_t(t)));return n.slice(r+1)[0]}function Uh(){return Vh(document.body,"next")}function Xh(){return Vh(document.body,"prev")}function ma(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!tt(n,r)}function t_(t){zo(t,ga()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function n_(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Sc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let r_;function Gh(t){t.key==="Tab"&&(t.target,clearTimeout(r_))}const Go=z.forwardRef(function(e,n){const[r,s]=z.useState();Ie(()=>(oc()&&s("button"),document.addEventListener("keydown",Gh),()=>{document.removeEventListener("keydown",Gh)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Pr("focus-guard")]:"",style:Sc};return z.createElement("span",fa({},e,a))}),Kh=z.createContext(null),Qh=Pr("portal");function s_(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=z.useState(null),a=Yo(),o=Zh(),i=z.useRef(null);return Ie(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),Ie(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=a,c.setAttribute(Qh,""),l.appendChild(c),i.current=c,s(c)},[e,a]),Ie(()=>{if(i.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Te(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=a,d.setAttribute(Qh,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,a,o]),r}function a_(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const a=s_({id:n,root:r}),[o,i]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),u=z.useRef(null),h=!!o&&!o.modal&&o.open&&s&&!!(r||a);return z.useEffect(()=>{if(!a||!s||o!=null&&o.modal)return;function g(m){a&&ma(m)&&(m.type==="focusin"?n_:t_)(a)}return a.addEventListener("focusin",g,!0),a.addEventListener("focusout",g,!0),()=>{a.removeEventListener("focusin",g,!0),a.removeEventListener("focusout",g,!0)}},[a,s,o==null?void 0:o.modal]),z.createElement(Kh.Provider,{value:z.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:a,setFocusManagerState:i}),[s,a])},h&&a&&z.createElement(Go,{"data-type":"outside",ref:l,onFocus:g=>{if(ma(g,a)){var m;(m=d.current)==null||m.focus()}else{const p=Xh()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus()}}}),h&&a&&z.createElement("span",{"aria-owns":a.id,style:Sc}),a&&yf.createPortal(e,a),h&&a&&z.createElement(Go,{"data-type":"outside",ref:c,onFocus:g=>{if(ma(g,a)){var m;(m=u.current)==null||m.focus()}else{const p=Uh()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,g.nativeEvent))}}}))}const Zh=()=>z.useContext(Kh),o_=20;let jr=[];function Cc(t){jr=jr.filter(n=>n.isConnected);let e=t;if(!(!e||Mr(e)==="body")){if(!I1(e,ga())){const n=zo(e,ga())[0];if(!n)return;e=n}jr.push(e),jr.length>o_&&(jr=jr.slice(-20))}}function Jh(){return jr.slice().reverse().find(t=>t.isConnected)}const i_=z.forwardRef(function(e,n){return z.createElement("button",fa({},e,{type:"button",ref:n,tabIndex:-1,style:Sc}))});function qh(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:o=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:h,nodeId:g,onOpenChange:m,events:p,dataRef:b,elements:{domReference:y,floating:w}}=e,k=typeof o=="number"&&o<0,v=fh(y)&&k,x=q1()?a:!0,S=bn(s),N=bn(o),M=bn(i),P=ha(),T=Zh(),W=z.useRef(null),F=z.useRef(null),C=z.useRef(!1),O=z.useRef(!1),E=T!=null,B=z.useCallback(function(j){return j===void 0&&(j=w),j?zo(j,ga()):[]},[w]),U=z.useCallback(j=>{const V=B(j);return S.current.map(L=>y&&L==="reference"?y:w&&L==="floating"?w:V).filter(Boolean).flat()},[y,w,S,B]);z.useEffect(()=>{if(r||!l)return;function j(L){if(L.key==="Tab"){tt(w,hn(_t(w)))&&B().length===0&&!v&>(L);const R=U(),I=ir(L);S.current[0]==="reference"&&I===y&&(gt(L),L.shiftKey?Bn(R[R.length-1]):Bn(R[1])),S.current[1]==="floating"&&I===w&&L.shiftKey&&(gt(L),Bn(R[0]))}}const V=_t(w);return V.addEventListener("keydown",j),()=>{V.removeEventListener("keydown",j)}},[r,y,w,l,S,v,B,U]),z.useEffect(()=>{if(r||!d)return;function j(){O.current=!0,setTimeout(()=>{O.current=!1})}function V(L){const R=L.relatedTarget;queueMicrotask(()=>{const I=!(tt(y,R)||tt(w,R)||tt(R,w)||tt(T==null?void 0:T.portalNode,R)||R!=null&&R.hasAttribute(Pr("focus-guard"))||P&&(Nr(P.nodesRef.current,g).find(D=>{var H,J;return tt((H=D.context)==null?void 0:H.elements.floating,R)||tt((J=D.context)==null?void 0:J.elements.domReference,R)})||Z1(P.nodesRef.current,g).find(D=>{var H,J;return((H=D.context)==null?void 0:H.elements.floating)===R||((J=D.context)==null?void 0:J.elements.domReference)===R})));R&&I&&!O.current&&R!==Jh()&&(C.current=!0,m(!1,L))})}if(w&&ht(y))return y.addEventListener("focusout",V),y.addEventListener("pointerdown",j),!l&&w.addEventListener("focusout",V),()=>{y.removeEventListener("focusout",V),y.removeEventListener("pointerdown",j),!l&&w.removeEventListener("focusout",V)}},[r,y,w,l,g,P,T,m,d]),z.useEffect(()=>{var j;if(r)return;const V=Array.from((T==null||(j=T.portalNode)==null?void 0:j.querySelectorAll("["+Pr("portal")+"]"))||[]);if(w){const L=[w,...V,W.current,F.current,S.current.includes("reference")||v?y:null].filter(I=>I!=null),R=l||v?Yh(L,x,!x):Yh(L);return()=>{R()}}},[r,y,w,l,S,T,v,x]),Ie(()=>{if(r||!w)return;const j=_t(w),V=hn(j);queueMicrotask(()=>{const L=U(w),R=N.current,I=(typeof R=="number"?L[R]:R.current)||w,D=tt(w,V);!k&&!D&&u&&Bn(I,{preventScroll:I===w})})},[r,u,w,k,U,N]),Ie(()=>{if(r||!w)return;let j=!1;const V=_t(w),L=hn(V),R=b.current;Cc(L);function I(D){let{reason:H,event:J,nested:K}=D;H==="escape-key"&&h.domReference.current&&Cc(h.domReference.current),H==="hover"&&J.type==="mouseleave"&&(C.current=!0),H==="outside-press"&&(K?(C.current=!1,j=!0):C.current=!(dh(J)||ac(J)))}return p.on("openchange",I),()=>{p.off("openchange",I);const D=hn(V),H=tt(w,D)||P&&Nr(P.nodesRef.current,g).some(q=>{var te;return tt((te=q.context)==null?void 0:te.elements.floating,D)});(H||R.openEvent&&["click","mousedown"].includes(R.openEvent.type))&&h.domReference.current&&Cc(h.domReference.current);const K=Jh();M.current&&!C.current&&ht(K)&&(!(K!==D&&D!==V.body)||H)&&Bn(K,{cancelPrevious:!1,preventScroll:j})}},[r,w,M,b,h,p,P,g]),Ie(()=>{if(!(r||!T))return T.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:h}),()=>{T.setFocusManagerState(null)}},[r,T,l,u,m,h,d]),Ie(()=>{if(r||!w||typeof MutationObserver!="function"||k)return;const j=()=>{const L=w.getAttribute("tabindex");S.current.includes("floating")||hn(_t(w))!==h.domReference.current&&B().length===0?L!=="0"&&w.setAttribute("tabindex","0"):L!=="-1"&&w.setAttribute("tabindex","-1")};j();const V=new MutationObserver(j);return V.observe(w,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,w,h,S,B,k]);function G(j){return r||!c||!l?null:z.createElement(i_,{ref:j==="start"?W:F,onClick:V=>m(!1,V.nativeEvent)},typeof c=="string"?c:"Dismiss")}const ee=!r&&x&&(E||l);return z.createElement(z.Fragment,null,ee&&z.createElement(Go,{"data-type":"inside",ref:T==null?void 0:T.beforeInsideRef,onFocus:j=>{if(l){const L=U();Bn(s[0]==="reference"?L[0]:L[L.length-1])}else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(C.current=!1,ma(j,T.portalNode)){const L=Uh()||y;L==null||L.focus()}else{var V;(V=T.beforeOutsideRef.current)==null||V.focus()}}}),!v&&G("start"),n,G("end"),ee&&z.createElement(Go,{"data-type":"inside",ref:T==null?void 0:T.afterInsideRef,onFocus:j=>{if(l)Bn(U()[0]);else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(d&&(C.current=!0),ma(j,T.portalNode)){const L=Xh()||y;L==null||L.focus()}else{var V;(V=T.afterOutsideRef.current)==null||V.focus()}}}))}const Oc=new Set,l_=z.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const a=Yo();return Ie(()=>{if(!r)return;Oc.add(a);const o=/iP(hone|ad|od)|iOS/.test(sc()),i=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",d=window.innerWidth-document.documentElement.clientWidth,u=i.left?parseFloat(i.left):window.pageXOffset,h=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),o){var g,m;const p=((g=window.visualViewport)==null?void 0:g.offsetLeft)||0,b=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(i,{position:"fixed",top:-(h-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{Oc.delete(a),Oc.size===0&&(Object.assign(i,{overflow:"",[c]:""}),o&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,h)))}},[a,r]),z.createElement("div",fa({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function $h(t){return ht(t.target)&&t.target.tagName==="BUTTON"}function eg(t){return cc(t)}function tg(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=t,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=z.useRef(),h=z.useRef(!1);return z.useMemo(()=>o?{reference:{onPointerDown(g){u.current=g.pointerType},onMouseDown(g){g.button===0&&(To(u.current,!0)&&c||i!=="click"&&(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){if(i==="mousedown"&&u.current){u.current=void 0;return}To(u.current,!0)&&c||(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){u.current=void 0,!(g.defaultPrevented||!d||$h(g))&&(g.key===" "&&!eg(a)&&(g.preventDefault(),h.current=!0),g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!d||$h(g)||eg(a)||g.key===" "&&h.current&&(h.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}}:{},[o,s,i,c,d,a,l,n,r])}const c_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},d_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ng=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function rg(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:a,domReference:o,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:h="pointerdown",referencePress:g=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:y}=e,w=ha(),k=pn(typeof u=="function"?u:()=>!1),v=typeof u=="function"?k:u,x=z.useRef(!1),S=z.useRef(!1),{escapeKey:N,outsidePress:M}=ng(b),{escapeKey:P,outsidePress:T}=ng(y),W=pn(E=>{if(!n||!c||!d||E.key!=="Escape")return;const B=w?Nr(w.nodesRef.current,s):[];if(!N&&(E.stopPropagation(),B.length>0)){let U=!0;if(B.forEach(G=>{var ee;if((ee=G.context)!=null&&ee.open&&!G.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,Ck(E)?E.nativeEvent:E,"escape-key")}),F=pn(E=>{var B;const U=()=>{var G;W(E),(G=ir(E))==null||G.removeEventListener("keydown",U)};(B=ir(E))==null||B.addEventListener("keydown",U)}),C=pn(E=>{const B=x.current;x.current=!1;const U=S.current;if(S.current=!1,h==="click"&&U||B||typeof v=="function"&&!v(E))return;const G=ir(E),ee="["+Pr("inert")+"]",j=_t(i).querySelectorAll(ee);let V=Te(G)?G:null;for(;V&&!ar(V);){const I=Ln(V);if(ar(I)||!Te(I))break;V=I}if(j.length&&Te(G)&&!Ok(G)&&!tt(G,i)&&Array.from(j).every(I=>!tt(V,I)))return;if(ht(G)&&i){const I=G.clientWidth>0&&G.scrollWidth>G.clientWidth,D=G.clientHeight>0&&G.scrollHeight>G.clientHeight;let H=D&&E.offsetX>G.clientWidth;if(D&&Zt(G).direction==="rtl"&&(H=E.offsetX<=G.offsetWidth-G.clientWidth),H||I&&E.offsetY>G.clientHeight)return}const L=w&&Nr(w.nodesRef.current,s).some(I=>{var D;return lc(E,(D=I.context)==null?void 0:D.elements.floating)});if(lc(E,i)||lc(E,o)||L)return;const R=w?Nr(w.nodesRef.current,s):[];if(R.length>0){let I=!0;if(R.forEach(D=>{var H;if((H=D.context)!=null&&H.open&&!D.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}r(!1,E,"outside-press")}),O=pn(E=>{var B;const U=()=>{var G;C(E),(G=ir(E))==null||G.removeEventListener(h,U)};(B=ir(E))==null||B.addEventListener(h,U)});return z.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=M;function E(G){r(!1,G,"ancestor-scroll")}const B=_t(i);d&&B.addEventListener("keydown",P?F:W,P),v&&B.addEventListener(h,T?O:C,T);let U=[];return p&&(Te(o)&&(U=or(o)),Te(i)&&(U=U.concat(or(i))),!Te(a)&&a&&a.contextElement&&(U=U.concat(or(a.contextElement)))),U=U.filter(G=>{var ee;return G!==((ee=B.defaultView)==null?void 0:ee.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",E,{passive:!0})}),()=>{d&&B.removeEventListener("keydown",P?F:W,P),v&&B.removeEventListener(h,T?O:C,T),U.forEach(G=>{G.removeEventListener("scroll",E)})}},[l,i,o,a,d,v,h,n,r,p,c,N,M,W,P,F,C,T,O]),z.useEffect(()=>{x.current=!1},[v,h]),z.useMemo(()=>c?{reference:{onKeyDown:W,[c_[m]]:E=>{g&&r(!1,E.nativeEvent,"reference-press")}},floating:{onKeyDown:W,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[d_[h]]:()=>{x.current=!0}}}:{},[c,g,h,m,r,W])}let Dc;process.env.NODE_ENV!=="production"&&(Dc=new Set);function sg(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var a;const M="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=t.elements)!=null&&a.reference&&!Te(t.elements.reference)){var o;if(!((o=Dc)!=null&&o.has(M))){var i;(i=Dc)==null||i.add(M),console.error(M)}}}const[l,c]=z.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=c1(t),h=ha(),g=Vo()!=null,m=pn((M,P,T)=>{M&&(b.current.openEvent=P),y.emit("openchange",{open:M,event:P,reason:T,nested:g}),r==null||r(M,P,T)}),p=z.useRef(null),b=z.useRef({}),y=z.useState(()=>X1())[0],w=Yo(),k=z.useCallback(M=>{const P=Te(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;u.refs.setReference(P)},[u.refs]),v=z.useCallback(M=>{(Te(M)||M===null)&&(p.current=M,c(M)),(Te(u.refs.reference.current)||u.refs.reference.current===null||M!==null&&!Te(M))&&u.refs.setReference(M)},[u.refs]),x=z.useMemo(()=>({...u.refs,setReference:v,setPositionReference:k,domReference:p}),[u.refs,v,k]),S=z.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=z.useMemo(()=>({...u,refs:x,elements:S,dataRef:b,nodeId:s,floatingId:w,events:y,open:n,onOpenChange:m}),[u,s,w,y,n,m,x,S]);return Ie(()=>{const M=h==null?void 0:h.nodesRef.current.find(P=>P.id===s);M&&(M.context=N)}),z.useMemo(()=>({...u,context:N,refs:x,elements:S}),[u,x,S,N])}function u_(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:a,elements:{domReference:o}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=z.useRef(!1),d=z.useRef(),u=z.useRef(!0);return z.useEffect(()=>{if(!i)return;const h=Mt(o);function g(){!n&&ht(o)&&o===hn(_t(o))&&(c.current=!0)}function m(){u.current=!0}return h.addEventListener("blur",g),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",g),h.removeEventListener("keydown",m,!0)}},[o,n,i]),z.useEffect(()=>{if(!i)return;function h(g){let{reason:m}=g;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,i]),z.useEffect(()=>()=>{clearTimeout(d.current)},[]),z.useMemo(()=>i?{reference:{onPointerDown(h){ac(h.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const g=ir(h.nativeEvent);if(l&&Te(g))try{if(oc()&&uh())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!u.current&&!cc(g))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const g=h.relatedTarget,m=Te(g)&&g.hasAttribute(Pr("focus-guard"))&&g.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=hn(o?o.ownerDocument:document);!g&&p===o||tt(a.floating.current,p)||tt(o,p)||m||r(!1,h.nativeEvent,"focus")})}}}:{},[i,l,o,a,r])}const ag="active",og="selected";function Mc(t,e,n){const r=new Map,s=n==="item";let a=t;if(s&&t){const{[ag]:o,[og]:i,...l}=t;a=l}return{...n==="floating"&&{tabIndex:-1},...a,...e.map(o=>{const i=o?o[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((o,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[ag,og].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var u;(u=r.get(c))==null||u.push(d),o[c]=function(){for(var h,g=arguments.length,m=new Array(g),p=0;p<g;p++)m[p]=arguments[p];return(h=r.get(c))==null?void 0:h.map(b=>b(...m)).find(b=>b!==void 0)}}}else o[c]=d}),o),{})}}function ig(t){t===void 0&&(t=[]);const e=t,n=z.useCallback(a=>Mc(a,t,"reference"),e),r=z.useCallback(a=>Mc(a,t,"floating"),e),s=z.useCallback(a=>Mc(a,t,"item"),t.map(a=>a==null?void 0:a.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let lg=!1;function Ko(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function cg(t,e){return Ko(e,t===wc||t===da,t===ys||t===ws)}function Ec(t,e,n){return Ko(e,t===da,n?t===ys:t===ws)||t==="Enter"||t===" "||t===""}function f_(t,e,n){return Ko(e,n?t===ys:t===ws,t===da)}function dg(t,e,n){return Ko(e,n?t===ws:t===ys,t===wc)}function h_(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:a,floating:o}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:h=!1,loop:g=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:y="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:k=!0,disabledIndices:v=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:N=!0,virtualItemRef:M,itemSizes:P,dense:T=!1}=e;process.env.NODE_ENV!=="production"&&(h&&(g||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),b||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const W=Vo(),F=ha(),C=pn(c),O=z.useRef(y),E=z.useRef(u??-1),B=z.useRef(null),U=z.useRef(!0),G=z.useRef(C),ee=z.useRef(!!o),j=z.useRef(!1),V=z.useRef(!1),L=bn(v),R=bn(n),I=bn(N),[D,H]=z.useState(),[J,K]=z.useState(),q=pn(function(A,re,ne){ne===void 0&&(ne=!1);const oe=A.current[re.current];oe&&(b?(H(oe.id),F==null||F.events.emit("virtualfocus",oe),M&&(M.current=oe)):Bn(oe,{preventScroll:!0,sync:uh()&&oc()?lg||j.current:!1}),requestAnimationFrame(()=>{const fe=I.current;fe&&oe&&(ne||!U.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof fe=="boolean"?{block:"nearest",inline:"nearest"}:fe))}))});Ie(()=>{document.createElement("div").focus({get preventScroll(){return lg=!0,!1}})},[]),Ie(()=>{d&&(n&&o?O.current&&u!=null&&(V.current=!0,E.current=u,C(u)):ee.current&&(E.current=-1,G.current(null)))},[d,n,o,u,C]),Ie(()=>{if(d&&n&&o)if(l==null){if(j.current=!1,u!=null)return;if(ee.current&&(E.current=-1,q(i,E)),!ee.current&&O.current&&(B.current!=null||O.current===!0&&B.current==null)){let A=0;const re=()=>{i.current[0]==null?(A<2&&(A?requestAnimationFrame:queueMicrotask)(re),A++):(E.current=B.current==null||Ec(B.current,x,p)||m?vc(i,L.current):Lh(i,L.current),B.current=null,C(E.current))};re()}}else ua(i,l)||(E.current=l,q(i,E,V.current),V.current=!1)},[d,n,o,l,u,m,i,x,p,C,q,L]),Ie(()=>{var A;if(!d||o||!F||b||!ee.current)return;const re=F.nodesRef.current,ne=(A=re.find(ie=>ie.id===W))==null||(A=A.context)==null?void 0:A.elements.floating,oe=hn(_t(o)),fe=re.some(ie=>ie.context&&tt(ie.context.elements.floating,oe));ne&&!fe&&U.current&&ne.focus({preventScroll:!0})},[d,o,F,W,b]),Ie(()=>{if(!d||!F||!b||W)return;function A(re){K(re.id),M&&(M.current=re)}return F.events.on("virtualfocus",A),()=>{F.events.off("virtualfocus",A)}},[d,F,b,W,M]),Ie(()=>{G.current=C,ee.current=!!o}),Ie(()=>{n||(B.current=null)},[n]);const te=l!=null,Y=z.useMemo(()=>{function A(ne){if(!n)return;const oe=i.current.indexOf(ne);oe!==-1&&C(oe)}return{onFocus(ne){let{currentTarget:oe}=ne;A(oe)},onClick:ne=>{let{currentTarget:oe}=ne;return oe.focus({preventScroll:!0})},...w&&{onMouseMove(ne){let{currentTarget:oe}=ne;A(oe)},onPointerLeave(ne){let{pointerType:oe}=ne;!U.current||oe==="touch"||(E.current=-1,q(i,E),C(null),b||Bn(s.floating.current,{preventScroll:!0}))}}}},[n,s,q,w,i,C,b]);return z.useMemo(()=>{if(!d)return{};const A=L.current;function re(ae){if(U.current=!1,j.current=!0,!R.current&&ae.currentTarget===s.floating.current)return;if(m&&dg(ae.key,x,p)){gt(ae),r(!1,ae.nativeEvent,"list-navigation"),ht(a)&&!b&&a.focus();return}const Ve=E.current,pe=vc(i,A),He=Lh(i,A);if(ae.key==="Home"&&(gt(ae),E.current=pe,C(E.current)),ae.key==="End"&&(gt(ae),E.current=He,C(E.current)),S>1){const Ge=P||Array.from({length:i.current.length},()=>({width:1,height:1})),et=L1(Ge,S,T),Xt=et.findIndex(Kt=>Kt!=null&&!(A!=null&&A.includes(Kt))),Gt=et.reduce((Kt,Sr,Qt)=>Sr!=null&&!(A!=null&&A.includes(Sr))?Qt:Kt,-1);if(E.current=et[R1({current:et.map(Kt=>Kt!=null?i.current[Kt]:null)},{event:ae,orientation:x,loop:g,cols:S,disabledIndices:B1([...A||[],void 0],et),minIndex:Xt,maxIndex:Gt,prevIndex:F1(E.current,Ge,et,S,ae.key===da?"bl":ae.key===ws?"tr":"tl"),stopEvent:!0})],C(E.current),x==="both")return}if(cg(ae.key,x)){if(gt(ae),n&&!b&&hn(ae.currentTarget.ownerDocument)===ae.currentTarget){E.current=Ec(ae.key,x,p)?pe:He,C(E.current);return}Ec(ae.key,x,p)?g?E.current=Ve>=He?h&&Ve!==i.current.length?-1:pe:yt(i,{startingIndex:Ve,disabledIndices:A}):E.current=Math.min(He,yt(i,{startingIndex:Ve,disabledIndices:A})):g?E.current=Ve<=pe?h&&Ve!==-1?i.current.length:He:yt(i,{startingIndex:Ve,decrement:!0,disabledIndices:A}):E.current=Math.max(pe,yt(i,{startingIndex:Ve,decrement:!0,disabledIndices:A})),ua(i,E.current)?C(null):C(E.current)}}function ne(ae){y==="auto"&&dh(ae.nativeEvent)&&(O.current=!0)}function oe(ae){O.current=y,y==="auto"&&ac(ae.nativeEvent)&&(O.current=!0)}const fe=b&&n&&te&&{"aria-activedescendant":J||D},ie=i.current.find(ae=>(ae==null?void 0:ae.id)===D);return{reference:{...fe,onKeyDown(ae){U.current=!1;const Ve=ae.key.indexOf("Arrow")===0,pe=f_(ae.key,x,p),He=dg(ae.key,x,p),Ge=cg(ae.key,x),et=(m?pe:Ge)||ae.key==="Enter"||ae.key.trim()==="";if(b&&n){const Sr=F==null?void 0:F.nodesRef.current.find(Gl=>Gl.parentId==null),Qt=F&&Sr?J1(F.nodesRef.current,Sr.id):null;if(Ve&&Qt&&M){const Gl=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(pe||He){var Xt,Gt;const t6=((Xt=Qt.context)==null?void 0:Xt.elements.domReference)===ae.currentTarget,bx=He&&!t6?(Gt=Qt.context)==null?void 0:Gt.elements.domReference:pe?ie:null;bx&&(gt(ae),bx.dispatchEvent(Gl),K(void 0))}if(Ge&&Qt.context&&Qt.context.open&&Qt.parentId&&ae.currentTarget!==Qt.context.elements.domReference){var Kt;gt(ae),(Kt=Qt.context.elements.domReference)==null||Kt.dispatchEvent(Gl);return}}return re(ae)}if(!(!n&&!k&&Ve)){if(et&&(B.current=m&&Ge?null:ae.key),m){pe&&(gt(ae),n?(E.current=vc(i,A),C(E.current)):r(!0,ae.nativeEvent,"list-navigation"));return}Ge&&(u!=null&&(E.current=u),gt(ae),!n&&k?r(!0,ae.nativeEvent,"list-navigation"):re(ae),n&&C(E.current))}},onFocus(){n&&C(null)},onPointerDown:oe,onMouseDown:ne,onClick:ne},floating:{"aria-orientation":x==="both"?void 0:x,...!fh(a)&&fe,onKeyDown:re,onPointerMove(){U.current=!0}},item:Y}},[a,s,D,J,L,R,i,d,x,p,b,n,te,m,u,k,h,S,g,y,C,r,Y,F,M,P,T])}const g_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ug(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:a=!0,role:o="dialog"}=e,i=(n=g_.get(o))!=null?n:o,l=Yo(),d=Vo()!=null;return z.useMemo(()=>{if(!a)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||o==="label"?{reference:{["aria-"+(o==="label"?"labelledby":"describedby")]:r?s:void 0},floating:u}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?s:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:l},...i==="menu"&&d&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(h){let{active:g,selected:m}=h;const p={role:"option",...g&&{id:s+"-option"}};switch(o){case"select":return{...p,"aria-selected":g&&m};case"combobox":return{...p,...g&&{"aria-selected":!0}}}return{}}}},[a,o,i,r,s,l,d])}function m_(t,e){var n;const{open:r,dataRef:s}=t,{listRef:a,activeIndex:o,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:h=[],selectedIndex:g=null}=e,m=z.useRef(),p=z.useRef(""),b=z.useRef((n=g??o)!=null?n:-1),y=z.useRef(null),w=pn(i),k=pn(l),v=bn(d),x=bn(h);return Ie(()=>{r&&(clearTimeout(m.current),y.current=null,p.current="")},[r]),Ie(()=>{if(r&&p.current===""){var S;b.current=(S=g??o)!=null?S:-1}},[r,g,o]),z.useMemo(()=>{if(!c)return{};function S(P){P?s.current.typing||(s.current.typing=P,k(P)):s.current.typing&&(s.current.typing=P,k(P))}function N(P,T,W){const F=v.current?v.current(T,W):T.find(C=>(C==null?void 0:C.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return F?P.indexOf(F):-1}function M(P){const T=a.current;if(p.current.length>0&&p.current[0]!==" "&&(N(T,T,p.current)===-1?S(!1):P.key===" "&>(P)),T==null||x.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(gt(P),S(!0)),T.every(O=>{var E,B;return O?((E=O[0])==null?void 0:E.toLocaleLowerCase())!==((B=O[1])==null?void 0:B.toLocaleLowerCase()):!0})&&p.current===P.key&&(p.current="",b.current=y.current),p.current+=P.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=y.current,S(!1)},u);const F=b.current,C=N(T,[...T.slice((F||0)+1),...T.slice(0,(F||0)+1)],p.current);C!==-1?(w(C),y.current=C):P.key!==" "&&(p.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(P){P.key===" "&&S(!1)}}}},[c,r,s,a,u,x,v,w,k])}function fg(t,e){const[n,r]=t;let s=!1;const a=e.length;for(let o=0,i=a-1;o<a;i=o++){const[l,c]=e[o]||[0,0],[d,u]=e[i]||[0,0];c>=r!=u>=r&&n<=(d-l)*(r-c)/(u-c)+l&&(s=!s)}return s}function p_(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function b_(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,a=!1,o=null,i=null,l=performance.now();function c(u,h){const g=performance.now(),m=g-l;if(o===null||i===null||m===0)return o=u,i=h,l=g,null;const p=u-o,b=h-i,w=Math.sqrt(p*p+b*b)/m;return o=u,i=h,l=g,w}const d=u=>{let{x:h,y:g,placement:m,elements:p,onClose:b,nodeId:y,tree:w}=u;return function(v){function x(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||h==null||g==null)return;const{clientX:S,clientY:N}=v,M=[S,N],P=ir(v),T=v.type==="mouseleave",W=tt(p.floating,P),F=tt(p.domReference,P),C=p.domReference.getBoundingClientRect(),O=p.floating.getBoundingClientRect(),E=m.split("-")[0],B=h>O.right-O.width/2,U=g>O.bottom-O.height/2,G=p_(M,C),ee=O.width>C.width,j=O.height>C.height,V=(ee?C:O).left,L=(ee?C:O).right,R=(j?C:O).top,I=(j?C:O).bottom;if(W&&(a=!0,!T))return;if(F&&(a=!1),F&&!T){a=!0;return}if(T&&Te(v.relatedTarget)&&tt(p.floating,v.relatedTarget)||w&&Nr(w.nodesRef.current,y).some(J=>{let{context:K}=J;return K==null?void 0:K.open}))return;if(E==="top"&&g>=C.bottom-1||E==="bottom"&&g<=C.top+1||E==="left"&&h>=C.right-1||E==="right"&&h<=C.left+1)return x();let D=[];switch(E){case"top":D=[[V,C.top+1],[V,O.bottom-1],[L,O.bottom-1],[L,C.top+1]];break;case"bottom":D=[[V,O.top+1],[V,C.bottom-1],[L,C.bottom-1],[L,O.top+1]];break;case"left":D=[[O.right-1,I],[O.right-1,R],[C.left+1,R],[C.left+1,I]];break;case"right":D=[[C.right-1,I],[C.right-1,R],[O.left+1,R],[O.left+1,I]];break}function H(J){let[K,q]=J;switch(E){case"top":{const te=[ee?K+e/2:B?K+e*4:K-e*4,q+e+1],Y=[ee?K-e/2:B?K+e*4:K-e*4,q+e+1],A=[[O.left,B||ee?O.bottom-e:O.top],[O.right,B?ee?O.bottom-e:O.top:O.bottom-e]];return[te,Y,...A]}case"bottom":{const te=[ee?K+e/2:B?K+e*4:K-e*4,q-e],Y=[ee?K-e/2:B?K+e*4:K-e*4,q-e],A=[[O.left,B||ee?O.top+e:O.bottom],[O.right,B?ee?O.top+e:O.bottom:O.top+e]];return[te,Y,...A]}case"left":{const te=[K+e+1,j?q+e/2:U?q+e*4:q-e*4],Y=[K+e+1,j?q-e/2:U?q+e*4:q-e*4];return[...[[U||j?O.right-e:O.left,O.top],[U?j?O.right-e:O.left:O.right-e,O.bottom]],te,Y]}case"right":{const te=[K-e,j?q+e/2:U?q+e*4:q-e*4],Y=[K-e,j?q-e/2:U?q+e*4:q-e*4],A=[[U||j?O.left+e:O.right,O.top],[U?j?O.left+e:O.right:O.left+e,O.bottom]];return[te,Y,...A]}}}if(!fg([S,N],D)){if(a&&!G)return x();if(!T&&r){const J=c(v.clientX,v.clientY);if(J!==null&&J<.1)return x()}fg([S,N],H([h,g]))?!a&&r&&(s=window.setTimeout(x,40)):x()}}};return d.__options={blockPointerEvents:n},d}const y_=({arrowRef:t,placement:e})=>{const n=[];return n.push(u1(8)),n.push(e==="auto"?g1():h1()),n.push(f1({padding:8})),t!=null&&t.current&&n.push(m1({element:t.current})),n},w_=({placement:t})=>t==="auto"?void 0:t,v_=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],hg=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>sg({placement:w_({placement:n}),open:t,onOpenChange:r,whileElementsMounted:Dh,middleware:y_({placement:n,arrowRef:e})}),gg=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>ig([tg(t,{enabled:e==="click"}),Q1(t,{enabled:e==="hover",handleClose:b_()}),rg(t),ug(t,{role:n}),...r]),mg=_.createContext(void 0);function Tc(){const t=_.useContext(mg);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const Pc=({className:t,theme:e={},...n})=>{const{theme:r}=Tc(),s=e.divider??r.floating.divider;return f.jsx("div",{className:Q(s,t),...n})},pg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=n.header??s.floating.header;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(a,e),...r,children:t}),f.jsx(Pc,{})]})},Nc=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...a},o)=>{const{ref:i,index:l}=Y1({label:typeof t=="string"?t:void 0}),c=Rh([o,i]),{theme:d,activeIndex:u,dismissOnClick:h,getItemProps:g,handleSelect:m}=Tc(),p=u===l,b=se(d.floating.item,s),y=a;return f.jsx("li",{role:"menuitem",className:b.container,children:f.jsxs(Jl,{ref:c,className:Q(b.base,e),...y,...g({onClick:()=>{r==null||r(),h&&m(null)}}),tabIndex:p?0:-1,children:[n&&f.jsx(n,{className:b.icon}),t]})})});Nc.displayName="DropdownItem";const x_={top:Ax,right:Of,bottom:Cf,left:Ix},k_=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:a,getReferenceProps:o,renderTrigger:i,...l})=>{const c=t.reference,d=o();if(_.useEffect(()=>{c.current&&(a==null||a(c.current.clientWidth))},[c,a]),i){const u=i(r);return _.cloneElement(u,{ref:t.setReference,disabled:s,...d,...u.props})}return n?f.jsx("button",{type:"button",ref:t.setReference,className:r==null?void 0:r.inlineWrapper,disabled:s,...d,children:e}):f.jsx(Qf,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},bg=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...a})=>{const[o,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[h,g]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=se(ge().dropdown,r),y=a,w=a["data-testid"]||"flowbite-dropdown-target",{placement:k=a.inline?"bottom-start":"bottom",trigger:v="click",label:x,inline:S,arrowIcon:N=!0,...M}=y,P=_.useCallback(j=>{u(j),i(!1)},[]),T=_.useCallback(j=>{o?c(j):P(j)},[o,P]),{context:W,floatingStyles:F,refs:C}=hg({open:o,setOpen:i,placement:k}),O=h_(W,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),E=m_(W,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:T}),{getReferenceProps:B,getFloatingProps:U,getItemProps:G}=gg({context:W,role:"menu",trigger:v,interactions:[O,E]}),ee=_.useMemo(()=>{const[j]=k.split("-");return x_[j]??Cf},[k]);return f.jsxs(mg.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:G,handleSelect:P},children:[f.jsxs(k_,{...M,refs:C,inline:S,theme:b,"data-testid":w,className:Q(b.floating.target,M.className),setButtonWidth:g,getReferenceProps:B,renderTrigger:s,children:[x,N&&f.jsx(ee,{className:b.arrowIcon})]}),o&&f.jsx(qh,{context:W,modal:!1,children:f.jsx("div",{ref:C.setFloating,style:{...F,minWidth:h},"data-testid":"flowbite-dropdown","aria-expanded":o,...U({className:Q(b.floating.base,b.floating.animation,"duration-100",!o&&b.floating.hidden,b.floating.style.auto,e)}),children:f.jsx(H1,{elementsRef:m,labelsRef:p,children:f.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};bg.displayName="Dropdown",pg.displayName="Dropdown.Header",Pc.displayName="Dropdown.Divider";const __=Object.assign(bg,{Item:Nc,Header:pg,Divider:Pc}),yg=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...a},o)=>{const i=se(ge().fileInput,s);return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(i.root.base,t),children:f.jsx("div",{className:i.field.base,children:f.jsx("input",{className:Q(i.field.input.base,i.field.input.colors[e],i.field.input.sizes[r]),...a,type:"file",ref:o})})}),n&&f.jsx(oa,{color:e,children:n})]})});yg.displayName="FileInput";const S_=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:a=!1,theme:o={},className:i,...l},c)=>{const d=_.useId(),u=se(ge().floatingLabel,o);return f.jsxs("div",{children:[f.jsxs("div",{className:Q("relative",s==="standard"?"z-0":""),children:[f.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:Q(u.input[n][s][r],i),placeholder:" ","data-testid":"floating-label",disabled:a,...l,ref:c}),f.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:Q(u.label[n][s][r],i),children:t})]}),f.jsx("p",{id:"outlined_helper_text"+d,className:Q(u.helperText[n],i),children:e})]})});S_.displayName="FloatingLabel";const wg=({alt:t,className:e,children:n,href:r,name:s,src:a,theme:o={},...i})=>{const l=se(ge().footer.brand,o);return f.jsx("div",{children:r?f.jsxs("a",{"data-testid":"flowbite-footer-brand",href:r,className:Q(l.base,e),...i,children:[f.jsx("img",{alt:t,src:a,className:l.img}),f.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:s}),n]}):f.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:a,className:Q(l.img,e),...i})})},vg=({by:t,className:e,href:n,theme:r={},year:s,...a})=>{const o=se(ge().footer.copyright,r);return f.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:Q(o.base,e),...a,children:["© ",s,n?f.jsx("a",{href:n,className:o.href,children:t}):f.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:o.span,children:t})]})},xg=({className:t,theme:e={},...n})=>{const r=se(ge().footer.divider,e);return f.jsx("hr",{"data-testid":"footer-divider",className:Q(r.base,t),...n})},kg=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...a})=>{const o=se(ge().footer.icon,s);return f.jsx("div",{children:n?f.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:Q(o.base,e),...a,children:f.jsx(r,{className:o.size})}):f.jsx(r,{"data-testid":"flowbite-footer-icon",className:o.size,...a})})},_g=({as:t="a",children:e,className:n,href:r,theme:s={},...a})=>{const o=se(ge().footer.groupLink.link,s);return f.jsx("li",{className:Q(o.base,n),children:f.jsx(t,{href:r,className:o.href,...a,children:e})})},Sg=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const a=se(ge().footer.groupLink,r);return f.jsx("ul",{"data-testid":"footer-groupLink",className:Q(a.base,n&&a.col,e),...s,children:t})},Cg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const a=se(ge().footer.title,n);return f.jsx(t,{"data-testid":"flowbite-footer-title",className:Q(a.base,e),...s,children:r})},Og=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...a})=>{const o=se(ge().footer,s);return f.jsx("footer",{"data-testid":"flowbite-footer",className:Q(o.root.base,t&&o.root.bgDark,r&&o.root.container,n),...a,children:e})};Og.displayName="Footer",vg.displayName="Footer.Copyright",_g.displayName="Footer.Link",wg.displayName="Footer.Brand",Sg.displayName="Footer.LinkGroup",kg.displayName="Footer.Icon",Cg.displayName="Footer.Title",xg.displayName="Footer.Divider",Object.assign(Og,{Copyright:vg,Link:_g,LinkGroup:Sg,Brand:wg,Icon:kg,Title:Cg,Divider:xg});const jc=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:a,...o})=>{const i=se(ge().label,s);return f.jsx("label",{className:Q(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...o,children:a??t??""})};jc.displayName="Label";const Dg=({children:t,className:e,icon:n,theme:r={},...s})=>{const a=se(ge().list.item,r);return f.jsxs("li",{className:Q(a.withIcon[n?"on":"off"],e),...s,children:[n&&f.jsx(n,{className:Q(a.icon)}),t]})},Mg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:a,theme:o={},...i})=>{const l=se(ge().list,o),c=s?"ol":"ul";return f.jsx(c,{className:Q(l.root.base,l.root.ordered[s?"on":"off"],n&&l.root.unstyled,r&&l.root.nested,a&&l.root.horizontal,e),...i,children:t})};Mg.displayName="List",Dg.displayName="List.Item",Object.assign(Mg,{Item:Dg});const Eg=({active:t,children:e,className:n,href:r,icon:s,onClick:a,theme:o={},disabled:i,...l})=>{const c=se(ge().listGroup.item,o),d=typeof r<"u",u=d?"a":"button";return f.jsx("li",{className:Q(c.base,n),children:f.jsxs(u,{href:r,onClick:a,type:d?void 0:"button",disabled:i,className:Q(c.link.active[t?"on":"off"],c.link.disabled[i?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[s&&f.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},Tg=({children:t,className:e,theme:n={},...r})=>{const s=se(ge().listGroup,n);return f.jsx("ul",{className:Q(s.root.base,e),...r,children:t})};Tg.displayName="ListGroup",Eg.displayName="ListGroup.Item",Object.assign(Tg,{Item:Eg});const Pg=_.createContext(void 0);function Ic(){const t=_.useContext(Pg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const Ng=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Ic(),o=se(s.body,n);return f.jsx("div",{className:Q(o.base,a&&[o.popup],e),...r,children:t})},jg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Ic(),o=se(s.footer,n);return f.jsx("div",{className:Q(o.base,!a&&o.popup,e),...r,children:t})},Ig=({as:t="h3",children:e,className:n,theme:r={},id:s,...a})=>{const o=_.useId(),i=s||o,{theme:l,popup:c,onClose:d,setHeaderId:u}=Ic(),h=se(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),f.jsxs("div",{className:Q(h.base,c&&h.popup,n),...a,children:[f.jsx(t,{id:i,className:h.title,children:e}),f.jsx("button",{"aria-label":"Close",className:h.close.base,type:"button",onClick:d,children:f.jsx(Rx,{"aria-hidden":!0,className:h.close.icon})})]})},Ag=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:a="center",root:o,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},h)=>{const[g,m]=_.useState(void 0),p=se(ge().modal,c),{context:b}=sg({open:i,onOpenChange:()=>r&&r()}),y=Rh([b.refs.setFloating,h]),w=tg(b),k=rg(b,{outsidePressEvent:"mousedown",enabled:n}),v=ug(b),{getFloatingProps:x}=ig([w,k,v]);return i?f.jsx(Pg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:f.jsx(a_,{root:o,children:f.jsx(l_,{lockScroll:!0,"data-testid":"modal-overlay",className:Q(p.root.base,p.root.positions[a],i?p.root.show.on:p.root.show.off,e),...u,children:f.jsx(qh,{context:b,initialFocus:d,children:f.jsx("div",{ref:y,...x(u),"aria-labelledby":g,className:Q(p.content.base,p.root.sizes[l]),children:f.jsx("div",{className:p.content.inner,children:t})})})})})}):null});Ag.displayName="Modal",Ig.displayName="Modal.Header",Ng.displayName="Modal.Body",jg.displayName="Modal.Footer",Object.assign(Ag,{Header:Ig,Body:Ng,Footer:jg});const Rg=_.createContext(void 0);function Qo(){const t=_.useContext(Rg);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Lg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Qo(),o=se(a.brand,r);return f.jsx(t,{className:Q(o.base,n),...s,children:e})},Fg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a}=Qo(),o=se(s.collapse,n);return f.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:Q(o.base,o.hidden[a?"off":"on"],e),...r,children:f.jsx("ul",{className:o.list,children:t})})},Bg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:a={},onClick:o,...i})=>{const{theme:l,setIsOpen:c}=Qo(),d=se(l.link,a),u=h=>{c(!1),o==null||o(h)};return f.jsx("li",{children:f.jsx(e,{className:Q(d.base,t&&d.active.on,!t&&!n&&d.active.off,d.disabled[n?"on":"off"],s),onClick:u,...i,children:r})})};function C_(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"},child:[]}]})(t)}function xs(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(t)}function O_(t){return Ee({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(t)}function Ac(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(t)}function D_(t){return Ee({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(t)}function M_(t){return Ee({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(t)}function E_(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}const Wg=({barIcon:t=C_,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a,setIsOpen:o}=Qo(),i=se(s.toggle,n),l=()=>{o(!a)};return f.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:Q(i.base,e),...r,children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(t,{"aria-hidden":!0,className:i.icon})]})},zg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:a,theme:o={},...i})=>{const[l,c]=_.useState(s),d=se(ge().navbar,o);return f.jsx(Rg.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:f.jsx("nav",{className:Q(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[a?"on":"off"],n),...i,children:f.jsx("div",{className:Q(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};zg.displayName="Navbar",Lg.displayName="Navbar.Brand",Fg.displayName="Navbar.Collapse",Bg.displayName="Navbar.Link",Wg.displayName="Navbar.Toggle",Object.assign(zg,{Brand:Lg,Collapse:Fg,Link:Bg,Toggle:Wg});const T_=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),Rc=({active:t,children:e,className:n,onClick:r,theme:s={},...a})=>{const o=se(ge().pagination,s);return f.jsx("button",{type:"button",className:Q(t&&o.pages.selector.active,n),onClick:r,...a,children:e})};Rc.displayName="Pagination.Button";const Lc=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...a})=>{const o=se(ge().pagination,r);return f.jsx("button",{type:"button",className:Q(s&&o.pages.selector.disabled,e),disabled:s,onClick:n,...a,children:t})};Lc.displayName="Pagination.Navigation";const Hg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:a="Previous",renderPaginationButton:o=u=>f.jsx(Rc,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=se(ge().pagination,l),h=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),g=Math.max(1,h-4),m=()=>{s(Math.min(e+1,c))},p=()=>{s(Math.max(e-1,1))};return f.jsxs("nav",{className:Q(u.base,t),...d,children:[n==="table"&&f.jsxs("div",{className:u.layout.table.base,children:["Showing ",f.jsx("span",{className:u.layout.table.span,children:g})," to ",f.jsx("span",{className:u.layout.table.span,children:h})," of ",f.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),f.jsxs("ul",{className:u.pages.base,children:[f.jsx("li",{children:f.jsxs(Lc,{className:Q(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&f.jsx(Tx,{"aria-hidden":!0,className:u.pages.previous.icon}),a]})}),n==="pagination"&&T_(g,h).map(b=>f.jsx("li",{"aria-current":b===e?"page":void 0,children:o({className:Q(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>s(b),children:b})},b)),f.jsx("li",{children:f.jsxs(Lc,{className:Q(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&f.jsx(Px,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Hg.displayName="Pagination",Object.assign(Hg,{Button:Rc});const Yg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=se(ge().radio,e);return f.jsx("input",{ref:r,type:"radio",className:Q(s.root.base,t),...n})});Yg.displayName="Radio";const P_=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const a=se(ge().rangeSlider,n);return f.jsx(f.Fragment,{children:f.jsx("div",{"data-testid":"flowbite-range-slider",className:Q(a.root.base,t),children:f.jsx("div",{className:a.field.base,children:f.jsx("input",{ref:s,type:"range",className:Q(a.field.input.base,a.field.input.sizes[e]),...r})})})})});P_.displayName="RangeSlider";const Vg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const a=se(ge().ratingAdvanced,r);return f.jsxs("div",{className:Q(a.base,e),...s,children:[f.jsx("span",{className:a.label,children:t}),f.jsx("div",{className:a.progress.base,children:f.jsx("div",{className:a.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),f.jsx("span",{className:a.progress.label,children:`${n}%`})]})},Ug=_.createContext(void 0);function N_(){const t=_.useContext(Ug);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const Xg=({className:t,filled:e=!0,starIcon:n=Nx,theme:r={},...s})=>{const{theme:a,size:o="sm"}=N_(),i=se(a.star,r);return f.jsx(n,{"data-testid":"flowbite-rating-star",className:Q(i.sizes[o],i[e?"filled":"empty"],t),...s})},Gg=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const a=se(ge().rating,r);return f.jsx(Ug.Provider,{value:{theme:a,size:n},children:f.jsx("div",{className:Q(a.root.base,e),...s,children:t})})};Gg.displayName="Rating",Xg.displayName="Rating.Star",Vg.displayName="Rating.Advanced",Object.assign(Gg,{Star:Xg,Advanced:Vg});const j_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:a,shadow:o,sizing:i="md",theme:l={},...c},d)=>{const u=se(ge().select,l);return f.jsxs("div",{className:Q(u.base,n),children:[t&&f.jsx("span",{className:u.addon,children:t}),f.jsxs("div",{className:u.field.base,children:[a&&f.jsx("div",{className:u.field.icon.base,children:f.jsx(a,{className:u.field.icon.svg})}),f.jsx("select",{className:Q(u.field.select.base,u.field.select.colors[r],u.field.select.sizes[i],u.field.select.withIcon[a?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[o?"on":"off"]),...c,ref:d,children:e}),s&&f.jsx(oa,{color:r,children:s})]})]})});j_.displayName="Select";const I_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[h,g]=_.useState(!1),m=hg({open:h,placement:a,arrowRef:u,setOpen:g}),{context:p,middlewareData:{arrow:{x:b,y}={}},refs:w,strategy:k,update:v,x,y:S}=m,N=u_(p),{getFloatingProps:M,getReferenceProps:P}=gg({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(w.reference.current&&w.floating.current&&h)return Dh(w.reference.current,w.floating.current,v)},[h,w.floating,w.reference,v]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:w.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...P(),children:n}),f.jsxs("div",{ref:w.setFloating,"data-testid":"flowbite-tooltip",...M({className:Q(i.base,t&&`${i.animation} ${t}`,!h&&i.hidden,i.style[o],r),style:{position:k,top:S??" ",left:x??" ",minWidth:c},...d}),children:[f.jsx("div",{className:i.content,children:s}),e&&f.jsx("div",{className:Q(i.arrow.base,o==="dark"&&i.arrow.style.dark,o==="light"&&i.arrow.style.light,o==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:y??" ",left:b??" ",right:" ",bottom:" ",[v_({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},Zo=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i={},trigger:l="hover",...c})=>{const d=se(ge().tooltip,i);return f.jsx(I_,{animation:t,arrow:e,content:s,placement:a,style:o,theme:d,trigger:l,className:r,...c,children:n})};Zo.displayName="Tooltip";const Kg=_.createContext(void 0);function ks(){const t=_.useContext(Kg);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const Fc=_.createContext(void 0);function A_(){const t=_.useContext(Fc);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Qg=({children:t,className:e,icon:n,label:r,chevronIcon:s=Kl,renderChevronIcon:a,open:o=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(o),{theme:h,isCollapsed:g}=ks(),m=se(h.collapse,i);_.useEffect(()=>u(o),[o]);const p=({children:b})=>f.jsx("li",{children:g&&!d?f.jsx(Zo,{content:r,placement:"right",children:b}):b});return f.jsxs(p,{children:[f.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:r,type:"button",className:Q(m.button,e),...l,children:[n&&f.jsx(n,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:Q(m.icon.base,m.icon.open[d?"on":"off"])}),g?f.jsx("span",{className:"sr-only",children:r}):f.jsxs(f.Fragment,{children:[f.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:m.label.base,children:r}),a?a(m,d):f.jsx(s,{"aria-hidden":!0,className:Q(m.label.icon.base,m.label.icon.open[d?"on":"off"])})]})]}),f.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:m.list,children:f.jsx(Fc.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Qg.displayName="Sidebar.Collapse";const Zg=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:a,isCollapsed:o}=ks(),i=se(a.cta,r);return f.jsx("div",{"data-testid":"sidebar-cta",hidden:o,className:Q(i.base,i.color[e],n),...s,children:t})};Zg.displayName="Sidebar.CTA";const R_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...a})=>f.jsx("li",{...a,children:n?f.jsx(Zo,{content:f.jsx(Jg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Jg=({id:t,theme:e,children:n})=>f.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:Q(e.content.base),children:n}),qg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:a,labelColor:o="info",theme:i={},...l},c)=>{var p,b,y,w;const d=_.useId(),{theme:u,isCollapsed:h}=ks(),{isInsideCollapse:g}=A_(),m=se(u.item,i);return f.jsx(R_,{theme:m,className:m.listItem,id:d,isCollapsed:h,tooltipChildren:n,children:f.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:Q(m.base,t&&m.active,!h&&g&&((p=m.collapsed)==null?void 0:p.insideCollapse),r),...l,children:[s&&f.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:Q((b=m.icon)==null?void 0:b.base,t&&((y=m.icon)==null?void 0:y.active))}),h&&!s&&f.jsx("span",{className:(w=m.collapsed)==null?void 0:w.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!h&&f.jsx(Jg,{id:d,theme:m,children:n}),!h&&a&&f.jsx(Yf,{color:o,"data-testid":"flowbite-sidebar-label",hidden:h,className:m.label,children:a})]})})});qg.displayName="Sidebar.Item";const $g=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ks(),a=se(s.itemGroup,n);return f.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:Q(a.base,e),...r,children:f.jsx(Fc.Provider,{value:{isInsideCollapse:!1},children:t})})};$g.displayName="Sidebar.ItemGroup";const em=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ks(),a=se(s.items,n);return f.jsx("div",{className:Q(a.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};em.displayName="Sidebar.Items";const tm=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:a={},...o})=>{const i=_.useId(),{theme:l,isCollapsed:c}=ks(),d=se(l.logo,a);return f.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:Q(d.base,e),...o,children:[f.jsx("img",{alt:s,src:r,className:d.img}),f.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${i}`,children:t})]})};tm.displayName="Sidebar.Logo";const nm=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:a,...o})=>{const i=se(ge().sidebar,s);return f.jsx(Kg.Provider,{value:{theme:i,isCollapsed:r},children:f.jsx(e,{"aria-label":"Sidebar",hidden:r&&n==="hide",className:Q(i.root.base,i.root.collapsed[r?"on":"off"],a),...o,children:f.jsx("div",{className:i.root.inner,children:t})})})};nm.displayName="Sidebar",Object.assign(nm,{Collapse:Qg,CTA:Zg,Item:qg,Items:em,ItemGroup:$g,Logo:tm});const rm=_.createContext(void 0);function L_(){const t=_.useContext(rm);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const sm=_.createContext(void 0);function Bc(){const t=_.useContext(sm);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const am=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Bc(),o=se(a.body,n);return f.jsx(rm.Provider,{value:{theme:o},children:f.jsx("tbody",{className:Q(o.base,e),ref:s,...r,children:t})})});am.displayName="Table.Body";const om=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=L_(),o=se(a.cell,n);return f.jsx("td",{className:Q(o.base,e),ref:s,...r,children:t})});om.displayName="Table.Cell";const im=_.createContext(void 0);function F_(){const t=_.useContext(im);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const lm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Bc(),o=se(a.head,n);return f.jsx(im.Provider,{value:{theme:o},children:f.jsx("thead",{className:Q(o.base,e),ref:s,...r,children:f.jsx("tr",{children:t})})})});lm.displayName="Table.Head";const cm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=F_(),o=se(a.cell,n);return f.jsx("th",{className:Q(o.base,e),ref:s,...r,children:t})});cm.displayName="Table.HeadCell";const dm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a,hoverable:o,striped:i}=Bc(),l=se(a.row,n);return f.jsx("tr",{ref:s,"data-testid":"table-row-element",className:Q(l.base,i&&l.striped,o&&l.hovered,e),...r,children:t})});dm.displayName="Table.Row";const um=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...a},o)=>{const i=se(ge().table,s);return f.jsx("div",{"data-testid":"table-element",className:Q(i.root.wrapper),children:f.jsxs(sm.Provider,{value:{theme:i,striped:n,hoverable:r},children:[f.jsx("div",{className:Q(i.root.shadow,e)}),f.jsx("table",{className:Q(i.root.base,e),...a,ref:o,children:t})]})})});um.displayName="Table";const Ke=Object.assign(um,{Head:lm,Body:am,Row:dm,Cell:om,HeadCell:cm}),fm=({children:t,className:e})=>f.jsx("div",{className:e,children:t});fm.displayName="Tabs.Item";const hm=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...a},o)=>{const i=se(ge().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:v})=>v),[t]),d=_.useRef([]),[u,h]=_.useState(Math.max(0,c.findIndex(v=>v.active))),[g,m]=_.useState(-1),p=v=>{h(v),n&&n(v)},b=({target:v})=>{p(v),m(v)},y=({event:v,target:x})=>{v.key==="ArrowLeft"&&m(Math.max(0,g-1)),v.key==="ArrowRight"&&m(Math.min(c.length-1,g+1)),v.key==="Enter"&&(p(x),m(x))},w=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var v;(v=d.current[g])==null||v.focus()},[g]),_.useImperativeHandle(o,()=>({setActiveTab:p})),f.jsxs("div",{className:Q(i.base,e),children:[f.jsx("div",{"aria-label":"Tabs",role:"tablist",className:Q(i.tablist.base,i.tablist.styles[r],e),...a,children:c.map((v,x)=>f.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${x}`,"aria-selected":x===u,className:Q(i.tablist.tabitem.base,w.base,x===u&&w.active.on,x!==u&&!v.disabled&&w.active.off),disabled:v.disabled,id:`${l}-tab-${x}`,onClick:()=>b({target:x}),onKeyDown:S=>y({event:S,target:x}),ref:S=>d.current[x]=S,role:"tab",tabIndex:x===g?0:-1,style:{zIndex:x===g?2:1},children:[v.icon&&f.jsx(v.icon,{className:i.tablist.tabitem.icon}),v.title]},x))}),f.jsx("div",{className:Q(i.tabitemcontainer.base,k),children:c.map((v,x)=>f.jsx("div",{"aria-labelledby":`${l}-tab-${x}`,className:i.tabpanel,hidden:x!==u,id:`${l}-tabpanel-${x}`,role:"tabpanel",tabIndex:0,children:v.children},x))})]})});hm.displayName="Tabs",Object.assign(hm,{Item:fm});const B_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...a},o)=>{const i=se(ge().textarea,s);return f.jsxs(f.Fragment,{children:[f.jsx("textarea",{ref:o,className:Q(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...a}),n&&f.jsx(oa,{color:e,children:n})]})});B_.displayName="Textarea";const gm=_.createContext(void 0);function Wc(){const t=_.useContext(gm);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const mm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Wc(),a=se(s.body,n);return f.jsx("div",{className:Q(a.base,e),...r,children:t})},pm=_.createContext(void 0);function zc(){const t=_.useContext(pm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const bm=_.createContext(void 0);function ym(){const t=_.useContext(bm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const wm=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=zc(),{theme:a}=ym(),o=se(a.content,n);return f.jsx(gm.Provider,{value:{theme:o},children:f.jsx("div",{"data-testid":"timeline-content",className:Q(s&&o.root.base,e),...r,children:t})})},vm=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:a}=zc(),o=se(s.item,n);return f.jsx(bm.Provider,{value:{theme:o},children:f.jsx("li",{"data-testid":"timeline-item",className:Q(a&&o.root.horizontal,!a&&o.root.vertical,e),...r,children:t})})},xm=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:a}=zc(),{theme:o}=ym(),i=se(o.point,r);return f.jsxs("div",{"data-testid":"timeline-point",className:Q(a&&i.horizontal,!a&&i.vertical,e),...s,children:[t,n?f.jsx("span",{className:Q(i.marker.icon.wrapper),children:f.jsx(n,{"aria-hidden":!0,className:Q(i.marker.icon.base)})}):f.jsx("div",{className:Q(a&&i.marker.base.horizontal,!a&&i.marker.base.vertical)}),a&&f.jsx("div",{className:Q(i.line)})]})},km=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Wc(),a=se(s.time,n);return f.jsx("time",{className:Q(a.base,e),...r,children:t})},_m=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Wc(),o=se(a.title,r);return f.jsx(t,{className:Q(o.base,n),...s,children:e})},Sm=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const a=se(ge().timeline,r);return f.jsx(pm.Provider,{value:{theme:a,horizontal:n},children:f.jsx("ol",{"data-testid":"timeline-component",className:Q(n&&a.root.direction.horizontal,!n&&a.root.direction.vertical,e),...s,children:t})})};Sm.displayName="Timeline",vm.displayName="Timeline.Item",xm.displayName="Timeline.Point",wm.displayName="Timeline.Content",km.displayName="Timeline.Time",_m.displayName="Timeline.Title",mm.displayName="Timeline.Body",Object.assign(Sm,{Item:vm,Point:xm,Content:wm,Time:km,Title:_m,Body:mm});const Cm=_.createContext(void 0);function W_(){const t=_.useContext(Cm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const Om=({className:t,onClick:e,theme:n={},xIcon:r=jx,onDismiss:s,...a})=>{const{theme:o,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=W_(),h=se(o.toggle,n),g=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return f.jsx("button",{"aria-label":"Close",onClick:g,type:"button",className:Q(h.base,t),...a,children:f.jsx(r,{"aria-hidden":!0,className:h.icon})})},z_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},Dm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[a,o]=_.useState(!1),[i,l]=_.useState(!1),c=se(ge().toast,r);return i?null:f.jsx(Cm.Provider,{value:{theme:c,duration:n,isClosed:a,isRemoved:i,setIsClosed:o,setIsRemoved:l},children:f.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:Q(c.root.base,z_[n],a&&c.root.closed,e),...s,children:t})})};Dm.displayName="Toast",Om.displayName="Toast.Toggle",Object.assign(Dm,{Toggle:Om});const H_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:a,name:o,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),h=se(ge().toggleSwitch,l),g=()=>i(!t),m=()=>{g()},p=b=>{b.code=="Enter"&&b.preventDefault()};return f.jsxs(f.Fragment,{children:[o&&t?f.jsx("input",{ref:d,checked:t,hidden:!0,name:o,readOnly:!0,type:"checkbox",className:"sr-only"}):null,f.jsxs("button",{"aria-checked":t,"aria-labelledby":`${u}-flowbite-toggleswitch-label`,disabled:s,id:`${u}-flowbite-toggleswitch`,onClick:m,onKeyDown:p,role:"switch",tabIndex:0,type:"button",className:Q(h.root.base,h.root.active[s?"off":"on"],e),...c,children:[f.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:Q(h.toggle.base,h.toggle.checked[t?"on":"off"],t&&h.toggle.checked.color[n],h.toggle.sizes[r])}),a!=null&&a.length?f.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:h.root.label,children:a}):null]})]})});H_.displayName="ToggleSwitch";const Y_="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.5096%203.7321C17.4858%206.70824%2017.4858%2011.5335%2014.5096%2014.5096C11.5335%2017.4858%206.70824%2017.4858%203.7321%2014.5096C0.755965%2011.5335%200.755965%206.70824%203.7321%203.7321C6.70824%200.755965%2011.5335%200.755965%2014.5096%203.7321Z'%20stroke='%23191960'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.4999%2018.4999L14.5049%2014.5049'%20stroke='%23191960'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",pa=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:a,maxLength:o,onChange:i,classLabel:l,...c},d)=>f.jsxs("div",{className:`${n?"mb-3":""}`,children:[n&&f.jsx("label",{className:`mb-1 block font-semibold ${l??""}`,children:n}),t===!0?f.jsx(ds,{className:`${a}`,sizing:"sm",maxLength:o,ref:d,type:s,rightIcon:()=>f.jsx("img",{src:Y_,alt:"search",width:17,height:17}),placeholder:e,onChange:i,...c}):f.jsx(ds,{className:`${a}`,sizing:"sm",maxLength:o,ref:d,type:s,placeholder:e,onChange:i,...c}),r&&f.jsx("p",{className:"mt-1 text-xs text-red-500",children:r})]}));pa.displayName="InputForm";const V_={"mth-password":"passwordInput-module__mth-password__R6DoN"},Hc=({placeholder:t,onChange:e,value:n,...r})=>{const[s,a]=_.useState(!1),o=()=>{a(!s)};return f.jsx("div",{className:"mb-5",children:f.jsxs("div",{className:"relative inline-block w-full",children:[f.jsx("input",{type:s?"text":"password",value:n,className:"w-full border p-2 pr-10",onChange:e,placeholder:t,...r}),f.jsx("button",{type:"button",onClick:o,className:V_["mth-password"],children:s?f.jsx(D_,{}):f.jsx(M_,{})})]})})},Mm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},Em=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,a=Math.min(Math.max(s,0),100),o=()=>a<10?"left-0":a>90?"right-0":"left-1/2 transform -translate-x-1/2";return f.jsxs("div",{className:"w-full p-1",children:[f.jsxs("div",{className:"mb-2 flex justify-between text-xs text-gray-400",children:[f.jsx("span",{children:t.toLocaleString()}),f.jsx("span",{children:e.toLocaleString()})]}),f.jsxs("div",{className:"relative mb-5 h-1 w-full rounded-full bg-gray-200",children:[f.jsx("div",{className:`${Mm.mth_progress_bar} absolute left-0 top-0 h-full rounded-full transition-all duration-300`,style:{width:`${a}%`}}),f.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${a}%`},children:[f.jsx("div",{className:`${Mm.mth_progress_bar_thumb} w-2 h-2 rounded-full shadow-lg`}),f.jsxs("div",{className:`absolute top-full mt-2 text-xs font-medium text-black whitespace-nowrap ${o()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},Tm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:a,classDiv:o,...i},l)=>f.jsxs("div",{className:o,children:[f.jsxs("select",{ref:l,id:a,className:"h-8 w-full rounded-lg border px-3 py-0.5",value:r,onChange:s,...i,children:[f.jsx("option",{value:"0",children:e||"Seleccione una opción"}),t==null?void 0:t.map(c=>f.jsx("option",{value:c.value,children:c.label},c.value))]}),n&&f.jsx("p",{className:"mt-1 text-sm text-red-500",children:n})]}));Tm.displayName="SelectForm";const Pm={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},U_=({logo:t,number:e,title:n,start:r,end:s,current:a,type:o,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return f.jsxs("div",{className:`${Pm.mth_card_indicator} flex flex-col border bg-white px-3.5 py-4`,children:[f.jsx("div",{className:"flex justify-end",children:f.jsx(Cr,{src:t||"",alt:"Icon",width:30,height:30,classIm:i})}),f.jsx("h2",{className:"mt-2 font-bold mth_card_indicator_title",id:`mth_card_indicator_${n}_title`,children:n.toUpperCase()}),f.jsxs("small",{className:"text-2xl font-extrabold mth_card_indicator_number",children:[l(e)," ",o==="percentage"?"%":""]}),f.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:f.jsx(Em,{start:r,end:s,current:a,type:o})})]})};/*!
|
|
8
|
+
*/var p1=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Fo=p1.join(","),Ph=typeof Element>"u",bs=Ph?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bo=!Ph&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Wo=function t(e,n){var r;n===void 0&&(n=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",o=a||n&&e&&t(e.parentNode);return o},b1=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},y1=function(e,n,r){if(Wo(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(Fo));return n&&bs.call(e,Fo)&&s.unshift(e),s=s.filter(r),s},w1=function t(e,n,r){for(var s=[],a=Array.from(e);a.length;){var o=a.shift();if(!Wo(o,!1))if(o.tagName==="SLOT"){var i=o.assignedElements(),l=i.length?i:o.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:o,candidates:c})}else{var d=bs.call(o,Fo);d&&r.filter(o)&&(n||!e.includes(o))&&s.push(o);var u=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),h=!Wo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(u&&h){var g=t(u===!0?o.children:u.children,!0,r);r.flatten?s.push.apply(s,g):s.push({scopeParent:o,candidates:g})}else a.unshift.apply(a,o.children)}}return s},Nh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},jh=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||b1(e))&&!Nh(e)?0:e.tabIndex},v1=function(e,n){var r=jh(e);return r<0&&n&&!Nh(e)?0:r},x1=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ih=function(e){return e.tagName==="INPUT"},k1=function(e){return Ih(e)&&e.type==="hidden"},_1=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},S1=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},C1=function(e){if(!e.name)return!0;var n=e.form||Bo(e),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=S1(s,e.form);return!a||a===e},O1=function(e){return Ih(e)&&e.type==="radio"},D1=function(e){return O1(e)&&!C1(e)},M1=function(e){var n,r=e&&Bo(e),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==e){var o,i,l;for(a=!!((o=s)!==null&&o!==void 0&&(i=o.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!a&&s;){var c,d,u;r=Bo(s),s=(c=r)===null||c===void 0?void 0:c.host,a=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return a},Ah=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},E1=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=bs.call(e,"details>summary:first-of-type"),o=a?e.parentElement:e;if(bs.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof s=="function"){for(var i=e;e;){var l=e.parentElement,c=Bo(e);if(l&&!l.shadowRoot&&s(l)===!0)return Ah(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(M1(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ah(e);return!1},T1=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return bs.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},P1=function(e,n){return!(n.disabled||Wo(n)||k1(n)||E1(n,e)||_1(n)||T1(n))},yc=function(e,n){return!(D1(n)||jh(n)<0||!P1(e,n))},N1=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},j1=function t(e){var n=[],r=[];return e.forEach(function(s,a){var o=!!s.scopeParent,i=o?s.scopeParent:s,l=v1(i,o),c=o?t(s.candidates):i;l===0?o?n.push.apply(n,c):n.push(i):r.push({documentOrder:a,tabIndex:l,item:s,isScope:o,content:c})}),r.sort(x1).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},zo=function(e,n){n=n||{};var r;return n.getShadowRoot?r=w1([e],n.includeContainer,{filter:yc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:N1}):r=y1(e,n.includeContainer,yc.bind(null,n)),j1(r)},I1=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return bs.call(e,Fo)===!1?!1:yc(n,e)};function Rh(t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const A1=z.useInsertionEffect||(t=>t());function pn(t){const e=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return A1(()=>{e.current=t}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}const wc="ArrowUp",da="ArrowDown",ys="ArrowLeft",ws="ArrowRight";function Ho(t,e,n){return Math.floor(t/e)!==n}function ua(t,e){return e<0||e>=t.current.length}function vc(t,e){return yt(t,{disabledIndices:e})}function Lh(t,e){return yt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function yt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=e===void 0?{}:e;const o=t.current,i=s?c=>s.includes(c):c=>{const d=o[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-a:a;while(l>=0&&l<=o.length-1&&i(l));return l}function R1(t,e){let{event:n,orientation:r,loop:s,cols:a,disabledIndices:o,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===wc){if(d&>(n),c===-1)u=l;else if(u=yt(t,{startingIndex:u,amount:a,decrement:!0,disabledIndices:o}),s&&(c-a<i||u<0)){const h=c%a,g=l%a,m=l-(g-h);g===h?u=l:u=g>h?m:m-a}ua(t,u)&&(u=c)}if(n.key===da&&(d&>(n),c===-1?u=i:(u=yt(t,{startingIndex:c,amount:a,disabledIndices:o}),s&&c+a>l&&(u=yt(t,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),ua(t,u)&&(u=c)),r==="both"){const h=gs(c/a);n.key===ws&&(d&>(n),c%a!==a-1?(u=yt(t,{startingIndex:c,disabledIndices:o}),s&&Ho(u,a,h)&&(u=yt(t,{startingIndex:c-c%a-1,disabledIndices:o}))):s&&(u=yt(t,{startingIndex:c-c%a-1,disabledIndices:o})),Ho(u,a,h)&&(u=c)),n.key===ys&&(d&>(n),c%a!==0?(u=yt(t,{startingIndex:c,disabledIndices:o,decrement:!0}),s&&Ho(u,a,h)&&(u=yt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):s&&(u=yt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),Ho(u,a,h)&&(u=c));const g=gs(l/a)===h;ua(t,u)&&(s&&g?u=n.key===ys?l:yt(t,{startingIndex:c-c%a-1,disabledIndices:o}):u=c)}return u}function L1(t,e,n){const r=[];let s=0;return t.forEach((a,o)=>{let{width:i,height:l}=a;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+o+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let h=0;h<l;h++)d.push(s+u+h*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=o}),c=!0):s++}}),[...r]}function F1(t,e,n,r,s){if(t===-1)return-1;const a=n.indexOf(t);switch(s){case"tl":return a;case"tr":return a+e[t].width-1;case"bl":return a+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function B1(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let Fh=0;function Bn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(Fh);const a=()=>t==null?void 0:t.focus({preventScroll:n});s?a():Fh=requestAnimationFrame(a)}var Ie=typeof document<"u"?_.useLayoutEffect:_.useEffect;function W1(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function z1(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const Bh=z.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function H1(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,a]=z.useState(()=>new Map),o=z.useCallback(l=>{a(c=>new Map(c).set(l,null))},[]),i=z.useCallback(l=>{a(c=>{const d=new Map(c);return d.delete(l),d})},[]);return Ie(()=>{const l=new Map(s);Array.from(l.keys()).sort(W1).forEach((d,u)=>{l.set(d,u)}),z1(s,l)||a(l)},[s]),z.createElement(Bh.Provider,{value:z.useMemo(()=>({register:o,unregister:i,map:s,elementsRef:n,labelsRef:r}),[o,i,s,n,r])},e)}function Y1(t){let{label:e}=t===void 0?{}:t;const[n,r]=z.useState(null),s=z.useRef(null),{register:a,unregister:o,map:i,elementsRef:l,labelsRef:c}=z.useContext(Bh),d=z.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var h;const g=e!==void 0;c.current[n]=g?e:(h=u==null?void 0:u.textContent)!=null?h:null}},[n,l,c,e]);return Ie(()=>{const u=s.current;if(u)return a(u),()=>{o(u)}},[a,o]),Ie(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),z.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function fa(){return fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fa.apply(this,arguments)}let xc=!1,V1=0;const Wh=()=>"floating-ui-"+V1++;function U1(){const[t,e]=z.useState(()=>xc?Wh():void 0);return Ie(()=>{t==null&&e(Wh())},[]),z.useEffect(()=>{xc||(xc=!0)},[]),t}const Yo=z.useId||U1;function X1(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(s=>s!==n))||[])}}}const G1=z.createContext(null),K1=z.createContext(null),Vo=()=>{var t;return((t=z.useContext(G1))==null?void 0:t.id)||null},ha=()=>z.useContext(K1);function Pr(t){return"data-floating-ui-"+t}function bn(t){const e=_.useRef(t);return Ie(()=>{e.current=t}),e}const zh=Pr("safe-polygon");function kc(t,e,n){return n&&!To(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Q1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:{domReference:o,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:h=!1,restMs:g=0,move:m=!0}=e,p=ha(),b=Vo(),y=bn(u),w=bn(d),k=z.useRef(),v=z.useRef(),x=z.useRef(),S=z.useRef(),N=z.useRef(!0),M=z.useRef(!1),P=z.useRef(()=>{}),T=z.useCallback(()=>{var O;const E=(O=s.current.openEvent)==null?void 0:O.type;return(E==null?void 0:E.includes("mouse"))&&E!=="mousedown"},[s]);z.useEffect(()=>{if(!c)return;function O(E){let{open:B}=E;B||(clearTimeout(v.current),clearTimeout(S.current),N.current=!0)}return a.on("openchange",O),()=>{a.off("openchange",O)}},[c,a]),z.useEffect(()=>{if(!c||!y.current||!n)return;function O(B){T()&&r(!1,B,"hover")}const E=_t(i).documentElement;return E.addEventListener("mouseleave",O),()=>{E.removeEventListener("mouseleave",O)}},[i,n,r,c,y,T]);const W=z.useCallback(function(O,E,B){E===void 0&&(E=!0),B===void 0&&(B="hover");const U=kc(w.current,"close",k.current);U&&!x.current?(clearTimeout(v.current),v.current=setTimeout(()=>r(!1,O,B),U)):E&&(clearTimeout(v.current),r(!1,O,B))},[w,r]),F=z.useCallback(()=>{P.current(),x.current=void 0},[]),C=z.useCallback(()=>{if(M.current){const O=_t(l.floating.current).body;O.style.pointerEvents="",O.removeAttribute(zh),M.current=!1}},[l]);return z.useEffect(()=>{if(!c)return;function O(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function E(G){if(clearTimeout(v.current),N.current=!1,h&&!To(k.current)||g>0&&kc(w.current,"open")===0)return;const ee=kc(w.current,"open",k.current);ee?v.current=setTimeout(()=>{r(!0,G,"hover")},ee):r(!0,G,"hover")}function B(G){if(O())return;P.current();const ee=_t(i);if(clearTimeout(S.current),y.current){n||clearTimeout(v.current),x.current=y.current({...t,tree:p,x:G.clientX,y:G.clientY,onClose(){C(),F(),W(G,!0,"safe-polygon")}});const V=x.current;ee.addEventListener("mousemove",V),P.current=()=>{ee.removeEventListener("mousemove",V)};return}(k.current==="touch"?!tt(i,G.relatedTarget):!0)&&W(G)}function U(G){O()||y.current==null||y.current({...t,tree:p,x:G.clientX,y:G.clientY,onClose(){C(),F(),W(G)}})(G)}if(Te(o)){const G=o;return n&&G.addEventListener("mouseleave",U),i==null||i.addEventListener("mouseleave",U),m&&G.addEventListener("mousemove",E,{once:!0}),G.addEventListener("mouseenter",E),G.addEventListener("mouseleave",B),()=>{n&&G.removeEventListener("mouseleave",U),i==null||i.removeEventListener("mouseleave",U),m&&G.removeEventListener("mousemove",E),G.removeEventListener("mouseenter",E),G.removeEventListener("mouseleave",B)}}},[o,i,c,t,h,g,m,W,F,C,r,n,p,w,y,s]),Ie(()=>{var O;if(c&&n&&(O=y.current)!=null&&O.__options.blockPointerEvents&&T()){const B=_t(i).body;if(B.setAttribute(zh,""),B.style.pointerEvents="none",M.current=!0,Te(o)&&i){var E;const U=o,G=p==null||(E=p.nodesRef.current.find(ee=>ee.id===b))==null||(E=E.context)==null?void 0:E.elements.floating;return G&&(G.style.pointerEvents=""),U.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{U.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,o,p,y,T]),Ie(()=>{n||(k.current=void 0,F(),C())},[n,F,C]),z.useEffect(()=>()=>{F(),clearTimeout(v.current),clearTimeout(S.current),C()},[c,o,F,C]),z.useMemo(()=>{if(!c)return{};function O(E){k.current=E.pointerType}return{reference:{onPointerDown:O,onPointerEnter:O,onMouseMove(E){n||g===0||(clearTimeout(S.current),S.current=setTimeout(()=>{N.current||r(!0,E.nativeEvent,"hover")},g))}},floating:{onMouseEnter(){clearTimeout(v.current)},onMouseLeave(E){W(E.nativeEvent,!1)}}}},[c,g,n,r,W])}function Z1(t,e){var n;let r=[],s=(n=t.find(a=>a.id===e))==null?void 0:n.parentId;for(;s;){const a=t.find(o=>o.id===s);s=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Nr(t,e){let n=t.filter(s=>{var a;return s.parentId===e&&((a=s.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=t.filter(s=>{var a;return(a=r)==null?void 0:a.some(o=>{var i;return s.parentId===o.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function J1(t,e){let n,r=-1;function s(a,o){o>r&&(n=a,r=o),Nr(t,a).forEach(l=>{s(l.id,o+1)})}return s(e,0),t.find(a=>a.id===n)}let vs=new WeakMap,Uo=new WeakSet,Xo={},_c=0;const q1=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hh=t=>t&&(t.host||Hh(t.parentNode)),$1=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Hh(n);return t.contains(r)?r:null}).filter(n=>n!=null);function e_(t,e,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=$1(e,t),i=new Set,l=new Set(o),c=[];Xo[s]||(Xo[s]=new WeakMap);const d=Xo[s];o.forEach(u),h(e),i.clear();function u(g){!g||i.has(g)||(i.add(g),g.parentNode&&u(g.parentNode))}function h(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,m=>{if(i.has(m))h(m);else{const p=a?m.getAttribute(a):null,b=p!==null&&p!=="false",y=(vs.get(m)||0)+1,w=(d.get(m)||0)+1;vs.set(m,y),d.set(m,w),c.push(m),y===1&&b&&Uo.add(m),w===1&&m.setAttribute(s,""),!b&&a&&m.setAttribute(a,"true")}})}return _c++,()=>{c.forEach(g=>{const m=(vs.get(g)||0)-1,p=(d.get(g)||0)-1;vs.set(g,m),d.set(g,p),m||(!Uo.has(g)&&a&&g.removeAttribute(a),Uo.delete(g)),p||g.removeAttribute(s)}),_c--,_c||(vs=new WeakMap,vs=new WeakMap,Uo=new WeakSet,Xo={})}}function Yh(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=_t(t[0]).body;return e_(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const ga=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vh(t,e){const n=zo(t,ga());e==="prev"&&n.reverse();const r=n.indexOf(hn(_t(t)));return n.slice(r+1)[0]}function Uh(){return Vh(document.body,"next")}function Xh(){return Vh(document.body,"prev")}function ma(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!tt(n,r)}function t_(t){zo(t,ga()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function n_(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Sc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let r_;function Gh(t){t.key==="Tab"&&(t.target,clearTimeout(r_))}const Go=z.forwardRef(function(e,n){const[r,s]=z.useState();Ie(()=>(oc()&&s("button"),document.addEventListener("keydown",Gh),()=>{document.removeEventListener("keydown",Gh)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Pr("focus-guard")]:"",style:Sc};return z.createElement("span",fa({},e,a))}),Kh=z.createContext(null),Qh=Pr("portal");function s_(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=z.useState(null),a=Yo(),o=Zh(),i=z.useRef(null);return Ie(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),Ie(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=a,c.setAttribute(Qh,""),l.appendChild(c),i.current=c,s(c)},[e,a]),Ie(()=>{if(i.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Te(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=a,d.setAttribute(Qh,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,a,o]),r}function a_(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const a=s_({id:n,root:r}),[o,i]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),u=z.useRef(null),h=!!o&&!o.modal&&o.open&&s&&!!(r||a);return z.useEffect(()=>{if(!a||!s||o!=null&&o.modal)return;function g(m){a&&ma(m)&&(m.type==="focusin"?n_:t_)(a)}return a.addEventListener("focusin",g,!0),a.addEventListener("focusout",g,!0),()=>{a.removeEventListener("focusin",g,!0),a.removeEventListener("focusout",g,!0)}},[a,s,o==null?void 0:o.modal]),z.createElement(Kh.Provider,{value:z.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:a,setFocusManagerState:i}),[s,a])},h&&a&&z.createElement(Go,{"data-type":"outside",ref:l,onFocus:g=>{if(ma(g,a)){var m;(m=d.current)==null||m.focus()}else{const p=Xh()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus()}}}),h&&a&&z.createElement("span",{"aria-owns":a.id,style:Sc}),a&&yf.createPortal(e,a),h&&a&&z.createElement(Go,{"data-type":"outside",ref:c,onFocus:g=>{if(ma(g,a)){var m;(m=u.current)==null||m.focus()}else{const p=Uh()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,g.nativeEvent))}}}))}const Zh=()=>z.useContext(Kh),o_=20;let jr=[];function Cc(t){jr=jr.filter(n=>n.isConnected);let e=t;if(!(!e||Mr(e)==="body")){if(!I1(e,ga())){const n=zo(e,ga())[0];if(!n)return;e=n}jr.push(e),jr.length>o_&&(jr=jr.slice(-20))}}function Jh(){return jr.slice().reverse().find(t=>t.isConnected)}const i_=z.forwardRef(function(e,n){return z.createElement("button",fa({},e,{type:"button",ref:n,tabIndex:-1,style:Sc}))});function qh(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:o=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:h,nodeId:g,onOpenChange:m,events:p,dataRef:b,elements:{domReference:y,floating:w}}=e,k=typeof o=="number"&&o<0,v=fh(y)&&k,x=q1()?a:!0,S=bn(s),N=bn(o),M=bn(i),P=ha(),T=Zh(),W=z.useRef(null),F=z.useRef(null),C=z.useRef(!1),O=z.useRef(!1),E=T!=null,B=z.useCallback(function(j){return j===void 0&&(j=w),j?zo(j,ga()):[]},[w]),U=z.useCallback(j=>{const V=B(j);return S.current.map(L=>y&&L==="reference"?y:w&&L==="floating"?w:V).filter(Boolean).flat()},[y,w,S,B]);z.useEffect(()=>{if(r||!l)return;function j(L){if(L.key==="Tab"){tt(w,hn(_t(w)))&&B().length===0&&!v&>(L);const R=U(),I=ir(L);S.current[0]==="reference"&&I===y&&(gt(L),L.shiftKey?Bn(R[R.length-1]):Bn(R[1])),S.current[1]==="floating"&&I===w&&L.shiftKey&&(gt(L),Bn(R[0]))}}const V=_t(w);return V.addEventListener("keydown",j),()=>{V.removeEventListener("keydown",j)}},[r,y,w,l,S,v,B,U]),z.useEffect(()=>{if(r||!d)return;function j(){O.current=!0,setTimeout(()=>{O.current=!1})}function V(L){const R=L.relatedTarget;queueMicrotask(()=>{const I=!(tt(y,R)||tt(w,R)||tt(R,w)||tt(T==null?void 0:T.portalNode,R)||R!=null&&R.hasAttribute(Pr("focus-guard"))||P&&(Nr(P.nodesRef.current,g).find(D=>{var H,J;return tt((H=D.context)==null?void 0:H.elements.floating,R)||tt((J=D.context)==null?void 0:J.elements.domReference,R)})||Z1(P.nodesRef.current,g).find(D=>{var H,J;return((H=D.context)==null?void 0:H.elements.floating)===R||((J=D.context)==null?void 0:J.elements.domReference)===R})));R&&I&&!O.current&&R!==Jh()&&(C.current=!0,m(!1,L))})}if(w&&ht(y))return y.addEventListener("focusout",V),y.addEventListener("pointerdown",j),!l&&w.addEventListener("focusout",V),()=>{y.removeEventListener("focusout",V),y.removeEventListener("pointerdown",j),!l&&w.removeEventListener("focusout",V)}},[r,y,w,l,g,P,T,m,d]),z.useEffect(()=>{var j;if(r)return;const V=Array.from((T==null||(j=T.portalNode)==null?void 0:j.querySelectorAll("["+Pr("portal")+"]"))||[]);if(w){const L=[w,...V,W.current,F.current,S.current.includes("reference")||v?y:null].filter(I=>I!=null),R=l||v?Yh(L,x,!x):Yh(L);return()=>{R()}}},[r,y,w,l,S,T,v,x]),Ie(()=>{if(r||!w)return;const j=_t(w),V=hn(j);queueMicrotask(()=>{const L=U(w),R=N.current,I=(typeof R=="number"?L[R]:R.current)||w,D=tt(w,V);!k&&!D&&u&&Bn(I,{preventScroll:I===w})})},[r,u,w,k,U,N]),Ie(()=>{if(r||!w)return;let j=!1;const V=_t(w),L=hn(V),R=b.current;Cc(L);function I(D){let{reason:H,event:J,nested:K}=D;H==="escape-key"&&h.domReference.current&&Cc(h.domReference.current),H==="hover"&&J.type==="mouseleave"&&(C.current=!0),H==="outside-press"&&(K?(C.current=!1,j=!0):C.current=!(dh(J)||ac(J)))}return p.on("openchange",I),()=>{p.off("openchange",I);const D=hn(V),H=tt(w,D)||P&&Nr(P.nodesRef.current,g).some(q=>{var te;return tt((te=q.context)==null?void 0:te.elements.floating,D)});(H||R.openEvent&&["click","mousedown"].includes(R.openEvent.type))&&h.domReference.current&&Cc(h.domReference.current);const K=Jh();M.current&&!C.current&&ht(K)&&(!(K!==D&&D!==V.body)||H)&&Bn(K,{cancelPrevious:!1,preventScroll:j})}},[r,w,M,b,h,p,P,g]),Ie(()=>{if(!(r||!T))return T.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:h}),()=>{T.setFocusManagerState(null)}},[r,T,l,u,m,h,d]),Ie(()=>{if(r||!w||typeof MutationObserver!="function"||k)return;const j=()=>{const L=w.getAttribute("tabindex");S.current.includes("floating")||hn(_t(w))!==h.domReference.current&&B().length===0?L!=="0"&&w.setAttribute("tabindex","0"):L!=="-1"&&w.setAttribute("tabindex","-1")};j();const V=new MutationObserver(j);return V.observe(w,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,w,h,S,B,k]);function G(j){return r||!c||!l?null:z.createElement(i_,{ref:j==="start"?W:F,onClick:V=>m(!1,V.nativeEvent)},typeof c=="string"?c:"Dismiss")}const ee=!r&&x&&(E||l);return z.createElement(z.Fragment,null,ee&&z.createElement(Go,{"data-type":"inside",ref:T==null?void 0:T.beforeInsideRef,onFocus:j=>{if(l){const L=U();Bn(s[0]==="reference"?L[0]:L[L.length-1])}else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(C.current=!1,ma(j,T.portalNode)){const L=Uh()||y;L==null||L.focus()}else{var V;(V=T.beforeOutsideRef.current)==null||V.focus()}}}),!v&&G("start"),n,G("end"),ee&&z.createElement(Go,{"data-type":"inside",ref:T==null?void 0:T.afterInsideRef,onFocus:j=>{if(l)Bn(U()[0]);else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(d&&(C.current=!0),ma(j,T.portalNode)){const L=Xh()||y;L==null||L.focus()}else{var V;(V=T.afterOutsideRef.current)==null||V.focus()}}}))}const Oc=new Set,l_=z.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const a=Yo();return Ie(()=>{if(!r)return;Oc.add(a);const o=/iP(hone|ad|od)|iOS/.test(sc()),i=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",d=window.innerWidth-document.documentElement.clientWidth,u=i.left?parseFloat(i.left):window.pageXOffset,h=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),o){var g,m;const p=((g=window.visualViewport)==null?void 0:g.offsetLeft)||0,b=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(i,{position:"fixed",top:-(h-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{Oc.delete(a),Oc.size===0&&(Object.assign(i,{overflow:"",[c]:""}),o&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,h)))}},[a,r]),z.createElement("div",fa({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function $h(t){return ht(t.target)&&t.target.tagName==="BUTTON"}function eg(t){return cc(t)}function tg(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=t,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=z.useRef(),h=z.useRef(!1);return z.useMemo(()=>o?{reference:{onPointerDown(g){u.current=g.pointerType},onMouseDown(g){g.button===0&&(To(u.current,!0)&&c||i!=="click"&&(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){if(i==="mousedown"&&u.current){u.current=void 0;return}To(u.current,!0)&&c||(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){u.current=void 0,!(g.defaultPrevented||!d||$h(g))&&(g.key===" "&&!eg(a)&&(g.preventDefault(),h.current=!0),g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!d||$h(g)||eg(a)||g.key===" "&&h.current&&(h.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}}:{},[o,s,i,c,d,a,l,n,r])}const c_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},d_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ng=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function rg(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:a,domReference:o,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:h="pointerdown",referencePress:g=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:y}=e,w=ha(),k=pn(typeof u=="function"?u:()=>!1),v=typeof u=="function"?k:u,x=z.useRef(!1),S=z.useRef(!1),{escapeKey:N,outsidePress:M}=ng(b),{escapeKey:P,outsidePress:T}=ng(y),W=pn(E=>{if(!n||!c||!d||E.key!=="Escape")return;const B=w?Nr(w.nodesRef.current,s):[];if(!N&&(E.stopPropagation(),B.length>0)){let U=!0;if(B.forEach(G=>{var ee;if((ee=G.context)!=null&&ee.open&&!G.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,Ck(E)?E.nativeEvent:E,"escape-key")}),F=pn(E=>{var B;const U=()=>{var G;W(E),(G=ir(E))==null||G.removeEventListener("keydown",U)};(B=ir(E))==null||B.addEventListener("keydown",U)}),C=pn(E=>{const B=x.current;x.current=!1;const U=S.current;if(S.current=!1,h==="click"&&U||B||typeof v=="function"&&!v(E))return;const G=ir(E),ee="["+Pr("inert")+"]",j=_t(i).querySelectorAll(ee);let V=Te(G)?G:null;for(;V&&!ar(V);){const I=Ln(V);if(ar(I)||!Te(I))break;V=I}if(j.length&&Te(G)&&!Ok(G)&&!tt(G,i)&&Array.from(j).every(I=>!tt(V,I)))return;if(ht(G)&&i){const I=G.clientWidth>0&&G.scrollWidth>G.clientWidth,D=G.clientHeight>0&&G.scrollHeight>G.clientHeight;let H=D&&E.offsetX>G.clientWidth;if(D&&Zt(G).direction==="rtl"&&(H=E.offsetX<=G.offsetWidth-G.clientWidth),H||I&&E.offsetY>G.clientHeight)return}const L=w&&Nr(w.nodesRef.current,s).some(I=>{var D;return lc(E,(D=I.context)==null?void 0:D.elements.floating)});if(lc(E,i)||lc(E,o)||L)return;const R=w?Nr(w.nodesRef.current,s):[];if(R.length>0){let I=!0;if(R.forEach(D=>{var H;if((H=D.context)!=null&&H.open&&!D.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}r(!1,E,"outside-press")}),O=pn(E=>{var B;const U=()=>{var G;C(E),(G=ir(E))==null||G.removeEventListener(h,U)};(B=ir(E))==null||B.addEventListener(h,U)});return z.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=M;function E(G){r(!1,G,"ancestor-scroll")}const B=_t(i);d&&B.addEventListener("keydown",P?F:W,P),v&&B.addEventListener(h,T?O:C,T);let U=[];return p&&(Te(o)&&(U=or(o)),Te(i)&&(U=U.concat(or(i))),!Te(a)&&a&&a.contextElement&&(U=U.concat(or(a.contextElement)))),U=U.filter(G=>{var ee;return G!==((ee=B.defaultView)==null?void 0:ee.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",E,{passive:!0})}),()=>{d&&B.removeEventListener("keydown",P?F:W,P),v&&B.removeEventListener(h,T?O:C,T),U.forEach(G=>{G.removeEventListener("scroll",E)})}},[l,i,o,a,d,v,h,n,r,p,c,N,M,W,P,F,C,T,O]),z.useEffect(()=>{x.current=!1},[v,h]),z.useMemo(()=>c?{reference:{onKeyDown:W,[c_[m]]:E=>{g&&r(!1,E.nativeEvent,"reference-press")}},floating:{onKeyDown:W,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[d_[h]]:()=>{x.current=!0}}}:{},[c,g,h,m,r,W])}let Dc;process.env.NODE_ENV!=="production"&&(Dc=new Set);function sg(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var a;const M="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=t.elements)!=null&&a.reference&&!Te(t.elements.reference)){var o;if(!((o=Dc)!=null&&o.has(M))){var i;(i=Dc)==null||i.add(M),console.error(M)}}}const[l,c]=z.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=c1(t),h=ha(),g=Vo()!=null,m=pn((M,P,T)=>{M&&(b.current.openEvent=P),y.emit("openchange",{open:M,event:P,reason:T,nested:g}),r==null||r(M,P,T)}),p=z.useRef(null),b=z.useRef({}),y=z.useState(()=>X1())[0],w=Yo(),k=z.useCallback(M=>{const P=Te(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;u.refs.setReference(P)},[u.refs]),v=z.useCallback(M=>{(Te(M)||M===null)&&(p.current=M,c(M)),(Te(u.refs.reference.current)||u.refs.reference.current===null||M!==null&&!Te(M))&&u.refs.setReference(M)},[u.refs]),x=z.useMemo(()=>({...u.refs,setReference:v,setPositionReference:k,domReference:p}),[u.refs,v,k]),S=z.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=z.useMemo(()=>({...u,refs:x,elements:S,dataRef:b,nodeId:s,floatingId:w,events:y,open:n,onOpenChange:m}),[u,s,w,y,n,m,x,S]);return Ie(()=>{const M=h==null?void 0:h.nodesRef.current.find(P=>P.id===s);M&&(M.context=N)}),z.useMemo(()=>({...u,context:N,refs:x,elements:S}),[u,x,S,N])}function u_(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:a,elements:{domReference:o}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=z.useRef(!1),d=z.useRef(),u=z.useRef(!0);return z.useEffect(()=>{if(!i)return;const h=Mt(o);function g(){!n&&ht(o)&&o===hn(_t(o))&&(c.current=!0)}function m(){u.current=!0}return h.addEventListener("blur",g),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",g),h.removeEventListener("keydown",m,!0)}},[o,n,i]),z.useEffect(()=>{if(!i)return;function h(g){let{reason:m}=g;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,i]),z.useEffect(()=>()=>{clearTimeout(d.current)},[]),z.useMemo(()=>i?{reference:{onPointerDown(h){ac(h.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const g=ir(h.nativeEvent);if(l&&Te(g))try{if(oc()&&uh())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!u.current&&!cc(g))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const g=h.relatedTarget,m=Te(g)&&g.hasAttribute(Pr("focus-guard"))&&g.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=hn(o?o.ownerDocument:document);!g&&p===o||tt(a.floating.current,p)||tt(o,p)||m||r(!1,h.nativeEvent,"focus")})}}}:{},[i,l,o,a,r])}const ag="active",og="selected";function Mc(t,e,n){const r=new Map,s=n==="item";let a=t;if(s&&t){const{[ag]:o,[og]:i,...l}=t;a=l}return{...n==="floating"&&{tabIndex:-1},...a,...e.map(o=>{const i=o?o[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((o,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[ag,og].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var u;(u=r.get(c))==null||u.push(d),o[c]=function(){for(var h,g=arguments.length,m=new Array(g),p=0;p<g;p++)m[p]=arguments[p];return(h=r.get(c))==null?void 0:h.map(b=>b(...m)).find(b=>b!==void 0)}}}else o[c]=d}),o),{})}}function ig(t){t===void 0&&(t=[]);const e=t,n=z.useCallback(a=>Mc(a,t,"reference"),e),r=z.useCallback(a=>Mc(a,t,"floating"),e),s=z.useCallback(a=>Mc(a,t,"item"),t.map(a=>a==null?void 0:a.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let lg=!1;function Ko(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function cg(t,e){return Ko(e,t===wc||t===da,t===ys||t===ws)}function Ec(t,e,n){return Ko(e,t===da,n?t===ys:t===ws)||t==="Enter"||t===" "||t===""}function f_(t,e,n){return Ko(e,n?t===ys:t===ws,t===da)}function dg(t,e,n){return Ko(e,n?t===ws:t===ys,t===wc)}function h_(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:a,floating:o}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:h=!1,loop:g=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:y="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:k=!0,disabledIndices:v=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:N=!0,virtualItemRef:M,itemSizes:P,dense:T=!1}=e;process.env.NODE_ENV!=="production"&&(h&&(g||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),b||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const W=Vo(),F=ha(),C=pn(c),O=z.useRef(y),E=z.useRef(u??-1),B=z.useRef(null),U=z.useRef(!0),G=z.useRef(C),ee=z.useRef(!!o),j=z.useRef(!1),V=z.useRef(!1),L=bn(v),R=bn(n),I=bn(N),[D,H]=z.useState(),[J,K]=z.useState(),q=pn(function(A,re,ne){ne===void 0&&(ne=!1);const oe=A.current[re.current];oe&&(b?(H(oe.id),F==null||F.events.emit("virtualfocus",oe),M&&(M.current=oe)):Bn(oe,{preventScroll:!0,sync:uh()&&oc()?lg||j.current:!1}),requestAnimationFrame(()=>{const fe=I.current;fe&&oe&&(ne||!U.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof fe=="boolean"?{block:"nearest",inline:"nearest"}:fe))}))});Ie(()=>{document.createElement("div").focus({get preventScroll(){return lg=!0,!1}})},[]),Ie(()=>{d&&(n&&o?O.current&&u!=null&&(V.current=!0,E.current=u,C(u)):ee.current&&(E.current=-1,G.current(null)))},[d,n,o,u,C]),Ie(()=>{if(d&&n&&o)if(l==null){if(j.current=!1,u!=null)return;if(ee.current&&(E.current=-1,q(i,E)),!ee.current&&O.current&&(B.current!=null||O.current===!0&&B.current==null)){let A=0;const re=()=>{i.current[0]==null?(A<2&&(A?requestAnimationFrame:queueMicrotask)(re),A++):(E.current=B.current==null||Ec(B.current,x,p)||m?vc(i,L.current):Lh(i,L.current),B.current=null,C(E.current))};re()}}else ua(i,l)||(E.current=l,q(i,E,V.current),V.current=!1)},[d,n,o,l,u,m,i,x,p,C,q,L]),Ie(()=>{var A;if(!d||o||!F||b||!ee.current)return;const re=F.nodesRef.current,ne=(A=re.find(ie=>ie.id===W))==null||(A=A.context)==null?void 0:A.elements.floating,oe=hn(_t(o)),fe=re.some(ie=>ie.context&&tt(ie.context.elements.floating,oe));ne&&!fe&&U.current&&ne.focus({preventScroll:!0})},[d,o,F,W,b]),Ie(()=>{if(!d||!F||!b||W)return;function A(re){K(re.id),M&&(M.current=re)}return F.events.on("virtualfocus",A),()=>{F.events.off("virtualfocus",A)}},[d,F,b,W,M]),Ie(()=>{G.current=C,ee.current=!!o}),Ie(()=>{n||(B.current=null)},[n]);const te=l!=null,Y=z.useMemo(()=>{function A(ne){if(!n)return;const oe=i.current.indexOf(ne);oe!==-1&&C(oe)}return{onFocus(ne){let{currentTarget:oe}=ne;A(oe)},onClick:ne=>{let{currentTarget:oe}=ne;return oe.focus({preventScroll:!0})},...w&&{onMouseMove(ne){let{currentTarget:oe}=ne;A(oe)},onPointerLeave(ne){let{pointerType:oe}=ne;!U.current||oe==="touch"||(E.current=-1,q(i,E),C(null),b||Bn(s.floating.current,{preventScroll:!0}))}}}},[n,s,q,w,i,C,b]);return z.useMemo(()=>{if(!d)return{};const A=L.current;function re(ae){if(U.current=!1,j.current=!0,!R.current&&ae.currentTarget===s.floating.current)return;if(m&&dg(ae.key,x,p)){gt(ae),r(!1,ae.nativeEvent,"list-navigation"),ht(a)&&!b&&a.focus();return}const Ve=E.current,pe=vc(i,A),He=Lh(i,A);if(ae.key==="Home"&&(gt(ae),E.current=pe,C(E.current)),ae.key==="End"&&(gt(ae),E.current=He,C(E.current)),S>1){const Ge=P||Array.from({length:i.current.length},()=>({width:1,height:1})),et=L1(Ge,S,T),Xt=et.findIndex(Kt=>Kt!=null&&!(A!=null&&A.includes(Kt))),Gt=et.reduce((Kt,Sr,Qt)=>Sr!=null&&!(A!=null&&A.includes(Sr))?Qt:Kt,-1);if(E.current=et[R1({current:et.map(Kt=>Kt!=null?i.current[Kt]:null)},{event:ae,orientation:x,loop:g,cols:S,disabledIndices:B1([...A||[],void 0],et),minIndex:Xt,maxIndex:Gt,prevIndex:F1(E.current,Ge,et,S,ae.key===da?"bl":ae.key===ws?"tr":"tl"),stopEvent:!0})],C(E.current),x==="both")return}if(cg(ae.key,x)){if(gt(ae),n&&!b&&hn(ae.currentTarget.ownerDocument)===ae.currentTarget){E.current=Ec(ae.key,x,p)?pe:He,C(E.current);return}Ec(ae.key,x,p)?g?E.current=Ve>=He?h&&Ve!==i.current.length?-1:pe:yt(i,{startingIndex:Ve,disabledIndices:A}):E.current=Math.min(He,yt(i,{startingIndex:Ve,disabledIndices:A})):g?E.current=Ve<=pe?h&&Ve!==-1?i.current.length:He:yt(i,{startingIndex:Ve,decrement:!0,disabledIndices:A}):E.current=Math.max(pe,yt(i,{startingIndex:Ve,decrement:!0,disabledIndices:A})),ua(i,E.current)?C(null):C(E.current)}}function ne(ae){y==="auto"&&dh(ae.nativeEvent)&&(O.current=!0)}function oe(ae){O.current=y,y==="auto"&&ac(ae.nativeEvent)&&(O.current=!0)}const fe=b&&n&&te&&{"aria-activedescendant":J||D},ie=i.current.find(ae=>(ae==null?void 0:ae.id)===D);return{reference:{...fe,onKeyDown(ae){U.current=!1;const Ve=ae.key.indexOf("Arrow")===0,pe=f_(ae.key,x,p),He=dg(ae.key,x,p),Ge=cg(ae.key,x),et=(m?pe:Ge)||ae.key==="Enter"||ae.key.trim()==="";if(b&&n){const Sr=F==null?void 0:F.nodesRef.current.find(Gl=>Gl.parentId==null),Qt=F&&Sr?J1(F.nodesRef.current,Sr.id):null;if(Ve&&Qt&&M){const Gl=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(pe||He){var Xt,Gt;const t6=((Xt=Qt.context)==null?void 0:Xt.elements.domReference)===ae.currentTarget,bx=He&&!t6?(Gt=Qt.context)==null?void 0:Gt.elements.domReference:pe?ie:null;bx&&(gt(ae),bx.dispatchEvent(Gl),K(void 0))}if(Ge&&Qt.context&&Qt.context.open&&Qt.parentId&&ae.currentTarget!==Qt.context.elements.domReference){var Kt;gt(ae),(Kt=Qt.context.elements.domReference)==null||Kt.dispatchEvent(Gl);return}}return re(ae)}if(!(!n&&!k&&Ve)){if(et&&(B.current=m&&Ge?null:ae.key),m){pe&&(gt(ae),n?(E.current=vc(i,A),C(E.current)):r(!0,ae.nativeEvent,"list-navigation"));return}Ge&&(u!=null&&(E.current=u),gt(ae),!n&&k?r(!0,ae.nativeEvent,"list-navigation"):re(ae),n&&C(E.current))}},onFocus(){n&&C(null)},onPointerDown:oe,onMouseDown:ne,onClick:ne},floating:{"aria-orientation":x==="both"?void 0:x,...!fh(a)&&fe,onKeyDown:re,onPointerMove(){U.current=!0}},item:Y}},[a,s,D,J,L,R,i,d,x,p,b,n,te,m,u,k,h,S,g,y,C,r,Y,F,M,P,T])}const g_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ug(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:a=!0,role:o="dialog"}=e,i=(n=g_.get(o))!=null?n:o,l=Yo(),d=Vo()!=null;return z.useMemo(()=>{if(!a)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||o==="label"?{reference:{["aria-"+(o==="label"?"labelledby":"describedby")]:r?s:void 0},floating:u}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?s:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:l},...i==="menu"&&d&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(h){let{active:g,selected:m}=h;const p={role:"option",...g&&{id:s+"-option"}};switch(o){case"select":return{...p,"aria-selected":g&&m};case"combobox":return{...p,...g&&{"aria-selected":!0}}}return{}}}},[a,o,i,r,s,l,d])}function m_(t,e){var n;const{open:r,dataRef:s}=t,{listRef:a,activeIndex:o,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:h=[],selectedIndex:g=null}=e,m=z.useRef(),p=z.useRef(""),b=z.useRef((n=g??o)!=null?n:-1),y=z.useRef(null),w=pn(i),k=pn(l),v=bn(d),x=bn(h);return Ie(()=>{r&&(clearTimeout(m.current),y.current=null,p.current="")},[r]),Ie(()=>{if(r&&p.current===""){var S;b.current=(S=g??o)!=null?S:-1}},[r,g,o]),z.useMemo(()=>{if(!c)return{};function S(P){P?s.current.typing||(s.current.typing=P,k(P)):s.current.typing&&(s.current.typing=P,k(P))}function N(P,T,W){const F=v.current?v.current(T,W):T.find(C=>(C==null?void 0:C.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return F?P.indexOf(F):-1}function M(P){const T=a.current;if(p.current.length>0&&p.current[0]!==" "&&(N(T,T,p.current)===-1?S(!1):P.key===" "&>(P)),T==null||x.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(gt(P),S(!0)),T.every(O=>{var E,B;return O?((E=O[0])==null?void 0:E.toLocaleLowerCase())!==((B=O[1])==null?void 0:B.toLocaleLowerCase()):!0})&&p.current===P.key&&(p.current="",b.current=y.current),p.current+=P.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=y.current,S(!1)},u);const F=b.current,C=N(T,[...T.slice((F||0)+1),...T.slice(0,(F||0)+1)],p.current);C!==-1?(w(C),y.current=C):P.key!==" "&&(p.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(P){P.key===" "&&S(!1)}}}},[c,r,s,a,u,x,v,w,k])}function fg(t,e){const[n,r]=t;let s=!1;const a=e.length;for(let o=0,i=a-1;o<a;i=o++){const[l,c]=e[o]||[0,0],[d,u]=e[i]||[0,0];c>=r!=u>=r&&n<=(d-l)*(r-c)/(u-c)+l&&(s=!s)}return s}function p_(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function b_(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,a=!1,o=null,i=null,l=performance.now();function c(u,h){const g=performance.now(),m=g-l;if(o===null||i===null||m===0)return o=u,i=h,l=g,null;const p=u-o,b=h-i,w=Math.sqrt(p*p+b*b)/m;return o=u,i=h,l=g,w}const d=u=>{let{x:h,y:g,placement:m,elements:p,onClose:b,nodeId:y,tree:w}=u;return function(v){function x(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||h==null||g==null)return;const{clientX:S,clientY:N}=v,M=[S,N],P=ir(v),T=v.type==="mouseleave",W=tt(p.floating,P),F=tt(p.domReference,P),C=p.domReference.getBoundingClientRect(),O=p.floating.getBoundingClientRect(),E=m.split("-")[0],B=h>O.right-O.width/2,U=g>O.bottom-O.height/2,G=p_(M,C),ee=O.width>C.width,j=O.height>C.height,V=(ee?C:O).left,L=(ee?C:O).right,R=(j?C:O).top,I=(j?C:O).bottom;if(W&&(a=!0,!T))return;if(F&&(a=!1),F&&!T){a=!0;return}if(T&&Te(v.relatedTarget)&&tt(p.floating,v.relatedTarget)||w&&Nr(w.nodesRef.current,y).some(J=>{let{context:K}=J;return K==null?void 0:K.open}))return;if(E==="top"&&g>=C.bottom-1||E==="bottom"&&g<=C.top+1||E==="left"&&h>=C.right-1||E==="right"&&h<=C.left+1)return x();let D=[];switch(E){case"top":D=[[V,C.top+1],[V,O.bottom-1],[L,O.bottom-1],[L,C.top+1]];break;case"bottom":D=[[V,O.top+1],[V,C.bottom-1],[L,C.bottom-1],[L,O.top+1]];break;case"left":D=[[O.right-1,I],[O.right-1,R],[C.left+1,R],[C.left+1,I]];break;case"right":D=[[C.right-1,I],[C.right-1,R],[O.left+1,R],[O.left+1,I]];break}function H(J){let[K,q]=J;switch(E){case"top":{const te=[ee?K+e/2:B?K+e*4:K-e*4,q+e+1],Y=[ee?K-e/2:B?K+e*4:K-e*4,q+e+1],A=[[O.left,B||ee?O.bottom-e:O.top],[O.right,B?ee?O.bottom-e:O.top:O.bottom-e]];return[te,Y,...A]}case"bottom":{const te=[ee?K+e/2:B?K+e*4:K-e*4,q-e],Y=[ee?K-e/2:B?K+e*4:K-e*4,q-e],A=[[O.left,B||ee?O.top+e:O.bottom],[O.right,B?ee?O.top+e:O.bottom:O.top+e]];return[te,Y,...A]}case"left":{const te=[K+e+1,j?q+e/2:U?q+e*4:q-e*4],Y=[K+e+1,j?q-e/2:U?q+e*4:q-e*4];return[...[[U||j?O.right-e:O.left,O.top],[U?j?O.right-e:O.left:O.right-e,O.bottom]],te,Y]}case"right":{const te=[K-e,j?q+e/2:U?q+e*4:q-e*4],Y=[K-e,j?q-e/2:U?q+e*4:q-e*4],A=[[U||j?O.left+e:O.right,O.top],[U?j?O.left+e:O.right:O.left+e,O.bottom]];return[te,Y,...A]}}}if(!fg([S,N],D)){if(a&&!G)return x();if(!T&&r){const J=c(v.clientX,v.clientY);if(J!==null&&J<.1)return x()}fg([S,N],H([h,g]))?!a&&r&&(s=window.setTimeout(x,40)):x()}}};return d.__options={blockPointerEvents:n},d}const y_=({arrowRef:t,placement:e})=>{const n=[];return n.push(u1(8)),n.push(e==="auto"?g1():h1()),n.push(f1({padding:8})),t!=null&&t.current&&n.push(m1({element:t.current})),n},w_=({placement:t})=>t==="auto"?void 0:t,v_=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],hg=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>sg({placement:w_({placement:n}),open:t,onOpenChange:r,whileElementsMounted:Dh,middleware:y_({placement:n,arrowRef:e})}),gg=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>ig([tg(t,{enabled:e==="click"}),Q1(t,{enabled:e==="hover",handleClose:b_()}),rg(t),ug(t,{role:n}),...r]),mg=_.createContext(void 0);function Tc(){const t=_.useContext(mg);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const Pc=({className:t,theme:e={},...n})=>{const{theme:r}=Tc(),s=e.divider??r.floating.divider;return f.jsx("div",{className:Q(s,t),...n})},pg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=n.header??s.floating.header;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(a,e),...r,children:t}),f.jsx(Pc,{})]})},Nc=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...a},o)=>{const{ref:i,index:l}=Y1({label:typeof t=="string"?t:void 0}),c=Rh([o,i]),{theme:d,activeIndex:u,dismissOnClick:h,getItemProps:g,handleSelect:m}=Tc(),p=u===l,b=se(d.floating.item,s),y=a;return f.jsx("li",{role:"menuitem",className:b.container,children:f.jsxs(Jl,{ref:c,className:Q(b.base,e),...y,...g({onClick:()=>{r==null||r(),h&&m(null)}}),tabIndex:p?0:-1,children:[n&&f.jsx(n,{className:b.icon}),t]})})});Nc.displayName="DropdownItem";const x_={top:Ax,right:Of,bottom:Cf,left:Ix},k_=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:a,getReferenceProps:o,renderTrigger:i,...l})=>{const c=t.reference,d=o();if(_.useEffect(()=>{c.current&&(a==null||a(c.current.clientWidth))},[c,a]),i){const u=i(r);return _.cloneElement(u,{ref:t.setReference,disabled:s,...d,...u.props})}return n?f.jsx("button",{type:"button",ref:t.setReference,className:r==null?void 0:r.inlineWrapper,disabled:s,...d,children:e}):f.jsx(Qf,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},bg=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...a})=>{const[o,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[h,g]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=se(ge().dropdown,r),y=a,w=a["data-testid"]||"flowbite-dropdown-target",{placement:k=a.inline?"bottom-start":"bottom",trigger:v="click",label:x,inline:S,arrowIcon:N=!0,...M}=y,P=_.useCallback(j=>{u(j),i(!1)},[]),T=_.useCallback(j=>{o?c(j):P(j)},[o,P]),{context:W,floatingStyles:F,refs:C}=hg({open:o,setOpen:i,placement:k}),O=h_(W,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),E=m_(W,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:T}),{getReferenceProps:B,getFloatingProps:U,getItemProps:G}=gg({context:W,role:"menu",trigger:v,interactions:[O,E]}),ee=_.useMemo(()=>{const[j]=k.split("-");return x_[j]??Cf},[k]);return f.jsxs(mg.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:G,handleSelect:P},children:[f.jsxs(k_,{...M,refs:C,inline:S,theme:b,"data-testid":w,className:Q(b.floating.target,M.className),setButtonWidth:g,getReferenceProps:B,renderTrigger:s,children:[x,N&&f.jsx(ee,{className:b.arrowIcon})]}),o&&f.jsx(qh,{context:W,modal:!1,children:f.jsx("div",{ref:C.setFloating,style:{...F,minWidth:h},"data-testid":"flowbite-dropdown","aria-expanded":o,...U({className:Q(b.floating.base,b.floating.animation,"duration-100",!o&&b.floating.hidden,b.floating.style.auto,e)}),children:f.jsx(H1,{elementsRef:m,labelsRef:p,children:f.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};bg.displayName="Dropdown",pg.displayName="Dropdown.Header",Pc.displayName="Dropdown.Divider";const __=Object.assign(bg,{Item:Nc,Header:pg,Divider:Pc}),yg=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...a},o)=>{const i=se(ge().fileInput,s);return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(i.root.base,t),children:f.jsx("div",{className:i.field.base,children:f.jsx("input",{className:Q(i.field.input.base,i.field.input.colors[e],i.field.input.sizes[r]),...a,type:"file",ref:o})})}),n&&f.jsx(oa,{color:e,children:n})]})});yg.displayName="FileInput";const S_=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:a=!1,theme:o={},className:i,...l},c)=>{const d=_.useId(),u=se(ge().floatingLabel,o);return f.jsxs("div",{children:[f.jsxs("div",{className:Q("relative",s==="standard"?"z-0":""),children:[f.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:Q(u.input[n][s][r],i),placeholder:" ","data-testid":"floating-label",disabled:a,...l,ref:c}),f.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:Q(u.label[n][s][r],i),children:t})]}),f.jsx("p",{id:"outlined_helper_text"+d,className:Q(u.helperText[n],i),children:e})]})});S_.displayName="FloatingLabel";const wg=({alt:t,className:e,children:n,href:r,name:s,src:a,theme:o={},...i})=>{const l=se(ge().footer.brand,o);return f.jsx("div",{children:r?f.jsxs("a",{"data-testid":"flowbite-footer-brand",href:r,className:Q(l.base,e),...i,children:[f.jsx("img",{alt:t,src:a,className:l.img}),f.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:s}),n]}):f.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:a,className:Q(l.img,e),...i})})},vg=({by:t,className:e,href:n,theme:r={},year:s,...a})=>{const o=se(ge().footer.copyright,r);return f.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:Q(o.base,e),...a,children:["© ",s,n?f.jsx("a",{href:n,className:o.href,children:t}):f.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:o.span,children:t})]})},xg=({className:t,theme:e={},...n})=>{const r=se(ge().footer.divider,e);return f.jsx("hr",{"data-testid":"footer-divider",className:Q(r.base,t),...n})},kg=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...a})=>{const o=se(ge().footer.icon,s);return f.jsx("div",{children:n?f.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:Q(o.base,e),...a,children:f.jsx(r,{className:o.size})}):f.jsx(r,{"data-testid":"flowbite-footer-icon",className:o.size,...a})})},_g=({as:t="a",children:e,className:n,href:r,theme:s={},...a})=>{const o=se(ge().footer.groupLink.link,s);return f.jsx("li",{className:Q(o.base,n),children:f.jsx(t,{href:r,className:o.href,...a,children:e})})},Sg=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const a=se(ge().footer.groupLink,r);return f.jsx("ul",{"data-testid":"footer-groupLink",className:Q(a.base,n&&a.col,e),...s,children:t})},Cg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const a=se(ge().footer.title,n);return f.jsx(t,{"data-testid":"flowbite-footer-title",className:Q(a.base,e),...s,children:r})},Og=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...a})=>{const o=se(ge().footer,s);return f.jsx("footer",{"data-testid":"flowbite-footer",className:Q(o.root.base,t&&o.root.bgDark,r&&o.root.container,n),...a,children:e})};Og.displayName="Footer",vg.displayName="Footer.Copyright",_g.displayName="Footer.Link",wg.displayName="Footer.Brand",Sg.displayName="Footer.LinkGroup",kg.displayName="Footer.Icon",Cg.displayName="Footer.Title",xg.displayName="Footer.Divider",Object.assign(Og,{Copyright:vg,Link:_g,LinkGroup:Sg,Brand:wg,Icon:kg,Title:Cg,Divider:xg});const jc=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:a,...o})=>{const i=se(ge().label,s);return f.jsx("label",{className:Q(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...o,children:a??t??""})};jc.displayName="Label";const Dg=({children:t,className:e,icon:n,theme:r={},...s})=>{const a=se(ge().list.item,r);return f.jsxs("li",{className:Q(a.withIcon[n?"on":"off"],e),...s,children:[n&&f.jsx(n,{className:Q(a.icon)}),t]})},Mg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:a,theme:o={},...i})=>{const l=se(ge().list,o),c=s?"ol":"ul";return f.jsx(c,{className:Q(l.root.base,l.root.ordered[s?"on":"off"],n&&l.root.unstyled,r&&l.root.nested,a&&l.root.horizontal,e),...i,children:t})};Mg.displayName="List",Dg.displayName="List.Item",Object.assign(Mg,{Item:Dg});const Eg=({active:t,children:e,className:n,href:r,icon:s,onClick:a,theme:o={},disabled:i,...l})=>{const c=se(ge().listGroup.item,o),d=typeof r<"u",u=d?"a":"button";return f.jsx("li",{className:Q(c.base,n),children:f.jsxs(u,{href:r,onClick:a,type:d?void 0:"button",disabled:i,className:Q(c.link.active[t?"on":"off"],c.link.disabled[i?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[s&&f.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},Tg=({children:t,className:e,theme:n={},...r})=>{const s=se(ge().listGroup,n);return f.jsx("ul",{className:Q(s.root.base,e),...r,children:t})};Tg.displayName="ListGroup",Eg.displayName="ListGroup.Item",Object.assign(Tg,{Item:Eg});const Pg=_.createContext(void 0);function Ic(){const t=_.useContext(Pg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const Ng=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Ic(),o=se(s.body,n);return f.jsx("div",{className:Q(o.base,a&&[o.popup],e),...r,children:t})},jg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Ic(),o=se(s.footer,n);return f.jsx("div",{className:Q(o.base,!a&&o.popup,e),...r,children:t})},Ig=({as:t="h3",children:e,className:n,theme:r={},id:s,...a})=>{const o=_.useId(),i=s||o,{theme:l,popup:c,onClose:d,setHeaderId:u}=Ic(),h=se(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),f.jsxs("div",{className:Q(h.base,c&&h.popup,n),...a,children:[f.jsx(t,{id:i,className:h.title,children:e}),f.jsx("button",{"aria-label":"Close",className:h.close.base,type:"button",onClick:d,children:f.jsx(Rx,{"aria-hidden":!0,className:h.close.icon})})]})},Ag=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:a="center",root:o,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},h)=>{const[g,m]=_.useState(void 0),p=se(ge().modal,c),{context:b}=sg({open:i,onOpenChange:()=>r&&r()}),y=Rh([b.refs.setFloating,h]),w=tg(b),k=rg(b,{outsidePressEvent:"mousedown",enabled:n}),v=ug(b),{getFloatingProps:x}=ig([w,k,v]);return i?f.jsx(Pg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:f.jsx(a_,{root:o,children:f.jsx(l_,{lockScroll:!0,"data-testid":"modal-overlay",className:Q(p.root.base,p.root.positions[a],i?p.root.show.on:p.root.show.off,e),...u,children:f.jsx(qh,{context:b,initialFocus:d,children:f.jsx("div",{ref:y,...x(u),"aria-labelledby":g,className:Q(p.content.base,p.root.sizes[l]),children:f.jsx("div",{className:p.content.inner,children:t})})})})})}):null});Ag.displayName="Modal",Ig.displayName="Modal.Header",Ng.displayName="Modal.Body",jg.displayName="Modal.Footer",Object.assign(Ag,{Header:Ig,Body:Ng,Footer:jg});const Rg=_.createContext(void 0);function Qo(){const t=_.useContext(Rg);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Lg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Qo(),o=se(a.brand,r);return f.jsx(t,{className:Q(o.base,n),...s,children:e})},Fg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a}=Qo(),o=se(s.collapse,n);return f.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:Q(o.base,o.hidden[a?"off":"on"],e),...r,children:f.jsx("ul",{className:o.list,children:t})})},Bg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:a={},onClick:o,...i})=>{const{theme:l,setIsOpen:c}=Qo(),d=se(l.link,a),u=h=>{c(!1),o==null||o(h)};return f.jsx("li",{children:f.jsx(e,{className:Q(d.base,t&&d.active.on,!t&&!n&&d.active.off,d.disabled[n?"on":"off"],s),onClick:u,...i,children:r})})};function C_(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"},child:[]}]})(t)}function xs(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(t)}function O_(t){return Ee({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(t)}function Ac(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(t)}function D_(t){return Ee({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(t)}function M_(t){return Ee({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(t)}function E_(t){return Ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}const Wg=({barIcon:t=C_,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a,setIsOpen:o}=Qo(),i=se(s.toggle,n),l=()=>{o(!a)};return f.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:Q(i.base,e),...r,children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(t,{"aria-hidden":!0,className:i.icon})]})},zg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:a,theme:o={},...i})=>{const[l,c]=_.useState(s),d=se(ge().navbar,o);return f.jsx(Rg.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:f.jsx("nav",{className:Q(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[a?"on":"off"],n),...i,children:f.jsx("div",{className:Q(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};zg.displayName="Navbar",Lg.displayName="Navbar.Brand",Fg.displayName="Navbar.Collapse",Bg.displayName="Navbar.Link",Wg.displayName="Navbar.Toggle",Object.assign(zg,{Brand:Lg,Collapse:Fg,Link:Bg,Toggle:Wg});const T_=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),Rc=({active:t,children:e,className:n,onClick:r,theme:s={},...a})=>{const o=se(ge().pagination,s);return f.jsx("button",{type:"button",className:Q(t&&o.pages.selector.active,n),onClick:r,...a,children:e})};Rc.displayName="Pagination.Button";const Lc=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...a})=>{const o=se(ge().pagination,r);return f.jsx("button",{type:"button",className:Q(s&&o.pages.selector.disabled,e),disabled:s,onClick:n,...a,children:t})};Lc.displayName="Pagination.Navigation";const Hg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:a="Previous",renderPaginationButton:o=u=>f.jsx(Rc,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=se(ge().pagination,l),h=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),g=Math.max(1,h-4),m=()=>{s(Math.min(e+1,c))},p=()=>{s(Math.max(e-1,1))};return f.jsxs("nav",{className:Q(u.base,t),...d,children:[n==="table"&&f.jsxs("div",{className:u.layout.table.base,children:["Showing ",f.jsx("span",{className:u.layout.table.span,children:g})," to ",f.jsx("span",{className:u.layout.table.span,children:h})," of ",f.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),f.jsxs("ul",{className:u.pages.base,children:[f.jsx("li",{children:f.jsxs(Lc,{className:Q(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&f.jsx(Tx,{"aria-hidden":!0,className:u.pages.previous.icon}),a]})}),n==="pagination"&&T_(g,h).map(b=>f.jsx("li",{"aria-current":b===e?"page":void 0,children:o({className:Q(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>s(b),children:b})},b)),f.jsx("li",{children:f.jsxs(Lc,{className:Q(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&f.jsx(Px,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Hg.displayName="Pagination",Object.assign(Hg,{Button:Rc});const Yg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=se(ge().radio,e);return f.jsx("input",{ref:r,type:"radio",className:Q(s.root.base,t),...n})});Yg.displayName="Radio";const P_=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const a=se(ge().rangeSlider,n);return f.jsx(f.Fragment,{children:f.jsx("div",{"data-testid":"flowbite-range-slider",className:Q(a.root.base,t),children:f.jsx("div",{className:a.field.base,children:f.jsx("input",{ref:s,type:"range",className:Q(a.field.input.base,a.field.input.sizes[e]),...r})})})})});P_.displayName="RangeSlider";const Vg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const a=se(ge().ratingAdvanced,r);return f.jsxs("div",{className:Q(a.base,e),...s,children:[f.jsx("span",{className:a.label,children:t}),f.jsx("div",{className:a.progress.base,children:f.jsx("div",{className:a.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),f.jsx("span",{className:a.progress.label,children:`${n}%`})]})},Ug=_.createContext(void 0);function N_(){const t=_.useContext(Ug);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const Xg=({className:t,filled:e=!0,starIcon:n=Nx,theme:r={},...s})=>{const{theme:a,size:o="sm"}=N_(),i=se(a.star,r);return f.jsx(n,{"data-testid":"flowbite-rating-star",className:Q(i.sizes[o],i[e?"filled":"empty"],t),...s})},Gg=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const a=se(ge().rating,r);return f.jsx(Ug.Provider,{value:{theme:a,size:n},children:f.jsx("div",{className:Q(a.root.base,e),...s,children:t})})};Gg.displayName="Rating",Xg.displayName="Rating.Star",Vg.displayName="Rating.Advanced",Object.assign(Gg,{Star:Xg,Advanced:Vg});const j_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:a,shadow:o,sizing:i="md",theme:l={},...c},d)=>{const u=se(ge().select,l);return f.jsxs("div",{className:Q(u.base,n),children:[t&&f.jsx("span",{className:u.addon,children:t}),f.jsxs("div",{className:u.field.base,children:[a&&f.jsx("div",{className:u.field.icon.base,children:f.jsx(a,{className:u.field.icon.svg})}),f.jsx("select",{className:Q(u.field.select.base,u.field.select.colors[r],u.field.select.sizes[i],u.field.select.withIcon[a?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[o?"on":"off"]),...c,ref:d,children:e}),s&&f.jsx(oa,{color:r,children:s})]})]})});j_.displayName="Select";const I_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[h,g]=_.useState(!1),m=hg({open:h,placement:a,arrowRef:u,setOpen:g}),{context:p,middlewareData:{arrow:{x:b,y}={}},refs:w,strategy:k,update:v,x,y:S}=m,N=u_(p),{getFloatingProps:M,getReferenceProps:P}=gg({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(w.reference.current&&w.floating.current&&h)return Dh(w.reference.current,w.floating.current,v)},[h,w.floating,w.reference,v]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:w.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...P(),children:n}),f.jsxs("div",{ref:w.setFloating,"data-testid":"flowbite-tooltip",...M({className:Q(i.base,t&&`${i.animation} ${t}`,!h&&i.hidden,i.style[o],r),style:{position:k,top:S??" ",left:x??" ",minWidth:c},...d}),children:[f.jsx("div",{className:i.content,children:s}),e&&f.jsx("div",{className:Q(i.arrow.base,o==="dark"&&i.arrow.style.dark,o==="light"&&i.arrow.style.light,o==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:y??" ",left:b??" ",right:" ",bottom:" ",[v_({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},Zo=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i={},trigger:l="hover",...c})=>{const d=se(ge().tooltip,i);return f.jsx(I_,{animation:t,arrow:e,content:s,placement:a,style:o,theme:d,trigger:l,className:r,...c,children:n})};Zo.displayName="Tooltip";const Kg=_.createContext(void 0);function ks(){const t=_.useContext(Kg);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const Fc=_.createContext(void 0);function A_(){const t=_.useContext(Fc);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Qg=({children:t,className:e,icon:n,label:r,chevronIcon:s=Kl,renderChevronIcon:a,open:o=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(o),{theme:h,isCollapsed:g}=ks(),m=se(h.collapse,i);_.useEffect(()=>u(o),[o]);const p=({children:b})=>f.jsx("li",{children:g&&!d?f.jsx(Zo,{content:r,placement:"right",children:b}):b});return f.jsxs(p,{children:[f.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:r,type:"button",className:Q(m.button,e),...l,children:[n&&f.jsx(n,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:Q(m.icon.base,m.icon.open[d?"on":"off"])}),g?f.jsx("span",{className:"sr-only",children:r}):f.jsxs(f.Fragment,{children:[f.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:m.label.base,children:r}),a?a(m,d):f.jsx(s,{"aria-hidden":!0,className:Q(m.label.icon.base,m.label.icon.open[d?"on":"off"])})]})]}),f.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:m.list,children:f.jsx(Fc.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Qg.displayName="Sidebar.Collapse";const Zg=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:a,isCollapsed:o}=ks(),i=se(a.cta,r);return f.jsx("div",{"data-testid":"sidebar-cta",hidden:o,className:Q(i.base,i.color[e],n),...s,children:t})};Zg.displayName="Sidebar.CTA";const R_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...a})=>f.jsx("li",{...a,children:n?f.jsx(Zo,{content:f.jsx(Jg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Jg=({id:t,theme:e,children:n})=>f.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:Q(e.content.base),children:n}),qg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:a,labelColor:o="info",theme:i={},...l},c)=>{var p,b,y,w;const d=_.useId(),{theme:u,isCollapsed:h}=ks(),{isInsideCollapse:g}=A_(),m=se(u.item,i);return f.jsx(R_,{theme:m,className:m.listItem,id:d,isCollapsed:h,tooltipChildren:n,children:f.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:Q(m.base,t&&m.active,!h&&g&&((p=m.collapsed)==null?void 0:p.insideCollapse),r),...l,children:[s&&f.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:Q((b=m.icon)==null?void 0:b.base,t&&((y=m.icon)==null?void 0:y.active))}),h&&!s&&f.jsx("span",{className:(w=m.collapsed)==null?void 0:w.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!h&&f.jsx(Jg,{id:d,theme:m,children:n}),!h&&a&&f.jsx(Yf,{color:o,"data-testid":"flowbite-sidebar-label",hidden:h,className:m.label,children:a})]})})});qg.displayName="Sidebar.Item";const $g=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ks(),a=se(s.itemGroup,n);return f.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:Q(a.base,e),...r,children:f.jsx(Fc.Provider,{value:{isInsideCollapse:!1},children:t})})};$g.displayName="Sidebar.ItemGroup";const em=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ks(),a=se(s.items,n);return f.jsx("div",{className:Q(a.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};em.displayName="Sidebar.Items";const tm=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:a={},...o})=>{const i=_.useId(),{theme:l,isCollapsed:c}=ks(),d=se(l.logo,a);return f.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:Q(d.base,e),...o,children:[f.jsx("img",{alt:s,src:r,className:d.img}),f.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${i}`,children:t})]})};tm.displayName="Sidebar.Logo";const nm=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:a,...o})=>{const i=se(ge().sidebar,s);return f.jsx(Kg.Provider,{value:{theme:i,isCollapsed:r},children:f.jsx(e,{"aria-label":"Sidebar",hidden:r&&n==="hide",className:Q(i.root.base,i.root.collapsed[r?"on":"off"],a),...o,children:f.jsx("div",{className:i.root.inner,children:t})})})};nm.displayName="Sidebar",Object.assign(nm,{Collapse:Qg,CTA:Zg,Item:qg,Items:em,ItemGroup:$g,Logo:tm});const rm=_.createContext(void 0);function L_(){const t=_.useContext(rm);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const sm=_.createContext(void 0);function Bc(){const t=_.useContext(sm);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const am=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Bc(),o=se(a.body,n);return f.jsx(rm.Provider,{value:{theme:o},children:f.jsx("tbody",{className:Q(o.base,e),ref:s,...r,children:t})})});am.displayName="Table.Body";const om=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=L_(),o=se(a.cell,n);return f.jsx("td",{className:Q(o.base,e),ref:s,...r,children:t})});om.displayName="Table.Cell";const im=_.createContext(void 0);function F_(){const t=_.useContext(im);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const lm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Bc(),o=se(a.head,n);return f.jsx(im.Provider,{value:{theme:o},children:f.jsx("thead",{className:Q(o.base,e),ref:s,...r,children:f.jsx("tr",{children:t})})})});lm.displayName="Table.Head";const cm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=F_(),o=se(a.cell,n);return f.jsx("th",{className:Q(o.base,e),ref:s,...r,children:t})});cm.displayName="Table.HeadCell";const dm=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a,hoverable:o,striped:i}=Bc(),l=se(a.row,n);return f.jsx("tr",{ref:s,"data-testid":"table-row-element",className:Q(l.base,i&&l.striped,o&&l.hovered,e),...r,children:t})});dm.displayName="Table.Row";const um=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...a},o)=>{const i=se(ge().table,s);return f.jsx("div",{"data-testid":"table-element",className:Q(i.root.wrapper),children:f.jsxs(sm.Provider,{value:{theme:i,striped:n,hoverable:r},children:[f.jsx("div",{className:Q(i.root.shadow,e)}),f.jsx("table",{className:Q(i.root.base,e),...a,ref:o,children:t})]})})});um.displayName="Table";const Ke=Object.assign(um,{Head:lm,Body:am,Row:dm,Cell:om,HeadCell:cm}),fm=({children:t,className:e})=>f.jsx("div",{className:e,children:t});fm.displayName="Tabs.Item";const hm=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...a},o)=>{const i=se(ge().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:v})=>v),[t]),d=_.useRef([]),[u,h]=_.useState(Math.max(0,c.findIndex(v=>v.active))),[g,m]=_.useState(-1),p=v=>{h(v),n&&n(v)},b=({target:v})=>{p(v),m(v)},y=({event:v,target:x})=>{v.key==="ArrowLeft"&&m(Math.max(0,g-1)),v.key==="ArrowRight"&&m(Math.min(c.length-1,g+1)),v.key==="Enter"&&(p(x),m(x))},w=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var v;(v=d.current[g])==null||v.focus()},[g]),_.useImperativeHandle(o,()=>({setActiveTab:p})),f.jsxs("div",{className:Q(i.base,e),children:[f.jsx("div",{"aria-label":"Tabs",role:"tablist",className:Q(i.tablist.base,i.tablist.styles[r],e),...a,children:c.map((v,x)=>f.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${x}`,"aria-selected":x===u,className:Q(i.tablist.tabitem.base,w.base,x===u&&w.active.on,x!==u&&!v.disabled&&w.active.off),disabled:v.disabled,id:`${l}-tab-${x}`,onClick:()=>b({target:x}),onKeyDown:S=>y({event:S,target:x}),ref:S=>d.current[x]=S,role:"tab",tabIndex:x===g?0:-1,style:{zIndex:x===g?2:1},children:[v.icon&&f.jsx(v.icon,{className:i.tablist.tabitem.icon}),v.title]},x))}),f.jsx("div",{className:Q(i.tabitemcontainer.base,k),children:c.map((v,x)=>f.jsx("div",{"aria-labelledby":`${l}-tab-${x}`,className:i.tabpanel,hidden:x!==u,id:`${l}-tabpanel-${x}`,role:"tabpanel",tabIndex:0,children:v.children},x))})]})});hm.displayName="Tabs",Object.assign(hm,{Item:fm});const B_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...a},o)=>{const i=se(ge().textarea,s);return f.jsxs(f.Fragment,{children:[f.jsx("textarea",{ref:o,className:Q(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...a}),n&&f.jsx(oa,{color:e,children:n})]})});B_.displayName="Textarea";const gm=_.createContext(void 0);function Wc(){const t=_.useContext(gm);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const mm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Wc(),a=se(s.body,n);return f.jsx("div",{className:Q(a.base,e),...r,children:t})},pm=_.createContext(void 0);function zc(){const t=_.useContext(pm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const bm=_.createContext(void 0);function ym(){const t=_.useContext(bm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const wm=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=zc(),{theme:a}=ym(),o=se(a.content,n);return f.jsx(gm.Provider,{value:{theme:o},children:f.jsx("div",{"data-testid":"timeline-content",className:Q(s&&o.root.base,e),...r,children:t})})},vm=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:a}=zc(),o=se(s.item,n);return f.jsx(bm.Provider,{value:{theme:o},children:f.jsx("li",{"data-testid":"timeline-item",className:Q(a&&o.root.horizontal,!a&&o.root.vertical,e),...r,children:t})})},xm=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:a}=zc(),{theme:o}=ym(),i=se(o.point,r);return f.jsxs("div",{"data-testid":"timeline-point",className:Q(a&&i.horizontal,!a&&i.vertical,e),...s,children:[t,n?f.jsx("span",{className:Q(i.marker.icon.wrapper),children:f.jsx(n,{"aria-hidden":!0,className:Q(i.marker.icon.base)})}):f.jsx("div",{className:Q(a&&i.marker.base.horizontal,!a&&i.marker.base.vertical)}),a&&f.jsx("div",{className:Q(i.line)})]})},km=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Wc(),a=se(s.time,n);return f.jsx("time",{className:Q(a.base,e),...r,children:t})},_m=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Wc(),o=se(a.title,r);return f.jsx(t,{className:Q(o.base,n),...s,children:e})},Sm=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const a=se(ge().timeline,r);return f.jsx(pm.Provider,{value:{theme:a,horizontal:n},children:f.jsx("ol",{"data-testid":"timeline-component",className:Q(n&&a.root.direction.horizontal,!n&&a.root.direction.vertical,e),...s,children:t})})};Sm.displayName="Timeline",vm.displayName="Timeline.Item",xm.displayName="Timeline.Point",wm.displayName="Timeline.Content",km.displayName="Timeline.Time",_m.displayName="Timeline.Title",mm.displayName="Timeline.Body",Object.assign(Sm,{Item:vm,Point:xm,Content:wm,Time:km,Title:_m,Body:mm});const Cm=_.createContext(void 0);function W_(){const t=_.useContext(Cm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const Om=({className:t,onClick:e,theme:n={},xIcon:r=jx,onDismiss:s,...a})=>{const{theme:o,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=W_(),h=se(o.toggle,n),g=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return f.jsx("button",{"aria-label":"Close",onClick:g,type:"button",className:Q(h.base,t),...a,children:f.jsx(r,{"aria-hidden":!0,className:h.icon})})},z_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},Dm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[a,o]=_.useState(!1),[i,l]=_.useState(!1),c=se(ge().toast,r);return i?null:f.jsx(Cm.Provider,{value:{theme:c,duration:n,isClosed:a,isRemoved:i,setIsClosed:o,setIsRemoved:l},children:f.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:Q(c.root.base,z_[n],a&&c.root.closed,e),...s,children:t})})};Dm.displayName="Toast",Om.displayName="Toast.Toggle",Object.assign(Dm,{Toggle:Om});const H_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:a,name:o,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),h=se(ge().toggleSwitch,l),g=()=>i(!t),m=()=>{g()},p=b=>{b.code=="Enter"&&b.preventDefault()};return f.jsxs(f.Fragment,{children:[o&&t?f.jsx("input",{ref:d,checked:t,hidden:!0,name:o,readOnly:!0,type:"checkbox",className:"sr-only"}):null,f.jsxs("button",{"aria-checked":t,"aria-labelledby":`${u}-flowbite-toggleswitch-label`,disabled:s,id:`${u}-flowbite-toggleswitch`,onClick:m,onKeyDown:p,role:"switch",tabIndex:0,type:"button",className:Q(h.root.base,h.root.active[s?"off":"on"],e),...c,children:[f.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:Q(h.toggle.base,h.toggle.checked[t?"on":"off"],t&&h.toggle.checked.color[n],h.toggle.sizes[r])}),a!=null&&a.length?f.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:h.root.label,children:a}):null]})]})});H_.displayName="ToggleSwitch";const Y_="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.5096%203.7321C17.4858%206.70824%2017.4858%2011.5335%2014.5096%2014.5096C11.5335%2017.4858%206.70824%2017.4858%203.7321%2014.5096C0.755965%2011.5335%200.755965%206.70824%203.7321%203.7321C6.70824%200.755965%2011.5335%200.755965%2014.5096%203.7321Z'%20stroke='%23191960'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.4999%2018.4999L14.5049%2014.5049'%20stroke='%23191960'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",pa=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:a,maxLength:o,onChange:i,classLabel:l,...c},d)=>f.jsxs("div",{className:`${n?"mb-3":""}`,children:[n&&f.jsx("label",{className:`mb-1 block font-semibold ${l??""}`,children:n}),t===!0?f.jsx(ds,{className:`${a}`,sizing:"sm",maxLength:o,ref:d,type:s,rightIcon:()=>f.jsx("img",{src:Y_,alt:"search",width:17,height:17}),placeholder:e,onChange:i,...c}):f.jsx(ds,{className:`${a}`,sizing:"sm",maxLength:o,ref:d,type:s,placeholder:e,onChange:i,...c}),r&&f.jsx("p",{className:"mt-1 text-xs text-red-500",children:r})]}));pa.displayName="InputForm";const V_={"mth-password":"passwordInput-module__mth-password__R6DoN"},Hc=({placeholder:t,onChange:e,value:n,...r})=>{const[s,a]=_.useState(!1),o=()=>{a(!s)};return f.jsx("div",{className:"mb-5",children:f.jsxs("div",{className:"relative inline-block w-full",children:[f.jsx("input",{type:s?"text":"password",value:n,className:"w-full border p-2 pr-10",onChange:e,placeholder:t,...r}),f.jsx("button",{type:"button",onClick:o,className:V_["mth-password"],children:s?f.jsx(D_,{}):f.jsx(M_,{})})]})})},Mm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},Em=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,a=Math.min(Math.max(s,0),100),o=()=>a<10?"left-0":a>90?"right-0":"left-1/2 transform -translate-x-1/2";return f.jsxs("div",{className:"w-full p-1",children:[f.jsxs("div",{className:"mb-2 flex justify-between text-xs text-gray-400",children:[f.jsx("span",{children:t.toLocaleString()}),f.jsx("span",{children:e.toLocaleString()})]}),f.jsxs("div",{className:"relative mb-5 h-1 w-full rounded-full bg-gray-200",children:[f.jsx("div",{className:`${Mm.mth_progress_bar} absolute left-0 top-0 h-full rounded-full transition-all duration-300`,style:{width:`${a}%`}}),f.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${a}%`},children:[f.jsx("div",{className:`${Mm.mth_progress_bar_thumb} w-2 h-2 rounded-full shadow-lg`}),f.jsxs("div",{className:`absolute top-full mt-2 text-xs font-medium text-black whitespace-nowrap ${o()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},Tm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:a,classDiv:o,...i},l)=>f.jsxs("div",{className:o,children:[f.jsxs("select",{ref:l,id:a,className:"h-8 w-full rounded-lg border px-3 py-0.5",value:r,onChange:s,...i,children:[f.jsx("option",{value:"0",children:e||"Seleccione una opción"}),t==null?void 0:t.map(c=>f.jsx("option",{value:c.value,children:c.label},c.value))]}),n&&f.jsx("p",{className:"mt-1 text-sm text-red-500",children:n})]}));Tm.displayName="SelectForm";const Pm={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},U_=({logo:t,number:e,title:n,start:r,end:s,current:a,type:o,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return f.jsxs("div",{className:`${Pm.mth_card_indicator} flex flex-col border bg-white p-5`,children:[f.jsx("div",{className:"flex justify-end",children:f.jsx(Cr,{src:t||"",alt:"Icon",width:30,height:30,classIm:i})}),f.jsx("h2",{className:"mt-2 font-bold mth_card_indicator_title",id:`mth_card_indicator_${n}_title`,children:n.toUpperCase()}),f.jsxs("small",{className:"text-2xl font-extrabold mth_card_indicator_number",children:[l(e)," ",o==="percentage"?"%":""]}),f.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:f.jsx(Em,{start:r,end:s,current:a,type:o})})]})};/*!
|
|
9
9
|
* @kurkle/color v0.3.4
|
|
10
10
|
* https://github.com/kurkle/color#readme
|
|
11
11
|
* (c) 2024 Jukka Kurkela
|